@cloud-cli/on 1.34.3 → 1.36.0

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/on.js CHANGED
@@ -5549,9 +5549,29 @@ W.use = Li, W.walkTokens = function(e, t) {
5549
5549
  }, W.parseInline = Ii.parseInline, W.Parser = Pi, W.parser = Pi.parse, W.Renderer = Mi, W.TextRenderer = Ni, W.Lexer = ji, W.lexer = ji.lex, W.Tokenizer = Ai, W.Hooks = Fi, W.parse = W, W.options, W.setOptions, W.walkTokens, W.parseInline, Pi.parse, ji.lex;
5550
5550
  //#endregion
5551
5551
  //#region docs/workflow-syntax.md?raw
5552
- var Ri = "# Workflow Documentation\n\nThis is the living documentation for workflow authors. It is organized using the four Diataxis modes:\n\n- **Tutorials** teach the shortest path to a working workflow.\n- **How-to guides** solve focused tasks.\n- **Reference** documents the accepted syntax.\n- **Explanation** describes execution and security decisions.\n\n## Tutorials\n\n### Your First Workflow\n\nCreate a draft in the authenticated workflow editor, or send the YAML to the API:\n\n```yaml\nname: Hello\n\non:\n generic: {}\n\nsteps:\n - id: greet\n name: Greet\n run: echo \"Hello ${inputs.name}\"\n```\n\nSave it, validate it, and publish it. Only published and enabled workflows receive webhook or scheduled events.\n\nThe `generic` provider accepts a JSON request body as `inputs`. For example:\n\n```bash\ncurl -X POST http://localhost:11235/webhooks/generic \\\n -H 'content-type: application/json' \\\n --data '{\"name\":\"Ada\"}'\n```\n\n### Build a GitHub Workflow\n\n```yaml\nname: Build\n\non:\n github:\n events: [push]\n owner: cloud-cli\n repo: on\n branches: [main]\n\nsteps:\n - id: checkout\n name: Checkout\n env:\n clone_url: ${inputs.clone_url}\n commit_sha: ${inputs.commit_sha}\n run: |\n git clone --depth 1 \"$clone_url\" .\n git checkout \"$commit_sha\"\n\n - id: test\n name: Test\n run: pnpm install && pnpm test\n```\n\nGitHub webhooks must be signed with the configured `GITHUB_WEBHOOK_SECRET`. The preprocessor exposes normalized inputs including `event`, `owner`, `repo`, `branch`, `tag`, `ref`, `full_name`, `clone_url`, `commit_sha`, `author`, `action`, `changes`, and the original `raw` body.\n\n## How-To Guides\n\n### Reference Another Environment Value\n\nEnvironment entries are evaluated from top to bottom. Earlier values are available through `env` to later values:\n\n```yaml\nenv:\n image: ${inputs.repo}\n image_tag: ${env.image}:latest\n artifact_name: ${env.image_tag}-${inputs.commit_sha}\n```\n\nWorkflow-level values are available to every step. Step-level `env` values are evaluated after workflow-level values and can override them for that step.\n\nUse `${inputs.name}`, `${env.NAME}`, `${secrets.NAME}`, and `${steps.step_id.outputs.value}` where the value is available. A value without `${...}` remains literal text.\n\n### Run a Container with a Host Volume\n\nUse `image` with `volumes`. A volume is passed directly to `docker run` as a `-v` mapping:\n\n```yaml\nsteps:\n - id: sign\n name: Sign release\n image: alpine:latest\n volumes:\n - /var/lib/runner/secrets-store:/secrets:ro\n run: |\n ./sign.sh /secrets/signing.key dist/release.tar.gz\n```\n\nThe source path is on the worker host. The destination path is inside the container. Use absolute host paths when a specific host directory is required. The workflow must be trusted because volume mappings can expose host data to a container.\n\nA single string is also accepted:\n\n```yaml\nvolumes: /var/lib/runner/secrets-store:/secrets:ro\n```\n\n### Pass Additional Docker Arguments\n\nUse `dockerArgs` for additional arguments to `docker run`, before the image name:\n\n```yaml\nsteps:\n - id: build\n image: docker:cli\n dockerArgs:\n - --network=host\n - --user=1000:1000\n run: docker build -t example:latest .\n```\n\nArguments are not interpreted or shell-expanded by the runner. They are passed as individual Docker CLI arguments.\n\n### Use a Matrix\n\nKeep the matrix in the workflow definition:\n\n```yaml\nname: Package\n\nmatrix:\n node: [18, 20]\n os: [ubuntu, alpine]\n\non:\n generic: {}\n\nenv:\n node_version: ${env.MATRIX_NODE}\n\nsteps:\n - id: package\n image: node:${env.MATRIX_NODE}\n run: npm pack\n```\n\nThe runner creates one job for every Cartesian combination. The example creates four jobs. Each variant receives `MATRIX_NODE` and `MATRIX_OS` environment variables.\n\n### Add a Scheduled Trigger\n\n```yaml\non:\n schedule:\n - id: nightly\n cron: '0 2 * * *'\n timezone: Europe/Berlin\n```\n\nCron expressions have five fields: minute, hour, day of month, month, and day of week. The scheduler uses the declared IANA timezone.\n\nSolar triggers use `sunrise` or `sunset` and geographic coordinates:\n\n```yaml\non:\n solar:\n - id: morning\n event: sunrise\n latitude: 52.52\n longitude: 13.405\n offset: +15m\n```\n\n### Use Secrets\n\nCreate a secret in the management UI or with the API, then reference it in environment values:\n\n```yaml\nsteps:\n - id: publish\n env:\n npm_token: ${secrets.NPM_TOKEN}\n run: npm publish\n```\n\nSecret values are delivered to a worker after it claims the job. Do not write them into reports or artifacts.\n\n### Persist Artifacts and Caches\n\nArtifacts are captured from the workspace after a successful run:\n\n```yaml\nartifacts:\n paths:\n - dist\n - reports/**/*.json\n```\n\nCaches are restored before steps start and replaced after a successful run:\n\n```yaml\ncache:\n key: npm-${inputs.repo}-${inputs.branch}\n paths:\n - node_modules\n```\n\nConfigure a shared FileBin backend on the server and workers with `RUNNER_FILE_API_URL`, `RUNNER_FILE_BIN`, and optionally `RUNNER_FILE_PASSWORD`. Without it, the runner uses the database fallback. Cache keys are scoped by workflow; artifacts are scoped by job.\n\nPopulate workspace files from managed secrets before steps run:\n\n```yaml\nsecretFiles:\n .config/signing.key: SIGNING_KEY\n```\n\nSecret files are created with owner-only permissions and are removed with the job workspace.\n\n## Reference\n\n### Top-Level Workflow Fields\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `name` | string | Required human-readable workflow name shown in the UI and reports. |\n| `id` | string | Optional identifier used when deriving an ID outside the management API. The management API ID is authoritative after creation. |\n| `on` | object | Required trigger configuration. |\n| `env` | object | Workflow environment values, evaluated in declaration order. |\n| `matrix` | object | Matrix dimensions. Each value is an array of strings, numbers, or booleans. |\n| `concurrency` | object | Optional concurrency group and cancellation policy. |\n| `tags` | string[] | Worker capability tags required by the job. |\n| `artifacts` | object | Workspace paths captured after successful runs. |\n| `cache` | object | Keyed workspace paths restored before and saved after successful runs. |\n| `secretFiles` | object | Workspace-relative file paths mapped to secret names. |\n| `steps` | object[] | Required non-empty ordered list of steps. |\n| `retries` | integer | Additional attempts for a failed step. Must be zero or greater. |\n\n`includes` and workflow-to-workflow imports are not supported. Workflow definitions are stored as complete database revisions. Reusable behavior should be implemented through the planned step reuse mechanism rather than filesystem imports.\n\n### Triggers\n\nThe first non-`schedule`/`solar` key in `on` is the provider trigger. Supported providers include `generic` and `github`.\n\n#### GitHub Trigger Filters\n\n| Field | Type | Behavior |\n| --- | --- | --- |\n| `events` | string[] | Exact event names such as `push` or `pull_request`. |\n| `owner` | string or string[] | Exact repository owner. |\n| `repo` | string or string[] | Exact repository name. |\n| `name` | string or string[] | Exact `owner/repo` name. |\n| `branches` | string or string[] | Glob patterns matching normalized branches or tags. |\n| `refs` | string or string[] | Alias for branch/ref matching. |\n| `tag` | boolean | Requires a tag push when true, a non-tag event when false. |\n| `tags` | string[] | Regular expressions matched against the tag value. |\n| `paths` | string[] | Glob patterns matched against changed files. |\n| `if` | string or string[] | Safe JavaScript condition evaluated after provider filters. |\n\nConfigured fields are combined with AND. Multiple values within a field are combined with OR. Negated `!value` entries are supported by exact-value filters.\n\n#### Schedule Trigger\n\n```yaml\nschedule:\n - id: hourly\n cron: '0 * * * *'\n timezone: UTC\n```\n\n#### Solar Trigger\n\n```yaml\nsolar:\n - id: sunrise-build\n event: sunrise\n latitude: 52.52\n longitude: 13.405\n timezone: Europe/Berlin\n offset: -15m\n```\n\n### Environment and Expressions\n\nInterpolated strings use standard JavaScript template expressions inside `${...}`. The safe evaluator supports literals, property access, arithmetic, comparisons, boolean operators, ternaries, arrays, objects, and these helpers:\n\n```text\nString(value)\nNumber(value)\nBoolean(value)\nJSON.parse(value)\nJSON.stringify(value)\nObject.keys(value)\n```\n\nAvailable context objects are:\n\n| Object | Available data |\n| --- | --- |\n| `inputs` | Trigger payload and normalized provider inputs. |\n| `env` | Runner environment plus earlier workflow or step environment entries. |\n| `secrets` | Decrypted job-scoped secrets. |\n| `steps` | Earlier step statuses, exit codes, and outputs. |\n| `files` | Workspace-scoped `exists`, `readFile`, and `join` helpers for `eval:` steps. |\n\nExpressions cannot access JavaScript constructors or prototypes. Shell commands are not expression-evaluated; only declared interpolation fields are evaluated.\n\n### Steps\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `id` | string | Stable identifier used by `steps.<id>`. |\n| `name` | string | Display name. Defaults to `id`. |\n| `run` | string | Shell command or script. Mutually exclusive with `eval`. |\n| `eval` | string | In-process safe expression. Mutually exclusive with `run`. |\n| `env` | object | Step environment, evaluated after workflow environment. |\n| `image` | string | Docker image. Selects container execution for the step. |\n| `volumes` | string or string[] | Docker `-v` mappings. |\n| `dockerArgs` | string[] | Additional raw arguments for `docker run`. |\n| `timeoutMs` | positive integer | Maximum step runtime. Defaults to 30 seconds. |\n| `if` | string | Safe condition. False conditions produce a skipped step. |\n\n`run` steps execute through the selected worker driver. With `image`, the command runs as `sh -c` inside Docker. Without `image`, it runs through the worker shell. `eval` steps run inside the worker process and can produce structured outputs for later steps.\n\n### Management and API\n\nWorkflow definitions are drafted, validated, published, enabled, and deleted through the authenticated management UI or these endpoints:\n\n```text\nPOST /api/workflows/validate\nGET /api/workflows\nGET /api/workflows/:id\nPUT /api/workflows/:id\nPOST /api/workflows/:id/publish\nDELETE /api/workflows/:id\n```\n\nOnly published workflows with `enabled: true` are matched for incoming triggers. Saving a workflow creates a new immutable revision. Existing jobs continue to use the revision recorded when they were created.\n\n## Explanation\n\n### Why Workflow YAML Lives in the Database\n\nThe server stores source YAML and normalized revisions in the database. Workers are stateless: they fetch the referenced revision when claiming a job and do not read workflow files from their local filesystem. This keeps every worker on the same definition and makes published revisions reproducible.\n\n### Why Matrix Expansion Happens at Trigger Time\n\nThe stored revision remains one canonical workflow. When a trigger matches, the server creates one queue job per matrix combination. The payload records the matrix context, and the worker resolves that same variant before execution. This avoids storing duplicate workflow revisions while keeping each job independently observable.\n\n### Docker Volumes and Trust\n\n`volumes` and `dockerArgs` are intentionally powerful options. A host volume can expose credentials or signing material, and Docker arguments can change networking, users, capabilities, or isolation. Only trusted administrators should publish workflows using these fields. The runner does not copy, inspect, or redact files mounted into containers.\n\n### Reuse and Imports\n\nFilesystem imports were removed because workers no longer load workflow files. Future step reuse should operate on database-owned definitions or explicit reusable step mechanisms, keeping revisioning and authorization visible to the control plane.\n", zi = "\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"9\"></circle>\n <path d=\"M9.6 9a2.5 2.5 0 1 1 4.2 1.8c-1.2 1-1.8 1.4-1.8 2.7\"></path>\n <path d=\"M12 17h.01\"></path>\n </svg>", Bi = "\n :root { color-scheme: dark; }\n * { box-sizing: border-box; }\n body { margin: 0; background: #030712; color: #e5e7eb; font-family: ui-sans-serif, system-ui, sans-serif; }\n main { max-width: 78rem; margin: 0 auto; padding: 2rem 1rem 5rem; }\n article { max-width: 54rem; margin: 0 auto; line-height: 1.7; }\n h1, h2, h3 { color: #f9fafb; line-height: 1.2; letter-spacing: -0.02em; }\n h1 { font-size: 2.25rem; margin: 0 0 1rem; }\n h2 { border-top: 1px solid #1f2937; margin-top: 3rem; padding-top: 1.5rem; font-size: 1.6rem; }\n h3 { margin-top: 2rem; font-size: 1.15rem; }\n p, li { color: #cbd5e1; }\n a { color: #93c5fd; }\n code { border-radius: .35rem; background: #111827; color: #bfdbfe; padding: .12rem .35rem; font-size: .9em; }\n pre { overflow-x: auto; border: 1px solid #1f2937; border-radius: .75rem; background: #0b1120; padding: 1rem; }\n pre code { background: transparent; padding: 0; color: #d1d5db; }\n table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; margin: 1rem 0; }\n th, td { border-bottom: 1px solid #1f2937; padding: .65rem .75rem; text-align: left; vertical-align: top; }\n th { color: #f9fafb; background: #111827; }\n blockquote { border-left: 3px solid #6366f1; margin-left: 0; padding-left: 1rem; color: #94a3b8; }\n .topbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; max-width: 78rem; margin: 0 auto; padding: 1rem; }\n .back { display: inline-flex; align-items: center; gap: .45rem; color: #94a3b8; text-decoration: none; font-size: .85rem; }\n .back:hover, .back:focus-visible { color: #f9fafb; }\n @media (min-width: 640px) { main { padding: 3rem 1.5rem 6rem; } }\n";
5552
+ var Ri = "# Workflow Documentation\n\nThis is the living documentation for workflow authors. It is organized using the four Diataxis modes:\n\n- **Tutorials** teach the shortest path to a working workflow.\n- **How-to guides** solve focused tasks.\n- **Reference** documents the accepted syntax.\n- **Explanation** describes execution and security decisions.\n\n## Tutorials\n\n### Your First Workflow\n\nCreate a draft in the authenticated workflow editor, or send the YAML to the API:\n\n```yaml\nname: Hello\n\non:\n generic: {}\n\nsteps:\n - id: greet\n name: Greet\n run: echo \"Hello ${inputs.name}\"\n```\n\nSave it, validate it, and publish it. Only published and enabled workflows receive webhook or scheduled events.\n\nThe `generic` provider accepts a JSON request body as `inputs`. For example:\n\n```bash\ncurl -X POST http://localhost:11235/webhooks/generic \\\n -H 'content-type: application/json' \\\n --data '{\"name\":\"Ada\"}'\n```\n\n### Build a GitHub Workflow\n\n```yaml\nname: Build\n\non:\n github:\n events: [push]\n owner: cloud-cli\n repo: on\n branches: [main]\n\nsteps:\n - id: checkout\n name: Checkout\n env:\n clone_url: ${inputs.clone_url}\n commit_sha: ${inputs.commit_sha}\n run: |\n git clone --depth 1 \"$clone_url\" .\n git checkout \"$commit_sha\"\n\n - id: test\n name: Test\n run: pnpm install && pnpm test\n```\n\nGitHub webhooks must be signed with the configured `GITHUB_WEBHOOK_SECRET`. The preprocessor exposes normalized inputs including `event`, `owner`, `repo`, `branch`, `tag`, `ref`, `full_name`, `clone_url`, `commit_sha`, `author`, `action`, `changes`, and the original `raw` body.\n\n## How-To Guides\n\n### Reference Another Environment Value\n\nEnvironment entries are evaluated from top to bottom. Earlier values are available through `env` to later values:\n\n```yaml\nenv:\n image: ${inputs.repo}\n image_tag: ${env.image}:latest\n artifact_name: ${env.image_tag}-${inputs.commit_sha}\n```\n\nWorkflow-level values are available to every step. Step-level `env` values are evaluated after workflow-level values and can override them for that step.\n\nUse `${inputs.name}`, `${env.NAME}`, `${secrets.NAME}`, and `${steps.step_id.outputs.value}` where the value is available. A value without `${...}` remains literal text.\n\n### Run a Container with a Host Volume\n\nUse `image` with `volumes`. A volume is passed directly to `docker run` as a `-v` mapping:\n\n```yaml\nsteps:\n - id: sign\n name: Sign release\n image: alpine:latest\n volumes:\n - /var/lib/runner/secrets-store:/secrets:ro\n run: |\n ./sign.sh /secrets/signing.key dist/release.tar.gz\n```\n\nThe source path is on the worker host. The destination path is inside the container. Use absolute host paths when a specific host directory is required. The workflow must be trusted because volume mappings can expose host data to a container.\n\nA single string is also accepted:\n\n```yaml\nvolumes: /var/lib/runner/secrets-store:/secrets:ro\n```\n\n### Pass Additional Docker Arguments\n\nUse `dockerArgs` for additional arguments to `docker run`, before the image name:\n\n```yaml\nsteps:\n - id: build\n image: docker:cli\n dockerArgs:\n - --network=host\n - --user=1000:1000\n run: docker build -t example:latest .\n```\n\nArguments are not interpreted or shell-expanded by the runner. They are passed as individual Docker CLI arguments.\n\n### Use a Matrix\n\nKeep the matrix in the workflow definition:\n\n```yaml\nname: Package\n\nmatrix:\n node: [18, 20]\n os: [ubuntu, alpine]\n\non:\n generic: {}\n\nenv:\n node_version: ${env.MATRIX_NODE}\n\nsteps:\n - id: package\n image: node:${env.MATRIX_NODE}\n run: npm pack\n```\n\nThe runner creates one job for every Cartesian combination. The example creates four jobs. Each variant receives `MATRIX_NODE` and `MATRIX_OS` environment variables.\n\n### Add a Scheduled Trigger\n\n```yaml\non:\n schedule:\n - id: nightly\n cron: '0 2 * * *'\n timezone: Europe/Berlin\n```\n\nCron expressions have five fields: minute, hour, day of month, month, and day of week. The scheduler uses the declared IANA timezone.\n\nSolar triggers use `sunrise` or `sunset` and geographic coordinates:\n\n```yaml\non:\n solar:\n - id: morning\n event: sunrise\n latitude: 52.52\n longitude: 13.405\n offset: +15m\n```\n\n### Use Secrets\n\nCreate a secret in the management UI or with the API, then reference it in environment values:\n\n```yaml\nsteps:\n - id: publish\n env:\n npm_token: ${secrets.NPM_TOKEN}\n run: npm publish\n```\n\nSecret values are delivered to a worker after it claims the job. Do not write them into reports or artifacts.\n\n### Persist Artifacts and Caches\n\nArtifacts are captured from the workspace after a successful run:\n\n```yaml\nartifacts:\n paths:\n - dist\n - reports/**/*.json\n```\n\nCaches are restored before steps start and saved after a successful run:\n\n```yaml\ncache:\n key: npm-${inputs.repo}-${inputs.branch}\n paths:\n - node_modules\n```\n\nConfigure a shared FileBin backend on the server and workers with `RUNNER_FILE_API_URL`, `RUNNER_FILE_BIN`, and optionally `RUNNER_FILE_PASSWORD`. Create a bin with `POST /bin`, then configure its ID. Without FileBin configuration, the runner uses the central database fallback. Cache keys are scoped by workflow; artifacts are scoped by job. Stored collections are limited to 50 MiB per capture.\n\nAdministrators can download a captured artifact with `GET /api/runs/:jobId/artifacts/:path`.\n\nPopulate workspace files from managed secrets before steps run:\n\n```yaml\nsecretFiles:\n .config/signing.key: SIGNING_KEY\n```\n\nSecret files are created with owner-only permissions in the worker workspace. They must be handled according to the worker storage lifecycle and should not be included in artifacts or caches.\n\n## Reference\n\n### Top-Level Workflow Fields\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `name` | string | Required human-readable workflow name shown in the UI and reports. |\n| `id` | string | Optional identifier used when deriving an ID outside the management API. The management API ID is authoritative after creation. |\n| `on` | object | Required trigger configuration. |\n| `env` | object | Workflow environment values, evaluated in declaration order. |\n| `matrix` | object | Matrix dimensions. Each value is an array of strings, numbers, or booleans. |\n| `concurrency` | object | Optional concurrency group and cancellation policy. |\n| `tags` | string[] | Worker capability tags required by the job. |\n| `artifacts` | object | Workspace paths captured after successful runs. |\n| `cache` | object | Keyed workspace paths restored before and saved after successful runs. |\n| `secretFiles` | object | Workspace-relative file paths mapped to secret names. |\n| `steps` | object[] | Required non-empty ordered list of steps. |\n| `retries` | integer | Additional attempts for a failed step. Must be zero or greater. |\n\n`includes` and workflow-to-workflow imports are not supported. Workflow definitions are stored as complete database revisions. Reusable behavior should be implemented through the planned step reuse mechanism rather than filesystem imports.\n\n### Triggers\n\nThe first non-`schedule`/`solar` key in `on` is the provider trigger. Supported providers include `generic` and `github`.\n\n#### GitHub Trigger Filters\n\n| Field | Type | Behavior |\n| --- | --- | --- |\n| `events` | string[] | Exact event names such as `push` or `pull_request`. |\n| `owner` | string or string[] | Exact repository owner. |\n| `repo` | string or string[] | Exact repository name. |\n| `name` | string or string[] | Exact `owner/repo` name. |\n| `branches` | string or string[] | Glob patterns matching normalized branches or tags. |\n| `refs` | string or string[] | Alias for branch/ref matching. |\n| `tag` | boolean | Requires a tag push when true, a non-tag event when false. |\n| `tags` | string[] | Regular expressions matched against the tag value. |\n| `paths` | string[] | Glob patterns matched against changed files. |\n| `if` | string or string[] | Safe JavaScript condition evaluated after provider filters. |\n\nConfigured fields are combined with AND. Multiple values within a field are combined with OR. Negated `!value` entries are supported by exact-value filters.\n\n#### Schedule Trigger\n\n```yaml\nschedule:\n - id: hourly\n cron: '0 * * * *'\n timezone: UTC\n```\n\n#### Solar Trigger\n\n```yaml\nsolar:\n - id: sunrise-build\n event: sunrise\n latitude: 52.52\n longitude: 13.405\n timezone: Europe/Berlin\n offset: -15m\n```\n\n### Environment and Expressions\n\nInterpolated strings use standard JavaScript template expressions inside `${...}`. The safe evaluator supports literals, property access, arithmetic, comparisons, boolean operators, ternaries, arrays, objects, and these helpers:\n\n```text\nString(value)\nNumber(value)\nBoolean(value)\nJSON.parse(value)\nJSON.stringify(value)\nObject.keys(value)\n```\n\nAvailable context objects are:\n\n| Object | Available data |\n| --- | --- |\n| `inputs` | Trigger payload and normalized provider inputs. |\n| `env` | Runner environment plus earlier workflow or step environment entries. |\n| `secrets` | Decrypted job-scoped secrets. |\n| `steps` | Earlier step statuses, exit codes, and outputs. |\n| `files` | Workspace-scoped `exists`, `readFile`, and `join` helpers for `eval:` steps. |\n\nExpressions cannot access JavaScript constructors or prototypes. Shell commands are not expression-evaluated; only declared interpolation fields are evaluated.\n\n### Steps\n\n| Field | Type | Description |\n| --- | --- | --- |\n| `id` | string | Stable identifier used by `steps.<id>`. |\n| `name` | string | Display name. Defaults to `id`. |\n| `run` | string | Shell command or script. Mutually exclusive with `eval`. |\n| `eval` | string | In-process safe expression. Mutually exclusive with `run`. |\n| `env` | object | Step environment, evaluated after workflow environment. |\n| `image` | string | Docker image. Selects container execution for the step. |\n| `volumes` | string or string[] | Docker `-v` mappings. |\n| `dockerArgs` | string[] | Additional raw arguments for `docker run`. |\n| `timeoutMs` | positive integer | Maximum step runtime. Defaults to 30 seconds. |\n| `if` | string | Safe condition. False conditions produce a skipped step. |\n\n`run` steps execute through the selected worker driver. With `image`, the command runs as `sh -c` inside Docker. Without `image`, it runs through the worker shell. `eval` steps run inside the worker process and can produce structured outputs for later steps.\n\n### Management and API\n\nWorkflow definitions are drafted, validated, published, enabled, and deleted through the authenticated management UI or these endpoints:\n\n```text\nPOST /api/workflows/validate\nGET /api/workflows\nGET /api/workflows/:id\nPUT /api/workflows/:id\nPOST /api/workflows/:id/publish\nDELETE /api/workflows/:id\n```\n\nOnly published workflows with `enabled: true` are matched for incoming triggers. Saving a workflow creates a new immutable revision. Existing jobs continue to use the revision recorded when they were created.\n\n## Explanation\n\n### Why Workflow YAML Lives in the Database\n\nThe server stores source YAML and normalized revisions in the database. Workers are stateless: they fetch the referenced revision when claiming a job and do not read workflow files from their local filesystem. This keeps every worker on the same definition and makes published revisions reproducible.\n\n### Why Matrix Expansion Happens at Trigger Time\n\nThe stored revision remains one canonical workflow. When a trigger matches, the server creates one queue job per matrix combination. The payload records the matrix context, and the worker resolves that same variant before execution. This avoids storing duplicate workflow revisions while keeping each job independently observable.\n\n### Docker Volumes and Trust\n\n`volumes` and `dockerArgs` are intentionally powerful options. A host volume can expose credentials or signing material, and Docker arguments can change networking, users, capabilities, or isolation. Only trusted administrators should publish workflows using these fields. The runner does not copy, inspect, or redact files mounted into containers.\n\n### Reuse and Imports\n\nFilesystem imports were removed because workers no longer load workflow files. Future step reuse should operate on database-owned definitions or explicit reusable step mechanisms, keeping revisioning and authorization visible to the control plane.\n", zi = "\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.8\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"9\"></circle>\n <path d=\"M9.6 9a2.5 2.5 0 1 1 4.2 1.8c-1.2 1-1.8 1.4-1.8 2.7\"></path>\n <path d=\"M12 17h.01\"></path>\n </svg>", Bi = "\n :root { color-scheme: dark; }\n * { box-sizing: border-box; }\n body { margin: 0; background: #030712; color: #e5e7eb; font-family: ui-sans-serif, system-ui, sans-serif; }\n main { max-width: 78rem; margin: 0 auto; padding: 2rem 1rem 5rem; }\n article { max-width: 54rem; margin: 0 auto; line-height: 1.7; }\n h1, h2, h3 { color: #f9fafb; line-height: 1.2; letter-spacing: -0.02em; }\n h1 { font-size: 2.25rem; margin: 0 0 1rem; }\n h2 { border-top: 1px solid #1f2937; margin-top: 3rem; padding-top: 1.5rem; font-size: 1.6rem; }\n h3 { margin-top: 2rem; font-size: 1.15rem; }\n p, li { color: #cbd5e1; }\n a { color: #93c5fd; }\n code { border-radius: .35rem; background: #111827; color: #bfdbfe; padding: .12rem .35rem; font-size: .9em; }\n pre { overflow-x: auto; border: 1px solid #1f2937; border-radius: .75rem; background: #0b1120; padding: 1rem; }\n pre code { background: transparent; padding: 0; color: #d1d5db; }\n table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; margin: 1rem 0; }\n th, td { border-bottom: 1px solid #1f2937; padding: .65rem .75rem; text-align: left; vertical-align: top; }\n th { color: #f9fafb; background: #111827; }\n blockquote { border-left: 3px solid #6366f1; margin-left: 0; padding-left: 1rem; color: #94a3b8; }\n .topbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; max-width: 78rem; margin: 0 auto; padding: 1rem; }\n .back { display: inline-flex; align-items: center; gap: .45rem; color: #94a3b8; text-decoration: none; font-size: .85rem; }\n .back:hover, .back:focus-visible { color: #f9fafb; }\n .help-layout { display: grid; grid-template-columns: minmax(0, 54rem); gap: 3rem; justify-content: center; }\n .toc { display: none; }\n .toc nav { position: sticky; top: 1.25rem; max-height: calc(100vh - 2.5rem); overflow-y: auto; border-left: 1px solid #1f2937; padding-left: 1rem; }\n .toc-title { margin: 0 0 .65rem; color: #f9fafb; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }\n .toc ul { display: grid; gap: .15rem; list-style: none; margin: 0; padding: 0; }\n .toc a { display: block; border-radius: .35rem; color: #94a3b8; font-size: .8rem; line-height: 1.35; padding: .3rem .45rem; text-decoration: none; }\n .toc a:hover, .toc a:focus-visible { background: #111827; color: #dbeafe; outline: none; }\n .toc-depth-2 { padding-left: .9rem !important; }\n .toc-depth-3 { padding-left: 1.8rem !important; font-size: .75rem !important; }\n @media (min-width: 1024px) { .help-layout { grid-template-columns: minmax(0, 54rem) 16rem; justify-content: center; } .toc { display: block; } }\n @media (min-width: 640px) { main { padding: 3rem 1.5rem 6rem; } }\n";
5553
5553
  function Vi(e = !1) {
5554
- let t = W.parse(Ri, { async: !1 });
5554
+ let t = /* @__PURE__ */ new Map(), n = (e) => {
5555
+ let n = e.replace(/[`*_~]/g, "").replace(/\[([^\]]+)\]\([^)]*\)/g, "$1").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "") || "section", r = t.get(n) || 0;
5556
+ return t.set(n, r + 1), r ? `${n}-${r + 1}` : n;
5557
+ }, r = W.lexer(Ri).filter((e) => e.type === "heading" && (e.depth || 0) <= 3).map((e) => ({
5558
+ depth: e.depth,
5559
+ text: e.text || "",
5560
+ id: n(e.text || "")
5561
+ }));
5562
+ t.clear();
5563
+ let i = 0, a = new W.Renderer();
5564
+ a.heading = ({ text: e, depth: t }) => `<h${t} id="${r[i++]?.id || n(e)}">${e}</h${t}>`;
5565
+ let o = W.parse(Ri, {
5566
+ async: !1,
5567
+ renderer: a
5568
+ }), s = (e) => e.replace(/[&<>"']/g, (e) => ({
5569
+ "&": "&amp;",
5570
+ "<": "&lt;",
5571
+ ">": "&gt;",
5572
+ "\"": "&quot;",
5573
+ "'": "&#39;"
5574
+ })[e] || ""), c = r.length ? `<aside class="toc"><nav aria-label="On this page"><p class="toc-title">On this page</p><ul>${r.map((e) => `<li><a class="toc-depth-${e.depth}" href="#${e.id}">${s(e.text)}</a></li>`).join("")}</ul></nav></aside>` : "";
5555
5575
  return `<!doctype html>
5556
5576
  <html lang="en" class="dark">
5557
5577
  <head>
@@ -5562,97 +5582,616 @@ function Vi(e = !1) {
5562
5582
  </head>
5563
5583
  <body>
5564
5584
  ${e ? "" : `<div class="topbar"><a class="back" href="/runs">${zi}<span>Back to jobs</span></a><a class="back" href="/workflows">Manage workflows</a></div>`}
5565
- <main><article>${t}</article></main>
5585
+ <main><div class="help-layout"><article>${o}</article>${e ? "" : c}</div></main>
5566
5586
  </body>
5567
5587
  </html>`;
5568
5588
  }
5569
- //#endregion
5570
- //#region src/workflows-ui.html?raw
5571
- var Hi = "<!doctype html>\n<html lang=\"en\" class=\"dark\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta name=\"theme-color\" content=\"#030712\" />\n <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n <link rel=\"manifest\" href=\"/manifest.webmanifest\" />\n <link rel=\"icon\" href=\"/app-icon.svg\" type=\"image/svg+xml\" />\n <title>Runner Workflow Management</title>\n <script type=\"importmap\">\n { \"imports\": { \"@li3/\": \"https://cdn.li3.dev/@li3/\" } }\n <\/script>\n <style>\n body[data-page='list'] .editor-panel {\n display: none;\n }\n body[data-page='editor'] .workflow-list,\n body[data-page='editor'] .secrets-panel {\n display: none;\n }\n </style>\n </head>\n <body data-page=\"__WORKFLOW_PAGE__\" class=\"min-h-screen bg-gray-950 p-4 font-sans text-gray-100 md:p-6\">\n <link rel=\"component\" href=\"https://sodium.static.apphor.de/code-editor.html\" />\n <link rel=\"component\" href=\"https://sodium.static.apphor.de/code-block.html\" />\n <link rel=\"component\" href=\"https://sodium.static.apphor.de/lucide-icon.html\" />\n\n <template app>\n <main class=\"mx-auto max-w-6xl space-y-5\">\n <header class=\"flex flex-col gap-4 border-b border-gray-800 pb-5 sm:flex-row sm:items-end sm:justify-between\">\n <div class=\"flex items-start gap-3\">\n <a\n href=\"/runs\"\n aria-label=\"Back to dashboard\"\n class=\"mt-1 rounded-lg border border-gray-800 bg-gray-900 p-2 text-gray-400 transition hover:border-indigo-500/60 hover:text-indigo-300\"\n >\n <lucide-icon icon=\"arrow-left\" size=\"17\"></lucide-icon>\n </a>\n <div>\n <p class=\"text-xs font-semibold uppercase tracking-[0.18em] text-indigo-400\">Runner engine</p>\n <h1 class=\"mt-1 text-2xl font-bold tracking-tight text-white\">Workflow control room</h1>\n <p class=\"mt-1 text-sm text-gray-400\">Draft, validate, and publish revisioned YAML definitions.</p>\n </div>\n </div>\n <a\n href=\"/workflows/new\"\n class=\"inline-flex items-center justify-center gap-2 rounded-lg bg-indigo-500 px-4 py-2.5 text-sm font-semibold text-white shadow-lg shadow-indigo-950/40 transition hover:bg-indigo-400\"\n >\n <lucide-icon icon=\"plus\" size=\"16\"></lucide-icon>\n New workflow\n </a>\n <a\n href=\"/help\"\n class=\"inline-flex items-center justify-center gap-2 rounded-lg border border-gray-800 bg-gray-900 px-3 py-2.5 text-sm font-medium text-gray-300 outline-none transition hover:border-indigo-500/50 hover:text-indigo-200 focus-visible:ring-2 focus-visible:ring-indigo-400/60\"\n >\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\"></circle>\n <path d=\"M9.6 9a2.5 2.5 0 1 1 4.2 1.8c-1.2 1-1.8 1.4-1.8 2.7\"></path>\n <path d=\"M12 17h.01\"></path>\n </svg>\n Help\n </a>\n </header>\n\n <template if=\"notice\">\n <div\n role=\"status\"\n class=\"flex items-center gap-2 rounded-lg border px-3 py-2.5 text-sm\"\n bind-class=\"noticeError ? 'border-rose-500/40 bg-rose-500/10 text-rose-100' : 'border-emerald-500/40 bg-emerald-500/10 text-emerald-100'\"\n >\n <lucide-icon bind-icon=\"noticeError ? 'circle-alert' : 'circle-check'\" size=\"17\"></lucide-icon>\n <span>{{ notice }}</span>\n </div>\n </template>\n\n <section id=\"workflow-layout\" class=\"space-y-5\">\n <nav\n class=\"workflow-list rounded-2xl border border-gray-800 bg-gray-900/80 p-4 shadow-xl shadow-black/10\"\n aria-labelledby=\"workflow-list-title\"\n >\n <div class=\"mb-4 flex items-end justify-between gap-3 border-b border-gray-800 pb-4\">\n <div>\n <p class=\"text-[11px] font-semibold uppercase tracking-[0.18em] text-indigo-400\">Definitions</p>\n <h2 id=\"workflow-list-title\" class=\"mt-1 text-lg font-semibold text-white\">Workflows</h2>\n </div>\n <span\n class=\"rounded-full border border-gray-700 bg-gray-950 px-2.5 py-1 text-xs font-mono text-gray-400\"\n aria-label=\"Workflow count\"\n >\n {{ workflows.length }}\n </span>\n </div>\n <ul class=\"grid gap-2\" aria-label=\"Workflow definitions\">\n <template for=\"workflow of workflows\">\n <li>\n <a\n attr-href=\"'/workflows/' + workflow.id\"\n class=\"group flex min-h-16 items-center gap-3 rounded-xl border border-gray-800 bg-gray-950/50 px-3.5 py-3 text-left text-sm text-gray-300 outline-none transition hover:border-indigo-500/50 hover:bg-indigo-500/10 focus-visible:border-indigo-400 focus-visible:ring-2 focus-visible:ring-indigo-400/50\"\n >\n <span\n class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-gray-800 text-gray-400 transition group-hover:bg-indigo-500/15 group-hover:text-indigo-300\"\n >\n <lucide-icon icon=\"workflow\" size=\"17\"></lucide-icon>\n </span>\n <span class=\"min-w-0 flex-1\">\n <span class=\"block truncate font-medium text-gray-100\">{{ workflow.name }}</span>\n <span class=\"mt-0.5 block truncate font-mono text-[11px] text-gray-500\">{{ workflow.id }}</span>\n </span>\n <span\n class=\"rounded-full border px-2 py-1 text-[10px] font-semibold uppercase tracking-wide\"\n bind-class=\"workflow.status === 'published' ? 'border-emerald-500/30 bg-emerald-500/10 text-emerald-300' : workflow.status === 'archived' ? 'border-gray-700 bg-gray-800 text-gray-500' : 'border-amber-500/30 bg-amber-500/10 text-amber-300'\"\n >{{ workflow.status }}</span\n >\n <lucide-icon\n icon=\"arrow-up-right\"\n size=\"16\"\n class=\"shrink-0 text-gray-600 transition group-hover:text-indigo-300\"\n ></lucide-icon>\n </a>\n </li>\n </template>\n </ul>\n <div\n class=\"rounded-xl border border-dashed border-gray-700 px-4 py-8 text-center\"\n class-hidden=\"workflows.length > 0\"\n >\n <lucide-icon icon=\"workflow\" size=\"22\" class=\"mx-auto text-gray-600\"></lucide-icon>\n <p class=\"mt-2 text-sm font-medium text-gray-300\">No workflows yet</p>\n <p class=\"mt-1 text-xs text-gray-500\">Create a definition to start automating jobs.</p>\n </div>\n </nav>\n\n <section\n class=\"editor-panel overflow-hidden rounded-xl border border-gray-800 bg-gray-900/80 shadow-xl shadow-black/10\"\n >\n <div class=\"border-b border-gray-800 px-4 pt-3 sm:px-5\">\n <a\n href=\"/workflows\"\n class=\"inline-flex items-center gap-1.5 rounded-md px-2 py-1.5 text-xs font-medium text-gray-400 outline-none transition hover:bg-gray-800 hover:text-gray-100 focus-visible:ring-2 focus-visible:ring-indigo-400/60\"\n >\n <lucide-icon icon=\"arrow-left\" size=\"14\"></lucide-icon>\n Back to workflows\n </a>\n </div>\n <div class=\"border-b border-gray-800 bg-gray-900 px-4 py-4 sm:px-5\">\n <div class=\"flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between\">\n <label class=\"block max-w-xl flex-1 text-xs font-semibold uppercase tracking-wider text-gray-400\"\n >Workflow ID\n <input\n bind-value=\"workflowId\"\n on-input=\"setWorkflowId($event)\"\n bind-disabled=\"selectedId\"\n aria-describedby=\"workflow-id-help\"\n class=\"mt-2 w-full rounded-lg border border-gray-700 bg-gray-950 px-3 py-2.5 font-mono text-sm normal-case tracking-normal text-white outline-none transition focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500/20\"\n placeholder=\"derived-from-workflow-name\"\n />\n <span\n id=\"workflow-id-help\"\n class=\"mt-1 block text-[11px] font-normal normal-case tracking-normal text-gray-500\"\n >The ID becomes permanent after the first save.</span\n >\n </label>\n <label class=\"inline-flex items-center gap-2 text-sm text-gray-300\">\n <input\n type=\"checkbox\"\n bind-checked=\"enabled\"\n on-change=\"setEnabled($event)\"\n class=\"h-4 w-4 rounded border-gray-700 bg-gray-950 text-indigo-500 focus:ring-2 focus:ring-indigo-500/30\"\n />\n Enabled\n </label>\n <div class=\"flex flex-wrap gap-2\" class-hidden=\"readOnly\">\n <button\n type=\"button\"\n aria-label=\"Save workflow draft\"\n title=\"Save workflow draft\"\n on-click=\"save()\"\n bind-disabled=\"busy\"\n class=\"inline-flex items-center gap-2 rounded-lg bg-indigo-500 px-3 py-2.5 text-sm font-semibold text-white transition hover:bg-indigo-400 disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <lucide-icon icon=\"save\" size=\"16\"></lucide-icon>\n <span class=\"hidden sm:inline\">Save draft</span>\n </button>\n <button\n type=\"button\"\n aria-label=\"Publish workflow\"\n title=\"Publish workflow\"\n on-click=\"publish()\"\n bind-disabled=\"busy\"\n class=\"inline-flex items-center gap-2 rounded-lg border border-emerald-500/50 px-3 py-2.5 text-sm font-medium text-emerald-300 transition hover:bg-emerald-500/10 disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <lucide-icon icon=\"rocket\" size=\"16\"></lucide-icon>\n <span class=\"hidden sm:inline\">Publish</span>\n </button>\n <button\n type=\"button\"\n aria-label=\"Delete workflow\"\n title=\"Delete workflow\"\n on-click=\"remove()\"\n bind-disabled=\"busy\"\n class=\"inline-flex items-center gap-2 rounded-lg border border-rose-500/50 px-3 py-2.5 text-sm font-medium text-rose-300 transition hover:bg-rose-500/10 disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <lucide-icon icon=\"trash\" size=\"16\"></lucide-icon>\n <span class=\"hidden sm:inline\">Delete</span>\n </button>\n </div>\n </div>\n </div>\n <div class=\"p-3 sm:p-5\">\n <div class=\"mb-2 flex items-center justify-between px-1 text-xs text-gray-500\">\n <div class=\"flex items-center gap-2\">\n <button\n type=\"button\"\n aria-label=\"Validate workflow\"\n title=\"Validate workflow\"\n on-click=\"validate(1)\"\n bind-disabled=\"validation.running\"\n bind-class=\"{ 'hidden': readOnly, 'text-emerald-400': validation.valid, 'text-rose-400': !validation.valid }\"\n class=\"disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <lucide-icon\n class=\"inline-block\"\n bind-icon=\"validation.running ? 'loader-circle' : (validation.valid ? 'circle-check' : 'circle-alert')\"\n bind-class=\"validation.running ? 'animate-spin' : ''\"\n size=\"16\"\n ></lucide-icon>\n </button>\n <span class=\"font-medium\" bind-class=\"validation.error ? 'bg-rose-500/10 text-rose-100' : ''\"\n >{{ validation.error || '' }}</span\n >\n </div>\n <span class=\"font-mono\">{{ source.length }} characters</span>\n </div>\n <template if=\"readOnly\">\n <code-block\n language=\"yaml\"\n theme=\"atom-one-dark\"\n class=\"block h-[calc(100vh-23rem)] min-h-[28rem] overflow-auto rounded-lg border border-gray-700 bg-gray-950 p-4\"\n bind-source=\"source\"\n ></code-block>\n </template>\n <template if=\"!readOnly\">\n <code-editor\n id=\"source-yaml\"\n language=\"yaml\"\n theme=\"atom-one-dark\"\n nostatus=\"true\"\n class=\"block h-[calc(100vh-23rem)] min-h-[28rem] overflow-hidden rounded-lg border border-gray-700 bg-gray-950\"\n bind-value=\"source\"\n on-change=\"setSource($event.detail)\"\n ></code-editor>\n </template>\n <details\n class=\"mt-4 overflow-hidden rounded-xl border border-gray-800 bg-gray-950/50\"\n on-toggle=\"loadHelp($event)\"\n >\n <summary\n class=\"cursor-pointer list-none px-4 py-3 text-sm font-medium text-gray-300 outline-none transition hover:bg-gray-900 focus-visible:ring-2 focus-visible:ring-indigo-400/60\"\n >\n <span class=\"inline-flex items-center gap-2\"\n ><lucide-icon icon=\"circle-question-mark\" size=\"16\"></lucide-icon>Syntax</span\n >\n <span class=\"ml-2 text-xs font-normal text-gray-500\">Reference, tutorials, and examples</span>\n </summary>\n <div\n ref=\"helpContent\"\n class=\"max-h-[38rem] overflow-y-auto border-t border-gray-800 bg-gray-950 px-4 py-5\"\n role=\"region\"\n aria-label=\"Workflow syntax help\"\n aria-live=\"polite\"\n >\n <p class=\"text-sm text-gray-500\">Expand to load the workflow syntax reference.</p>\n </div>\n </details>\n </div>\n </section>\n </section>\n\n <section\n class=\"secrets-panel rounded-2xl border border-gray-800 bg-gray-900/80 p-4 shadow-xl shadow-black/10 sm:p-5\"\n aria-labelledby=\"secrets-title\"\n >\n <div class=\"mb-5 flex items-start justify-between gap-3\">\n <div class=\"flex items-start gap-3\">\n <span class=\"rounded-lg bg-indigo-500/10 p-2 text-indigo-300\"\n ><lucide-icon icon=\"key-round\" size=\"18\"></lucide-icon\n ></span>\n <div>\n <h2 id=\"secrets-title\" class=\"text-lg font-semibold text-white\">Secrets</h2>\n <p class=\"mt-0.5 text-sm text-gray-400\">Write-only credentials available to workflows.</p>\n </div>\n </div>\n <span\n class=\"rounded-full border border-gray-700 bg-gray-950 px-2.5 py-1 text-xs font-mono text-gray-400\"\n aria-label=\"Secret count\"\n >{{ secrets.length }}</span\n >\n </div>\n <div class=\"mb-5 rounded-xl border border-gray-800 bg-gray-950/50 p-3\">\n <p class=\"mb-3 text-xs text-gray-500\">Saving an existing name replaces its encrypted value.</p>\n <div class=\"grid gap-3 md:grid-cols-[14rem_1fr_auto_auto]\">\n <label class=\"sr-only\" for=\"secret-name\">Secret name</label>\n <input\n id=\"secret-name\"\n bind-value=\"secretName\"\n on-input=\"setSecretName($event)\"\n class=\"rounded-lg border border-gray-700 bg-gray-900 px-3 py-2.5 font-mono text-sm uppercase outline-none transition placeholder:text-gray-600 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500/30\"\n placeholder=\"NPM_TOKEN\"\n />\n <label class=\"sr-only\" for=\"secret-value\">Secret value</label>\n <input\n id=\"secret-value\"\n ref=\"secretValueInput\"\n bind-value=\"secretValue\"\n on-input=\"setSecretValue($event)\"\n type=\"password\"\n class=\"rounded-lg border border-gray-700 bg-gray-900 px-3 py-2.5 font-mono text-sm outline-none transition placeholder:text-gray-600 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500/30\"\n placeholder=\"New secret value\"\n />\n <button\n type=\"button\"\n aria-label=\"Save secret value\"\n title=\"Save secret value\"\n on-click=\"saveSecret()\"\n bind-disabled=\"busy\"\n class=\"inline-flex items-center justify-center gap-2 rounded-lg border border-indigo-500/60 px-3 py-2.5 text-sm font-medium text-indigo-200 outline-none transition hover:bg-indigo-500/10 focus-visible:ring-2 focus-visible:ring-indigo-400/60 disabled:opacity-50\"\n >\n <lucide-icon icon=\"lock-keyhole\" size=\"16\"></lucide-icon><span class=\"hidden sm:inline\">Save</span>\n </button>\n <button\n type=\"button\"\n aria-label=\"Delete secret\"\n title=\"Delete secret\"\n on-click=\"removeSecret()\"\n bind-disabled=\"busy\"\n class=\"inline-flex items-center justify-center gap-2 rounded-lg border border-rose-500/50 px-3 py-2.5 text-sm font-medium text-rose-300 outline-none transition hover:bg-rose-500/10 focus-visible:ring-2 focus-visible:ring-rose-400/60 disabled:opacity-50\"\n >\n <lucide-icon icon=\"trash\" size=\"16\"></lucide-icon><span class=\"hidden sm:inline\">Delete</span>\n </button>\n </div>\n </div>\n <ul class=\"grid gap-2\" aria-label=\"Saved secrets\">\n <template for=\"name of secrets\">\n <li>\n <button\n type=\"button\"\n on-click=\"selectSecret(name)\"\n class=\"group flex min-h-14 w-full items-center gap-3 rounded-xl border border-gray-800 bg-gray-950/50 px-3.5 py-3 text-left outline-none transition hover:border-indigo-500/50 hover:bg-indigo-500/10 focus-visible:border-indigo-400 focus-visible:ring-2 focus-visible:ring-indigo-400/50\"\n aria-label=\"Edit secret {{ name }}\"\n >\n <span\n class=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gray-800 text-gray-500 group-hover:text-indigo-300\"\n ><lucide-icon icon=\"key-round\" size=\"15\"></lucide-icon\n ></span>\n <span class=\"min-w-0 flex-1 truncate font-mono text-sm text-gray-200\">{{ name }}</span>\n <span class=\"text-xs text-gray-500\">Select</span>\n <lucide-icon\n icon=\"chevron-right\"\n size=\"16\"\n class=\"text-gray-600 transition group-hover:text-indigo-300\"\n ></lucide-icon>\n </button>\n </li>\n </template>\n </ul>\n <div\n class=\"rounded-xl border border-dashed border-gray-700 px-4 py-8 text-center\"\n class-hidden=\"secrets.length > 0\"\n >\n <lucide-icon icon=\"key-round\" size=\"22\" class=\"mx-auto text-gray-600\"></lucide-icon>\n <p class=\"mt-2 text-sm font-medium text-gray-300\">No secrets configured</p>\n <p class=\"mt-1 text-xs text-gray-500\">Add one above to make it available to a workflow.</p>\n </div>\n </section>\n </main>\n\n <script setup>\n import { onDestroy, onInit, ref, templateRef } from '@li3/web';\n\n export default function () {\n const page = document.body.dataset.page;\n const initialId = __WORKFLOW_ID__;\n const initialRevision = __WORKFLOW_REVISION__;\n const readOnly = Boolean(initialRevision);\n const workflows = ref([]);\n const secrets = ref([]);\n const source = ref('');\n const validation = ref({ valid: true });\n const savedSource = ref('');\n const workflowId = ref('');\n const enabled = ref(true);\n const savedEnabled = ref(true);\n const selectedId = ref('');\n const secretName = ref('');\n const secretValue = ref('');\n const notice = ref('');\n const noticeError = ref(false);\n const busy = ref(false);\n const secretValueInput = templateRef('secretValueInput');\n const helpContent = templateRef('helpContent');\n const helpLoaded = ref(false);\n const helpLoading = ref(false);\n let validationTimer;\n\n const showNotice = (message, error = false) => {\n notice.value = message;\n noticeError.value = error;\n };\n\n const api = async (url, options = {}) => {\n const response = await fetch(url, {\n headers: { accept: 'application/json', ...(options.body ? { 'content-type': 'application/json' } : {}) },\n ...options,\n });\n const body = response.status === 204 ? null : await response.json().catch(() => ({}));\n if (!response.ok) throw new Error(body.error || `Request failed: ${response.status}`);\n return body;\n };\n\n const derivedId = () =>\n source.value\n .match(/^\\s*(?:id:\\s*([^\\n]+)|name:\\s*([^\\n]+))/m)\n ?.slice(1)\n .find(Boolean)\n ?.trim()\n .toLowerCase()\n .replace(/[^a-z0-9]/g, '-')\n .replace(/(^-|-$)/g, '') || '';\n\n const run = async (action) => {\n if (busy.value) return;\n\n busy.value = true;\n\n try {\n await action();\n } catch (error) {\n showNotice(error.message, true);\n } finally {\n busy.value = false;\n }\n };\n\n const loadWorkflows = async () => {\n workflows.value = (await api('/api/workflows')).workflows;\n };\n\n const loadSecrets = async () => {\n secrets.value = (await api('/api/secrets')).secrets;\n };\n\n const openWorkflow = async (id) => {\n const workflowUrl = initialRevision\n ? `/api/workflows/${id}?revision=${initialRevision}`\n : `/api/workflows/${id}`;\n const workflow = await api(workflowUrl);\n selectedId.value = workflow.id;\n workflowId.value = workflow.id;\n source.value = workflow.sourceYaml;\n savedSource.value = workflow.sourceYaml;\n enabled.value = workflow.enabled;\n savedEnabled.value = workflow.enabled;\n };\n\n const validateSource = async () => {\n validation.value = await api('/api/workflows/validate', {\n method: 'POST',\n body: JSON.stringify({ sourceYaml: source.value }),\n });\n };\n\n const validate = (ms = 1000) => {\n if (page !== 'editor') return;\n\n clearTimeout(validationTimer);\n validationTimer = setTimeout(() => {\n validation.running = true;\n validateSource();\n }, ms);\n };\n\n const save = () =>\n run(async () => {\n const id = workflowId.value.trim() || derivedId();\n if (!id) throw new Error('Set an ID or add a workflow name first.');\n if (\n initialId &&\n id === selectedId.value &&\n source.value === savedSource.value &&\n enabled.value === savedEnabled.value\n ) {\n showNotice('No changes to save.');\n return;\n }\n const workflow = await api(`/api/workflows/${id}`, {\n method: 'PUT',\n body: JSON.stringify({ sourceYaml: source.value, enabled: enabled.value }),\n });\n selectedId.value = workflow.id;\n workflowId.value = workflow.id;\n savedSource.value = source.value;\n savedEnabled.value = enabled.value;\n showNotice(`Saved ${workflow.id} as draft revision ${workflow.revision}.`);\n if (!initialId) history.replaceState(null, '', `/workflows/${workflow.id}`);\n });\n const publish = () =>\n run(async () => {\n const id = workflowId.value.trim() || selectedId.value;\n if (!id) throw new Error('Save a workflow before publishing it.');\n const workflow = await api(`/api/workflows/${id}/publish`, { method: 'POST' });\n selectedId.value = workflow.id;\n showNotice(`Published ${workflow.id} revision ${workflow.revision}.`);\n });\n const remove = () =>\n run(async () => {\n const id = workflowId.value.trim() || selectedId.value;\n if (!id || !confirm(`Delete ${id} and all of its revisions?`)) return;\n await api(`/api/workflows/${id}`, { method: 'DELETE' });\n window.location.href = '/workflows';\n });\n const saveSecret = () =>\n run(async () => {\n const name = secretName.value.trim();\n if (!name || !secretValue.value) throw new Error('Set a secret name and value first.');\n await api(`/api/secrets/${name}`, { method: 'PUT', body: JSON.stringify({ value: secretValue.value }) });\n secretValue.value = '';\n await loadSecrets();\n showNotice(`Saved ${name}.`);\n });\n const removeSecret = () =>\n run(async () => {\n const name = secretName.value.trim();\n if (!name || !confirm(`Delete ${name}?`)) return;\n await api(`/api/secrets/${name}`, { method: 'DELETE' });\n secretName.value = '';\n secretValue.value = '';\n await loadSecrets();\n showNotice(`Deleted ${name}.`);\n });\n const setSource = (value) => {\n source.value = value;\n validate();\n };\n const setWorkflowId = (event) => {\n workflowId.value = event.target.value;\n };\n const setEnabled = (event) => {\n enabled.value = event.target.checked;\n };\n const setSecretName = (event) => {\n secretName.value = event.target.value;\n };\n const setSecretValue = (event) => {\n secretValue.value = event.target.value;\n };\n const selectSecret = (name) => {\n secretName.value = name;\n secretValueInput.value?.focus();\n };\n const visitWorkflow = (id) => {\n window.location.href = `/workflows/${id}`;\n };\n const loadHelp = async (event) => {\n if (!event.target.open || helpLoaded.value || helpLoading.value || !helpContent.value) return;\n helpLoading.value = true;\n helpContent.value.textContent = 'Loading workflow syntax help...';\n try {\n const response = await fetch('/help?embed=1', { headers: { accept: 'text/html' } });\n if (!response.ok) throw new Error(`Help request failed: ${response.status}`);\n const html = await response.text();\n const parsed = new DOMParser().parseFromString(html, 'text/html');\n const sourceNodes = [\n ...Array.from(parsed.head.querySelectorAll('style')),\n ...Array.from(parsed.body.childNodes),\n ];\n const nodes = sourceNodes.map((node) => document.importNode(node, true));\n helpContent.value.replaceChildren(...nodes);\n helpLoaded.value = true;\n } catch (error) {\n helpContent.value.textContent = 'Unable to load workflow syntax help.';\n console.error(error);\n } finally {\n helpLoading.value = false;\n }\n };\n\n onDestroy(() => clearTimeout(validationTimer));\n\n onInit(() => {\n const loadPage =\n page === 'editor'\n ? initialId\n ? openWorkflow(initialId)\n : Promise.resolve()\n : Promise.all([loadWorkflows(), loadSecrets()]);\n loadPage.catch((error) => showNotice(error.message, true));\n });\n\n return {\n workflows,\n secrets,\n source,\n validation,\n workflowId,\n enabled,\n readOnly,\n selectedId,\n secretName,\n secretValue,\n notice,\n noticeError,\n busy,\n validate,\n save,\n publish,\n remove,\n saveSecret,\n removeSecret,\n setSource,\n setWorkflowId,\n setEnabled,\n setSecretName,\n setSecretValue,\n selectSecret,\n visitWorkflow,\n loadHelp,\n };\n }\n <\/script>\n </template>\n\n <script type=\"module\">\n import '@li3/web';\n <\/script>\n <script src=\"https://cdn.tailwindcss.com\"><\/script>\n </body>\n</html>\n";
5589
+ var Hi = {
5590
+ openapi: "3.0.3",
5591
+ info: {
5592
+ title: "On Workflow Runner API",
5593
+ version: "1.0.0",
5594
+ description: "Control-plane, job, workflow, webhook, event, secret, artifact, and notification APIs for the On workflow runner."
5595
+ },
5596
+ servers: [{ url: "/" }],
5597
+ security: [{ bearerAuth: [] }, { basicAuth: [] }],
5598
+ tags: [
5599
+ { name: "discovery" },
5600
+ { name: "jobs" },
5601
+ { name: "workflows" },
5602
+ { name: "secrets" },
5603
+ { name: "events" },
5604
+ { name: "webhooks" },
5605
+ { name: "notifications" }
5606
+ ],
5607
+ paths: {
5608
+ "/api": { get: {
5609
+ tags: ["discovery"],
5610
+ summary: "Get this OpenAPI specification",
5611
+ security: [],
5612
+ responses: { 200: {
5613
+ description: "OpenAPI JSON document",
5614
+ content: { "application/json": { schema: { type: "object" } } }
5615
+ } }
5616
+ } },
5617
+ "/api/jobs": { get: {
5618
+ tags: ["jobs"],
5619
+ summary: "List jobs",
5620
+ security: [],
5621
+ parameters: [
5622
+ { $ref: "#/components/parameters/AfterId" },
5623
+ { $ref: "#/components/parameters/BeforeId" },
5624
+ { $ref: "#/components/parameters/Limit" },
5625
+ { $ref: "#/components/parameters/Filter" }
5626
+ ],
5627
+ responses: { 200: {
5628
+ description: "Dashboard job list",
5629
+ content: { "application/json": { schema: { $ref: "#/components/schemas/JobList" } } }
5630
+ } }
5631
+ } },
5632
+ "/api/jobs/{jobId}/cancel": { post: {
5633
+ tags: ["jobs"],
5634
+ summary: "Cancel an active job",
5635
+ parameters: [{ $ref: "#/components/parameters/JobId" }],
5636
+ responses: {
5637
+ 200: {
5638
+ description: "Job cancelled",
5639
+ content: { "application/json": { schema: { $ref: "#/components/schemas/JobStatus" } } }
5640
+ },
5641
+ 404: { $ref: "#/components/responses/NotFound" },
5642
+ 409: { $ref: "#/components/responses/Conflict" }
5643
+ }
5644
+ } },
5645
+ "/api/jobs/{jobId}/secrets": { get: {
5646
+ tags: ["jobs"],
5647
+ summary: "Get secrets for an assigned worker job",
5648
+ security: [{ workerBearerAuth: [] }],
5649
+ parameters: [{ $ref: "#/components/parameters/JobId" }, { $ref: "#/components/parameters/WorkerId" }],
5650
+ responses: {
5651
+ 200: {
5652
+ description: "Decrypted job secrets",
5653
+ content: { "application/json": { schema: { $ref: "#/components/schemas/Secrets" } } }
5654
+ },
5655
+ 403: { $ref: "#/components/responses/Forbidden" }
5656
+ }
5657
+ } },
5658
+ "/api/runs/{jobId}": { get: {
5659
+ tags: ["jobs"],
5660
+ summary: "Get a run view",
5661
+ parameters: [{ $ref: "#/components/parameters/JobId" }],
5662
+ responses: {
5663
+ 200: {
5664
+ description: "Run details",
5665
+ content: { "application/json": { schema: { $ref: "#/components/schemas/RunView" } } }
5666
+ },
5667
+ 404: { $ref: "#/components/responses/NotFound" }
5668
+ }
5669
+ } },
5670
+ "/api/runs/{jobId}/artifacts/{path}": { get: {
5671
+ tags: ["jobs"],
5672
+ summary: "Download an artifact",
5673
+ parameters: [{ $ref: "#/components/parameters/JobId" }, {
5674
+ name: "path",
5675
+ in: "path",
5676
+ required: !0,
5677
+ schema: { type: "string" }
5678
+ }],
5679
+ responses: {
5680
+ 200: {
5681
+ description: "Artifact bytes",
5682
+ content: { "application/octet-stream": { schema: {
5683
+ type: "string",
5684
+ format: "binary"
5685
+ } } }
5686
+ },
5687
+ 404: { $ref: "#/components/responses/NotFound" }
5688
+ }
5689
+ } },
5690
+ "/api/workflows/validate": { post: {
5691
+ tags: ["workflows"],
5692
+ summary: "Validate workflow YAML",
5693
+ requestBody: {
5694
+ required: !0,
5695
+ content: { "application/json": { schema: { $ref: "#/components/schemas/WorkflowSource" } } }
5696
+ },
5697
+ responses: {
5698
+ 200: {
5699
+ description: "Valid workflow definitions",
5700
+ content: { "application/json": { schema: { $ref: "#/components/schemas/ValidationResult" } } }
5701
+ },
5702
+ 422: { $ref: "#/components/responses/ValidationError" }
5703
+ }
5704
+ } },
5705
+ "/api/workflows": { get: {
5706
+ tags: ["workflows"],
5707
+ summary: "List workflows",
5708
+ responses: { 200: {
5709
+ description: "Workflow list",
5710
+ content: { "application/json": { schema: {
5711
+ type: "object",
5712
+ properties: { workflows: {
5713
+ type: "array",
5714
+ items: { $ref: "#/components/schemas/Workflow" }
5715
+ } }
5716
+ } } }
5717
+ } }
5718
+ } },
5719
+ "/api/workflows/{workflowId}": {
5720
+ get: {
5721
+ tags: ["workflows"],
5722
+ summary: "Get a workflow or historical revision",
5723
+ parameters: [{ $ref: "#/components/parameters/WorkflowId" }, { $ref: "#/components/parameters/Revision" }],
5724
+ responses: {
5725
+ 200: {
5726
+ description: "Workflow definition",
5727
+ content: { "application/json": { schema: { $ref: "#/components/schemas/Workflow" } } }
5728
+ },
5729
+ 404: { $ref: "#/components/responses/NotFound" }
5730
+ }
5731
+ },
5732
+ put: {
5733
+ tags: ["workflows"],
5734
+ summary: "Save a workflow draft",
5735
+ parameters: [{ $ref: "#/components/parameters/WorkflowId" }],
5736
+ requestBody: {
5737
+ required: !0,
5738
+ content: { "application/json": { schema: { $ref: "#/components/schemas/WorkflowSave" } } }
5739
+ },
5740
+ responses: {
5741
+ 200: {
5742
+ description: "Draft saved",
5743
+ content: { "application/json": { schema: { $ref: "#/components/schemas/Workflow" } } }
5744
+ },
5745
+ 422: { $ref: "#/components/responses/ValidationError" }
5746
+ }
5747
+ },
5748
+ delete: {
5749
+ tags: ["workflows"],
5750
+ summary: "Delete a workflow and its revisions",
5751
+ parameters: [{ $ref: "#/components/parameters/WorkflowId" }],
5752
+ responses: {
5753
+ 204: { description: "Workflow deleted" },
5754
+ 404: { $ref: "#/components/responses/NotFound" }
5755
+ }
5756
+ }
5757
+ },
5758
+ "/api/workflows/{workflowId}/publish": { post: {
5759
+ tags: ["workflows"],
5760
+ summary: "Publish the latest workflow revision",
5761
+ parameters: [{ $ref: "#/components/parameters/WorkflowId" }],
5762
+ responses: {
5763
+ 200: {
5764
+ description: "Workflow published",
5765
+ content: { "application/json": { schema: { $ref: "#/components/schemas/Workflow" } } }
5766
+ },
5767
+ 404: { $ref: "#/components/responses/NotFound" }
5768
+ }
5769
+ } },
5770
+ "/api/secrets": { get: {
5771
+ tags: ["secrets"],
5772
+ summary: "List secret names",
5773
+ responses: { 200: {
5774
+ description: "Secret names",
5775
+ content: { "application/json": { schema: { $ref: "#/components/schemas/SecretNames" } } }
5776
+ } }
5777
+ } },
5778
+ "/api/secrets/{name}": {
5779
+ put: {
5780
+ tags: ["secrets"],
5781
+ summary: "Create or replace an encrypted secret",
5782
+ parameters: [{ $ref: "#/components/parameters/SecretName" }],
5783
+ requestBody: {
5784
+ required: !0,
5785
+ content: { "application/json": { schema: { $ref: "#/components/schemas/SecretValue" } } }
5786
+ },
5787
+ responses: { 204: { description: "Secret saved" } }
5788
+ },
5789
+ delete: {
5790
+ tags: ["secrets"],
5791
+ summary: "Delete a secret",
5792
+ parameters: [{ $ref: "#/components/parameters/SecretName" }],
5793
+ responses: {
5794
+ 204: { description: "Secret deleted" },
5795
+ 404: { $ref: "#/components/responses/NotFound" }
5796
+ }
5797
+ }
5798
+ },
5799
+ "/api/events": {
5800
+ get: {
5801
+ tags: ["events"],
5802
+ summary: "Subscribe to runner events",
5803
+ security: [],
5804
+ responses: { 200: {
5805
+ description: "Server-sent event stream",
5806
+ content: { "text/event-stream": { schema: { type: "string" } } }
5807
+ } }
5808
+ },
5809
+ post: {
5810
+ tags: ["events"],
5811
+ summary: "Publish a worker job-change event",
5812
+ security: [{ workerBearerAuth: [] }],
5813
+ requestBody: { content: { "application/json": { schema: { $ref: "#/components/schemas/JobEvent" } } } },
5814
+ responses: { 202: { description: "Event accepted" } }
5815
+ }
5816
+ },
5817
+ "/api/push/public-key": { get: {
5818
+ tags: ["notifications"],
5819
+ summary: "Get the Web Push public key",
5820
+ security: [],
5821
+ responses: { 200: {
5822
+ description: "VAPID public key",
5823
+ content: { "application/json": { schema: {
5824
+ type: "object",
5825
+ properties: { publicKey: { type: "string" } }
5826
+ } } }
5827
+ } }
5828
+ } },
5829
+ "/api/push/subscriptions": {
5830
+ post: {
5831
+ tags: ["notifications"],
5832
+ summary: "Register a Web Push subscription",
5833
+ security: [],
5834
+ requestBody: {
5835
+ required: !0,
5836
+ content: { "application/json": { schema: { type: "object" } } }
5837
+ },
5838
+ responses: { 201: { description: "Subscription saved" } }
5839
+ },
5840
+ delete: {
5841
+ tags: ["notifications"],
5842
+ summary: "Remove a Web Push subscription",
5843
+ security: [],
5844
+ requestBody: {
5845
+ required: !0,
5846
+ content: { "application/json": { schema: {
5847
+ type: "object",
5848
+ required: ["endpoint"],
5849
+ properties: { endpoint: {
5850
+ type: "string",
5851
+ format: "uri"
5852
+ } }
5853
+ } } }
5854
+ },
5855
+ responses: { 204: { description: "Subscription removed" } }
5856
+ }
5857
+ },
5858
+ "/webhooks/{provider}": { post: {
5859
+ tags: ["webhooks"],
5860
+ summary: "Receive a provider webhook",
5861
+ security: [],
5862
+ parameters: [{
5863
+ name: "provider",
5864
+ in: "path",
5865
+ required: !0,
5866
+ schema: { type: "string" }
5867
+ }],
5868
+ requestBody: {
5869
+ required: !0,
5870
+ content: { "application/json": { schema: { type: "object" } } }
5871
+ },
5872
+ responses: {
5873
+ 202: { description: "Webhook accepted" },
5874
+ 401: { $ref: "#/components/responses/Unauthorized" },
5875
+ 413: { $ref: "#/components/responses/PayloadTooLarge" }
5876
+ }
5877
+ } },
5878
+ "/restart/{jobId}": { post: {
5879
+ tags: ["jobs"],
5880
+ summary: "Create a new run from the active workflow revision",
5881
+ parameters: [{ $ref: "#/components/parameters/JobId" }],
5882
+ responses: {
5883
+ 201: {
5884
+ description: "New job created",
5885
+ content: { "application/json": { schema: {
5886
+ type: "object",
5887
+ properties: { id: { type: "integer" } }
5888
+ } } }
5889
+ },
5890
+ 404: { $ref: "#/components/responses/NotFound" }
5891
+ }
5892
+ } },
5893
+ "/admin/reload-secrets": { post: {
5894
+ tags: ["secrets"],
5895
+ summary: "Reload legacy in-memory secrets",
5896
+ responses: {
5897
+ 200: { description: "Secrets reloaded" },
5898
+ 403: { $ref: "#/components/responses/Forbidden" }
5899
+ }
5900
+ } }
5901
+ },
5902
+ components: {
5903
+ securitySchemes: {
5904
+ bearerAuth: {
5905
+ type: "http",
5906
+ scheme: "bearer"
5907
+ },
5908
+ basicAuth: {
5909
+ type: "http",
5910
+ scheme: "basic"
5911
+ },
5912
+ workerBearerAuth: {
5913
+ type: "http",
5914
+ scheme: "bearer",
5915
+ description: "RUNNER_WORKER_SECRET"
5916
+ }
5917
+ },
5918
+ parameters: {
5919
+ JobId: {
5920
+ name: "jobId",
5921
+ in: "path",
5922
+ required: !0,
5923
+ schema: {
5924
+ type: "integer",
5925
+ minimum: 1
5926
+ }
5927
+ },
5928
+ WorkflowId: {
5929
+ name: "workflowId",
5930
+ in: "path",
5931
+ required: !0,
5932
+ schema: {
5933
+ type: "string",
5934
+ pattern: "^[a-z0-9-]+$"
5935
+ }
5936
+ },
5937
+ Revision: {
5938
+ name: "revision",
5939
+ in: "query",
5940
+ required: !1,
5941
+ schema: {
5942
+ type: "integer",
5943
+ minimum: 1
5944
+ }
5945
+ },
5946
+ SecretName: {
5947
+ name: "name",
5948
+ in: "path",
5949
+ required: !0,
5950
+ schema: {
5951
+ type: "string",
5952
+ pattern: "^[A-Z][A-Z0-9_]*$"
5953
+ }
5954
+ },
5955
+ WorkerId: {
5956
+ name: "X-Runner-Worker-Id",
5957
+ in: "header",
5958
+ required: !0,
5959
+ schema: { type: "string" }
5960
+ },
5961
+ AfterId: {
5962
+ name: "afterId",
5963
+ in: "query",
5964
+ schema: {
5965
+ type: "integer",
5966
+ minimum: 0
5967
+ }
5968
+ },
5969
+ BeforeId: {
5970
+ name: "beforeId",
5971
+ in: "query",
5972
+ schema: {
5973
+ type: "integer",
5974
+ minimum: 1
5975
+ }
5976
+ },
5977
+ Limit: {
5978
+ name: "limit",
5979
+ in: "query",
5980
+ schema: {
5981
+ type: "integer",
5982
+ minimum: 1,
5983
+ maximum: 500,
5984
+ default: 50
5985
+ }
5986
+ },
5987
+ Filter: {
5988
+ name: "filter",
5989
+ in: "query",
5990
+ schema: {
5991
+ type: "string",
5992
+ maxLength: 200
5993
+ }
5994
+ }
5995
+ },
5996
+ responses: {
5997
+ Unauthorized: { description: "Unauthorized" },
5998
+ Forbidden: { description: "Forbidden" },
5999
+ NotFound: { description: "Not found" },
6000
+ Conflict: { description: "Conflict" },
6001
+ ValidationError: { description: "Validation error" },
6002
+ PayloadTooLarge: { description: "Payload too large" }
6003
+ },
6004
+ schemas: {
6005
+ Job: {
6006
+ type: "object",
6007
+ properties: {
6008
+ id: { type: "integer" },
6009
+ workflowId: { type: "string" },
6010
+ status: { type: "string" },
6011
+ workerId: { type: ["string", "null"] },
6012
+ createdAt: { type: "string" },
6013
+ updatedAt: { type: "string" }
6014
+ }
6015
+ },
6016
+ JobList: {
6017
+ type: "object",
6018
+ required: ["jobs", "hasMore"],
6019
+ properties: {
6020
+ jobs: {
6021
+ type: "array",
6022
+ items: { $ref: "#/components/schemas/Job" }
6023
+ },
6024
+ hasMore: { type: "boolean" }
6025
+ }
6026
+ },
6027
+ JobStatus: {
6028
+ type: "object",
6029
+ properties: {
6030
+ id: { type: "integer" },
6031
+ status: { type: "string" }
6032
+ }
6033
+ },
6034
+ JobEvent: {
6035
+ type: "object",
6036
+ properties: { jobId: { type: "integer" } }
6037
+ },
6038
+ Workflow: {
6039
+ type: "object",
6040
+ properties: {
6041
+ id: { type: "string" },
6042
+ name: { type: "string" },
6043
+ sourceYaml: { type: "string" },
6044
+ revision: { type: "integer" },
6045
+ status: { type: "string" },
6046
+ enabled: { type: "boolean" }
6047
+ }
6048
+ },
6049
+ WorkflowSource: {
6050
+ type: "object",
6051
+ required: ["sourceYaml"],
6052
+ properties: { sourceYaml: { type: "string" } }
6053
+ },
6054
+ WorkflowSave: { allOf: [{ $ref: "#/components/schemas/WorkflowSource" }, {
6055
+ type: "object",
6056
+ properties: { enabled: { type: "boolean" } }
6057
+ }] },
6058
+ ValidationResult: {
6059
+ type: "object",
6060
+ properties: {
6061
+ valid: { type: "boolean" },
6062
+ workflows: {
6063
+ type: "array",
6064
+ items: { type: "object" }
6065
+ }
6066
+ }
6067
+ },
6068
+ SecretNames: {
6069
+ type: "object",
6070
+ properties: { secrets: {
6071
+ type: "array",
6072
+ items: { type: "string" }
6073
+ } }
6074
+ },
6075
+ SecretValue: {
6076
+ type: "object",
6077
+ required: ["value"],
6078
+ properties: { value: {
6079
+ type: "string",
6080
+ format: "password"
6081
+ } }
6082
+ },
6083
+ Secrets: {
6084
+ type: "object",
6085
+ properties: { secrets: {
6086
+ type: "object",
6087
+ additionalProperties: { type: "string" }
6088
+ } }
6089
+ },
6090
+ RunView: {
6091
+ type: "object",
6092
+ properties: {
6093
+ jobId: { type: "string" },
6094
+ workflowName: { type: "string" },
6095
+ status: { type: "string" },
6096
+ inputs: { type: "object" },
6097
+ steps: {
6098
+ type: "array",
6099
+ items: { type: "object" }
6100
+ },
6101
+ artifacts: {
6102
+ type: "array",
6103
+ items: { type: "string" }
6104
+ },
6105
+ canViewLogs: { type: "boolean" }
6106
+ }
6107
+ }
6108
+ }
6109
+ }
6110
+ }, Ui = "<!doctype html>\n<html lang=\"en\" class=\"dark\">\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta name=\"theme-color\" content=\"#030712\" />\n <meta name=\"mobile-web-app-capable\" content=\"yes\" />\n <link rel=\"manifest\" href=\"/manifest.webmanifest\" />\n <link rel=\"icon\" href=\"/app-icon.svg\" type=\"image/svg+xml\" />\n <title>Runner Workflow Management</title>\n <script type=\"importmap\">\n { \"imports\": { \"@li3/\": \"https://cdn.li3.dev/@li3/\" } }\n <\/script>\n <style>\n body[data-page='list'] .editor-panel {\n display: none;\n }\n body[data-page='editor'] .workflow-list,\n body[data-page='editor'] .secrets-panel {\n display: none;\n }\n </style>\n </head>\n <body data-page=\"__WORKFLOW_PAGE__\" class=\"min-h-screen bg-gray-950 p-4 font-sans text-gray-100 md:p-6\">\n <link rel=\"component\" href=\"https://sodium.static.apphor.de/code-editor.html\" />\n <link rel=\"component\" href=\"https://sodium.static.apphor.de/code-block.html\" />\n <link rel=\"component\" href=\"https://sodium.static.apphor.de/lucide-icon.html\" />\n\n <template app>\n <main class=\"mx-auto max-w-6xl space-y-5\">\n <header class=\"flex flex-col gap-4 border-b border-gray-800 pb-5 sm:flex-row sm:items-end sm:justify-between\">\n <div class=\"flex items-start gap-3\">\n <a\n href=\"/runs\"\n aria-label=\"Back to dashboard\"\n class=\"mt-1 rounded-lg border border-gray-800 bg-gray-900 p-2 text-gray-400 transition hover:border-indigo-500/60 hover:text-indigo-300\"\n >\n <lucide-icon icon=\"arrow-left\" size=\"17\"></lucide-icon>\n </a>\n <div>\n <p class=\"text-xs font-semibold uppercase tracking-[0.18em] text-indigo-400\">Runner engine</p>\n <h1 class=\"mt-1 text-2xl font-bold tracking-tight text-white\">Workflow control room</h1>\n <p class=\"mt-1 text-sm text-gray-400\">Draft, validate, and publish revisioned YAML definitions.</p>\n </div>\n </div>\n <a\n href=\"/workflows/new\"\n class=\"inline-flex items-center justify-center gap-2 rounded-lg bg-indigo-500 px-4 py-2.5 text-sm font-semibold text-white shadow-lg shadow-indigo-950/40 transition hover:bg-indigo-400\"\n >\n <lucide-icon icon=\"plus\" size=\"16\"></lucide-icon>\n New workflow\n </a>\n <a\n href=\"/help\"\n class=\"inline-flex items-center justify-center gap-2 rounded-lg border border-gray-800 bg-gray-900 px-3 py-2.5 text-sm font-medium text-gray-300 outline-none transition hover:border-indigo-500/50 hover:text-indigo-200 focus-visible:ring-2 focus-visible:ring-indigo-400/60\"\n >\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n width=\"16\"\n height=\"16\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"1.8\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"9\"></circle>\n <path d=\"M9.6 9a2.5 2.5 0 1 1 4.2 1.8c-1.2 1-1.8 1.4-1.8 2.7\"></path>\n <path d=\"M12 17h.01\"></path>\n </svg>\n Help\n </a>\n </header>\n\n <template if=\"notice\">\n <div\n role=\"status\"\n class=\"flex items-center gap-2 rounded-lg border px-3 py-2.5 text-sm\"\n bind-class=\"noticeError ? 'border-rose-500/40 bg-rose-500/10 text-rose-100' : 'border-emerald-500/40 bg-emerald-500/10 text-emerald-100'\"\n >\n <lucide-icon bind-icon=\"noticeError ? 'circle-alert' : 'circle-check'\" size=\"17\"></lucide-icon>\n <span>{{ notice }}</span>\n </div>\n </template>\n\n <section id=\"workflow-layout\" class=\"space-y-5\">\n <nav\n class=\"workflow-list rounded-2xl border border-gray-800 bg-gray-900/80 p-4 shadow-xl shadow-black/10\"\n aria-labelledby=\"workflow-list-title\"\n >\n <div class=\"mb-4 flex items-end justify-between gap-3 border-b border-gray-800 pb-4\">\n <div>\n <p class=\"text-[11px] font-semibold uppercase tracking-[0.18em] text-indigo-400\">Definitions</p>\n <h2 id=\"workflow-list-title\" class=\"mt-1 text-lg font-semibold text-white\">Workflows</h2>\n </div>\n <span\n class=\"rounded-full border border-gray-700 bg-gray-950 px-2.5 py-1 text-xs font-mono text-gray-400\"\n aria-label=\"Workflow count\"\n >\n {{ workflows.length }}\n </span>\n </div>\n <ul class=\"grid gap-2\" aria-label=\"Workflow definitions\">\n <template for=\"workflow of workflows\">\n <li>\n <a\n attr-href=\"'/workflows/' + workflow.id\"\n class=\"group flex min-h-16 items-center gap-3 rounded-xl border border-gray-800 bg-gray-950/50 px-3.5 py-3 text-left text-sm text-gray-300 outline-none transition hover:border-indigo-500/50 hover:bg-indigo-500/10 focus-visible:border-indigo-400 focus-visible:ring-2 focus-visible:ring-indigo-400/50\"\n >\n <span\n class=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-gray-800 text-gray-400 transition group-hover:bg-indigo-500/15 group-hover:text-indigo-300\"\n >\n <lucide-icon icon=\"workflow\" size=\"17\"></lucide-icon>\n </span>\n <span class=\"min-w-0 flex-1\">\n <span class=\"block truncate font-medium text-gray-100\">{{ workflow.name }}</span>\n <span class=\"mt-0.5 block truncate font-mono text-[11px] text-gray-500\">{{ workflow.id }}</span>\n </span>\n <span\n class=\"rounded-full border px-2 py-1 text-[10px] font-semibold uppercase tracking-wide\"\n bind-class=\"workflow.status === 'published' ? 'border-emerald-500/30 bg-emerald-500/10 text-emerald-300' : workflow.status === 'archived' ? 'border-gray-700 bg-gray-800 text-gray-500' : 'border-amber-500/30 bg-amber-500/10 text-amber-300'\"\n >{{ workflow.status }}</span\n >\n <lucide-icon\n icon=\"arrow-up-right\"\n size=\"16\"\n class=\"shrink-0 text-gray-600 transition group-hover:text-indigo-300\"\n ></lucide-icon>\n </a>\n </li>\n </template>\n </ul>\n <div\n class=\"rounded-xl border border-dashed border-gray-700 px-4 py-8 text-center\"\n class-hidden=\"workflows.length > 0\"\n >\n <lucide-icon icon=\"workflow\" size=\"22\" class=\"mx-auto text-gray-600\"></lucide-icon>\n <p class=\"mt-2 text-sm font-medium text-gray-300\">No workflows yet</p>\n <p class=\"mt-1 text-xs text-gray-500\">Create a definition to start automating jobs.</p>\n </div>\n </nav>\n\n <section\n class=\"editor-panel overflow-hidden rounded-xl border border-gray-800 bg-gray-900/80 shadow-xl shadow-black/10\"\n >\n <div class=\"border-b border-gray-800 px-4 pt-3 sm:px-5\">\n <a\n href=\"/workflows\"\n class=\"inline-flex items-center gap-1.5 rounded-md px-2 py-1.5 text-xs font-medium text-gray-400 outline-none transition hover:bg-gray-800 hover:text-gray-100 focus-visible:ring-2 focus-visible:ring-indigo-400/60\"\n >\n <lucide-icon icon=\"arrow-left\" size=\"14\"></lucide-icon>\n Back to workflows\n </a>\n </div>\n <div class=\"border-b border-gray-800 bg-gray-900 px-4 py-4 sm:px-5\">\n <div class=\"flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between\">\n <label class=\"block max-w-xl flex-1 text-xs font-semibold uppercase tracking-wider text-gray-400\"\n >Workflow ID\n <input\n bind-value=\"workflowId\"\n on-input=\"setWorkflowId($event)\"\n bind-disabled=\"selectedId\"\n aria-describedby=\"workflow-id-help\"\n class=\"mt-2 w-full rounded-lg border border-gray-700 bg-gray-950 px-3 py-2.5 font-mono text-sm normal-case tracking-normal text-white outline-none transition focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500/20\"\n placeholder=\"derived-from-workflow-name\"\n />\n <span\n id=\"workflow-id-help\"\n class=\"mt-1 block text-[11px] font-normal normal-case tracking-normal text-gray-500\"\n >The ID becomes permanent after the first save.</span\n >\n </label>\n <label class=\"inline-flex items-center gap-2 text-sm text-gray-300\">\n <input\n type=\"checkbox\"\n bind-checked=\"enabled\"\n on-change=\"setEnabled($event)\"\n class=\"h-4 w-4 rounded border-gray-700 bg-gray-950 text-indigo-500 focus:ring-2 focus:ring-indigo-500/30\"\n />\n Enabled\n </label>\n <div class=\"flex flex-wrap gap-2\" class-hidden=\"readOnly\">\n <button\n type=\"button\"\n aria-label=\"Save workflow draft\"\n title=\"Save workflow draft\"\n on-click=\"save()\"\n bind-disabled=\"busy\"\n class=\"inline-flex items-center gap-2 rounded-lg bg-indigo-500 px-3 py-2.5 text-sm font-semibold text-white transition hover:bg-indigo-400 disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <lucide-icon icon=\"save\" size=\"16\"></lucide-icon>\n <span class=\"hidden sm:inline\">Save draft</span>\n </button>\n <button\n type=\"button\"\n aria-label=\"Publish workflow\"\n title=\"Publish workflow\"\n on-click=\"publish()\"\n bind-disabled=\"busy\"\n class=\"inline-flex items-center gap-2 rounded-lg border border-emerald-500/50 px-3 py-2.5 text-sm font-medium text-emerald-300 transition hover:bg-emerald-500/10 disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <lucide-icon icon=\"rocket\" size=\"16\"></lucide-icon>\n <span class=\"hidden sm:inline\">Publish</span>\n </button>\n <button\n type=\"button\"\n aria-label=\"Delete workflow\"\n title=\"Delete workflow\"\n on-click=\"remove()\"\n bind-disabled=\"busy\"\n class=\"inline-flex items-center gap-2 rounded-lg border border-rose-500/50 px-3 py-2.5 text-sm font-medium text-rose-300 transition hover:bg-rose-500/10 disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <lucide-icon icon=\"trash\" size=\"16\"></lucide-icon>\n <span class=\"hidden sm:inline\">Delete</span>\n </button>\n </div>\n </div>\n </div>\n <div class=\"p-3 sm:p-5\">\n <div class=\"mb-2 flex items-center justify-between px-1 text-xs text-gray-500\">\n <div class=\"flex items-center gap-2\">\n <button\n type=\"button\"\n aria-label=\"Validate workflow\"\n title=\"Validate workflow\"\n on-click=\"validate(1)\"\n bind-disabled=\"validation.running\"\n bind-class=\"{ 'hidden': readOnly, 'text-emerald-400': validation.valid, 'text-rose-400': !validation.valid }\"\n class=\"disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <lucide-icon\n class=\"inline-block\"\n bind-icon=\"validation.running ? 'loader-circle' : (validation.valid ? 'circle-check' : 'circle-alert')\"\n bind-class=\"validation.running ? 'animate-spin' : ''\"\n size=\"16\"\n ></lucide-icon>\n </button>\n <span class=\"font-medium\" bind-class=\"validation.error ? 'bg-rose-500/10 text-rose-100' : ''\"\n >{{ validation.error || '' }}</span\n >\n </div>\n <span class=\"font-mono\">{{ source.length }} characters</span>\n </div>\n <template if=\"readOnly\">\n <code-block\n language=\"yaml\"\n theme=\"atom-one-dark\"\n class=\"block h-[calc(100vh-23rem)] min-h-[28rem] overflow-auto rounded-lg border border-gray-700 bg-gray-950 p-4\"\n bind-source=\"source\"\n ></code-block>\n </template>\n <template if=\"!readOnly\">\n <code-editor\n id=\"source-yaml\"\n language=\"yaml\"\n theme=\"atom-one-dark\"\n nostatus=\"true\"\n class=\"block h-[calc(100vh-23rem)] min-h-[28rem] overflow-hidden rounded-lg border border-gray-700 bg-gray-950\"\n bind-value=\"source\"\n on-change=\"setSource($event.detail)\"\n ></code-editor>\n </template>\n <details\n class=\"mt-4 overflow-hidden rounded-xl border border-gray-800 bg-gray-950/50\"\n on-toggle=\"loadHelp($event)\"\n >\n <summary\n class=\"cursor-pointer list-none px-4 py-3 text-sm font-medium text-gray-300 outline-none transition hover:bg-gray-900 focus-visible:ring-2 focus-visible:ring-indigo-400/60\"\n >\n <span class=\"inline-flex items-center gap-2\"\n ><lucide-icon icon=\"circle-question-mark\" size=\"16\"></lucide-icon>Syntax</span\n >\n <span class=\"ml-2 text-xs font-normal text-gray-500\">Reference, tutorials, and examples</span>\n </summary>\n <div\n ref=\"helpContent\"\n class=\"max-h-[38rem] overflow-y-auto border-t border-gray-800 bg-gray-950 px-4 py-5\"\n role=\"region\"\n aria-label=\"Workflow syntax help\"\n aria-live=\"polite\"\n >\n <p class=\"text-sm text-gray-500\">Expand to load the workflow syntax reference.</p>\n </div>\n </details>\n </div>\n </section>\n </section>\n\n <section\n class=\"secrets-panel rounded-2xl border border-gray-800 bg-gray-900/80 p-4 shadow-xl shadow-black/10 sm:p-5\"\n aria-labelledby=\"secrets-title\"\n >\n <div class=\"mb-5 flex items-start justify-between gap-3\">\n <div class=\"flex items-start gap-3\">\n <span class=\"rounded-lg bg-indigo-500/10 p-2 text-indigo-300\"\n ><lucide-icon icon=\"key-round\" size=\"18\"></lucide-icon\n ></span>\n <div>\n <h2 id=\"secrets-title\" class=\"text-lg font-semibold text-white\">Secrets</h2>\n <p class=\"mt-0.5 text-sm text-gray-400\">Write-only credentials available to workflows.</p>\n </div>\n </div>\n <span\n class=\"rounded-full border border-gray-700 bg-gray-950 px-2.5 py-1 text-xs font-mono text-gray-400\"\n aria-label=\"Secret count\"\n >{{ secrets.length }}</span\n >\n </div>\n <div class=\"mb-5 rounded-xl border border-gray-800 bg-gray-950/50 p-3\">\n <p class=\"mb-3 text-xs text-gray-500\">Saving an existing name replaces its encrypted value.</p>\n <div class=\"grid gap-3 md:grid-cols-[14rem_1fr_auto_auto]\">\n <label class=\"sr-only\" for=\"secret-name\">Secret name</label>\n <input\n id=\"secret-name\"\n bind-value=\"secretName\"\n on-input=\"setSecretName($event)\"\n class=\"rounded-lg border border-gray-700 bg-gray-900 px-3 py-2.5 font-mono text-sm uppercase outline-none transition placeholder:text-gray-600 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500/30\"\n placeholder=\"NPM_TOKEN\"\n />\n <label class=\"sr-only\" for=\"secret-value\">Secret value</label>\n <input\n id=\"secret-value\"\n ref=\"secretValueInput\"\n bind-value=\"secretValue\"\n on-input=\"setSecretValue($event)\"\n type=\"password\"\n class=\"rounded-lg border border-gray-700 bg-gray-900 px-3 py-2.5 font-mono text-sm outline-none transition placeholder:text-gray-600 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500/30\"\n placeholder=\"New secret value\"\n />\n <button\n type=\"button\"\n aria-label=\"Save secret value\"\n title=\"Save secret value\"\n on-click=\"saveSecret()\"\n bind-disabled=\"busy\"\n class=\"inline-flex items-center justify-center gap-2 rounded-lg border border-indigo-500/60 px-3 py-2.5 text-sm font-medium text-indigo-200 outline-none transition hover:bg-indigo-500/10 focus-visible:ring-2 focus-visible:ring-indigo-400/60 disabled:opacity-50\"\n >\n <lucide-icon icon=\"lock-keyhole\" size=\"16\"></lucide-icon><span class=\"hidden sm:inline\">Save</span>\n </button>\n <button\n type=\"button\"\n aria-label=\"Delete secret\"\n title=\"Delete secret\"\n on-click=\"removeSecret()\"\n bind-disabled=\"busy\"\n class=\"inline-flex items-center justify-center gap-2 rounded-lg border border-rose-500/50 px-3 py-2.5 text-sm font-medium text-rose-300 outline-none transition hover:bg-rose-500/10 focus-visible:ring-2 focus-visible:ring-rose-400/60 disabled:opacity-50\"\n >\n <lucide-icon icon=\"trash\" size=\"16\"></lucide-icon><span class=\"hidden sm:inline\">Delete</span>\n </button>\n </div>\n </div>\n <ul class=\"grid gap-2\" aria-label=\"Saved secrets\">\n <template for=\"name of secrets\">\n <li>\n <button\n type=\"button\"\n on-click=\"selectSecret(name)\"\n class=\"group flex min-h-14 w-full items-center gap-3 rounded-xl border border-gray-800 bg-gray-950/50 px-3.5 py-3 text-left outline-none transition hover:border-indigo-500/50 hover:bg-indigo-500/10 focus-visible:border-indigo-400 focus-visible:ring-2 focus-visible:ring-indigo-400/50\"\n aria-label=\"Edit secret {{ name }}\"\n >\n <span\n class=\"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-gray-800 text-gray-500 group-hover:text-indigo-300\"\n ><lucide-icon icon=\"key-round\" size=\"15\"></lucide-icon\n ></span>\n <span class=\"min-w-0 flex-1 truncate font-mono text-sm text-gray-200\">{{ name }}</span>\n <span class=\"text-xs text-gray-500\">Select</span>\n <lucide-icon\n icon=\"chevron-right\"\n size=\"16\"\n class=\"text-gray-600 transition group-hover:text-indigo-300\"\n ></lucide-icon>\n </button>\n </li>\n </template>\n </ul>\n <div\n class=\"rounded-xl border border-dashed border-gray-700 px-4 py-8 text-center\"\n class-hidden=\"secrets.length > 0\"\n >\n <lucide-icon icon=\"key-round\" size=\"22\" class=\"mx-auto text-gray-600\"></lucide-icon>\n <p class=\"mt-2 text-sm font-medium text-gray-300\">No secrets configured</p>\n <p class=\"mt-1 text-xs text-gray-500\">Add one above to make it available to a workflow.</p>\n </div>\n </section>\n </main>\n\n <script setup>\n import { onDestroy, onInit, ref, templateRef } from '@li3/web';\n\n export default function () {\n const page = document.body.dataset.page;\n const initialId = __WORKFLOW_ID__;\n const initialRevision = __WORKFLOW_REVISION__;\n const readOnly = Boolean(initialRevision);\n const workflows = ref([]);\n const secrets = ref([]);\n const source = ref('');\n const validation = ref({ valid: true });\n const savedSource = ref('');\n const workflowId = ref('');\n const enabled = ref(true);\n const savedEnabled = ref(true);\n const selectedId = ref('');\n const secretName = ref('');\n const secretValue = ref('');\n const notice = ref('');\n const noticeError = ref(false);\n const busy = ref(false);\n const secretValueInput = templateRef('secretValueInput');\n const helpContent = templateRef('helpContent');\n const helpLoaded = ref(false);\n const helpLoading = ref(false);\n let validationTimer;\n\n const showNotice = (message, error = false) => {\n notice.value = message;\n noticeError.value = error;\n };\n\n const api = async (url, options = {}) => {\n const response = await fetch(url, {\n headers: { accept: 'application/json', ...(options.body ? { 'content-type': 'application/json' } : {}) },\n ...options,\n });\n const body = response.status === 204 ? null : await response.json().catch(() => ({}));\n if (!response.ok) throw new Error(body.error || `Request failed: ${response.status}`);\n return body;\n };\n\n const derivedId = () =>\n source.value\n .match(/^\\s*(?:id:\\s*([^\\n]+)|name:\\s*([^\\n]+))/m)\n ?.slice(1)\n .find(Boolean)\n ?.trim()\n .toLowerCase()\n .replace(/[^a-z0-9]/g, '-')\n .replace(/(^-|-$)/g, '') || '';\n\n const run = async (action) => {\n if (busy.value) return;\n\n busy.value = true;\n\n try {\n await action();\n } catch (error) {\n showNotice(error.message, true);\n } finally {\n busy.value = false;\n }\n };\n\n const loadWorkflows = async () => {\n workflows.value = (await api('/api/workflows')).workflows;\n };\n\n const loadSecrets = async () => {\n secrets.value = (await api('/api/secrets')).secrets;\n };\n\n const openWorkflow = async (id) => {\n const workflowUrl = initialRevision\n ? `/api/workflows/${id}?revision=${initialRevision}`\n : `/api/workflows/${id}`;\n const workflow = await api(workflowUrl);\n selectedId.value = workflow.id;\n workflowId.value = workflow.id;\n source.value = workflow.sourceYaml;\n savedSource.value = workflow.sourceYaml;\n enabled.value = workflow.enabled;\n savedEnabled.value = workflow.enabled;\n };\n\n const validateSource = async () => {\n validation.value = await api('/api/workflows/validate', {\n method: 'POST',\n body: JSON.stringify({ sourceYaml: source.value }),\n });\n };\n\n const validate = (ms = 1000) => {\n if (page !== 'editor') return;\n\n clearTimeout(validationTimer);\n validationTimer = setTimeout(() => {\n validation.running = true;\n validateSource();\n }, ms);\n };\n\n const save = () =>\n run(async () => {\n const id = workflowId.value.trim() || derivedId();\n if (!id) throw new Error('Set an ID or add a workflow name first.');\n if (\n initialId &&\n id === selectedId.value &&\n source.value === savedSource.value &&\n enabled.value === savedEnabled.value\n ) {\n showNotice('No changes to save.');\n return;\n }\n const workflow = await api(`/api/workflows/${id}`, {\n method: 'PUT',\n body: JSON.stringify({ sourceYaml: source.value, enabled: enabled.value }),\n });\n selectedId.value = workflow.id;\n workflowId.value = workflow.id;\n savedSource.value = source.value;\n savedEnabled.value = enabled.value;\n showNotice(`Saved ${workflow.id} as draft revision ${workflow.revision}.`);\n if (!initialId) history.replaceState(null, '', `/workflows/${workflow.id}`);\n });\n const publish = () =>\n run(async () => {\n const id = workflowId.value.trim() || selectedId.value;\n if (!id) throw new Error('Save a workflow before publishing it.');\n const workflow = await api(`/api/workflows/${id}/publish`, { method: 'POST' });\n selectedId.value = workflow.id;\n showNotice(`Published ${workflow.id} revision ${workflow.revision}.`);\n });\n const remove = () =>\n run(async () => {\n const id = workflowId.value.trim() || selectedId.value;\n if (!id || !confirm(`Delete ${id} and all of its revisions?`)) return;\n await api(`/api/workflows/${id}`, { method: 'DELETE' });\n window.location.href = '/workflows';\n });\n const saveSecret = () =>\n run(async () => {\n const name = secretName.value.trim();\n if (!name || !secretValue.value) throw new Error('Set a secret name and value first.');\n await api(`/api/secrets/${name}`, { method: 'PUT', body: JSON.stringify({ value: secretValue.value }) });\n secretValue.value = '';\n await loadSecrets();\n showNotice(`Saved ${name}.`);\n });\n const removeSecret = () =>\n run(async () => {\n const name = secretName.value.trim();\n if (!name || !confirm(`Delete ${name}?`)) return;\n await api(`/api/secrets/${name}`, { method: 'DELETE' });\n secretName.value = '';\n secretValue.value = '';\n await loadSecrets();\n showNotice(`Deleted ${name}.`);\n });\n const setSource = (value) => {\n source.value = value;\n validate();\n };\n const setWorkflowId = (event) => {\n workflowId.value = event.target.value;\n };\n const setEnabled = (event) => {\n enabled.value = event.target.checked;\n };\n const setSecretName = (event) => {\n secretName.value = event.target.value;\n };\n const setSecretValue = (event) => {\n secretValue.value = event.target.value;\n };\n const selectSecret = (name) => {\n secretName.value = name;\n secretValueInput.value?.focus();\n };\n const visitWorkflow = (id) => {\n window.location.href = `/workflows/${id}`;\n };\n const loadHelp = async (event) => {\n if (!event.target.open || helpLoaded.value || helpLoading.value || !helpContent.value) return;\n helpLoading.value = true;\n helpContent.value.textContent = 'Loading workflow syntax help...';\n try {\n const response = await fetch('/help?embed=1', { headers: { accept: 'text/html' } });\n if (!response.ok) throw new Error(`Help request failed: ${response.status}`);\n const html = await response.text();\n const parsed = new DOMParser().parseFromString(html, 'text/html');\n const sourceNodes = [\n ...Array.from(parsed.head.querySelectorAll('style')),\n ...Array.from(parsed.body.childNodes),\n ];\n const nodes = sourceNodes.map((node) => document.importNode(node, true));\n helpContent.value.replaceChildren(...nodes);\n helpLoaded.value = true;\n } catch (error) {\n helpContent.value.textContent = 'Unable to load workflow syntax help.';\n console.error(error);\n } finally {\n helpLoading.value = false;\n }\n };\n\n onDestroy(() => clearTimeout(validationTimer));\n\n onInit(() => {\n const loadPage =\n page === 'editor'\n ? initialId\n ? openWorkflow(initialId)\n : Promise.resolve()\n : Promise.all([loadWorkflows(), loadSecrets()]);\n loadPage.catch((error) => showNotice(error.message, true));\n });\n\n return {\n workflows,\n secrets,\n source,\n validation,\n workflowId,\n enabled,\n readOnly,\n selectedId,\n secretName,\n secretValue,\n notice,\n noticeError,\n busy,\n validate,\n save,\n publish,\n remove,\n saveSecret,\n removeSecret,\n setSource,\n setWorkflowId,\n setEnabled,\n setSecretName,\n setSecretValue,\n selectSecret,\n visitWorkflow,\n loadHelp,\n };\n }\n <\/script>\n </template>\n\n <script type=\"module\">\n import '@li3/web';\n <\/script>\n <script src=\"https://cdn.tailwindcss.com\"><\/script>\n </body>\n</html>\n";
5572
6111
  //#endregion
5573
6112
  //#region src/workflows-ui.ts
5574
- function Ui(e, t = "", n) {
5575
- return Hi.replace("__WORKFLOW_PAGE__", e).replace("__WORKFLOW_ID__", JSON.stringify(t)).replace("__WORKFLOW_REVISION__", JSON.stringify(n ?? null));
6113
+ function Wi(e, t = "", n) {
6114
+ return Ui.replace("__WORKFLOW_PAGE__", e).replace("__WORKFLOW_ID__", JSON.stringify(t)).replace("__WORKFLOW_REVISION__", JSON.stringify(n ?? null));
5576
6115
  }
5577
6116
  //#endregion
5578
6117
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/identity.js
5579
- var Wi = Symbol.for("yaml.alias"), Gi = Symbol.for("yaml.document"), Ki = Symbol.for("yaml.map"), qi = Symbol.for("yaml.pair"), Ji = Symbol.for("yaml.scalar"), Yi = Symbol.for("yaml.seq"), G = Symbol.for("yaml.node.type"), Xi = (e) => !!e && typeof e == "object" && e[G] === Wi, Zi = (e) => !!e && typeof e == "object" && e[G] === Gi, Qi = (e) => !!e && typeof e == "object" && e[G] === Ki, K = (e) => !!e && typeof e == "object" && e[G] === qi, q = (e) => !!e && typeof e == "object" && e[G] === Ji, $i = (e) => !!e && typeof e == "object" && e[G] === Yi;
6118
+ var Gi = Symbol.for("yaml.alias"), Ki = Symbol.for("yaml.document"), qi = Symbol.for("yaml.map"), Ji = Symbol.for("yaml.pair"), Yi = Symbol.for("yaml.scalar"), Xi = Symbol.for("yaml.seq"), G = Symbol.for("yaml.node.type"), Zi = (e) => !!e && typeof e == "object" && e[G] === Gi, Qi = (e) => !!e && typeof e == "object" && e[G] === Ki, $i = (e) => !!e && typeof e == "object" && e[G] === qi, K = (e) => !!e && typeof e == "object" && e[G] === Ji, q = (e) => !!e && typeof e == "object" && e[G] === Yi, ea = (e) => !!e && typeof e == "object" && e[G] === Xi;
5580
6119
  function J(e) {
5581
6120
  if (e && typeof e == "object") switch (e[G]) {
5582
- case Ki:
5583
- case Yi: return !0;
6121
+ case qi:
6122
+ case Xi: return !0;
5584
6123
  }
5585
6124
  return !1;
5586
6125
  }
5587
6126
  function Y(e) {
5588
6127
  if (e && typeof e == "object") switch (e[G]) {
5589
- case Wi:
5590
- case Ki:
5591
- case Ji:
5592
- case Yi: return !0;
6128
+ case Gi:
6129
+ case qi:
6130
+ case Yi:
6131
+ case Xi: return !0;
5593
6132
  }
5594
6133
  return !1;
5595
6134
  }
5596
- var ea = (e) => (q(e) || J(e)) && !!e.anchor, X = Symbol("break visit"), ta = Symbol("skip children"), na = Symbol("remove node");
5597
- function ra(e, t) {
5598
- let n = sa(t);
5599
- Zi(e) ? ia(null, e.contents, n, Object.freeze([e])) === na && (e.contents = null) : ia(null, e, n, Object.freeze([]));
6135
+ var ta = (e) => (q(e) || J(e)) && !!e.anchor, X = Symbol("break visit"), na = Symbol("skip children"), ra = Symbol("remove node");
6136
+ function ia(e, t) {
6137
+ let n = ca(t);
6138
+ Qi(e) ? aa(null, e.contents, n, Object.freeze([e])) === ra && (e.contents = null) : aa(null, e, n, Object.freeze([]));
5600
6139
  }
5601
- ra.BREAK = X, ra.SKIP = ta, ra.REMOVE = na;
5602
- function ia(e, t, n, r) {
5603
- let i = ca(e, t, n, r);
5604
- if (Y(i) || K(i)) return la(e, r, i), ia(e, i, n, r);
6140
+ ia.BREAK = X, ia.SKIP = na, ia.REMOVE = ra;
6141
+ function aa(e, t, n, r) {
6142
+ let i = la(e, t, n, r);
6143
+ if (Y(i) || K(i)) return ua(e, r, i), aa(e, i, n, r);
5605
6144
  if (typeof i != "symbol") {
5606
6145
  if (J(t)) {
5607
6146
  r = Object.freeze(r.concat(t));
5608
6147
  for (let e = 0; e < t.items.length; ++e) {
5609
- let i = ia(e, t.items[e], n, r);
6148
+ let i = aa(e, t.items[e], n, r);
5610
6149
  if (typeof i == "number") e = i - 1;
5611
6150
  else if (i === X) return X;
5612
- else i === na && (t.items.splice(e, 1), --e);
6151
+ else i === ra && (t.items.splice(e, 1), --e);
5613
6152
  }
5614
6153
  } else if (K(t)) {
5615
6154
  r = Object.freeze(r.concat(t));
5616
- let e = ia("key", t.key, n, r);
6155
+ let e = aa("key", t.key, n, r);
5617
6156
  if (e === X) return X;
5618
- e === na && (t.key = null);
5619
- let i = ia("value", t.value, n, r);
6157
+ e === ra && (t.key = null);
6158
+ let i = aa("value", t.value, n, r);
5620
6159
  if (i === X) return X;
5621
- i === na && (t.value = null);
6160
+ i === ra && (t.value = null);
5622
6161
  }
5623
6162
  }
5624
6163
  return i;
5625
6164
  }
5626
- async function aa(e, t) {
5627
- let n = sa(t);
5628
- Zi(e) ? await oa(null, e.contents, n, Object.freeze([e])) === na && (e.contents = null) : await oa(null, e, n, Object.freeze([]));
6165
+ async function oa(e, t) {
6166
+ let n = ca(t);
6167
+ Qi(e) ? await sa(null, e.contents, n, Object.freeze([e])) === ra && (e.contents = null) : await sa(null, e, n, Object.freeze([]));
5629
6168
  }
5630
- aa.BREAK = X, aa.SKIP = ta, aa.REMOVE = na;
5631
- async function oa(e, t, n, r) {
5632
- let i = await ca(e, t, n, r);
5633
- if (Y(i) || K(i)) return la(e, r, i), oa(e, i, n, r);
6169
+ oa.BREAK = X, oa.SKIP = na, oa.REMOVE = ra;
6170
+ async function sa(e, t, n, r) {
6171
+ let i = await la(e, t, n, r);
6172
+ if (Y(i) || K(i)) return ua(e, r, i), sa(e, i, n, r);
5634
6173
  if (typeof i != "symbol") {
5635
6174
  if (J(t)) {
5636
6175
  r = Object.freeze(r.concat(t));
5637
6176
  for (let e = 0; e < t.items.length; ++e) {
5638
- let i = await oa(e, t.items[e], n, r);
6177
+ let i = await sa(e, t.items[e], n, r);
5639
6178
  if (typeof i == "number") e = i - 1;
5640
6179
  else if (i === X) return X;
5641
- else i === na && (t.items.splice(e, 1), --e);
6180
+ else i === ra && (t.items.splice(e, 1), --e);
5642
6181
  }
5643
6182
  } else if (K(t)) {
5644
6183
  r = Object.freeze(r.concat(t));
5645
- let e = await oa("key", t.key, n, r);
6184
+ let e = await sa("key", t.key, n, r);
5646
6185
  if (e === X) return X;
5647
- e === na && (t.key = null);
5648
- let i = await oa("value", t.value, n, r);
6186
+ e === ra && (t.key = null);
6187
+ let i = await sa("value", t.value, n, r);
5649
6188
  if (i === X) return X;
5650
- i === na && (t.value = null);
6189
+ i === ra && (t.value = null);
5651
6190
  }
5652
6191
  }
5653
6192
  return i;
5654
6193
  }
5655
- function sa(e) {
6194
+ function ca(e) {
5656
6195
  return typeof e == "object" && (e.Collection || e.Node || e.Value) ? Object.assign({
5657
6196
  Alias: e.Node,
5658
6197
  Map: e.Node,
@@ -5667,34 +6206,34 @@ function sa(e) {
5667
6206
  Seq: e.Collection
5668
6207
  }, e) : e;
5669
6208
  }
5670
- function ca(e, t, n, r) {
6209
+ function la(e, t, n, r) {
5671
6210
  if (typeof n == "function") return n(e, t, r);
5672
- if (Qi(t)) return n.Map?.(e, t, r);
5673
- if ($i(t)) return n.Seq?.(e, t, r);
6211
+ if ($i(t)) return n.Map?.(e, t, r);
6212
+ if (ea(t)) return n.Seq?.(e, t, r);
5674
6213
  if (K(t)) return n.Pair?.(e, t, r);
5675
6214
  if (q(t)) return n.Scalar?.(e, t, r);
5676
- if (Xi(t)) return n.Alias?.(e, t, r);
6215
+ if (Zi(t)) return n.Alias?.(e, t, r);
5677
6216
  }
5678
- function la(e, t, n) {
6217
+ function ua(e, t, n) {
5679
6218
  let r = t[t.length - 1];
5680
6219
  if (J(r)) r.items[e] = n;
5681
6220
  else if (K(r)) e === "key" ? r.key = n : r.value = n;
5682
- else if (Zi(r)) r.contents = n;
6221
+ else if (Qi(r)) r.contents = n;
5683
6222
  else {
5684
- let e = Xi(r) ? "alias" : "scalar";
6223
+ let e = Zi(r) ? "alias" : "scalar";
5685
6224
  throw Error(`Cannot replace node with ${e} parent`);
5686
6225
  }
5687
6226
  }
5688
6227
  //#endregion
5689
6228
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/directives.js
5690
- var ua = {
6229
+ var da = {
5691
6230
  "!": "%21",
5692
6231
  ",": "%2C",
5693
6232
  "[": "%5B",
5694
6233
  "]": "%5D",
5695
6234
  "{": "%7B",
5696
6235
  "}": "%7D"
5697
- }, da = (e) => e.replace(/[!,[\]{}]/g, (e) => ua[e]), fa = class e {
6236
+ }, fa = (e) => e.replace(/[!,[\]{}]/g, (e) => da[e]), pa = class e {
5698
6237
  constructor(t, n) {
5699
6238
  this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, e.defaultYaml, t), this.tags = Object.assign({}, e.defaultTags, n);
5700
6239
  }
@@ -5757,14 +6296,14 @@ var ua = {
5757
6296
  return n === "!" ? e : (t(`Could not resolve tag: ${e}`), null);
5758
6297
  }
5759
6298
  tagString(e) {
5760
- for (let [t, n] of Object.entries(this.tags)) if (e.startsWith(n)) return t + da(e.substring(n.length));
6299
+ for (let [t, n] of Object.entries(this.tags)) if (e.startsWith(n)) return t + fa(e.substring(n.length));
5761
6300
  return e[0] === "!" ? e : `!<${e}>`;
5762
6301
  }
5763
6302
  toString(e) {
5764
6303
  let t = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [], n = Object.entries(this.tags), r;
5765
6304
  if (e && n.length > 0 && Y(e.contents)) {
5766
6305
  let t = {};
5767
- ra(e.contents, (e, n) => {
6306
+ ia(e.contents, (e, n) => {
5768
6307
  Y(n) && n.tag && (t[n.tag] = !0);
5769
6308
  }), r = Object.keys(t);
5770
6309
  } else r = [];
@@ -5772,37 +6311,37 @@ var ua = {
5772
6311
  return t.join("\n");
5773
6312
  }
5774
6313
  };
5775
- fa.defaultYaml = {
6314
+ pa.defaultYaml = {
5776
6315
  explicit: !1,
5777
6316
  version: "1.2"
5778
- }, fa.defaultTags = { "!!": "tag:yaml.org,2002:" };
6317
+ }, pa.defaultTags = { "!!": "tag:yaml.org,2002:" };
5779
6318
  //#endregion
5780
6319
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/anchors.js
5781
- function pa(e) {
6320
+ function ma(e) {
5782
6321
  if (/[\x00-\x19\s,[\]{}]/.test(e)) {
5783
6322
  let t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;
5784
6323
  throw Error(t);
5785
6324
  }
5786
6325
  return !0;
5787
6326
  }
5788
- function ma(e) {
6327
+ function ha(e) {
5789
6328
  let t = /* @__PURE__ */ new Set();
5790
- return ra(e, { Value(e, n) {
6329
+ return ia(e, { Value(e, n) {
5791
6330
  n.anchor && t.add(n.anchor);
5792
6331
  } }), t;
5793
6332
  }
5794
- function ha(e, t) {
6333
+ function ga(e, t) {
5795
6334
  for (let n = 1;; ++n) {
5796
6335
  let r = `${e}${n}`;
5797
6336
  if (!t.has(r)) return r;
5798
6337
  }
5799
6338
  }
5800
- function ga(e, t) {
6339
+ function _a(e, t) {
5801
6340
  let n = [], r = /* @__PURE__ */ new Map(), i = null;
5802
6341
  return {
5803
6342
  onAnchor: (r) => {
5804
- n.push(r), i ??= ma(e);
5805
- let a = ha(t, i);
6343
+ n.push(r), i ??= ha(e);
6344
+ let a = ga(t, i);
5806
6345
  return i.add(a), a;
5807
6346
  },
5808
6347
  setAnchors: () => {
@@ -5820,22 +6359,22 @@ function ga(e, t) {
5820
6359
  }
5821
6360
  //#endregion
5822
6361
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/applyReviver.js
5823
- function _a(e, t, n, r) {
6362
+ function va(e, t, n, r) {
5824
6363
  if (r && typeof r == "object") {
5825
6364
  if (Array.isArray(r)) for (let t = 0, n = r.length; t < n; ++t) {
5826
- let n = r[t], i = _a(e, r, String(t), n);
6365
+ let n = r[t], i = va(e, r, String(t), n);
5827
6366
  i === void 0 ? delete r[t] : i !== n && (r[t] = i);
5828
6367
  }
5829
6368
  else if (r instanceof Map) for (let t of Array.from(r.keys())) {
5830
- let n = r.get(t), i = _a(e, r, t, n);
6369
+ let n = r.get(t), i = va(e, r, t, n);
5831
6370
  i === void 0 ? r.delete(t) : i !== n && r.set(t, i);
5832
6371
  }
5833
6372
  else if (r instanceof Set) for (let t of Array.from(r)) {
5834
- let n = _a(e, r, t, t);
6373
+ let n = va(e, r, t, t);
5835
6374
  n === void 0 ? r.delete(t) : n !== t && (r.delete(t), r.add(n));
5836
6375
  }
5837
6376
  else for (let [t, n] of Object.entries(r)) {
5838
- let i = _a(e, r, t, n);
6377
+ let i = va(e, r, t, n);
5839
6378
  i === void 0 ? delete r[t] : i !== n && (r[t] = i);
5840
6379
  }
5841
6380
  }
@@ -5843,10 +6382,10 @@ function _a(e, t, n, r) {
5843
6382
  }
5844
6383
  //#endregion
5845
6384
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/toJS.js
5846
- function va(e, t, n) {
5847
- if (Array.isArray(e)) return e.map((e, t) => va(e, String(t), n));
6385
+ function ya(e, t, n) {
6386
+ if (Array.isArray(e)) return e.map((e, t) => ya(e, String(t), n));
5848
6387
  if (e && typeof e.toJSON == "function") {
5849
- if (!n || !ea(e)) return e.toJSON(t, n);
6388
+ if (!n || !ta(e)) return e.toJSON(t, n);
5850
6389
  let r = {
5851
6390
  aliasCount: 0,
5852
6391
  count: 1,
@@ -5862,7 +6401,7 @@ function va(e, t, n) {
5862
6401
  }
5863
6402
  //#endregion
5864
6403
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Node.js
5865
- var ya = class {
6404
+ var ba = class {
5866
6405
  constructor(e) {
5867
6406
  Object.defineProperty(this, G, { value: e });
5868
6407
  }
@@ -5871,7 +6410,7 @@ var ya = class {
5871
6410
  return this.range && (e.range = this.range.slice()), e;
5872
6411
  }
5873
6412
  toJS(e, { mapAsMap: t, maxAliasCount: n, onAnchor: r, reviver: i } = {}) {
5874
- if (!Zi(e)) throw TypeError("A document argument is required");
6413
+ if (!Qi(e)) throw TypeError("A document argument is required");
5875
6414
  let a = {
5876
6415
  anchors: /* @__PURE__ */ new Map(),
5877
6416
  doc: e,
@@ -5879,21 +6418,21 @@ var ya = class {
5879
6418
  mapAsMap: t === !0,
5880
6419
  mapKeyWarned: !1,
5881
6420
  maxAliasCount: typeof n == "number" ? n : 100
5882
- }, o = va(this, "", a);
6421
+ }, o = ya(this, "", a);
5883
6422
  if (typeof r == "function") for (let { count: e, res: t } of a.anchors.values()) r(t, e);
5884
- return typeof i == "function" ? _a(i, { "": o }, "", o) : o;
6423
+ return typeof i == "function" ? va(i, { "": o }, "", o) : o;
5885
6424
  }
5886
- }, ba = class extends ya {
6425
+ }, xa = class extends ba {
5887
6426
  constructor(e) {
5888
- super(Wi), this.source = e, Object.defineProperty(this, "tag", { set() {
6427
+ super(Gi), this.source = e, Object.defineProperty(this, "tag", { set() {
5889
6428
  throw Error("Alias nodes cannot have tags");
5890
6429
  } });
5891
6430
  }
5892
6431
  resolve(e, t) {
5893
6432
  if (t?.maxAliasCount === 0) throw ReferenceError("Alias resolution is disabled");
5894
6433
  let n;
5895
- t?.aliasResolveCache ? n = t.aliasResolveCache : (n = [], ra(e, { Node: (e, t) => {
5896
- (Xi(t) || ea(t)) && n.push(t);
6434
+ t?.aliasResolveCache ? n = t.aliasResolveCache : (n = [], ia(e, { Node: (e, t) => {
6435
+ (Zi(t) || ta(t)) && n.push(t);
5897
6436
  } }), t && (t.aliasResolveCache = n));
5898
6437
  let r;
5899
6438
  for (let e of n) {
@@ -5911,14 +6450,14 @@ var ya = class {
5911
6450
  }
5912
6451
  let o = n.get(a);
5913
6452
  /* istanbul ignore if */
5914
- if (o ||= (va(a, null, t), n.get(a)), o?.res === void 0) throw ReferenceError("This should not happen: Alias anchor was not resolved?");
5915
- if (i >= 0 && (o.count += 1, o.aliasCount === 0 && (o.aliasCount = xa(r, a, n)), o.count * o.aliasCount > i)) throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");
6453
+ if (o ||= (ya(a, null, t), n.get(a)), o?.res === void 0) throw ReferenceError("This should not happen: Alias anchor was not resolved?");
6454
+ if (i >= 0 && (o.count += 1, o.aliasCount === 0 && (o.aliasCount = Sa(r, a, n)), o.count * o.aliasCount > i)) throw ReferenceError("Excessive alias count indicates a resource exhaustion attack");
5916
6455
  return o.res;
5917
6456
  }
5918
6457
  toString(e, t, n) {
5919
6458
  let r = `*${this.source}`;
5920
6459
  if (e) {
5921
- if (pa(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
6460
+ if (ma(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
5922
6461
  let e = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
5923
6462
  throw Error(e);
5924
6463
  }
@@ -5927,33 +6466,33 @@ var ya = class {
5927
6466
  return r;
5928
6467
  }
5929
6468
  };
5930
- function xa(e, t, n) {
5931
- if (Xi(t)) {
6469
+ function Sa(e, t, n) {
6470
+ if (Zi(t)) {
5932
6471
  let r = t.resolve(e), i = n && r && n.get(r);
5933
6472
  return i ? i.count * i.aliasCount : 0;
5934
6473
  }
5935
6474
  if (J(t)) {
5936
6475
  let r = 0;
5937
6476
  for (let i of t.items) {
5938
- let t = xa(e, i, n);
6477
+ let t = Sa(e, i, n);
5939
6478
  t > r && (r = t);
5940
6479
  }
5941
6480
  return r;
5942
6481
  }
5943
6482
  if (K(t)) {
5944
- let r = xa(e, t.key, n), i = xa(e, t.value, n);
6483
+ let r = Sa(e, t.key, n), i = Sa(e, t.value, n);
5945
6484
  return Math.max(r, i);
5946
6485
  }
5947
6486
  return 1;
5948
6487
  }
5949
6488
  //#endregion
5950
6489
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Scalar.js
5951
- var Sa = (e) => !e || typeof e != "function" && typeof e != "object", Z = class extends ya {
6490
+ var Ca = (e) => !e || typeof e != "function" && typeof e != "object", Z = class extends ba {
5952
6491
  constructor(e) {
5953
- super(Ji), this.value = e;
6492
+ super(Yi), this.value = e;
5954
6493
  }
5955
6494
  toJSON(e, t) {
5956
- return t?.keep ? this.value : va(this.value, e, t);
6495
+ return t?.keep ? this.value : ya(this.value, e, t);
5957
6496
  }
5958
6497
  toString() {
5959
6498
  return String(this.value);
@@ -5962,8 +6501,8 @@ var Sa = (e) => !e || typeof e != "function" && typeof e != "object", Z = class
5962
6501
  Z.BLOCK_FOLDED = "BLOCK_FOLDED", Z.BLOCK_LITERAL = "BLOCK_LITERAL", Z.PLAIN = "PLAIN", Z.QUOTE_DOUBLE = "QUOTE_DOUBLE", Z.QUOTE_SINGLE = "QUOTE_SINGLE";
5963
6502
  //#endregion
5964
6503
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/createNode.js
5965
- var Ca = "tag:yaml.org,2002:";
5966
- function wa(e, t, n) {
6504
+ var wa = "tag:yaml.org,2002:";
6505
+ function Ta(e, t, n) {
5967
6506
  if (t) {
5968
6507
  let e = n.filter((e) => e.tag === t), r = e.find((e) => !e.format) ?? e[0];
5969
6508
  if (!r) throw Error(`Tag ${t} not found`);
@@ -5971,29 +6510,29 @@ function wa(e, t, n) {
5971
6510
  }
5972
6511
  return n.find((t) => t.identify?.(e) && !t.format);
5973
6512
  }
5974
- function Ta(e, t, n) {
5975
- if (Zi(e) && (e = e.contents), Y(e)) return e;
6513
+ function Ea(e, t, n) {
6514
+ if (Qi(e) && (e = e.contents), Y(e)) return e;
5976
6515
  if (K(e)) {
5977
- let t = n.schema[Ki].createNode?.(n.schema, null, n);
6516
+ let t = n.schema[qi].createNode?.(n.schema, null, n);
5978
6517
  return t.items.push(e), t;
5979
6518
  }
5980
6519
  (e instanceof String || e instanceof Number || e instanceof Boolean || typeof BigInt < "u" && e instanceof BigInt) && (e = e.valueOf());
5981
6520
  let { aliasDuplicateObjects: r, onAnchor: i, onTagObj: a, schema: o, sourceObjects: s } = n, c;
5982
6521
  if (r && e && typeof e == "object") {
5983
- if (c = s.get(e), c) return c.anchor ?? (c.anchor = i(e)), new ba(c.anchor);
6522
+ if (c = s.get(e), c) return c.anchor ?? (c.anchor = i(e)), new xa(c.anchor);
5984
6523
  c = {
5985
6524
  anchor: null,
5986
6525
  node: null
5987
6526
  }, s.set(e, c);
5988
6527
  }
5989
- t?.startsWith("!!") && (t = Ca + t.slice(2));
5990
- let l = wa(e, t, o.tags);
6528
+ t?.startsWith("!!") && (t = wa + t.slice(2));
6529
+ let l = Ta(e, t, o.tags);
5991
6530
  if (!l) {
5992
6531
  if (e && typeof e.toJSON == "function" && (e = e.toJSON()), !e || typeof e != "object") {
5993
6532
  let t = new Z(e);
5994
6533
  return c && (c.node = t), t;
5995
6534
  }
5996
- l = e instanceof Map ? o[Ki] : Symbol.iterator in Object(e) ? o[Yi] : o[Ki];
6535
+ l = e instanceof Map ? o[qi] : Symbol.iterator in Object(e) ? o[Xi] : o[qi];
5997
6536
  }
5998
6537
  a && (a(l), delete n.onTagObj);
5999
6538
  let u = l?.createNode ? l.createNode(n.schema, e, n) : typeof l?.nodeClass?.from == "function" ? l.nodeClass.from(n.schema, e, n) : new Z(e);
@@ -6001,7 +6540,7 @@ function Ta(e, t, n) {
6001
6540
  }
6002
6541
  //#endregion
6003
6542
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Collection.js
6004
- function Ea(e, t, n) {
6543
+ function Da(e, t, n) {
6005
6544
  let r = n;
6006
6545
  for (let e = t.length - 1; e >= 0; --e) {
6007
6546
  let n = t[e];
@@ -6010,7 +6549,7 @@ function Ea(e, t, n) {
6010
6549
  e[n] = r, r = e;
6011
6550
  } else r = /* @__PURE__ */ new Map([[n, r]]);
6012
6551
  }
6013
- return Ta(r, void 0, {
6552
+ return Ea(r, void 0, {
6014
6553
  aliasDuplicateObjects: !1,
6015
6554
  keepUndefined: !1,
6016
6555
  onAnchor: () => {
@@ -6020,7 +6559,7 @@ function Ea(e, t, n) {
6020
6559
  sourceObjects: /* @__PURE__ */ new Map()
6021
6560
  });
6022
6561
  }
6023
- var Da = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done, Oa = class extends ya {
6562
+ var Oa = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next().done, ka = class extends ba {
6024
6563
  constructor(e, t) {
6025
6564
  super(e), Object.defineProperty(this, "schema", {
6026
6565
  value: t,
@@ -6034,11 +6573,11 @@ var Da = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next
6034
6573
  return e && (t.schema = e), t.items = t.items.map((t) => Y(t) || K(t) ? t.clone(e) : t), this.range && (t.range = this.range.slice()), t;
6035
6574
  }
6036
6575
  addIn(e, t) {
6037
- if (Da(e)) this.add(t);
6576
+ if (Oa(e)) this.add(t);
6038
6577
  else {
6039
6578
  let [n, ...r] = e, i = this.get(n, !0);
6040
6579
  if (J(i)) i.addIn(r, t);
6041
- else if (i === void 0 && this.schema) this.set(n, Ea(this.schema, r, t));
6580
+ else if (i === void 0 && this.schema) this.set(n, Da(this.schema, r, t));
6042
6581
  else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);
6043
6582
  }
6044
6583
  }
@@ -6072,16 +6611,16 @@ var Da = (e) => e == null || typeof e == "object" && !!e[Symbol.iterator]().next
6072
6611
  else {
6073
6612
  let e = this.get(n, !0);
6074
6613
  if (J(e)) e.setIn(r, t);
6075
- else if (e === void 0 && this.schema) this.set(n, Ea(this.schema, r, t));
6614
+ else if (e === void 0 && this.schema) this.set(n, Da(this.schema, r, t));
6076
6615
  else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`);
6077
6616
  }
6078
6617
  }
6079
- }, ka = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
6080
- function Aa(e, t) {
6618
+ }, Aa = (e) => e.replace(/^(?!$)(?: $)?/gm, "#");
6619
+ function ja(e, t) {
6081
6620
  return /^\n+$/.test(e) ? e.substring(1) : t ? e.replace(/^(?! *$)/gm, t) : e;
6082
6621
  }
6083
- var ja = (e, t, n) => e.endsWith("\n") ? Aa(n, t) : n.includes("\n") ? "\n" + Aa(n, t) : (e.endsWith(" ") ? "" : " ") + n, Ma = "flow", Na = "block", Pa = "quoted";
6084
- function Fa(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentWidth: a = 20, onFold: o, onOverflow: s } = {}) {
6622
+ var Ma = (e, t, n) => e.endsWith("\n") ? ja(n, t) : n.includes("\n") ? "\n" + ja(n, t) : (e.endsWith(" ") ? "" : " ") + n, Na = "flow", Pa = "block", Fa = "quoted";
6623
+ function Ia(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentWidth: a = 20, onFold: o, onOverflow: s } = {}) {
6085
6624
  if (!i || i < 0) return e;
6086
6625
  i < a && (a = 0);
6087
6626
  let c = Math.max(1 + a, 1 + i - t.length);
@@ -6089,7 +6628,7 @@ function Fa(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
6089
6628
  let l = [], u = {}, d = i - t.length;
6090
6629
  typeof r == "number" && (r > i - Math.max(2, a) ? l.push(0) : d = i - r);
6091
6630
  let f, p, m = !1, h = -1, g = -1, _ = -1;
6092
- n === "block" && (h = Ia(e, h, t.length), h !== -1 && (d = h + c));
6631
+ n === "block" && (h = La(e, h, t.length), h !== -1 && (d = h + c));
6093
6632
  for (let r; r = e[h += 1];) {
6094
6633
  if (n === "quoted" && r === "\\") {
6095
6634
  switch (g = h, e[h + 1]) {
@@ -6106,7 +6645,7 @@ function Fa(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
6106
6645
  }
6107
6646
  _ = h;
6108
6647
  }
6109
- if (r === "\n") n === "block" && (h = Ia(e, h, t.length)), d = h + t.length + c, f = void 0;
6648
+ if (r === "\n") n === "block" && (h = La(e, h, t.length)), d = h + t.length + c, f = void 0;
6110
6649
  else {
6111
6650
  if (r === " " && p && p !== " " && p !== "\n" && p !== " ") {
6112
6651
  let t = e[h + 1];
@@ -6133,7 +6672,7 @@ function Fa(e, t, n = "flow", { indentAtStart: r, lineWidth: i = 80, minContentW
6133
6672
  }
6134
6673
  return v;
6135
6674
  }
6136
- function Ia(e, t, n) {
6675
+ function La(e, t, n) {
6137
6676
  let r = t, i = t + 1, a = e[i];
6138
6677
  for (; a === " " || a === " ";) if (t < i + n) a = e[++t];
6139
6678
  else {
@@ -6146,12 +6685,12 @@ function Ia(e, t, n) {
6146
6685
  }
6147
6686
  //#endregion
6148
6687
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyString.js
6149
- var La = (e, t) => ({
6688
+ var Ra = (e, t) => ({
6150
6689
  indentAtStart: t ? e.indent.length : e.indentAtStart,
6151
6690
  lineWidth: e.options.lineWidth,
6152
6691
  minContentWidth: e.options.minContentWidth
6153
- }), Ra = (e) => /^(%|---|\.\.\.)/m.test(e);
6154
- function za(e, t, n) {
6692
+ }), za = (e) => /^(%|---|\.\.\.)/m.test(e);
6693
+ function Ba(e, t, n) {
6155
6694
  if (!t || t < 0) return !1;
6156
6695
  let r = t - n, i = e.length;
6157
6696
  if (i <= r) return !1;
@@ -6161,10 +6700,10 @@ function za(e, t, n) {
6161
6700
  }
6162
6701
  return !0;
6163
6702
  }
6164
- function Ba(e, t) {
6703
+ function Va(e, t) {
6165
6704
  let n = JSON.stringify(e);
6166
6705
  if (t.options.doubleQuotedAsJSON) return n;
6167
- let { implicitKey: r } = t, i = t.options.doubleQuotedMinMultiLineLength, a = t.indent || (Ra(e) ? " " : ""), o = "", s = 0;
6706
+ let { implicitKey: r } = t, i = t.options.doubleQuotedMinMultiLineLength, a = t.indent || (za(e) ? " " : ""), o = "", s = 0;
6168
6707
  for (let e = 0, t = n[e]; t; t = n[++e]) if (t === " " && n[e + 1] === "\\" && n[e + 2] === "n" && (o += n.slice(s, e) + "\\ ", e += 1, s = e, t = "\\"), t === "\\") switch (n[e + 1]) {
6169
6708
  case "u":
6170
6709
  {
@@ -6209,32 +6748,32 @@ function Ba(e, t) {
6209
6748
  break;
6210
6749
  default: e += 1;
6211
6750
  }
6212
- return o = s ? o + n.slice(s) : n, r ? o : Fa(o, a, Pa, La(t, !1));
6213
- }
6214
- function Va(e, t) {
6215
- if (t.options.singleQuote === !1 || t.implicitKey && e.includes("\n") || /[ \t]\n|\n[ \t]/.test(e)) return Ba(e, t);
6216
- let n = t.indent || (Ra(e) ? " " : ""), r = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&\n${n}`) + "'";
6217
- return t.implicitKey ? r : Fa(r, n, Ma, La(t, !1));
6751
+ return o = s ? o + n.slice(s) : n, r ? o : Ia(o, a, Fa, Ra(t, !1));
6218
6752
  }
6219
6753
  function Ha(e, t) {
6754
+ if (t.options.singleQuote === !1 || t.implicitKey && e.includes("\n") || /[ \t]\n|\n[ \t]/.test(e)) return Va(e, t);
6755
+ let n = t.indent || (za(e) ? " " : ""), r = "'" + e.replace(/'/g, "''").replace(/\n+/g, `$&\n${n}`) + "'";
6756
+ return t.implicitKey ? r : Ia(r, n, Na, Ra(t, !1));
6757
+ }
6758
+ function Ua(e, t) {
6220
6759
  let { singleQuote: n } = t.options, r;
6221
- if (n === !1) r = Ba;
6760
+ if (n === !1) r = Va;
6222
6761
  else {
6223
6762
  let t = e.includes("\""), i = e.includes("'");
6224
- r = t && !i ? Va : i && !t ? Ba : n ? Va : Ba;
6763
+ r = t && !i ? Ha : i && !t ? Va : n ? Ha : Va;
6225
6764
  }
6226
6765
  return r(e, t);
6227
6766
  }
6228
- var Ua;
6767
+ var Wa;
6229
6768
  try {
6230
- Ua = /* @__PURE__ */ RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
6769
+ Wa = /* @__PURE__ */ RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
6231
6770
  } catch {
6232
- Ua = /\n+(?!\n|$)/g;
6771
+ Wa = /\n+(?!\n|$)/g;
6233
6772
  }
6234
- function Wa({ comment: e, type: t, value: n }, r, i, a) {
6773
+ function Ga({ comment: e, type: t, value: n }, r, i, a) {
6235
6774
  let { blockQuote: o, commentString: s, lineWidth: c } = r.options;
6236
- if (!o || /\n[\t ]+$/.test(n)) return Ha(n, r);
6237
- let l = r.indent || (r.forceBlockIndent || Ra(n) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || t === Z.BLOCK_FOLDED ? !1 : t === Z.BLOCK_LITERAL || !za(n, c, l.length);
6775
+ if (!o || /\n[\t ]+$/.test(n)) return Ua(n, r);
6776
+ let l = r.indent || (r.forceBlockIndent || za(n) ? " " : ""), u = o === "literal" ? !0 : o === "folded" || t === Z.BLOCK_FOLDED ? !1 : t === Z.BLOCK_LITERAL || !Ba(n, c, l.length);
6238
6777
  if (!n) return u ? "|\n" : ">\n";
6239
6778
  let d, f;
6240
6779
  for (f = n.length; f > 0; --f) {
@@ -6242,7 +6781,7 @@ function Wa({ comment: e, type: t, value: n }, r, i, a) {
6242
6781
  if (e !== "\n" && e !== " " && e !== " ") break;
6243
6782
  }
6244
6783
  let p = n.substring(f), m = p.indexOf("\n");
6245
- m === -1 ? d = "-" : n === p || m !== p.length - 1 ? (d = "+", a && a()) : d = "", p &&= (n = n.slice(0, -p.length), p[p.length - 1] === "\n" && (p = p.slice(0, -1)), p.replace(Ua, `$&${l}`));
6784
+ m === -1 ? d = "-" : n === p || m !== p.length - 1 ? (d = "+", a && a()) : d = "", p &&= (n = n.slice(0, -p.length), p[p.length - 1] === "\n" && (p = p.slice(0, -1)), p.replace(Wa, `$&${l}`));
6246
6785
  let h = !1, g, _ = -1;
6247
6786
  for (g = 0; g < n.length; ++g) {
6248
6787
  let e = n[g];
@@ -6254,41 +6793,41 @@ function Wa({ comment: e, type: t, value: n }, r, i, a) {
6254
6793
  v &&= (n = n.substring(v.length), v.replace(/\n+/g, `$&${l}`));
6255
6794
  let y = (h ? l ? "2" : "1" : "") + d;
6256
6795
  if (e && (y += " " + s(e.replace(/ ?[\r\n]+/g, " ")), i && i()), !u) {
6257
- let e = n.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${l}`), i = !1, a = La(r, !0);
6796
+ let e = n.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${l}`), i = !1, a = Ra(r, !0);
6258
6797
  o !== "folded" && t !== Z.BLOCK_FOLDED && (a.onOverflow = () => {
6259
6798
  i = !0;
6260
6799
  });
6261
- let s = Fa(`${v}${e}${p}`, l, Na, a);
6800
+ let s = Ia(`${v}${e}${p}`, l, Pa, a);
6262
6801
  if (!i) return `>${y}\n${l}${s}`;
6263
6802
  }
6264
6803
  return n = n.replace(/\n+/g, `$&${l}`), `|${y}\n${l}${v}${n}${p}`;
6265
6804
  }
6266
- function Ga(e, t, n, r) {
6805
+ function Ka(e, t, n, r) {
6267
6806
  let { type: i, value: a } = e, { actualString: o, implicitKey: s, indent: c, indentStep: l, inFlow: u } = t;
6268
- if (s && a.includes("\n") || u && /[[\]{},]/.test(a)) return Ha(a, t);
6269
- if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)) return s || u || !a.includes("\n") ? Ha(a, t) : Wa(e, t, n, r);
6270
- if (!s && !u && i !== Z.PLAIN && a.includes("\n")) return Wa(e, t, n, r);
6271
- if (Ra(a)) {
6272
- if (c === "") return t.forceBlockIndent = !0, Wa(e, t, n, r);
6273
- if (s && c === l) return Ha(a, t);
6807
+ if (s && a.includes("\n") || u && /[[\]{},]/.test(a)) return Ua(a, t);
6808
+ if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a)) return s || u || !a.includes("\n") ? Ua(a, t) : Ga(e, t, n, r);
6809
+ if (!s && !u && i !== Z.PLAIN && a.includes("\n")) return Ga(e, t, n, r);
6810
+ if (za(a)) {
6811
+ if (c === "") return t.forceBlockIndent = !0, Ga(e, t, n, r);
6812
+ if (s && c === l) return Ua(a, t);
6274
6813
  }
6275
6814
  let d = a.replace(/\n+/g, `$&\n${c}`);
6276
6815
  if (o) {
6277
6816
  let e = (e) => e.default && e.tag !== "tag:yaml.org,2002:str" && e.test?.test(d), { compat: n, tags: r } = t.doc.schema;
6278
- if (r.some(e) || n?.some(e)) return Ha(a, t);
6817
+ if (r.some(e) || n?.some(e)) return Ua(a, t);
6279
6818
  }
6280
- return s ? d : Fa(d, c, Ma, La(t, !1));
6819
+ return s ? d : Ia(d, c, Na, Ra(t, !1));
6281
6820
  }
6282
- function Ka(e, t, n, r) {
6821
+ function qa(e, t, n, r) {
6283
6822
  let { implicitKey: i, inFlow: a } = t, o = typeof e.value == "string" ? e : Object.assign({}, e, { value: String(e.value) }), { type: s } = e;
6284
6823
  s !== Z.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (s = Z.QUOTE_DOUBLE);
6285
6824
  let c = (e) => {
6286
6825
  switch (e) {
6287
6826
  case Z.BLOCK_FOLDED:
6288
- case Z.BLOCK_LITERAL: return i || a ? Ha(o.value, t) : Wa(o, t, n, r);
6289
- case Z.QUOTE_DOUBLE: return Ba(o.value, t);
6290
- case Z.QUOTE_SINGLE: return Va(o.value, t);
6291
- case Z.PLAIN: return Ga(o, t, n, r);
6827
+ case Z.BLOCK_LITERAL: return i || a ? Ua(o.value, t) : Ga(o, t, n, r);
6828
+ case Z.QUOTE_DOUBLE: return Va(o.value, t);
6829
+ case Z.QUOTE_SINGLE: return Ha(o.value, t);
6830
+ case Z.PLAIN: return Ka(o, t, n, r);
6292
6831
  default: return null;
6293
6832
  }
6294
6833
  }, l = c(s);
@@ -6300,10 +6839,10 @@ function Ka(e, t, n, r) {
6300
6839
  }
6301
6840
  //#endregion
6302
6841
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringify.js
6303
- function qa(e, t) {
6842
+ function Ja(e, t) {
6304
6843
  let n = Object.assign({
6305
6844
  blockQuote: !0,
6306
- commentString: ka,
6845
+ commentString: Aa,
6307
6846
  defaultKeyType: null,
6308
6847
  defaultStringType: "PLAIN",
6309
6848
  directives: null,
@@ -6340,7 +6879,7 @@ function qa(e, t) {
6340
6879
  options: n
6341
6880
  };
6342
6881
  }
6343
- function Ja(e, t) {
6882
+ function Ya(e, t) {
6344
6883
  if (t.tag) {
6345
6884
  let n = e.filter((e) => e.tag === t.tag);
6346
6885
  if (n.length > 0) return n.find((e) => e.format === t.format) ?? n[0];
@@ -6361,30 +6900,30 @@ function Ja(e, t) {
6361
6900
  }
6362
6901
  return n;
6363
6902
  }
6364
- function Ya(e, t, { anchors: n, doc: r }) {
6903
+ function Xa(e, t, { anchors: n, doc: r }) {
6365
6904
  if (!r.directives) return "";
6366
6905
  let i = [], a = (q(e) || J(e)) && e.anchor;
6367
- a && pa(a) && (n.add(a), i.push(`&${a}`));
6906
+ a && ma(a) && (n.add(a), i.push(`&${a}`));
6368
6907
  let o = e.tag ?? (t.default ? null : t.tag);
6369
6908
  return o && i.push(r.directives.tagString(o)), i.join(" ");
6370
6909
  }
6371
- function Xa(e, t, n, r) {
6910
+ function Za(e, t, n, r) {
6372
6911
  if (K(e)) return e.toString(t, n, r);
6373
- if (Xi(e)) {
6912
+ if (Zi(e)) {
6374
6913
  if (t.doc.directives) return e.toString(t);
6375
6914
  if (t.resolvedAliases?.has(e)) throw TypeError("Cannot stringify circular structure without alias nodes");
6376
6915
  t.resolvedAliases ? t.resolvedAliases.add(e) : t.resolvedAliases = /* @__PURE__ */ new Set([e]), e = e.resolve(t.doc);
6377
6916
  }
6378
6917
  let i, a = Y(e) ? e : t.doc.createNode(e, { onTagObj: (e) => i = e });
6379
- i ??= Ja(t.doc.schema.tags, a);
6380
- let o = Ya(a, i, t);
6918
+ i ??= Ya(t.doc.schema.tags, a);
6919
+ let o = Xa(a, i, t);
6381
6920
  o.length > 0 && (t.indentAtStart = (t.indentAtStart ?? 0) + o.length + 1);
6382
- let s = typeof i.stringify == "function" ? i.stringify(a, t, n, r) : q(a) ? Ka(a, t, n, r) : a.toString(t, n, r);
6921
+ let s = typeof i.stringify == "function" ? i.stringify(a, t, n, r) : q(a) ? qa(a, t, n, r) : a.toString(t, n, r);
6383
6922
  return o ? q(a) || s[0] === "{" || s[0] === "[" ? `${o} ${s}` : `${o}\n${t.indent}${s}` : s;
6384
6923
  }
6385
6924
  //#endregion
6386
6925
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyPair.js
6387
- function Za({ key: e, value: t }, n, r, i) {
6926
+ function Qa({ key: e, value: t }, n, r, i) {
6388
6927
  let { allNullValues: a, doc: o, indent: s, indentStep: c, options: { commentString: l, indentSeq: u, simpleKeys: d } } = n, f = Y(e) && e.comment || null;
6389
6928
  if (d) {
6390
6929
  if (f) throw Error("With simple keys, key nodes cannot have comments");
@@ -6396,22 +6935,22 @@ function Za({ key: e, value: t }, n, r, i) {
6396
6935
  implicitKey: !p && (d || !a),
6397
6936
  indent: s + c
6398
6937
  });
6399
- let m = !1, h = !1, g = Xa(e, n, () => m = !0, () => h = !0);
6938
+ let m = !1, h = !1, g = Za(e, n, () => m = !0, () => h = !0);
6400
6939
  if (!p && !n.inFlow && g.length > 1024) {
6401
6940
  if (d) throw Error("With simple keys, single line scalar must not span more than 1024 characters");
6402
6941
  p = !0;
6403
6942
  }
6404
6943
  if (n.inFlow) {
6405
6944
  if (a || t == null) return m && r && r(), g === "" ? "?" : p ? `? ${g}` : g;
6406
- } else if (a && !d || t == null && p) return g = `? ${g}`, f && !m ? g += ja(g, n.indent, l(f)) : h && i && i(), g;
6407
- m && (f = null), p ? (f && (g += ja(g, n.indent, l(f))), g = `? ${g}\n${s}:`) : (g = `${g}:`, f && (g += ja(g, n.indent, l(f))));
6945
+ } else if (a && !d || t == null && p) return g = `? ${g}`, f && !m ? g += Ma(g, n.indent, l(f)) : h && i && i(), g;
6946
+ m && (f = null), p ? (f && (g += Ma(g, n.indent, l(f))), g = `? ${g}\n${s}:`) : (g = `${g}:`, f && (g += Ma(g, n.indent, l(f))));
6408
6947
  let _, v, y;
6409
- Y(t) ? (_ = !!t.spaceBefore, v = t.commentBefore, y = t.comment) : (_ = !1, v = null, y = null, t && typeof t == "object" && (t = o.createNode(t))), n.implicitKey = !1, !p && !f && q(t) && (n.indentAtStart = g.length + 1), h = !1, !u && c.length >= 2 && !n.inFlow && !p && $i(t) && !t.flow && !t.tag && !t.anchor && (n.indent = n.indent.substring(2));
6410
- let b = !1, x = Xa(t, n, () => b = !0, () => h = !0), S = " ";
6948
+ Y(t) ? (_ = !!t.spaceBefore, v = t.commentBefore, y = t.comment) : (_ = !1, v = null, y = null, t && typeof t == "object" && (t = o.createNode(t))), n.implicitKey = !1, !p && !f && q(t) && (n.indentAtStart = g.length + 1), h = !1, !u && c.length >= 2 && !n.inFlow && !p && ea(t) && !t.flow && !t.tag && !t.anchor && (n.indent = n.indent.substring(2));
6949
+ let b = !1, x = Za(t, n, () => b = !0, () => h = !0), S = " ";
6411
6950
  if (f || _ || v) {
6412
6951
  if (S = _ ? "\n" : "", v) {
6413
6952
  let e = l(v);
6414
- S += `\n${Aa(e, n.indent)}`;
6953
+ S += `\n${ja(e, n.indent)}`;
6415
6954
  }
6416
6955
  x === "" && !n.inFlow ? S === "\n" && y && (S = "\n\n") : S += `\n${n.indent}`;
6417
6956
  } else if (!p && J(t)) {
@@ -6425,32 +6964,32 @@ function Za({ key: e, value: t }, n, r, i) {
6425
6964
  t || (S = `\n${n.indent}`);
6426
6965
  }
6427
6966
  } else (x === "" || x[0] === "\n") && (S = "");
6428
- return g += S + x, n.inFlow ? b && r && r() : y && !b ? g += ja(g, n.indent, l(y)) : h && i && i(), g;
6967
+ return g += S + x, n.inFlow ? b && r && r() : y && !b ? g += Ma(g, n.indent, l(y)) : h && i && i(), g;
6429
6968
  }
6430
6969
  //#endregion
6431
6970
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/log.js
6432
- function Qa(e, t) {
6971
+ function $a(e, t) {
6433
6972
  (e === "debug" || e === "warn") && console.warn(t);
6434
6973
  }
6435
6974
  //#endregion
6436
6975
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js
6437
- var $a = "<<", eo = {
6438
- identify: (e) => e === $a || typeof e == "symbol" && e.description === $a,
6976
+ var eo = "<<", to = {
6977
+ identify: (e) => e === eo || typeof e == "symbol" && e.description === eo,
6439
6978
  default: "key",
6440
6979
  tag: "tag:yaml.org,2002:merge",
6441
6980
  test: /^<<$/,
6442
- resolve: () => Object.assign(new Z(Symbol($a)), { addToJSMap: no }),
6443
- stringify: () => $a
6444
- }, to = (e, t) => (eo.identify(t) || q(t) && (!t.type || t.type === Z.PLAIN) && eo.identify(t.value)) && e?.doc.schema.tags.some((e) => e.tag === eo.tag && e.default);
6445
- function no(e, t, n) {
6446
- let r = io(e, n);
6447
- if ($i(r)) for (let n of r.items) ro(e, t, n);
6448
- else if (Array.isArray(r)) for (let n of r) ro(e, t, n);
6449
- else ro(e, t, r);
6450
- }
6981
+ resolve: () => Object.assign(new Z(Symbol(eo)), { addToJSMap: ro }),
6982
+ stringify: () => eo
6983
+ }, no = (e, t) => (to.identify(t) || q(t) && (!t.type || t.type === Z.PLAIN) && to.identify(t.value)) && e?.doc.schema.tags.some((e) => e.tag === to.tag && e.default);
6451
6984
  function ro(e, t, n) {
6452
- let r = io(e, n);
6453
- if (!Qi(r)) throw Error("Merge sources must be maps or map aliases");
6985
+ let r = ao(e, n);
6986
+ if (ea(r)) for (let n of r.items) io(e, t, n);
6987
+ else if (Array.isArray(r)) for (let n of r) io(e, t, n);
6988
+ else io(e, t, r);
6989
+ }
6990
+ function io(e, t, n) {
6991
+ let r = ao(e, n);
6992
+ if (!$i(r)) throw Error("Merge sources must be maps or map aliases");
6454
6993
  let i = r.toJSON(null, e, Map);
6455
6994
  for (let [e, n] of i) t instanceof Map ? t.has(e) || t.set(e, n) : t instanceof Set ? t.add(e) : Object.prototype.hasOwnProperty.call(t, e) || Object.defineProperty(t, e, {
6456
6995
  value: n,
@@ -6460,20 +6999,20 @@ function ro(e, t, n) {
6460
6999
  });
6461
7000
  return t;
6462
7001
  }
6463
- function io(e, t) {
6464
- return e && Xi(t) ? t.resolve(e.doc, e) : t;
7002
+ function ao(e, t) {
7003
+ return e && Zi(t) ? t.resolve(e.doc, e) : t;
6465
7004
  }
6466
7005
  //#endregion
6467
7006
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js
6468
- function ao(e, t, { key: n, value: r }) {
7007
+ function oo(e, t, { key: n, value: r }) {
6469
7008
  if (Y(n) && n.addToJSMap) n.addToJSMap(e, t, r);
6470
- else if (to(e, n)) no(e, t, r);
7009
+ else if (no(e, n)) ro(e, t, r);
6471
7010
  else {
6472
- let i = va(n, "", e);
6473
- if (t instanceof Map) t.set(i, va(r, i, e));
7011
+ let i = ya(n, "", e);
7012
+ if (t instanceof Map) t.set(i, ya(r, i, e));
6474
7013
  else if (t instanceof Set) t.add(i);
6475
7014
  else {
6476
- let a = oo(n, i, e), o = va(r, a, e);
7015
+ let a = so(n, i, e), o = ya(r, a, e);
6477
7016
  a in t ? Object.defineProperty(t, a, {
6478
7017
  value: o,
6479
7018
  writable: !0,
@@ -6484,18 +7023,18 @@ function ao(e, t, { key: n, value: r }) {
6484
7023
  }
6485
7024
  return t;
6486
7025
  }
6487
- function oo(e, t, n) {
7026
+ function so(e, t, n) {
6488
7027
  if (t === null) return "";
6489
7028
  if (typeof t != "object") return String(t);
6490
7029
  if (Y(e) && n?.doc) {
6491
- let t = qa(n.doc, {});
7030
+ let t = Ja(n.doc, {});
6492
7031
  t.anchors = /* @__PURE__ */ new Set();
6493
7032
  for (let e of n.anchors.keys()) t.anchors.add(e.anchor);
6494
7033
  t.inFlow = !0, t.inStringifyKey = !0;
6495
7034
  let r = e.toString(t);
6496
7035
  if (!n.mapKeyWarned) {
6497
7036
  let e = JSON.stringify(r);
6498
- e.length > 40 && (e = e.substring(0, 36) + "...\""), Qa(n.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`), n.mapKeyWarned = !0;
7037
+ e.length > 40 && (e = e.substring(0, 36) + "...\""), $a(n.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`), n.mapKeyWarned = !0;
6499
7038
  }
6500
7039
  return r;
6501
7040
  }
@@ -6503,44 +7042,44 @@ function oo(e, t, n) {
6503
7042
  }
6504
7043
  //#endregion
6505
7044
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/Pair.js
6506
- function so(e, t, n) {
6507
- return new Q(Ta(e, void 0, n), Ta(t, void 0, n));
7045
+ function co(e, t, n) {
7046
+ return new Q(Ea(e, void 0, n), Ea(t, void 0, n));
6508
7047
  }
6509
7048
  var Q = class e {
6510
7049
  constructor(e, t = null) {
6511
- Object.defineProperty(this, G, { value: qi }), this.key = e, this.value = t;
7050
+ Object.defineProperty(this, G, { value: Ji }), this.key = e, this.value = t;
6512
7051
  }
6513
7052
  clone(t) {
6514
7053
  let { key: n, value: r } = this;
6515
7054
  return Y(n) && (n = n.clone(t)), Y(r) && (r = r.clone(t)), new e(n, r);
6516
7055
  }
6517
7056
  toJSON(e, t) {
6518
- return ao(t, t?.mapAsMap ? /* @__PURE__ */ new Map() : {}, this);
7057
+ return oo(t, t?.mapAsMap ? /* @__PURE__ */ new Map() : {}, this);
6519
7058
  }
6520
7059
  toString(e, t, n) {
6521
- return e?.doc ? Za(this, e, t, n) : JSON.stringify(this);
7060
+ return e?.doc ? Qa(this, e, t, n) : JSON.stringify(this);
6522
7061
  }
6523
7062
  };
6524
7063
  //#endregion
6525
7064
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyCollection.js
6526
- function co(e, t, n) {
6527
- return (t.inFlow ?? e.flow ? uo : lo)(e, t, n);
7065
+ function lo(e, t, n) {
7066
+ return (t.inFlow ?? e.flow ? fo : uo)(e, t, n);
6528
7067
  }
6529
- function lo({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, itemIndent: a, onChompKeep: o, onComment: s }) {
7068
+ function uo({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, itemIndent: a, onChompKeep: o, onComment: s }) {
6530
7069
  let { indent: c, options: { commentString: l } } = n, u = Object.assign({}, n, {
6531
7070
  indent: a,
6532
7071
  type: null
6533
7072
  }), d = !1, f = [];
6534
7073
  for (let e = 0; e < t.length; ++e) {
6535
7074
  let i = t[e], o = null;
6536
- if (Y(i)) !d && i.spaceBefore && f.push(""), fo(n, f, i.commentBefore, d), i.comment && (o = i.comment);
7075
+ if (Y(i)) !d && i.spaceBefore && f.push(""), po(n, f, i.commentBefore, d), i.comment && (o = i.comment);
6537
7076
  else if (K(i)) {
6538
7077
  let e = Y(i.key) ? i.key : null;
6539
- e && (!d && e.spaceBefore && f.push(""), fo(n, f, e.commentBefore, d));
7078
+ e && (!d && e.spaceBefore && f.push(""), po(n, f, e.commentBefore, d));
6540
7079
  }
6541
7080
  d = !1;
6542
- let s = Xa(i, u, () => o = null, () => d = !0);
6543
- o && (s += ja(s, a, l(o))), d && o && (d = !1), f.push(r + s);
7081
+ let s = Za(i, u, () => o = null, () => d = !0);
7082
+ o && (s += Ma(s, a, l(o))), d && o && (d = !1), f.push(r + s);
6544
7083
  }
6545
7084
  let p;
6546
7085
  if (f.length === 0) p = i.start + i.end;
@@ -6551,9 +7090,9 @@ function lo({ comment: e, items: t }, n, { blockItemPrefix: r, flowChars: i, ite
6551
7090
  p += t ? `\n${c}${t}` : "\n";
6552
7091
  }
6553
7092
  }
6554
- return e ? (p += "\n" + Aa(l(e), c), s && s()) : d && o && o(), p;
7093
+ return e ? (p += "\n" + ja(l(e), c), s && s()) : d && o && o(), p;
6555
7094
  }
6556
- function uo({ items: e }, t, { flowChars: n, itemIndent: r }) {
7095
+ function fo({ items: e }, t, { flowChars: n, itemIndent: r }) {
6557
7096
  let { indent: i, indentStep: a, flowCollectionPadding: o, options: { commentString: s } } = t;
6558
7097
  r += a;
6559
7098
  let c = Object.assign({}, t, {
@@ -6563,16 +7102,16 @@ function uo({ items: e }, t, { flowChars: n, itemIndent: r }) {
6563
7102
  }), l = !1, u = 0, d = [];
6564
7103
  for (let n = 0; n < e.length; ++n) {
6565
7104
  let i = e[n], a = null;
6566
- if (Y(i)) i.spaceBefore && d.push(""), fo(t, d, i.commentBefore, !1), i.comment && (a = i.comment);
7105
+ if (Y(i)) i.spaceBefore && d.push(""), po(t, d, i.commentBefore, !1), i.comment && (a = i.comment);
6567
7106
  else if (K(i)) {
6568
7107
  let e = Y(i.key) ? i.key : null;
6569
- e && (e.spaceBefore && d.push(""), fo(t, d, e.commentBefore, !1), e.comment && (l = !0));
7108
+ e && (e.spaceBefore && d.push(""), po(t, d, e.commentBefore, !1), e.comment && (l = !0));
6570
7109
  let n = Y(i.value) ? i.value : null;
6571
7110
  n ? (n.comment && (a = n.comment), n.commentBefore && (l = !0)) : i.value == null && e?.comment && (a = e.comment);
6572
7111
  }
6573
7112
  a && (l = !0);
6574
- let o = Xa(i, c, () => a = null);
6575
- l ||= d.length > u || o.includes("\n"), n < e.length - 1 ? o += "," : t.options.trailingComma && (t.options.lineWidth > 0 && (l ||= d.reduce((e, t) => e + t.length + 2, 2) + (o.length + 2) > t.options.lineWidth), l && (o += ",")), a && (o += ja(o, r, s(a))), d.push(o), u = d.length;
7113
+ let o = Za(i, c, () => a = null);
7114
+ l ||= d.length > u || o.includes("\n"), n < e.length - 1 ? o += "," : t.options.trailingComma && (t.options.lineWidth > 0 && (l ||= d.reduce((e, t) => e + t.length + 2, 2) + (o.length + 2) > t.options.lineWidth), l && (o += ",")), a && (o += Ma(o, r, s(a))), d.push(o), u = d.length;
6576
7115
  }
6577
7116
  let { start: f, end: p } = n;
6578
7117
  if (d.length === 0) return f + p;
@@ -6587,30 +7126,30 @@ function uo({ items: e }, t, { flowChars: n, itemIndent: r }) {
6587
7126
  }
6588
7127
  return `${f}${o}${d.join(" ")}${o}${p}`;
6589
7128
  }
6590
- function fo({ indent: e, options: { commentString: t } }, n, r, i) {
7129
+ function po({ indent: e, options: { commentString: t } }, n, r, i) {
6591
7130
  if (r && i && (r = r.replace(/^\n+/, "")), r) {
6592
- let i = Aa(t(r), e);
7131
+ let i = ja(t(r), e);
6593
7132
  n.push(i.trimStart());
6594
7133
  }
6595
7134
  }
6596
7135
  //#endregion
6597
7136
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/nodes/YAMLMap.js
6598
- function po(e, t) {
7137
+ function mo(e, t) {
6599
7138
  let n = q(t) ? t.value : t;
6600
7139
  for (let r of e) if (K(r) && (r.key === t || r.key === n || q(r.key) && r.key.value === n)) return r;
6601
7140
  }
6602
- var $ = class extends Oa {
7141
+ var $ = class extends ka {
6603
7142
  static get tagName() {
6604
7143
  return "tag:yaml.org,2002:map";
6605
7144
  }
6606
7145
  constructor(e) {
6607
- super(Ki, e), this.items = [];
7146
+ super(qi, e), this.items = [];
6608
7147
  }
6609
7148
  static from(e, t, n) {
6610
7149
  let { keepUndefined: r, replacer: i } = n, a = new this(e), o = (e, o) => {
6611
7150
  if (typeof i == "function") o = i.call(t, e, o);
6612
7151
  else if (Array.isArray(i) && !i.includes(e)) return;
6613
- (o !== void 0 || r) && a.items.push(so(e, o, n));
7152
+ (o !== void 0 || r) && a.items.push(co(e, o, n));
6614
7153
  };
6615
7154
  if (t instanceof Map) for (let [e, n] of t) o(e, n);
6616
7155
  else if (t && typeof t == "object") for (let e of Object.keys(t)) o(e, t[e]);
@@ -6619,25 +7158,25 @@ var $ = class extends Oa {
6619
7158
  add(e, t) {
6620
7159
  let n;
6621
7160
  n = K(e) ? e : !e || typeof e != "object" || !("key" in e) ? new Q(e, e?.value) : new Q(e.key, e.value);
6622
- let r = po(this.items, n.key), i = this.schema?.sortMapEntries;
7161
+ let r = mo(this.items, n.key), i = this.schema?.sortMapEntries;
6623
7162
  if (r) {
6624
7163
  if (!t) throw Error(`Key ${n.key} already set`);
6625
- q(r.value) && Sa(n.value) ? r.value.value = n.value : r.value = n.value;
7164
+ q(r.value) && Ca(n.value) ? r.value.value = n.value : r.value = n.value;
6626
7165
  } else if (i) {
6627
7166
  let e = this.items.findIndex((e) => i(n, e) < 0);
6628
7167
  e === -1 ? this.items.push(n) : this.items.splice(e, 0, n);
6629
7168
  } else this.items.push(n);
6630
7169
  }
6631
7170
  delete(e) {
6632
- let t = po(this.items, e);
7171
+ let t = mo(this.items, e);
6633
7172
  return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
6634
7173
  }
6635
7174
  get(e, t) {
6636
- let n = po(this.items, e)?.value;
7175
+ let n = mo(this.items, e)?.value;
6637
7176
  return (!t && q(n) ? n.value : n) ?? void 0;
6638
7177
  }
6639
7178
  has(e) {
6640
- return !!po(this.items, e);
7179
+ return !!mo(this.items, e);
6641
7180
  }
6642
7181
  set(e, t) {
6643
7182
  this.add(new Q(e, t), !0);
@@ -6645,13 +7184,13 @@ var $ = class extends Oa {
6645
7184
  toJSON(e, t, n) {
6646
7185
  let r = n ? new n() : t?.mapAsMap ? /* @__PURE__ */ new Map() : {};
6647
7186
  t?.onCreate && t.onCreate(r);
6648
- for (let e of this.items) ao(t, r, e);
7187
+ for (let e of this.items) oo(t, r, e);
6649
7188
  return r;
6650
7189
  }
6651
7190
  toString(e, t, n) {
6652
7191
  if (!e) return JSON.stringify(this);
6653
7192
  for (let e of this.items) if (!K(e)) throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);
6654
- return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), co(this, e, {
7193
+ return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), lo(this, e, {
6655
7194
  blockItemPrefix: "",
6656
7195
  flowChars: {
6657
7196
  start: "{",
@@ -6662,54 +7201,54 @@ var $ = class extends Oa {
6662
7201
  onComment: t
6663
7202
  });
6664
7203
  }
6665
- }, mo = {
7204
+ }, ho = {
6666
7205
  collection: "map",
6667
7206
  default: !0,
6668
7207
  nodeClass: $,
6669
7208
  tag: "tag:yaml.org,2002:map",
6670
7209
  resolve(e, t) {
6671
- return Qi(e) || t("Expected a mapping for this tag"), e;
7210
+ return $i(e) || t("Expected a mapping for this tag"), e;
6672
7211
  },
6673
7212
  createNode: (e, t, n) => $.from(e, t, n)
6674
- }, ho = class extends Oa {
7213
+ }, go = class extends ka {
6675
7214
  static get tagName() {
6676
7215
  return "tag:yaml.org,2002:seq";
6677
7216
  }
6678
7217
  constructor(e) {
6679
- super(Yi, e), this.items = [];
7218
+ super(Xi, e), this.items = [];
6680
7219
  }
6681
7220
  add(e) {
6682
7221
  this.items.push(e);
6683
7222
  }
6684
7223
  delete(e) {
6685
- let t = go(e);
7224
+ let t = _o(e);
6686
7225
  return typeof t == "number" && this.items.splice(t, 1).length > 0;
6687
7226
  }
6688
7227
  get(e, t) {
6689
- let n = go(e);
7228
+ let n = _o(e);
6690
7229
  if (typeof n != "number") return;
6691
7230
  let r = this.items[n];
6692
7231
  return !t && q(r) ? r.value : r;
6693
7232
  }
6694
7233
  has(e) {
6695
- let t = go(e);
7234
+ let t = _o(e);
6696
7235
  return typeof t == "number" && t < this.items.length;
6697
7236
  }
6698
7237
  set(e, t) {
6699
- let n = go(e);
7238
+ let n = _o(e);
6700
7239
  if (typeof n != "number") throw Error(`Expected a valid index, not ${e}.`);
6701
7240
  let r = this.items[n];
6702
- q(r) && Sa(t) ? r.value = t : this.items[n] = t;
7241
+ q(r) && Ca(t) ? r.value = t : this.items[n] = t;
6703
7242
  }
6704
7243
  toJSON(e, t) {
6705
7244
  let n = [];
6706
7245
  t?.onCreate && t.onCreate(n);
6707
7246
  let r = 0;
6708
- for (let e of this.items) n.push(va(e, String(r++), t));
7247
+ for (let e of this.items) n.push(ya(e, String(r++), t));
6709
7248
  return n;
6710
7249
  }
6711
7250
  toString(e, t, n) {
6712
- return e ? co(this, e, {
7251
+ return e ? lo(this, e, {
6713
7252
  blockItemPrefix: "- ",
6714
7253
  flowChars: {
6715
7254
  start: "[",
@@ -6729,56 +7268,56 @@ var $ = class extends Oa {
6729
7268
  let n = t instanceof Set ? a : String(e++);
6730
7269
  a = r.call(t, n, a);
6731
7270
  }
6732
- i.items.push(Ta(a, void 0, n));
7271
+ i.items.push(Ea(a, void 0, n));
6733
7272
  }
6734
7273
  }
6735
7274
  return i;
6736
7275
  }
6737
7276
  };
6738
- function go(e) {
7277
+ function _o(e) {
6739
7278
  let t = q(e) ? e.value : e;
6740
7279
  return t && typeof t == "string" && (t = Number(t)), typeof t == "number" && Number.isInteger(t) && t >= 0 ? t : null;
6741
7280
  }
6742
7281
  //#endregion
6743
7282
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/common/seq.js
6744
- var _o = {
7283
+ var vo = {
6745
7284
  collection: "seq",
6746
7285
  default: !0,
6747
- nodeClass: ho,
7286
+ nodeClass: go,
6748
7287
  tag: "tag:yaml.org,2002:seq",
6749
7288
  resolve(e, t) {
6750
- return $i(e) || t("Expected a sequence for this tag"), e;
7289
+ return ea(e) || t("Expected a sequence for this tag"), e;
6751
7290
  },
6752
- createNode: (e, t, n) => ho.from(e, t, n)
6753
- }, vo = {
7291
+ createNode: (e, t, n) => go.from(e, t, n)
7292
+ }, yo = {
6754
7293
  identify: (e) => typeof e == "string",
6755
7294
  default: !0,
6756
7295
  tag: "tag:yaml.org,2002:str",
6757
7296
  resolve: (e) => e,
6758
7297
  stringify(e, t, n, r) {
6759
- return t = Object.assign({ actualString: !0 }, t), Ka(e, t, n, r);
7298
+ return t = Object.assign({ actualString: !0 }, t), qa(e, t, n, r);
6760
7299
  }
6761
- }, yo = {
7300
+ }, bo = {
6762
7301
  identify: (e) => e == null,
6763
7302
  createNode: () => new Z(null),
6764
7303
  default: !0,
6765
7304
  tag: "tag:yaml.org,2002:null",
6766
7305
  test: /^(?:~|[Nn]ull|NULL)?$/,
6767
7306
  resolve: () => new Z(null),
6768
- stringify: ({ source: e }, t) => typeof e == "string" && yo.test.test(e) ? e : t.options.nullStr
6769
- }, bo = {
7307
+ stringify: ({ source: e }, t) => typeof e == "string" && bo.test.test(e) ? e : t.options.nullStr
7308
+ }, xo = {
6770
7309
  identify: (e) => typeof e == "boolean",
6771
7310
  default: !0,
6772
7311
  tag: "tag:yaml.org,2002:bool",
6773
7312
  test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
6774
7313
  resolve: (e) => new Z(e[0] === "t" || e[0] === "T"),
6775
7314
  stringify({ source: e, value: t }, n) {
6776
- return e && bo.test.test(e) && t === (e[0] === "t" || e[0] === "T") ? e : t ? n.options.trueStr : n.options.falseStr;
7315
+ return e && xo.test.test(e) && t === (e[0] === "t" || e[0] === "T") ? e : t ? n.options.trueStr : n.options.falseStr;
6777
7316
  }
6778
7317
  };
6779
7318
  //#endregion
6780
7319
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyNumber.js
6781
- function xo({ format: e, minFractionDigits: t, tag: n, value: r }) {
7320
+ function So({ format: e, minFractionDigits: t, tag: n, value: r }) {
6782
7321
  if (typeof r == "bigint") return String(r);
6783
7322
  let i = typeof r == "number" ? r : Number(r);
6784
7323
  if (!isFinite(i)) return isNaN(i) ? ".nan" : i < 0 ? "-.inf" : ".inf";
@@ -6793,14 +7332,14 @@ function xo({ format: e, minFractionDigits: t, tag: n, value: r }) {
6793
7332
  }
6794
7333
  //#endregion
6795
7334
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/core/float.js
6796
- var So = {
7335
+ var Co = {
6797
7336
  identify: (e) => typeof e == "number",
6798
7337
  default: !0,
6799
7338
  tag: "tag:yaml.org,2002:float",
6800
7339
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
6801
7340
  resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
6802
- stringify: xo
6803
- }, Co = {
7341
+ stringify: So
7342
+ }, wo = {
6804
7343
  identify: (e) => typeof e == "number",
6805
7344
  default: !0,
6806
7345
  tag: "tag:yaml.org,2002:float",
@@ -6809,9 +7348,9 @@ var So = {
6809
7348
  resolve: (e) => parseFloat(e),
6810
7349
  stringify(e) {
6811
7350
  let t = Number(e.value);
6812
- return isFinite(t) ? t.toExponential() : xo(e);
7351
+ return isFinite(t) ? t.toExponential() : So(e);
6813
7352
  }
6814
- }, wo = {
7353
+ }, To = {
6815
7354
  identify: (e) => typeof e == "number",
6816
7355
  default: !0,
6817
7356
  tag: "tag:yaml.org,2002:float",
@@ -6820,60 +7359,60 @@ var So = {
6820
7359
  let t = new Z(parseFloat(e)), n = e.indexOf(".");
6821
7360
  return n !== -1 && e[e.length - 1] === "0" && (t.minFractionDigits = e.length - n - 1), t;
6822
7361
  },
6823
- stringify: xo
6824
- }, To = (e) => typeof e == "bigint" || Number.isInteger(e), Eo = (e, t, n, { intAsBigInt: r }) => r ? BigInt(e) : parseInt(e.substring(t), n);
6825
- function Do(e, t, n) {
7362
+ stringify: So
7363
+ }, Eo = (e) => typeof e == "bigint" || Number.isInteger(e), Do = (e, t, n, { intAsBigInt: r }) => r ? BigInt(e) : parseInt(e.substring(t), n);
7364
+ function Oo(e, t, n) {
6826
7365
  let { value: r } = e;
6827
- return To(r) && r >= 0 ? n + r.toString(t) : xo(e);
7366
+ return Eo(r) && r >= 0 ? n + r.toString(t) : So(e);
6828
7367
  }
6829
- var Oo = {
6830
- identify: (e) => To(e) && e >= 0,
7368
+ var ko = {
7369
+ identify: (e) => Eo(e) && e >= 0,
6831
7370
  default: !0,
6832
7371
  tag: "tag:yaml.org,2002:int",
6833
7372
  format: "OCT",
6834
7373
  test: /^0o[0-7]+$/,
6835
- resolve: (e, t, n) => Eo(e, 2, 8, n),
6836
- stringify: (e) => Do(e, 8, "0o")
6837
- }, ko = {
6838
- identify: To,
7374
+ resolve: (e, t, n) => Do(e, 2, 8, n),
7375
+ stringify: (e) => Oo(e, 8, "0o")
7376
+ }, Ao = {
7377
+ identify: Eo,
6839
7378
  default: !0,
6840
7379
  tag: "tag:yaml.org,2002:int",
6841
7380
  test: /^[-+]?[0-9]+$/,
6842
- resolve: (e, t, n) => Eo(e, 0, 10, n),
6843
- stringify: xo
6844
- }, Ao = {
6845
- identify: (e) => To(e) && e >= 0,
7381
+ resolve: (e, t, n) => Do(e, 0, 10, n),
7382
+ stringify: So
7383
+ }, jo = {
7384
+ identify: (e) => Eo(e) && e >= 0,
6846
7385
  default: !0,
6847
7386
  tag: "tag:yaml.org,2002:int",
6848
7387
  format: "HEX",
6849
7388
  test: /^0x[0-9a-fA-F]+$/,
6850
- resolve: (e, t, n) => Eo(e, 2, 16, n),
6851
- stringify: (e) => Do(e, 16, "0x")
6852
- }, jo = [
6853
- mo,
6854
- _o,
7389
+ resolve: (e, t, n) => Do(e, 2, 16, n),
7390
+ stringify: (e) => Oo(e, 16, "0x")
7391
+ }, Mo = [
7392
+ ho,
6855
7393
  vo,
6856
7394
  yo,
6857
7395
  bo,
6858
- Oo,
7396
+ xo,
6859
7397
  ko,
6860
7398
  Ao,
6861
- So,
7399
+ jo,
6862
7400
  Co,
6863
- wo
7401
+ wo,
7402
+ To
6864
7403
  ];
6865
7404
  //#endregion
6866
7405
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/json/schema.js
6867
- function Mo(e) {
7406
+ function No(e) {
6868
7407
  return typeof e == "bigint" || Number.isInteger(e);
6869
7408
  }
6870
- var No = ({ value: e }) => JSON.stringify(e), Po = [
7409
+ var Po = ({ value: e }) => JSON.stringify(e), Fo = [
6871
7410
  {
6872
7411
  identify: (e) => typeof e == "string",
6873
7412
  default: !0,
6874
7413
  tag: "tag:yaml.org,2002:str",
6875
7414
  resolve: (e) => e,
6876
- stringify: No
7415
+ stringify: Po
6877
7416
  },
6878
7417
  {
6879
7418
  identify: (e) => e == null,
@@ -6882,7 +7421,7 @@ var No = ({ value: e }) => JSON.stringify(e), Po = [
6882
7421
  tag: "tag:yaml.org,2002:null",
6883
7422
  test: /^null$/,
6884
7423
  resolve: () => null,
6885
- stringify: No
7424
+ stringify: Po
6886
7425
  },
6887
7426
  {
6888
7427
  identify: (e) => typeof e == "boolean",
@@ -6890,15 +7429,15 @@ var No = ({ value: e }) => JSON.stringify(e), Po = [
6890
7429
  tag: "tag:yaml.org,2002:bool",
6891
7430
  test: /^true$|^false$/,
6892
7431
  resolve: (e) => e === "true",
6893
- stringify: No
7432
+ stringify: Po
6894
7433
  },
6895
7434
  {
6896
- identify: Mo,
7435
+ identify: No,
6897
7436
  default: !0,
6898
7437
  tag: "tag:yaml.org,2002:int",
6899
7438
  test: /^-?(?:0|[1-9][0-9]*)$/,
6900
7439
  resolve: (e, t, { intAsBigInt: n }) => n ? BigInt(e) : parseInt(e, 10),
6901
- stringify: ({ value: e }) => Mo(e) ? e.toString() : JSON.stringify(e)
7440
+ stringify: ({ value: e }) => No(e) ? e.toString() : JSON.stringify(e)
6902
7441
  },
6903
7442
  {
6904
7443
  identify: (e) => typeof e == "number",
@@ -6906,16 +7445,16 @@ var No = ({ value: e }) => JSON.stringify(e), Po = [
6906
7445
  tag: "tag:yaml.org,2002:float",
6907
7446
  test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
6908
7447
  resolve: (e) => parseFloat(e),
6909
- stringify: No
7448
+ stringify: Po
6910
7449
  }
6911
- ], Fo = [mo, _o].concat(Po, {
7450
+ ], Io = [ho, vo].concat(Fo, {
6912
7451
  default: !0,
6913
7452
  tag: "",
6914
7453
  test: /^/,
6915
7454
  resolve(e, t) {
6916
7455
  return t(`Unresolved plain scalar ${JSON.stringify(e)}`), e;
6917
7456
  }
6918
- }), Io = {
7457
+ }), Lo = {
6919
7458
  identify: (e) => e instanceof Uint8Array,
6920
7459
  default: !1,
6921
7460
  tag: "tag:yaml.org,2002:binary",
@@ -6940,7 +7479,7 @@ var No = ({ value: e }) => JSON.stringify(e), Po = [
6940
7479
  for (let t = 0, r = 0; t < n; ++t, r += e) i[t] = s.substr(r, e);
6941
7480
  s = i.join(t === Z.BLOCK_LITERAL ? "\n" : " ");
6942
7481
  }
6943
- return Ka({
7482
+ return qa({
6944
7483
  comment: e,
6945
7484
  type: t,
6946
7485
  value: s
@@ -6949,11 +7488,11 @@ var No = ({ value: e }) => JSON.stringify(e), Po = [
6949
7488
  };
6950
7489
  //#endregion
6951
7490
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js
6952
- function Lo(e, t) {
6953
- if ($i(e)) for (let n = 0; n < e.items.length; ++n) {
7491
+ function Ro(e, t) {
7492
+ if (ea(e)) for (let n = 0; n < e.items.length; ++n) {
6954
7493
  let r = e.items[n];
6955
7494
  if (!K(r)) {
6956
- if (Qi(r)) {
7495
+ if ($i(r)) {
6957
7496
  r.items.length > 1 && t("Each pair must have its own sequence indicator");
6958
7497
  let e = r.items[0] || new Q(new Z(null));
6959
7498
  if (r.commentBefore && (e.key.commentBefore = e.key.commentBefore ? `${r.commentBefore}\n${e.key.commentBefore}` : r.commentBefore), r.comment) {
@@ -6968,8 +7507,8 @@ function Lo(e, t) {
6968
7507
  else t("Expected a sequence for this tag");
6969
7508
  return e;
6970
7509
  }
6971
- function Ro(e, t, n) {
6972
- let { replacer: r } = n, i = new ho(e);
7510
+ function zo(e, t, n) {
7511
+ let { replacer: r } = n, i = new go(e);
6973
7512
  i.tag = "tag:yaml.org,2002:pairs";
6974
7513
  let a = 0;
6975
7514
  if (t && Symbol.iterator in Object(t)) for (let e of t) {
@@ -6983,17 +7522,17 @@ function Ro(e, t, n) {
6983
7522
  if (t.length === 1) o = t[0], s = e[o];
6984
7523
  else throw TypeError(`Expected tuple with one key, not ${t.length} keys`);
6985
7524
  } else o = e;
6986
- i.items.push(so(o, s, n));
7525
+ i.items.push(co(o, s, n));
6987
7526
  }
6988
7527
  return i;
6989
7528
  }
6990
- var zo = {
7529
+ var Bo = {
6991
7530
  collection: "seq",
6992
7531
  default: !1,
6993
7532
  tag: "tag:yaml.org,2002:pairs",
6994
- resolve: Lo,
6995
- createNode: Ro
6996
- }, Bo = class e extends ho {
7533
+ resolve: Ro,
7534
+ createNode: zo
7535
+ }, Vo = class e extends go {
6997
7536
  constructor() {
6998
7537
  super(), this.add = $.prototype.add.bind(this), this.delete = $.prototype.delete.bind(this), this.get = $.prototype.get.bind(this), this.has = $.prototype.has.bind(this), this.set = $.prototype.set.bind(this), this.tag = e.tag;
6999
7538
  }
@@ -7003,57 +7542,57 @@ var zo = {
7003
7542
  t?.onCreate && t.onCreate(n);
7004
7543
  for (let e of this.items) {
7005
7544
  let r, i;
7006
- if (K(e) ? (r = va(e.key, "", t), i = va(e.value, r, t)) : r = va(e, "", t), n.has(r)) throw Error("Ordered maps must not include duplicate keys");
7545
+ if (K(e) ? (r = ya(e.key, "", t), i = ya(e.value, r, t)) : r = ya(e, "", t), n.has(r)) throw Error("Ordered maps must not include duplicate keys");
7007
7546
  n.set(r, i);
7008
7547
  }
7009
7548
  return n;
7010
7549
  }
7011
7550
  static from(e, t, n) {
7012
- let r = Ro(e, t, n), i = new this();
7551
+ let r = zo(e, t, n), i = new this();
7013
7552
  return i.items = r.items, i;
7014
7553
  }
7015
7554
  };
7016
- Bo.tag = "tag:yaml.org,2002:omap";
7017
- var Vo = {
7555
+ Vo.tag = "tag:yaml.org,2002:omap";
7556
+ var Ho = {
7018
7557
  collection: "seq",
7019
7558
  identify: (e) => e instanceof Map,
7020
- nodeClass: Bo,
7559
+ nodeClass: Vo,
7021
7560
  default: !1,
7022
7561
  tag: "tag:yaml.org,2002:omap",
7023
7562
  resolve(e, t) {
7024
- let n = Lo(e, t), r = [];
7563
+ let n = Ro(e, t), r = [];
7025
7564
  for (let { key: e } of n.items) q(e) && (r.includes(e.value) ? t(`Ordered maps must not include duplicate keys: ${e.value}`) : r.push(e.value));
7026
- return Object.assign(new Bo(), n);
7565
+ return Object.assign(new Vo(), n);
7027
7566
  },
7028
- createNode: (e, t, n) => Bo.from(e, t, n)
7567
+ createNode: (e, t, n) => Vo.from(e, t, n)
7029
7568
  };
7030
7569
  //#endregion
7031
7570
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js
7032
- function Ho({ value: e, source: t }, n) {
7033
- return t && (e ? Uo : Wo).test.test(t) ? t : e ? n.options.trueStr : n.options.falseStr;
7571
+ function Uo({ value: e, source: t }, n) {
7572
+ return t && (e ? Wo : Go).test.test(t) ? t : e ? n.options.trueStr : n.options.falseStr;
7034
7573
  }
7035
- var Uo = {
7574
+ var Wo = {
7036
7575
  identify: (e) => e === !0,
7037
7576
  default: !0,
7038
7577
  tag: "tag:yaml.org,2002:bool",
7039
7578
  test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
7040
7579
  resolve: () => new Z(!0),
7041
- stringify: Ho
7042
- }, Wo = {
7580
+ stringify: Uo
7581
+ }, Go = {
7043
7582
  identify: (e) => e === !1,
7044
7583
  default: !0,
7045
7584
  tag: "tag:yaml.org,2002:bool",
7046
7585
  test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
7047
7586
  resolve: () => new Z(!1),
7048
- stringify: Ho
7049
- }, Go = {
7587
+ stringify: Uo
7588
+ }, Ko = {
7050
7589
  identify: (e) => typeof e == "number",
7051
7590
  default: !0,
7052
7591
  tag: "tag:yaml.org,2002:float",
7053
7592
  test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
7054
7593
  resolve: (e) => e.slice(-3).toLowerCase() === "nan" ? NaN : e[0] === "-" ? -Infinity : Infinity,
7055
- stringify: xo
7056
- }, Ko = {
7594
+ stringify: So
7595
+ }, qo = {
7057
7596
  identify: (e) => typeof e == "number",
7058
7597
  default: !0,
7059
7598
  tag: "tag:yaml.org,2002:float",
@@ -7062,9 +7601,9 @@ var Uo = {
7062
7601
  resolve: (e) => parseFloat(e.replace(/_/g, "")),
7063
7602
  stringify(e) {
7064
7603
  let t = Number(e.value);
7065
- return isFinite(t) ? t.toExponential() : xo(e);
7604
+ return isFinite(t) ? t.toExponential() : So(e);
7066
7605
  }
7067
- }, qo = {
7606
+ }, Jo = {
7068
7607
  identify: (e) => typeof e == "number",
7069
7608
  default: !0,
7070
7609
  tag: "tag:yaml.org,2002:float",
@@ -7077,9 +7616,9 @@ var Uo = {
7077
7616
  }
7078
7617
  return t;
7079
7618
  },
7080
- stringify: xo
7081
- }, Jo = (e) => typeof e == "bigint" || Number.isInteger(e);
7082
- function Yo(e, t, n, { intAsBigInt: r }) {
7619
+ stringify: So
7620
+ }, Yo = (e) => typeof e == "bigint" || Number.isInteger(e);
7621
+ function Xo(e, t, n, { intAsBigInt: r }) {
7083
7622
  let i = e[0];
7084
7623
  if ((i === "-" || i === "+") && (t += 1), e = e.substring(t).replace(/_/g, ""), r) {
7085
7624
  switch (n) {
@@ -7097,60 +7636,60 @@ function Yo(e, t, n, { intAsBigInt: r }) {
7097
7636
  let a = parseInt(e, n);
7098
7637
  return i === "-" ? -1 * a : a;
7099
7638
  }
7100
- function Xo(e, t, n) {
7639
+ function Zo(e, t, n) {
7101
7640
  let { value: r } = e;
7102
- if (Jo(r)) {
7641
+ if (Yo(r)) {
7103
7642
  let e = r.toString(t);
7104
7643
  return r < 0 ? "-" + n + e.substr(1) : n + e;
7105
7644
  }
7106
- return xo(e);
7645
+ return So(e);
7107
7646
  }
7108
- var Zo = {
7109
- identify: Jo,
7647
+ var Qo = {
7648
+ identify: Yo,
7110
7649
  default: !0,
7111
7650
  tag: "tag:yaml.org,2002:int",
7112
7651
  format: "BIN",
7113
7652
  test: /^[-+]?0b[0-1_]+$/,
7114
- resolve: (e, t, n) => Yo(e, 2, 2, n),
7115
- stringify: (e) => Xo(e, 2, "0b")
7116
- }, Qo = {
7117
- identify: Jo,
7653
+ resolve: (e, t, n) => Xo(e, 2, 2, n),
7654
+ stringify: (e) => Zo(e, 2, "0b")
7655
+ }, $o = {
7656
+ identify: Yo,
7118
7657
  default: !0,
7119
7658
  tag: "tag:yaml.org,2002:int",
7120
7659
  format: "OCT",
7121
7660
  test: /^[-+]?0[0-7_]+$/,
7122
- resolve: (e, t, n) => Yo(e, 1, 8, n),
7123
- stringify: (e) => Xo(e, 8, "0")
7124
- }, $o = {
7125
- identify: Jo,
7661
+ resolve: (e, t, n) => Xo(e, 1, 8, n),
7662
+ stringify: (e) => Zo(e, 8, "0")
7663
+ }, es = {
7664
+ identify: Yo,
7126
7665
  default: !0,
7127
7666
  tag: "tag:yaml.org,2002:int",
7128
7667
  test: /^[-+]?[0-9][0-9_]*$/,
7129
- resolve: (e, t, n) => Yo(e, 0, 10, n),
7130
- stringify: xo
7131
- }, es = {
7132
- identify: Jo,
7668
+ resolve: (e, t, n) => Xo(e, 0, 10, n),
7669
+ stringify: So
7670
+ }, ts = {
7671
+ identify: Yo,
7133
7672
  default: !0,
7134
7673
  tag: "tag:yaml.org,2002:int",
7135
7674
  format: "HEX",
7136
7675
  test: /^[-+]?0x[0-9a-fA-F_]+$/,
7137
- resolve: (e, t, n) => Yo(e, 2, 16, n),
7138
- stringify: (e) => Xo(e, 16, "0x")
7139
- }, ts = class e extends $ {
7676
+ resolve: (e, t, n) => Xo(e, 2, 16, n),
7677
+ stringify: (e) => Zo(e, 16, "0x")
7678
+ }, ns = class e extends $ {
7140
7679
  constructor(t) {
7141
7680
  super(t), this.tag = e.tag;
7142
7681
  }
7143
7682
  add(e) {
7144
7683
  let t;
7145
- t = K(e) ? e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? new Q(e.key, null) : new Q(e, null), po(this.items, t.key) || this.items.push(t);
7684
+ t = K(e) ? e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? new Q(e.key, null) : new Q(e, null), mo(this.items, t.key) || this.items.push(t);
7146
7685
  }
7147
7686
  get(e, t) {
7148
- let n = po(this.items, e);
7687
+ let n = mo(this.items, e);
7149
7688
  return !t && K(n) ? q(n.key) ? n.key.value : n.key : n;
7150
7689
  }
7151
7690
  set(e, t) {
7152
7691
  if (typeof t != "boolean") throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);
7153
- let n = po(this.items, e);
7692
+ let n = mo(this.items, e);
7154
7693
  n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new Q(e));
7155
7694
  }
7156
7695
  toJSON(e, t) {
@@ -7163,21 +7702,21 @@ var Zo = {
7163
7702
  }
7164
7703
  static from(e, t, n) {
7165
7704
  let { replacer: r } = n, i = new this(e);
7166
- if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push(so(e, null, n));
7705
+ if (t && Symbol.iterator in Object(t)) for (let e of t) typeof r == "function" && (e = r.call(t, e, e)), i.items.push(co(e, null, n));
7167
7706
  return i;
7168
7707
  }
7169
7708
  };
7170
- ts.tag = "tag:yaml.org,2002:set";
7171
- var ns = {
7709
+ ns.tag = "tag:yaml.org,2002:set";
7710
+ var rs = {
7172
7711
  collection: "map",
7173
7712
  identify: (e) => e instanceof Set,
7174
- nodeClass: ts,
7713
+ nodeClass: ns,
7175
7714
  default: !1,
7176
7715
  tag: "tag:yaml.org,2002:set",
7177
- createNode: (e, t, n) => ts.from(e, t, n),
7716
+ createNode: (e, t, n) => ns.from(e, t, n),
7178
7717
  resolve(e, t) {
7179
- if (Qi(e)) {
7180
- if (e.hasAllNullValues(!0)) return Object.assign(new ts(), e);
7718
+ if ($i(e)) {
7719
+ if (e.hasAllNullValues(!0)) return Object.assign(new ns(), e);
7181
7720
  t("Set items must all have null values");
7182
7721
  } else t("Expected a mapping for this tag");
7183
7722
  return e;
@@ -7185,127 +7724,127 @@ var ns = {
7185
7724
  };
7186
7725
  //#endregion
7187
7726
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js
7188
- function rs(e, t) {
7727
+ function is(e, t) {
7189
7728
  let n = e[0], r = n === "-" || n === "+" ? e.substring(1) : e, i = (e) => t ? BigInt(e) : Number(e), a = r.replace(/_/g, "").split(":").reduce((e, t) => e * i(60) + i(t), i(0));
7190
7729
  return n === "-" ? i(-1) * a : a;
7191
7730
  }
7192
- function is(e) {
7731
+ function as(e) {
7193
7732
  let { value: t } = e, n = (e) => e;
7194
7733
  if (typeof t == "bigint") n = (e) => BigInt(e);
7195
- else if (isNaN(t) || !isFinite(t)) return xo(e);
7734
+ else if (isNaN(t) || !isFinite(t)) return So(e);
7196
7735
  let r = "";
7197
7736
  t < 0 && (r = "-", t *= n(-1));
7198
7737
  let i = n(60), a = [t % i];
7199
7738
  return t < 60 ? a.unshift(0) : (t = (t - a[0]) / i, a.unshift(t % i), t >= 60 && (t = (t - a[0]) / i, a.unshift(t))), r + a.map((e) => String(e).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
7200
7739
  }
7201
- var as = {
7740
+ var os = {
7202
7741
  identify: (e) => typeof e == "bigint" || Number.isInteger(e),
7203
7742
  default: !0,
7204
7743
  tag: "tag:yaml.org,2002:int",
7205
7744
  format: "TIME",
7206
7745
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
7207
- resolve: (e, t, { intAsBigInt: n }) => rs(e, n),
7208
- stringify: is
7209
- }, os = {
7746
+ resolve: (e, t, { intAsBigInt: n }) => is(e, n),
7747
+ stringify: as
7748
+ }, ss = {
7210
7749
  identify: (e) => typeof e == "number",
7211
7750
  default: !0,
7212
7751
  tag: "tag:yaml.org,2002:float",
7213
7752
  format: "TIME",
7214
7753
  test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
7215
- resolve: (e) => rs(e, !1),
7216
- stringify: is
7217
- }, ss = {
7754
+ resolve: (e) => is(e, !1),
7755
+ stringify: as
7756
+ }, cs = {
7218
7757
  identify: (e) => e instanceof Date,
7219
7758
  default: !0,
7220
7759
  tag: "tag:yaml.org,2002:timestamp",
7221
7760
  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})?))?)?$"),
7222
7761
  resolve(e) {
7223
- let t = e.match(ss.test);
7762
+ let t = e.match(cs.test);
7224
7763
  if (!t) throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");
7225
7764
  let [, n, r, i, a, o, s] = t.map(Number), c = t[7] ? Number((t[7] + "00").substr(1, 3)) : 0, l = Date.UTC(n, r - 1, i, a || 0, o || 0, s || 0, c), u = t[8];
7226
7765
  if (u && u !== "Z") {
7227
- let e = rs(u, !1);
7766
+ let e = is(u, !1);
7228
7767
  Math.abs(e) < 30 && (e *= 60), l -= 6e4 * e;
7229
7768
  }
7230
7769
  return new Date(l);
7231
7770
  },
7232
7771
  stringify: ({ value: e }) => e?.toISOString().replace(/(T00:00:00)?\.000Z$/, "") ?? ""
7233
- }, cs = [
7234
- mo,
7235
- _o,
7772
+ }, ls = [
7773
+ ho,
7236
7774
  vo,
7237
7775
  yo,
7238
- Uo,
7776
+ bo,
7239
7777
  Wo,
7240
- Zo,
7778
+ Go,
7241
7779
  Qo,
7242
7780
  $o,
7243
7781
  es,
7244
- Go,
7782
+ ts,
7245
7783
  Ko,
7246
7784
  qo,
7247
- Io,
7248
- eo,
7249
- Vo,
7250
- zo,
7251
- ns,
7252
- as,
7785
+ Jo,
7786
+ Lo,
7787
+ to,
7788
+ Ho,
7789
+ Bo,
7790
+ rs,
7253
7791
  os,
7254
- ss
7255
- ], ls = /* @__PURE__ */ new Map([
7256
- ["core", jo],
7792
+ ss,
7793
+ cs
7794
+ ], us = /* @__PURE__ */ new Map([
7795
+ ["core", Mo],
7257
7796
  ["failsafe", [
7258
- mo,
7259
- _o,
7260
- vo
7797
+ ho,
7798
+ vo,
7799
+ yo
7261
7800
  ]],
7262
- ["json", Fo],
7263
- ["yaml11", cs],
7264
- ["yaml-1.1", cs]
7265
- ]), us = {
7266
- binary: Io,
7267
- bool: bo,
7268
- float: wo,
7269
- floatExp: Co,
7270
- floatNaN: So,
7271
- floatTime: os,
7272
- int: ko,
7273
- intHex: Ao,
7274
- intOct: Oo,
7275
- intTime: as,
7276
- map: mo,
7277
- merge: eo,
7278
- null: yo,
7279
- omap: Vo,
7280
- pairs: zo,
7281
- seq: _o,
7282
- set: ns,
7283
- timestamp: ss
7284
- }, ds = {
7285
- "tag:yaml.org,2002:binary": Io,
7286
- "tag:yaml.org,2002:merge": eo,
7287
- "tag:yaml.org,2002:omap": Vo,
7288
- "tag:yaml.org,2002:pairs": zo,
7289
- "tag:yaml.org,2002:set": ns,
7290
- "tag:yaml.org,2002:timestamp": ss
7801
+ ["json", Io],
7802
+ ["yaml11", ls],
7803
+ ["yaml-1.1", ls]
7804
+ ]), ds = {
7805
+ binary: Lo,
7806
+ bool: xo,
7807
+ float: To,
7808
+ floatExp: wo,
7809
+ floatNaN: Co,
7810
+ floatTime: ss,
7811
+ int: Ao,
7812
+ intHex: jo,
7813
+ intOct: ko,
7814
+ intTime: os,
7815
+ map: ho,
7816
+ merge: to,
7817
+ null: bo,
7818
+ omap: Ho,
7819
+ pairs: Bo,
7820
+ seq: vo,
7821
+ set: rs,
7822
+ timestamp: cs
7823
+ }, fs = {
7824
+ "tag:yaml.org,2002:binary": Lo,
7825
+ "tag:yaml.org,2002:merge": to,
7826
+ "tag:yaml.org,2002:omap": Ho,
7827
+ "tag:yaml.org,2002:pairs": Bo,
7828
+ "tag:yaml.org,2002:set": rs,
7829
+ "tag:yaml.org,2002:timestamp": cs
7291
7830
  };
7292
- function fs(e, t, n) {
7293
- let r = ls.get(t);
7294
- if (r && !e) return n && !r.includes(eo) ? r.concat(eo) : r.slice();
7831
+ function ps(e, t, n) {
7832
+ let r = us.get(t);
7833
+ if (r && !e) return n && !r.includes(to) ? r.concat(to) : r.slice();
7295
7834
  let i = r;
7296
7835
  if (!i) {
7297
7836
  if (Array.isArray(e)) i = [];
7298
7837
  else {
7299
- let e = Array.from(ls.keys()).filter((e) => e !== "yaml11").map((e) => JSON.stringify(e)).join(", ");
7838
+ let e = Array.from(us.keys()).filter((e) => e !== "yaml11").map((e) => JSON.stringify(e)).join(", ");
7300
7839
  throw Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`);
7301
7840
  }
7302
7841
  }
7303
7842
  if (Array.isArray(e)) for (let t of e) i = i.concat(t);
7304
7843
  else typeof e == "function" && (i = e(i.slice()));
7305
- return n && (i = i.concat(eo)), i.reduce((e, t) => {
7306
- let n = typeof t == "string" ? us[t] : t;
7844
+ return n && (i = i.concat(to)), i.reduce((e, t) => {
7845
+ let n = typeof t == "string" ? ds[t] : t;
7307
7846
  if (!n) {
7308
- let e = JSON.stringify(t), n = Object.keys(us).map((e) => JSON.stringify(e)).join(", ");
7847
+ let e = JSON.stringify(t), n = Object.keys(ds).map((e) => JSON.stringify(e)).join(", ");
7309
7848
  throw Error(`Unknown custom tag ${e}; use one of ${n}`);
7310
7849
  }
7311
7850
  return e.includes(n) || e.push(n), e;
@@ -7313,9 +7852,9 @@ function fs(e, t, n) {
7313
7852
  }
7314
7853
  //#endregion
7315
7854
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/schema/Schema.js
7316
- var ps = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), ms = class e {
7855
+ var ms = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), hs = class e {
7317
7856
  constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: r, schema: i, sortMapEntries: a, toStringDefaults: o }) {
7318
- this.compat = Array.isArray(e) ? fs(e, "compat") : e ? fs(null, e) : null, this.name = typeof i == "string" && i || "core", this.knownTags = r ? ds : {}, this.tags = fs(t, this.name, n), this.toStringOptions = o ?? null, Object.defineProperty(this, Ki, { value: mo }), Object.defineProperty(this, Ji, { value: vo }), Object.defineProperty(this, Yi, { value: _o }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? ps : null;
7857
+ this.compat = Array.isArray(e) ? ps(e, "compat") : e ? ps(null, e) : null, this.name = typeof i == "string" && i || "core", this.knownTags = r ? fs : {}, this.tags = ps(t, this.name, n), this.toStringOptions = o ?? null, Object.defineProperty(this, qi, { value: ho }), Object.defineProperty(this, Yi, { value: yo }), Object.defineProperty(this, Xi, { value: vo }), this.sortMapEntries = typeof a == "function" ? a : a === !0 ? ms : null;
7319
7858
  }
7320
7859
  clone() {
7321
7860
  let t = Object.create(e.prototype, Object.getOwnPropertyDescriptors(this));
@@ -7324,47 +7863,47 @@ var ps = (e, t) => e.key < t.key ? -1 : +(e.key > t.key), ms = class e {
7324
7863
  };
7325
7864
  //#endregion
7326
7865
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/stringify/stringifyDocument.js
7327
- function hs(e, t) {
7866
+ function gs(e, t) {
7328
7867
  let n = [], r = t.directives === !0;
7329
7868
  if (t.directives !== !1 && e.directives) {
7330
7869
  let t = e.directives.toString(e);
7331
7870
  t ? (n.push(t), r = !0) : e.directives.docStart && (r = !0);
7332
7871
  }
7333
7872
  r && n.push("---");
7334
- let i = qa(e, t), { commentString: a } = i.options;
7873
+ let i = Ja(e, t), { commentString: a } = i.options;
7335
7874
  if (e.commentBefore) {
7336
7875
  n.length !== 1 && n.unshift("");
7337
7876
  let t = a(e.commentBefore);
7338
- n.unshift(Aa(t, ""));
7877
+ n.unshift(ja(t, ""));
7339
7878
  }
7340
7879
  let o = !1, s = null;
7341
7880
  if (e.contents) {
7342
7881
  if (Y(e.contents)) {
7343
7882
  if (e.contents.spaceBefore && r && n.push(""), e.contents.commentBefore) {
7344
7883
  let t = a(e.contents.commentBefore);
7345
- n.push(Aa(t, ""));
7884
+ n.push(ja(t, ""));
7346
7885
  }
7347
7886
  i.forceBlockIndent = !!e.comment, s = e.contents.comment;
7348
7887
  }
7349
- let t = s ? void 0 : () => o = !0, c = Xa(e.contents, i, () => s = null, t);
7350
- s && (c += ja(c, "", a(s))), (c[0] === "|" || c[0] === ">") && n[n.length - 1] === "---" ? n[n.length - 1] = `--- ${c}` : n.push(c);
7351
- } else n.push(Xa(e.contents, i));
7888
+ let t = s ? void 0 : () => o = !0, c = Za(e.contents, i, () => s = null, t);
7889
+ s && (c += Ma(c, "", a(s))), (c[0] === "|" || c[0] === ">") && n[n.length - 1] === "---" ? n[n.length - 1] = `--- ${c}` : n.push(c);
7890
+ } else n.push(Za(e.contents, i));
7352
7891
  if (e.directives?.docEnd) {
7353
7892
  if (e.comment) {
7354
7893
  let t = a(e.comment);
7355
- t.includes("\n") ? (n.push("..."), n.push(Aa(t, ""))) : n.push(`... ${t}`);
7894
+ t.includes("\n") ? (n.push("..."), n.push(ja(t, ""))) : n.push(`... ${t}`);
7356
7895
  } else n.push("...");
7357
7896
  } else {
7358
7897
  let t = e.comment;
7359
- t && o && (t = t.replace(/^\n+/, "")), t && ((!o || s) && n[n.length - 1] !== "" && n.push(""), n.push(Aa(a(t), "")));
7898
+ t && o && (t = t.replace(/^\n+/, "")), t && ((!o || s) && n[n.length - 1] !== "" && n.push(""), n.push(ja(a(t), "")));
7360
7899
  }
7361
7900
  return n.join("\n") + "\n";
7362
7901
  }
7363
7902
  //#endregion
7364
7903
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/doc/Document.js
7365
- var gs = class e {
7904
+ var _s = class e {
7366
7905
  constructor(e, t, n) {
7367
- this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, G, { value: Gi });
7906
+ this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, G, { value: Ki });
7368
7907
  let r = null;
7369
7908
  typeof t == "function" || Array.isArray(t) ? r = t : n === void 0 && t && (n = t, t = void 0);
7370
7909
  let i = Object.assign({
@@ -7379,24 +7918,24 @@ var gs = class e {
7379
7918
  }, n);
7380
7919
  this.options = i;
7381
7920
  let { version: a } = i;
7382
- n?._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (a = this.directives.yaml.version)) : this.directives = new fa({ version: a }), this.setSchema(a, n), this.contents = e === void 0 ? null : this.createNode(e, r, n);
7921
+ n?._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (a = this.directives.yaml.version)) : this.directives = new pa({ version: a }), this.setSchema(a, n), this.contents = e === void 0 ? null : this.createNode(e, r, n);
7383
7922
  }
7384
7923
  clone() {
7385
- let t = Object.create(e.prototype, { [G]: { value: Gi } });
7924
+ let t = Object.create(e.prototype, { [G]: { value: Ki } });
7386
7925
  return t.commentBefore = this.commentBefore, t.comment = this.comment, t.errors = this.errors.slice(), t.warnings = this.warnings.slice(), t.options = Object.assign({}, this.options), this.directives && (t.directives = this.directives.clone()), t.schema = this.schema.clone(), t.contents = Y(this.contents) ? this.contents.clone(t.schema) : this.contents, this.range && (t.range = this.range.slice()), t;
7387
7926
  }
7388
7927
  add(e) {
7389
- _s(this.contents) && this.contents.add(e);
7928
+ vs(this.contents) && this.contents.add(e);
7390
7929
  }
7391
7930
  addIn(e, t) {
7392
- _s(this.contents) && this.contents.addIn(e, t);
7931
+ vs(this.contents) && this.contents.addIn(e, t);
7393
7932
  }
7394
7933
  createAlias(e, t) {
7395
7934
  if (!e.anchor) {
7396
- let n = ma(this);
7397
- e.anchor = !t || n.has(t) ? ha(t || "a", n) : t;
7935
+ let n = ha(this);
7936
+ e.anchor = !t || n.has(t) ? ga(t || "a", n) : t;
7398
7937
  }
7399
- return new ba(e.anchor);
7938
+ return new xa(e.anchor);
7400
7939
  }
7401
7940
  createNode(e, t, n) {
7402
7941
  let r;
@@ -7405,7 +7944,7 @@ var gs = class e {
7405
7944
  let e = t.filter((e) => typeof e == "number" || e instanceof String || e instanceof Number).map(String);
7406
7945
  e.length > 0 && (t = t.concat(e)), r = t;
7407
7946
  } else n === void 0 && t && (n = t, t = void 0);
7408
- let { aliasDuplicateObjects: i, anchorPrefix: a, flow: o, keepUndefined: s, onTagObj: c, tag: l } = n ?? {}, { onAnchor: u, setAnchors: d, sourceObjects: f } = ga(this, a || "a"), p = {
7947
+ let { aliasDuplicateObjects: i, anchorPrefix: a, flow: o, keepUndefined: s, onTagObj: c, tag: l } = n ?? {}, { onAnchor: u, setAnchors: d, sourceObjects: f } = _a(this, a || "a"), p = {
7409
7948
  aliasDuplicateObjects: i ?? !0,
7410
7949
  keepUndefined: s ?? !1,
7411
7950
  onAnchor: u,
@@ -7413,49 +7952,49 @@ var gs = class e {
7413
7952
  replacer: r,
7414
7953
  schema: this.schema,
7415
7954
  sourceObjects: f
7416
- }, m = Ta(e, l, p);
7955
+ }, m = Ea(e, l, p);
7417
7956
  return o && J(m) && (m.flow = !0), d(), m;
7418
7957
  }
7419
7958
  createPair(e, t, n = {}) {
7420
7959
  return new Q(this.createNode(e, null, n), this.createNode(t, null, n));
7421
7960
  }
7422
7961
  delete(e) {
7423
- return _s(this.contents) ? this.contents.delete(e) : !1;
7962
+ return vs(this.contents) ? this.contents.delete(e) : !1;
7424
7963
  }
7425
7964
  deleteIn(e) {
7426
- return Da(e) ? this.contents != null && (this.contents = null, !0) : _s(this.contents) ? this.contents.deleteIn(e) : !1;
7965
+ return Oa(e) ? this.contents != null && (this.contents = null, !0) : vs(this.contents) ? this.contents.deleteIn(e) : !1;
7427
7966
  }
7428
7967
  get(e, t) {
7429
7968
  return J(this.contents) ? this.contents.get(e, t) : void 0;
7430
7969
  }
7431
7970
  getIn(e, t) {
7432
- return Da(e) ? !t && q(this.contents) ? this.contents.value : this.contents : J(this.contents) ? this.contents.getIn(e, t) : void 0;
7971
+ return Oa(e) ? !t && q(this.contents) ? this.contents.value : this.contents : J(this.contents) ? this.contents.getIn(e, t) : void 0;
7433
7972
  }
7434
7973
  has(e) {
7435
7974
  return J(this.contents) ? this.contents.has(e) : !1;
7436
7975
  }
7437
7976
  hasIn(e) {
7438
- return Da(e) ? this.contents !== void 0 : J(this.contents) ? this.contents.hasIn(e) : !1;
7977
+ return Oa(e) ? this.contents !== void 0 : J(this.contents) ? this.contents.hasIn(e) : !1;
7439
7978
  }
7440
7979
  set(e, t) {
7441
- this.contents == null ? this.contents = Ea(this.schema, [e], t) : _s(this.contents) && this.contents.set(e, t);
7980
+ this.contents == null ? this.contents = Da(this.schema, [e], t) : vs(this.contents) && this.contents.set(e, t);
7442
7981
  }
7443
7982
  setIn(e, t) {
7444
- Da(e) ? this.contents = t : this.contents == null ? this.contents = Ea(this.schema, Array.from(e), t) : _s(this.contents) && this.contents.setIn(e, t);
7983
+ Oa(e) ? this.contents = t : this.contents == null ? this.contents = Da(this.schema, Array.from(e), t) : vs(this.contents) && this.contents.setIn(e, t);
7445
7984
  }
7446
7985
  setSchema(e, t = {}) {
7447
7986
  typeof e == "number" && (e = String(e));
7448
7987
  let n;
7449
7988
  switch (e) {
7450
7989
  case "1.1":
7451
- this.directives ? this.directives.yaml.version = "1.1" : this.directives = new fa({ version: "1.1" }), n = {
7990
+ this.directives ? this.directives.yaml.version = "1.1" : this.directives = new pa({ version: "1.1" }), n = {
7452
7991
  resolveKnownTags: !1,
7453
7992
  schema: "yaml-1.1"
7454
7993
  };
7455
7994
  break;
7456
7995
  case "1.2":
7457
7996
  case "next":
7458
- this.directives ? this.directives.yaml.version = e : this.directives = new fa({ version: e }), n = {
7997
+ this.directives ? this.directives.yaml.version = e : this.directives = new pa({ version: e }), n = {
7459
7998
  resolveKnownTags: !0,
7460
7999
  schema: "core"
7461
8000
  };
@@ -7469,7 +8008,7 @@ var gs = class e {
7469
8008
  }
7470
8009
  }
7471
8010
  if (t.schema instanceof Object) this.schema = t.schema;
7472
- else if (n) this.schema = new ms(Object.assign(n, t));
8011
+ else if (n) this.schema = new hs(Object.assign(n, t));
7473
8012
  else throw Error("With a null YAML version, the { schema: Schema } option is required");
7474
8013
  }
7475
8014
  toJS({ json: e, jsonArg: t, mapAsMap: n, maxAliasCount: r, onAnchor: i, reviver: a } = {}) {
@@ -7480,9 +8019,9 @@ var gs = class e {
7480
8019
  mapAsMap: n === !0,
7481
8020
  mapKeyWarned: !1,
7482
8021
  maxAliasCount: typeof r == "number" ? r : 100
7483
- }, s = va(this.contents, t ?? "", o);
8022
+ }, s = ya(this.contents, t ?? "", o);
7484
8023
  if (typeof i == "function") for (let { count: e, res: t } of o.anchors.values()) i(t, e);
7485
- return typeof a == "function" ? _a(a, { "": s }, "", s) : s;
8024
+ return typeof a == "function" ? va(a, { "": s }, "", s) : s;
7486
8025
  }
7487
8026
  toJSON(e, t) {
7488
8027
  return this.toJS({
@@ -7498,28 +8037,28 @@ var gs = class e {
7498
8037
  let t = JSON.stringify(e.indent);
7499
8038
  throw Error(`"indent" option must be a positive integer, not ${t}`);
7500
8039
  }
7501
- return hs(this, e);
8040
+ return gs(this, e);
7502
8041
  }
7503
8042
  };
7504
- function _s(e) {
8043
+ function vs(e) {
7505
8044
  if (J(e)) return !0;
7506
8045
  throw Error("Expected a YAML collection as document contents");
7507
8046
  }
7508
8047
  //#endregion
7509
8048
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/errors.js
7510
- var vs = class extends Error {
8049
+ var ys = class extends Error {
7511
8050
  constructor(e, t, n, r) {
7512
8051
  super(), this.name = e, this.code = n, this.message = r, this.pos = t;
7513
8052
  }
7514
- }, ys = class extends vs {
8053
+ }, bs = class extends ys {
7515
8054
  constructor(e, t, n) {
7516
8055
  super("YAMLParseError", e, t, n);
7517
8056
  }
7518
- }, bs = class extends vs {
8057
+ }, xs = class extends ys {
7519
8058
  constructor(e, t, n) {
7520
8059
  super("YAMLWarning", e, t, n);
7521
8060
  }
7522
- }, xs = (e, t) => (n) => {
8061
+ }, Ss = (e, t) => (n) => {
7523
8062
  if (n.pos[0] === -1) return;
7524
8063
  n.linePos = n.pos.map((e) => t.linePos(e));
7525
8064
  let { line: r, col: i } = n.linePos[0];
@@ -7542,7 +8081,7 @@ var vs = class extends Error {
7542
8081
  };
7543
8082
  //#endregion
7544
8083
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-props.js
7545
- function Ss(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIndent: o, startOnNewline: s }) {
8084
+ function Cs(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIndent: o, startOnNewline: s }) {
7546
8085
  let c = !1, l = s, u = s, d = "", f = "", p = !1, m = !1, h = null, g = null, _ = null, v = null, y = null, b = null, x = null;
7547
8086
  for (let i of e) switch (m &&= (i.type !== "space" && i.type !== "newline" && i.type !== "comma" && a(i.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), !1), h &&= (l && i.type !== "comment" && i.type !== "newline" && a(h, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), null), i.type) {
7548
8087
  case "space":
@@ -7588,7 +8127,7 @@ function Ss(e, { flow: t, indicator: n, next: r, offset: i, onError: a, parentIn
7588
8127
  }
7589
8128
  //#endregion
7590
8129
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-contains-newline.js
7591
- function Cs(e) {
8130
+ function ws(e) {
7592
8131
  if (!e) return null;
7593
8132
  switch (e.type) {
7594
8133
  case "alias":
@@ -7606,7 +8145,7 @@ function Cs(e) {
7606
8145
  if (t.sep) {
7607
8146
  for (let e of t.sep) if (e.type === "newline") return !0;
7608
8147
  }
7609
- if (Cs(t.key) || Cs(t.value)) return !0;
8148
+ if (ws(t.key) || ws(t.value)) return !0;
7610
8149
  }
7611
8150
  return !1;
7612
8151
  default: return !0;
@@ -7614,15 +8153,15 @@ function Cs(e) {
7614
8153
  }
7615
8154
  //#endregion
7616
8155
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js
7617
- function ws(e, t, n) {
8156
+ function Ts(e, t, n) {
7618
8157
  if (t?.type === "flow-collection") {
7619
8158
  let r = t.end[0];
7620
- r.indent === e && (r.source === "]" || r.source === "}") && Cs(t) && n(r, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
8159
+ r.indent === e && (r.source === "]" || r.source === "}") && ws(t) && n(r, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
7621
8160
  }
7622
8161
  }
7623
8162
  //#endregion
7624
8163
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-map-includes.js
7625
- function Ts(e, t, n) {
8164
+ function Es(e, t, n) {
7626
8165
  let { uniqueKeys: r } = e.options;
7627
8166
  if (r === !1) return !1;
7628
8167
  let i = typeof r == "function" ? r : (e, t) => e === t || q(e) && q(t) && e.value === t.value;
@@ -7630,13 +8169,13 @@ function Ts(e, t, n) {
7630
8169
  }
7631
8170
  //#endregion
7632
8171
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-map.js
7633
- var Es = "All mapping items must start at the same column";
7634
- function Ds({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
8172
+ var Ds = "All mapping items must start at the same column";
8173
+ function Os({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
7635
8174
  let o = new ((a?.nodeClass) ?? $)(n.schema);
7636
8175
  n.atRoot &&= !1;
7637
8176
  let s = r.offset, c = null;
7638
8177
  for (let a of r.items) {
7639
- let { start: l, key: u, sep: d, value: f } = a, p = Ss(l, {
8178
+ let { start: l, key: u, sep: d, value: f } = a, p = Cs(l, {
7640
8179
  indicator: "explicit-key-ind",
7641
8180
  next: u ?? d?.[0],
7642
8181
  offset: s,
@@ -7645,16 +8184,16 @@ function Ds({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
7645
8184
  startOnNewline: !0
7646
8185
  }), m = !p.found;
7647
8186
  if (m) {
7648
- if (u && (u.type === "block-seq" ? i(s, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== r.indent && i(s, "BAD_INDENT", Es)), !p.anchor && !p.tag && !d) {
8187
+ if (u && (u.type === "block-seq" ? i(s, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in u && u.indent !== r.indent && i(s, "BAD_INDENT", Ds)), !p.anchor && !p.tag && !d) {
7649
8188
  c = p.end, p.comment && (o.comment ? o.comment += "\n" + p.comment : o.comment = p.comment);
7650
8189
  continue;
7651
8190
  }
7652
- (p.newlineAfterProp || Cs(u)) && i(u ?? l[l.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
7653
- } else p.found?.indent !== r.indent && i(s, "BAD_INDENT", Es);
8191
+ (p.newlineAfterProp || ws(u)) && i(u ?? l[l.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
8192
+ } else p.found?.indent !== r.indent && i(s, "BAD_INDENT", Ds);
7654
8193
  n.atKey = !0;
7655
8194
  let h = p.end, g = u ? e(n, u, p, i) : t(n, h, l, null, p, i);
7656
- n.schema.compat && ws(r.indent, u, i), n.atKey = !1, Ts(n, o.items, g) && i(h, "DUPLICATE_KEY", "Map keys must be unique");
7657
- let _ = Ss(d ?? [], {
8195
+ n.schema.compat && Ts(r.indent, u, i), n.atKey = !1, Es(n, o.items, g) && i(h, "DUPLICATE_KEY", "Map keys must be unique");
8196
+ let _ = Cs(d ?? [], {
7658
8197
  indicator: "map-value-ind",
7659
8198
  next: f,
7660
8199
  offset: g.range[2],
@@ -7665,7 +8204,7 @@ function Ds({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
7665
8204
  if (s = _.end, _.found) {
7666
8205
  m && (f?.type === "block-map" && !_.hasNewline && i(s, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), n.options.strict && p.start < _.found.offset - 1024 && i(g.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
7667
8206
  let c = f ? e(n, f, _, i) : t(n, s, d, null, _, i);
7668
- n.schema.compat && ws(r.indent, f, i), s = c.range[2];
8207
+ n.schema.compat && Ts(r.indent, f, i), s = c.range[2];
7669
8208
  let l = new Q(g, c);
7670
8209
  n.options.keepSourceTokens && (l.srcToken = a), o.items.push(l);
7671
8210
  } else {
@@ -7682,12 +8221,12 @@ function Ds({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
7682
8221
  }
7683
8222
  //#endregion
7684
8223
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-seq.js
7685
- function Os({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
7686
- let o = new ((a?.nodeClass) ?? ho)(n.schema);
8224
+ function ks({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
8225
+ let o = new ((a?.nodeClass) ?? go)(n.schema);
7687
8226
  n.atRoot &&= !1, n.atKey &&= !1;
7688
8227
  let s = r.offset, c = null;
7689
8228
  for (let { start: a, value: l } of r.items) {
7690
- let u = Ss(a, {
8229
+ let u = Cs(a, {
7691
8230
  indicator: "seq-item-ind",
7692
8231
  next: l,
7693
8232
  offset: s,
@@ -7703,7 +8242,7 @@ function Os({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
7703
8242
  }
7704
8243
  }
7705
8244
  let d = l ? e(n, l, u, i) : t(n, u.end, a, null, u, i);
7706
- n.schema.compat && ws(r.indent, l, i), s = d.range[2], o.items.push(d);
8245
+ n.schema.compat && Ts(r.indent, l, i), s = d.range[2], o.items.push(d);
7707
8246
  }
7708
8247
  return o.range = [
7709
8248
  r.offset,
@@ -7713,7 +8252,7 @@ function Os({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
7713
8252
  }
7714
8253
  //#endregion
7715
8254
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-end.js
7716
- function ks(e, t, n, r) {
8255
+ function As(e, t, n, r) {
7717
8256
  let i = "";
7718
8257
  if (e) {
7719
8258
  let a = !1, o = "";
@@ -7744,15 +8283,15 @@ function ks(e, t, n, r) {
7744
8283
  }
7745
8284
  //#endregion
7746
8285
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js
7747
- var As = "Block collections are not allowed within flow collections", js = (e) => e && (e.type === "block-map" || e.type === "block-seq");
7748
- function Ms({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
7749
- let o = r.start.source === "{", s = o ? "flow map" : "flow sequence", c = new ((a?.nodeClass) ?? (o ? $ : ho))(n.schema);
8286
+ var js = "Block collections are not allowed within flow collections", Ms = (e) => e && (e.type === "block-map" || e.type === "block-seq");
8287
+ function Ns({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
8288
+ let o = r.start.source === "{", s = o ? "flow map" : "flow sequence", c = new ((a?.nodeClass) ?? (o ? $ : go))(n.schema);
7750
8289
  c.flow = !0;
7751
8290
  let l = n.atRoot;
7752
8291
  l && (n.atRoot = !1), n.atKey &&= !1;
7753
8292
  let u = r.offset + r.start.source.length;
7754
8293
  for (let a = 0; a < r.items.length; ++a) {
7755
- let l = r.items[a], { start: d, key: f, sep: p, value: m } = l, h = Ss(d, {
8294
+ let l = r.items[a], { start: d, key: f, sep: p, value: m } = l, h = Cs(d, {
7756
8295
  flow: s,
7757
8296
  indicator: "explicit-key-ind",
7758
8297
  next: f ?? p?.[0],
@@ -7766,7 +8305,7 @@ function Ms({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
7766
8305
  a === 0 && h.comma ? i(h.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`) : a < r.items.length - 1 && i(h.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${s}`), h.comment && (c.comment ? c.comment += "\n" + h.comment : c.comment = h.comment), u = h.end;
7767
8306
  continue;
7768
8307
  }
7769
- !o && n.options.strict && Cs(f) && i(f, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
8308
+ !o && n.options.strict && ws(f) && i(f, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
7770
8309
  }
7771
8310
  if (a === 0) h.comma && i(h.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${s}`);
7772
8311
  else if (h.comma || i(h.start, "MISSING_CHAR", `Missing , between ${s} items`), h.comment) {
@@ -7786,12 +8325,12 @@ function Ms({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
7786
8325
  }
7787
8326
  if (!o && !p && !h.found) {
7788
8327
  let r = m ? e(n, m, h, i) : t(n, h.end, p, null, h, i);
7789
- c.items.push(r), u = r.range[2], js(m) && i(r.range, "BLOCK_IN_FLOW", As);
8328
+ c.items.push(r), u = r.range[2], Ms(m) && i(r.range, "BLOCK_IN_FLOW", js);
7790
8329
  } else {
7791
8330
  n.atKey = !0;
7792
8331
  let a = h.end, g = f ? e(n, f, h, i) : t(n, a, d, null, h, i);
7793
- js(f) && i(g.range, "BLOCK_IN_FLOW", As), n.atKey = !1;
7794
- let _ = Ss(p ?? [], {
8332
+ Ms(f) && i(g.range, "BLOCK_IN_FLOW", js), n.atKey = !1;
8333
+ let _ = Cs(p ?? [], {
7795
8334
  flow: s,
7796
8335
  indicator: "map-value-ind",
7797
8336
  next: m,
@@ -7813,11 +8352,11 @@ function Ms({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
7813
8352
  }
7814
8353
  } else m && ("source" in m && m.source?.[0] === ":" ? i(m, "MISSING_CHAR", `Missing space after : in ${s}`) : i(_.start, "MISSING_CHAR", `Missing , or : between ${s} items`));
7815
8354
  let v = m ? e(n, m, _, i) : _.found ? t(n, _.end, p, null, _, i) : null;
7816
- v ? js(m) && i(v.range, "BLOCK_IN_FLOW", As) : _.comment && (g.comment ? g.comment += "\n" + _.comment : g.comment = _.comment);
8355
+ v ? Ms(m) && i(v.range, "BLOCK_IN_FLOW", js) : _.comment && (g.comment ? g.comment += "\n" + _.comment : g.comment = _.comment);
7817
8356
  let y = new Q(g, v);
7818
8357
  if (n.options.keepSourceTokens && (y.srcToken = l), o) {
7819
8358
  let e = c;
7820
- Ts(n, e.items, g) && i(a, "DUPLICATE_KEY", "Map keys must be unique"), e.items.push(y);
8359
+ Es(n, e.items, g) && i(a, "DUPLICATE_KEY", "Map keys must be unique"), e.items.push(y);
7821
8360
  } else {
7822
8361
  let e = new $(n.schema);
7823
8362
  e.flow = !0, e.items.push(y);
@@ -7838,7 +8377,7 @@ function Ms({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
7838
8377
  i(u, l ? "MISSING_CHAR" : "BAD_INDENT", t), f && f.source.length !== 1 && p.unshift(f);
7839
8378
  }
7840
8379
  if (p.length > 0) {
7841
- let e = ks(p, m, n.options.strict, i);
8380
+ let e = As(p, m, n.options.strict, i);
7842
8381
  e.comment && (c.comment ? c.comment += "\n" + e.comment : c.comment = e.comment), c.range = [
7843
8382
  r.offset,
7844
8383
  m,
@@ -7853,31 +8392,31 @@ function Ms({ composeNode: e, composeEmptyNode: t }, n, r, i, a) {
7853
8392
  }
7854
8393
  //#endregion
7855
8394
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-collection.js
7856
- function Ns(e, t, n, r, i, a) {
7857
- let o = n.type === "block-map" ? Ds(e, t, n, r, a) : n.type === "block-seq" ? Os(e, t, n, r, a) : Ms(e, t, n, r, a), s = o.constructor;
8395
+ function Ps(e, t, n, r, i, a) {
8396
+ let o = n.type === "block-map" ? Os(e, t, n, r, a) : n.type === "block-seq" ? ks(e, t, n, r, a) : Ns(e, t, n, r, a), s = o.constructor;
7858
8397
  return i === "!" || i === s.tagName ? (o.tag = s.tagName, o) : (i && (o.tag = i), o);
7859
8398
  }
7860
- function Ps(e, t, n, r, i) {
8399
+ function Fs(e, t, n, r, i) {
7861
8400
  let a = r.tag, o = a ? t.directives.tagName(a.source, (e) => i(a, "TAG_RESOLVE_FAILED", e)) : null;
7862
8401
  if (n.type === "block-seq") {
7863
8402
  let { anchor: e, newlineAfterProp: t } = r, n = e && a ? e.offset > a.offset ? e : a : e ?? a;
7864
8403
  n && (!t || t.offset < n.offset) && i(n, "MISSING_CHAR", "Missing newline after block sequence props");
7865
8404
  }
7866
8405
  let s = n.type === "block-map" ? "map" : n.type === "block-seq" ? "seq" : n.start.source === "{" ? "map" : "seq";
7867
- if (!a || !o || o === "!" || o === $.tagName && s === "map" || o === ho.tagName && s === "seq") return Ns(e, t, n, i, o);
8406
+ if (!a || !o || o === "!" || o === $.tagName && s === "map" || o === go.tagName && s === "seq") return Ps(e, t, n, i, o);
7868
8407
  let c = t.schema.tags.find((e) => e.tag === o && e.collection === s);
7869
8408
  if (!c) {
7870
8409
  let r = t.schema.knownTags[o];
7871
8410
  if (r?.collection === s) t.schema.tags.push(Object.assign({}, r, { default: !1 })), c = r;
7872
- else return r ? i(a, "BAD_COLLECTION_TYPE", `${r.tag} used for ${s} collection, but expects ${r.collection ?? "scalar"}`, !0) : i(a, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), Ns(e, t, n, i, o);
8411
+ else return r ? i(a, "BAD_COLLECTION_TYPE", `${r.tag} used for ${s} collection, but expects ${r.collection ?? "scalar"}`, !0) : i(a, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), Ps(e, t, n, i, o);
7873
8412
  }
7874
- let l = Ns(e, t, n, i, o, c), u = c.resolve?.(l, (e) => i(a, "TAG_RESOLVE_FAILED", e), t.options) ?? l, d = Y(u) ? u : new Z(u);
8413
+ let l = Ps(e, t, n, i, o, c), u = c.resolve?.(l, (e) => i(a, "TAG_RESOLVE_FAILED", e), t.options) ?? l, d = Y(u) ? u : new Z(u);
7875
8414
  return d.range = l.range, d.tag = o, c?.format && (d.format = c.format), d;
7876
8415
  }
7877
8416
  //#endregion
7878
8417
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js
7879
- function Fs(e, t, n) {
7880
- let r = t.offset, i = Is(t, e.options.strict, n);
8418
+ function Is(e, t, n) {
8419
+ let r = t.offset, i = Ls(t, e.options.strict, n);
7881
8420
  if (!i) return {
7882
8421
  value: "",
7883
8422
  type: null,
@@ -7888,7 +8427,7 @@ function Fs(e, t, n) {
7888
8427
  r
7889
8428
  ]
7890
8429
  };
7891
- let a = i.mode === ">" ? Z.BLOCK_FOLDED : Z.BLOCK_LITERAL, o = t.source ? Ls(t.source) : [], s = o.length;
8430
+ let a = i.mode === ">" ? Z.BLOCK_FOLDED : Z.BLOCK_LITERAL, o = t.source ? Rs(t.source) : [], s = o.length;
7892
8431
  for (let e = o.length - 1; e >= 0; --e) {
7893
8432
  let t = o[e][1];
7894
8433
  if (t === "" || t === "\r") s = e;
@@ -7951,7 +8490,7 @@ function Fs(e, t, n) {
7951
8490
  ]
7952
8491
  };
7953
8492
  }
7954
- function Is({ offset: e, props: t }, n, r) {
8493
+ function Ls({ offset: e, props: t }, n, r) {
7955
8494
  /* istanbul ignore if should not happen */
7956
8495
  if (t[0].type !== "block-scalar-header") return r(t[0], "IMPOSSIBLE", "Block scalar header not found"), null;
7957
8496
  let { source: i } = t[0], a = i[0], o = 0, s = "", c = -1;
@@ -7994,24 +8533,24 @@ function Is({ offset: e, props: t }, n, r) {
7994
8533
  length: d
7995
8534
  };
7996
8535
  }
7997
- function Ls(e) {
8536
+ function Rs(e) {
7998
8537
  let t = e.split(/\n( *)/), n = t[0], r = n.match(/^( *)/), i = [r?.[1] ? [r[1], n.slice(r[1].length)] : ["", n]];
7999
8538
  for (let e = 1; e < t.length; e += 2) i.push([t[e], t[e + 1]]);
8000
8539
  return i;
8001
8540
  }
8002
8541
  //#endregion
8003
8542
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js
8004
- function Rs(e, t, n) {
8543
+ function zs(e, t, n) {
8005
8544
  let { offset: r, type: i, source: a, end: o } = e, s, c, l = (e, t, i) => n(r + e, t, i);
8006
8545
  switch (i) {
8007
8546
  case "scalar":
8008
- s = Z.PLAIN, c = zs(a, l);
8547
+ s = Z.PLAIN, c = Bs(a, l);
8009
8548
  break;
8010
8549
  case "single-quoted-scalar":
8011
- s = Z.QUOTE_SINGLE, c = Bs(a, l);
8550
+ s = Z.QUOTE_SINGLE, c = Vs(a, l);
8012
8551
  break;
8013
8552
  case "double-quoted-scalar":
8014
- s = Z.QUOTE_DOUBLE, c = Hs(a, l);
8553
+ s = Z.QUOTE_DOUBLE, c = Us(a, l);
8015
8554
  break;
8016
8555
  /* istanbul ignore next should not happen */
8017
8556
  default: return n(e, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
@@ -8025,7 +8564,7 @@ function Rs(e, t, n) {
8025
8564
  ]
8026
8565
  };
8027
8566
  }
8028
- let u = r + a.length, d = ks(o, u, t, n);
8567
+ let u = r + a.length, d = As(o, u, t, n);
8029
8568
  return {
8030
8569
  value: c,
8031
8570
  type: s,
@@ -8037,7 +8576,7 @@ function Rs(e, t, n) {
8037
8576
  ]
8038
8577
  };
8039
8578
  }
8040
- function zs(e, t) {
8579
+ function Bs(e, t) {
8041
8580
  let n = "";
8042
8581
  switch (e[0]) {
8043
8582
  /* istanbul ignore next should not happen */
@@ -8057,12 +8596,12 @@ function zs(e, t) {
8057
8596
  case "@":
8058
8597
  case "`": n = `reserved character ${e[0]}`;
8059
8598
  }
8060
- return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`), Vs(e);
8599
+ return n && t(0, "BAD_SCALAR_START", `Plain value cannot start with ${n}`), Hs(e);
8061
8600
  }
8062
- function Bs(e, t) {
8063
- return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"), Vs(e.slice(1, -1)).replace(/''/g, "'");
8601
+ function Vs(e, t) {
8602
+ return (e[e.length - 1] !== "'" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing 'quote"), Hs(e.slice(1, -1)).replace(/''/g, "'");
8064
8603
  }
8065
- function Vs(e) {
8604
+ function Hs(e) {
8066
8605
  let t, n;
8067
8606
  try {
8068
8607
  t = /* @__PURE__ */ RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy"), n = /* @__PURE__ */ RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
@@ -8076,22 +8615,22 @@ function Vs(e) {
8076
8615
  let s = /[ \t]*(.*)/sy;
8077
8616
  return s.lastIndex = o, r = s.exec(e), i + a + (r?.[1] ?? "");
8078
8617
  }
8079
- function Hs(e, t) {
8618
+ function Us(e, t) {
8080
8619
  let n = "";
8081
8620
  for (let r = 1; r < e.length - 1; ++r) {
8082
8621
  let i = e[r];
8083
8622
  if (i !== "\r" || e[r + 1] !== "\n") {
8084
8623
  if (i === "\n") {
8085
- let { fold: t, offset: i } = Us(e, r);
8624
+ let { fold: t, offset: i } = Ws(e, r);
8086
8625
  n += t, r = i;
8087
8626
  } else if (i === "\\") {
8088
- let i = e[++r], a = Ws[i];
8627
+ let i = e[++r], a = Gs[i];
8089
8628
  if (a) n += a;
8090
8629
  else if (i === "\n") for (i = e[r + 1]; i === " " || i === " ";) i = e[++r + 1];
8091
8630
  else if (i === "\r" && e[r + 1] === "\n") for (i = e[++r + 1]; i === " " || i === " ";) i = e[++r + 1];
8092
8631
  else if (i === "x" || i === "u" || i === "U") {
8093
8632
  let a = i === "x" ? 2 : i === "u" ? 4 : 8;
8094
- n += Gs(e, r + 1, a, t), r += a;
8633
+ n += Ks(e, r + 1, a, t), r += a;
8095
8634
  } else {
8096
8635
  let i = e.substr(r - 1, 2);
8097
8636
  t(r - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${i}`), n += i;
@@ -8105,7 +8644,7 @@ function Hs(e, t) {
8105
8644
  }
8106
8645
  return (e[e.length - 1] !== "\"" || e.length === 1) && t(e.length, "MISSING_CHAR", "Missing closing \"quote"), n;
8107
8646
  }
8108
- function Us(e, t) {
8647
+ function Ws(e, t) {
8109
8648
  let n = "", r = e[t + 1];
8110
8649
  for (; (r === " " || r === " " || r === "\n" || r === "\r") && (r !== "\r" || e[t + 2] === "\n");) r === "\n" && (n += "\n"), t += 1, r = e[t + 1];
8111
8650
  return n ||= " ", {
@@ -8113,7 +8652,7 @@ function Us(e, t) {
8113
8652
  offset: t
8114
8653
  };
8115
8654
  }
8116
- var Ws = {
8655
+ var Gs = {
8117
8656
  0: "\0",
8118
8657
  a: "\x07",
8119
8658
  b: "\b",
@@ -8133,7 +8672,7 @@ var Ws = {
8133
8672
  "\\": "\\",
8134
8673
  " ": " "
8135
8674
  };
8136
- function Gs(e, t, n, r) {
8675
+ function Ks(e, t, n, r) {
8137
8676
  let i = e.substr(t, n), a = i.length === n && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
8138
8677
  try {
8139
8678
  return String.fromCodePoint(a);
@@ -8144,9 +8683,9 @@ function Gs(e, t, n, r) {
8144
8683
  }
8145
8684
  //#endregion
8146
8685
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-scalar.js
8147
- function Ks(e, t, n, r) {
8148
- let { value: i, type: a, comment: o, range: s } = t.type === "block-scalar" ? Fs(e, t, r) : Rs(t, e.options.strict, r), c = n ? e.directives.tagName(n.source, (e) => r(n, "TAG_RESOLVE_FAILED", e)) : null, l;
8149
- l = e.options.stringKeys && e.atKey ? e.schema[Ji] : c ? qs(e.schema, i, c, n, r) : t.type === "scalar" ? Js(e, i, t, r) : e.schema[Ji];
8686
+ function qs(e, t, n, r) {
8687
+ let { value: i, type: a, comment: o, range: s } = t.type === "block-scalar" ? Is(e, t, r) : zs(t, e.options.strict, r), c = n ? e.directives.tagName(n.source, (e) => r(n, "TAG_RESOLVE_FAILED", e)) : null, l;
8688
+ l = e.options.stringKeys && e.atKey ? e.schema[Yi] : c ? Js(e.schema, i, c, n, r) : t.type === "scalar" ? Ys(e, i, t, r) : e.schema[Yi];
8150
8689
  let u;
8151
8690
  try {
8152
8691
  let a = l.resolve(i, (e) => r(n ?? t, "TAG_RESOLVE_FAILED", e), e.options);
@@ -8157,8 +8696,8 @@ function Ks(e, t, n, r) {
8157
8696
  }
8158
8697
  return u.range = s, u.source = i, a && (u.type = a), c && (u.tag = c), l.format && (u.format = l.format), o && (u.comment = o), u;
8159
8698
  }
8160
- function qs(e, t, n, r, i) {
8161
- if (n === "!") return e[Ji];
8699
+ function Js(e, t, n, r, i) {
8700
+ if (n === "!") return e[Yi];
8162
8701
  let a = [];
8163
8702
  for (let t of e.tags) if (!t.collection && t.tag === n) {
8164
8703
  if (t.default && t.test) a.push(t);
@@ -8169,19 +8708,19 @@ function qs(e, t, n, r, i) {
8169
8708
  return o && !o.collection ? (e.tags.push(Object.assign({}, o, {
8170
8709
  default: !1,
8171
8710
  test: void 0
8172
- })), o) : (i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${n}`, n !== "tag:yaml.org,2002:str"), e[Ji]);
8711
+ })), o) : (i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${n}`, n !== "tag:yaml.org,2002:str"), e[Yi]);
8173
8712
  }
8174
- function Js({ atKey: e, directives: t, schema: n }, r, i, a) {
8175
- let o = n.tags.find((t) => (t.default === !0 || e && t.default === "key") && t.test?.test(r)) || n[Ji];
8713
+ function Ys({ atKey: e, directives: t, schema: n }, r, i, a) {
8714
+ let o = n.tags.find((t) => (t.default === !0 || e && t.default === "key") && t.test?.test(r)) || n[Yi];
8176
8715
  if (n.compat) {
8177
- let e = n.compat.find((e) => e.default && e.test?.test(r)) ?? n[Ji];
8716
+ let e = n.compat.find((e) => e.default && e.test?.test(r)) ?? n[Yi];
8178
8717
  o.tag !== e.tag && a(i, "TAG_RESOLVE_FAILED", `Value may be parsed as either ${t.tagString(o.tag)} or ${t.tagString(e.tag)}`, !0);
8179
8718
  }
8180
8719
  return o;
8181
8720
  }
8182
8721
  //#endregion
8183
8722
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js
8184
- function Ys(e, t, n) {
8723
+ function Xs(e, t, n) {
8185
8724
  if (t) {
8186
8725
  n ??= t.length;
8187
8726
  for (let r = n - 1; r >= 0; --r) {
@@ -8201,48 +8740,48 @@ function Ys(e, t, n) {
8201
8740
  }
8202
8741
  //#endregion
8203
8742
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-node.js
8204
- var Xs = {
8205
- composeNode: Zs,
8206
- composeEmptyNode: Qs
8743
+ var Zs = {
8744
+ composeNode: Qs,
8745
+ composeEmptyNode: $s
8207
8746
  };
8208
- function Zs(e, t, n, r) {
8747
+ function Qs(e, t, n, r) {
8209
8748
  let i = e.atKey, { spaceBefore: a, comment: o, anchor: s, tag: c } = n, l, u = !0;
8210
8749
  switch (t.type) {
8211
8750
  case "alias":
8212
- l = $s(e, t, r), (s || c) && r(t, "ALIAS_PROPS", "An alias node must not specify any properties");
8751
+ l = ec(e, t, r), (s || c) && r(t, "ALIAS_PROPS", "An alias node must not specify any properties");
8213
8752
  break;
8214
8753
  case "scalar":
8215
8754
  case "single-quoted-scalar":
8216
8755
  case "double-quoted-scalar":
8217
8756
  case "block-scalar":
8218
- l = Ks(e, t, c, r), s && (l.anchor = s.source.substring(1));
8757
+ l = qs(e, t, c, r), s && (l.anchor = s.source.substring(1));
8219
8758
  break;
8220
8759
  case "block-map":
8221
8760
  case "block-seq":
8222
8761
  case "flow-collection":
8223
8762
  try {
8224
- l = Ps(Xs, e, t, n, r), s && (l.anchor = s.source.substring(1));
8763
+ l = Fs(Zs, e, t, n, r), s && (l.anchor = s.source.substring(1));
8225
8764
  } catch (e) {
8226
8765
  r(t, "RESOURCE_EXHAUSTION", e instanceof Error ? e.message : String(e));
8227
8766
  }
8228
8767
  break;
8229
8768
  default: r(t, "UNEXPECTED_TOKEN", t.type === "error" ? t.message : `Unsupported token (type: ${t.type})`), u = !1;
8230
8769
  }
8231
- return l ??= Qs(e, t.offset, void 0, null, n, r), s && l.anchor === "" && r(s, "BAD_ALIAS", "Anchor cannot be an empty string"), i && e.options.stringKeys && (!q(l) || typeof l.value != "string" || l.tag && l.tag !== "tag:yaml.org,2002:str") && r(c ?? t, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), a && (l.spaceBefore = !0), o && (t.type === "scalar" && t.source === "" ? l.comment = o : l.commentBefore = o), e.options.keepSourceTokens && u && (l.srcToken = t), l;
8770
+ return l ??= $s(e, t.offset, void 0, null, n, r), s && l.anchor === "" && r(s, "BAD_ALIAS", "Anchor cannot be an empty string"), i && e.options.stringKeys && (!q(l) || typeof l.value != "string" || l.tag && l.tag !== "tag:yaml.org,2002:str") && r(c ?? t, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), a && (l.spaceBefore = !0), o && (t.type === "scalar" && t.source === "" ? l.comment = o : l.commentBefore = o), e.options.keepSourceTokens && u && (l.srcToken = t), l;
8232
8771
  }
8233
- function Qs(e, t, n, r, { spaceBefore: i, comment: a, anchor: o, tag: s, end: c }, l) {
8234
- let u = Ks(e, {
8772
+ function $s(e, t, n, r, { spaceBefore: i, comment: a, anchor: o, tag: s, end: c }, l) {
8773
+ let u = qs(e, {
8235
8774
  type: "scalar",
8236
- offset: Ys(t, n, r),
8775
+ offset: Xs(t, n, r),
8237
8776
  indent: -1,
8238
8777
  source: ""
8239
8778
  }, s, l);
8240
8779
  return o && (u.anchor = o.source.substring(1), u.anchor === "" && l(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (u.spaceBefore = !0), a && (u.comment = a, u.range[2] = c), u;
8241
8780
  }
8242
- function $s({ options: e }, { offset: t, source: n, end: r }, i) {
8243
- let a = new ba(n.substring(1));
8781
+ function ec({ options: e }, { offset: t, source: n, end: r }, i) {
8782
+ let a = new xa(n.substring(1));
8244
8783
  a.source === "" && i(t, "BAD_ALIAS", "Alias cannot be an empty string"), a.source.endsWith(":") && i(t + n.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
8245
- let o = t + n.length, s = ks(r, o, e.strict, i);
8784
+ let o = t + n.length, s = As(r, o, e.strict, i);
8246
8785
  return a.range = [
8247
8786
  t,
8248
8787
  o,
@@ -8251,14 +8790,14 @@ function $s({ options: e }, { offset: t, source: n, end: r }, i) {
8251
8790
  }
8252
8791
  //#endregion
8253
8792
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/compose-doc.js
8254
- function ec(e, t, { offset: n, start: r, value: i, end: a }, o) {
8255
- let s = new gs(void 0, Object.assign({ _directives: t }, e)), c = {
8793
+ function tc(e, t, { offset: n, start: r, value: i, end: a }, o) {
8794
+ let s = new _s(void 0, Object.assign({ _directives: t }, e)), c = {
8256
8795
  atKey: !1,
8257
8796
  atRoot: !0,
8258
8797
  directives: s.directives,
8259
8798
  options: s.options,
8260
8799
  schema: s.schema
8261
- }, l = Ss(r, {
8800
+ }, l = Cs(r, {
8262
8801
  indicator: "doc-start",
8263
8802
  next: i ?? a?.[0],
8264
8803
  offset: n,
@@ -8266,8 +8805,8 @@ function ec(e, t, { offset: n, start: r, value: i, end: a }, o) {
8266
8805
  parentIndent: 0,
8267
8806
  startOnNewline: !0
8268
8807
  });
8269
- l.found && (s.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !l.hasNewline && o(l.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), s.contents = i ? Zs(c, i, l, o) : Qs(c, l.end, r, null, l, o);
8270
- let u = s.contents.range[2], d = ks(a, u, !1, o);
8808
+ l.found && (s.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !l.hasNewline && o(l.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), s.contents = i ? Qs(c, i, l, o) : $s(c, l.end, r, null, l, o);
8809
+ let u = s.contents.range[2], d = As(a, u, !1, o);
8271
8810
  return d.comment && (s.comment = d.comment), s.range = [
8272
8811
  n,
8273
8812
  u,
@@ -8276,13 +8815,13 @@ function ec(e, t, { offset: n, start: r, value: i, end: a }, o) {
8276
8815
  }
8277
8816
  //#endregion
8278
8817
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/compose/composer.js
8279
- function tc(e) {
8818
+ function nc(e) {
8280
8819
  if (typeof e == "number") return [e, e + 1];
8281
8820
  if (Array.isArray(e)) return e.length === 2 ? e : [e[0], e[1]];
8282
8821
  let { offset: t, source: n } = e;
8283
8822
  return [t, t + (typeof n == "string" ? n.length : 1)];
8284
8823
  }
8285
- function nc(e) {
8824
+ function rc(e) {
8286
8825
  let t = "", n = !1, r = !1;
8287
8826
  for (let i = 0; i < e.length; ++i) {
8288
8827
  let a = e[i];
@@ -8301,15 +8840,15 @@ function nc(e) {
8301
8840
  afterEmptyLine: r
8302
8841
  };
8303
8842
  }
8304
- var rc = class {
8843
+ var ic = class {
8305
8844
  constructor(e = {}) {
8306
8845
  this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (e, t, n, r) => {
8307
- let i = tc(e);
8308
- r ? this.warnings.push(new bs(i, t, n)) : this.errors.push(new ys(i, t, n));
8309
- }, this.directives = new fa({ version: e.version || "1.2" }), this.options = e;
8846
+ let i = nc(e);
8847
+ r ? this.warnings.push(new xs(i, t, n)) : this.errors.push(new bs(i, t, n));
8848
+ }, this.directives = new pa({ version: e.version || "1.2" }), this.options = e;
8310
8849
  }
8311
8850
  decorate(e, t) {
8312
- let { comment: n, afterEmptyLine: r } = nc(this.prelude);
8851
+ let { comment: n, afterEmptyLine: r } = rc(this.prelude);
8313
8852
  if (n) {
8314
8853
  let i = e.contents;
8315
8854
  if (t) e.comment = e.comment ? `${e.comment}\n${n}` : n;
@@ -8332,7 +8871,7 @@ var rc = class {
8332
8871
  }
8333
8872
  streamInfo() {
8334
8873
  return {
8335
- comment: nc(this.prelude).comment,
8874
+ comment: rc(this.prelude).comment,
8336
8875
  directives: this.directives,
8337
8876
  errors: this.errors,
8338
8877
  warnings: this.warnings
@@ -8346,12 +8885,12 @@ var rc = class {
8346
8885
  switch (e.type) {
8347
8886
  case "directive":
8348
8887
  this.directives.add(e.source, (t, n, r) => {
8349
- let i = tc(e);
8888
+ let i = nc(e);
8350
8889
  i[0] += t, this.onError(i, "BAD_DIRECTIVE", n, r);
8351
8890
  }), this.prelude.push(e.source), this.atDirectives = !0;
8352
8891
  break;
8353
8892
  case "document": {
8354
- let t = ec(this.options, this.directives, e, this.onError);
8893
+ let t = tc(this.options, this.directives, e, this.onError);
8355
8894
  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;
8356
8895
  break;
8357
8896
  }
@@ -8362,17 +8901,17 @@ var rc = class {
8362
8901
  this.prelude.push(e.source);
8363
8902
  break;
8364
8903
  case "error": {
8365
- let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new ys(tc(e), "UNEXPECTED_TOKEN", t);
8904
+ let t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new bs(nc(e), "UNEXPECTED_TOKEN", t);
8366
8905
  this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
8367
8906
  break;
8368
8907
  }
8369
8908
  case "doc-end": {
8370
8909
  if (!this.doc) {
8371
- this.errors.push(new ys(tc(e), "UNEXPECTED_TOKEN", "Unexpected doc-end without preceding document"));
8910
+ this.errors.push(new bs(nc(e), "UNEXPECTED_TOKEN", "Unexpected doc-end without preceding document"));
8372
8911
  break;
8373
8912
  }
8374
8913
  this.doc.directives.docEnd = !0;
8375
- let t = ks(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
8914
+ let t = As(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
8376
8915
  if (this.decorate(this.doc, !0), t.comment) {
8377
8916
  let e = this.doc.comment;
8378
8917
  this.doc.comment = e ? `${e}\n${t.comment}` : t.comment;
@@ -8380,13 +8919,13 @@ var rc = class {
8380
8919
  this.doc.range[2] = t.offset;
8381
8920
  break;
8382
8921
  }
8383
- default: this.errors.push(new ys(tc(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
8922
+ default: this.errors.push(new bs(nc(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
8384
8923
  }
8385
8924
  }
8386
8925
  *end(e = !1, t = -1) {
8387
8926
  if (this.doc) this.decorate(this.doc, !0), yield this.doc, this.doc = null;
8388
8927
  else if (e) {
8389
- let e = new gs(void 0, Object.assign({ _directives: this.directives }, this.options));
8928
+ let e = new _s(void 0, Object.assign({ _directives: this.directives }, this.options));
8390
8929
  this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), e.range = [
8391
8930
  0,
8392
8931
  t,
@@ -8397,24 +8936,24 @@ var rc = class {
8397
8936
  };
8398
8937
  //#endregion
8399
8938
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-scalar.js
8400
- function ic(e, t = !0, n) {
8939
+ function ac(e, t = !0, n) {
8401
8940
  if (e) {
8402
8941
  let r = (e, t, r) => {
8403
8942
  let i = typeof e == "number" ? e : Array.isArray(e) ? e[0] : e.offset;
8404
8943
  if (n) n(i, t, r);
8405
- else throw new ys([i, i + 1], t, r);
8944
+ else throw new bs([i, i + 1], t, r);
8406
8945
  };
8407
8946
  switch (e.type) {
8408
8947
  case "scalar":
8409
8948
  case "single-quoted-scalar":
8410
- case "double-quoted-scalar": return Rs(e, t, r);
8411
- case "block-scalar": return Fs({ options: { strict: t } }, e, r);
8949
+ case "double-quoted-scalar": return zs(e, t, r);
8950
+ case "block-scalar": return Is({ options: { strict: t } }, e, r);
8412
8951
  }
8413
8952
  }
8414
8953
  return null;
8415
8954
  }
8416
- function ac(e, t) {
8417
- let { implicitKey: n = !1, indent: r, inFlow: i = !1, offset: a = -1, type: o = "PLAIN" } = t, s = Ka({
8955
+ function oc(e, t) {
8956
+ let { implicitKey: n = !1, indent: r, inFlow: i = !1, offset: a = -1, type: o = "PLAIN" } = t, s = qa({
8418
8957
  type: o,
8419
8958
  value: e
8420
8959
  }, {
@@ -8440,7 +8979,7 @@ function ac(e, t) {
8440
8979
  indent: r,
8441
8980
  source: t
8442
8981
  }];
8443
- return cc(i, c) || i.push({
8982
+ return lc(i, c) || i.push({
8444
8983
  type: "newline",
8445
8984
  offset: -1,
8446
8985
  indent: r,
@@ -8476,7 +9015,7 @@ function ac(e, t) {
8476
9015
  };
8477
9016
  }
8478
9017
  }
8479
- function oc(e, t, n = {}) {
9018
+ function sc(e, t, n = {}) {
8480
9019
  let { afterKey: r = !1, implicitKey: i = !1, inFlow: a = !1, type: o } = n, s = "indent" in e ? e.indent : null;
8481
9020
  if (r && typeof s == "number" && (s += 2), !o) switch (e.type) {
8482
9021
  case "single-quoted-scalar":
@@ -8493,7 +9032,7 @@ function oc(e, t, n = {}) {
8493
9032
  }
8494
9033
  default: o = "PLAIN";
8495
9034
  }
8496
- let c = Ka({
9035
+ let c = qa({
8497
9036
  type: o,
8498
9037
  value: t
8499
9038
  }, {
@@ -8508,18 +9047,18 @@ function oc(e, t, n = {}) {
8508
9047
  switch (c[0]) {
8509
9048
  case "|":
8510
9049
  case ">":
8511
- sc(e, c);
9050
+ cc(e, c);
8512
9051
  break;
8513
9052
  case "\"":
8514
- lc(e, c, "double-quoted-scalar");
9053
+ uc(e, c, "double-quoted-scalar");
8515
9054
  break;
8516
9055
  case "'":
8517
- lc(e, c, "single-quoted-scalar");
9056
+ uc(e, c, "single-quoted-scalar");
8518
9057
  break;
8519
- default: lc(e, c, "scalar");
9058
+ default: uc(e, c, "scalar");
8520
9059
  }
8521
9060
  }
8522
- function sc(e, t) {
9061
+ function cc(e, t) {
8523
9062
  let n = t.indexOf("\n"), r = t.substring(0, n), i = t.substring(n + 1) + "\n";
8524
9063
  if (e.type === "block-scalar") {
8525
9064
  let t = e.props[0];
@@ -8532,7 +9071,7 @@ function sc(e, t) {
8532
9071
  indent: n,
8533
9072
  source: r
8534
9073
  }];
8535
- cc(a, "end" in e ? e.end : void 0) || a.push({
9074
+ lc(a, "end" in e ? e.end : void 0) || a.push({
8536
9075
  type: "newline",
8537
9076
  offset: -1,
8538
9077
  indent: n,
@@ -8547,7 +9086,7 @@ function sc(e, t) {
8547
9086
  });
8548
9087
  }
8549
9088
  }
8550
- function cc(e, t) {
9089
+ function lc(e, t) {
8551
9090
  if (t) for (let n of t) switch (n.type) {
8552
9091
  case "space":
8553
9092
  case "comment":
@@ -8557,7 +9096,7 @@ function cc(e, t) {
8557
9096
  }
8558
9097
  return !1;
8559
9098
  }
8560
- function lc(e, t, n) {
9099
+ function uc(e, t, n) {
8561
9100
  switch (e.type) {
8562
9101
  case "scalar":
8563
9102
  case "double-quoted-scalar":
@@ -8604,28 +9143,28 @@ function lc(e, t, n) {
8604
9143
  }
8605
9144
  //#endregion
8606
9145
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-stringify.js
8607
- var uc = (e) => "type" in e ? dc(e) : fc(e);
8608
- function dc(e) {
9146
+ var dc = (e) => "type" in e ? fc(e) : pc(e);
9147
+ function fc(e) {
8609
9148
  switch (e.type) {
8610
9149
  case "block-scalar": {
8611
9150
  let t = "";
8612
- for (let n of e.props) t += dc(n);
9151
+ for (let n of e.props) t += fc(n);
8613
9152
  return t + e.source;
8614
9153
  }
8615
9154
  case "block-map":
8616
9155
  case "block-seq": {
8617
9156
  let t = "";
8618
- for (let n of e.items) t += fc(n);
9157
+ for (let n of e.items) t += pc(n);
8619
9158
  return t;
8620
9159
  }
8621
9160
  case "flow-collection": {
8622
9161
  let t = e.start.source;
8623
- for (let n of e.items) t += fc(n);
9162
+ for (let n of e.items) t += pc(n);
8624
9163
  for (let n of e.end) t += n.source;
8625
9164
  return t;
8626
9165
  }
8627
9166
  case "document": {
8628
- let t = fc(e);
9167
+ let t = pc(e);
8629
9168
  if (e.end) for (let n of e.end) t += n.source;
8630
9169
  return t;
8631
9170
  }
@@ -8636,22 +9175,22 @@ function dc(e) {
8636
9175
  }
8637
9176
  }
8638
9177
  }
8639
- function fc({ start: e, key: t, sep: n, value: r }) {
9178
+ function pc({ start: e, key: t, sep: n, value: r }) {
8640
9179
  let i = "";
8641
9180
  for (let t of e) i += t.source;
8642
- if (t && (i += dc(t)), n) for (let e of n) i += e.source;
8643
- return r && (i += dc(r)), i;
9181
+ if (t && (i += fc(t)), n) for (let e of n) i += e.source;
9182
+ return r && (i += fc(r)), i;
8644
9183
  }
8645
9184
  //#endregion
8646
9185
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst-visit.js
8647
- var pc = Symbol("break visit"), mc = Symbol("skip children"), hc = Symbol("remove item");
8648
- function gc(e, t) {
9186
+ var mc = Symbol("break visit"), hc = Symbol("skip children"), gc = Symbol("remove item");
9187
+ function _c(e, t) {
8649
9188
  "type" in e && e.type === "document" && (e = {
8650
9189
  start: e.start,
8651
9190
  value: e.value
8652
- }), _c(Object.freeze([]), e, t);
9191
+ }), vc(Object.freeze([]), e, t);
8653
9192
  }
8654
- gc.BREAK = pc, gc.SKIP = mc, gc.REMOVE = hc, gc.itemAtPath = (e, t) => {
9193
+ _c.BREAK = mc, _c.SKIP = hc, _c.REMOVE = gc, _c.itemAtPath = (e, t) => {
8655
9194
  let n = e;
8656
9195
  for (let [e, r] of t) {
8657
9196
  let t = n?.[e];
@@ -8659,22 +9198,22 @@ gc.BREAK = pc, gc.SKIP = mc, gc.REMOVE = hc, gc.itemAtPath = (e, t) => {
8659
9198
  else return;
8660
9199
  }
8661
9200
  return n;
8662
- }, gc.parentCollection = (e, t) => {
8663
- let n = gc.itemAtPath(e, t.slice(0, -1)), r = t[t.length - 1][0], i = n?.[r];
9201
+ }, _c.parentCollection = (e, t) => {
9202
+ let n = _c.itemAtPath(e, t.slice(0, -1)), r = t[t.length - 1][0], i = n?.[r];
8664
9203
  if (i && "items" in i) return i;
8665
9204
  throw Error("Parent collection not found");
8666
9205
  };
8667
- function _c(e, t, n) {
9206
+ function vc(e, t, n) {
8668
9207
  let r = n(t, e);
8669
9208
  if (typeof r == "symbol") return r;
8670
9209
  for (let i of ["key", "value"]) {
8671
9210
  let a = t[i];
8672
9211
  if (a && "items" in a) {
8673
9212
  for (let t = 0; t < a.items.length; ++t) {
8674
- let r = _c(Object.freeze(e.concat([[i, t]])), a.items[t], n);
9213
+ let r = vc(Object.freeze(e.concat([[i, t]])), a.items[t], n);
8675
9214
  if (typeof r == "number") t = r - 1;
8676
- else if (r === pc) return pc;
8677
- else r === hc && (a.items.splice(t, 1), --t);
9215
+ else if (r === mc) return mc;
9216
+ else r === gc && (a.items.splice(t, 1), --t);
8678
9217
  }
8679
9218
  typeof r == "function" && i === "key" && (r = r(t, e));
8680
9219
  }
@@ -8683,23 +9222,23 @@ function _c(e, t, n) {
8683
9222
  }
8684
9223
  //#endregion
8685
9224
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/cst.js
8686
- var vc = /* @__PURE__ */ v({
9225
+ var yc = /* @__PURE__ */ v({
8687
9226
  BOM: () => "",
8688
9227
  DOCUMENT: () => "",
8689
9228
  FLOW_END: () => "",
8690
9229
  SCALAR: () => "",
8691
- createScalarToken: () => ac,
8692
- isCollection: () => yc,
8693
- isScalar: () => bc,
8694
- prettyToken: () => xc,
8695
- resolveAsScalar: () => ic,
8696
- setScalarValue: () => oc,
8697
- stringify: () => uc,
8698
- tokenType: () => Sc,
8699
- visit: () => gc
8700
- }), yc = (e) => !!e && "items" in e, bc = (e) => !!e && (e.type === "scalar" || e.type === "single-quoted-scalar" || e.type === "double-quoted-scalar" || e.type === "block-scalar");
9230
+ createScalarToken: () => oc,
9231
+ isCollection: () => bc,
9232
+ isScalar: () => xc,
9233
+ prettyToken: () => Sc,
9234
+ resolveAsScalar: () => ac,
9235
+ setScalarValue: () => sc,
9236
+ stringify: () => dc,
9237
+ tokenType: () => Cc,
9238
+ visit: () => _c
9239
+ }), bc = (e) => !!e && "items" in e, xc = (e) => !!e && (e.type === "scalar" || e.type === "single-quoted-scalar" || e.type === "double-quoted-scalar" || e.type === "block-scalar");
8701
9240
  /* istanbul ignore next */
8702
- function xc(e) {
9241
+ function Sc(e) {
8703
9242
  switch (e) {
8704
9243
  case "": return "<BOM>";
8705
9244
  case "": return "<DOC>";
@@ -8708,7 +9247,7 @@ function xc(e) {
8708
9247
  default: return JSON.stringify(e);
8709
9248
  }
8710
9249
  }
8711
- function Sc(e) {
9250
+ function Cc(e) {
8712
9251
  switch (e) {
8713
9252
  case "": return "byte-order-mark";
8714
9253
  case "": return "doc-mode";
@@ -8745,7 +9284,7 @@ function Sc(e) {
8745
9284
  }
8746
9285
  //#endregion
8747
9286
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/lexer.js
8748
- function Cc(e) {
9287
+ function wc(e) {
8749
9288
  switch (e) {
8750
9289
  case void 0:
8751
9290
  case " ":
@@ -8755,7 +9294,7 @@ function Cc(e) {
8755
9294
  default: return !1;
8756
9295
  }
8757
9296
  }
8758
- var wc = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Tc = /* @__PURE__ */ new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), Ec = /* @__PURE__ */ new Set(",[]{}"), Dc = /* @__PURE__ */ new Set(" ,[]{}\n\r "), Oc = (e) => !e || Dc.has(e), kc = class {
9297
+ var Tc = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Ec = /* @__PURE__ */ new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), Dc = /* @__PURE__ */ new Set(",[]{}"), Oc = /* @__PURE__ */ new Set(" ,[]{}\n\r "), kc = (e) => !e || Oc.has(e), Ac = class {
8759
9298
  constructor() {
8760
9299
  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;
8761
9300
  }
@@ -8789,7 +9328,7 @@ var wc = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Tc = /* @__PURE__ */
8789
9328
  }
8790
9329
  if (t === "-" || t === ".") {
8791
9330
  let t = this.buffer.substr(e, 3);
8792
- if ((t === "---" || t === "...") && Cc(this.buffer[e + 3])) return -1;
9331
+ if ((t === "---" || t === "...") && wc(this.buffer[e + 3])) return -1;
8793
9332
  }
8794
9333
  return e;
8795
9334
  }
@@ -8851,14 +9390,14 @@ var wc = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Tc = /* @__PURE__ */
8851
9390
  if (e === "-" || e === ".") {
8852
9391
  if (!this.atEnd && !this.hasChars(4)) return this.setNext("line-start");
8853
9392
  let e = this.peek(3);
8854
- if ((e === "---" || e === "...") && Cc(this.charAt(3))) return yield* this.pushCount(3), this.indentValue = 0, this.indentNext = 0, e === "---" ? "doc" : "stream";
9393
+ if ((e === "---" || e === "...") && wc(this.charAt(3))) return yield* this.pushCount(3), this.indentValue = 0, this.indentNext = 0, e === "---" ? "doc" : "stream";
8855
9394
  }
8856
- return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !Cc(this.charAt(1)) && (this.indentNext = this.indentValue), yield* this.parseBlockStart();
9395
+ return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !wc(this.charAt(1)) && (this.indentNext = this.indentValue), yield* this.parseBlockStart();
8857
9396
  }
8858
9397
  *parseBlockStart() {
8859
9398
  let [e, t] = this.peek(2);
8860
9399
  if (!t && !this.atEnd) return this.setNext("block-start");
8861
- if ((e === "-" || e === "?" || e === ":") && Cc(t)) {
9400
+ if ((e === "-" || e === "?" || e === ":") && wc(t)) {
8862
9401
  let e = (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0));
8863
9402
  return this.indentNext = this.indentValue + 1, this.indentValue += e, "block-start";
8864
9403
  }
@@ -8876,7 +9415,7 @@ var wc = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Tc = /* @__PURE__ */
8876
9415
  case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel = 1, "flow";
8877
9416
  case "}":
8878
9417
  case "]": return yield* this.pushCount(1), "doc";
8879
- case "*": return yield* this.pushUntil(Oc), "doc";
9418
+ case "*": return yield* this.pushUntil(kc), "doc";
8880
9419
  case "\"":
8881
9420
  case "'": return yield* this.parseQuotedScalar();
8882
9421
  case "|":
@@ -8891,7 +9430,7 @@ var wc = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Tc = /* @__PURE__ */
8891
9430
  while (e + t > 0);
8892
9431
  let r = this.getLine();
8893
9432
  if (r === null) return this.setNext("flow");
8894
- if ((n !== -1 && n < this.indentNext && r[0] !== "#" || n === 0 && (r.startsWith("---") || r.startsWith("...")) && Cc(r[3])) && (n !== this.indentNext - 1 || this.flowLevel !== 1 || r[0] !== "]" && r[0] !== "}")) return this.flowLevel = 0, yield "", yield* this.parseLineStart();
9433
+ if ((n !== -1 && n < this.indentNext && r[0] !== "#" || n === 0 && (r.startsWith("---") || r.startsWith("...")) && wc(r[3])) && (n !== this.indentNext - 1 || this.flowLevel !== 1 || r[0] !== "]" && r[0] !== "}")) return this.flowLevel = 0, yield "", yield* this.parseLineStart();
8895
9434
  let i = 0;
8896
9435
  for (; r[i] === ",";) i += yield* this.pushCount(1), i += yield* this.pushSpaces(!0), this.flowKey = !1;
8897
9436
  switch (i += yield* this.pushIndicators(), r[i]) {
@@ -8901,12 +9440,12 @@ var wc = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Tc = /* @__PURE__ */
8901
9440
  case "[": return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel += 1, "flow";
8902
9441
  case "}":
8903
9442
  case "]": return yield* this.pushCount(1), this.flowKey = !0, --this.flowLevel, this.flowLevel ? "flow" : "doc";
8904
- case "*": return yield* this.pushUntil(Oc), "flow";
9443
+ case "*": return yield* this.pushUntil(kc), "flow";
8905
9444
  case "\"":
8906
9445
  case "'": return this.flowKey = !0, yield* this.parseQuotedScalar();
8907
9446
  case ":": {
8908
9447
  let e = this.charAt(1);
8909
- if (this.flowKey || Cc(e) || e === ",") return this.flowKey = !1, yield* this.pushCount(1), yield* this.pushSpaces(!0), "flow";
9448
+ if (this.flowKey || wc(e) || e === ",") return this.flowKey = !1, yield* this.pushCount(1), yield* this.pushSpaces(!0), "flow";
8910
9449
  }
8911
9450
  default: return this.flowKey = !1, yield* this.parsePlainScalar();
8912
9451
  }
@@ -8944,7 +9483,7 @@ var wc = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Tc = /* @__PURE__ */
8944
9483
  else if (t > "0" && t <= "9") this.blockScalarIndent = Number(t) - 1;
8945
9484
  else if (t !== "-") break;
8946
9485
  }
8947
- return yield* this.pushUntil((e) => Cc(e) || e === "#");
9486
+ return yield* this.pushUntil((e) => wc(e) || e === "#");
8948
9487
  }
8949
9488
  *parseBlockScalar() {
8950
9489
  let e = this.pos - 1, t = 0, n;
@@ -8994,18 +9533,18 @@ var wc = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Tc = /* @__PURE__ */
8994
9533
  let e = this.flowLevel > 0, t = this.pos - 1, n = this.pos - 1, r;
8995
9534
  for (; r = this.buffer[++n];) if (r === ":") {
8996
9535
  let r = this.buffer[n + 1];
8997
- if (Cc(r) || e && Ec.has(r)) break;
9536
+ if (wc(r) || e && Dc.has(r)) break;
8998
9537
  t = n;
8999
- } else if (Cc(r)) {
9538
+ } else if (wc(r)) {
9000
9539
  let i = this.buffer[n + 1];
9001
- if (r === "\r" && (i === "\n" ? (n += 1, r = "\n", i = this.buffer[n + 1]) : t = n), i === "#" || e && Ec.has(i)) break;
9540
+ if (r === "\r" && (i === "\n" ? (n += 1, r = "\n", i = this.buffer[n + 1]) : t = n), i === "#" || e && Dc.has(i)) break;
9002
9541
  if (r === "\n") {
9003
9542
  let e = this.continueScalar(n + 1);
9004
9543
  if (e === -1) break;
9005
9544
  n = Math.max(n, e - 2);
9006
9545
  }
9007
9546
  } else {
9008
- if (e && Ec.has(r)) break;
9547
+ if (e && Dc.has(r)) break;
9009
9548
  t = n;
9010
9549
  }
9011
9550
  return !r && !this.atEnd ? this.setNext("plain-scalar") : (yield "", yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
@@ -9025,13 +9564,13 @@ var wc = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Tc = /* @__PURE__ */
9025
9564
  e += yield* this.pushTag(), e += yield* this.pushSpaces(!0);
9026
9565
  continue loop;
9027
9566
  case "&":
9028
- e += yield* this.pushUntil(Oc), e += yield* this.pushSpaces(!0);
9567
+ e += yield* this.pushUntil(kc), e += yield* this.pushSpaces(!0);
9029
9568
  continue loop;
9030
9569
  case "-":
9031
9570
  case "?":
9032
9571
  case ":": {
9033
9572
  let t = this.flowLevel > 0, n = this.charAt(1);
9034
- if (Cc(n) || t && Ec.has(n)) {
9573
+ if (wc(n) || t && Dc.has(n)) {
9035
9574
  t ? this.flowKey &&= !1 : this.indentNext = this.indentValue + 1, e += yield* this.pushCount(1), e += yield* this.pushSpaces(!0);
9036
9575
  continue loop;
9037
9576
  }
@@ -9044,13 +9583,13 @@ var wc = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Tc = /* @__PURE__ */
9044
9583
  *pushTag() {
9045
9584
  if (this.charAt(1) === "<") {
9046
9585
  let e = this.pos + 2, t = this.buffer[e];
9047
- for (; !Cc(t) && t !== ">";) t = this.buffer[++e];
9586
+ for (; !wc(t) && t !== ">";) t = this.buffer[++e];
9048
9587
  return yield* this.pushToIndex(t === ">" ? e + 1 : e, !1);
9049
9588
  }
9050
9589
  {
9051
9590
  let e = this.pos + 1, t = this.buffer[e];
9052
- for (; t;) if (Tc.has(t)) t = this.buffer[++e];
9053
- else if (t === "%" && wc.has(this.buffer[e + 1]) && wc.has(this.buffer[e + 2])) t = this.buffer[e += 3];
9591
+ for (; t;) if (Ec.has(t)) t = this.buffer[++e];
9592
+ else if (t === "%" && Tc.has(this.buffer[e + 1]) && Tc.has(this.buffer[e + 2])) t = this.buffer[e += 3];
9054
9593
  else break;
9055
9594
  return yield* this.pushToIndex(e, !1);
9056
9595
  }
@@ -9072,7 +9611,7 @@ var wc = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Tc = /* @__PURE__ */
9072
9611
  for (; !e(n);) n = this.buffer[++t];
9073
9612
  return yield* this.pushToIndex(t, !1);
9074
9613
  }
9075
- }, Ac = class {
9614
+ }, jc = class {
9076
9615
  constructor() {
9077
9616
  this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
9078
9617
  let t = 0, n = this.lineStarts.length;
@@ -9098,11 +9637,11 @@ var wc = /* @__PURE__ */ new Set("0123456789ABCDEFabcdef"), Tc = /* @__PURE__ */
9098
9637
  };
9099
9638
  //#endregion
9100
9639
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/parse/parser.js
9101
- function jc(e, t) {
9640
+ function Mc(e, t) {
9102
9641
  for (let n = 0; n < e.length; ++n) if (e[n].type === t) return !0;
9103
9642
  return !1;
9104
9643
  }
9105
- function Mc(e) {
9644
+ function Nc(e) {
9106
9645
  for (let t = 0; t < e.length; ++t) switch (e[t].type) {
9107
9646
  case "space":
9108
9647
  case "comment":
@@ -9111,7 +9650,7 @@ function Mc(e) {
9111
9650
  }
9112
9651
  return -1;
9113
9652
  }
9114
- function Nc(e) {
9653
+ function Pc(e) {
9115
9654
  switch (e?.type) {
9116
9655
  case "alias":
9117
9656
  case "scalar":
@@ -9121,7 +9660,7 @@ function Nc(e) {
9121
9660
  default: return !1;
9122
9661
  }
9123
9662
  }
9124
- function Pc(e) {
9663
+ function Fc(e) {
9125
9664
  switch (e.type) {
9126
9665
  case "document": return e.start;
9127
9666
  case "block-map": {
@@ -9133,7 +9672,7 @@ function Pc(e) {
9133
9672
  default: return [];
9134
9673
  }
9135
9674
  }
9136
- function Fc(e) {
9675
+ function Ic(e) {
9137
9676
  if (e.length === 0) return [];
9138
9677
  let t = e.length;
9139
9678
  loop: for (; --t >= 0;) switch (e[t].type) {
@@ -9146,16 +9685,16 @@ function Fc(e) {
9146
9685
  for (; e[++t]?.type === "space";);
9147
9686
  return e.splice(t, e.length);
9148
9687
  }
9149
- function Ic(e, t) {
9688
+ function Lc(e, t) {
9150
9689
  if (t.length < 1e5) Array.prototype.push.apply(e, t);
9151
9690
  else for (let n = 0; n < t.length; ++n) e.push(t[n]);
9152
9691
  }
9153
- function Lc(e) {
9154
- if (e.start.type === "flow-seq-start") for (let t of e.items) t.sep && !t.value && !jc(t.start, "explicit-key-ind") && !jc(t.sep, "map-value-ind") && (t.key && (t.value = t.key), delete t.key, Nc(t.value) ? t.value.end ? Ic(t.value.end, t.sep) : t.value.end = t.sep : Ic(t.start, t.sep), delete t.sep);
9692
+ function Rc(e) {
9693
+ if (e.start.type === "flow-seq-start") for (let t of e.items) t.sep && !t.value && !Mc(t.start, "explicit-key-ind") && !Mc(t.sep, "map-value-ind") && (t.key && (t.value = t.key), delete t.key, Pc(t.value) ? t.value.end ? Lc(t.value.end, t.sep) : t.value.end = t.sep : Lc(t.start, t.sep), delete t.sep);
9155
9694
  }
9156
- var Rc = class {
9695
+ var zc = class {
9157
9696
  constructor(e) {
9158
- this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new kc(), this.onNewLine = e;
9697
+ this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new Ac(), this.onNewLine = e;
9159
9698
  }
9160
9699
  *parse(e, t = !1) {
9161
9700
  this.onNewLine && this.offset === 0 && this.onNewLine(0);
@@ -9167,7 +9706,7 @@ var Rc = class {
9167
9706
  this.atScalar = !1, yield* this.step(), this.offset += e.length;
9168
9707
  return;
9169
9708
  }
9170
- let t = Sc(e);
9709
+ let t = Cc(e);
9171
9710
  if (!t) {
9172
9711
  let t = `Not a YAML token: ${e}`;
9173
9712
  yield* this.pop({
@@ -9250,7 +9789,7 @@ var Rc = class {
9250
9789
  else if (this.stack.length === 0) yield t;
9251
9790
  else {
9252
9791
  let e = this.peek(1);
9253
- switch (t.type === "block-scalar" ? t.indent = "indent" in e ? e.indent : 0 : t.type === "flow-collection" && e.type === "document" && (t.indent = 0), t.type === "flow-collection" && Lc(t), e.type) {
9792
+ switch (t.type === "block-scalar" ? t.indent = "indent" in e ? e.indent : 0 : t.type === "flow-collection" && e.type === "document" && (t.indent = 0), t.type === "flow-collection" && Rc(t), e.type) {
9254
9793
  case "document":
9255
9794
  e.value = t;
9256
9795
  break;
@@ -9302,7 +9841,7 @@ var Rc = class {
9302
9841
  }
9303
9842
  if ((e.type === "document" || e.type === "block-map" || e.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
9304
9843
  let n = t.items[t.items.length - 1];
9305
- n && !n.sep && !n.value && n.start.length > 0 && Mc(n.start) === -1 && (t.indent === 0 || n.start.every((e) => e.type !== "comment" || e.indent < t.indent)) && (e.type === "document" ? e.end = n.start : e.items.push({ start: n.start }), t.items.splice(-1, 1));
9844
+ n && !n.sep && !n.value && n.start.length > 0 && Nc(n.start) === -1 && (t.indent === 0 || n.start.every((e) => e.type !== "comment" || e.indent < t.indent)) && (e.type === "document" ? e.end = n.start : e.items.push({ start: n.start }), t.items.splice(-1, 1));
9306
9845
  }
9307
9846
  }
9308
9847
  }
@@ -9343,7 +9882,7 @@ var Rc = class {
9343
9882
  if (e.value) return yield* this.lineEnd(e);
9344
9883
  switch (this.type) {
9345
9884
  case "doc-start":
9346
- Mc(e.start) === -1 ? e.start.push(this.sourceToken) : (yield* this.pop(), yield* this.step());
9885
+ Nc(e.start) === -1 ? e.start.push(this.sourceToken) : (yield* this.pop(), yield* this.step());
9347
9886
  return;
9348
9887
  case "anchor":
9349
9888
  case "tag":
@@ -9363,7 +9902,7 @@ var Rc = class {
9363
9902
  }
9364
9903
  *scalar(e) {
9365
9904
  if (this.type === "map-value-ind") {
9366
- let t = Fc(Pc(this.peek(2))), n;
9905
+ let t = Ic(Fc(this.peek(2))), n;
9367
9906
  e.end ? (n = e.end, n.push(this.sourceToken), delete e.end) : n = [this.sourceToken];
9368
9907
  let r = {
9369
9908
  type: "block-map",
@@ -9413,7 +9952,7 @@ var Rc = class {
9413
9952
  if (this.atIndentedComment(t.start, e.indent)) {
9414
9953
  let n = e.items[e.items.length - 2]?.value?.end;
9415
9954
  if (Array.isArray(n)) {
9416
- Ic(n, t.start), n.push(this.sourceToken), e.items.pop();
9955
+ Lc(n, t.start), n.push(this.sourceToken), e.items.pop();
9417
9956
  return;
9418
9957
  }
9419
9958
  }
@@ -9462,12 +10001,12 @@ var Rc = class {
9462
10001
  case "map-value-ind":
9463
10002
  if (t.explicitKey) {
9464
10003
  if (!t.sep) {
9465
- if (jc(t.start, "newline")) Object.assign(t, {
10004
+ if (Mc(t.start, "newline")) Object.assign(t, {
9466
10005
  key: null,
9467
10006
  sep: [this.sourceToken]
9468
10007
  });
9469
10008
  else {
9470
- let e = Fc(t.start);
10009
+ let e = Ic(t.start);
9471
10010
  this.stack.push({
9472
10011
  type: "block-map",
9473
10012
  offset: this.offset,
@@ -9484,7 +10023,7 @@ var Rc = class {
9484
10023
  key: null,
9485
10024
  sep: [this.sourceToken]
9486
10025
  });
9487
- else if (jc(t.sep, "map-value-ind")) this.stack.push({
10026
+ else if (Mc(t.sep, "map-value-ind")) this.stack.push({
9488
10027
  type: "block-map",
9489
10028
  offset: this.offset,
9490
10029
  indent: this.indent,
@@ -9494,8 +10033,8 @@ var Rc = class {
9494
10033
  sep: [this.sourceToken]
9495
10034
  }]
9496
10035
  });
9497
- else if (Nc(t.key) && !jc(t.sep, "newline")) {
9498
- let e = Fc(t.start), n = t.key, r = t.sep;
10036
+ else if (Pc(t.key) && !Mc(t.sep, "newline")) {
10037
+ let e = Ic(t.start), n = t.key, r = t.sep;
9499
10038
  r.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
9500
10039
  type: "block-map",
9501
10040
  offset: this.offset,
@@ -9511,7 +10050,7 @@ var Rc = class {
9511
10050
  start: i,
9512
10051
  key: null,
9513
10052
  sep: [this.sourceToken]
9514
- }) : jc(t.sep, "map-value-ind") ? this.stack.push({
10053
+ }) : Mc(t.sep, "map-value-ind") ? this.stack.push({
9515
10054
  type: "block-map",
9516
10055
  offset: this.offset,
9517
10056
  indent: this.indent,
@@ -9545,7 +10084,7 @@ var Rc = class {
9545
10084
  let r = this.startBlockValue(e);
9546
10085
  if (r) {
9547
10086
  if (r.type === "block-seq") {
9548
- if (!t.explicitKey && t.sep && !jc(t.sep, "newline")) {
10087
+ if (!t.explicitKey && t.sep && !Mc(t.sep, "newline")) {
9549
10088
  yield* this.pop({
9550
10089
  type: "error",
9551
10090
  offset: this.offset,
@@ -9579,7 +10118,7 @@ var Rc = class {
9579
10118
  if (this.atIndentedComment(t.start, e.indent)) {
9580
10119
  let n = e.items[e.items.length - 2]?.value?.end;
9581
10120
  if (Array.isArray(n)) {
9582
- Ic(n, t.start), n.push(this.sourceToken), e.items.pop();
10121
+ Lc(n, t.start), n.push(this.sourceToken), e.items.pop();
9583
10122
  return;
9584
10123
  }
9585
10124
  }
@@ -9593,7 +10132,7 @@ var Rc = class {
9593
10132
  return;
9594
10133
  case "seq-item-ind":
9595
10134
  if (this.indent !== e.indent) break;
9596
- t.value || jc(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
10135
+ t.value || Mc(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
9597
10136
  return;
9598
10137
  }
9599
10138
  if (this.indent > e.indent) {
@@ -9662,8 +10201,8 @@ var Rc = class {
9662
10201
  let t = this.peek(2);
9663
10202
  if (t.type === "block-map" && (this.type === "map-value-ind" && t.indent === e.indent || this.type === "newline" && !t.items[t.items.length - 1].sep)) yield* this.pop(), yield* this.step();
9664
10203
  else if (this.type === "map-value-ind" && t.type !== "flow-collection") {
9665
- let n = Fc(Pc(t));
9666
- Lc(e);
10204
+ let n = Ic(Fc(t));
10205
+ Rc(e);
9667
10206
  let r = e.end.splice(1, e.end.length);
9668
10207
  r.push(this.sourceToken);
9669
10208
  let i = {
@@ -9722,7 +10261,7 @@ var Rc = class {
9722
10261
  };
9723
10262
  case "explicit-key-ind": {
9724
10263
  this.onKeyLine = !0;
9725
- let t = Fc(Pc(e));
10264
+ let t = Ic(Fc(e));
9726
10265
  return t.push(this.sourceToken), {
9727
10266
  type: "block-map",
9728
10267
  offset: this.offset,
@@ -9735,7 +10274,7 @@ var Rc = class {
9735
10274
  }
9736
10275
  case "map-value-ind": {
9737
10276
  this.onKeyLine = !0;
9738
- let t = Fc(Pc(e));
10277
+ let t = Ic(Fc(e));
9739
10278
  return {
9740
10279
  type: "block-map",
9741
10280
  offset: this.offset,
@@ -9773,39 +10312,39 @@ var Rc = class {
9773
10312
  };
9774
10313
  //#endregion
9775
10314
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/dist/public-api.js
9776
- function zc(e) {
10315
+ function Bc(e) {
9777
10316
  let t = e.prettyErrors !== !1;
9778
10317
  return {
9779
- lineCounter: e.lineCounter || t && new Ac() || null,
10318
+ lineCounter: e.lineCounter || t && new jc() || null,
9780
10319
  prettyErrors: t
9781
10320
  };
9782
10321
  }
9783
- function Bc(e, t = {}) {
9784
- let { lineCounter: n, prettyErrors: r } = zc(t), i = new Rc(n?.addNewLine), a = new rc(t), o = Array.from(a.compose(i.parse(e)));
9785
- if (r && n) for (let t of o) t.errors.forEach(xs(e, n)), t.warnings.forEach(xs(e, n));
10322
+ function Vc(e, t = {}) {
10323
+ let { lineCounter: n, prettyErrors: r } = Bc(t), i = new zc(n?.addNewLine), a = new ic(t), o = Array.from(a.compose(i.parse(e)));
10324
+ if (r && n) for (let t of o) t.errors.forEach(Ss(e, n)), t.warnings.forEach(Ss(e, n));
9786
10325
  return o.length > 0 ? o : Object.assign([], { empty: !0 }, a.streamInfo());
9787
10326
  }
9788
- function Vc(e, t = {}) {
9789
- let { lineCounter: n, prettyErrors: r } = zc(t), i = new Rc(n?.addNewLine), a = new rc(t), o = null;
10327
+ function Hc(e, t = {}) {
10328
+ let { lineCounter: n, prettyErrors: r } = Bc(t), i = new zc(n?.addNewLine), a = new ic(t), o = null;
9790
10329
  for (let t of a.compose(i.parse(e), !0, e.length)) if (!o) o = t;
9791
10330
  else if (o.options.logLevel !== "silent") {
9792
- o.errors.push(new ys(t.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
10331
+ o.errors.push(new bs(t.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
9793
10332
  break;
9794
10333
  }
9795
- return r && n && (o.errors.forEach(xs(e, n)), o.warnings.forEach(xs(e, n))), o;
10334
+ return r && n && (o.errors.forEach(Ss(e, n)), o.warnings.forEach(Ss(e, n))), o;
9796
10335
  }
9797
- function Hc(e, t, n) {
10336
+ function Uc(e, t, n) {
9798
10337
  let r;
9799
10338
  typeof t == "function" ? r = t : n === void 0 && t && typeof t == "object" && (n = t);
9800
- let i = Vc(e, n);
10339
+ let i = Hc(e, n);
9801
10340
  if (!i) return null;
9802
- if (i.warnings.forEach((e) => Qa(i.options.logLevel, e)), i.errors.length > 0) {
10341
+ if (i.warnings.forEach((e) => $a(i.options.logLevel, e)), i.errors.length > 0) {
9803
10342
  if (i.options.logLevel !== "silent") throw i.errors[0];
9804
10343
  i.errors = [];
9805
10344
  }
9806
10345
  return i.toJS(Object.assign({ reviver: r }, n));
9807
10346
  }
9808
- function Uc(e, t, n) {
10347
+ function Wc(e, t, n) {
9809
10348
  let r = null;
9810
10349
  if (typeof t == "function" || Array.isArray(t) ? r = t : n === void 0 && t && (n = t), typeof n == "string" && (n = n.length), typeof n == "number") {
9811
10350
  let e = Math.round(n);
@@ -9815,41 +10354,41 @@ function Uc(e, t, n) {
9815
10354
  let { keepUndefined: e } = n ?? t ?? {};
9816
10355
  if (!e) return;
9817
10356
  }
9818
- return Zi(e) && !r ? e.toString(n) : new gs(e, r, n).toString(n);
10357
+ return Qi(e) && !r ? e.toString(n) : new _s(e, r, n).toString(n);
9819
10358
  }
9820
10359
  //#endregion
9821
10360
  //#region node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/browser/index.js
9822
- var Wc = /* @__PURE__ */ v({
9823
- Alias: () => ba,
9824
- CST: () => vc,
9825
- Composer: () => rc,
9826
- Document: () => gs,
9827
- Lexer: () => kc,
9828
- LineCounter: () => Ac,
10361
+ var Gc = /* @__PURE__ */ v({
10362
+ Alias: () => xa,
10363
+ CST: () => yc,
10364
+ Composer: () => ic,
10365
+ Document: () => _s,
10366
+ Lexer: () => Ac,
10367
+ LineCounter: () => jc,
9829
10368
  Pair: () => Q,
9830
- Parser: () => Rc,
10369
+ Parser: () => zc,
9831
10370
  Scalar: () => Z,
9832
- Schema: () => ms,
9833
- YAMLError: () => vs,
10371
+ Schema: () => hs,
10372
+ YAMLError: () => ys,
9834
10373
  YAMLMap: () => $,
9835
- YAMLParseError: () => ys,
9836
- YAMLSeq: () => ho,
9837
- YAMLWarning: () => bs,
9838
- isAlias: () => Xi,
10374
+ YAMLParseError: () => bs,
10375
+ YAMLSeq: () => go,
10376
+ YAMLWarning: () => xs,
10377
+ isAlias: () => Zi,
9839
10378
  isCollection: () => J,
9840
- isDocument: () => Zi,
9841
- isMap: () => Qi,
10379
+ isDocument: () => Qi,
10380
+ isMap: () => $i,
9842
10381
  isNode: () => Y,
9843
10382
  isPair: () => K,
9844
10383
  isScalar: () => q,
9845
- isSeq: () => $i,
9846
- parse: () => Hc,
9847
- parseAllDocuments: () => Bc,
9848
- parseDocument: () => Vc,
9849
- stringify: () => Uc,
9850
- visit: () => ra,
9851
- visitAsync: () => aa
9852
- }), Gc = [
10384
+ isSeq: () => ea,
10385
+ parse: () => Uc,
10386
+ parseAllDocuments: () => Vc,
10387
+ parseDocument: () => Hc,
10388
+ stringify: () => Wc,
10389
+ visit: () => ia,
10390
+ visitAsync: () => oa
10391
+ }), Kc = [
9853
10392
  {
9854
10393
  version: "001_add_workflow_enabled",
9855
10394
  async apply() {
@@ -9869,18 +10408,18 @@ var Wc = /* @__PURE__ */ v({
9869
10408
  }
9870
10409
  }
9871
10410
  ];
9872
- async function Kc() {
10411
+ async function qc() {
9873
10412
  await C.exec("\n CREATE TABLE IF NOT EXISTS schema_migrations (\n version TEXT PRIMARY KEY,\n applied_at DATETIME DEFAULT CURRENT_TIMESTAMP\n )\n ");
9874
10413
  let e = new Set((await C.all("SELECT version FROM schema_migrations")).map((e) => e.version));
9875
- for (let t of Gc) e.has(t.version) || (await t.apply(), await C.run("INSERT INTO schema_migrations (version) VALUES (?)", [t.version]));
10414
+ for (let t of Kc) e.has(t.version) || (await t.apply(), await C.run("INSERT INTO schema_migrations (version) VALUES (?)", [t.version]));
9876
10415
  }
9877
- function qc(e) {
10416
+ function Jc(e) {
9878
10417
  let t = String(e || "").toLowerCase().replace(/[^a-z0-9]/g, "-").replace(/^-+|-+$/g, "");
9879
10418
  if (!t) throw Error("Workflow requires a name or id");
9880
10419
  return t;
9881
10420
  }
9882
- function Jc(e) {
9883
- let t = Wc.parse(e);
10421
+ function Yc(e) {
10422
+ let t = Gc.parse(e);
9884
10423
  if (!t || typeof t != "object" || Array.isArray(t)) throw Error("Workflow must be a YAML object");
9885
10424
  if (t.includes) throw Error("includes is not supported for database workflows");
9886
10425
  if (typeof t.name != "string" || !t.name.trim()) throw Error("Workflow name is required");
@@ -9907,7 +10446,7 @@ function Jc(e) {
9907
10446
  if (a && a.paths.some((e) => typeof e != "string" || !e.trim())) throw Error("artifacts.paths must contain non-empty strings");
9908
10447
  if (o && (typeof o.key != "string" || !o.key.trim() || o.paths.some((e) => typeof e != "string" || !e.trim()))) throw Error("cache requires a non-empty key and paths");
9909
10448
  return [{
9910
- id: qc(t.id || t.name),
10449
+ id: Jc(t.id || t.name),
9911
10450
  name: t.name,
9912
10451
  matrix: t.matrix,
9913
10452
  on: {
@@ -9926,12 +10465,12 @@ function Jc(e) {
9926
10465
  tags: Array.isArray(t.tags) ? [...new Set(t.tags.filter((e) => typeof e == "string").map((e) => e.trim()).filter(Boolean))] : void 0
9927
10466
  }];
9928
10467
  }
9929
- var Yc = class {
10468
+ var Xc = class {
9930
10469
  async init() {
9931
- await C.exec("\n CREATE TABLE IF NOT EXISTS workflows (\n id TEXT PRIMARY KEY, name TEXT NOT NULL, source_yaml TEXT NOT NULL,\n status TEXT NOT NULL DEFAULT 'draft', active_revision INTEGER, enabled INTEGER NOT NULL DEFAULT 1,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP\n );\n CREATE TABLE IF NOT EXISTS workflow_revisions (\n workflow_id TEXT NOT NULL, revision INTEGER NOT NULL, source_yaml TEXT NOT NULL,\n normalized_json TEXT NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (workflow_id, revision)\n );\n CREATE TABLE IF NOT EXISTS scheduled_runs (\n workflow_id TEXT NOT NULL, trigger_id TEXT NOT NULL, scheduled_for TEXT NOT NULL,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (workflow_id, trigger_id, scheduled_for)\n );\n "), await Kc();
10470
+ await C.exec("\n CREATE TABLE IF NOT EXISTS workflows (\n id TEXT PRIMARY KEY, name TEXT NOT NULL, source_yaml TEXT NOT NULL,\n status TEXT NOT NULL DEFAULT 'draft', active_revision INTEGER, enabled INTEGER NOT NULL DEFAULT 1,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP\n );\n CREATE TABLE IF NOT EXISTS workflow_revisions (\n workflow_id TEXT NOT NULL, revision INTEGER NOT NULL, source_yaml TEXT NOT NULL,\n normalized_json TEXT NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (workflow_id, revision)\n );\n CREATE TABLE IF NOT EXISTS scheduled_runs (\n workflow_id TEXT NOT NULL, trigger_id TEXT NOT NULL, scheduled_for TEXT NOT NULL,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n PRIMARY KEY (workflow_id, trigger_id, scheduled_for)\n );\n "), await qc();
9932
10471
  }
9933
10472
  validate(e) {
9934
- let t = Jc(e);
10473
+ let t = Yc(e);
9935
10474
  for (let e of t) {
9936
10475
  for (let t of e.schedule || []) if (typeof t.cron != "string" || t.cron.trim().split(/\s+/).length !== 5) throw Error("schedule.cron must have five fields");
9937
10476
  for (let t of e.solar || []) if (!t.event || !Number.isFinite(t.latitude) || !Number.isFinite(t.longitude)) throw Error("solar triggers require event, latitude, and longitude");
@@ -9941,7 +10480,7 @@ var Yc = class {
9941
10480
  async saveDraft(e, t, n = !0) {
9942
10481
  let r = this.validate(t);
9943
10482
  if (r.length !== 1) throw Error("Workflow must contain exactly one definition");
9944
- let i = qc(e);
10483
+ let i = Jc(e);
9945
10484
  r[0].id = i;
9946
10485
  let a = await C.get("SELECT COALESCE(MAX(revision), 0) AS revision FROM workflow_revisions WHERE workflow_id = ?", [i]), o = Number(a?.revision || 0) + 1;
9947
10486
  return await C.run("INSERT INTO workflows (id, name, source_yaml, status, enabled) VALUES (?, ?, ?, 'draft', ?)\n ON CONFLICT(id) DO UPDATE SET name = excluded.name, source_yaml = excluded.source_yaml, status = 'draft', enabled = excluded.enabled, updated_at = CURRENT_TIMESTAMP", [
@@ -10032,10 +10571,10 @@ var Yc = class {
10032
10571
  n
10033
10572
  ]);
10034
10573
  }
10035
- }, Xc = 50, Zc = 500, Qc = class e {
10574
+ }, Zc = 50, Qc = 500, $c = class e {
10036
10575
  server;
10037
10576
  preprocessors = /* @__PURE__ */ new Map();
10038
- workflows = new Yc();
10577
+ workflows = new Xc();
10039
10578
  secretRepository = new er();
10040
10579
  queue;
10041
10580
  secrets;
@@ -10073,10 +10612,14 @@ var Yc = class {
10073
10612
  "Content-Type": "text/html; charset=utf-8",
10074
10613
  "Cache-Control": "no-store"
10075
10614
  }), t.end(Vi(n.searchParams.get("embed") === "1"));
10615
+ if (e.method === "GET" && n.pathname === "/api") return t.writeHead(200, {
10616
+ "Cache-Control": "no-store",
10617
+ "Content-Type": "application/json; charset=utf-8"
10618
+ }), t.end(JSON.stringify(Hi));
10076
10619
  if (e.method === "GET" && n.pathname === "/workflows") return this.requireAdmin(e, t) ? (t.writeHead(200, {
10077
10620
  "Content-Type": "text/html; charset=utf-8",
10078
10621
  "Cache-Control": "no-store"
10079
- }), t.end(Ui("list"))) : void 0;
10622
+ }), t.end(Wi("list"))) : void 0;
10080
10623
  let r = n.pathname.match(/^\/workflows\/(new|[a-z0-9-]+)$/);
10081
10624
  if (e.method === "GET" && r) {
10082
10625
  if (!this.requireAdmin(e, t)) return;
@@ -10086,11 +10629,11 @@ var Yc = class {
10086
10629
  "Cache-Control": "no-store"
10087
10630
  });
10088
10631
  let a = n.searchParams.get("revision"), o = a === null ? void 0 : Number(a), s = o !== void 0 && Number.isSafeInteger(o) && o > 0 ? o : void 0;
10089
- return t.end(Ui("editor", i, s));
10632
+ return t.end(Wi("editor", i, s));
10090
10633
  }
10091
10634
  if (e.method === "GET" && n.pathname === "/api/jobs") {
10092
- let e = n.searchParams.get("afterId"), r = n.searchParams.get("beforeId"), i = n.searchParams.get("limit"), a = n.searchParams.get("filter")?.trim() || void 0, o = e === null ? void 0 : Number(e), s = r === null ? void 0 : Number(r), c = i === null ? Xc : Number(i);
10093
- return o !== void 0 && (!Number.isSafeInteger(o) || o < 0) ? (t.writeHead(400, { "Content-Type": "application/json; charset=utf-8" }), t.end(JSON.stringify({ error: "afterId must be a non-negative integer" }))) : s !== void 0 && (!Number.isSafeInteger(s) || s < 1) ? (t.writeHead(400, { "Content-Type": "application/json; charset=utf-8" }), t.end(JSON.stringify({ error: "beforeId must be a positive integer" }))) : !Number.isSafeInteger(c) || c < 1 || c > Zc ? (t.writeHead(400, { "Content-Type": "application/json; charset=utf-8" }), t.end(JSON.stringify({ error: `limit must be an integer from 1 to ${Zc}` }))) : a && a.length > 200 ? (t.writeHead(400, { "Content-Type": "application/json; charset=utf-8" }), t.end(JSON.stringify({ error: "filter must be at most 200 characters" }))) : this.renderDashboardJobs(t, c, o, s, a);
10635
+ let e = n.searchParams.get("afterId"), r = n.searchParams.get("beforeId"), i = n.searchParams.get("limit"), a = n.searchParams.get("filter")?.trim() || void 0, o = e === null ? void 0 : Number(e), s = r === null ? void 0 : Number(r), c = i === null ? Zc : Number(i);
10636
+ return o !== void 0 && (!Number.isSafeInteger(o) || o < 0) ? (t.writeHead(400, { "Content-Type": "application/json; charset=utf-8" }), t.end(JSON.stringify({ error: "afterId must be a non-negative integer" }))) : s !== void 0 && (!Number.isSafeInteger(s) || s < 1) ? (t.writeHead(400, { "Content-Type": "application/json; charset=utf-8" }), t.end(JSON.stringify({ error: "beforeId must be a positive integer" }))) : !Number.isSafeInteger(c) || c < 1 || c > Qc ? (t.writeHead(400, { "Content-Type": "application/json; charset=utf-8" }), t.end(JSON.stringify({ error: `limit must be an integer from 1 to ${Qc}` }))) : a && a.length > 200 ? (t.writeHead(400, { "Content-Type": "application/json; charset=utf-8" }), t.end(JSON.stringify({ error: "filter must be at most 200 characters" }))) : this.renderDashboardJobs(t, c, o, s, a);
10094
10637
  }
10095
10638
  if (e.method === "GET" && n.pathname === "/api/events") return this.events.subscribe(e, t);
10096
10639
  if (e.method === "GET" && n.pathname === "/api/push/public-key") return this.handlePushPublicKey(t);
@@ -10389,7 +10932,7 @@ var Yc = class {
10389
10932
  }
10390
10933
  }
10391
10934
  async renderDashboard(e) {
10392
- let t = await this.queue.listJobs(51), n = _e(t.slice(0, Xc)), r = await this.redactText(ve(n, t.length > Xc));
10935
+ let t = await this.queue.listJobs(51), n = _e(t.slice(0, Zc)), r = await this.redactText(ve(n, t.length > Zc));
10393
10936
  e.writeHead(200, { "Content-Type": "text/html; charset=utf-8" }), e.end(r);
10394
10937
  }
10395
10938
  async renderDashboardJobs(e, t, n, r, i) {
@@ -10478,7 +11021,7 @@ var Yc = class {
10478
11021
  });
10479
11022
  });
10480
11023
  }
10481
- }, $c = c(m), el = class {
11024
+ }, el = c(m), tl = class {
10482
11025
  name = "systemd";
10483
11026
  async isSupported() {
10484
11027
  try {
@@ -10602,7 +11145,7 @@ var Yc = class {
10602
11145
  cancel: async () => {
10603
11146
  f = !0;
10604
11147
  try {
10605
- t.image && await $c(`docker stop -t 2 ${s}`).catch(() => {}), await $c(`systemctl stop ${s}.service`).catch(() => {});
11148
+ t.image && await el(`docker stop -t 2 ${s}`).catch(() => {}), await el(`systemctl stop ${s}.service`).catch(() => {});
10606
11149
  } catch {}
10607
11150
  },
10608
11151
  logFilePath: o
@@ -10612,7 +11155,7 @@ var Yc = class {
10612
11155
  let t = await g(e, "utf-8"), n = t.includes("Running as unit: ") ? t.indexOf("\n") + 1 : 0, r = t.includes("Finished with result: ") ? t.lastIndexOf("Finished with result: ") : t.length;
10613
11156
  return t.slice(n, r);
10614
11157
  }
10615
- }, tl = class {
11158
+ }, nl = class {
10616
11159
  name = "standard-process";
10617
11160
  async isSupported() {
10618
11161
  return !0;
@@ -10728,19 +11271,19 @@ var Yc = class {
10728
11271
  };
10729
11272
  //#endregion
10730
11273
  //#region src/drivers/index.ts
10731
- async function nl() {
10732
- let e = new el();
10733
- return await e.isSupported() ? (console.log("⚡ Selected Execution Driver: Systemd (cgroups enabled)"), e) : (console.log("📦 Selected Execution Driver: Standard Process (Fallback)"), new tl());
11274
+ async function rl() {
11275
+ let e = new tl();
11276
+ return await e.isSupported() ? (console.log("⚡ Selected Execution Driver: Systemd (cgroups enabled)"), e) : (console.log("📦 Selected Execution Driver: Standard Process (Fallback)"), new nl());
10734
11277
  }
10735
11278
  //#endregion
10736
11279
  //#region src/signals.ts
10737
- async function rl(e) {
11280
+ async function il(e) {
10738
11281
  let t = !1;
10739
11282
  async function n(n) {
10740
11283
  if (!t) {
10741
11284
  t = !0, console.log(`\n🛑 Received ${n}. Initiating graceful shutdown...`);
10742
11285
  try {
10743
- ll(), e.length > 0 && (console.log("⚙️ Waiting for active worker jobs to drain..."), await Promise.allSettled(e)), console.log("✨ Engine stopped cleanly. Goodbye!"), process.exit(0);
11286
+ ul(), e.length > 0 && (console.log("⚙️ Waiting for active worker jobs to drain..."), await Promise.allSettled(e)), console.log("✨ Engine stopped cleanly. Goodbye!"), process.exit(0);
10744
11287
  } catch (e) {
10745
11288
  console.error("❌ Error during graceful shutdown:", e.message), process.exit(1);
10746
11289
  }
@@ -10750,7 +11293,7 @@ async function rl(e) {
10750
11293
  }
10751
11294
  //#endregion
10752
11295
  //#region src/plugins/manager.ts
10753
- var il = class {
11296
+ var al = class {
10754
11297
  plugins;
10755
11298
  constructor(e = []) {
10756
11299
  this.plugins = e;
@@ -10772,38 +11315,38 @@ var il = class {
10772
11315
  console.error(`[Plugin Error] ${n.name}.onWorkflowFinish:`, e);
10773
11316
  }
10774
11317
  }
10775
- }, al = { isStopping: !1 }, ol = /* @__PURE__ */ new Set(), sl = null, cl = null;
10776
- function ll() {
10777
- al.isStopping = !0, sl?.abort(), cl?.();
11318
+ }, ol = { isStopping: !1 }, sl = /* @__PURE__ */ new Set(), cl = null, ll = null;
11319
+ function ul() {
11320
+ ol.isStopping = !0, cl?.abort(), ll?.();
10778
11321
  }
10779
- function ul(e, t, n, r) {
10780
- al.isStopping = !1;
10781
- let i = [dl(e, t, n, r)];
10782
- return rl(i), i;
11322
+ function dl(e, t, n, r) {
11323
+ ol.isStopping = !1;
11324
+ let i = [fl(e, t, n, r)];
11325
+ return il(i), i;
10783
11326
  }
10784
- async function dl(e, t, n, r) {
10785
- let i = await nl(), a = new Yc(), o = /* @__PURE__ */ new Set(), s = 0, c = null, l = () => {
11327
+ async function fl(e, t, n, r) {
11328
+ let i = await rl(), a = new Xc(), o = /* @__PURE__ */ new Set(), s = 0, c = null, l = () => {
10786
11329
  s++, c?.();
10787
11330
  };
10788
- cl = l, sl = new AbortController();
10789
- let u = fl(r, sl.signal, l);
10790
- for (console.log(`🚀 Worker scheduler started. Driver: ${i.name}. Concurrency: ${e}. Tags: ${r.tags.join(", ") || "(none)"}`); !al.isStopping;) {
11331
+ ll = l, cl = new AbortController();
11332
+ let u = pl(r, cl.signal, l);
11333
+ for (console.log(`🚀 Worker scheduler started. Driver: ${i.name}. Concurrency: ${e}. Tags: ${r.tags.join(", ") || "(none)"}`); !ol.isStopping;) {
10791
11334
  let n = s;
10792
11335
  try {
10793
- for (; o.size < e && !al.isStopping;) {
11336
+ for (; o.size < e && !ol.isStopping;) {
10794
11337
  let e = await t.claimNextJob(r.tags);
10795
11338
  if (!e) break;
10796
- if (al.isStopping) {
11339
+ if (ol.isStopping) {
10797
11340
  await t.releaseJob(e.id);
10798
11341
  break;
10799
11342
  }
10800
11343
  let n = process.env.WORKER_NAME || "cli", s;
10801
11344
  s = (async () => {
10802
- hl(r, e.id);
11345
+ gl(r, e.id);
10803
11346
  let o = await a.getRevision(e.workflow_id, e.workflow_revision);
10804
11347
  if (!o) throw await t.finishJob(e.id, "failed"), Error(`Workflow ${e.workflow_id} revision ${e.workflow_revision} was not found`);
10805
11348
  let s = new me();
10806
- s.replace(await gl(r, n, e.id)), await _l({
11349
+ s.replace(await _l(r, n, e.id)), await vl({
10807
11350
  workerId: n,
10808
11351
  job: e,
10809
11352
  queue: t,
@@ -10813,17 +11356,17 @@ async function dl(e, t, n, r) {
10813
11356
  workflow: o
10814
11357
  });
10815
11358
  })().catch((e) => console.error(`[${n}] ⚠️ Worker execution error:`, e)).finally(() => {
10816
- o.delete(s), hl(r, e.id), l();
11359
+ o.delete(s), gl(r, e.id), l();
10817
11360
  }), o.add(s);
10818
11361
  }
10819
11362
  } catch (e) {
10820
11363
  console.error("⚠️ Worker scheduler claim error:", e), setTimeout(l, 5e3).unref();
10821
11364
  }
10822
- !al.isStopping && s === n && (await pl(n, () => s, (e) => c = e), c = null);
11365
+ !ol.isStopping && s === n && (await ml(n, () => s, (e) => c = e), c = null);
10823
11366
  }
10824
- sl.abort(), await Promise.allSettled(o), await u, cl = null, console.log("🛑 Worker scheduler stopped cleanly.");
11367
+ cl.abort(), await Promise.allSettled(o), await u, ll = null, console.log("🛑 Worker scheduler stopped cleanly.");
10825
11368
  }
10826
- async function fl(e, t, n) {
11369
+ async function pl(e, t, n) {
10827
11370
  let r = 1e3;
10828
11371
  for (; !t.aborted;) {
10829
11372
  try {
@@ -10834,10 +11377,10 @@ async function fl(e, t, n) {
10834
11377
  if (t.aborted || e?.name === "AbortError") break;
10835
11378
  console.error(`⚠️ Worker event stream disconnected: ${e.message}`);
10836
11379
  }
10837
- await ml(r, t), r = Math.min(r * 2, 3e4);
11380
+ await hl(r, t), r = Math.min(r * 2, 3e4);
10838
11381
  }
10839
11382
  }
10840
- function pl(e, t, n) {
11383
+ function ml(e, t, n) {
10841
11384
  return new Promise((r) => {
10842
11385
  if (t() !== e) return r();
10843
11386
  let i = setTimeout(r, 6e4);
@@ -10846,7 +11389,7 @@ function pl(e, t, n) {
10846
11389
  });
10847
11390
  });
10848
11391
  }
10849
- function ml(e, t) {
11392
+ function hl(e, t) {
10850
11393
  return new Promise((n) => {
10851
11394
  if (t.aborted) return n();
10852
11395
  let r = () => {
@@ -10857,7 +11400,7 @@ function ml(e, t) {
10857
11400
  t.addEventListener("abort", r, { once: !0 });
10858
11401
  });
10859
11402
  }
10860
- async function hl(e, t) {
11403
+ async function gl(e, t) {
10861
11404
  if (e.workerToken) try {
10862
11405
  let n = await fetch(new URL("/api/events", e.serverUrl), {
10863
11406
  method: "POST",
@@ -10873,7 +11416,7 @@ async function hl(e, t) {
10873
11416
  Jn("Failed to publish job status event:", e);
10874
11417
  }
10875
11418
  }
10876
- async function gl(e, t, n) {
11419
+ async function _l(e, t, n) {
10877
11420
  if (!e.workerToken) return {};
10878
11421
  try {
10879
11422
  let r = await fetch(new URL(`/api/jobs/${n}/secrets`, e.serverUrl), {
@@ -10889,7 +11432,7 @@ async function gl(e, t, n) {
10889
11432
  throw console.error(`Unable to retrieve secrets for job ${n}:`, e), e;
10890
11433
  }
10891
11434
  }
10892
- async function _l(e) {
11435
+ async function vl(e) {
10893
11436
  let { workerId: t, job: n, config: r, secrets: a, queue: o } = e;
10894
11437
  console.log(`\n[${t}] 📦 Claimed Job #${n.id} (Workflow: ${n.workflow_id})`);
10895
11438
  let s = typeof n.payload == "string" ? JSON.parse(n.payload) : n.payload;
@@ -10914,10 +11457,10 @@ async function _l(e) {
10914
11457
  durationMs: 0,
10915
11458
  outputs: {},
10916
11459
  logContent: ""
10917
- })), b = jl(n, "running", p, f, _.env, y, s);
10918
- await o.saveReport(n.id, b), hl(r, n.id);
11460
+ })), b = Ml(n, "running", p, f, _.env, y, s);
11461
+ await o.saveReport(n.id, b), gl(r, n.id);
10919
11462
  try {
10920
- Object.assign(_.env, await xl(l.env, _)), Ol(l.secretFiles, a.getAll(), g), v = l.cache ? String(await Zn.evaluateValue(l.cache.key, _)) : "", v && l.cache && await Dl(o, "cache", `${n.workflow_id}:${v}`, l.cache.paths, g), await o.saveReport(n.id, b);
11463
+ Object.assign(_.env, await Sl(l.env, _)), kl(l.secretFiles, a.getAll(), g), v = l.cache ? String(await Zn.evaluateValue(l.cache.key, _)) : "", v && l.cache && await Ol(o, "cache", `${n.workflow_id}:${v}`, l.cache.paths, g), await o.saveReport(n.id, b);
10921
11464
  } catch (e) {
10922
11465
  b.status = "failed", b.finishedAt = (/* @__PURE__ */ new Date()).toISOString(), b.durationMs = Date.now() - p;
10923
11466
  let r = {
@@ -10930,31 +11473,31 @@ async function _l(e) {
10930
11473
  await o.completeJob(n.id, "failed", r), console.error(`[${t}] ❌ Job setup failed:`, e);
10931
11474
  return;
10932
11475
  }
10933
- let x = new il(r.plugins), S = {
11476
+ let x = new al(r.plugins), S = {
10934
11477
  jobId: String(n.id),
10935
11478
  workflowName: l.name,
10936
11479
  inputs: f,
10937
11480
  runUrl: new URL(`/runs/${n.id}`, r.serverUrl).toString()
10938
11481
  };
10939
11482
  await x.triggerWorkflowStart(S);
10940
- let { cancelled: ee, failed: te } = await vl({
11483
+ let { cancelled: ee, failed: te } = await yl({
10941
11484
  payload: s,
10942
11485
  steps: d,
10943
11486
  executionContext: _,
10944
11487
  ...u
10945
11488
  }, b), ne = ee ? "cancelled" : te ? "failed" : "success";
10946
11489
  if (ne === "success") try {
10947
- let e = l.artifacts ? await El(l.artifacts.paths, g) : [];
11490
+ let e = l.artifacts ? await Dl(l.artifacts.paths, g) : [];
10948
11491
  if (e.length && (await o.saveStoredFiles("artifact", String(n.id), e), b.artifacts = e.map((e) => e.path)), v && l.cache) {
10949
- let e = await El(l.cache.paths, g);
11492
+ let e = await Dl(l.cache.paths, g);
10950
11493
  e.length && await o.saveStoredFiles("cache", `${n.workflow_id}:${v}`, e);
10951
11494
  }
10952
11495
  } catch (e) {
10953
11496
  console.error(`[${t}] ⚠️ Failed to store workflow files:`, e), ne = "failed";
10954
11497
  }
10955
- b.status = ne, b.durationMs = Date.now() - p, b.finishedAt = (/* @__PURE__ */ new Date()).toISOString(), await o.completeJob(n.id, ne, b), hl(r, n.id), console.log(`[${t}] ✅ Job #${n.id} completed as: ${ne}`), await x.triggerWorkflowFinish(S, ne);
11498
+ b.status = ne, b.durationMs = Date.now() - p, b.finishedAt = (/* @__PURE__ */ new Date()).toISOString(), await o.completeJob(n.id, ne, b), gl(r, n.id), console.log(`[${t}] ✅ Job #${n.id} completed as: ${ne}`), await x.triggerWorkflowFinish(S, ne);
10956
11499
  }
10957
- async function vl(e, t) {
11500
+ async function yl(e, t) {
10958
11501
  let { driver: n, workerId: r, queue: i, config: a, job: o, payload: s, steps: c, executionContext: l } = e, u = t.steps, d = !1, f = !1, p = 0;
10959
11502
  try {
10960
11503
  for (let s = 0; s < c.length; s++) {
@@ -10969,14 +11512,14 @@ async function vl(e, t) {
10969
11512
  logContent: "",
10970
11513
  startedAt: h,
10971
11514
  finishedAt: void 0
10972
- }, t.durationMs = Date.now() - Date.parse(t.startedAt), await i.saveReport(o.id, t), hl(a, o.id);
11515
+ }, t.durationMs = Date.now() - Date.parse(t.startedAt), await i.saveReport(o.id, t), gl(a, o.id);
10973
11516
  let g = {
10974
11517
  failed: !0,
10975
11518
  skipped: !1,
10976
11519
  cancelled: !1,
10977
11520
  report: null
10978
11521
  }, _ = e.workflow?.retries ?? 0;
10979
- for (let e = 1; e <= _ + 1 && (g = await yl({
11522
+ for (let e = 1; e <= _ + 1 && (g = await bl({
10980
11523
  workerId: r,
10981
11524
  jobId: o.id,
10982
11525
  step: m,
@@ -11004,7 +11547,7 @@ async function vl(e, t) {
11004
11547
  exitCode: 1,
11005
11548
  error: "Step failed before execution started",
11006
11549
  finishedAt: (/* @__PURE__ */ new Date()).toISOString()
11007
- }, p = s + 1, t.durationMs = Date.now() - Date.parse(t.startedAt), await i.saveReport(o.id, t), hl(a, o.id), g.skipped) break;
11550
+ }, p = s + 1, t.durationMs = Date.now() - Date.parse(t.startedAt), await i.saveReport(o.id, t), gl(a, o.id), g.skipped) break;
11008
11551
  if (g.cancelled) {
11009
11552
  f = !0, d = !0;
11010
11553
  break;
@@ -11017,13 +11560,13 @@ async function vl(e, t) {
11017
11560
  } catch (e) {
11018
11561
  console.log("🛑 Step failed", e), d = !0;
11019
11562
  }
11020
- return p < c.length && (Al(c, p, u), t.durationMs = Date.now() - Date.parse(t.startedAt), await i.saveReport(o.id, t), hl(a, o.id)), {
11563
+ return p < c.length && (jl(c, p, u), t.durationMs = Date.now() - Date.parse(t.startedAt), await i.saveReport(o.id, t), gl(a, o.id)), {
11021
11564
  failed: d,
11022
11565
  cancelled: f,
11023
11566
  stepReports: u
11024
11567
  };
11025
11568
  }
11026
- async function yl(e) {
11569
+ async function bl(e) {
11027
11570
  let { step: t, stepIndex: n, executionContext: r } = e;
11028
11571
  if (t.id ||= `step-${n}`, t.name ||= t.id, t.if && !await Zn.evaluateConditions(t.if, r)) return Jn(`⏩ Skipped step ${t.id} based on condition: ${t.if}`, r), {
11029
11572
  failed: !1,
@@ -11032,7 +11575,7 @@ async function yl(e) {
11032
11575
  report: null
11033
11576
  };
11034
11577
  try {
11035
- let n = await xl(t.env, r), i = {
11578
+ let n = await Sl(t.env, r), i = {
11036
11579
  jobId: String(e.jobId),
11037
11580
  step: t,
11038
11581
  command: t.run,
@@ -11049,10 +11592,10 @@ async function yl(e) {
11049
11592
  WORKING_DIR: r.workingDir
11050
11593
  }
11051
11594
  };
11052
- return t.eval ? bl({
11595
+ return t.eval ? xl({
11053
11596
  ...e,
11054
11597
  stepContext: i
11055
- }) : kl({
11598
+ }) : Al({
11056
11599
  ...e,
11057
11600
  stepContext: i
11058
11601
  });
@@ -11075,7 +11618,7 @@ async function yl(e) {
11075
11618
  };
11076
11619
  }
11077
11620
  }
11078
- async function bl(e) {
11621
+ async function xl(e) {
11079
11622
  let { queue: t, stepContext: n, executionContext: r } = e, { jobId: i, step: a } = n, o = Date.now(), s = a.id, c = a.name, l;
11080
11623
  try {
11081
11624
  let e = new Promise((e, t) => {
@@ -11125,7 +11668,7 @@ async function bl(e) {
11125
11668
  l && clearTimeout(l);
11126
11669
  }
11127
11670
  }
11128
- async function xl(e, t) {
11671
+ async function Sl(e, t) {
11129
11672
  let n = {};
11130
11673
  if (e) for (let [r, i] of Object.entries(e)) n[r] = String(await Zn.evaluateValue(i, {
11131
11674
  ...t,
@@ -11136,18 +11679,18 @@ async function xl(e, t) {
11136
11679
  }));
11137
11680
  return n;
11138
11681
  }
11139
- var Sl = 52428800;
11140
- function Cl(e, t) {
11682
+ var Cl = 52428800;
11683
+ function wl(e, t) {
11141
11684
  let n = i.resolve(e), r = i.resolve(n, t);
11142
11685
  if (r !== n && !r.startsWith(`${n}${i.sep}`)) throw Error(`Stored file path escapes workspace: ${t}`);
11143
11686
  return r;
11144
11687
  }
11145
- function wl(e, t) {
11688
+ function Tl(e, t) {
11146
11689
  let n = "^";
11147
11690
  for (let e = 0; e < t.length; e++) t[e] === "*" && t[e + 1] === "*" ? (n += ".*", e++) : t[e] === "*" ? n += "[^/]*" : n += t[e].replace(/[|\\{}()[\]^$+?.]/g, "\\$&");
11148
11691
  return RegExp(`${n}$`).test(e);
11149
11692
  }
11150
- function Tl(t, n) {
11693
+ function El(t, n) {
11151
11694
  let r = i.resolve(n), a = [], o = (t) => {
11152
11695
  for (let n of e.readdirSync(t, { withFileTypes: !0 })) {
11153
11696
  let e = i.join(t, n.name);
@@ -11155,42 +11698,42 @@ function Tl(t, n) {
11155
11698
  }
11156
11699
  };
11157
11700
  return o(r), a.filter((r) => t.some((t) => {
11158
- let i = Cl(n, t);
11701
+ let i = wl(n, t);
11159
11702
  if (e.existsSync(i)) {
11160
11703
  let n = e.statSync(i);
11161
11704
  if (n.isFile()) return r === t;
11162
11705
  if (n.isDirectory()) return r === t || r.startsWith(`${t.replace(/\/$/, "")}/`);
11163
11706
  }
11164
- return wl(r, t);
11707
+ return Tl(r, t);
11165
11708
  }));
11166
11709
  }
11167
- async function El(t, n) {
11168
- let r = Tl(t, n), i = 0;
11710
+ async function Dl(t, n) {
11711
+ let r = El(t, n), i = 0;
11169
11712
  return r.map((t) => {
11170
- let r = e.readFileSync(Cl(n, t));
11171
- if (r.byteLength > Sl || (i += r.byteLength) > Sl) throw Error(`Stored files exceed ${Sl} bytes`);
11713
+ let r = e.readFileSync(wl(n, t));
11714
+ if (r.byteLength > Cl || (i += r.byteLength) > Cl) throw Error(`Stored files exceed ${Cl} bytes`);
11172
11715
  return {
11173
11716
  path: t,
11174
11717
  content: r.toString("base64")
11175
11718
  };
11176
11719
  });
11177
11720
  }
11178
- async function Dl(t, n, r, a, o) {
11721
+ async function Ol(t, n, r, a, o) {
11179
11722
  for (let s of await t.getStoredFiles(n, r)) {
11180
- if (!a.some((e) => s.path === e || s.path.startsWith(`${e.replace(/\/$/, "")}/`) || wl(s.path, e))) continue;
11181
- let t = Cl(o, s.path);
11723
+ if (!a.some((e) => s.path === e || s.path.startsWith(`${e.replace(/\/$/, "")}/`) || Tl(s.path, e))) continue;
11724
+ let t = wl(o, s.path);
11182
11725
  e.mkdirSync(i.dirname(t), { recursive: !0 }), e.writeFileSync(t, Buffer.from(s.content, "base64"));
11183
11726
  }
11184
11727
  }
11185
- function Ol(t, n, r) {
11728
+ function kl(t, n, r) {
11186
11729
  for (let [a, o] of Object.entries(t || {})) {
11187
11730
  let t = n[o];
11188
11731
  if (t === void 0) throw Error(`Secret '${o}' is not available for file '${a}'`);
11189
- let s = Cl(r, a);
11732
+ let s = wl(r, a);
11190
11733
  e.mkdirSync(i.dirname(s), { recursive: !0 }), e.writeFileSync(s, t, { mode: 384 }), e.chmodSync(s, 384);
11191
11734
  }
11192
11735
  }
11193
- async function kl(t) {
11736
+ async function Al(t) {
11194
11737
  let { workerId: n, jobId: r, stepContext: i, executionContext: a, driver: o, queue: s } = t, { step: c } = i, l = c.id, u = c.name, d;
11195
11738
  try {
11196
11739
  d = o.execute(i);
@@ -11205,11 +11748,11 @@ async function kl(t) {
11205
11748
  logFilePath: ""
11206
11749
  };
11207
11750
  }
11208
- ol.add(d);
11751
+ sl.add(d);
11209
11752
  let f = !1, p = setInterval(async () => {
11210
11753
  await s.isCancelled(r) && (console.log(`[${n}] 🛑 Job #${r} was cancelled! Halting execution.`), f = !0, clearInterval(p), await d.cancel());
11211
11754
  }, 3e3), m = await d.done;
11212
- if (clearInterval(p), ol.delete(d), d.logFilePath && e.existsSync(d.logFilePath)) try {
11755
+ if (clearInterval(p), sl.delete(d), d.logFilePath && e.existsSync(d.logFilePath)) try {
11213
11756
  let e = await o.readLog(d.logFilePath);
11214
11757
  await s.saveStepLog(r, l, e);
11215
11758
  } catch (e) {
@@ -11236,7 +11779,7 @@ async function kl(t) {
11236
11779
  }
11237
11780
  };
11238
11781
  }
11239
- function Al(e, t, n) {
11782
+ function jl(e, t, n) {
11240
11783
  for (let r = t; r < e.length; r++) {
11241
11784
  let t = e[r], i = t.id || `step-${r}`;
11242
11785
  n[r] = {
@@ -11250,7 +11793,7 @@ function Al(e, t, n) {
11250
11793
  };
11251
11794
  }
11252
11795
  }
11253
- function jl(e, t, n, r, i, a, o) {
11796
+ function Ml(e, t, n, r, i, a, o) {
11254
11797
  return {
11255
11798
  jobId: String(e.id),
11256
11799
  parentId: String(e.parentId || ""),
@@ -11271,7 +11814,7 @@ function jl(e, t, n, r, i, a, o) {
11271
11814
  }
11272
11815
  //#endregion
11273
11816
  //#region src/scheduler.ts
11274
- function Ml(e, t, n, r) {
11817
+ function Nl(e, t, n, r) {
11275
11818
  return e.split(",").some((e) => {
11276
11819
  let [i, a] = e.split("/"), o = a ? Number(a) : 1;
11277
11820
  if (!Number.isInteger(o) || o < 1) return !1;
@@ -11279,7 +11822,7 @@ function Ml(e, t, n, r) {
11279
11822
  return Number.isInteger(l) && Number.isInteger(u) && t >= l && t <= u && (t - l) % o === 0;
11280
11823
  });
11281
11824
  }
11282
- function Nl(e, t, n = "UTC") {
11825
+ function Pl(e, t, n = "UTC") {
11283
11826
  let r = e.trim().split(/\s+/);
11284
11827
  if (r.length !== 5) return !1;
11285
11828
  let i = new Intl.DateTimeFormat("en-US", {
@@ -11301,16 +11844,16 @@ function Nl(e, t, n = "UTC") {
11301
11844
  "Thu",
11302
11845
  "Fri",
11303
11846
  "Sat"
11304
- ].indexOf(i.weekday), o = Ml(r[2], Number(i.day), 1, 31), s = Ml(r[4].replace(/7/g, "0"), a, 0, 6);
11305
- return Ml(r[0], Number(i.minute), 0, 59) && Ml(r[1], Number(i.hour), 0, 23) && Ml(r[3], Number(i.month), 1, 12) && (r[2] === "*" || r[4] === "*" ? o && s : o || s);
11847
+ ].indexOf(i.weekday), o = Nl(r[2], Number(i.day), 1, 31), s = Nl(r[4].replace(/7/g, "0"), a, 0, 6);
11848
+ return Nl(r[0], Number(i.minute), 0, 59) && Nl(r[1], Number(i.hour), 0, 23) && Nl(r[3], Number(i.month), 1, 12) && (r[2] === "*" || r[4] === "*" ? o && s : o || s);
11306
11849
  }
11307
- function Pl(e) {
11850
+ function Fl(e) {
11308
11851
  if (!e) return 0;
11309
11852
  let t = e.match(/^([+-]?)(\d+)(m|h)$/);
11310
11853
  if (!t) throw Error(`Invalid solar offset: ${e}`);
11311
11854
  return (t[1] === "-" ? -1 : 1) * Number(t[2]) * (t[3] === "h" ? 36e5 : 6e4);
11312
11855
  }
11313
- function Fl(e, t) {
11856
+ function Il(e, t) {
11314
11857
  let n = t.latitude, r = t.longitude, i = Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()), a = Math.floor((i - Date.UTC(e.getUTCFullYear(), 0, 0)) / 864e5), o = r / 15, s = a + ((t.event === "sunrise" ? 6 : 18) - o) / 24, c = .9856 * s - 3.289, l = c + 1.916 * Math.sin(c * Math.PI / 180) + .02 * Math.sin(2 * c * Math.PI / 180) + 282.634;
11315
11858
  l = (l + 360) % 360;
11316
11859
  let u = Math.atan(.91764 * Math.tan(l * Math.PI / 180)) * 180 / Math.PI;
@@ -11318,9 +11861,9 @@ function Fl(e, t) {
11318
11861
  let d = .39782 * Math.sin(l * Math.PI / 180), f = Math.cos(Math.asin(d)), p = (Math.cos(90.833 * Math.PI / 180) - d * Math.sin(n * Math.PI / 180)) / (f * Math.cos(n * Math.PI / 180));
11319
11862
  if (p > 1 || p < -1) return null;
11320
11863
  let m = (t.event === "sunrise" ? 360 - Math.acos(p) * 180 / Math.PI : Math.acos(p) * 180 / Math.PI) / 15;
11321
- return m = (m + u - .06571 * s - 6.622 - o + 24) % 24, new Date(i + m * 36e5 + Pl(t.offset));
11864
+ return m = (m + u - .06571 * s - 6.622 - o + 24) % 24, new Date(i + m * 36e5 + Fl(t.offset));
11322
11865
  }
11323
- var Il = class {
11866
+ var Ll = class {
11324
11867
  queue;
11325
11868
  workflows;
11326
11869
  config;
@@ -11337,9 +11880,9 @@ var Il = class {
11337
11880
  async tick(e = /* @__PURE__ */ new Date()) {
11338
11881
  let t = /* @__PURE__ */ new Date(Math.floor(e.getTime() / 6e4) * 6e4);
11339
11882
  for (let { definition: e, revision: n } of await this.workflows.published()) {
11340
- for (let [r, i] of (e.schedule || []).entries()) Nl(i.cron, t, i.timezone || "UTC") && await this.enqueue(e, n, i, `cron-${r}`, t);
11883
+ for (let [r, i] of (e.schedule || []).entries()) Pl(i.cron, t, i.timezone || "UTC") && await this.enqueue(e, n, i, `cron-${r}`, t);
11341
11884
  for (let [r, i] of (e.solar || []).entries()) {
11342
- let a = Fl(t, i);
11885
+ let a = Il(t, i);
11343
11886
  a && Math.floor(a.getTime() / 6e4) === t.getTime() / 6e4 && await this.enqueue(e, n, i, `solar-${r}`, t);
11344
11887
  }
11345
11888
  }
@@ -11365,7 +11908,7 @@ var Il = class {
11365
11908
  };
11366
11909
  //#endregion
11367
11910
  //#region src/logger.ts
11368
- function Ll() {
11911
+ function Rl() {
11369
11912
  for (let e of [
11370
11913
  "log",
11371
11914
  "info",
@@ -11380,7 +11923,7 @@ function Ll() {
11380
11923
  }
11381
11924
  //#endregion
11382
11925
  //#region src/plugins/github-status.plugin.ts
11383
- var Rl = class {
11926
+ var zl = class {
11384
11927
  name = "github-commit-status";
11385
11928
  token;
11386
11929
  apiUrl;
@@ -11422,14 +11965,14 @@ var Rl = class {
11422
11965
  };
11423
11966
  //#endregion
11424
11967
  //#region src/index.ts
11425
- async function zl() {
11426
- Ll();
11968
+ async function Bl() {
11969
+ Rl();
11427
11970
  let { config: e, command: t } = await ce();
11428
11971
  e || process.exit(1);
11429
11972
  let n = new me(), r = new pe(process.env.WORKER_NAME || "cli");
11430
11973
  switch (t) {
11431
11974
  case "start-server":
11432
- console.log("🌐 Starting Ingress Gateway..."), await r.init(), await Qc.withPort({
11975
+ console.log("🌐 Starting Ingress Gateway..."), await r.init(), await $c.withPort({
11433
11976
  config: e,
11434
11977
  queue: r,
11435
11978
  secrets: n,
@@ -11438,13 +11981,13 @@ async function zl() {
11438
11981
  });
11439
11982
  break;
11440
11983
  case "start-workers":
11441
- console.log(`⚙️ Starting worker scheduler with ${e.workers} concurrent slot(s)...`), await r.init(), ul(e.workers, r, n, e);
11984
+ console.log(`⚙️ Starting worker scheduler with ${e.workers} concurrent slot(s)...`), await r.init(), dl(e.workers, r, n, e);
11442
11985
  break;
11443
11986
  case "start-scheduler": {
11444
11987
  console.log("Starting workflow scheduler..."), await r.init();
11445
- let t = new Yc();
11988
+ let t = new Xc();
11446
11989
  await t.init();
11447
- let n = new Il(r, t, e);
11990
+ let n = new Ll(r, t, e);
11448
11991
  n.start();
11449
11992
  let i = () => {
11450
11993
  n.stop(), process.exit(0);
@@ -11455,6 +11998,6 @@ async function zl() {
11455
11998
  default: console.error(`❌ Unknown command: '${t}'`), se(), process.exit(1);
11456
11999
  }
11457
12000
  }
11458
- zl().catch(console.error);
12001
+ Bl().catch(console.error);
11459
12002
  //#endregion
11460
- export { Rl as GitHubStatusPlugin };
12003
+ export { zl as GitHubStatusPlugin };