@beehexa/hexasync-template-ide-mcp 2611.8.1 → 2611.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /** GENERATED by tools/bundle-knowledge-base.mjs — do not edit. */
2
- export declare const KNOWLEDGE_VERSION = "asset bundle 102";
2
+ export declare const KNOWLEDGE_VERSION = "asset bundle 103";
3
3
  /** Largest resource text in UTF-8 bytes; larger pages and assets are served as linked sections. */
4
4
  export declare const KNOWLEDGE_RESOURCE_BYTE_LIMIT = 25600;
5
5
  export interface KnowledgeResource {
@@ -1,5 +1,5 @@
1
1
  /** GENERATED by tools/bundle-knowledge-base.mjs — do not edit. */
2
- export const KNOWLEDGE_VERSION = "asset bundle 102";
2
+ export const KNOWLEDGE_VERSION = "asset bundle 103";
3
3
  /** Largest resource text in UTF-8 bytes; larger pages and assets are served as linked sections. */
4
4
  export const KNOWLEDGE_RESOURCE_BYTE_LIMIT = 25600;
5
5
  export const KNOWLEDGE_BASE = [
@@ -98,7 +98,7 @@ export const KNOWLEDGE_BASE = [
98
98
  "title": "docs/examples.json",
99
99
  "description": "Bundled data: docs/examples.json.",
100
100
  "mimeType": "application/json",
101
- "text": "{\n \"$split\": \"This JSON is served in parts. Each {\\\"$resource\\\": uri} object stands for the JSON value read from that resource; each {\\\"$parts\\\": [...]} object stands for the array formed by concatenating the arrays read from its parts, in order.\",\n \"bundle\": 102,\n \"connectorFacetNote\": \"These component snippets do not infer provider connector identity. Use their canonical component documents for connection assumptions.\",\n \"entries\": {\n \"$resource\": \"hexasync://assets/docs/examples.json/entries\"\n }\n}",
101
+ "text": "{\n \"$split\": \"This JSON is served in parts. Each {\\\"$resource\\\": uri} object stands for the JSON value read from that resource; each {\\\"$parts\\\": [...]} object stands for the array formed by concatenating the arrays read from its parts, in order.\",\n \"bundle\": 103,\n \"connectorFacetNote\": \"These component snippets do not infer provider connector identity. Use their canonical component documents for connection assumptions.\",\n \"entries\": {\n \"$resource\": \"hexasync://assets/docs/examples.json/entries\"\n }\n}",
102
102
  "assetPath": "assets/docs/examples.json"
103
103
  },
104
104
  {
@@ -2221,9 +2221,9 @@ export const KNOWLEDGE_BASE = [
2221
2221
  "uri": "hexasync://docs/AI-INDEX",
2222
2222
  "name": "docs/AI-INDEX",
2223
2223
  "title": "HexaSync Profile Template Knowledge Base",
2224
- "description": "Asset bundle 102 · extension 2611.8.1.",
2224
+ "description": "Asset bundle 103 · extension 2611.8.2.",
2225
2225
  "mimeType": "text/markdown",
2226
- "text": "<!-- GENERATED KNOWLEDGE INDEX — DO NOT EDIT. Run `yarn ai:index`. -->\n# HexaSync Profile Template Knowledge Base\n\n**Asset bundle 102 · extension 2611.8.1.**\n\n## Authoring boundaries\n\n- Worker Workflow steps and frontend creation/setup steps are different domains. Shared names do not make their payloads or execution interchangeable.\n- Use actual existing component and provider identities. Resolution and unresolved outcomes belong to each component contract.\n- Context roots depend on the workflow host and execution stage. A legal authoring root is not a promise that it exists at entry.\n- Examples explain inputs, prerequisites and expected effects.\n- This index is a retrieval map. Read the linked component page for defaults, precedence, variants and failure behavior.\n\n## Component pages\n\n| question | reference |\n| --- | --- |\n| root collections, identities and includes | [Profile root](hexasync://docs/PROFILE-ROOT) |\n| frontend creation/setup/authorization steps and connector definitions | [Frontend steps](hexasync://docs/PROFILE-ROOT/profile-root-fields-1/frontend-steps-creationsteps-setupsteps-authorizationsteps), [Connector definition](hexasync://docs/PROFILE-ROOT/profile-root-fields-1/connector-definition-document) |\n| Workflow selection, envelope, argument placement and flags | [Step envelope](hexasync://docs/steps/STEP-ENVELOPE) |\n| host/stage context, Scriban, JSONata and expression call sites | [Expressions and context](hexasync://docs/expressions/CONTEXT-AND-IO) |\n| next targets, branches, termination and loop guards | [Routing](hexasync://docs/routing/NEXT) |\n| response parsers and site-specific result handling | [Response filters](hexasync://docs/responseFilters/RESPONSE-FILTERS) |\n| Builder DSL versus API Filter DSL | [QueryDSL](hexasync://docs/query-dsl/QUERY-DSL) |\n| connection binding, options, auth and HTTP request builders | [Connections](hexasync://docs/connections/CONNECTIONS), [API](hexasync://docs/steps/API) |\n| self connector identity (`**SelfConnectorProviderId**`, `IS_SELF_CONNECTOR`) and why `CONN-1` names it | [The self connector](hexasync://docs/connections/CONNECTIONS/the-self-connector#its-identity-and-why-conn-1-names-it) |\n| pulling, pushing, ingress and startup hosts | [Pullers](hexasync://docs/pullers/PULLERS), [Pushers](hexasync://docs/pushers/PUSHERS), [Webhooks](hexasync://docs/webhooks/WEBHOOKS), [Startup](hexasync://docs/startupTasks/STARTUP-TASKS) |\n| creating/binding gateway webhooks, captured delivery payloads as samples, replay limits, hosted Gateway MCP sign-in | [Gateway MCP webhook workflow](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow) |\n| How do I decide incremental vs full pull for an entity, validate its watermark, resume and terminate safely, classify API failures, and reconcile deletions? | [Puller completeness contract](hexasync://docs/pullers/PULLERS/puller-completeness-contract), [Entity classification](hexasync://docs/pullers/PULLERS/entity-classification) |\n| endpoint filter/anchor/page-size facts, watermark boundary inclusivity, timezone and overlap, natural-key ordering and ties, request budget and 429 handling | [Earn endpoint request facts](hexasync://docs/pullers/PULLERS/puller-completeness-contract#earn-endpoint-request-facts), [Watermark boundary validation](hexasync://docs/pullers/PULLERS/puller-completeness-contract#watermark-boundary-validation), [Natural-key ordering and ties](hexasync://docs/pullers/PULLERS/puller-completeness-contract#natural-key-ordering-and-ties), [Request budget and throttling](hexasync://docs/pullers/PULLERS/puller-completeness-contract#request-budget-and-throttling) |\n| deletion reconciliation through a periodic full run, one schedule per job type, a second cadence through a trigger task, retries and job history | [Deletion reconciliation through a periodic full run](hexasync://docs/pullers/PULLERS/puller-completeness-contract#deletion-reconciliation-through-a-periodic-full-run), [One schedule per job type](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#one-schedule-per-job-type), [Periodic processing through a trigger task](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#periodic-processing-through-a-trigger-task), [Choosing pull and enqueue cadence](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#choosing-pull-and-enqueue-cadence) |\n| mapping API/event members to snake_case columns before saving, explicit destination bodies | [Explicit field mapping](hexasync://docs/steps/SAVE_TASK_DATA#explicit-field-mapping), [Explicit mapping for push](hexasync://docs/transformations/TRANSFORMATIONS/explicit-mapping-for-push) |\n| classifying HTTP status, thrown calls and invalid envelopes into one error code without one step per error class | [Classify once, raise once](hexasync://docs/steps/Error#classify-once-raise-once) |\n| several vendor accounts, credential scope per connection, shared provider quota | [One connection, one credential scope](hexasync://docs/connections/CONNECTIONS/one-connection-one-credential-scope) |\n| webhook signature, raw body, acknowledgement, multi-event deliveries, partial payloads, registration health | [Provider webhook authoring standards](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow#provider-webhook-authoring-standards), [Worked sample](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow#worked-sample-a-signed-credential-scope-delivery) |\n| immediate startup pull, scheduler setup and first-reconcile defaults | [Typed scheduler](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata), [Legacy scheduler initialization](hexasync://docs/startupTasks/STARTUP-TASKS/legacy-target-tasks#legacy-scheduler-initialization), [Dashboard versus execution](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#dashboard-presentation-versus-execution) |\n| task binding, dependency gates and physical storage | [Objects](hexasync://docs/objects/object), [Associations](hexasync://docs/objectAssociations/OBJECT-ASSOCIATIONS), [Dependencies](hexasync://docs/dependencies/DEPENDENCIES), [Tasks](hexasync://docs/tasks/TASKS-AND-TABLES), [Tables](hexasync://docs/tables/TABLES) |\n| transformation order, item context, abort/no-op and executor outcomes | [Transformation chain](hexasync://docs/transformations/TRANSFORMATIONS/transformation-chain-contract) |\n| stored SQL validity versus per-item diagnostics | [Validations](hexasync://docs/validations/VALIDATIONS) |\n| metric readers, handlers, scoring and reports | [Metrics](hexasync://docs/metrics/METRICS_REFERENCE), [Reports](hexasync://docs/reports/REPORTS) |\n| one worker executor and its alternatives | [Worker step index](hexasync://docs/steps/INDEX) |\n\n## Collections: root declaration shapes\n\n- `connectors` — array of connections/connection\n- `contributors` — array of contributor\n- `dependencies` — array of dependencies/dependency\n- `externals` — array of externals\n- `metricGroups` — array of metrics/metricGroup\n- `objectAssociations` — map of objectAssociations/objectAssociation\n- `objects` — array of objects/object\n- `pullers` — array of pullers/puller\n- `pushers` — array of pushers/pusher\n- `reports` — array of reports/report\n- `startupTasks` — array of startupTasks/startupTask\n- `tables` — array of tables/table\n- `transformations` — map of arrays of transformations/transformation\n- `validations` — map of arrays of validations/validation\n- `webhooks` — array of webhooks/Webhook\n\n## Worker executable authoring choices (42)\n`API`, `BASE64_TO_MIME_TYPE`, `CACHE`, `CHECK_FORMAT`, `DIRECT_INDEX`, `DOWNLOAD_CSV`, `ENQUEUER`, `EXCEL_READER`, `EXCEPTION`, `Error`, `FORWARD`, `GET_KEY_VALUE`, `IF`, `IGNORE_ITEM`, `INVALIDATE_CACHE`, `JSONata`, `LOOKUP_STEP`, `METRIC_QUERY`, `PUBLISH_EVENT`, `PULLER`, `PUSHER`, `QUERY_MANY`, `QUERY_METRICS`, `QUERY_SINGLE`, `REMOVE_DATA`, `RESET_ITEM`, `RESOLVE_RAW_DATA`, `SAVE_TASK_DATA`, `SEED_DATA`, `SET_KEY_VALUE`, `SLEEP`, `SQL`, `SQL_PROXY`, `SWITCH`, `Scriban`, `TRACK_FOR_REMOVAL`, `UPDATE_ITEM_STATUS`, `UPDATE_ITEM_SYNC_PROCESS`, `UPDATE_TASK_DATA_STATUS`, `VALUES`, `VERIFY_CACHED`, `WEBHOOK_FORWARD`\n\nRegistered but throwing (9): `Begin`, `Composite`, `End`, `GraphQL`, `Liquid`, `OData`, `QueryDSL`, `Restful`, `cURL`. Read their rejected forms and actual alternatives through the worker step index.\n\n## Frontend declaration vocabulary (19)\n`API`, `BROWSER`, `FORM`, `GATEWAY_API`, `GET_LOCAL_STORAGE`, `HEALTH_CHECK_WORKER`, `IF`, `INTEGRATION_APP_MANAGEMENT`, `JSONATA`, `LIQUID`, `MULTIPLE_CHOICE_FORM`, `READ_QUERIES`, `REDIRECT`, `SELECT_GOOGLE_DRIVE`, `SET_LOCAL_STORAGE`, `SHOW_INFO`, `SINGLE_CHOICE_FORM`, `SWITCH`, `WAIT`\n\n## Transformation authoring vocabulary (12)\n`BulkClone`, `BulkRename`, `Clone`, `Jsonata`, `Nested_SQL`, `None`, `QUERY_MANY`, `QUERY_SINGLE`, `RESOLVE_RAW_DATA`, `Rename`, `SQL`, `Scriban`\n`None` is [disabled](hexasync://docs/transformations/TRANSFORMATIONS/none--disabled-versus-absent-discriminator). `RenameDependency` is [declared but unimplemented](hexasync://docs/transformations/TRANSFORMATIONS/renamedependency--declared-but-unimplemented) and is not an accepted authoring discriminator.\n\n## Supported validation vocabulary (23)\n`BETWEEN`, `CONTAIN`, `END_WITH`, `EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `IN`, `IS_EMPTY`, `IS_NULL`, `LENGTH`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `MAX_LENGTH`, `MIN_LENGTH`, `NOT_CONTAIN`, `NOT_EMPTY`, `NOT_END_WITH`, `NOT_EQUAL`, `NOT_IN`, `NOT_NULL`, `NOT_START_WITH`, `REGEX`, `START_WITH`\nDeclaration-only members and datetime deployment prerequisites are explained on the validations page.\n\n## Builder DSL operators (35)\n`!=`, `<`, `<=`, `<>`, `=`, `>`, `>=`, `AND`, `BETWEEN`, `CONTAINS`, `ENDS_WITH`, `HAS_ALL_BITS`, `HAS_BITS`, `IN`, `ISNIL`, `ISNULL`, `IS_NIL`, `IS_NOT_NULL`, `IS_NULL`, `NIL`, `NNIL`, `NNULL`, `NOT_CONTAINS`, `NOT_ENDS_WITH`, `NOT_HAS_ALL_BITS`, `NOT_HAS_BITS`, `NOT_IN`, `NOT_NULL`, `NOT_REGEX`, `NOT_STARTS_WITH`, `NULL`, `OR`, `REGEX`, `STARTS_WITH`, `^LAST_[+-]?[0-9]+_[A-Za-z]+$`\n\n## Builder DSL operand kinds (5)\n`ARG`, `FIELD`, `PARAM`, `QUERY`, `VALUE`\nAPI Filter DSL has its own predicate vocabulary, request envelope and bit-mask semantics; do not substitute Builder syntax.\n\n## Editor/CLI diagnostic rule IDs (64)\n`API-1`, `API-2`, `ARG-1`, `ARG-2`, `ARG-3`, `ARG-4`, `ARG-5`, `ARG-6`, `ARG-7`, `COL-1`, `CONN-0`, `CONN-1`, `CONN-2`, `CONN-3`, `CONN-4`, `CONN-5`, `CTX-1`, `CTX-2`, `CTX-3`, `DEP-1`, `DRIFT-1`, `DUP-1`, `DUP-3`, `DUP-4`, `DUP-5`, `FLOW-3`, `FLOW-4`, `FLOW-5`, `FLOW-6`, `FLOW-7`, `FLOW-8`, `MDI-1`, `OVW-1`, `PLK-1`, `PLK-2`, `QDSL-1`, `REF-1`, `REF-13`, `REF-15`, `REF-16`, `REF-2`, `REF-3`, `REF-5`, `REF-6`, `REF-7`, `REF-9`, `REF-K1`, `REF-K2`, `RET-1`, `STEP-1`, `STEP-2`, `STEP-3`, `TBL-1`, `TBL-2`, `TBL-3`, `TBL-4`, `TBL-5`, `TBL-6`, `TBL-7`, `UNIMP-1`, `VAR-1`, `VAR-2`, `VAR-3`, `VAR-4`\nUse `hexasync_explain_rule` for diagnostic meaning and consequences.\n\n## Catalog systems with connector codes (16)\n- KiotViet — `kiotviet`\n- Lazada — `lazada`\n- Lightspeed X Series — `lightspeed-x-series`\n- Misa AMIS RPA — `misa-amis-frontend`\n- Misa AMIS — `misa-amis`\n- Sapo Omni V3 — `sapo-omni-v3`\n- Shopee — `shopee`\n- Shopify Custom App — `shopify-custom-app`\n- Shopify — `shopify-public-app`\n- Shopline Private App — `shopline-private-app`\n- Shopline — `shopline`\n- TikTok Shop (Gateway V3) — `tiktokshop`\n- TikTok Shop — `tiktokshop`\n- WooCommerce — `woocommerce`\n- Xero — `v2/xero`\n- Zalo — `zalo`\n\n## Catalog systems without a supported connector code (8)\n- Anchanto OMS (SelluSeller)\n- Brightpearl\n- Lightspeed X Series (Gateway V2)\n- MeInvoice\n- Packhai OMS\n- Wix\n- Zendesk\n- Zoho Desk\nCatalog presence does not create an executable connector or an authentication scheme.\n\n## Actual MCP retrieval\n\n- `resources/list` and `resources/read` expose the component pages and shipped schema data without a private source checkout.\n- `hexasync_explain_type` reads [step inputs](hexasync://assets/steps/inputs.json) and [step results](hexasync://assets/steps/outputs.json); read the component page for conditional output branches.\n- `hexasync_explain_position` describes the static authoring position; use the context page for host/stage availability.\n- `hexasync_search_examples` reads [1275 authored YAML examples](hexasync://assets/docs/examples.json), including their surrounding explanation and component page. Fragments are not necessarily complete profiles or successful-input examples. Connector identity is not guessed.\n- `hexasync_list_connectors` reads the [connector catalog](hexasync://assets/connectors/catalog.json); use existing workspace identities rather than inventing IDs.\n- This server never calls the gateway. Webhook resources, captured deliveries and replay are tools of the separately signed-in hosted Gateway MCP; read the [Gateway MCP webhook workflow](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow) before asking the user.\n- [Root schema](hexasync://assets/main.json) reaches component item contracts. The [full knowledge index](hexasync://index) is the navigation entry.\n"
2226
+ "text": "<!-- GENERATED KNOWLEDGE INDEX — DO NOT EDIT. Run `yarn ai:index`. -->\n# HexaSync Profile Template Knowledge Base\n\n**Asset bundle 103 · extension 2611.8.2.**\n\n## Authoring boundaries\n\n- Worker Workflow steps and frontend creation/setup steps are different domains. Shared names do not make their payloads or execution interchangeable.\n- Use actual existing component and provider identities. Resolution and unresolved outcomes belong to each component contract.\n- Context roots depend on the workflow host and execution stage. A legal authoring root is not a promise that it exists at entry.\n- Examples explain inputs, prerequisites and expected effects.\n- This index is a retrieval map. Read the linked component page for defaults, precedence, variants and failure behavior.\n\n## Component pages\n\n| question | reference |\n| --- | --- |\n| root collections, identities and includes | [Profile root](hexasync://docs/PROFILE-ROOT) |\n| frontend creation/setup/authorization steps and connector definitions | [Frontend steps](hexasync://docs/PROFILE-ROOT/profile-root-fields-1/frontend-steps-creationsteps-setupsteps-authorizationsteps), [Connector definition](hexasync://docs/PROFILE-ROOT/profile-root-fields-1/connector-definition-document) |\n| Workflow selection, envelope, argument placement and flags | [Step envelope](hexasync://docs/steps/STEP-ENVELOPE) |\n| host/stage context, Scriban, JSONata and expression call sites | [Expressions and context](hexasync://docs/expressions/CONTEXT-AND-IO) |\n| next targets, branches, termination and loop guards | [Routing](hexasync://docs/routing/NEXT) |\n| response parsers and site-specific result handling | [Response filters](hexasync://docs/responseFilters/RESPONSE-FILTERS) |\n| Builder DSL versus API Filter DSL | [QueryDSL](hexasync://docs/query-dsl/QUERY-DSL) |\n| connection binding, options, auth and HTTP request builders | [Connections](hexasync://docs/connections/CONNECTIONS), [API](hexasync://docs/steps/API) |\n| self connector identity (`**SelfConnectorProviderId**`, `IS_SELF_CONNECTOR`) and why `CONN-1` names it | [The self connector](hexasync://docs/connections/CONNECTIONS/the-self-connector#its-identity-and-why-conn-1-names-it) |\n| pulling, pushing, ingress and startup hosts | [Pullers](hexasync://docs/pullers/PULLERS), [Pushers](hexasync://docs/pushers/PUSHERS), [Webhooks](hexasync://docs/webhooks/WEBHOOKS), [Startup](hexasync://docs/startupTasks/STARTUP-TASKS) |\n| creating/binding gateway webhooks, captured delivery payloads as samples, replay limits, hosted Gateway MCP sign-in | [Gateway MCP webhook workflow](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow) |\n| How do I decide incremental vs full pull for an entity, validate its watermark, resume and terminate safely, classify API failures, and reconcile deletions? | [Puller completeness contract](hexasync://docs/pullers/PULLERS/puller-completeness-contract), [Entity classification](hexasync://docs/pullers/PULLERS/entity-classification) |\n| endpoint filter/anchor/page-size facts, watermark boundary inclusivity, timezone and overlap, natural-key ordering and ties, request budget and 429 handling | [Earn endpoint request facts](hexasync://docs/pullers/PULLERS/puller-completeness-contract#earn-endpoint-request-facts), [Watermark boundary validation](hexasync://docs/pullers/PULLERS/puller-completeness-contract#watermark-boundary-validation), [Natural-key ordering and ties](hexasync://docs/pullers/PULLERS/puller-completeness-contract#natural-key-ordering-and-ties), [Request budget and throttling](hexasync://docs/pullers/PULLERS/puller-completeness-contract#request-budget-and-throttling) |\n| deletion reconciliation through a periodic full run, one schedule per job type, a second cadence through a trigger task, retries and job history | [Deletion reconciliation through a periodic full run](hexasync://docs/pullers/PULLERS/puller-completeness-contract#deletion-reconciliation-through-a-periodic-full-run), [One schedule per job type](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#one-schedule-per-job-type), [Periodic processing through a trigger task](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#periodic-processing-through-a-trigger-task), [Choosing pull and enqueue cadence](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#choosing-pull-and-enqueue-cadence) |\n| mapping API/event members to snake_case columns before saving, explicit destination bodies | [Explicit field mapping](hexasync://docs/steps/SAVE_TASK_DATA#explicit-field-mapping), [Explicit mapping for push](hexasync://docs/transformations/TRANSFORMATIONS/explicit-mapping-for-push) |\n| classifying HTTP status, thrown calls and invalid envelopes into one error code without one step per error class | [Classify once, raise once](hexasync://docs/steps/Error#classify-once-raise-once) |\n| several vendor accounts, credential scope per connection, shared provider quota | [One connection, one credential scope](hexasync://docs/connections/CONNECTIONS/one-connection-one-credential-scope) |\n| webhook signature, raw body, acknowledgement, multi-event deliveries, partial payloads, registration health | [Provider webhook authoring standards](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow#provider-webhook-authoring-standards), [Worked sample](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow#worked-sample-a-signed-credential-scope-delivery) |\n| immediate startup pull, scheduler setup and first-reconcile defaults | [Typed scheduler](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata), [Legacy scheduler initialization](hexasync://docs/startupTasks/STARTUP-TASKS/legacy-target-tasks#legacy-scheduler-initialization), [Dashboard versus execution](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#dashboard-presentation-versus-execution) |\n| task binding, dependency gates and physical storage | [Objects](hexasync://docs/objects/object), [Associations](hexasync://docs/objectAssociations/OBJECT-ASSOCIATIONS), [Dependencies](hexasync://docs/dependencies/DEPENDENCIES), [Tasks](hexasync://docs/tasks/TASKS-AND-TABLES), [Tables](hexasync://docs/tables/TABLES) |\n| transformation order, item context, abort/no-op and executor outcomes | [Transformation chain](hexasync://docs/transformations/TRANSFORMATIONS/transformation-chain-contract) |\n| stored SQL validity versus per-item diagnostics | [Validations](hexasync://docs/validations/VALIDATIONS) |\n| metric readers, handlers, scoring and reports | [Metrics](hexasync://docs/metrics/METRICS_REFERENCE), [Reports](hexasync://docs/reports/REPORTS) |\n| one worker executor and its alternatives | [Worker step index](hexasync://docs/steps/INDEX) |\n\n## Collections: root declaration shapes\n\n- `connectors` — array of connections/connection\n- `contributors` — array of contributor\n- `dependencies` — array of dependencies/dependency\n- `externals` — array of externals\n- `metricGroups` — array of metrics/metricGroup\n- `objectAssociations` — map of objectAssociations/objectAssociation\n- `objects` — array of objects/object\n- `pullers` — array of pullers/puller\n- `pushers` — array of pushers/pusher\n- `reports` — array of reports/report\n- `startupTasks` — array of startupTasks/startupTask\n- `tables` — array of tables/table\n- `transformations` — map of arrays of transformations/transformation\n- `validations` — map of arrays of validations/validation\n- `webhooks` — array of webhooks/Webhook\n\n## Worker executable authoring choices (42)\n`API`, `BASE64_TO_MIME_TYPE`, `CACHE`, `CHECK_FORMAT`, `DIRECT_INDEX`, `DOWNLOAD_CSV`, `ENQUEUER`, `EXCEL_READER`, `EXCEPTION`, `Error`, `FORWARD`, `GET_KEY_VALUE`, `IF`, `IGNORE_ITEM`, `INVALIDATE_CACHE`, `JSONata`, `LOOKUP_STEP`, `METRIC_QUERY`, `PUBLISH_EVENT`, `PULLER`, `PUSHER`, `QUERY_MANY`, `QUERY_METRICS`, `QUERY_SINGLE`, `REMOVE_DATA`, `RESET_ITEM`, `RESOLVE_RAW_DATA`, `SAVE_TASK_DATA`, `SEED_DATA`, `SET_KEY_VALUE`, `SLEEP`, `SQL`, `SQL_PROXY`, `SWITCH`, `Scriban`, `TRACK_FOR_REMOVAL`, `UPDATE_ITEM_STATUS`, `UPDATE_ITEM_SYNC_PROCESS`, `UPDATE_TASK_DATA_STATUS`, `VALUES`, `VERIFY_CACHED`, `WEBHOOK_FORWARD`\n\nRegistered but throwing (9): `Begin`, `Composite`, `End`, `GraphQL`, `Liquid`, `OData`, `QueryDSL`, `Restful`, `cURL`. Read their rejected forms and actual alternatives through the worker step index.\n\n## Frontend declaration vocabulary (19)\n`API`, `BROWSER`, `FORM`, `GATEWAY_API`, `GET_LOCAL_STORAGE`, `HEALTH_CHECK_WORKER`, `IF`, `INTEGRATION_APP_MANAGEMENT`, `JSONATA`, `LIQUID`, `MULTIPLE_CHOICE_FORM`, `READ_QUERIES`, `REDIRECT`, `SELECT_GOOGLE_DRIVE`, `SET_LOCAL_STORAGE`, `SHOW_INFO`, `SINGLE_CHOICE_FORM`, `SWITCH`, `WAIT`\n\n## Transformation authoring vocabulary (12)\n`BulkClone`, `BulkRename`, `Clone`, `Jsonata`, `Nested_SQL`, `None`, `QUERY_MANY`, `QUERY_SINGLE`, `RESOLVE_RAW_DATA`, `Rename`, `SQL`, `Scriban`\n`None` is [disabled](hexasync://docs/transformations/TRANSFORMATIONS/none--disabled-versus-absent-discriminator). `RenameDependency` is [declared but unimplemented](hexasync://docs/transformations/TRANSFORMATIONS/renamedependency--declared-but-unimplemented) and is not an accepted authoring discriminator.\n\n## Supported validation vocabulary (23)\n`BETWEEN`, `CONTAIN`, `END_WITH`, `EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `IN`, `IS_EMPTY`, `IS_NULL`, `LENGTH`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `MAX_LENGTH`, `MIN_LENGTH`, `NOT_CONTAIN`, `NOT_EMPTY`, `NOT_END_WITH`, `NOT_EQUAL`, `NOT_IN`, `NOT_NULL`, `NOT_START_WITH`, `REGEX`, `START_WITH`\nDeclaration-only members and datetime deployment prerequisites are explained on the validations page.\n\n## Builder DSL operators (35)\n`!=`, `<`, `<=`, `<>`, `=`, `>`, `>=`, `AND`, `BETWEEN`, `CONTAINS`, `ENDS_WITH`, `HAS_ALL_BITS`, `HAS_BITS`, `IN`, `ISNIL`, `ISNULL`, `IS_NIL`, `IS_NOT_NULL`, `IS_NULL`, `NIL`, `NNIL`, `NNULL`, `NOT_CONTAINS`, `NOT_ENDS_WITH`, `NOT_HAS_ALL_BITS`, `NOT_HAS_BITS`, `NOT_IN`, `NOT_NULL`, `NOT_REGEX`, `NOT_STARTS_WITH`, `NULL`, `OR`, `REGEX`, `STARTS_WITH`, `^LAST_[+-]?[0-9]+_[A-Za-z]+$`\n\n## Builder DSL operand kinds (5)\n`ARG`, `FIELD`, `PARAM`, `QUERY`, `VALUE`\nAPI Filter DSL has its own predicate vocabulary, request envelope and bit-mask semantics; do not substitute Builder syntax.\n\n## Editor/CLI diagnostic rule IDs (64)\n`API-1`, `API-2`, `ARG-1`, `ARG-2`, `ARG-3`, `ARG-4`, `ARG-5`, `ARG-6`, `ARG-7`, `COL-1`, `CONN-0`, `CONN-1`, `CONN-2`, `CONN-3`, `CONN-4`, `CONN-5`, `CTX-1`, `CTX-2`, `CTX-3`, `DEP-1`, `DRIFT-1`, `DUP-1`, `DUP-3`, `DUP-4`, `DUP-5`, `FLOW-3`, `FLOW-4`, `FLOW-5`, `FLOW-6`, `FLOW-7`, `FLOW-8`, `MDI-1`, `OVW-1`, `PLK-1`, `PLK-2`, `QDSL-1`, `REF-1`, `REF-13`, `REF-15`, `REF-16`, `REF-2`, `REF-3`, `REF-5`, `REF-6`, `REF-7`, `REF-9`, `REF-K1`, `REF-K2`, `RET-1`, `STEP-1`, `STEP-2`, `STEP-3`, `TBL-1`, `TBL-2`, `TBL-3`, `TBL-4`, `TBL-5`, `TBL-6`, `TBL-7`, `UNIMP-1`, `VAR-1`, `VAR-2`, `VAR-3`, `VAR-4`\nUse `hexasync_explain_rule` for diagnostic meaning and consequences.\n\n## Catalog systems with connector codes (16)\n- KiotViet — `kiotviet`\n- Lazada — `lazada`\n- Lightspeed X Series — `lightspeed-x-series`\n- Misa AMIS RPA — `misa-amis-frontend`\n- Misa AMIS — `misa-amis`\n- Sapo Omni V3 — `sapo-omni-v3`\n- Shopee — `shopee`\n- Shopify Custom App — `shopify-custom-app`\n- Shopify — `shopify-public-app`\n- Shopline Private App — `shopline-private-app`\n- Shopline — `shopline`\n- TikTok Shop (Gateway V3) — `tiktokshop`\n- TikTok Shop — `tiktokshop`\n- WooCommerce — `woocommerce`\n- Xero — `v2/xero`\n- Zalo — `zalo`\n\n## Catalog systems without a supported connector code (8)\n- Anchanto OMS (SelluSeller)\n- Brightpearl\n- Lightspeed X Series (Gateway V2)\n- MeInvoice\n- Packhai OMS\n- Wix\n- Zendesk\n- Zoho Desk\nCatalog presence does not create an executable connector or an authentication scheme.\n\n## Actual MCP retrieval\n\n- `resources/list` and `resources/read` expose the component pages and shipped schema data without a private source checkout.\n- `hexasync_explain_type` reads [step inputs](hexasync://assets/steps/inputs.json) and [step results](hexasync://assets/steps/outputs.json); read the component page for conditional output branches.\n- `hexasync_explain_position` describes the static authoring position; use the context page for host/stage availability.\n- `hexasync_search_examples` reads [1275 authored YAML examples](hexasync://assets/docs/examples.json), including their surrounding explanation and component page. Fragments are not necessarily complete profiles or successful-input examples. Connector identity is not guessed.\n- `hexasync_list_connectors` reads the [connector catalog](hexasync://assets/connectors/catalog.json); use existing workspace identities rather than inventing IDs.\n- This server never calls the gateway. Webhook resources, captured deliveries and replay are tools of the separately signed-in hosted Gateway MCP; read the [Gateway MCP webhook workflow](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow) before asking the user.\n- [Root schema](hexasync://assets/main.json) reaches component item contracts. The [full knowledge index](hexasync://index) is the navigation entry.\n"
2227
2227
  },
2228
2228
  {
2229
2229
  "uri": "hexasync://docs/connections/CONNECTIONS",
@@ -5,6 +5,6 @@
5
5
  "linux-arm64-musl": "ef31914e76efa3eb798278a6af92028f465d5098bb968c6b303ca45b36005d6e",
6
6
  "linux-x64-gnu": "b5c8ca78e045b2f0c67663889a21103027dd37cc351059d91804a6b2f53420b6",
7
7
  "linux-x64-musl": "32e2f162245b4487ec3a1084d1452d56a9141c0c61110303f0ed4b6bc20e6d51",
8
- "win32-arm64": "52a5b0ee810271db114616f34618b87a82fbf24aa295aad576d4f23038cef75c",
9
- "win32-x64": "d0df70f0e67dbc2b5336228a279dae3791018e7ad5ab37934420c2362a517003"
8
+ "win32-arm64": "d037cac56b75e725f51a4dd8f1a4f4488935873861f15751d4fa63876cd160d4",
9
+ "win32-x64": "a6ade9b31d6f8d1b02625abff722a691bc16f61d9840e7392abbee89a9f28a8c"
10
10
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
3
  "productId": "hexasync-template-ide",
4
- "version": "2611.8.1",
5
- "artifactDigest": "sha256:bda7916b099194dee3f9d93a54bd438d6b3933802b82fd8e1ade105b425eba58",
6
- "identity": "hexasync-template-ide@2611.8.1#sha256:bda7916b099194dee3f9d93a54bd438d6b3933802b82fd8e1ade105b425eba58"
4
+ "version": "2611.8.2",
5
+ "artifactDigest": "sha256:f4ae2a5c756e1764e9acc77028d7633df44ef670eee66d4471af4a233a12850a",
6
+ "identity": "hexasync-template-ide@2611.8.2#sha256:f4ae2a5c756e1764e9acc77028d7633df44ef670eee66d4471af4a233a12850a"
7
7
  }
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var qq=Object.create;var Lg=Object.defineProperty;var jq=Object.getOwnPropertyDescriptor;var Yq=Object.getOwnPropertyNames;var Vq=Object.getPrototypeOf,$q=Object.prototype.hasOwnProperty;var QR=(e,n,t)=>()=>{if(t)throw t[0];try{return e&&(n=e(e=0)),n}catch(s){throw t=[s],s}};var re=(e,n)=>()=>{try{return n||e((n={exports:{}}).exports,n),n.exports}catch(t){throw n=0,t}},xr=(e,n)=>{for(var t in n)Lg(e,t,{get:n[t],enumerable:!0})},Qq=(e,n,t,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of Yq(n))!$q.call(e,a)&&a!==t&&Lg(e,a,{get:()=>n[a],enumerable:!(s=jq(n,a))||s.enumerable});return e};var at=(e,n,t)=>(t=e!=null?qq(Vq(e)):{},Qq(n||!e||!e.__esModule?Lg(t,"default",{value:e,enumerable:!0}):t,e));var I,x=QR(()=>{I={"darwin-arm64":"f94cd5e1b65b71d35323419885084ee5d8f067c495650725181f90410565d459","darwin-x64":"d8303ce3bd266bb9e2753997081a669281184967891cd363160b0d0c9386f670","linux-arm64-gnu":"b78c34a8642d1daf559cfe0ef0cebd91498f110785ab6e511855c8cb44956ef8","linux-arm64-musl":"ef31914e76efa3eb798278a6af92028f465d5098bb968c6b303ca45b36005d6e","linux-x64-gnu":"b5c8ca78e045b2f0c67663889a21103027dd37cc351059d91804a6b2f53420b6","linux-x64-musl":"32e2f162245b4487ec3a1084d1452d56a9141c0c61110303f0ed4b6bc20e6d51","win32-arm64":"52a5b0ee810271db114616f34618b87a82fbf24aa295aad576d4f23038cef75c","win32-x64":"d0df70f0e67dbc2b5336228a279dae3791018e7ad5ab37934420c2362a517003"}});var KR,N,b=QR(()=>{"use strict";KR=require("node:url"),N=(0,KR.pathToFileURL)(__filename).href});var Ke=re(jn=>{"use strict";x();b();var Kg=Symbol.for("yaml.alias"),m_=Symbol.for("yaml.document"),kp=Symbol.for("yaml.map"),f_=Symbol.for("yaml.pair"),zg=Symbol.for("yaml.scalar"),Ip=Symbol.for("yaml.seq"),ws=Symbol.for("yaml.node.type"),_j=e=>!!e&&typeof e=="object"&&e[ws]===Kg,Aj=e=>!!e&&typeof e=="object"&&e[ws]===m_,wj=e=>!!e&&typeof e=="object"&&e[ws]===kp,Oj=e=>!!e&&typeof e=="object"&&e[ws]===f_,y_=e=>!!e&&typeof e=="object"&&e[ws]===zg,vj=e=>!!e&&typeof e=="object"&&e[ws]===Ip;function g_(e){if(e&&typeof e=="object")switch(e[ws]){case kp:case Ip:return!0}return!1}function kj(e){if(e&&typeof e=="object")switch(e[ws]){case Kg:case kp:case zg:case Ip:return!0}return!1}var Ij=e=>(y_(e)||g_(e))&&!!e.anchor;jn.ALIAS=Kg;jn.DOC=m_;jn.MAP=kp;jn.NODE_TYPE=ws;jn.PAIR=f_;jn.SCALAR=zg;jn.SEQ=Ip;jn.hasAnchor=Ij;jn.isAlias=_j;jn.isCollection=g_;jn.isDocument=Aj;jn.isMap=wj;jn.isNode=kj;jn.isPair=Oj;jn.isScalar=y_;jn.isSeq=vj});var Oc=re(Hg=>{"use strict";x();b();var Nn=Ke(),ut=Symbol("break visit"),E_=Symbol("skip children"),hs=Symbol("remove node");function Np(e,n){let t=S_(n);Nn.isDocument(e)?_r(null,e.contents,t,Object.freeze([e]))===hs&&(e.contents=null):_r(null,e,t,Object.freeze([]))}Np.BREAK=ut;Np.SKIP=E_;Np.REMOVE=hs;function _r(e,n,t,s){let a=x_(e,n,t,s);if(Nn.isNode(a)||Nn.isPair(a))return b_(e,s,a),_r(e,a,t,s);if(typeof a!="symbol"){if(Nn.isCollection(n)){s=Object.freeze(s.concat(n));for(let o=0;o<n.items.length;++o){let r=_r(o,n.items[o],t,s);if(typeof r=="number")o=r-1;else{if(r===ut)return ut;r===hs&&(n.items.splice(o,1),o-=1)}}}else if(Nn.isPair(n)){s=Object.freeze(s.concat(n));let o=_r("key",n.key,t,s);if(o===ut)return ut;o===hs&&(n.key=null);let r=_r("value",n.value,t,s);if(r===ut)return ut;r===hs&&(n.value=null)}}return a}async function Lp(e,n){let t=S_(n);Nn.isDocument(e)?await Ar(null,e.contents,t,Object.freeze([e]))===hs&&(e.contents=null):await Ar(null,e,t,Object.freeze([]))}Lp.BREAK=ut;Lp.SKIP=E_;Lp.REMOVE=hs;async function Ar(e,n,t,s){let a=await x_(e,n,t,s);if(Nn.isNode(a)||Nn.isPair(a))return b_(e,s,a),Ar(e,a,t,s);if(typeof a!="symbol"){if(Nn.isCollection(n)){s=Object.freeze(s.concat(n));for(let o=0;o<n.items.length;++o){let r=await Ar(o,n.items[o],t,s);if(typeof r=="number")o=r-1;else{if(r===ut)return ut;r===hs&&(n.items.splice(o,1),o-=1)}}}else if(Nn.isPair(n)){s=Object.freeze(s.concat(n));let o=await Ar("key",n.key,t,s);if(o===ut)return ut;o===hs&&(n.key=null);let r=await Ar("value",n.value,t,s);if(r===ut)return ut;r===hs&&(n.value=null)}}return a}function S_(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function x_(e,n,t,s){if(typeof t=="function")return t(e,n,s);if(Nn.isMap(n))return t.Map?.(e,n,s);if(Nn.isSeq(n))return t.Seq?.(e,n,s);if(Nn.isPair(n))return t.Pair?.(e,n,s);if(Nn.isScalar(n))return t.Scalar?.(e,n,s);if(Nn.isAlias(n))return t.Alias?.(e,n,s)}function b_(e,n,t){let s=n[n.length-1];if(Nn.isCollection(s))s.items[e]=t;else if(Nn.isPair(s))e==="key"?s.key=t:s.value=t;else if(Nn.isDocument(s))s.contents=t;else{let a=Nn.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}Hg.visit=Np;Hg.visitAsync=Lp});var Bg=re(R_=>{"use strict";x();b();var T_=Ke(),Nj=Oc(),Lj={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Pj=e=>e.replace(/[!,[\]{}]/g,n=>Lj[n]),vc=class e{constructor(n,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,n),this.tags=Object.assign({},e.defaultTags,t)}clone(){let n=new e(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){let n=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return n}add(n,t){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let s=n.trim().split(/[ \t]+/),a=s.shift();switch(a){case"%TAG":{if(s.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;let[o,r]=s;return this.tags[o]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[o]=s;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let r=/^\d+\.\d+$/.test(o);return t(6,`Unsupported YAML version ${o}`,r),!1}}default:return t(0,`Unknown directive ${a}`,!0),!1}}tagName(n,t){if(n==="!")return"!";if(n[0]!=="!")return t(`Not a valid tag: ${n}`),null;if(n[1]==="<"){let r=n.slice(2,-1);return r==="!"||r==="!!"?(t(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&t("Verbatim tags must end with a >"),r)}let[,s,a]=n.match(/^(.*!)([^!]*)$/s);a||t(`The ${n} tag has no suffix`);let o=this.tags[s];if(o)try{return o+decodeURIComponent(a)}catch(r){return t(String(r)),null}return s==="!"?n:(t(`Could not resolve tag: ${n}`),null)}tagString(n){for(let[t,s]of Object.entries(this.tags))if(n.startsWith(s))return t+Pj(n.substring(s.length));return n[0]==="!"?n:`!<${n}>`}toString(n){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags),a;if(n&&s.length>0&&T_.isNode(n.contents)){let o={};Nj.visit(n.contents,(r,i)=>{T_.isNode(i)&&i.tag&&(o[i.tag]=!0)}),a=Object.keys(o)}else a=[];for(let[o,r]of s)o==="!!"&&r==="tag:yaml.org,2002:"||(!n||a.some(i=>i.startsWith(r)))&&t.push(`%TAG ${o} ${r}`);return t.join(`
2
+ "use strict";var qq=Object.create;var Lg=Object.defineProperty;var jq=Object.getOwnPropertyDescriptor;var Yq=Object.getOwnPropertyNames;var Vq=Object.getPrototypeOf,$q=Object.prototype.hasOwnProperty;var QR=(e,n,t)=>()=>{if(t)throw t[0];try{return e&&(n=e(e=0)),n}catch(s){throw t=[s],s}};var re=(e,n)=>()=>{try{return n||e((n={exports:{}}).exports,n),n.exports}catch(t){throw n=0,t}},xr=(e,n)=>{for(var t in n)Lg(e,t,{get:n[t],enumerable:!0})},Qq=(e,n,t,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of Yq(n))!$q.call(e,a)&&a!==t&&Lg(e,a,{get:()=>n[a],enumerable:!(s=jq(n,a))||s.enumerable});return e};var at=(e,n,t)=>(t=e!=null?qq(Vq(e)):{},Qq(n||!e||!e.__esModule?Lg(t,"default",{value:e,enumerable:!0}):t,e));var I,x=QR(()=>{I={"darwin-arm64":"f94cd5e1b65b71d35323419885084ee5d8f067c495650725181f90410565d459","darwin-x64":"d8303ce3bd266bb9e2753997081a669281184967891cd363160b0d0c9386f670","linux-arm64-gnu":"b78c34a8642d1daf559cfe0ef0cebd91498f110785ab6e511855c8cb44956ef8","linux-arm64-musl":"ef31914e76efa3eb798278a6af92028f465d5098bb968c6b303ca45b36005d6e","linux-x64-gnu":"b5c8ca78e045b2f0c67663889a21103027dd37cc351059d91804a6b2f53420b6","linux-x64-musl":"32e2f162245b4487ec3a1084d1452d56a9141c0c61110303f0ed4b6bc20e6d51","win32-arm64":"d037cac56b75e725f51a4dd8f1a4f4488935873861f15751d4fa63876cd160d4","win32-x64":"a6ade9b31d6f8d1b02625abff722a691bc16f61d9840e7392abbee89a9f28a8c"}});var KR,N,b=QR(()=>{"use strict";KR=require("node:url"),N=(0,KR.pathToFileURL)(__filename).href});var Ke=re(jn=>{"use strict";x();b();var Kg=Symbol.for("yaml.alias"),m_=Symbol.for("yaml.document"),kp=Symbol.for("yaml.map"),f_=Symbol.for("yaml.pair"),zg=Symbol.for("yaml.scalar"),Ip=Symbol.for("yaml.seq"),ws=Symbol.for("yaml.node.type"),_j=e=>!!e&&typeof e=="object"&&e[ws]===Kg,Aj=e=>!!e&&typeof e=="object"&&e[ws]===m_,wj=e=>!!e&&typeof e=="object"&&e[ws]===kp,Oj=e=>!!e&&typeof e=="object"&&e[ws]===f_,y_=e=>!!e&&typeof e=="object"&&e[ws]===zg,vj=e=>!!e&&typeof e=="object"&&e[ws]===Ip;function g_(e){if(e&&typeof e=="object")switch(e[ws]){case kp:case Ip:return!0}return!1}function kj(e){if(e&&typeof e=="object")switch(e[ws]){case Kg:case kp:case zg:case Ip:return!0}return!1}var Ij=e=>(y_(e)||g_(e))&&!!e.anchor;jn.ALIAS=Kg;jn.DOC=m_;jn.MAP=kp;jn.NODE_TYPE=ws;jn.PAIR=f_;jn.SCALAR=zg;jn.SEQ=Ip;jn.hasAnchor=Ij;jn.isAlias=_j;jn.isCollection=g_;jn.isDocument=Aj;jn.isMap=wj;jn.isNode=kj;jn.isPair=Oj;jn.isScalar=y_;jn.isSeq=vj});var Oc=re(Hg=>{"use strict";x();b();var Nn=Ke(),ut=Symbol("break visit"),E_=Symbol("skip children"),hs=Symbol("remove node");function Np(e,n){let t=S_(n);Nn.isDocument(e)?_r(null,e.contents,t,Object.freeze([e]))===hs&&(e.contents=null):_r(null,e,t,Object.freeze([]))}Np.BREAK=ut;Np.SKIP=E_;Np.REMOVE=hs;function _r(e,n,t,s){let a=x_(e,n,t,s);if(Nn.isNode(a)||Nn.isPair(a))return b_(e,s,a),_r(e,a,t,s);if(typeof a!="symbol"){if(Nn.isCollection(n)){s=Object.freeze(s.concat(n));for(let o=0;o<n.items.length;++o){let r=_r(o,n.items[o],t,s);if(typeof r=="number")o=r-1;else{if(r===ut)return ut;r===hs&&(n.items.splice(o,1),o-=1)}}}else if(Nn.isPair(n)){s=Object.freeze(s.concat(n));let o=_r("key",n.key,t,s);if(o===ut)return ut;o===hs&&(n.key=null);let r=_r("value",n.value,t,s);if(r===ut)return ut;r===hs&&(n.value=null)}}return a}async function Lp(e,n){let t=S_(n);Nn.isDocument(e)?await Ar(null,e.contents,t,Object.freeze([e]))===hs&&(e.contents=null):await Ar(null,e,t,Object.freeze([]))}Lp.BREAK=ut;Lp.SKIP=E_;Lp.REMOVE=hs;async function Ar(e,n,t,s){let a=await x_(e,n,t,s);if(Nn.isNode(a)||Nn.isPair(a))return b_(e,s,a),Ar(e,a,t,s);if(typeof a!="symbol"){if(Nn.isCollection(n)){s=Object.freeze(s.concat(n));for(let o=0;o<n.items.length;++o){let r=await Ar(o,n.items[o],t,s);if(typeof r=="number")o=r-1;else{if(r===ut)return ut;r===hs&&(n.items.splice(o,1),o-=1)}}}else if(Nn.isPair(n)){s=Object.freeze(s.concat(n));let o=await Ar("key",n.key,t,s);if(o===ut)return ut;o===hs&&(n.key=null);let r=await Ar("value",n.value,t,s);if(r===ut)return ut;r===hs&&(n.value=null)}}return a}function S_(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function x_(e,n,t,s){if(typeof t=="function")return t(e,n,s);if(Nn.isMap(n))return t.Map?.(e,n,s);if(Nn.isSeq(n))return t.Seq?.(e,n,s);if(Nn.isPair(n))return t.Pair?.(e,n,s);if(Nn.isScalar(n))return t.Scalar?.(e,n,s);if(Nn.isAlias(n))return t.Alias?.(e,n,s)}function b_(e,n,t){let s=n[n.length-1];if(Nn.isCollection(s))s.items[e]=t;else if(Nn.isPair(s))e==="key"?s.key=t:s.value=t;else if(Nn.isDocument(s))s.contents=t;else{let a=Nn.isAlias(s)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}Hg.visit=Np;Hg.visitAsync=Lp});var Bg=re(R_=>{"use strict";x();b();var T_=Ke(),Nj=Oc(),Lj={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Pj=e=>e.replace(/[!,[\]{}]/g,n=>Lj[n]),vc=class e{constructor(n,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,n),this.tags=Object.assign({},e.defaultTags,t)}clone(){let n=new e(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){let n=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return n}add(n,t){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let s=n.trim().split(/[ \t]+/),a=s.shift();switch(a){case"%TAG":{if(s.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),s.length<2))return!1;let[o,r]=s;return this.tags[o]=r,!0}case"%YAML":{if(this.yaml.explicit=!0,s.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;let[o]=s;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let r=/^\d+\.\d+$/.test(o);return t(6,`Unsupported YAML version ${o}`,r),!1}}default:return t(0,`Unknown directive ${a}`,!0),!1}}tagName(n,t){if(n==="!")return"!";if(n[0]!=="!")return t(`Not a valid tag: ${n}`),null;if(n[1]==="<"){let r=n.slice(2,-1);return r==="!"||r==="!!"?(t(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&t("Verbatim tags must end with a >"),r)}let[,s,a]=n.match(/^(.*!)([^!]*)$/s);a||t(`The ${n} tag has no suffix`);let o=this.tags[s];if(o)try{return o+decodeURIComponent(a)}catch(r){return t(String(r)),null}return s==="!"?n:(t(`Could not resolve tag: ${n}`),null)}tagString(n){for(let[t,s]of Object.entries(this.tags))if(n.startsWith(s))return t+Pj(n.substring(s.length));return n[0]==="!"?n:`!<${n}>`}toString(n){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],s=Object.entries(this.tags),a;if(n&&s.length>0&&T_.isNode(n.contents)){let o={};Nj.visit(n.contents,(r,i)=>{T_.isNode(i)&&i.tag&&(o[i.tag]=!0)}),a=Object.keys(o)}else a=[];for(let[o,r]of s)o==="!!"&&r==="tag:yaml.org,2002:"||(!n||a.some(i=>i.startsWith(r)))&&t.push(`%TAG ${o} ${r}`);return t.join(`
3
3
  `)}};vc.defaultYaml={explicit:!1,version:"1.2"};vc.defaultTags={"!!":"tag:yaml.org,2002:"};R_.Directives=vc});var Pp=re(kc=>{"use strict";x();b();var __=Ke(),Cj=Oc();function Dj(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(t)}return!0}function A_(e){let n=new Set;return Cj.visit(e,{Value(t,s){s.anchor&&n.add(s.anchor)}}),n}function w_(e,n){for(let t=1;;++t){let s=`${e}${t}`;if(!n.has(s))return s}}function Uj(e,n){let t=[],s=new Map,a=null;return{onAnchor:o=>{t.push(o),a??(a=A_(e));let r=w_(n,a);return a.add(r),r},setAnchors:()=>{for(let o of t){let r=s.get(o);if(typeof r=="object"&&r.anchor&&(__.isScalar(r.node)||__.isCollection(r.node)))r.node.anchor=r.anchor;else{let i=new Error("Failed to resolve repeated object (this should not happen)");throw i.source=o,i}}},sourceObjects:s}}kc.anchorIsValid=Dj;kc.anchorNames=A_;kc.createNodeAnchors=Uj;kc.findNewAnchor=w_});var Wg=re(O_=>{"use strict";x();b();function Ic(e,n,t,s){if(s&&typeof s=="object")if(Array.isArray(s))for(let a=0,o=s.length;a<o;++a){let r=s[a],i=Ic(e,s,String(a),r);i===void 0?delete s[a]:i!==r&&(s[a]=i)}else if(s instanceof Map)for(let a of Array.from(s.keys())){let o=s.get(a),r=Ic(e,s,a,o);r===void 0?s.delete(a):r!==o&&s.set(a,r)}else if(s instanceof Set)for(let a of Array.from(s)){let o=Ic(e,s,a,a);o===void 0?s.delete(a):o!==a&&(s.delete(a),s.add(o))}else for(let[a,o]of Object.entries(s)){let r=Ic(e,s,a,o);r===void 0?delete s[a]:r!==o&&(s[a]=r)}return e.call(n,t,s)}O_.applyReviver=Ic});var da=re(k_=>{"use strict";x();b();var Mj=Ke();function v_(e,n,t){if(Array.isArray(e))return e.map((s,a)=>v_(s,String(a),t));if(e&&typeof e.toJSON=="function"){if(!t||!Mj.hasAnchor(e))return e.toJSON(n,t);let s={aliasCount:0,count:1,res:void 0};t.anchors.set(e,s),t.onCreate=o=>{s.res=o,delete t.onCreate};let a=e.toJSON(n,t);return t.onCreate&&t.onCreate(a),a}return typeof e=="bigint"&&!t?.keep?Number(e):e}k_.toJS=v_});var Cp=re(N_=>{"use strict";x();b();var Fj=Wg(),I_=Ke(),qj=da(),Gg=class{constructor(n){Object.defineProperty(this,I_.NODE_TYPE,{value:n})}clone(){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:t,maxAliasCount:s,onAnchor:a,reviver:o}={}){if(!I_.isDocument(n))throw new TypeError("A document argument is required");let r={anchors:new Map,doc:n,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},i=qj.toJS(this,"",r);if(typeof a=="function")for(let{count:c,res:d}of r.anchors.values())a(d,c);return typeof o=="function"?Fj.applyReviver(o,{"":i},"",i):i}};N_.NodeBase=Gg});var Nc=re(L_=>{"use strict";x();b();var jj=Pp(),Yj=Oc(),wr=Ke(),Vj=Cp(),$j=da(),Jg=class extends Vj.NodeBase{constructor(n){super(wr.ALIAS),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n,t){if(t?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let s;t?.aliasResolveCache?s=t.aliasResolveCache:(s=[],Yj.visit(n,{Node:(o,r)=>{(wr.isAlias(r)||wr.hasAnchor(r))&&s.push(r)}}),t&&(t.aliasResolveCache=s));let a;for(let o of s){if(o===this)break;o.anchor===this.source&&(a=o)}return a}toJSON(n,t){if(!t)return{source:this.source};let{anchors:s,doc:a,maxAliasCount:o}=t,r=this.resolve(a,t);if(!r){let c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let i=s.get(r);if(i||($j.toJS(r,null,t),i=s.get(r)),i?.res===void 0){let c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(o>=0&&(i.count+=1,i.aliasCount===0&&(i.aliasCount=Dp(a,r,s)),i.count*i.aliasCount>o)){let c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return i.res}toString(n,t,s){let a=`*${this.source}`;if(n){if(jj.anchorIsValid(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(n.implicitKey)return`${a} `}return a}};function Dp(e,n,t){if(wr.isAlias(n)){let s=n.resolve(e),a=t&&s&&t.get(s);return a?a.count*a.aliasCount:0}else if(wr.isCollection(n)){let s=0;for(let a of n.items){let o=Dp(e,a,t);o>s&&(s=o)}return s}else if(wr.isPair(n)){let s=Dp(e,n.key,t),a=Dp(e,n.value,t);return Math.max(s,a)}return 1}L_.Alias=Jg});var On=re(Xg=>{"use strict";x();b();var Qj=Ke(),Kj=Cp(),zj=da(),Hj=e=>!e||typeof e!="function"&&typeof e!="object",la=class extends Kj.NodeBase{constructor(n){super(Qj.SCALAR),this.value=n}toJSON(n,t){return t?.keep?this.value:zj.toJS(this.value,n,t)}toString(){return String(this.value)}};la.BLOCK_FOLDED="BLOCK_FOLDED";la.BLOCK_LITERAL="BLOCK_LITERAL";la.PLAIN="PLAIN";la.QUOTE_DOUBLE="QUOTE_DOUBLE";la.QUOTE_SINGLE="QUOTE_SINGLE";Xg.Scalar=la;Xg.isScalarValue=Hj});var Lc=re(C_=>{"use strict";x();b();var Bj=Nc(),uo=Ke(),P_=On(),Wj="tag:yaml.org,2002:";function Gj(e,n,t){if(n){let s=t.filter(o=>o.tag===n),a=s.find(o=>!o.format)??s[0];if(!a)throw new Error(`Tag ${n} not found`);return a}return t.find(s=>s.identify?.(e)&&!s.format)}function Jj(e,n,t){if(uo.isDocument(e)&&(e=e.contents),uo.isNode(e))return e;if(uo.isPair(e)){let p=t.schema[uo.MAP].createNode?.(t.schema,null,t);return p.items.push(e),p}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:s,onAnchor:a,onTagObj:o,schema:r,sourceObjects:i}=t,c;if(s&&e&&typeof e=="object"){if(c=i.get(e),c)return c.anchor??(c.anchor=a(e)),new Bj.Alias(c.anchor);c={anchor:null,node:null},i.set(e,c)}n?.startsWith("!!")&&(n=Wj+n.slice(2));let d=Gj(e,n,r.tags);if(!d){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let p=new P_.Scalar(e);return c&&(c.node=p),p}d=e instanceof Map?r[uo.MAP]:Symbol.iterator in Object(e)?r[uo.SEQ]:r[uo.MAP]}o&&(o(d),delete t.onTagObj);let l=d?.createNode?d.createNode(t.schema,e,t):typeof d?.nodeClass?.from=="function"?d.nodeClass.from(t.schema,e,t):new P_.Scalar(e);return n?l.tag=n:d.default||(l.tag=d.tag),c&&(c.node=l),l}C_.createNode=Jj});var Mp=re(Up=>{"use strict";x();b();var Xj=Lc(),ms=Ke(),Zj=Cp();function Zg(e,n,t){let s=t;for(let a=n.length-1;a>=0;--a){let o=n[a];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let r=[];r[o]=s,s=r}else s=new Map([[o,s]])}return Xj.createNode(s,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var D_=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,eE=class extends Zj.NodeBase{constructor(n,t){super(n),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(n){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return n&&(t.schema=n),t.items=t.items.map(s=>ms.isNode(s)||ms.isPair(s)?s.clone(n):s),this.range&&(t.range=this.range.slice()),t}addIn(n,t){if(D_(n))this.add(t);else{let[s,...a]=n,o=this.get(s,!0);if(ms.isCollection(o))o.addIn(a,t);else if(o===void 0&&this.schema)this.set(s,Zg(this.schema,a,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${a}`)}}deleteIn(n){let[t,...s]=n;if(s.length===0)return this.delete(t);let a=this.get(t,!0);if(ms.isCollection(a))return a.deleteIn(s);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${s}`)}getIn(n,t){let[s,...a]=n,o=this.get(s,!0);return a.length===0?!t&&ms.isScalar(o)?o.value:o:ms.isCollection(o)?o.getIn(a,t):void 0}hasAllNullValues(n){return this.items.every(t=>{if(!ms.isPair(t))return!1;let s=t.value;return s==null||n&&ms.isScalar(s)&&s.value==null&&!s.commentBefore&&!s.comment&&!s.tag})}hasIn(n){let[t,...s]=n;if(s.length===0)return this.has(t);let a=this.get(t,!0);return ms.isCollection(a)?a.hasIn(s):!1}setIn(n,t){let[s,...a]=n;if(a.length===0)this.set(s,t);else{let o=this.get(s,!0);if(ms.isCollection(o))o.setIn(a,t);else if(o===void 0&&this.schema)this.set(s,Zg(this.schema,a,t));else throw new Error(`Expected YAML collection at ${s}. Remaining path: ${a}`)}}};Up.Collection=eE;Up.collectionFromPath=Zg;Up.isEmptyPath=D_});var Pc=re(Fp=>{"use strict";x();b();var e4=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function nE(e,n){return/^\n+$/.test(e)?e.substring(1):n?e.replace(/^(?! *$)/gm,n):e}var n4=(e,n,t)=>e.endsWith(`
4
4
  `)?nE(t,n):t.includes(`
5
5
  `)?`
@@ -143,7 +143,7 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
143
143
  ${q}`)}let g=y.canonical+"::"+m$(y.projectReplacements);if(o.has(g))continue;o.add(g),d.push({project:y.project,generation:y.generation,weight:y.weight,componentPath:y.componentPath});let E=h$(y.mainYml);E.length>0&&(p=!0);let S=E.filter(q=>q.type==="local"&&q.path),R=S.filter(q=>vt(q.path)==="variables.yaml").map((q,V)=>({e:q,i:V})).sort((q,V)=>{let J=typeof q.e.index=="number"?q.e.index:q.i,Se=typeof V.e.index=="number"?V.e.index:V.i;return J-Se||q.i-V.i}).map(q=>q.e);for(let q of R){let V=oa(y.componentPath,q.path),J=await t.readFileIfExists(V);if(J===null)continue;r.add(await t.canonical(V));let Se=I1(J);c.push({project:y.project,generation:y.generation,variables:Se,rank:0,sources:N1(Se,V)})}let w=I1(y.mainYml),_=wn(y.componentPath,"variables.yaml"),T=await t.readFileIfExists(_);T&&r.add(await t.canonical(_));let A=T?I1(T):{},k=wn(y.componentPath,"main.yaml");c.push({project:y.project,generation:y.generation,variables:{...w,...A},rank:1,sources:{...N1(w,k),...N1(A,_)}});for(let q of S)i.push({path:wn(y.componentPath,q.path),replacements:[...y.projectReplacements,...q.replacements||[]],project:y.project,generation:y.generation,weight:y.weight,index:typeof q.index=="number"?q.index:0,override:!!q.override,discoveryOrder:l++});let M=new Set(await Promise.all(S.map(q=>t.canonical(wn(y.componentPath,q.path))))),C=y.generation===0?await t.canonical(wn(y.componentPath,"main.yaml")):null;for(let q of await t.globYaml(y.componentPath)){let V=await t.canonical(q);M.has(V)||C&&V===C||i.push({path:q,replacements:[...y.projectReplacements],project:y.project,generation:y.generation,weight:y.weight,index:0,override:!1,discoveryOrder:l++})}let F=E.filter(q=>q.type==="project"&&q.path).map((q,V)=>({ext:q,i:V})).sort((q,V)=>{let J=typeof q.ext.index=="number"?q.ext.index:q.i,Se=typeof V.ext.index=="number"?V.ext.index:V.i;return J-Se||q.i-V.i}).map(q=>q.ext);for(let q of F){let V=q.weight;if(V!==void 0&&(typeof V!="number"||!Number.isFinite(V)))throw new Error(`invalid weight "${q.weight}" on type: project "${q.path}" in project ${y.project} (weight must be a finite number)`);let J=oa(y.componentPath,q.path),{mainYml:Se,componentPath:Fe}=await t.searchMain(J);a.push({project:k1(Fe),canonical:await t.canonical(Fe),componentPath:Fe,mainYml:Se,generation:y.generation+1,weight:V===void 0?NaN:V,ancestors:[...y.ancestors,y.canonical],projectReplacements:[...y.projectReplacements,...q.replacements||[]]})}}let u=aO(i),h=i.some(y=>y.generation>=1),m=[];for(let y of u){if(vt(y.path)!=="variables.yaml")continue;let g=await t.canonical(y.path);r.has(g)||m.includes(y.path)||m.push(y.path)}let f=await f$(e,u.map(y=>y.path),r,t);return{worklist:u,variableSets:c,hasInheritance:h,hasExternals:p,projects:d,unadmittedVariableFiles:m,libraryVariableSets:f}}async function f$(e,n,t,s){let a=e.endsWith("/")?e:`${e}/`,o=[],r=new Set;for(let i of n){if(i.startsWith(a))continue;let c=Pn(i);for(let d=0;d<8&&!(c===""||a.startsWith(`${c}/`)||r.has(c));d+=1){r.add(c);let l=`${c}/variables.yaml`,p=await s.canonical(l);if(!t.has(p)){let h=await s.readFileIfExists(l);if(h!==null){let m=y$(h);Object.keys(m).length>0&&o.push({library:c,sourceFile:l,variables:m})}}let u=Pn(c);if(u===c)break;c=u}}return o}function y$(e){let n;try{n=(0,Nu.parse)(e)}catch{return{}}if(!n||typeof n!="object")return{};let t=n.variables,s=t&&typeof t=="object"?t:n,a={};for(let[o,r]of Object.entries(s))o!=="variables"&&(a[o]=r);return a}function aO(e){let n=e.filter(s=>s.generation>=1).sort((s,a)=>{if(s.generation!==a.generation)return a.generation-s.generation;let o=Number.isFinite(s.weight)?s.weight:0,r=Number.isFinite(a.weight)?a.weight:0;if(o!==r)return o-r;if(s.project===a.project){if(s.override!==a.override)return s.override?1:-1;if(s.index!==a.index)return a.index-s.index}return s.discoveryOrder-a.discoveryOrder}),t=e.filter(s=>s.generation===0).sort((s,a)=>s.override!==a.override?s.override?1:-1:s.index!==a.index?a.index-s.index:s.discoveryOrder-a.discoveryOrder);return[...n,...t].map(g$)}function g$(e){let{discoveryOrder:n,override:t,...s}=e;return s}function E$(e){return[...e].map((n,t)=>({v:n,i:t})).sort((n,t)=>n.v.generation!==t.v.generation?t.v.generation-n.v.generation:n.i-t.i)}function Pu(e){let n=E$(e),t={};for(let{v:s}of n)Object.assign(t,s.variables);return t}function N1(e,n){let t={};for(let s of Object.keys(e))t[s]=n;return t}x();b();x();b();x();b();var L1={pullers:[{key:"beforePullSteps",label:"Before pull",phase:"sequence"},{key:"pullSteps",label:"Pull",phase:"sequence"},{key:"afterPullSteps",label:"After pull",phase:"sequence"},{key:"steps",label:"Steps",phase:"sequence",runtimeFlow:"steps"},{key:"onErrorSteps",label:"On error",phase:"error",runtimeFlow:"onError"},{key:"finalSteps",label:"Final",phase:"final",runtimeFlow:"final"}],pushers:[{key:"beforePushSteps",label:"Before push",phase:"sequence"},{key:"pushSteps",label:"Push",phase:"sequence"},{key:"afterPushSteps",label:"After push",phase:"sequence"},{key:"finalSteps",label:"Final",phase:"final"}]},toe=[...L1.pullers.slice(0,3),{key:"finalSteps",label:"Final",phase:"final"}],soe=L1.pullers.slice(3);x();b();x();b();x();b();x();b();x();b();x();b();x();b();var Yoe=d_({adapterId:"worker",adapterVersion:"1",identityFields:["key"],displayTypeFields:["displayType"],dialect:"worker/v1",capabilities:{semanticEdit:!0,presentationEdit:!0}});var I$=at(kt(),1);function P1(){let e={sourceFile:"",project:"",generation:0,weight:NaN},n=[],t=[],s=new Map,a=[];return{setSource(o){e=o},emit(o){n.push({...o,...e})},events(){return n},note(o){t.includes(o)||t.push(o)},notes(){return t},snapshot(o,r,i){let c=JSON.stringify([o,r]);s.has(c)||s.set(c,i)},snapshots(){return s},recordOverwrite(o){a.push(o)},overwrites(){return a}}}x();b();var Eo=at(kt(),1);function C1(e){return{canonical:async n=>n,readFileIfExists:async n=>await e.read(n)??null,globYaml:async n=>[...await e.glob(n,"**/*.yaml")],searchMain:n=>A1(n,e)}}async function rO(e,n,t){return Lu(e,n,t)}var iO=Iu,cO=w1;function dO(e,n,t){let s=(0,Eo.parse)(e,{keepSourceTokens:!0}),a=e.replace(/(indexGroups:)[^\S\n]*\n(?:[^\S\n]*\n)*([^\S\n]*dbType:)/g,`$1 []
144
144
  $2`),o=(0,Eo.parse)(a,{keepSourceTokens:!0});delete o.externals,t||(delete o.variables,o=ku((0,Eo.stringify)(o,{keepSourceTokens:!0,lineWidth:0}),n));let r=sd(o);return{tokenForm:s,output:r,outputText:(0,Eo.stringify)(r,{keepSourceTokens:!0,lineWidth:0})}}function D1(e,n,t,s){let a=(0,Eo.parse)(n,{keepSourceTokens:!0}),o=t.find(i=>i.generation===0)?.project??"",r=new Set(e.events().filter(i=>i.depth===0).map(i=>JSON.stringify([i.parentKey,i.idOrKey])));e.setSource({sourceFile:wn(s,"main.yaml"),project:o,generation:0,weight:NaN});for(let[i,c]of Object.entries(a??{}))if(!(mt.has(i)||!Array.isArray(c)))for(let d of c){if(!d||typeof d!="object")continue;let l="id"in d?d.id:"key"in d?d.key:void 0;if(l==null)continue;let p=String(l),u=JSON.stringify([i,p]);r.has(u)||(r.add(u),e.emit({idOrKey:p,parentKey:i,operation:"added",depth:0}))}}async function U1(e){let{componentPath:n,mainYml:t,io:s,reader:a}=e,o=e.raw??!1,r=[],{worklist:i,variableSets:c,hasInheritance:d,hasExternals:l,projects:p,unadmittedVariableFiles:u,libraryVariableSets:h}=await rO(n,t,s),m=new Map;for(let T of i)for(let A of T.replacements||[])!A||A.toKey==null||A.fromKey==null||(m.has(A.toKey)||m.set(A.toKey,new Set),m.get(A.toKey).add(A.fromKey));for(let[T,A]of m)A.size>1&&r.push(`Warning: replacement toKey "${T}" is produced from multiple distinct fromKeys (${[...A].join(", ")}); components may merge unexpectedly.`);let f=await iO(i,a,n,t),y=P1(),g=[],E=cO(t,i,y,n,f,r,{onMissingInclude:T=>{g.some(A=>A.path===T.path)||g.push(T)}}),S=Pu(c),{tokenForm:R,output:w,outputText:_}=dO(E,S,o);return{output:w,outputText:_,tokenForm:R,variables:S,worklist:i,projects:p,variableSets:c,tracer:y,sources:f,componentPath:n,rootMainYml:t,projectTitle:vt(Pn(n)),hasExternals:l,hasInheritance:d,warnings:r,unadmittedVariableFiles:u,libraryVariableSets:h,missingIncludes:g,contractVersion:4}}x();b();x();b();x();b();var U$=/^Error at file (.+?): /,M$=/^Could not read partial: (.+)$/,F$=/^(inheritance cycle detected|There is no main\.yaml file in the project|Looks like there are more than one mail\.yaml file|Could not read main\.yaml at |!md include not found)/;function q$(e){let n=e?.linePos;if(!Array.isArray(n)||n.length===0)return;let t=a=>{let o=n[a];if(!(!o||typeof o.line!="number"||typeof o.col!="number"))return{line:o.line-1,column:o.col-1}},s=t(0);if(s)return{start:s,end:t(1)??s}}function Uu(e,n=0){if(!(!e||n>8))return q$(e)??Uu(e.cause,n+1)}function Mu(e,n){let t;try{t=e instanceof Error?e.message:String(e)}catch{t="An error that cannot be converted to text was thrown."}let s=U$.exec(t);if(s)return{code:"parse-failed",message:t,sourceFile:s[1],range:Uu(e),cause:e};let a=M$.exec(t);return a?{code:"resolve-failed",message:t,sourceFile:a[1],cause:e}:F$.test(t)?{code:"resolve-failed",message:t,sourceFile:n,range:Uu(e),cause:e}:{code:"compose-failed",message:t,sourceFile:n,range:Uu(e),cause:e}}x();b();x();b();x();b();var Fu=at(kt(),1);x();b();var id=at(kt(),1);x();b();var M1=at(kt(),1);x();b();x();b();var Fr=require("node:fs"),bO=require("node:crypto"),Hu=require("node:util"),fs=require("node:url"),Mr=require("node:path");x();b();x();b();var Be=(e,n,t)=>Object.freeze({status:"failed",code:e,message:n,...t===void 0?{}:{rootId:t}}),cd=(e,n)=>e.scheme===n.scheme&&e.authority===n.authority&&e.components.length<=n.components.length&&e.components.every((t,s)=>t===n.components[s]),F1=class{constructor(n,t,s){this.source=n;this.port=s;this.roots=Object.freeze(t.map((a,o)=>Object.freeze({...a,components:Object.freeze([...a.components]),id:`root-${o+1}`}))),Object.freeze(this)}source;port;roots;async openAuthorized(n,t={}){if(t.signal?.aborted)return Be("OPEN_CANCELLED","Workspace read was cancelled.");let s=await this.port.openAuthorized(this.roots,n,t);return t.signal?.aborted?Be("OPEN_CANCELLED","Workspace read was cancelled."):s}describe(){return{source:this.source,roots:this.roots.map(({id:n,scheme:t})=>({id:n,scheme:t}))}}};async function q1(e,n,t){let s=e.negotiated!==void 0?"negotiated":e.launch!==void 0?"launch":e.environment!==void 0?"environment":"cwd",a=e[s];if(!a?.length)return Be("ROOT_UNAVAILABLE","The selected Root authority is empty or unavailable. Supply valid workspace Roots.");let o=async c=>{let d=[];for(let l of c){if(t?.aborted)return Be("OPEN_CANCELLED","Root resolution was cancelled.");let p=await n.canonicalize(l,t);if(t?.aborted)return Be("OPEN_CANCELLED","Root resolution was cancelled.");if("status"in p)return p;if(!p.uri||!p.scheme||!p.physicalIdentity||p.components.some(u=>!u||u==="."||u===".."))return Be("ROOT_UNAVAILABLE","The selected Root authority has an invalid canonical identity.");d.some(u=>u.physicalIdentity===p.physicalIdentity&&u.scheme===p.scheme&&u.authority===p.authority)||d.push(p)}return d.sort((l,p)=>l.uri<p.uri?-1:l.uri>p.uri?1:0)},r=await o(a);if(!Array.isArray(r))return r;if(e.negotiated!==void 0&&e.launch!==void 0){if(!e.launch.length)return Be("ROOT_UNAVAILABLE","The supplied Launch Root authority is empty.");let c=await o(e.launch);if(!Array.isArray(c))return c;if(!r.some(d=>c.some(l=>cd(d,l)||cd(l,d))))return Be("ROOT_CONFLICT","Negotiated Roots and Launch Root authority are disjoint.")}let i=r;if(e.explicit!==void 0){if(e.explicit.length===0)return Be("ROOT_UNAVAILABLE","The explicit Root selection is empty.");let c=await o(e.explicit);if(!Array.isArray(c))return c;if(c.some(d=>!r.some(l=>cd(l,d))))return Be("ROOT_CONFLICT","The explicit Root selection is outside the selected Root authority.");i=c}return t?.aborted?Be("OPEN_CANCELLED","Root resolution was cancelled."):{status:"ready",rootSet:new F1(s,i,n)}}function Sa(e,n="authored"){let t=e.replace(/\\(?:u([a-fA-F0-9]{4})|x([a-fA-F0-9]{2})|U([a-fA-F0-9]{8}))/g,(s,a,o,r)=>{let i=Number.parseInt(a??o??r,16);return i<=1114111?String.fromCodePoint(i):"\uFFFD"}).replace(/\\\//g,"/");return/\b(?:[\w-]*(?:password|passwd|secret|token|api[_-]?key|authorization|authentication|credential|connectionString|private[_-]?key|environment)[\w-]*|env)["']?(?:\s*[:=]|[ \t]*(?:#[^\r\n]*)?\r?\n(?:[ \t]*(?:#[^\r\n]*)?\r?\n)*[ \t]*:)/i.test(t)||/(?:^|\n)[ \t]*(?:export[ \t]+)?[A-Z_][A-Z0-9_]*[ \t]*=/.test(t)||/\b(?:name|key|header|headerName)["']?\s*:\s*["']?(?:authorization|proxy-authorization|authentication)\b/i.test(t)||/-----BEGIN [^-]*PRIVATE KEY-----|\$\{|\$\(|\$[A-Za-z_]|\{\{|\{\s*\$secret[/.]|secret:\/\/|[a-z][a-z0-9+.-]*:\/\/[^\s/@]+@/i.test(t)||n==="authored"&&/`[^`]*`/.test(t)?"[REDACTED]":e}x();b();async function Q$(e,n){let t=e.timeoutMs??1e4,s=e.maxProjects??50;if(!Number.isSafeInteger(t)||t<1||t>2147483647||!Number.isSafeInteger(s)||s<1||s>1e3)return{status:"incomplete",complete:!1,code:"DISCOVERY_INCOMPLETE",candidates:Object.freeze([]),message:"Discovery bounds are invalid."};let a=new AbortController,o=setTimeout(()=>a.abort(),t),r=e.signal?AbortSignal.any([e.signal,a.signal]):a.signal,i=(d=Object.freeze([]))=>({status:"incomplete",complete:!1,code:e.signal?.aborted?"DISCOVERY_CANCELLED":"DISCOVERY_TIMEOUT",candidates:d,message:"Project discovery did not complete."}),c;try{if(r.aborted)return i();let d=new Promise(p=>{c=()=>p(i()),r.addEventListener("abort",c,{once:!0})}),l=await Promise.race([n(r,t,s),d]);return r.aborted?i("candidates"in l?l.candidates:void 0):l}finally{clearTimeout(o),c&&r.removeEventListener("abort",c)}}async function K$(e,n,t,s,a,o){let r={signal:t,timeoutMs:s,maxProjects:a},i=o&&n.inspect?await n.inspect(e,o,r):await n.discover(e,r);if(t.aborted)return{status:"incomplete",complete:!1,code:"DISCOVERY_CANCELLED",candidates:Object.freeze([]),message:"Project discovery did not complete."};let c=new Map(i.candidates.map(l=>[l.id,l])),d=Object.freeze([...c.values()].sort((l,p)=>l.id<p.id?-1:l.id>p.id?1:0).slice(0,a).map(l=>Object.freeze({...l})));return i.status!=="complete"?{...i,candidates:d}:c.size>a?{status:"incomplete",complete:!1,code:"DISCOVERY_INCOMPLETE",candidates:d,message:"Project discovery exceeded its result limit."}:{status:"complete",complete:!0,candidates:d}}async function qu(e,n,t={}){return Q$(t,async(s,a,o)=>{let r;if(t.project!==void 0){let p=await n.canonicalize(t.project,s);if(s.aborted)return{status:"incomplete",complete:!1,code:t.signal?.aborted?"DISCOVERY_CANCELLED":"DISCOVERY_TIMEOUT",candidates:Object.freeze([]),message:"Project discovery did not complete."};if("status"in p)return p;if(!e.roots.some(u=>cd(u,p)))return Be("ROOT_CONFLICT","The selected Project is outside the effective Roots.");r=p}let i=await K$(e,n,s,a,o,r);if(i.status!=="complete")return i;let c=t.expectedProject,d=!c&&r?i.candidates.filter(p=>p.componentUri===r.uri):[],l=c?i.candidates.filter(p=>p.componentUri===c.componentUri&&p.detectorType===c.detectorType&&p.descriptorUri===c.descriptorUri&&(!r||p.componentUri===r.uri)):r?d.length?d:i.candidates.filter(p=>p.uri===r.uri):i.candidates;return l.length===1?{status:"selected",project:l[0]}:{status:"failed",code:l.length?"PROJECT_AMBIGUOUS":"PROJECT_NOT_FOUND",message:l.length?"Select one canonical Project URI using the project argument or HexaSync IDE: Select Template Project.":"No supported Project matches the current selection inside the effective Roots.",candidates:Object.freeze(l.slice(0,50))}})}x();b();var j1=class{#e;#n;#a;#s;#r;#m=new Map;#u=0;#l=0;#i=new AbortController;#c=!1;constructor(n){this.#e=n}get context(){return Object.freeze({generation:this.#u,roots:this.#e,...this.#n?{project:this.#n}:{},...this.#r?{knowledge:this.#r}:{},signal:this.#i.signal})}setRoots(n){if(this.#c)throw new Error("The server session is closed.");this.#i.abort(),this.#i=new AbortController,this.#n=void 0,this.#a=void 0,this.#s=void 0,this.#r=void 0,this.#m.clear(),this.#e=n,this.#u++}setKnowledge(n,t){return this.#c||t!==this.#u?!1:(this.#r=n,!0)}cache(n,t,s){return this.#c||s!==this.#u?!1:(this.#m.set(n,t),!0)}cached(n){return this.#m.get(n)}async selectProject(n,t={}){let s=++this.#l;return this.run(async a=>{if(a.roots.status!=="ready")return a.roots;let o=t.project??this.#a,r=await qu(a.roots.rootSet,n,{...t,project:o,expectedProject:t.expectedProject??(t.project===void 0?this.#s:void 0),signal:t.signal?AbortSignal.any([t.signal,a.signal]):a.signal});return s!==this.#l?{status:"failed",code:"SESSION_INVALIDATED",message:"Project selection changed during the operation. Retry with the current selection."}:(a.generation===this.#u&&!this.#c&&r.status!=="incomplete"&&!(r.status==="failed"&&r.code==="OPEN_CANCELLED")&&(this.#n=r.status==="selected"?r.project:void 0,r.status==="selected"?(this.#a=r.project.componentUri,this.#s=r.project):t.project!==void 0&&(this.#a=t.project,this.#s=t.expectedProject)),r)})}async run(n){let t=this.context;if(this.#c)return{status:"failed",code:"SESSION_INVALIDATED",message:"The server session is closed."};let s=await n(t);return t.generation!==this.#u||this.#c?{status:"failed",code:"SESSION_INVALIDATED",message:"Workspace context changed during the operation. Retry with current Roots."}:s}dispose(){this.#i.abort(),this.#c=!0,this.#n=void 0,this.#a=void 0,this.#s=void 0,this.#r=void 0,this.#m.clear(),this.#u++}};function hO(e){return new j1(e)}x();b();var mO=require("node:module"),fO=require("node:crypto"),Y1=require("node:fs"),xa=require("node:path"),yO=require("node:url"),gO=Object.freeze(["linux-x64-gnu","linux-arm64-gnu","linux-x64-musl","linux-arm64-musl","darwin-x64","darwin-arm64","win32-x64","win32-arm64"]);function z$(e){return e&&typeof e=="object"&&"glibcVersionRuntime"in e&&typeof e.glibcVersionRuntime=="string"&&e.glibcVersionRuntime!==""?"gnu":"musl"}var ju;function EO(){if(ju)return ju;if(process.platform!=="linux")return ju={platform:process.platform,arch:process.arch};let e=process.report,n=e.excludeNetwork;e.excludeNetwork=!0;try{let t=e.getReport(),s=t&&typeof t=="object"&&"header"in t?t.header:void 0;return ju={platform:process.platform,arch:process.arch,libc:z$(s)}}finally{e.excludeNetwork=n}}function SO(e){if(e.platform==="linux"&&e.libc===void 0)return;let n=e.platform==="linux"?`${e.platform}-${e.arch}-${e.libc}`:`${e.platform}-${e.arch}`;return gO.find(t=>t===n)}var vs=class extends Error{name="RootNativeUnavailableError"};function H$(e,n,t){let s=t&&typeof t=="object"&&Object.hasOwn(t,n)?t[n]:void 0;if(typeof s!="string"||!/^[a-f0-9]{64}$/.test(s))throw new vs(`This package ships no trusted atomic Root adapter for ${n}. Reinstall the Host package; no unsafe filesystem fallback is used.`);let a=(0,xa.join)(e,"prebuilds",n,"root-authority.node"),o;try{o=(0,Y1.readFileSync)(a)}catch{throw new vs(`The atomic Root adapter for ${n} is missing. Reinstall the Host package; no unsafe filesystem fallback is used.`)}if((0,fO.createHash)("sha256").update(o).digest("hex")!==s)throw new vs(`Atomic Root native integrity mismatch for ${n}. Reinstall the trusted Host package.`);return a}function B$(e){if(typeof I<"u")return I;try{return JSON.parse((0,Y1.readFileSync)((0,xa.join)(e,"prebuilds","integrity.json"),"utf8"))}catch{return}}var Yu;function Ur(){if(Yu)return Yu;let e=EO(),n=SO(e);if(n===void 0){let i=e.libc===void 0?"":` (${e.libc==="gnu"?"glibc":"musl"})`;throw new vs(`No atomic Root adapter exists for ${e.platform}/${e.arch}${i}. Supported Hosts: Linux (x64, arm64; glibc or musl), macOS (x64, arm64) and Windows (x64, arm64). No unsafe filesystem fallback is used.`)}let t=typeof __filename=="string"?__filename:(0,yO.fileURLToPath)(N),s=(0,xa.dirname)(t),a=(0,xa.basename)(s)==="src"?(0,xa.join)(s,"../dist"):s,o=H$(a,n,B$(a)),r=(0,mO.createRequire)(t)(o);if(typeof r?.request!="function")throw new vs(`The atomic Root adapter for ${n} did not initialise in this Host process.`);return Yu=r,Yu}var Vu=(0,Hu.promisify)(Fr.close),W$=(0,Hu.promisify)(Fr.fstat),G$=(0,Hu.promisify)(Fr.read),J$=4*1024*1024,X$=64*1024*1024,V1=e=>Be("ROOT_UNSUPPORTED",e instanceof vs?e.message:"Atomic Root-relative operations require the shipped native adapter for this Host. Reinstall a supported Host package; no unsafe filesystem fallback is used."),ba=()=>Be("OPEN_CANCELLED","Workspace operation was cancelled."),$1=e=>/^(?:\.env(?:\..*)?|credentials?(?:\..*)?|id_(?:rsa|dsa|ecdsa|ed25519)(?:\..*)?)$|\.(?:pem|key|p12|pfx)$/i.test(e),Qu=e=>e&&typeof e=="object"&&"code"in e&&typeof e.code=="string"?e.code:void 0,xO=e=>Qu(e)===void 0||["EPERM","EINVAL","ENOSYS"].includes(Qu(e)),Z$=e=>["EXDEV","ELOOP","ESTALE","EAGAIN"].includes(Qu(e)??"");function Ku(){try{Ur();return}catch(e){return V1(e)}}function Bu(e){if(process.platform!=="win32")return{authority:"",components:e.split("/").filter(Boolean)};let n=/^[\\/]{2}([^\\/]+)[\\/]+(.*)$/s.exec(e),t=(n?n[2]:e).split(/[\\/]/).filter(Boolean);return!n&&/^[a-z]:$/i.test(t[0]??"")&&(t[0]=t[0].toUpperCase()),{authority:n?n[1].toLowerCase():"",components:t}}function zu(e){try{if(!e.startsWith("file:")||e.includes("\0")||e.includes("\\")||decodeURIComponent(e).split("/").some(s=>s==="."||s===".."))return;let t=new URL(e);return t.protocol!=="file:"||t.username||t.password||t.search||t.hash?void 0:(0,fs.fileURLToPath)(t)}catch{return}}function eQ(e,n){return{uri:(0,fs.pathToFileURL)(e).href,scheme:"file",...Bu(e),physicalIdentity:n}}function dd(e){let n=zu(e.uri);if(n===void 0||e.scheme!=="file")return;let{authority:t,components:s}=Bu(n);return t===e.authority&&s.length===e.components.length&&s.every((a,o)=>a===e.components[o])?n:void 0}function TO(e,n){let{authority:t,components:s}=Bu(n);if(!(dd(e)===void 0||t!==e.authority||e.components.length>s.length||!e.components.every((a,o)=>a===s[o])))return s.slice(e.components.length).join("/")||"."}async function $u(e,n){let t=dd(e);if(t===void 0)throw Object.assign(new Error("Invalid Root identity."),{code:"ESTALE"});return Ur().request("open",t,e.physicalIdentity,n)}function ld(){return{async canonicalize(e,n){if(n?.aborted)return ba();let t=Ku();if(t)return t;let s=zu(e);if(s===void 0)return Be("ROOT_UNAVAILABLE","Supply an absolute local file URI without traversal.");try{let a=await Ur().request("identity",s,"",".");return n?.aborted?ba():eQ(s,a)}catch(a){return n?.aborted?ba():xO(a)?V1(a):Be("ROOT_UNAVAILABLE","Root is unavailable or contains a symbolic link.")}},async openAuthorized(e,n,t){if(t.signal?.aborted)return ba();let s=Ku();if(s)return s;let a=zu(n);if(a===void 0||Bu(a).components.some($1))return Be("ROOT_CONFLICT","Workspace URI is outside the permitted content boundary.");let r=e.map(u=>({root:u,relative:TO(u,a)})).filter(u=>u.relative!==void 0).sort((u,h)=>h.root.components.length-u.root.components.length)[0];if(!r)return Be("ROOT_CONFLICT","Workspace URI is outside the selected Roots.");let{root:i,relative:c}=r,d=t.maxBytes??J$;if(!Number.isSafeInteger(d)||d<0||d>X$)return Be("OPEN_TOO_LARGE","Workspace byte limit must be an integer between 0 and 64 MiB.",i.id);if(t.expectedSha256!==void 0&&(typeof t.expectedSha256!="string"||!/^[a-f0-9]{64}$/.test(t.expectedSha256)))return Be("OPEN_UNAVAILABLE","Workspace file checksum is invalid.",i.id);let l=t.expectedSha256===void 0?void 0:(0,bO.createHash)("sha256"),p;try{if(p=await $u(i,c),t.signal?.aborted)return ba();if((await W$(p)).size>d)return Be("OPEN_TOO_LARGE","Workspace file exceeds the read byte limit.",i.id);let h=Buffer.allocUnsafe(Math.min(64*1024,d+1)),m=new TextDecoder("utf-8",{fatal:!0}),f=[],y=0;for(;;){if(t.signal?.aborted)return ba();let S=await G$(p,h,0,Math.min(h.length,d+1-y),null);if(t.signal?.aborted)return ba();if(!S.bytesRead)break;if(y+=S.bytesRead,y>d)return Be("OPEN_TOO_LARGE","Workspace file exceeds the read byte limit.",i.id);let R=h.subarray(0,S.bytesRead);l?.update(R),f.push(m.decode(R,{stream:!0}))}if(l&&l.digest("hex")!==t.expectedSha256)return Be("OPEN_UNAVAILABLE","Workspace file checksum did not match.",i.id);f.push(m.decode());let g=f.join("");if(t.projection==="host-parse")return{status:"opened",uri:(0,fs.pathToFileURL)(a).href,text:g,rootId:i.id};let E=Sa(g,/\.(?:md|markdown)$/i.test(a)?"markdown":"authored");return E==="[REDACTED]"?Be("CONTENT_REDACTED","Workspace content contains sensitive or executable values.",i.id):{status:"opened",uri:(0,fs.pathToFileURL)(a).href,text:E,rootId:i.id}}catch(u){return t.signal?.aborted?ba():xO(u)&&p===void 0?V1(u):Be(Z$(u)?"ROOT_CONFLICT":"OPEN_UNAVAILABLE","Workspace file could not be read through the atomic Root boundary.",i.id)}finally{p!==void 0&&await Vu(p)}}}}function Wu(){return{canonicalize:ld().canonicalize,async discover(e,n){let t=[],s=(h,m)=>({status:"incomplete",complete:!1,code:h,candidates:[],message:m}),a=h=>({status:"incomplete",complete:!1,code:"DISCOVERY_INCOMPLETE",candidates:t.sort((m,f)=>m.uri.localeCompare(f.uri)||m.id.localeCompare(f.id)),message:h});if(n.signal?.aborted)return s("DISCOVERY_CANCELLED","Project discovery was cancelled.");let o=Ku();if(o)return s("DISCOVERY_INCOMPLETE",o.message);let r=Date.now()+(n.timeoutMs??5e3),i=n.maxProjects??1e3;if(!Number.isFinite(r)||!Number.isSafeInteger(i)||i<1)return s("DISCOVERY_INCOMPLETE","Invalid project discovery bounds.");let c=[],d=[],l=0,p=0,u;try{e:for(let f of e.roots){let y=dd(f);if(y===void 0)return s("DISCOVERY_INCOMPLETE","Root identity is unavailable.");let g=["."];for(;g.length;){if(n.signal?.aborted)return s("DISCOVERY_CANCELLED","Project discovery was cancelled.");if(Date.now()>=r)return s("DISCOVERY_TIMEOUT","Project discovery exceeded its deadline.");if(++l>1e4){u="Project traversal exceeded its directory bound.";break e}let E=g.pop(),S=await Ur().request("list",y,f.physicalIdentity,E);for(let R of S){if(++p>1e5){u="Project discovery exceeded its entry bound.";break e}if(Rr.includes(R.name)||$1(R.name))continue;let w=E==="."?R.name:`${E}/${R.name}`;if(R.type==="directory"){if(g.length+l>=1e4){u="Project traversal exceeded its directory bound.";break e}g.push(w)}else R.type==="file"&&(ca.some(_=>wc(_)===R.name)&&c.push({root:f,relative:w,name:R.name}),ca.some(_=>_.scopeMarkerGlob===`**/${R.name}`)&&d.push({rootId:f.id,relative:w,name:R.name}))}}}for(let f of d){if(n.signal?.aborted)return s("DISCOVERY_CANCELLED","Project discovery was cancelled.");if(Date.now()>=r)return s("DISCOVERY_TIMEOUT","Project discovery exceeded its deadline.");let y=e.roots.find(g=>g.id===f.rootId);await Vu(await $u(y,f.relative))}let h=new Set,m=[...ca].sort((f,y)=>y.precedence-f.precedence);for(let f of m)for(let y of c){if(n.signal?.aborted)return s("DISCOVERY_CANCELLED","Project discovery was cancelled.");if(Date.now()>=r)return s("DISCOVERY_TIMEOUT","Project discovery exceeded its deadline.");if(wc(f)!==y.name)continue;let g=dd(y.root),E=(0,fs.pathToFileURL)((0,Mr.join)(g,y.relative)).href,S=f.scopeMarkerGlob===void 0?[]:d.filter(_=>_.rootId===y.root.id&&`**/${_.name}`===f.scopeMarkerGlob);if(S.length&&!S.some(_=>_.relative.lastIndexOf("/")<0||y.relative.startsWith(_.relative.slice(0,_.relative.lastIndexOf("/")+1)))||!f.accepts(E,""))continue;let R=f.componentPathFor(E),w=f.rootFor(R);if(!h.has(R)&&(await Vu(await $u(y.root,y.relative)),h.add(R),t.push({id:R,uri:w,componentUri:R,descriptorUri:E,name:(0,Mr.basename)((0,fs.fileURLToPath)(w)),detectorType:f.kind,rootId:y.root.id}),t.length>i))return a("Project discovery exceeded its candidate bound.")}return n.signal?.aborted?s("DISCOVERY_CANCELLED","Project discovery was cancelled."):Date.now()>=r?s("DISCOVERY_TIMEOUT","Project discovery exceeded its deadline."):u!==void 0?a(u):{status:"complete",complete:!0,candidates:t.sort((f,y)=>f.uri.localeCompare(y.uri)||f.id.localeCompare(y.id))}}catch{return s(n.signal?.aborted?"DISCOVERY_CANCELLED":"DISCOVERY_INCOMPLETE","Project discovery could not complete through the atomic Root boundary.")}},async inspect(e,n,t){let s=(m,f)=>({status:"incomplete",complete:!1,code:m,candidates:[],message:f});if(t.signal?.aborted)return s("DISCOVERY_CANCELLED","Project selection was cancelled.");let a=Ku();if(a)return s("DISCOVERY_INCOMPLETE",a.message);let o=Date.now()+(t.timeoutMs??5e3);if(!Number.isFinite(o))return s("DISCOVERY_INCOMPLETE","Invalid project discovery bounds.");let r=zu(n.uri),i=r===void 0?void 0:e.roots.map(m=>({root:m,relative:TO(m,r)})).filter(m=>m.relative!==void 0).sort((m,f)=>f.root.components.length-m.root.components.length)[0],c={status:"complete",complete:!0,candidates:[]};if(i===void 0)return c;let{root:d,relative:l}=i;if(l!=="."&&l.split("/").some(m=>Rr.includes(m)||$1(m)))return c;let p=dd(d),u=(m,f)=>m==="."?f:`${m}/${f}`,h=async m=>{try{return await Ur().request("list",p,d.physicalIdentity,m)}catch(f){if(["ENOENT","ENOTDIR"].includes(Qu(f)??""))return[];throw f}};try{let m=await h(l),f=[{directory:l,entries:m}];for(let E of["partials","partial"])m.some(S=>S.name===E&&S.type==="directory")&&f.push({directory:u(l,E),entries:await h(u(l,E))});let y=[],g=new Set;for(let E of[...ca].sort((S,R)=>R.precedence-S.precedence))for(let S of f){if(t.signal?.aborted)return s("DISCOVERY_CANCELLED","Project selection was cancelled.");if(Date.now()>=o)return s("DISCOVERY_TIMEOUT","Project selection exceeded its deadline.");let R=wc(E);if(R===void 0||!S.entries.some(k=>k.name===R&&k.type==="file"))continue;let w=u(S.directory,R),_=(0,fs.pathToFileURL)((0,Mr.join)(p,w)).href;if(!E.accepts(_,""))continue;let T=E.componentPathFor(_);if(g.has(T))continue;await Vu(await $u(d,w)),g.add(T);let A=E.rootFor(T);y.push({id:T,uri:A,componentUri:T,descriptorUri:_,name:(0,Mr.basename)((0,fs.fileURLToPath)(A)),detectorType:E.kind,rootId:d.id})}return t.signal?.aborted?s("DISCOVERY_CANCELLED","Project selection was cancelled."):{status:"complete",complete:!0,candidates:y.sort((E,S)=>E.uri.localeCompare(S.uri)||E.id.localeCompare(S.id))}}catch{return s(t.signal?.aborted?"DISCOVERY_CANCELLED":"DISCOVERY_INCOMPLETE","Project selection could not be verified through the atomic Root boundary.")}}}}var Td=require("node:fs/promises"),mh=require("node:url");x();b();var sv=require("node:url"),Vr=require("node:path"),cv=require("node:url"),Es=require("fs"),rK=at(require("node:fs"),1),Aa=require("node:fs/promises"),ph=require("node:events"),nS=at(require("node:stream"),1),dv=require("node:string_decoder"),KO=(e,n,t)=>{let s=e instanceof RegExp?RO(e,t):e,a=n instanceof RegExp?RO(n,t):n,o=s!==null&&a!=null&&nQ(s,a,t);return o&&{start:o[0],end:o[1],pre:t.slice(0,o[0]),body:t.slice(o[0]+s.length,o[1]),post:t.slice(o[1]+a.length)}},RO=(e,n)=>{let t=n.match(e);return t?t[0]:null},nQ=(e,n,t)=>{let s,a,o,r,i,c=t.indexOf(e),d=t.indexOf(n,c+1),l=c;if(c>=0&&d>0){if(e===n)return[c,d];for(s=[],o=t.length;l>=0&&!i;){if(l===c)s.push(l),c=t.indexOf(e,l+1);else if(s.length===1){let p=s.pop();p!==void 0&&(i=[p,d])}else a=s.pop(),a!==void 0&&a<o&&(o=a,r=d),d=t.indexOf(n,l+1);l=c<d&&c>=0?c:d}s.length&&r!==void 0&&(i=[o,r])}return i},zO="\0SLASH"+Math.random()+"\0",HO="\0OPEN"+Math.random()+"\0",Z1="\0CLOSE"+Math.random()+"\0",BO="\0COMMA"+Math.random()+"\0",WO="\0PERIOD"+Math.random()+"\0",tQ=new RegExp(zO,"g"),sQ=new RegExp(HO,"g"),aQ=new RegExp(Z1,"g"),oQ=new RegExp(BO,"g"),rQ=new RegExp(WO,"g"),iQ=/\\\\/g,cQ=/\\{/g,dQ=/\\}/g,lQ=/\\,/g,pQ=/\\./g,uQ=1e5;function Q1(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function hQ(e){return e.replace(iQ,zO).replace(cQ,HO).replace(dQ,Z1).replace(lQ,BO).replace(pQ,WO)}function mQ(e){return e.replace(tQ,"\\").replace(sQ,"{").replace(aQ,"}").replace(oQ,",").replace(rQ,".")}function GO(e){if(!e)return[""];let n=[],t=KO("{","}",e);if(!t)return e.split(",");let{pre:s,body:a,post:o}=t,r=s.split(",");r[r.length-1]+="{"+a+"}";let i=GO(o);return o.length&&(r[r.length-1]+=i.shift(),r.push.apply(r,i)),n.push.apply(n,r),n}function fQ(e,n={}){if(!e)return[];let{max:t=uQ}=n;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),gd(hQ(e),t,!0).map(mQ)}function yQ(e){return"{"+e+"}"}function gQ(e){return/^-?0\d/.test(e)}function EQ(e,n){return e<=n}function SQ(e,n){return e>=n}function gd(e,n,t){let s=[],a=KO("{","}",e);if(!a)return[e];let o=a.pre,r=a.post.length?gd(a.post,n,!1):[""];if(/\$$/.test(a.pre))for(let i=0;i<r.length&&i<n;i++){let c=o+"{"+a.body+"}"+r[i];s.push(c)}else{let i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),d=i||c,l=a.body.indexOf(",")>=0;if(!d&&!l)return a.post.match(/,(?!,).*\}/)?(e=a.pre+"{"+a.body+Z1+a.post,gd(e,n,!0)):[e];let p;if(d)p=a.body.split(/\.\./);else if(p=GO(a.body),p.length===1&&p[0]!==void 0&&(p=gd(p[0],n,!1).map(yQ),p.length===1))return r.map(h=>a.pre+p[0]+h);let u;if(d&&p[0]!==void 0&&p[1]!==void 0){let h=Q1(p[0]),m=Q1(p[1]),f=Math.max(p[0].length,p[1].length),y=p.length===3&&p[2]!==void 0?Math.abs(Q1(p[2])):1,g=EQ;m<h&&(y*=-1,g=SQ);let E=p.some(gQ);u=[];for(let S=h;g(S,m);S+=y){let R;if(c)R=String.fromCharCode(S),R==="\\"&&(R="");else if(R=String(S),E){let w=f-R.length;if(w>0){let _=new Array(w+1).join("0");S<0?R="-"+_+R.slice(1):R=_+R}}u.push(R)}}else{u=[];for(let h=0;h<p.length;h++)u.push.apply(u,gd(p[h],n,!1))}for(let h=0;h<u.length;h++)for(let m=0;m<r.length&&s.length<n;m++){let f=o+u[h]+r[m];(!t||d||f)&&s.push(f)}}return s}var rh=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")},xQ={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},pd=e=>e.replace(/[[\]\\-]/g,"\\$&"),bQ=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),_O=e=>e.join(""),TQ=(e,n)=>{let t=n;if(e.charAt(t)!=="[")throw new Error("not in a brace expression");let s=[],a=[],o=t+1,r=!1,i=!1,c=!1,d=!1,l=t,p="";e:for(;o<e.length;){let m=e.charAt(o);if((m==="!"||m==="^")&&o===t+1){d=!0,o++;continue}if(m==="]"&&r&&!c){l=o+1;break}if(r=!0,m==="\\"&&!c){c=!0,o++;continue}if(m==="["&&!c){for(let[f,[y,g,E]]of Object.entries(xQ))if(e.startsWith(f,o)){if(p)return["$.",!1,e.length-t,!0];o+=f.length,E?a.push(y):s.push(y),i=i||g;continue e}}if(c=!1,p){m>p?s.push(pd(p)+"-"+pd(m)):m===p&&s.push(pd(m)),p="",o++;continue}if(e.startsWith("-]",o+1)){s.push(pd(m+"-")),o+=2;continue}if(e.startsWith("-",o+1)){p=m,o+=2;continue}s.push(pd(m)),o++}if(l<o)return["",!1,0,!1];if(!s.length&&!a.length)return["$.",!1,e.length-t,!0];if(a.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!d){let m=s[0].length===2?s[0].slice(-1):s[0];return[bQ(m),!1,l-t,!1]}let u="["+(d?"^":"")+_O(s)+"]",h="["+(d?"":"^")+_O(a)+"]";return[s.length&&a.length?"("+u+"|"+h+")":s.length?u:h,i,l-t,!0]},Yr=(e,{windowsPathsNoEscape:n=!1,magicalBraces:t=!0}={})=>t?n?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):n?e.replace(/\[([^\/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1"),RQ=new Set(["!","?","+","*","@"]),AO=e=>RQ.has(e),_Q="(?!(?:^|/)\\.\\.?(?:$|/))",Gu="(?!\\.)",AQ=new Set(["[","."]),wQ=new Set(["..","."]),OQ=new Set("().*{}+?[]^$\\!"),vQ=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),eS="[^/]",wO=eS+"*?",OO=eS+"+?",JO=class Nt{type;#e;#n;#a=!1;#s=[];#r;#m;#u;#l=!1;#i;#c;#h=!1;constructor(n,t,s={}){this.type=n,n&&(this.#n=!0),this.#r=t,this.#e=this.#r?this.#r.#e:this,this.#i=this.#e===this?s:this.#e.#i,this.#u=this.#e===this?[]:this.#e.#u,n==="!"&&!this.#e.#l&&this.#u.push(this),this.#m=this.#r?this.#r.#s.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let n of this.#s)if(typeof n!="string"&&(n.type||n.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#s.map(n=>String(n)).join("|")+")":this.#c=this.#s.map(n=>String(n)).join("")}#d(){if(this!==this.#e)throw new Error("should only call on root");if(this.#l)return this;this.toString(),this.#l=!0;let n;for(;n=this.#u.pop();){if(n.type!=="!")continue;let t=n,s=t.#r;for(;s;){for(let a=t.#m+1;!s.type&&a<s.#s.length;a++)for(let o of n.#s){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(s.#s[a])}t=s,s=t.#r}}return this}push(...n){for(let t of n)if(t!==""){if(typeof t!="string"&&!(t instanceof Nt&&t.#r===this))throw new Error("invalid part: "+t);this.#s.push(t)}}toJSON(){let n=this.type===null?this.#s.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#s.map(t=>t.toJSON())];return this.isStart()&&!this.type&&n.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#l&&this.#r?.type==="!")&&n.push({}),n}isStart(){if(this.#e===this)return!0;if(!this.#r?.isStart())return!1;if(this.#m===0)return!0;let n=this.#r;for(let t=0;t<this.#m;t++){let s=n.#s[t];if(!(s instanceof Nt&&s.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#r?.type==="!")return!0;if(!this.#r?.isEnd())return!1;if(!this.type)return this.#r?.isEnd();let n=this.#r?this.#r.#s.length:0;return this.#m===n-1}copyIn(n){typeof n=="string"?this.push(n):this.push(n.clone(this))}clone(n){let t=new Nt(this.type,n);for(let s of this.#s)t.copyIn(s);return t}static#o(n,t,s,a){let o=!1,r=!1,i=-1,c=!1;if(t.type===null){let h=s,m="";for(;h<n.length;){let f=n.charAt(h++);if(o||f==="\\"){o=!o,m+=f;continue}if(r){h===i+1?(f==="^"||f==="!")&&(c=!0):f==="]"&&!(h===i+2&&c)&&(r=!1),m+=f;continue}else if(f==="["){r=!0,i=h,c=!1,m+=f;continue}if(!a.noext&&AO(f)&&n.charAt(h)==="("){t.push(m),m="";let y=new Nt(f,t);h=Nt.#o(n,y,h,a),t.push(y);continue}m+=f}return t.push(m),h}let d=s+1,l=new Nt(null,t),p=[],u="";for(;d<n.length;){let h=n.charAt(d++);if(o||h==="\\"){o=!o,u+=h;continue}if(r){d===i+1?(h==="^"||h==="!")&&(c=!0):h==="]"&&!(d===i+2&&c)&&(r=!1),u+=h;continue}else if(h==="["){r=!0,i=d,c=!1,u+=h;continue}if(AO(h)&&n.charAt(d)==="("){l.push(u),u="";let m=new Nt(h,l);l.push(m),d=Nt.#o(n,m,d,a);continue}if(h==="|"){l.push(u),u="",p.push(l),l=new Nt(null,t);continue}if(h===")")return u===""&&t.#s.length===0&&(t.#h=!0),l.push(u),u="",t.push(...p,l),d;u+=h}return t.type=null,t.#n=void 0,t.#s=[n.substring(s-1)],d}static fromGlob(n,t={}){let s=new Nt(null,void 0,t);return Nt.#o(n,s,0,t),s}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let n=this.toString(),[t,s,a,o]=this.toRegExpSource();if(!(a||this.#n||this.#i.nocase&&!this.#i.nocaseMagicOnly&&n.toUpperCase()!==n.toLowerCase()))return s;let r=(this.#i.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${t}$`,r),{_src:t,_glob:n})}get options(){return this.#i}toRegExpSource(n){let t=n??!!this.#i.dot;if(this.#e===this&&this.#d(),!this.type){let c=this.isStart()&&this.isEnd()&&!this.#s.some(u=>typeof u!="string"),d=this.#s.map(u=>{let[h,m,f,y]=typeof u=="string"?Nt.#b(u,this.#n,c):u.toRegExpSource(n);return this.#n=this.#n||f,this.#a=this.#a||y,h}).join(""),l="";if(this.isStart()&&typeof this.#s[0]=="string"&&!(this.#s.length===1&&wQ.has(this.#s[0]))){let u=AQ,h=t&&u.has(d.charAt(0))||d.startsWith("\\.")&&u.has(d.charAt(2))||d.startsWith("\\.\\.")&&u.has(d.charAt(4)),m=!t&&!n&&u.has(d.charAt(0));l=h?_Q:m?Gu:""}let p="";return this.isEnd()&&this.#e.#l&&this.#r?.type==="!"&&(p="(?:$|\\/)"),[l+d+p,Yr(d),this.#n=!!this.#n,this.#a]}let s=this.type==="*"||this.type==="+",a=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#f(t);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let c=this.toString();return this.#s=[c],this.type=null,this.#n=void 0,[c,Yr(this.toString()),!1,!1]}let r=!s||n||t||!Gu?"":this.#f(!0);r===o&&(r=""),r&&(o=`(?:${o})(?:${r})*?`);let i="";if(this.type==="!"&&this.#h)i=(this.isStart()&&!t?Gu:"")+OO;else{let c=this.type==="!"?"))"+(this.isStart()&&!t&&!n?Gu:"")+wO+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&r?")":this.type==="*"&&r?")?":`)${this.type}`;i=a+o+c}return[i,Yr(o),this.#n=!!this.#n,this.#a]}#f(n){return this.#s.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[s,a,o,r]=t.toRegExpSource(n);return this.#a=this.#a||r,s}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#b(n,t,s=!1){let a=!1,o="",r=!1,i=!1;for(let c=0;c<n.length;c++){let d=n.charAt(c);if(a){a=!1,o+=(OQ.has(d)?"\\":"")+d;continue}if(d==="*"){if(i)continue;i=!0,o+=s&&/^[*]+$/.test(n)?OO:wO,t=!0;continue}else i=!1;if(d==="\\"){c===n.length-1?o+="\\\\":a=!0;continue}if(d==="["){let[l,p,u,h]=TQ(n,c);if(u){o+=l,r=r||p,c+=u-1,t=t||h;continue}}if(d==="?"){o+=eS,t=!0;continue}o+=vQ(d)}return[o,Yr(n),!!t,r]}},XO=(e,{windowsPathsNoEscape:n=!1,magicalBraces:t=!1}={})=>t?n?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):n?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),it=(e,n,t={})=>(rh(n),!t.nocomment&&n.charAt(0)==="#"?!1:new _a(n,t).match(e)),kQ=/^\*+([^+@!?\*\[\(]*)$/,IQ=e=>n=>!n.startsWith(".")&&n.endsWith(e),NQ=e=>n=>n.endsWith(e),LQ=e=>(e=e.toLowerCase(),n=>!n.startsWith(".")&&n.toLowerCase().endsWith(e)),PQ=e=>(e=e.toLowerCase(),n=>n.toLowerCase().endsWith(e)),CQ=/^\*+\.\*+$/,DQ=e=>!e.startsWith(".")&&e.includes("."),UQ=e=>e!=="."&&e!==".."&&e.includes("."),MQ=/^\.\*+$/,FQ=e=>e!=="."&&e!==".."&&e.startsWith("."),qQ=/^\*+$/,jQ=e=>e.length!==0&&!e.startsWith("."),YQ=e=>e.length!==0&&e!=="."&&e!=="..",VQ=/^\?+([^+@!?\*\[\(]*)?$/,$Q=([e,n=""])=>{let t=ZO([e]);return n?(n=n.toLowerCase(),s=>t(s)&&s.toLowerCase().endsWith(n)):t},QQ=([e,n=""])=>{let t=ev([e]);return n?(n=n.toLowerCase(),s=>t(s)&&s.toLowerCase().endsWith(n)):t},KQ=([e,n=""])=>{let t=ev([e]);return n?s=>t(s)&&s.endsWith(n):t},zQ=([e,n=""])=>{let t=ZO([e]);return n?s=>t(s)&&s.endsWith(n):t},ZO=([e])=>{let n=e.length;return t=>t.length===n&&!t.startsWith(".")},ev=([e])=>{let n=e.length;return t=>t.length===n&&t!=="."&&t!==".."},nv=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",vO={win32:{sep:"\\"},posix:{sep:"/"}},HQ=nv==="win32"?vO.win32.sep:vO.posix.sep;it.sep=HQ;var rt=Symbol("globstar **");it.GLOBSTAR=rt;var BQ="[^/]",WQ=BQ+"*?",GQ="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",JQ="(?:(?!(?:\\/|^)\\.).)*?",XQ=(e,n={})=>t=>it(t,e,n);it.filter=XQ;var jt=(e,n={})=>Object.assign({},e,n),ZQ=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return it;let n=it;return Object.assign((t,s,a={})=>n(t,s,jt(e,a)),{Minimatch:class extends n.Minimatch{constructor(t,s={}){super(t,jt(e,s))}static defaults(t){return n.defaults(jt(e,t)).Minimatch}},AST:class extends n.AST{constructor(t,s,a={}){super(t,s,jt(e,a))}static fromGlob(t,s={}){return n.AST.fromGlob(t,jt(e,s))}},unescape:(t,s={})=>n.unescape(t,jt(e,s)),escape:(t,s={})=>n.escape(t,jt(e,s)),filter:(t,s={})=>n.filter(t,jt(e,s)),defaults:t=>n.defaults(jt(e,t)),makeRe:(t,s={})=>n.makeRe(t,jt(e,s)),braceExpand:(t,s={})=>n.braceExpand(t,jt(e,s)),match:(t,s,a={})=>n.match(t,s,jt(e,a)),sep:n.sep,GLOBSTAR:rt})};it.defaults=ZQ;var tv=(e,n={})=>(rh(e),n.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:fQ(e,{max:n.braceExpandMax}));it.braceExpand=tv;var eK=(e,n={})=>new _a(e,n).makeRe();it.makeRe=eK;var nK=(e,n,t={})=>{let s=new _a(n,t);return e=e.filter(a=>s.match(a)),s.options.nonull&&!e.length&&e.push(n),e};it.match=nK;var kO=/[?*]|[+@!]\(.*?\)|\[|\]/,tK=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),_a=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,n={}){rh(e),n=n||{},this.options=n,this.pattern=e,this.platform=n.platform||nv,this.isWindows=this.platform==="win32";let t="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[t]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let n of e)if(typeof n!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,n=this.options;if(!n.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...a)=>console.error(...a)),this.debug(this.pattern,this.globSet);let t=this.globSet.map(a=>this.slashSplit(a));this.globParts=this.preprocess(t),this.debug(this.pattern,this.globParts);let s=this.globParts.map((a,o,r)=>{if(this.isWindows&&this.windowsNoMagicRoot){let i=a[0]===""&&a[1]===""&&(a[2]==="?"||!kO.test(a[2]))&&!kO.test(a[3]),c=/^[a-z]:/i.test(a[0]);if(i)return[...a.slice(0,4),...a.slice(4).map(d=>this.parse(d))];if(c)return[a[0],...a.slice(1).map(d=>this.parse(d))]}return a.map(i=>this.parse(i))});if(this.debug(this.pattern,s),this.set=s.filter(a=>a.indexOf(!1)===-1),this.isWindows)for(let a=0;a<this.set.length;a++){let o=this.set[a];o[0]===""&&o[1]===""&&this.globParts[a][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let s=0;s<e[t].length;s++)e[t][s]==="**"&&(e[t][s]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):n>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(n=>{let t=-1;for(;(t=n.indexOf("**",t+1))!==-1;){let s=t;for(;n[s+1]==="**";)s++;s!==t&&n.splice(t,s-t)}return n})}levelOneOptimize(e){return e.map(n=>(n=n.reduce((t,s)=>{let a=t[t.length-1];return s==="**"&&a==="**"?t:s===".."&&a&&a!==".."&&a!=="."&&a!=="**"?(t.pop(),t):(t.push(s),t)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let s=1;s<e.length-1;s++){let a=e[s];s===1&&a===""&&e[0]===""||(a==="."||a==="")&&(n=!0,e.splice(s,1),s--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(n=!0,e.pop())}let t=0;for(;(t=e.indexOf("..",t+1))!==-1;){let s=e[t-1];s&&s!=="."&&s!==".."&&s!=="**"&&(n=!0,e.splice(t-1,2),t-=2)}}while(n);return e.length===0?[""]:e}firstPhasePreProcess(e){let n=!1;do{n=!1;for(let t of e){let s=-1;for(;(s=t.indexOf("**",s+1))!==-1;){let o=s;for(;t[o+1]==="**";)o++;o>s&&t.splice(s+1,o-s);let r=t[s+1],i=t[s+2],c=t[s+3];if(r!==".."||!i||i==="."||i===".."||!c||c==="."||c==="..")continue;n=!0,t.splice(s,1);let d=t.slice(0);d[s]="**",e.push(d),s--}if(!this.preserveMultipleSlashes){for(let o=1;o<t.length-1;o++){let r=t[o];o===1&&r===""&&t[0]===""||(r==="."||r==="")&&(n=!0,t.splice(o,1),o--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let a=0;for(;(a=t.indexOf("..",a+1))!==-1;){let o=t[a-1];if(o&&o!=="."&&o!==".."&&o!=="**"){n=!0;let r=a===1&&t[a+1]==="**"?["."]:[];t.splice(a-1,2,...r),t.length===0&&t.push(""),a-=2}}}}while(n);return e}secondPhasePreProcess(e){for(let n=0;n<e.length-1;n++)for(let t=n+1;t<e.length;t++){let s=this.partsMatch(e[n],e[t],!this.preserveMultipleSlashes);if(s){e[n]=[],e[t]=s;break}}return e.filter(n=>n.length)}partsMatch(e,n,t=!1){let s=0,a=0,o=[],r="";for(;s<e.length&&a<n.length;)if(e[s]===n[a])o.push(r==="b"?n[a]:e[s]),s++,a++;else if(t&&e[s]==="**"&&n[a]===e[s+1])o.push(e[s]),s++;else if(t&&n[a]==="**"&&e[s]===n[a+1])o.push(n[a]),a++;else if(e[s]==="*"&&n[a]&&(this.options.dot||!n[a].startsWith("."))&&n[a]!=="**"){if(r==="b")return!1;r="a",o.push(e[s]),s++,a++}else if(n[a]==="*"&&e[s]&&(this.options.dot||!e[s].startsWith("."))&&e[s]!=="**"){if(r==="a")return!1;r="b",o.push(n[a]),s++,a++}else return!1;return e.length===n.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,n=!1,t=0;for(let s=0;s<e.length&&e.charAt(s)==="!";s++)n=!n,t++;t&&(this.pattern=e.slice(t)),this.negate=n}matchOne(e,n,t=!1){let s=this.options;if(this.isWindows){let m=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),f=!m&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),y=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),g=!y&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),E=f?3:m?0:void 0,S=g?3:y?0:void 0;if(typeof E=="number"&&typeof S=="number"){let[R,w]=[e[E],n[S]];R.toLowerCase()===w.toLowerCase()&&(n[S]=R,S>E?n=n.slice(S):E>S&&(e=e.slice(E)))}}let{optimizationLevel:a=1}=this.options;a>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:n}),this.debug("matchOne",e.length,n.length);for(var o=0,r=0,i=e.length,c=n.length;o<i&&r<c;o++,r++){this.debug("matchOne loop");var d=n[r],l=e[o];if(this.debug(n,d,l),d===!1)return!1;if(d===rt){this.debug("GLOBSTAR",[n,d,l]);var p=o,u=r+1;if(u===c){for(this.debug("** at the end");o<i;o++)if(e[o]==="."||e[o]===".."||!s.dot&&e[o].charAt(0)===".")return!1;return!0}for(;p<i;){var h=e[p];if(this.debug(`
145
145
  globstar while`,e,p,n,u,h),this.matchOne(e.slice(p),n.slice(u),t))return this.debug("globstar found match!",p,i,h),!0;if(h==="."||h===".."||!s.dot&&h.charAt(0)==="."){this.debug("dot detected!",e,p,n,u);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(t&&(this.debug(`
146
- >>> no match, partial?`,e,p,n,u),p===i))}let m;if(typeof d=="string"?(m=l===d,this.debug("string match",d,l,m)):(m=d.test(l),this.debug("pattern match",d,l,m)),!m)return!1}if(o===i&&r===c)return!0;if(o===i)return t;if(r===c)return o===i-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return tv(this.pattern,this.options)}parse(e){rh(e);let n=this.options;if(e==="**")return rt;if(e==="")return"";let t,s=null;(t=e.match(qQ))?s=n.dot?YQ:jQ:(t=e.match(kQ))?s=(n.nocase?n.dot?PQ:LQ:n.dot?NQ:IQ)(t[1]):(t=e.match(VQ))?s=(n.nocase?n.dot?QQ:$Q:n.dot?KQ:zQ)(t):(t=e.match(CQ))?s=n.dot?UQ:DQ:(t=e.match(MQ))&&(s=FQ);let a=JO.fromGlob(e,this.options).toMMPattern();return s&&typeof a=="object"&&Reflect.defineProperty(a,"test",{value:s}),a}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let n=this.options,t=n.noglobstar?WQ:n.dot?GQ:JQ,s=new Set(n.nocase?["i"]:[]),a=e.map(i=>{let c=i.map(l=>{if(l instanceof RegExp)for(let p of l.flags.split(""))s.add(p);return typeof l=="string"?tK(l):l===rt?rt:l._src});c.forEach((l,p)=>{let u=c[p+1],h=c[p-1];l!==rt||h===rt||(h===void 0?u!==void 0&&u!==rt?c[p+1]="(?:\\/|"+t+"\\/)?"+u:c[p]=t:u===void 0?c[p-1]=h+"(?:\\/|\\/"+t+")?":u!==rt&&(c[p-1]=h+"(?:\\/|\\/"+t+"\\/)"+u,c[p+1]=rt))});let d=c.filter(l=>l!==rt);if(this.partial&&d.length>=1){let l=[];for(let p=1;p<=d.length;p++)l.push(d.slice(0,p).join("/"));return"(?:"+l.join("|")+")"}return d.join("/")}).join("|"),[o,r]=e.length>1?["(?:",")"]:["",""];a="^"+o+a+r+"$",this.partial&&(a="^(?:\\/|"+o+a.slice(1,-1)+r+")$"),this.negate&&(a="^(?!"+a+").+$");try{this.regexp=new RegExp(a,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,n=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&n)return!0;let t=this.options;this.isWindows&&(e=e.split("\\").join("/"));let s=this.slashSplit(e);this.debug(this.pattern,"split",s);let a=this.set;this.debug(this.pattern,"set",a);let o=s[s.length-1];if(!o)for(let r=s.length-2;!o&&r>=0;r--)o=s[r];for(let r=0;r<a.length;r++){let i=a[r],c=s;if(t.matchBase&&i.length===1&&(c=[o]),this.matchOne(c,i,n))return t.flipNegate?!0:!this.negate}return t.flipNegate?!1:this.negate}static defaults(e){return it.defaults(e).Minimatch}};it.AST=JO;it.Minimatch=_a;it.escape=XO;it.unescape=Yr;var sK=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,av=new Set,X1=typeof process=="object"&&process?process:{},ov=(e,n,t,s)=>{typeof X1.emitWarning=="function"?X1.emitWarning(e,n,t,s):console.error(`[${t}] ${n}: ${e}`)},ih=globalThis.AbortController,IO=globalThis.AbortSignal;if(typeof ih>"u"){IO=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,s){this._onabort.push(s)}},ih=class{constructor(){n()}signal=new IO;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(let s of this.signal._onabort)s(t);this.signal.onabort?.(t)}}};let e=X1.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",n=()=>{e&&(e=!1,ov("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",n))}}var aK=e=>!av.has(e),Ra=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),rv=e=>Ra(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ah:null:null,ah=class extends Array{constructor(e){super(e),this.fill(0)}},oK=class Ed{heap;length;static#e=!1;static create(n){let t=rv(n);if(!t)return[];Ed.#e=!0;let s=new Ed(n,t);return Ed.#e=!1,s}constructor(n,t){if(!Ed.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(n),this.length=0}push(n){this.heap[this.length++]=n}pop(){return this.heap[--this.length]}},lh=class iv{#e;#n;#a;#s;#r;#m;#u;#l;get perf(){return this.#l}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#c;#h;#d;#o;#f;#b;#x;#y;#v;#g;#_;#A;#E;#S;#T;#w;#t;#C;static unsafeExposeInternals(n){return{starts:n.#A,ttls:n.#E,autopurgeTimers:n.#S,sizes:n.#_,keyMap:n.#h,keyList:n.#d,valList:n.#o,next:n.#f,prev:n.#b,get head(){return n.#x},get tail(){return n.#y},free:n.#v,isBackgroundFetch:t=>n.#p(t),backgroundFetch:(t,s,a,o)=>n.#V(t,s,a,o),moveToTail:t=>n.#U(t),indexes:t=>n.#I(t),rindexes:t=>n.#N(t),isStale:t=>n.#R(t)}}get max(){return this.#e}get maxSize(){return this.#n}get calculatedSize(){return this.#c}get size(){return this.#i}get fetchMethod(){return this.#m}get memoMethod(){return this.#u}get dispose(){return this.#a}get onInsert(){return this.#s}get disposeAfter(){return this.#r}constructor(n){let{max:t=0,ttl:s,ttlResolution:a=1,ttlAutopurge:o,updateAgeOnGet:r,updateAgeOnHas:i,allowStale:c,dispose:d,onInsert:l,disposeAfter:p,noDisposeOnSet:u,noUpdateTTL:h,maxSize:m=0,maxEntrySize:f=0,sizeCalculation:y,fetchMethod:g,memoMethod:E,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:_,ignoreFetchAbort:T,perf:A}=n;if(A!==void 0&&typeof A?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#l=A??sK,t!==0&&!Ra(t))throw new TypeError("max option must be a nonnegative integer");let k=t?rv(t):Array;if(!k)throw new Error("invalid max value: "+t);if(this.#e=t,this.#n=m,this.maxEntrySize=f||this.#n,this.sizeCalculation=y,this.sizeCalculation){if(!this.#n&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(E!==void 0&&typeof E!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#u=E,g!==void 0&&typeof g!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#m=g,this.#w=!!g,this.#h=new Map,this.#d=new Array(t).fill(void 0),this.#o=new Array(t).fill(void 0),this.#f=new k(t),this.#b=new k(t),this.#x=0,this.#y=0,this.#v=oK.create(t),this.#i=0,this.#c=0,typeof d=="function"&&(this.#a=d),typeof l=="function"&&(this.#s=l),typeof p=="function"?(this.#r=p,this.#g=[]):(this.#r=void 0,this.#g=void 0),this.#T=!!this.#a,this.#C=!!this.#s,this.#t=!!this.#r,this.noDisposeOnSet=!!u,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!_,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#n!==0&&!Ra(this.#n))throw new TypeError("maxSize must be a positive integer if specified");if(!Ra(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#Q()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!R,this.updateAgeOnGet=!!r,this.updateAgeOnHas=!!i,this.ttlResolution=Ra(a)||a===0?a:1,this.ttlAutopurge=!!o,this.ttl=s||0,this.ttl){if(!Ra(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#e===0&&this.ttl===0&&this.#n===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#n){let M="LRU_CACHE_UNBOUNDED";aK(M)&&(av.add(M),ov("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",M,iv))}}getRemainingTTL(n){return this.#h.has(n)?1/0:0}#L(){let n=new ah(this.#e),t=new ah(this.#e);this.#E=n,this.#A=t;let s=this.ttlAutopurge?new Array(this.#e):void 0;this.#S=s,this.#F=(r,i,c=this.#l.now())=>{if(t[r]=i!==0?c:0,n[r]=i,s?.[r]&&(clearTimeout(s[r]),s[r]=void 0),i!==0&&s){let d=setTimeout(()=>{this.#R(r)&&this.#k(this.#d[r],"expire")},i+1);d.unref&&d.unref(),s[r]=d}},this.#O=r=>{t[r]=n[r]!==0?this.#l.now():0},this.#P=(r,i)=>{if(n[i]){let c=n[i],d=t[i];if(!c||!d)return;r.ttl=c,r.start=d,r.now=a||o();let l=r.now-d;r.remainingTTL=c-l}};let a=0,o=()=>{let r=this.#l.now();if(this.ttlResolution>0){a=r;let i=setTimeout(()=>a=0,this.ttlResolution);i.unref&&i.unref()}return r};this.getRemainingTTL=r=>{let i=this.#h.get(r);if(i===void 0)return 0;let c=n[i],d=t[i];if(!c||!d)return 1/0;let l=(a||o())-d;return c-l},this.#R=r=>{let i=t[r],c=n[r];return!!c&&!!i&&(a||o())-i>c}}#O=()=>{};#P=()=>{};#F=()=>{};#R=()=>!1;#Q(){let n=new ah(this.#e);this.#c=0,this.#_=n,this.#M=t=>{this.#c-=n[t],n[t]=0},this.#q=(t,s,a,o)=>{if(this.#p(s))return 0;if(!Ra(a))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(a=o(s,t),!Ra(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a},this.#D=(t,s,a)=>{if(n[t]=s,this.#n){let o=this.#n-n[t];for(;this.#c>o;)this.#Y(!0)}this.#c+=n[t],a&&(a.entrySize=s,a.totalCalculatedSize=this.#c)}}#M=n=>{};#D=(n,t,s)=>{};#q=(n,t,s,a)=>{if(s||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#I({allowStale:n=this.allowStale}={}){if(this.#i)for(let t=this.#y;!(!this.#j(t)||((n||!this.#R(t))&&(yield t),t===this.#x));)t=this.#b[t]}*#N({allowStale:n=this.allowStale}={}){if(this.#i)for(let t=this.#x;!(!this.#j(t)||((n||!this.#R(t))&&(yield t),t===this.#y));)t=this.#f[t]}#j(n){return n!==void 0&&this.#h.get(this.#d[n])===n}*entries(){for(let n of this.#I())this.#o[n]!==void 0&&this.#d[n]!==void 0&&!this.#p(this.#o[n])&&(yield[this.#d[n],this.#o[n]])}*rentries(){for(let n of this.#N())this.#o[n]!==void 0&&this.#d[n]!==void 0&&!this.#p(this.#o[n])&&(yield[this.#d[n],this.#o[n]])}*keys(){for(let n of this.#I()){let t=this.#d[n];t!==void 0&&!this.#p(this.#o[n])&&(yield t)}}*rkeys(){for(let n of this.#N()){let t=this.#d[n];t!==void 0&&!this.#p(this.#o[n])&&(yield t)}}*values(){for(let n of this.#I())this.#o[n]!==void 0&&!this.#p(this.#o[n])&&(yield this.#o[n])}*rvalues(){for(let n of this.#N())this.#o[n]!==void 0&&!this.#p(this.#o[n])&&(yield this.#o[n])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(n,t={}){for(let s of this.#I()){let a=this.#o[s],o=this.#p(a)?a.__staleWhileFetching:a;if(o!==void 0&&n(o,this.#d[s],this))return this.get(this.#d[s],t)}}forEach(n,t=this){for(let s of this.#I()){let a=this.#o[s],o=this.#p(a)?a.__staleWhileFetching:a;o!==void 0&&n.call(t,o,this.#d[s],this)}}rforEach(n,t=this){for(let s of this.#N()){let a=this.#o[s],o=this.#p(a)?a.__staleWhileFetching:a;o!==void 0&&n.call(t,o,this.#d[s],this)}}purgeStale(){let n=!1;for(let t of this.#N({allowStale:!0}))this.#R(t)&&(this.#k(this.#d[t],"expire"),n=!0);return n}info(n){let t=this.#h.get(n);if(t===void 0)return;let s=this.#o[t],a=this.#p(s)?s.__staleWhileFetching:s;if(a===void 0)return;let o={value:a};if(this.#E&&this.#A){let r=this.#E[t],i=this.#A[t];if(r&&i){let c=r-(this.#l.now()-i);o.ttl=c,o.start=Date.now()}}return this.#_&&(o.size=this.#_[t]),o}dump(){let n=[];for(let t of this.#I({allowStale:!0})){let s=this.#d[t],a=this.#o[t],o=this.#p(a)?a.__staleWhileFetching:a;if(o===void 0||s===void 0)continue;let r={value:o};if(this.#E&&this.#A){r.ttl=this.#E[t];let i=this.#l.now()-this.#A[t];r.start=Math.floor(Date.now()-i)}this.#_&&(r.size=this.#_[t]),n.unshift([s,r])}return n}load(n){this.clear();for(let[t,s]of n){if(s.start){let a=Date.now()-s.start;s.start=this.#l.now()-a}this.set(t,s.value,s)}}set(n,t,s={}){if(t===void 0)return this.delete(n),this;let{ttl:a=this.ttl,start:o,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:i=this.sizeCalculation,status:c}=s,{noUpdateTTL:d=this.noUpdateTTL}=s,l=this.#q(n,t,s.size||0,i);if(this.maxEntrySize&&l>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.#k(n,"set"),this;let p=this.#i===0?void 0:this.#h.get(n);if(p===void 0)p=this.#i===0?this.#y:this.#v.length!==0?this.#v.pop():this.#i===this.#e?this.#Y(!1):this.#i,this.#d[p]=n,this.#o[p]=t,this.#h.set(n,p),this.#f[this.#y]=p,this.#b[p]=this.#y,this.#y=p,this.#i++,this.#D(p,l,c),c&&(c.set="add"),d=!1,this.#C&&this.#s?.(t,n,"add");else{this.#U(p);let u=this.#o[p];if(t!==u){if(this.#w&&this.#p(u)){u.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:h}=u;h!==void 0&&!r&&(this.#T&&this.#a?.(h,n,"set"),this.#t&&this.#g?.push([h,n,"set"]))}else r||(this.#T&&this.#a?.(u,n,"set"),this.#t&&this.#g?.push([u,n,"set"]));if(this.#M(p),this.#D(p,l,c),this.#o[p]=t,c){c.set="replace";let h=u&&this.#p(u)?u.__staleWhileFetching:u;h!==void 0&&(c.oldValue=h)}}else c&&(c.set="update");this.#C&&this.onInsert?.(t,n,t===u?"update":"replace")}if(a!==0&&!this.#E&&this.#L(),this.#E&&(d||this.#F(p,a,o),c&&this.#P(c,p)),!r&&this.#t&&this.#g){let u=this.#g,h;for(;h=u?.shift();)this.#r?.(...h)}return this}pop(){try{for(;this.#i;){let n=this.#o[this.#x];if(this.#Y(!0),this.#p(n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(this.#t&&this.#g){let n=this.#g,t;for(;t=n?.shift();)this.#r?.(...t)}}}#Y(n){let t=this.#x,s=this.#d[t],a=this.#o[t];return this.#w&&this.#p(a)?a.__abortController.abort(new Error("evicted")):(this.#T||this.#t)&&(this.#T&&this.#a?.(a,s,"evict"),this.#t&&this.#g?.push([a,s,"evict"])),this.#M(t),this.#S?.[t]&&(clearTimeout(this.#S[t]),this.#S[t]=void 0),n&&(this.#d[t]=void 0,this.#o[t]=void 0,this.#v.push(t)),this.#i===1?(this.#x=this.#y=0,this.#v.length=0):this.#x=this.#f[t],this.#h.delete(s),this.#i--,t}has(n,t={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:a}=t,o=this.#h.get(n);if(o!==void 0){let r=this.#o[o];if(this.#p(r)&&r.__staleWhileFetching===void 0)return!1;if(this.#R(o))a&&(a.has="stale",this.#P(a,o));else return s&&this.#O(o),a&&(a.has="hit",this.#P(a,o)),!0}else a&&(a.has="miss");return!1}peek(n,t={}){let{allowStale:s=this.allowStale}=t,a=this.#h.get(n);if(a===void 0||!s&&this.#R(a))return;let o=this.#o[a];return this.#p(o)?o.__staleWhileFetching:o}#V(n,t,s,a){let o=t===void 0?void 0:this.#o[t];if(this.#p(o))return o;let r=new ih,{signal:i}=s;i?.addEventListener("abort",()=>r.abort(i.reason),{signal:r.signal});let c={signal:r.signal,options:s,context:a},d=(f,y=!1)=>{let{aborted:g}=r.signal,E=s.ignoreFetchAbort&&f!==void 0,S=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&f!==void 0);if(s.status&&(g&&!y?(s.status.fetchAborted=!0,s.status.fetchError=r.signal.reason,E&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),g&&!E&&!y)return p(r.signal.reason,S);let R=h,w=this.#o[t];return(w===h||E&&y&&w===void 0)&&(f===void 0?R.__staleWhileFetching!==void 0?this.#o[t]=R.__staleWhileFetching:this.#k(n,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(n,f,c.options))),f},l=f=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=f),p(f,!1)),p=(f,y)=>{let{aborted:g}=r.signal,E=g&&s.allowStaleOnFetchAbort,S=E||s.allowStaleOnFetchRejection,R=S||s.noDeleteOnFetchRejection,w=h;if(this.#o[t]===h&&(!R||!y&&w.__staleWhileFetching===void 0?this.#k(n,"fetch"):E||(this.#o[t]=w.__staleWhileFetching)),S)return s.status&&w.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),w.__staleWhileFetching;if(w.__returned===w)throw f},u=(f,y)=>{let g=this.#m?.(n,o,c);g&&g instanceof Promise&&g.then(E=>f(E===void 0?void 0:E),y),r.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(f(void 0),s.allowStaleOnFetchAbort&&(f=E=>d(E,!0)))})};s.status&&(s.status.fetchDispatched=!0);let h=new Promise(u).then(d,l),m=Object.assign(h,{__abortController:r,__staleWhileFetching:o,__returned:void 0});return t===void 0?(this.set(n,m,{...c.options,status:void 0}),t=this.#h.get(n)):this.#o[t]=m,m}#p(n){if(!this.#w)return!1;let t=n;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof ih}async fetch(n,t={}){let{allowStale:s=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:i=this.noDisposeOnSet,size:c=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:f,forceRefresh:y=!1,status:g,signal:E}=t;if(!this.#w)return g&&(g.fetch="get"),this.get(n,{allowStale:s,updateAgeOnGet:a,noDeleteOnStaleGet:o,status:g});let S={allowStale:s,updateAgeOnGet:a,noDeleteOnStaleGet:o,ttl:r,noDisposeOnSet:i,size:c,sizeCalculation:d,noUpdateTTL:l,noDeleteOnFetchRejection:p,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:m,ignoreFetchAbort:h,status:g,signal:E},R=this.#h.get(n);if(R===void 0){g&&(g.fetch="miss");let w=this.#V(n,R,S,f);return w.__returned=w}else{let w=this.#o[R];if(this.#p(w)){let k=s&&w.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",k&&(g.returnedStale=!0)),k?w.__staleWhileFetching:w.__returned=w}let _=this.#R(R);if(!y&&!_)return g&&(g.fetch="hit"),this.#U(R),a&&this.#O(R),g&&this.#P(g,R),w;let T=this.#V(n,R,S,f),A=T.__staleWhileFetching!==void 0&&s;return g&&(g.fetch=_?"stale":"refresh",A&&_&&(g.returnedStale=!0)),A?T.__staleWhileFetching:T.__returned=T}}async forceFetch(n,t={}){let s=await this.fetch(n,t);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(n,t={}){let s=this.#u;if(!s)throw new Error("no memoMethod provided to constructor");let{context:a,forceRefresh:o,...r}=t,i=this.get(n,r);if(!o&&i!==void 0)return i;let c=s(n,i,{options:r,context:a});return this.set(n,c,r),c}get(n,t={}){let{allowStale:s=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:r}=t,i=this.#h.get(n);if(i!==void 0){let c=this.#o[i],d=this.#p(c);return r&&this.#P(r,i),this.#R(i)?(r&&(r.get="stale"),d?(r&&s&&c.__staleWhileFetching!==void 0&&(r.returnedStale=!0),s?c.__staleWhileFetching:void 0):(o||this.#k(n,"expire"),r&&s&&(r.returnedStale=!0),s?c:void 0)):(r&&(r.get="hit"),d?c.__staleWhileFetching:(this.#U(i),a&&this.#O(i),c))}else r&&(r.get="miss")}#$(n,t){this.#b[t]=n,this.#f[n]=t}#U(n){n!==this.#y&&(n===this.#x?this.#x=this.#f[n]:this.#$(this.#b[n],this.#f[n]),this.#$(this.#y,n),this.#y=n)}delete(n){return this.#k(n,"delete")}#k(n,t){let s=!1;if(this.#i!==0){let a=this.#h.get(n);if(a!==void 0)if(this.#S?.[a]&&(clearTimeout(this.#S?.[a]),this.#S[a]=void 0),s=!0,this.#i===1)this.#K(t);else{this.#M(a);let o=this.#o[a];if(this.#p(o)?o.__abortController.abort(new Error("deleted")):(this.#T||this.#t)&&(this.#T&&this.#a?.(o,n,t),this.#t&&this.#g?.push([o,n,t])),this.#h.delete(n),this.#d[a]=void 0,this.#o[a]=void 0,a===this.#y)this.#y=this.#b[a];else if(a===this.#x)this.#x=this.#f[a];else{let r=this.#b[a];this.#f[r]=this.#f[a];let i=this.#f[a];this.#b[i]=this.#b[a]}this.#i--,this.#v.push(a)}}if(this.#t&&this.#g?.length){let a=this.#g,o;for(;o=a?.shift();)this.#r?.(...o)}return s}clear(){return this.#K("delete")}#K(n){for(let t of this.#N({allowStale:!0})){let s=this.#o[t];if(this.#p(s))s.__abortController.abort(new Error("deleted"));else{let a=this.#d[t];this.#T&&this.#a?.(s,a,n),this.#t&&this.#g?.push([s,a,n])}}if(this.#h.clear(),this.#o.fill(void 0),this.#d.fill(void 0),this.#E&&this.#A){this.#E.fill(0),this.#A.fill(0);for(let t of this.#S??[])t!==void 0&&clearTimeout(t);this.#S?.fill(void 0)}if(this.#_&&this.#_.fill(0),this.#x=0,this.#y=0,this.#v.length=0,this.#c=0,this.#i=0,this.#t&&this.#g){let t=this.#g,s;for(;s=t?.shift();)this.#r?.(...s)}}},NO=typeof process=="object"&&process?process:{stdout:null,stderr:null},iK=e=>!!e&&typeof e=="object"&&(e instanceof ch||e instanceof nS.default||cK(e)||dK(e)),cK=e=>!!e&&typeof e=="object"&&e instanceof ph.EventEmitter&&typeof e.pipe=="function"&&e.pipe!==nS.default.Writable.prototype.pipe,dK=e=>!!e&&typeof e=="object"&&e instanceof ph.EventEmitter&&typeof e.write=="function"&&typeof e.end=="function",ks=Symbol("EOF"),Is=Symbol("maybeEmitEnd"),Ta=Symbol("emittedEnd"),Ju=Symbol("emittingEnd"),ud=Symbol("emittedError"),Xu=Symbol("closed"),LO=Symbol("read"),Zu=Symbol("flush"),PO=Symbol("flushChunk"),Zt=Symbol("encoding"),qr=Symbol("decoder"),Cn=Symbol("flowing"),hd=Symbol("paused"),jr=Symbol("resume"),Dn=Symbol("buffer"),ot=Symbol("pipes"),Un=Symbol("bufferLength"),K1=Symbol("bufferPush"),eh=Symbol("bufferShift"),Gn=Symbol("objectMode"),_n=Symbol("destroyed"),z1=Symbol("error"),H1=Symbol("emitData"),CO=Symbol("emitEnd"),B1=Symbol("emitEnd2"),ys=Symbol("async"),W1=Symbol("abort"),nh=Symbol("aborted"),md=Symbol("signal"),So=Symbol("dataListeners"),It=Symbol("discarded"),fd=e=>Promise.resolve().then(e),lK=e=>e(),pK=e=>e==="end"||e==="finish"||e==="prefinish",uK=e=>e instanceof ArrayBuffer||!!e&&typeof e=="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0,hK=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),lv=class{src;dest;opts;ondrain;constructor(e,n,t){this.src=e,this.dest=n,this.opts=t,this.ondrain=()=>e[jr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},mK=class extends lv{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,n,t){super(e,n,t),this.proxyErrors=s=>this.dest.emit("error",s),e.on("error",this.proxyErrors)}},fK=e=>!!e.objectMode,yK=e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer",ch=class extends ph.EventEmitter{[Cn]=!1;[hd]=!1;[ot]=[];[Dn]=[];[Gn];[Zt];[ys];[qr];[ks]=!1;[Ta]=!1;[Ju]=!1;[Xu]=!1;[ud]=null;[Un]=0;[_n]=!1;[md];[nh]=!1;[So]=0;[It]=!1;writable=!0;readable=!0;constructor(...e){let n=e[0]||{};if(super(),n.objectMode&&typeof n.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");fK(n)?(this[Gn]=!0,this[Zt]=null):yK(n)?(this[Zt]=n.encoding,this[Gn]=!1):(this[Gn]=!1,this[Zt]=null),this[ys]=!!n.async,this[qr]=this[Zt]?new dv.StringDecoder(this[Zt]):null,n&&n.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[Dn]}),n&&n.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[ot]});let{signal:t}=n;t&&(this[md]=t,t.aborted?this[W1]():t.addEventListener("abort",()=>this[W1]()))}get bufferLength(){return this[Un]}get encoding(){return this[Zt]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Gn]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[ys]}set async(e){this[ys]=this[ys]||!!e}[W1](){this[nh]=!0,this.emit("abort",this[md]?.reason),this.destroy(this[md]?.reason)}get aborted(){return this[nh]}set aborted(e){}write(e,n,t){if(this[nh])return!1;if(this[ks])throw new Error("write after end");if(this[_n])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof n=="function"&&(t=n,n="utf8"),n||(n="utf8");let s=this[ys]?fd:lK;if(!this[Gn]&&!Buffer.isBuffer(e)){if(hK(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(uK(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Gn]?(this[Cn]&&this[Un]!==0&&this[Zu](!0),this[Cn]?this.emit("data",e):this[K1](e),this[Un]!==0&&this.emit("readable"),t&&s(t),this[Cn]):e.length?(typeof e=="string"&&!(n===this[Zt]&&!this[qr]?.lastNeed)&&(e=Buffer.from(e,n)),Buffer.isBuffer(e)&&this[Zt]&&(e=this[qr].write(e)),this[Cn]&&this[Un]!==0&&this[Zu](!0),this[Cn]?this.emit("data",e):this[K1](e),this[Un]!==0&&this.emit("readable"),t&&s(t),this[Cn]):(this[Un]!==0&&this.emit("readable"),t&&s(t),this[Cn])}read(e){if(this[_n])return null;if(this[It]=!1,this[Un]===0||e===0||e&&e>this[Un])return this[Is](),null;this[Gn]&&(e=null),this[Dn].length>1&&!this[Gn]&&(this[Dn]=[this[Zt]?this[Dn].join(""):Buffer.concat(this[Dn],this[Un])]);let n=this[LO](e||null,this[Dn][0]);return this[Is](),n}[LO](e,n){if(this[Gn])this[eh]();else{let t=n;e===t.length||e===null?this[eh]():typeof t=="string"?(this[Dn][0]=t.slice(e),n=t.slice(0,e),this[Un]-=e):(this[Dn][0]=t.subarray(e),n=t.subarray(0,e),this[Un]-=e)}return this.emit("data",n),!this[Dn].length&&!this[ks]&&this.emit("drain"),n}end(e,n,t){return typeof e=="function"&&(t=e,e=void 0),typeof n=="function"&&(t=n,n="utf8"),e!==void 0&&this.write(e,n),t&&this.once("end",t),this[ks]=!0,this.writable=!1,(this[Cn]||!this[hd])&&this[Is](),this}[jr](){this[_n]||(!this[So]&&!this[ot].length&&(this[It]=!0),this[hd]=!1,this[Cn]=!0,this.emit("resume"),this[Dn].length?this[Zu]():this[ks]?this[Is]():this.emit("drain"))}resume(){return this[jr]()}pause(){this[Cn]=!1,this[hd]=!0,this[It]=!1}get destroyed(){return this[_n]}get flowing(){return this[Cn]}get paused(){return this[hd]}[K1](e){this[Gn]?this[Un]+=1:this[Un]+=e.length,this[Dn].push(e)}[eh](){return this[Gn]?this[Un]-=1:this[Un]-=this[Dn][0].length,this[Dn].shift()}[Zu](e=!1){do;while(this[PO](this[eh]())&&this[Dn].length);!e&&!this[Dn].length&&!this[ks]&&this.emit("drain")}[PO](e){return this.emit("data",e),this[Cn]}pipe(e,n){if(this[_n])return e;this[It]=!1;let t=this[Ta];return n=n||{},e===NO.stdout||e===NO.stderr?n.end=!1:n.end=n.end!==!1,n.proxyErrors=!!n.proxyErrors,t?n.end&&e.end():(this[ot].push(n.proxyErrors?new mK(this,e,n):new lv(this,e,n)),this[ys]?fd(()=>this[jr]()):this[jr]()),e}unpipe(e){let n=this[ot].find(t=>t.dest===e);n&&(this[ot].length===1?(this[Cn]&&this[So]===0&&(this[Cn]=!1),this[ot]=[]):this[ot].splice(this[ot].indexOf(n),1),n.unpipe())}addListener(e,n){return this.on(e,n)}on(e,n){let t=super.on(e,n);if(e==="data")this[It]=!1,this[So]++,!this[ot].length&&!this[Cn]&&this[jr]();else if(e==="readable"&&this[Un]!==0)super.emit("readable");else if(pK(e)&&this[Ta])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[ud]){let s=n;this[ys]?fd(()=>s.call(this,this[ud])):s.call(this,this[ud])}return t}removeListener(e,n){return this.off(e,n)}off(e,n){let t=super.off(e,n);return e==="data"&&(this[So]=this.listeners("data").length,this[So]===0&&!this[It]&&!this[ot].length&&(this[Cn]=!1)),t}removeAllListeners(e){let n=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[So]=0,!this[It]&&!this[ot].length&&(this[Cn]=!1)),n}get emittedEnd(){return this[Ta]}[Is](){!this[Ju]&&!this[Ta]&&!this[_n]&&this[Dn].length===0&&this[ks]&&(this[Ju]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Xu]&&this.emit("close"),this[Ju]=!1)}emit(e,...n){let t=n[0];if(e!=="error"&&e!=="close"&&e!==_n&&this[_n])return!1;if(e==="data")return!this[Gn]&&!t?!1:this[ys]?(fd(()=>this[H1](t)),!0):this[H1](t);if(e==="end")return this[CO]();if(e==="close"){if(this[Xu]=!0,!this[Ta]&&!this[_n])return!1;let a=super.emit("close");return this.removeAllListeners("close"),a}else if(e==="error"){this[ud]=t,super.emit(z1,t);let a=!this[md]||this.listeners("error").length?super.emit("error",t):!1;return this[Is](),a}else if(e==="resume"){let a=super.emit("resume");return this[Is](),a}else if(e==="finish"||e==="prefinish"){let a=super.emit(e);return this.removeAllListeners(e),a}let s=super.emit(e,...n);return this[Is](),s}[H1](e){for(let t of this[ot])t.dest.write(e)===!1&&this.pause();let n=this[It]?!1:super.emit("data",e);return this[Is](),n}[CO](){return this[Ta]?!1:(this[Ta]=!0,this.readable=!1,this[ys]?(fd(()=>this[B1]()),!0):this[B1]())}[B1](){if(this[qr]){let n=this[qr].end();if(n){for(let t of this[ot])t.dest.write(n);this[It]||super.emit("data",n)}}for(let n of this[ot])n.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[Gn]||(e.dataLength=0);let n=this.promise();return this.on("data",t=>{e.push(t),this[Gn]||(e.dataLength+=t.length)}),await n,e}async concat(){if(this[Gn])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Zt]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,n)=>{this.on(_n,()=>n(new Error("stream destroyed"))),this.on("error",t=>n(t)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[It]=!1;let e=!1,n=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return n();let t=this.read();if(t!==null)return Promise.resolve({done:!1,value:t});if(this[ks])return n();let s,a,o=d=>{this.off("data",r),this.off("end",i),this.off(_n,c),n(),a(d)},r=d=>{this.off("error",o),this.off("end",i),this.off(_n,c),this.pause(),s({value:d,done:!!this[ks]})},i=()=>{this.off("error",o),this.off("data",r),this.off(_n,c),n(),s({done:!0,value:void 0})},c=()=>o(new Error("stream destroyed"));return new Promise((d,l)=>{a=l,s=d,this.once(_n,c),this.once("error",o),this.once("end",i),this.once("data",r)})},throw:n,return:n,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[It]=!1;let e=!1,n=()=>(this.pause(),this.off(z1,n),this.off(_n,n),this.off("end",n),e=!0,{done:!0,value:void 0}),t=()=>{if(e)return n();let s=this.read();return s===null?n():{done:!1,value:s}};return this.once("end",n),this.once(z1,n),this.once(_n,n),{next:t,throw:n,return:n,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[_n])return e?this.emit("error",e):this.emit(_n),this;this[_n]=!0,this[It]=!0,this[Dn].length=0,this[Un]=0;let n=this;return typeof n.close=="function"&&!this[Xu]&&n.close(),e?this.emit("error",e):this.emit(_n),this}static get isStream(){return iK}},gK=Es.realpathSync.native,Sd={lstatSync:Es.lstatSync,readdir:Es.readdir,readdirSync:Es.readdirSync,readlinkSync:Es.readlinkSync,realpathSync:gK,promises:{lstat:Aa.lstat,readdir:Aa.readdir,readlink:Aa.readlink,realpath:Aa.realpath}},pv=e=>!e||e===Sd||e===rK?Sd:{...Sd,...e,promises:{...Sd.promises,...e.promises||{}}},uv=/^\\\\\?\\([a-z]:)\\?$/i,EK=e=>e.replace(/\//g,"\\").replace(uv,"$1\\"),SK=/[\\\/]/,Vt=0,hv=1,mv=2,gs=4,fv=6,yv=8,xo=10,gv=12,Yt=15,yd=~Yt,G1=16,DO=32,xd=64,es=128,th=256,oh=512,UO=xd|es|oh,xK=1023,J1=e=>e.isFile()?yv:e.isDirectory()?gs:e.isSymbolicLink()?xo:e.isCharacterDevice()?mv:e.isBlockDevice()?fv:e.isSocket()?gv:e.isFIFO()?hv:Vt,MO=new lh({max:2**12}),bd=e=>{let n=MO.get(e);if(n)return n;let t=e.normalize("NFKD");return MO.set(e,t),t},FO=new lh({max:2**12}),sh=e=>{let n=FO.get(e);if(n)return n;let t=bd(e.toLowerCase());return FO.set(e,t),t},qO=class extends lh{constructor(){super({max:256})}},bK=class extends lh{constructor(e=16*1024){super({maxSize:e,sizeCalculation:n=>n.length+1})}},Ev=Symbol("PathScurry setAsCwd"),ft=class{name;root;roots;parent;nocase;isCWD=!1;#e;#n;get dev(){return this.#n}#a;get mode(){return this.#a}#s;get nlink(){return this.#s}#r;get uid(){return this.#r}#m;get gid(){return this.#m}#u;get rdev(){return this.#u}#l;get blksize(){return this.#l}#i;get ino(){return this.#i}#c;get size(){return this.#c}#h;get blocks(){return this.#h}#d;get atimeMs(){return this.#d}#o;get mtimeMs(){return this.#o}#f;get ctimeMs(){return this.#f}#b;get birthtimeMs(){return this.#b}#x;get atime(){return this.#x}#y;get mtime(){return this.#y}#v;get ctime(){return this.#v}#g;get birthtime(){return this.#g}#_;#A;#E;#S;#T;#w;#t;#C;#L;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,n=Vt,t,s,a,o,r){this.name=e,this.#_=a?sh(e):bd(e),this.#t=n&xK,this.nocase=a,this.roots=s,this.root=t||this,this.#C=o,this.#E=r.fullpath,this.#T=r.relative,this.#w=r.relativePosix,this.parent=r.parent,this.parent?this.#e=this.parent.#e:this.#e=pv(r.fs)}depth(){return this.#A!==void 0?this.#A:this.parent?this.#A=this.parent.depth()+1:this.#A=0}childrenCache(){return this.#C}resolve(e){if(!e)return this;let n=this.getRootString(e),t=e.substring(n.length).split(this.splitSep);return n?this.getRoot(n).#P(t):this.#P(t)}#P(e){let n=this;for(let t of e)n=n.child(t);return n}children(){let e=this.#C.get(this);if(e)return e;let n=Object.assign([],{provisional:0});return this.#C.set(this,n),this.#t&=~G1,n}child(e,n){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let t=this.children(),s=this.nocase?sh(e):bd(e);for(let i of t)if(i.#_===s)return i;let a=this.parent?this.sep:"",o=this.#E?this.#E+a+e:void 0,r=this.newChild(e,Vt,{...n,parent:this,fullpath:o});return this.canReaddir()||(r.#t|=es),t.push(r),r}relative(){if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let e=this.name,n=this.parent;if(!n)return this.#T=this.name;let t=n.relative();return t+(!t||!n.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#w!==void 0)return this.#w;let e=this.name,n=this.parent;if(!n)return this.#w=this.fullpathPosix();let t=n.relativePosix();return t+(!t||!n.parent?"":"/")+e}fullpath(){if(this.#E!==void 0)return this.#E;let e=this.name,n=this.parent;if(!n)return this.#E=this.name;let t=n.fullpath()+(n.parent?this.sep:"")+e;return this.#E=t}fullpathPosix(){if(this.#S!==void 0)return this.#S;if(this.sep==="/")return this.#S=this.fullpath();if(!this.parent){let s=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(s)?this.#S=`//?/${s}`:this.#S=s}let e=this.parent,n=e.fullpathPosix(),t=n+(!n||!e.parent?"":"/")+this.name;return this.#S=t}isUnknown(){return(this.#t&Yt)===Vt}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#t&Yt)===yv}isDirectory(){return(this.#t&Yt)===gs}isCharacterDevice(){return(this.#t&Yt)===mv}isBlockDevice(){return(this.#t&Yt)===fv}isFIFO(){return(this.#t&Yt)===hv}isSocket(){return(this.#t&Yt)===gv}isSymbolicLink(){return(this.#t&xo)===xo}lstatCached(){return this.#t&DO?this:void 0}readlinkCached(){return this.#L}realpathCached(){return this.#O}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#L)return!0;if(!this.parent)return!1;let e=this.#t&Yt;return!(e!==Vt&&e!==xo||this.#t&th||this.#t&es)}calledReaddir(){return!!(this.#t&G1)}isENOENT(){return!!(this.#t&es)}isNamed(e){return this.nocase?this.#_===sh(e):this.#_===bd(e)}async readlink(){let e=this.#L;if(e)return e;if(this.canReadlink()&&this.parent)try{let n=await this.#e.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(n);if(t)return this.#L=t}catch(n){this.#N(n.code);return}}readlinkSync(){let e=this.#L;if(e)return e;if(this.canReadlink()&&this.parent)try{let n=this.#e.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(n);if(t)return this.#L=t}catch(n){this.#N(n.code);return}}#F(e){this.#t|=G1;for(let n=e.provisional;n<e.length;n++){let t=e[n];t&&t.#R()}}#R(){this.#t&es||(this.#t=(this.#t|es)&yd,this.#Q())}#Q(){let e=this.children();e.provisional=0;for(let n of e)n.#R()}#M(){this.#t|=oh,this.#D()}#D(){if(this.#t&xd)return;let e=this.#t;(e&Yt)===gs&&(e&=yd),this.#t=e|xd,this.#Q()}#q(e=""){e==="ENOTDIR"||e==="EPERM"?this.#D():e==="ENOENT"?this.#R():this.children().provisional=0}#I(e=""){e==="ENOTDIR"?this.parent.#D():e==="ENOENT"&&this.#R()}#N(e=""){let n=this.#t;n|=th,e==="ENOENT"&&(n|=es),(e==="EINVAL"||e==="UNKNOWN")&&(n&=yd),this.#t=n,e==="ENOTDIR"&&this.parent&&this.parent.#D()}#j(e,n){return this.#V(e,n)||this.#Y(e,n)}#Y(e,n){let t=J1(e),s=this.newChild(e.name,t,{parent:this}),a=s.#t&Yt;return a!==gs&&a!==xo&&a!==Vt&&(s.#t|=xd),n.unshift(s),n.provisional++,s}#V(e,n){for(let t=n.provisional;t<n.length;t++){let s=n[t];if((this.nocase?sh(e.name):bd(e.name))===s.#_)return this.#p(e,s,t,n)}}#p(e,n,t,s){let a=n.name;return n.#t=n.#t&yd|J1(e),a!==e.name&&(n.name=e.name),t!==s.provisional&&(t===s.length-1?s.pop():s.splice(t,1),s.unshift(n)),s.provisional++,n}async lstat(){if((this.#t&es)===0)try{return this.#$(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#I(e.code)}}lstatSync(){if((this.#t&es)===0)try{return this.#$(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#I(e.code)}}#$(e){let{atime:n,atimeMs:t,birthtime:s,birthtimeMs:a,blksize:o,blocks:r,ctime:i,ctimeMs:c,dev:d,gid:l,ino:p,mode:u,mtime:h,mtimeMs:m,nlink:f,rdev:y,size:g,uid:E}=e;this.#x=n,this.#d=t,this.#g=s,this.#b=a,this.#l=o,this.#h=r,this.#v=i,this.#f=c,this.#n=d,this.#m=l,this.#i=p,this.#a=u,this.#y=h,this.#o=m,this.#s=f,this.#u=y,this.#c=g,this.#r=E;let S=J1(e);this.#t=this.#t&yd|S|DO,S!==Vt&&S!==gs&&S!==xo&&(this.#t|=xd)}#U=[];#k=!1;#K(e){this.#k=!1;let n=this.#U.slice();this.#U.length=0,n.forEach(t=>t(null,e))}readdirCB(e,n=!1){if(!this.canReaddir()){n?e(null,[]):queueMicrotask(()=>e(null,[]));return}let t=this.children();if(this.calledReaddir()){let a=t.slice(0,t.provisional);n?e(null,a):queueMicrotask(()=>e(null,a));return}if(this.#U.push(e),this.#k)return;this.#k=!0;let s=this.fullpath();this.#e.readdir(s,{withFileTypes:!0},(a,o)=>{if(a)this.#q(a.code),t.provisional=0;else{for(let r of o)this.#j(r,t);this.#F(t)}this.#K(t.slice(0,t.provisional))})}#z;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let n=this.fullpath();if(this.#z)await this.#z;else{let t=()=>{};this.#z=new Promise(s=>t=s);try{for(let s of await this.#e.promises.readdir(n,{withFileTypes:!0}))this.#j(s,e);this.#F(e)}catch(s){this.#q(s.code),e.provisional=0}this.#z=void 0,t()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let n=this.fullpath();try{for(let t of this.#e.readdirSync(n,{withFileTypes:!0}))this.#j(t,e);this.#F(e)}catch(t){this.#q(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#t&UO)return!1;let e=Yt&this.#t;return e===Vt||e===gs||e===xo}shouldWalk(e,n){return(this.#t&gs)===gs&&!(this.#t&UO)&&!e.has(this)&&(!n||n(this))}async realpath(){if(this.#O)return this.#O;if(!((oh|th|es)&this.#t))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#M()}}realpathSync(){if(this.#O)return this.#O;if(!((oh|th|es)&this.#t))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#M()}}[Ev](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let n=new Set([]),t=[],s=this;for(;s&&s.parent;)n.add(s),s.#T=t.join(this.sep),s.#w=t.join("/"),s=s.parent,t.push("..");for(s=e;s&&s.parent&&!n.has(s);)s.#T=void 0,s.#w=void 0,s=s.parent}},Sv=class xv extends ft{sep="\\";splitSep=SK;constructor(n,t=Vt,s,a,o,r,i){super(n,t,s,a,o,r,i)}newChild(n,t=Vt,s={}){return new xv(n,t,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(n){return Vr.win32.parse(n).root}getRoot(n){if(n=EK(n.toUpperCase()),n===this.root.name)return this.root;for(let[t,s]of Object.entries(this.roots))if(this.sameRoot(n,t))return this.roots[n]=s;return this.roots[n]=new tS(n,this).root}sameRoot(n,t=this.root.name){return n=n.toUpperCase().replace(/\//g,"\\").replace(uv,"$1\\"),n===t}},bv=class Tv extends ft{splitSep="/";sep="/";constructor(n,t=Vt,s,a,o,r,i){super(n,t,s,a,o,r,i)}getRootString(n){return n.startsWith("/")?"/":""}getRoot(n){return this.root}newChild(n,t=Vt,s={}){return new Tv(n,t,this.root,this.roots,this.nocase,this.childrenCache(),s)}},Rv=class{root;rootPath;roots;cwd;#e;#n;#a;nocase;#s;constructor(e=process.cwd(),n,t,{nocase:s,childrenCacheSize:a=16*1024,fs:o=Sd}={}){this.#s=pv(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,cv.fileURLToPath)(e));let r=n.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(r),this.#e=new qO,this.#n=new qO,this.#a=new bK(a);let i=r.substring(this.rootPath.length).split(t);if(i.length===1&&!i[0]&&i.pop(),s===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=s,this.root=this.newRoot(this.#s),this.roots[this.rootPath]=this.root;let c=this.root,d=i.length-1,l=n.sep,p=this.rootPath,u=!1;for(let h of i){let m=d--;c=c.child(h,{relative:new Array(m).fill("..").join(l),relativePosix:new Array(m).fill("..").join("/"),fullpath:p+=(u?"":l)+h}),u=!0}this.cwd=c}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#a}resolve(...e){let n="";for(let a=e.length-1;a>=0;a--){let o=e[a];if(!(!o||o===".")&&(n=n?`${o}/${n}`:o,this.isAbsolute(o)))break}let t=this.#e.get(n);if(t!==void 0)return t;let s=this.cwd.resolve(n).fullpath();return this.#e.set(n,s),s}resolvePosix(...e){let n="";for(let a=e.length-1;a>=0;a--){let o=e[a];if(!(!o||o===".")&&(n=n?`${o}/${n}`:o,this.isAbsolute(o)))break}let t=this.#n.get(n);if(t!==void 0)return t;let s=this.cwd.resolve(n).fullpathPosix();return this.#n.set(n,s),s}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,n={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t}=n;if(e.canReaddir()){let s=await e.readdir();return t?s:s.map(a=>a.name)}else return[]}readdirSync(e=this.cwd,n={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t=!0}=n;return e.canReaddir()?t?e.readdirSync():e.readdirSync().map(s=>s.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:n}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e.withFileTypes,e=this.cwd);let t=await e.readlink();return n?t:t?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:n}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e.withFileTypes,e=this.cwd);let t=e.readlinkSync();return n?t:t?.fullpath()}async realpath(e=this.cwd,{withFileTypes:n}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e.withFileTypes,e=this.cwd);let t=await e.realpath();return n?t:t?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:n}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e.withFileTypes,e=this.cwd);let t=e.realpathSync();return n?t:t?.fullpath()}async walk(e=this.cwd,n={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t=!0,follow:s=!1,filter:a,walkFilter:o}=n,r=[];(!a||a(e))&&r.push(t?e:e.fullpath());let i=new Set,c=(l,p)=>{i.add(l),l.readdirCB((u,h)=>{if(u)return p(u);let m=h.length;if(!m)return p();let f=()=>{--m===0&&p()};for(let y of h)(!a||a(y))&&r.push(t?y:y.fullpath()),s&&y.isSymbolicLink()?y.realpath().then(g=>g?.isUnknown()?g.lstat():g).then(g=>g?.shouldWalk(i,o)?c(g,f):f()):y.shouldWalk(i,o)?c(y,f):f()},!0)},d=e;return new Promise((l,p)=>{c(d,u=>{if(u)return p(u);l(r)})})}walkSync(e=this.cwd,n={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t=!0,follow:s=!1,filter:a,walkFilter:o}=n,r=[];(!a||a(e))&&r.push(t?e:e.fullpath());let i=new Set([e]);for(let c of i){let d=c.readdirSync();for(let l of d){(!a||a(l))&&r.push(t?l:l.fullpath());let p=l;if(l.isSymbolicLink()){if(!(s&&(p=l.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(i,o)&&i.add(p)}}return r}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,n={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd),this.stream(e,n)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,n={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t=!0,follow:s=!1,filter:a,walkFilter:o}=n;(!a||a(e))&&(yield t?e:e.fullpath());let r=new Set([e]);for(let i of r){let c=i.readdirSync();for(let d of c){(!a||a(d))&&(yield t?d:d.fullpath());let l=d;if(d.isSymbolicLink()){if(!(s&&(l=d.realpathSync())))continue;l.isUnknown()&&l.lstatSync()}l.shouldWalk(r,o)&&r.add(l)}}}stream(e=this.cwd,n={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t=!0,follow:s=!1,filter:a,walkFilter:o}=n,r=new ch({objectMode:!0});(!a||a(e))&&r.write(t?e:e.fullpath());let i=new Set,c=[e],d=0,l=()=>{let p=!1;for(;!p;){let u=c.shift();if(!u){d===0&&r.end();return}d++,i.add(u);let h=(f,y,g=!1)=>{if(f)return r.emit("error",f);if(s&&!g){let E=[];for(let S of y)S.isSymbolicLink()&&E.push(S.realpath().then(R=>R?.isUnknown()?R.lstat():R));if(E.length){Promise.all(E).then(()=>h(null,y,!0));return}}for(let E of y)E&&(!a||a(E))&&(r.write(t?E:E.fullpath())||(p=!0));d--;for(let E of y){let S=E.realpathCached()||E;S.shouldWalk(i,o)&&c.push(S)}p&&!r.flowing?r.once("drain",l):m||l()},m=!0;u.readdirCB(h,!0),m=!1}};return l(),r}streamSync(e=this.cwd,n={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t=!0,follow:s=!1,filter:a,walkFilter:o}=n,r=new ch({objectMode:!0}),i=new Set;(!a||a(e))&&r.write(t?e:e.fullpath());let c=[e],d=0,l=()=>{let p=!1;for(;!p;){let u=c.shift();if(!u){d===0&&r.end();return}d++,i.add(u);let h=u.readdirSync();for(let m of h)(!a||a(m))&&(r.write(t?m:m.fullpath())||(p=!0));d--;for(let m of h){let f=m;if(m.isSymbolicLink()){if(!(s&&(f=m.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(i,o)&&c.push(f)}}p&&!r.flowing&&r.once("drain",l)};return l(),r}chdir(e=this.cwd){let n=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Ev](n)}},tS=class extends Rv{sep="\\";constructor(e=process.cwd(),n={}){let{nocase:t=!0}=n;super(e,Vr.win32,"\\",{...n,nocase:t}),this.nocase=t;for(let s=this.cwd;s;s=s.parent)s.nocase=this.nocase}parseRootPath(e){return Vr.win32.parse(e).root.toUpperCase()}newRoot(e){return new Sv(this.rootPath,gs,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},sS=class extends Rv{sep="/";constructor(e=process.cwd(),n={}){let{nocase:t=!1}=n;super(e,Vr.posix,"/",{...n,nocase:t}),this.nocase=t}parseRootPath(e){return"/"}newRoot(e){return new bv(this.rootPath,gs,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},_v=class extends sS{constructor(e=process.cwd(),n={}){let{nocase:t=!0}=n;super(e,{...n,nocase:t})}},cde=process.platform==="win32"?Sv:bv,TK=process.platform==="win32"?tS:process.platform==="darwin"?_v:sS,RK=e=>e.length>=1,_K=e=>e.length>=1,AK=Symbol.for("nodejs.util.inspect.custom"),Av=class wv{#e;#n;#a;length;#s;#r;#m;#u;#l;#i;#c=!0;constructor(n,t,s,a){if(!RK(n))throw new TypeError("empty pattern list");if(!_K(t))throw new TypeError("empty glob list");if(t.length!==n.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=n.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#e=n,this.#n=t,this.#a=s,this.#s=a,this.#a===0){if(this.isUNC()){let[o,r,i,c,...d]=this.#e,[l,p,u,h,...m]=this.#n;d[0]===""&&(d.shift(),m.shift());let f=[o,r,i,c,""].join("/"),y=[l,p,u,h,""].join("/");this.#e=[f,...d],this.#n=[y,...m],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[o,...r]=this.#e,[i,...c]=this.#n;r[0]===""&&(r.shift(),c.shift());let d=o+"/",l=i+"/";this.#e=[d,...r],this.#n=[l,...c],this.length=this.#e.length}}}[AK](){return"Pattern <"+this.#n.slice(this.#a).join("/")+">"}pattern(){return this.#e[this.#a]}isString(){return typeof this.#e[this.#a]=="string"}isGlobstar(){return this.#e[this.#a]===rt}isRegExp(){return this.#e[this.#a]instanceof RegExp}globString(){return this.#m=this.#m||(this.#a===0?this.isAbsolute()?this.#n[0]+this.#n.slice(1).join("/"):this.#n.join("/"):this.#n.slice(this.#a).join("/"))}hasMore(){return this.length>this.#a+1}rest(){return this.#r!==void 0?this.#r:this.hasMore()?(this.#r=new wv(this.#e,this.#n,this.#a+1,this.#s),this.#r.#i=this.#i,this.#r.#l=this.#l,this.#r.#u=this.#u,this.#r):this.#r=null}isUNC(){let n=this.#e;return this.#l!==void 0?this.#l:this.#l=this.#s==="win32"&&this.#a===0&&n[0]===""&&n[1]===""&&typeof n[2]=="string"&&!!n[2]&&typeof n[3]=="string"&&!!n[3]}isDrive(){let n=this.#e;return this.#u!==void 0?this.#u:this.#u=this.#s==="win32"&&this.#a===0&&this.length>1&&typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0])}isAbsolute(){let n=this.#e;return this.#i!==void 0?this.#i:this.#i=n[0]===""&&n.length>1||this.isDrive()||this.isUNC()}root(){let n=this.#e[0];return typeof n=="string"&&this.isAbsolute()&&this.#a===0?n:""}checkFollowGlobstar(){return!(this.#a===0||!this.isGlobstar()||!this.#c)}markFollowGlobstar(){return this.#a===0||!this.isGlobstar()||!this.#c?!1:(this.#c=!1,!0)}},wK=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",jO=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:n,nocase:t,noext:s,noglobstar:a,platform:o=wK}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:n,nocase:t,noext:s,noglobstar:a,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let r of e)this.add(r)}add(e){let n=new _a(e,this.mmopts);for(let t=0;t<n.set.length;t++){let s=n.set[t],a=n.globParts[t];if(!s||!a)throw new Error("invalid pattern object");for(;s[0]==="."&&a[0]===".";)s.shift(),a.shift();let o=new Av(s,a,0,this.platform),r=new _a(o.globString(),this.mmopts),i=a[a.length-1]==="**",c=o.isAbsolute();c?this.absolute.push(r):this.relative.push(r),i&&(c?this.absoluteChildren.push(r):this.relativeChildren.push(r))}}ignored(e){let n=e.fullpath(),t=`${n}/`,s=e.relative()||".",a=`${s}/`;for(let o of this.relative)if(o.match(s)||o.match(a))return!0;for(let o of this.absolute)if(o.match(n)||o.match(t))return!0;return!1}childrenIgnored(e){let n=e.fullpath()+"/",t=(e.relative()||".")+"/";for(let s of this.relativeChildren)if(s.match(t))return!0;for(let s of this.absoluteChildren)if(s.match(n))return!0;return!1}},OK=class Ov{store;constructor(n=new Map){this.store=n}copy(){return new Ov(new Map(this.store))}hasWalked(n,t){return this.store.get(n.fullpath())?.has(t.globString())}storeWalked(n,t){let s=n.fullpath(),a=this.store.get(s);a?a.add(t.globString()):this.store.set(s,new Set([t.globString()]))}},vK=class{store=new Map;add(e,n,t){let s=(n?2:0)|(t?1:0),a=this.store.get(e);this.store.set(e,a===void 0?s:s&a)}entries(){return[...this.store.entries()].map(([e,n])=>[e,!!(n&2),!!(n&1)])}},kK=class{store=new Map;add(e,n){if(!e.canReaddir())return;let t=this.store.get(e);t?t.find(s=>s.globString()===n.globString())||t.push(n):this.store.set(e,[n])}get(e){let n=this.store.get(e);if(!n)throw new Error("attempting to walk unknown path");return n}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},YO=class vv{hasWalkedCache;matches=new vK;subwalks=new kK;patterns;follow;dot;opts;constructor(n,t){this.opts=n,this.follow=!!n.follow,this.dot=!!n.dot,this.hasWalkedCache=t?t.copy():new OK}processPatterns(n,t){this.patterns=t;let s=t.map(a=>[n,a]);for(let[a,o]of s){this.hasWalkedCache.storeWalked(a,o);let r=o.root(),i=o.isAbsolute()&&this.opts.absolute!==!1;if(r){a=a.resolve(r==="/"&&this.opts.root!==void 0?this.opts.root:r);let p=o.rest();if(p)o=p;else{this.matches.add(a,!0,!1);continue}}if(a.isENOENT())continue;let c,d,l=!1;for(;typeof(c=o.pattern())=="string"&&(d=o.rest());)a=a.resolve(c),o=d,l=!0;if(c=o.pattern(),d=o.rest(),l){if(this.hasWalkedCache.hasWalked(a,o))continue;this.hasWalkedCache.storeWalked(a,o)}if(typeof c=="string"){let p=c===".."||c===""||c===".";this.matches.add(a.resolve(c),i,p);continue}else if(c===rt){(!a.isSymbolicLink()||this.follow||o.checkFollowGlobstar())&&this.subwalks.add(a,o);let p=d?.pattern(),u=d?.rest();if(!d||(p===""||p===".")&&!u)this.matches.add(a,i,p===""||p===".");else if(p===".."){let h=a.parent||a;u?this.hasWalkedCache.hasWalked(h,u)||this.subwalks.add(h,u):this.matches.add(h,i,!0)}}else c instanceof RegExp&&this.subwalks.add(a,o)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new vv(this.opts,this.hasWalkedCache)}filterEntries(n,t){let s=this.subwalks.get(n),a=this.child();for(let o of t)for(let r of s){let i=r.isAbsolute(),c=r.pattern(),d=r.rest();c===rt?a.testGlobstar(o,r,d,i):c instanceof RegExp?a.testRegExp(o,c,d,i):a.testString(o,c,d,i)}return a}testGlobstar(n,t,s,a){if((this.dot||!n.name.startsWith("."))&&(t.hasMore()||this.matches.add(n,a,!1),n.canReaddir()&&(this.follow||!n.isSymbolicLink()?this.subwalks.add(n,t):n.isSymbolicLink()&&(s&&t.checkFollowGlobstar()?this.subwalks.add(n,s):t.markFollowGlobstar()&&this.subwalks.add(n,t)))),s){let o=s.pattern();if(typeof o=="string"&&o!==".."&&o!==""&&o!==".")this.testString(n,o,s.rest(),a);else if(o===".."){let r=n.parent||n;this.subwalks.add(r,s)}else o instanceof RegExp&&this.testRegExp(n,o,s.rest(),a)}}testRegExp(n,t,s,a){t.test(n.name)&&(s?this.subwalks.add(n,s):this.matches.add(n,a,!1))}testString(n,t,s,a){n.isNamed(t)&&(s?this.subwalks.add(n,s):this.matches.add(n,a,!1))}},IK=(e,n)=>typeof e=="string"?new jO([e],n):Array.isArray(e)?new jO(e,n):e,kv=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#n;#a;signal;maxDepth;includeChildMatches;constructor(e,n,t){if(this.patterns=e,this.path=n,this.opts=t,this.#a=!t.posix&&t.platform==="win32"?"\\":"/",this.includeChildMatches=t.includeChildMatches!==!1,(t.ignore||!this.includeChildMatches)&&(this.#n=IK(t.ignore??[],t),!this.includeChildMatches&&typeof this.#n.add!="function")){let s="cannot ignore child matches, ignore lacks add() method.";throw new Error(s)}this.maxDepth=t.maxDepth||1/0,t.signal&&(this.signal=t.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#s(e){return this.seen.has(e)||!!this.#n?.ignored?.(e)}#r(e){return!!this.#n?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,n){if(n&&this.opts.nodir)return;let t;if(this.opts.realpath){if(t=e.realpathCached()||await e.realpath(),!t)return;e=t}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=await s.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(s,n)}matchCheckTest(e,n){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!n||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#s(e)?e:void 0}matchCheckSync(e,n){if(n&&this.opts.nodir)return;let t;if(this.opts.realpath){if(t=e.realpathCached()||e.realpathSync(),!t)return;e=t}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=s.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(s,n)}matchFinish(e,n){if(this.#s(e))return;if(!this.includeChildMatches&&this.#n?.add){let a=`${e.relativePosix()}/**`;this.#n.add(a)}let t=this.opts.absolute===void 0?n:this.opts.absolute;this.seen.add(e);let s=this.opts.mark&&e.isDirectory()?this.#a:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(t){let a=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(a+s)}else{let a=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!a.startsWith(".."+this.#a)?"."+this.#a:"";this.matchEmit(a?o+a+s:"."+s)}}async match(e,n,t){let s=await this.matchCheck(e,t);s&&this.matchFinish(s,n)}matchSync(e,n,t){let s=this.matchCheckSync(e,t);s&&this.matchFinish(s,n)}walkCB(e,n,t){this.signal?.aborted&&t(),this.walkCB2(e,n,new YO(this.opts),t)}walkCB2(e,n,t,s){if(this.#r(e))return s();if(this.signal?.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2(e,n,t,s));return}t.processPatterns(e,n);let a=1,o=()=>{--a===0&&s()};for(let[r,i,c]of t.matches.entries())this.#s(r)||(a++,this.match(r,i,c).then(()=>o()));for(let r of t.subwalkTargets()){if(this.maxDepth!==1/0&&r.depth()>=this.maxDepth)continue;a++;let i=r.readdirCached();r.calledReaddir()?this.walkCB3(r,i,t,o):r.readdirCB((c,d)=>this.walkCB3(r,d,t,o),!0)}o()}walkCB3(e,n,t,s){t=t.filterEntries(e,n);let a=1,o=()=>{--a===0&&s()};for(let[r,i,c]of t.matches.entries())this.#s(r)||(a++,this.match(r,i,c).then(()=>o()));for(let[r,i]of t.subwalks.entries())a++,this.walkCB2(r,i,t.child(),o);o()}walkCBSync(e,n,t){this.signal?.aborted&&t(),this.walkCB2Sync(e,n,new YO(this.opts),t)}walkCB2Sync(e,n,t,s){if(this.#r(e))return s();if(this.signal?.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2Sync(e,n,t,s));return}t.processPatterns(e,n);let a=1,o=()=>{--a===0&&s()};for(let[r,i,c]of t.matches.entries())this.#s(r)||this.matchSync(r,i,c);for(let r of t.subwalkTargets()){if(this.maxDepth!==1/0&&r.depth()>=this.maxDepth)continue;a++;let i=r.readdirSync();this.walkCB3Sync(r,i,t,o)}o()}walkCB3Sync(e,n,t,s){t=t.filterEntries(e,n);let a=1,o=()=>{--a===0&&s()};for(let[r,i,c]of t.matches.entries())this.#s(r)||this.matchSync(r,i,c);for(let[r,i]of t.subwalks.entries())a++,this.walkCB2Sync(r,i,t.child(),o);o()}},VO=class extends kv{matches=new Set;constructor(e,n,t){super(e,n,t)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,n)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?n(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},$O=class extends kv{results;constructor(e,n,t){super(e,n,t),this.results=new ch({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}},NK=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",bo=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,n){if(!n)throw new TypeError("glob options required");if(this.withFileTypes=!!n.withFileTypes,this.signal=n.signal,this.follow=!!n.follow,this.dot=!!n.dot,this.dotRelative=!!n.dotRelative,this.nodir=!!n.nodir,this.mark=!!n.mark,n.cwd?(n.cwd instanceof URL||n.cwd.startsWith("file://"))&&(n.cwd=(0,sv.fileURLToPath)(n.cwd)):this.cwd="",this.cwd=n.cwd||"",this.root=n.root,this.magicalBraces=!!n.magicalBraces,this.nobrace=!!n.nobrace,this.noext=!!n.noext,this.realpath=!!n.realpath,this.absolute=n.absolute,this.includeChildMatches=n.includeChildMatches!==!1,this.noglobstar=!!n.noglobstar,this.matchBase=!!n.matchBase,this.maxDepth=typeof n.maxDepth=="number"?n.maxDepth:1/0,this.stat=!!n.stat,this.ignore=n.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(i=>i.replace(/\\/g,"/"))),this.matchBase){if(n.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(i=>i.includes("/")?i:`./**/${i}`)}if(this.pattern=e,this.platform=n.platform||NK,this.opts={...n,platform:this.platform},n.scurry){if(this.scurry=n.scurry,n.nocase!==void 0&&n.nocase!==n.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let i=n.platform==="win32"?tS:n.platform==="darwin"?_v:n.platform?sS:TK;this.scurry=new i(this.cwd,{nocase:n.nocase,fs:n.fs})}this.nocase=this.scurry.nocase;let t=this.platform==="darwin"||this.platform==="win32",s={braceExpandMax:1e4,...n,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:t,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},a=this.pattern.map(i=>new _a(i,s)),[o,r]=a.reduce((i,c)=>(i[0].push(...c.set),i[1].push(...c.globParts),i),[[],[]]);this.patterns=o.map((i,c)=>{let d=r[c];if(!d)throw new Error("invalid pattern object");return new Av(i,d,0,this.platform)})}async walk(){return[...await new VO(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new VO(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new $O(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new $O(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}},LK=(e,n={})=>{Array.isArray(e)||(e=[e]);for(let t of e)if(new _a(t,n).hasMagic())return!0;return!1};function uh(e,n={}){return new bo(e,n).streamSync()}function Iv(e,n={}){return new bo(e,n).stream()}function Nv(e,n={}){return new bo(e,n).walkSync()}async function QO(e,n={}){return new bo(e,n).walk()}function hh(e,n={}){return new bo(e,n).iterateSync()}function Lv(e,n={}){return new bo(e,n).iterate()}var PK=uh,CK=Object.assign(Iv,{sync:uh}),DK=hh,UK=Object.assign(Lv,{sync:hh}),MK=Object.assign(Nv,{stream:uh,iterate:hh}),dh=Object.assign(QO,{glob:QO,globSync:Nv,sync:MK,globStream:Iv,stream:CK,globStreamSync:uh,streamSync:PK,globIterate:Lv,iterate:UK,globIterateSync:hh,iterateSync:DK,Glob:bo,hasMagic:LK,escape:XO,unescape:Yr});dh.glob=dh;function FK(e){return Ot((0,mh.pathToFileURL)(e).href)}function aS(e){return e.startsWith("file://")?(0,mh.fileURLToPath)(e):e}function Pv(e={}){let n=e.ignoredPathSegments;return{async read(t){try{return await(0,Td.readFile)(aS(t),{encoding:"utf8",signal:e.signal})}catch(s){let a=s.code;if(a==="ENOENT"||a==="EISDIR")return;throw s}},async exists(t){try{return await(0,Td.stat)(aS(t)),!0}catch{return!1}},async glob(t,s){return(await dh(s,{cwd:aS(t),withFileTypes:!0,dot:e.includeHidden===!0,follow:!1,nodir:!0,nocase:e.caseInsensitive===!0,ignore:{childrenIgnored:o=>o.isSymbolicLink()||n?.includes(o.name)===!0},signal:e.signal})).filter(o=>!o.isSymbolicLink()).map(o=>FK(o.fullpath())).sort()}}}x();b();x();b();var Rd="asset bundle 102";var _d=[{uri:"hexasync://index",name:"index",title:"HexaSync Profile Template \u2014 knowledge base",description:"Use this knowledge base to choose a component, understand its actual authoring contract and adapt its supported examples.",mimeType:"text/markdown",text:`# HexaSync Profile Template \u2014 knowledge base
146
+ >>> no match, partial?`,e,p,n,u),p===i))}let m;if(typeof d=="string"?(m=l===d,this.debug("string match",d,l,m)):(m=d.test(l),this.debug("pattern match",d,l,m)),!m)return!1}if(o===i&&r===c)return!0;if(o===i)return t;if(r===c)return o===i-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return tv(this.pattern,this.options)}parse(e){rh(e);let n=this.options;if(e==="**")return rt;if(e==="")return"";let t,s=null;(t=e.match(qQ))?s=n.dot?YQ:jQ:(t=e.match(kQ))?s=(n.nocase?n.dot?PQ:LQ:n.dot?NQ:IQ)(t[1]):(t=e.match(VQ))?s=(n.nocase?n.dot?QQ:$Q:n.dot?KQ:zQ)(t):(t=e.match(CQ))?s=n.dot?UQ:DQ:(t=e.match(MQ))&&(s=FQ);let a=JO.fromGlob(e,this.options).toMMPattern();return s&&typeof a=="object"&&Reflect.defineProperty(a,"test",{value:s}),a}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let n=this.options,t=n.noglobstar?WQ:n.dot?GQ:JQ,s=new Set(n.nocase?["i"]:[]),a=e.map(i=>{let c=i.map(l=>{if(l instanceof RegExp)for(let p of l.flags.split(""))s.add(p);return typeof l=="string"?tK(l):l===rt?rt:l._src});c.forEach((l,p)=>{let u=c[p+1],h=c[p-1];l!==rt||h===rt||(h===void 0?u!==void 0&&u!==rt?c[p+1]="(?:\\/|"+t+"\\/)?"+u:c[p]=t:u===void 0?c[p-1]=h+"(?:\\/|\\/"+t+")?":u!==rt&&(c[p-1]=h+"(?:\\/|\\/"+t+"\\/)"+u,c[p+1]=rt))});let d=c.filter(l=>l!==rt);if(this.partial&&d.length>=1){let l=[];for(let p=1;p<=d.length;p++)l.push(d.slice(0,p).join("/"));return"(?:"+l.join("|")+")"}return d.join("/")}).join("|"),[o,r]=e.length>1?["(?:",")"]:["",""];a="^"+o+a+r+"$",this.partial&&(a="^(?:\\/|"+o+a.slice(1,-1)+r+")$"),this.negate&&(a="^(?!"+a+").+$");try{this.regexp=new RegExp(a,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,n=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&n)return!0;let t=this.options;this.isWindows&&(e=e.split("\\").join("/"));let s=this.slashSplit(e);this.debug(this.pattern,"split",s);let a=this.set;this.debug(this.pattern,"set",a);let o=s[s.length-1];if(!o)for(let r=s.length-2;!o&&r>=0;r--)o=s[r];for(let r=0;r<a.length;r++){let i=a[r],c=s;if(t.matchBase&&i.length===1&&(c=[o]),this.matchOne(c,i,n))return t.flipNegate?!0:!this.negate}return t.flipNegate?!1:this.negate}static defaults(e){return it.defaults(e).Minimatch}};it.AST=JO;it.Minimatch=_a;it.escape=XO;it.unescape=Yr;var sK=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,av=new Set,X1=typeof process=="object"&&process?process:{},ov=(e,n,t,s)=>{typeof X1.emitWarning=="function"?X1.emitWarning(e,n,t,s):console.error(`[${t}] ${n}: ${e}`)},ih=globalThis.AbortController,IO=globalThis.AbortSignal;if(typeof ih>"u"){IO=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,s){this._onabort.push(s)}},ih=class{constructor(){n()}signal=new IO;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(let s of this.signal._onabort)s(t);this.signal.onabort?.(t)}}};let e=X1.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",n=()=>{e&&(e=!1,ov("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",n))}}var aK=e=>!av.has(e),Ra=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),rv=e=>Ra(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ah:null:null,ah=class extends Array{constructor(e){super(e),this.fill(0)}},oK=class Ed{heap;length;static#e=!1;static create(n){let t=rv(n);if(!t)return[];Ed.#e=!0;let s=new Ed(n,t);return Ed.#e=!1,s}constructor(n,t){if(!Ed.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(n),this.length=0}push(n){this.heap[this.length++]=n}pop(){return this.heap[--this.length]}},lh=class iv{#e;#n;#a;#s;#r;#m;#u;#l;get perf(){return this.#l}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#c;#h;#d;#o;#f;#b;#x;#y;#v;#g;#_;#A;#E;#S;#T;#w;#t;#C;static unsafeExposeInternals(n){return{starts:n.#A,ttls:n.#E,autopurgeTimers:n.#S,sizes:n.#_,keyMap:n.#h,keyList:n.#d,valList:n.#o,next:n.#f,prev:n.#b,get head(){return n.#x},get tail(){return n.#y},free:n.#v,isBackgroundFetch:t=>n.#p(t),backgroundFetch:(t,s,a,o)=>n.#V(t,s,a,o),moveToTail:t=>n.#U(t),indexes:t=>n.#I(t),rindexes:t=>n.#N(t),isStale:t=>n.#R(t)}}get max(){return this.#e}get maxSize(){return this.#n}get calculatedSize(){return this.#c}get size(){return this.#i}get fetchMethod(){return this.#m}get memoMethod(){return this.#u}get dispose(){return this.#a}get onInsert(){return this.#s}get disposeAfter(){return this.#r}constructor(n){let{max:t=0,ttl:s,ttlResolution:a=1,ttlAutopurge:o,updateAgeOnGet:r,updateAgeOnHas:i,allowStale:c,dispose:d,onInsert:l,disposeAfter:p,noDisposeOnSet:u,noUpdateTTL:h,maxSize:m=0,maxEntrySize:f=0,sizeCalculation:y,fetchMethod:g,memoMethod:E,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:_,ignoreFetchAbort:T,perf:A}=n;if(A!==void 0&&typeof A?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#l=A??sK,t!==0&&!Ra(t))throw new TypeError("max option must be a nonnegative integer");let k=t?rv(t):Array;if(!k)throw new Error("invalid max value: "+t);if(this.#e=t,this.#n=m,this.maxEntrySize=f||this.#n,this.sizeCalculation=y,this.sizeCalculation){if(!this.#n&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(E!==void 0&&typeof E!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#u=E,g!==void 0&&typeof g!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#m=g,this.#w=!!g,this.#h=new Map,this.#d=new Array(t).fill(void 0),this.#o=new Array(t).fill(void 0),this.#f=new k(t),this.#b=new k(t),this.#x=0,this.#y=0,this.#v=oK.create(t),this.#i=0,this.#c=0,typeof d=="function"&&(this.#a=d),typeof l=="function"&&(this.#s=l),typeof p=="function"?(this.#r=p,this.#g=[]):(this.#r=void 0,this.#g=void 0),this.#T=!!this.#a,this.#C=!!this.#s,this.#t=!!this.#r,this.noDisposeOnSet=!!u,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!_,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#n!==0&&!Ra(this.#n))throw new TypeError("maxSize must be a positive integer if specified");if(!Ra(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#Q()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!R,this.updateAgeOnGet=!!r,this.updateAgeOnHas=!!i,this.ttlResolution=Ra(a)||a===0?a:1,this.ttlAutopurge=!!o,this.ttl=s||0,this.ttl){if(!Ra(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#e===0&&this.ttl===0&&this.#n===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#n){let M="LRU_CACHE_UNBOUNDED";aK(M)&&(av.add(M),ov("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",M,iv))}}getRemainingTTL(n){return this.#h.has(n)?1/0:0}#L(){let n=new ah(this.#e),t=new ah(this.#e);this.#E=n,this.#A=t;let s=this.ttlAutopurge?new Array(this.#e):void 0;this.#S=s,this.#F=(r,i,c=this.#l.now())=>{if(t[r]=i!==0?c:0,n[r]=i,s?.[r]&&(clearTimeout(s[r]),s[r]=void 0),i!==0&&s){let d=setTimeout(()=>{this.#R(r)&&this.#k(this.#d[r],"expire")},i+1);d.unref&&d.unref(),s[r]=d}},this.#O=r=>{t[r]=n[r]!==0?this.#l.now():0},this.#P=(r,i)=>{if(n[i]){let c=n[i],d=t[i];if(!c||!d)return;r.ttl=c,r.start=d,r.now=a||o();let l=r.now-d;r.remainingTTL=c-l}};let a=0,o=()=>{let r=this.#l.now();if(this.ttlResolution>0){a=r;let i=setTimeout(()=>a=0,this.ttlResolution);i.unref&&i.unref()}return r};this.getRemainingTTL=r=>{let i=this.#h.get(r);if(i===void 0)return 0;let c=n[i],d=t[i];if(!c||!d)return 1/0;let l=(a||o())-d;return c-l},this.#R=r=>{let i=t[r],c=n[r];return!!c&&!!i&&(a||o())-i>c}}#O=()=>{};#P=()=>{};#F=()=>{};#R=()=>!1;#Q(){let n=new ah(this.#e);this.#c=0,this.#_=n,this.#M=t=>{this.#c-=n[t],n[t]=0},this.#q=(t,s,a,o)=>{if(this.#p(s))return 0;if(!Ra(a))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(a=o(s,t),!Ra(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a},this.#D=(t,s,a)=>{if(n[t]=s,this.#n){let o=this.#n-n[t];for(;this.#c>o;)this.#Y(!0)}this.#c+=n[t],a&&(a.entrySize=s,a.totalCalculatedSize=this.#c)}}#M=n=>{};#D=(n,t,s)=>{};#q=(n,t,s,a)=>{if(s||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#I({allowStale:n=this.allowStale}={}){if(this.#i)for(let t=this.#y;!(!this.#j(t)||((n||!this.#R(t))&&(yield t),t===this.#x));)t=this.#b[t]}*#N({allowStale:n=this.allowStale}={}){if(this.#i)for(let t=this.#x;!(!this.#j(t)||((n||!this.#R(t))&&(yield t),t===this.#y));)t=this.#f[t]}#j(n){return n!==void 0&&this.#h.get(this.#d[n])===n}*entries(){for(let n of this.#I())this.#o[n]!==void 0&&this.#d[n]!==void 0&&!this.#p(this.#o[n])&&(yield[this.#d[n],this.#o[n]])}*rentries(){for(let n of this.#N())this.#o[n]!==void 0&&this.#d[n]!==void 0&&!this.#p(this.#o[n])&&(yield[this.#d[n],this.#o[n]])}*keys(){for(let n of this.#I()){let t=this.#d[n];t!==void 0&&!this.#p(this.#o[n])&&(yield t)}}*rkeys(){for(let n of this.#N()){let t=this.#d[n];t!==void 0&&!this.#p(this.#o[n])&&(yield t)}}*values(){for(let n of this.#I())this.#o[n]!==void 0&&!this.#p(this.#o[n])&&(yield this.#o[n])}*rvalues(){for(let n of this.#N())this.#o[n]!==void 0&&!this.#p(this.#o[n])&&(yield this.#o[n])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(n,t={}){for(let s of this.#I()){let a=this.#o[s],o=this.#p(a)?a.__staleWhileFetching:a;if(o!==void 0&&n(o,this.#d[s],this))return this.get(this.#d[s],t)}}forEach(n,t=this){for(let s of this.#I()){let a=this.#o[s],o=this.#p(a)?a.__staleWhileFetching:a;o!==void 0&&n.call(t,o,this.#d[s],this)}}rforEach(n,t=this){for(let s of this.#N()){let a=this.#o[s],o=this.#p(a)?a.__staleWhileFetching:a;o!==void 0&&n.call(t,o,this.#d[s],this)}}purgeStale(){let n=!1;for(let t of this.#N({allowStale:!0}))this.#R(t)&&(this.#k(this.#d[t],"expire"),n=!0);return n}info(n){let t=this.#h.get(n);if(t===void 0)return;let s=this.#o[t],a=this.#p(s)?s.__staleWhileFetching:s;if(a===void 0)return;let o={value:a};if(this.#E&&this.#A){let r=this.#E[t],i=this.#A[t];if(r&&i){let c=r-(this.#l.now()-i);o.ttl=c,o.start=Date.now()}}return this.#_&&(o.size=this.#_[t]),o}dump(){let n=[];for(let t of this.#I({allowStale:!0})){let s=this.#d[t],a=this.#o[t],o=this.#p(a)?a.__staleWhileFetching:a;if(o===void 0||s===void 0)continue;let r={value:o};if(this.#E&&this.#A){r.ttl=this.#E[t];let i=this.#l.now()-this.#A[t];r.start=Math.floor(Date.now()-i)}this.#_&&(r.size=this.#_[t]),n.unshift([s,r])}return n}load(n){this.clear();for(let[t,s]of n){if(s.start){let a=Date.now()-s.start;s.start=this.#l.now()-a}this.set(t,s.value,s)}}set(n,t,s={}){if(t===void 0)return this.delete(n),this;let{ttl:a=this.ttl,start:o,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:i=this.sizeCalculation,status:c}=s,{noUpdateTTL:d=this.noUpdateTTL}=s,l=this.#q(n,t,s.size||0,i);if(this.maxEntrySize&&l>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.#k(n,"set"),this;let p=this.#i===0?void 0:this.#h.get(n);if(p===void 0)p=this.#i===0?this.#y:this.#v.length!==0?this.#v.pop():this.#i===this.#e?this.#Y(!1):this.#i,this.#d[p]=n,this.#o[p]=t,this.#h.set(n,p),this.#f[this.#y]=p,this.#b[p]=this.#y,this.#y=p,this.#i++,this.#D(p,l,c),c&&(c.set="add"),d=!1,this.#C&&this.#s?.(t,n,"add");else{this.#U(p);let u=this.#o[p];if(t!==u){if(this.#w&&this.#p(u)){u.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:h}=u;h!==void 0&&!r&&(this.#T&&this.#a?.(h,n,"set"),this.#t&&this.#g?.push([h,n,"set"]))}else r||(this.#T&&this.#a?.(u,n,"set"),this.#t&&this.#g?.push([u,n,"set"]));if(this.#M(p),this.#D(p,l,c),this.#o[p]=t,c){c.set="replace";let h=u&&this.#p(u)?u.__staleWhileFetching:u;h!==void 0&&(c.oldValue=h)}}else c&&(c.set="update");this.#C&&this.onInsert?.(t,n,t===u?"update":"replace")}if(a!==0&&!this.#E&&this.#L(),this.#E&&(d||this.#F(p,a,o),c&&this.#P(c,p)),!r&&this.#t&&this.#g){let u=this.#g,h;for(;h=u?.shift();)this.#r?.(...h)}return this}pop(){try{for(;this.#i;){let n=this.#o[this.#x];if(this.#Y(!0),this.#p(n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(this.#t&&this.#g){let n=this.#g,t;for(;t=n?.shift();)this.#r?.(...t)}}}#Y(n){let t=this.#x,s=this.#d[t],a=this.#o[t];return this.#w&&this.#p(a)?a.__abortController.abort(new Error("evicted")):(this.#T||this.#t)&&(this.#T&&this.#a?.(a,s,"evict"),this.#t&&this.#g?.push([a,s,"evict"])),this.#M(t),this.#S?.[t]&&(clearTimeout(this.#S[t]),this.#S[t]=void 0),n&&(this.#d[t]=void 0,this.#o[t]=void 0,this.#v.push(t)),this.#i===1?(this.#x=this.#y=0,this.#v.length=0):this.#x=this.#f[t],this.#h.delete(s),this.#i--,t}has(n,t={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:a}=t,o=this.#h.get(n);if(o!==void 0){let r=this.#o[o];if(this.#p(r)&&r.__staleWhileFetching===void 0)return!1;if(this.#R(o))a&&(a.has="stale",this.#P(a,o));else return s&&this.#O(o),a&&(a.has="hit",this.#P(a,o)),!0}else a&&(a.has="miss");return!1}peek(n,t={}){let{allowStale:s=this.allowStale}=t,a=this.#h.get(n);if(a===void 0||!s&&this.#R(a))return;let o=this.#o[a];return this.#p(o)?o.__staleWhileFetching:o}#V(n,t,s,a){let o=t===void 0?void 0:this.#o[t];if(this.#p(o))return o;let r=new ih,{signal:i}=s;i?.addEventListener("abort",()=>r.abort(i.reason),{signal:r.signal});let c={signal:r.signal,options:s,context:a},d=(f,y=!1)=>{let{aborted:g}=r.signal,E=s.ignoreFetchAbort&&f!==void 0,S=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&f!==void 0);if(s.status&&(g&&!y?(s.status.fetchAborted=!0,s.status.fetchError=r.signal.reason,E&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),g&&!E&&!y)return p(r.signal.reason,S);let R=h,w=this.#o[t];return(w===h||E&&y&&w===void 0)&&(f===void 0?R.__staleWhileFetching!==void 0?this.#o[t]=R.__staleWhileFetching:this.#k(n,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(n,f,c.options))),f},l=f=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=f),p(f,!1)),p=(f,y)=>{let{aborted:g}=r.signal,E=g&&s.allowStaleOnFetchAbort,S=E||s.allowStaleOnFetchRejection,R=S||s.noDeleteOnFetchRejection,w=h;if(this.#o[t]===h&&(!R||!y&&w.__staleWhileFetching===void 0?this.#k(n,"fetch"):E||(this.#o[t]=w.__staleWhileFetching)),S)return s.status&&w.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),w.__staleWhileFetching;if(w.__returned===w)throw f},u=(f,y)=>{let g=this.#m?.(n,o,c);g&&g instanceof Promise&&g.then(E=>f(E===void 0?void 0:E),y),r.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(f(void 0),s.allowStaleOnFetchAbort&&(f=E=>d(E,!0)))})};s.status&&(s.status.fetchDispatched=!0);let h=new Promise(u).then(d,l),m=Object.assign(h,{__abortController:r,__staleWhileFetching:o,__returned:void 0});return t===void 0?(this.set(n,m,{...c.options,status:void 0}),t=this.#h.get(n)):this.#o[t]=m,m}#p(n){if(!this.#w)return!1;let t=n;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof ih}async fetch(n,t={}){let{allowStale:s=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:i=this.noDisposeOnSet,size:c=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:p=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:f,forceRefresh:y=!1,status:g,signal:E}=t;if(!this.#w)return g&&(g.fetch="get"),this.get(n,{allowStale:s,updateAgeOnGet:a,noDeleteOnStaleGet:o,status:g});let S={allowStale:s,updateAgeOnGet:a,noDeleteOnStaleGet:o,ttl:r,noDisposeOnSet:i,size:c,sizeCalculation:d,noUpdateTTL:l,noDeleteOnFetchRejection:p,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:m,ignoreFetchAbort:h,status:g,signal:E},R=this.#h.get(n);if(R===void 0){g&&(g.fetch="miss");let w=this.#V(n,R,S,f);return w.__returned=w}else{let w=this.#o[R];if(this.#p(w)){let k=s&&w.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",k&&(g.returnedStale=!0)),k?w.__staleWhileFetching:w.__returned=w}let _=this.#R(R);if(!y&&!_)return g&&(g.fetch="hit"),this.#U(R),a&&this.#O(R),g&&this.#P(g,R),w;let T=this.#V(n,R,S,f),A=T.__staleWhileFetching!==void 0&&s;return g&&(g.fetch=_?"stale":"refresh",A&&_&&(g.returnedStale=!0)),A?T.__staleWhileFetching:T.__returned=T}}async forceFetch(n,t={}){let s=await this.fetch(n,t);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(n,t={}){let s=this.#u;if(!s)throw new Error("no memoMethod provided to constructor");let{context:a,forceRefresh:o,...r}=t,i=this.get(n,r);if(!o&&i!==void 0)return i;let c=s(n,i,{options:r,context:a});return this.set(n,c,r),c}get(n,t={}){let{allowStale:s=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:r}=t,i=this.#h.get(n);if(i!==void 0){let c=this.#o[i],d=this.#p(c);return r&&this.#P(r,i),this.#R(i)?(r&&(r.get="stale"),d?(r&&s&&c.__staleWhileFetching!==void 0&&(r.returnedStale=!0),s?c.__staleWhileFetching:void 0):(o||this.#k(n,"expire"),r&&s&&(r.returnedStale=!0),s?c:void 0)):(r&&(r.get="hit"),d?c.__staleWhileFetching:(this.#U(i),a&&this.#O(i),c))}else r&&(r.get="miss")}#$(n,t){this.#b[t]=n,this.#f[n]=t}#U(n){n!==this.#y&&(n===this.#x?this.#x=this.#f[n]:this.#$(this.#b[n],this.#f[n]),this.#$(this.#y,n),this.#y=n)}delete(n){return this.#k(n,"delete")}#k(n,t){let s=!1;if(this.#i!==0){let a=this.#h.get(n);if(a!==void 0)if(this.#S?.[a]&&(clearTimeout(this.#S?.[a]),this.#S[a]=void 0),s=!0,this.#i===1)this.#K(t);else{this.#M(a);let o=this.#o[a];if(this.#p(o)?o.__abortController.abort(new Error("deleted")):(this.#T||this.#t)&&(this.#T&&this.#a?.(o,n,t),this.#t&&this.#g?.push([o,n,t])),this.#h.delete(n),this.#d[a]=void 0,this.#o[a]=void 0,a===this.#y)this.#y=this.#b[a];else if(a===this.#x)this.#x=this.#f[a];else{let r=this.#b[a];this.#f[r]=this.#f[a];let i=this.#f[a];this.#b[i]=this.#b[a]}this.#i--,this.#v.push(a)}}if(this.#t&&this.#g?.length){let a=this.#g,o;for(;o=a?.shift();)this.#r?.(...o)}return s}clear(){return this.#K("delete")}#K(n){for(let t of this.#N({allowStale:!0})){let s=this.#o[t];if(this.#p(s))s.__abortController.abort(new Error("deleted"));else{let a=this.#d[t];this.#T&&this.#a?.(s,a,n),this.#t&&this.#g?.push([s,a,n])}}if(this.#h.clear(),this.#o.fill(void 0),this.#d.fill(void 0),this.#E&&this.#A){this.#E.fill(0),this.#A.fill(0);for(let t of this.#S??[])t!==void 0&&clearTimeout(t);this.#S?.fill(void 0)}if(this.#_&&this.#_.fill(0),this.#x=0,this.#y=0,this.#v.length=0,this.#c=0,this.#i=0,this.#t&&this.#g){let t=this.#g,s;for(;s=t?.shift();)this.#r?.(...s)}}},NO=typeof process=="object"&&process?process:{stdout:null,stderr:null},iK=e=>!!e&&typeof e=="object"&&(e instanceof ch||e instanceof nS.default||cK(e)||dK(e)),cK=e=>!!e&&typeof e=="object"&&e instanceof ph.EventEmitter&&typeof e.pipe=="function"&&e.pipe!==nS.default.Writable.prototype.pipe,dK=e=>!!e&&typeof e=="object"&&e instanceof ph.EventEmitter&&typeof e.write=="function"&&typeof e.end=="function",ks=Symbol("EOF"),Is=Symbol("maybeEmitEnd"),Ta=Symbol("emittedEnd"),Ju=Symbol("emittingEnd"),ud=Symbol("emittedError"),Xu=Symbol("closed"),LO=Symbol("read"),Zu=Symbol("flush"),PO=Symbol("flushChunk"),Zt=Symbol("encoding"),qr=Symbol("decoder"),Cn=Symbol("flowing"),hd=Symbol("paused"),jr=Symbol("resume"),Dn=Symbol("buffer"),ot=Symbol("pipes"),Un=Symbol("bufferLength"),K1=Symbol("bufferPush"),eh=Symbol("bufferShift"),Gn=Symbol("objectMode"),_n=Symbol("destroyed"),z1=Symbol("error"),H1=Symbol("emitData"),CO=Symbol("emitEnd"),B1=Symbol("emitEnd2"),ys=Symbol("async"),W1=Symbol("abort"),nh=Symbol("aborted"),md=Symbol("signal"),So=Symbol("dataListeners"),It=Symbol("discarded"),fd=e=>Promise.resolve().then(e),lK=e=>e(),pK=e=>e==="end"||e==="finish"||e==="prefinish",uK=e=>e instanceof ArrayBuffer||!!e&&typeof e=="object"&&e.constructor&&e.constructor.name==="ArrayBuffer"&&e.byteLength>=0,hK=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),lv=class{src;dest;opts;ondrain;constructor(e,n,t){this.src=e,this.dest=n,this.opts=t,this.ondrain=()=>e[jr](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},mK=class extends lv{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,n,t){super(e,n,t),this.proxyErrors=s=>this.dest.emit("error",s),e.on("error",this.proxyErrors)}},fK=e=>!!e.objectMode,yK=e=>!e.objectMode&&!!e.encoding&&e.encoding!=="buffer",ch=class extends ph.EventEmitter{[Cn]=!1;[hd]=!1;[ot]=[];[Dn]=[];[Gn];[Zt];[ys];[qr];[ks]=!1;[Ta]=!1;[Ju]=!1;[Xu]=!1;[ud]=null;[Un]=0;[_n]=!1;[md];[nh]=!1;[So]=0;[It]=!1;writable=!0;readable=!0;constructor(...e){let n=e[0]||{};if(super(),n.objectMode&&typeof n.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");fK(n)?(this[Gn]=!0,this[Zt]=null):yK(n)?(this[Zt]=n.encoding,this[Gn]=!1):(this[Gn]=!1,this[Zt]=null),this[ys]=!!n.async,this[qr]=this[Zt]?new dv.StringDecoder(this[Zt]):null,n&&n.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[Dn]}),n&&n.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[ot]});let{signal:t}=n;t&&(this[md]=t,t.aborted?this[W1]():t.addEventListener("abort",()=>this[W1]()))}get bufferLength(){return this[Un]}get encoding(){return this[Zt]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Gn]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[ys]}set async(e){this[ys]=this[ys]||!!e}[W1](){this[nh]=!0,this.emit("abort",this[md]?.reason),this.destroy(this[md]?.reason)}get aborted(){return this[nh]}set aborted(e){}write(e,n,t){if(this[nh])return!1;if(this[ks])throw new Error("write after end");if(this[_n])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof n=="function"&&(t=n,n="utf8"),n||(n="utf8");let s=this[ys]?fd:lK;if(!this[Gn]&&!Buffer.isBuffer(e)){if(hK(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(uK(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Gn]?(this[Cn]&&this[Un]!==0&&this[Zu](!0),this[Cn]?this.emit("data",e):this[K1](e),this[Un]!==0&&this.emit("readable"),t&&s(t),this[Cn]):e.length?(typeof e=="string"&&!(n===this[Zt]&&!this[qr]?.lastNeed)&&(e=Buffer.from(e,n)),Buffer.isBuffer(e)&&this[Zt]&&(e=this[qr].write(e)),this[Cn]&&this[Un]!==0&&this[Zu](!0),this[Cn]?this.emit("data",e):this[K1](e),this[Un]!==0&&this.emit("readable"),t&&s(t),this[Cn]):(this[Un]!==0&&this.emit("readable"),t&&s(t),this[Cn])}read(e){if(this[_n])return null;if(this[It]=!1,this[Un]===0||e===0||e&&e>this[Un])return this[Is](),null;this[Gn]&&(e=null),this[Dn].length>1&&!this[Gn]&&(this[Dn]=[this[Zt]?this[Dn].join(""):Buffer.concat(this[Dn],this[Un])]);let n=this[LO](e||null,this[Dn][0]);return this[Is](),n}[LO](e,n){if(this[Gn])this[eh]();else{let t=n;e===t.length||e===null?this[eh]():typeof t=="string"?(this[Dn][0]=t.slice(e),n=t.slice(0,e),this[Un]-=e):(this[Dn][0]=t.subarray(e),n=t.subarray(0,e),this[Un]-=e)}return this.emit("data",n),!this[Dn].length&&!this[ks]&&this.emit("drain"),n}end(e,n,t){return typeof e=="function"&&(t=e,e=void 0),typeof n=="function"&&(t=n,n="utf8"),e!==void 0&&this.write(e,n),t&&this.once("end",t),this[ks]=!0,this.writable=!1,(this[Cn]||!this[hd])&&this[Is](),this}[jr](){this[_n]||(!this[So]&&!this[ot].length&&(this[It]=!0),this[hd]=!1,this[Cn]=!0,this.emit("resume"),this[Dn].length?this[Zu]():this[ks]?this[Is]():this.emit("drain"))}resume(){return this[jr]()}pause(){this[Cn]=!1,this[hd]=!0,this[It]=!1}get destroyed(){return this[_n]}get flowing(){return this[Cn]}get paused(){return this[hd]}[K1](e){this[Gn]?this[Un]+=1:this[Un]+=e.length,this[Dn].push(e)}[eh](){return this[Gn]?this[Un]-=1:this[Un]-=this[Dn][0].length,this[Dn].shift()}[Zu](e=!1){do;while(this[PO](this[eh]())&&this[Dn].length);!e&&!this[Dn].length&&!this[ks]&&this.emit("drain")}[PO](e){return this.emit("data",e),this[Cn]}pipe(e,n){if(this[_n])return e;this[It]=!1;let t=this[Ta];return n=n||{},e===NO.stdout||e===NO.stderr?n.end=!1:n.end=n.end!==!1,n.proxyErrors=!!n.proxyErrors,t?n.end&&e.end():(this[ot].push(n.proxyErrors?new mK(this,e,n):new lv(this,e,n)),this[ys]?fd(()=>this[jr]()):this[jr]()),e}unpipe(e){let n=this[ot].find(t=>t.dest===e);n&&(this[ot].length===1?(this[Cn]&&this[So]===0&&(this[Cn]=!1),this[ot]=[]):this[ot].splice(this[ot].indexOf(n),1),n.unpipe())}addListener(e,n){return this.on(e,n)}on(e,n){let t=super.on(e,n);if(e==="data")this[It]=!1,this[So]++,!this[ot].length&&!this[Cn]&&this[jr]();else if(e==="readable"&&this[Un]!==0)super.emit("readable");else if(pK(e)&&this[Ta])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[ud]){let s=n;this[ys]?fd(()=>s.call(this,this[ud])):s.call(this,this[ud])}return t}removeListener(e,n){return this.off(e,n)}off(e,n){let t=super.off(e,n);return e==="data"&&(this[So]=this.listeners("data").length,this[So]===0&&!this[It]&&!this[ot].length&&(this[Cn]=!1)),t}removeAllListeners(e){let n=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[So]=0,!this[It]&&!this[ot].length&&(this[Cn]=!1)),n}get emittedEnd(){return this[Ta]}[Is](){!this[Ju]&&!this[Ta]&&!this[_n]&&this[Dn].length===0&&this[ks]&&(this[Ju]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Xu]&&this.emit("close"),this[Ju]=!1)}emit(e,...n){let t=n[0];if(e!=="error"&&e!=="close"&&e!==_n&&this[_n])return!1;if(e==="data")return!this[Gn]&&!t?!1:this[ys]?(fd(()=>this[H1](t)),!0):this[H1](t);if(e==="end")return this[CO]();if(e==="close"){if(this[Xu]=!0,!this[Ta]&&!this[_n])return!1;let a=super.emit("close");return this.removeAllListeners("close"),a}else if(e==="error"){this[ud]=t,super.emit(z1,t);let a=!this[md]||this.listeners("error").length?super.emit("error",t):!1;return this[Is](),a}else if(e==="resume"){let a=super.emit("resume");return this[Is](),a}else if(e==="finish"||e==="prefinish"){let a=super.emit(e);return this.removeAllListeners(e),a}let s=super.emit(e,...n);return this[Is](),s}[H1](e){for(let t of this[ot])t.dest.write(e)===!1&&this.pause();let n=this[It]?!1:super.emit("data",e);return this[Is](),n}[CO](){return this[Ta]?!1:(this[Ta]=!0,this.readable=!1,this[ys]?(fd(()=>this[B1]()),!0):this[B1]())}[B1](){if(this[qr]){let n=this[qr].end();if(n){for(let t of this[ot])t.dest.write(n);this[It]||super.emit("data",n)}}for(let n of this[ot])n.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[Gn]||(e.dataLength=0);let n=this.promise();return this.on("data",t=>{e.push(t),this[Gn]||(e.dataLength+=t.length)}),await n,e}async concat(){if(this[Gn])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Zt]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,n)=>{this.on(_n,()=>n(new Error("stream destroyed"))),this.on("error",t=>n(t)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[It]=!1;let e=!1,n=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return n();let t=this.read();if(t!==null)return Promise.resolve({done:!1,value:t});if(this[ks])return n();let s,a,o=d=>{this.off("data",r),this.off("end",i),this.off(_n,c),n(),a(d)},r=d=>{this.off("error",o),this.off("end",i),this.off(_n,c),this.pause(),s({value:d,done:!!this[ks]})},i=()=>{this.off("error",o),this.off("data",r),this.off(_n,c),n(),s({done:!0,value:void 0})},c=()=>o(new Error("stream destroyed"));return new Promise((d,l)=>{a=l,s=d,this.once(_n,c),this.once("error",o),this.once("end",i),this.once("data",r)})},throw:n,return:n,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[It]=!1;let e=!1,n=()=>(this.pause(),this.off(z1,n),this.off(_n,n),this.off("end",n),e=!0,{done:!0,value:void 0}),t=()=>{if(e)return n();let s=this.read();return s===null?n():{done:!1,value:s}};return this.once("end",n),this.once(z1,n),this.once(_n,n),{next:t,throw:n,return:n,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[_n])return e?this.emit("error",e):this.emit(_n),this;this[_n]=!0,this[It]=!0,this[Dn].length=0,this[Un]=0;let n=this;return typeof n.close=="function"&&!this[Xu]&&n.close(),e?this.emit("error",e):this.emit(_n),this}static get isStream(){return iK}},gK=Es.realpathSync.native,Sd={lstatSync:Es.lstatSync,readdir:Es.readdir,readdirSync:Es.readdirSync,readlinkSync:Es.readlinkSync,realpathSync:gK,promises:{lstat:Aa.lstat,readdir:Aa.readdir,readlink:Aa.readlink,realpath:Aa.realpath}},pv=e=>!e||e===Sd||e===rK?Sd:{...Sd,...e,promises:{...Sd.promises,...e.promises||{}}},uv=/^\\\\\?\\([a-z]:)\\?$/i,EK=e=>e.replace(/\//g,"\\").replace(uv,"$1\\"),SK=/[\\\/]/,Vt=0,hv=1,mv=2,gs=4,fv=6,yv=8,xo=10,gv=12,Yt=15,yd=~Yt,G1=16,DO=32,xd=64,es=128,th=256,oh=512,UO=xd|es|oh,xK=1023,J1=e=>e.isFile()?yv:e.isDirectory()?gs:e.isSymbolicLink()?xo:e.isCharacterDevice()?mv:e.isBlockDevice()?fv:e.isSocket()?gv:e.isFIFO()?hv:Vt,MO=new lh({max:2**12}),bd=e=>{let n=MO.get(e);if(n)return n;let t=e.normalize("NFKD");return MO.set(e,t),t},FO=new lh({max:2**12}),sh=e=>{let n=FO.get(e);if(n)return n;let t=bd(e.toLowerCase());return FO.set(e,t),t},qO=class extends lh{constructor(){super({max:256})}},bK=class extends lh{constructor(e=16*1024){super({maxSize:e,sizeCalculation:n=>n.length+1})}},Ev=Symbol("PathScurry setAsCwd"),ft=class{name;root;roots;parent;nocase;isCWD=!1;#e;#n;get dev(){return this.#n}#a;get mode(){return this.#a}#s;get nlink(){return this.#s}#r;get uid(){return this.#r}#m;get gid(){return this.#m}#u;get rdev(){return this.#u}#l;get blksize(){return this.#l}#i;get ino(){return this.#i}#c;get size(){return this.#c}#h;get blocks(){return this.#h}#d;get atimeMs(){return this.#d}#o;get mtimeMs(){return this.#o}#f;get ctimeMs(){return this.#f}#b;get birthtimeMs(){return this.#b}#x;get atime(){return this.#x}#y;get mtime(){return this.#y}#v;get ctime(){return this.#v}#g;get birthtime(){return this.#g}#_;#A;#E;#S;#T;#w;#t;#C;#L;#O;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,n=Vt,t,s,a,o,r){this.name=e,this.#_=a?sh(e):bd(e),this.#t=n&xK,this.nocase=a,this.roots=s,this.root=t||this,this.#C=o,this.#E=r.fullpath,this.#T=r.relative,this.#w=r.relativePosix,this.parent=r.parent,this.parent?this.#e=this.parent.#e:this.#e=pv(r.fs)}depth(){return this.#A!==void 0?this.#A:this.parent?this.#A=this.parent.depth()+1:this.#A=0}childrenCache(){return this.#C}resolve(e){if(!e)return this;let n=this.getRootString(e),t=e.substring(n.length).split(this.splitSep);return n?this.getRoot(n).#P(t):this.#P(t)}#P(e){let n=this;for(let t of e)n=n.child(t);return n}children(){let e=this.#C.get(this);if(e)return e;let n=Object.assign([],{provisional:0});return this.#C.set(this,n),this.#t&=~G1,n}child(e,n){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let t=this.children(),s=this.nocase?sh(e):bd(e);for(let i of t)if(i.#_===s)return i;let a=this.parent?this.sep:"",o=this.#E?this.#E+a+e:void 0,r=this.newChild(e,Vt,{...n,parent:this,fullpath:o});return this.canReaddir()||(r.#t|=es),t.push(r),r}relative(){if(this.isCWD)return"";if(this.#T!==void 0)return this.#T;let e=this.name,n=this.parent;if(!n)return this.#T=this.name;let t=n.relative();return t+(!t||!n.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#w!==void 0)return this.#w;let e=this.name,n=this.parent;if(!n)return this.#w=this.fullpathPosix();let t=n.relativePosix();return t+(!t||!n.parent?"":"/")+e}fullpath(){if(this.#E!==void 0)return this.#E;let e=this.name,n=this.parent;if(!n)return this.#E=this.name;let t=n.fullpath()+(n.parent?this.sep:"")+e;return this.#E=t}fullpathPosix(){if(this.#S!==void 0)return this.#S;if(this.sep==="/")return this.#S=this.fullpath();if(!this.parent){let s=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(s)?this.#S=`//?/${s}`:this.#S=s}let e=this.parent,n=e.fullpathPosix(),t=n+(!n||!e.parent?"":"/")+this.name;return this.#S=t}isUnknown(){return(this.#t&Yt)===Vt}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#t&Yt)===yv}isDirectory(){return(this.#t&Yt)===gs}isCharacterDevice(){return(this.#t&Yt)===mv}isBlockDevice(){return(this.#t&Yt)===fv}isFIFO(){return(this.#t&Yt)===hv}isSocket(){return(this.#t&Yt)===gv}isSymbolicLink(){return(this.#t&xo)===xo}lstatCached(){return this.#t&DO?this:void 0}readlinkCached(){return this.#L}realpathCached(){return this.#O}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#L)return!0;if(!this.parent)return!1;let e=this.#t&Yt;return!(e!==Vt&&e!==xo||this.#t&th||this.#t&es)}calledReaddir(){return!!(this.#t&G1)}isENOENT(){return!!(this.#t&es)}isNamed(e){return this.nocase?this.#_===sh(e):this.#_===bd(e)}async readlink(){let e=this.#L;if(e)return e;if(this.canReadlink()&&this.parent)try{let n=await this.#e.promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(n);if(t)return this.#L=t}catch(n){this.#N(n.code);return}}readlinkSync(){let e=this.#L;if(e)return e;if(this.canReadlink()&&this.parent)try{let n=this.#e.readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(n);if(t)return this.#L=t}catch(n){this.#N(n.code);return}}#F(e){this.#t|=G1;for(let n=e.provisional;n<e.length;n++){let t=e[n];t&&t.#R()}}#R(){this.#t&es||(this.#t=(this.#t|es)&yd,this.#Q())}#Q(){let e=this.children();e.provisional=0;for(let n of e)n.#R()}#M(){this.#t|=oh,this.#D()}#D(){if(this.#t&xd)return;let e=this.#t;(e&Yt)===gs&&(e&=yd),this.#t=e|xd,this.#Q()}#q(e=""){e==="ENOTDIR"||e==="EPERM"?this.#D():e==="ENOENT"?this.#R():this.children().provisional=0}#I(e=""){e==="ENOTDIR"?this.parent.#D():e==="ENOENT"&&this.#R()}#N(e=""){let n=this.#t;n|=th,e==="ENOENT"&&(n|=es),(e==="EINVAL"||e==="UNKNOWN")&&(n&=yd),this.#t=n,e==="ENOTDIR"&&this.parent&&this.parent.#D()}#j(e,n){return this.#V(e,n)||this.#Y(e,n)}#Y(e,n){let t=J1(e),s=this.newChild(e.name,t,{parent:this}),a=s.#t&Yt;return a!==gs&&a!==xo&&a!==Vt&&(s.#t|=xd),n.unshift(s),n.provisional++,s}#V(e,n){for(let t=n.provisional;t<n.length;t++){let s=n[t];if((this.nocase?sh(e.name):bd(e.name))===s.#_)return this.#p(e,s,t,n)}}#p(e,n,t,s){let a=n.name;return n.#t=n.#t&yd|J1(e),a!==e.name&&(n.name=e.name),t!==s.provisional&&(t===s.length-1?s.pop():s.splice(t,1),s.unshift(n)),s.provisional++,n}async lstat(){if((this.#t&es)===0)try{return this.#$(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#I(e.code)}}lstatSync(){if((this.#t&es)===0)try{return this.#$(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#I(e.code)}}#$(e){let{atime:n,atimeMs:t,birthtime:s,birthtimeMs:a,blksize:o,blocks:r,ctime:i,ctimeMs:c,dev:d,gid:l,ino:p,mode:u,mtime:h,mtimeMs:m,nlink:f,rdev:y,size:g,uid:E}=e;this.#x=n,this.#d=t,this.#g=s,this.#b=a,this.#l=o,this.#h=r,this.#v=i,this.#f=c,this.#n=d,this.#m=l,this.#i=p,this.#a=u,this.#y=h,this.#o=m,this.#s=f,this.#u=y,this.#c=g,this.#r=E;let S=J1(e);this.#t=this.#t&yd|S|DO,S!==Vt&&S!==gs&&S!==xo&&(this.#t|=xd)}#U=[];#k=!1;#K(e){this.#k=!1;let n=this.#U.slice();this.#U.length=0,n.forEach(t=>t(null,e))}readdirCB(e,n=!1){if(!this.canReaddir()){n?e(null,[]):queueMicrotask(()=>e(null,[]));return}let t=this.children();if(this.calledReaddir()){let a=t.slice(0,t.provisional);n?e(null,a):queueMicrotask(()=>e(null,a));return}if(this.#U.push(e),this.#k)return;this.#k=!0;let s=this.fullpath();this.#e.readdir(s,{withFileTypes:!0},(a,o)=>{if(a)this.#q(a.code),t.provisional=0;else{for(let r of o)this.#j(r,t);this.#F(t)}this.#K(t.slice(0,t.provisional))})}#z;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let n=this.fullpath();if(this.#z)await this.#z;else{let t=()=>{};this.#z=new Promise(s=>t=s);try{for(let s of await this.#e.promises.readdir(n,{withFileTypes:!0}))this.#j(s,e);this.#F(e)}catch(s){this.#q(s.code),e.provisional=0}this.#z=void 0,t()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let n=this.fullpath();try{for(let t of this.#e.readdirSync(n,{withFileTypes:!0}))this.#j(t,e);this.#F(e)}catch(t){this.#q(t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#t&UO)return!1;let e=Yt&this.#t;return e===Vt||e===gs||e===xo}shouldWalk(e,n){return(this.#t&gs)===gs&&!(this.#t&UO)&&!e.has(this)&&(!n||n(this))}async realpath(){if(this.#O)return this.#O;if(!((oh|th|es)&this.#t))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#O=this.resolve(e)}catch{this.#M()}}realpathSync(){if(this.#O)return this.#O;if(!((oh|th|es)&this.#t))try{let e=this.#e.realpathSync(this.fullpath());return this.#O=this.resolve(e)}catch{this.#M()}}[Ev](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let n=new Set([]),t=[],s=this;for(;s&&s.parent;)n.add(s),s.#T=t.join(this.sep),s.#w=t.join("/"),s=s.parent,t.push("..");for(s=e;s&&s.parent&&!n.has(s);)s.#T=void 0,s.#w=void 0,s=s.parent}},Sv=class xv extends ft{sep="\\";splitSep=SK;constructor(n,t=Vt,s,a,o,r,i){super(n,t,s,a,o,r,i)}newChild(n,t=Vt,s={}){return new xv(n,t,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(n){return Vr.win32.parse(n).root}getRoot(n){if(n=EK(n.toUpperCase()),n===this.root.name)return this.root;for(let[t,s]of Object.entries(this.roots))if(this.sameRoot(n,t))return this.roots[n]=s;return this.roots[n]=new tS(n,this).root}sameRoot(n,t=this.root.name){return n=n.toUpperCase().replace(/\//g,"\\").replace(uv,"$1\\"),n===t}},bv=class Tv extends ft{splitSep="/";sep="/";constructor(n,t=Vt,s,a,o,r,i){super(n,t,s,a,o,r,i)}getRootString(n){return n.startsWith("/")?"/":""}getRoot(n){return this.root}newChild(n,t=Vt,s={}){return new Tv(n,t,this.root,this.roots,this.nocase,this.childrenCache(),s)}},Rv=class{root;rootPath;roots;cwd;#e;#n;#a;nocase;#s;constructor(e=process.cwd(),n,t,{nocase:s,childrenCacheSize:a=16*1024,fs:o=Sd}={}){this.#s=pv(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,cv.fileURLToPath)(e));let r=n.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(r),this.#e=new qO,this.#n=new qO,this.#a=new bK(a);let i=r.substring(this.rootPath.length).split(t);if(i.length===1&&!i[0]&&i.pop(),s===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=s,this.root=this.newRoot(this.#s),this.roots[this.rootPath]=this.root;let c=this.root,d=i.length-1,l=n.sep,p=this.rootPath,u=!1;for(let h of i){let m=d--;c=c.child(h,{relative:new Array(m).fill("..").join(l),relativePosix:new Array(m).fill("..").join("/"),fullpath:p+=(u?"":l)+h}),u=!0}this.cwd=c}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#a}resolve(...e){let n="";for(let a=e.length-1;a>=0;a--){let o=e[a];if(!(!o||o===".")&&(n=n?`${o}/${n}`:o,this.isAbsolute(o)))break}let t=this.#e.get(n);if(t!==void 0)return t;let s=this.cwd.resolve(n).fullpath();return this.#e.set(n,s),s}resolvePosix(...e){let n="";for(let a=e.length-1;a>=0;a--){let o=e[a];if(!(!o||o===".")&&(n=n?`${o}/${n}`:o,this.isAbsolute(o)))break}let t=this.#n.get(n);if(t!==void 0)return t;let s=this.cwd.resolve(n).fullpathPosix();return this.#n.set(n,s),s}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,n={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t}=n;if(e.canReaddir()){let s=await e.readdir();return t?s:s.map(a=>a.name)}else return[]}readdirSync(e=this.cwd,n={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t=!0}=n;return e.canReaddir()?t?e.readdirSync():e.readdirSync().map(s=>s.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:n}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e.withFileTypes,e=this.cwd);let t=await e.readlink();return n?t:t?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:n}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e.withFileTypes,e=this.cwd);let t=e.readlinkSync();return n?t:t?.fullpath()}async realpath(e=this.cwd,{withFileTypes:n}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e.withFileTypes,e=this.cwd);let t=await e.realpath();return n?t:t?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:n}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e.withFileTypes,e=this.cwd);let t=e.realpathSync();return n?t:t?.fullpath()}async walk(e=this.cwd,n={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t=!0,follow:s=!1,filter:a,walkFilter:o}=n,r=[];(!a||a(e))&&r.push(t?e:e.fullpath());let i=new Set,c=(l,p)=>{i.add(l),l.readdirCB((u,h)=>{if(u)return p(u);let m=h.length;if(!m)return p();let f=()=>{--m===0&&p()};for(let y of h)(!a||a(y))&&r.push(t?y:y.fullpath()),s&&y.isSymbolicLink()?y.realpath().then(g=>g?.isUnknown()?g.lstat():g).then(g=>g?.shouldWalk(i,o)?c(g,f):f()):y.shouldWalk(i,o)?c(y,f):f()},!0)},d=e;return new Promise((l,p)=>{c(d,u=>{if(u)return p(u);l(r)})})}walkSync(e=this.cwd,n={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t=!0,follow:s=!1,filter:a,walkFilter:o}=n,r=[];(!a||a(e))&&r.push(t?e:e.fullpath());let i=new Set([e]);for(let c of i){let d=c.readdirSync();for(let l of d){(!a||a(l))&&r.push(t?l:l.fullpath());let p=l;if(l.isSymbolicLink()){if(!(s&&(p=l.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(i,o)&&i.add(p)}}return r}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,n={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd),this.stream(e,n)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,n={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t=!0,follow:s=!1,filter:a,walkFilter:o}=n;(!a||a(e))&&(yield t?e:e.fullpath());let r=new Set([e]);for(let i of r){let c=i.readdirSync();for(let d of c){(!a||a(d))&&(yield t?d:d.fullpath());let l=d;if(d.isSymbolicLink()){if(!(s&&(l=d.realpathSync())))continue;l.isUnknown()&&l.lstatSync()}l.shouldWalk(r,o)&&r.add(l)}}}stream(e=this.cwd,n={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t=!0,follow:s=!1,filter:a,walkFilter:o}=n,r=new ch({objectMode:!0});(!a||a(e))&&r.write(t?e:e.fullpath());let i=new Set,c=[e],d=0,l=()=>{let p=!1;for(;!p;){let u=c.shift();if(!u){d===0&&r.end();return}d++,i.add(u);let h=(f,y,g=!1)=>{if(f)return r.emit("error",f);if(s&&!g){let E=[];for(let S of y)S.isSymbolicLink()&&E.push(S.realpath().then(R=>R?.isUnknown()?R.lstat():R));if(E.length){Promise.all(E).then(()=>h(null,y,!0));return}}for(let E of y)E&&(!a||a(E))&&(r.write(t?E:E.fullpath())||(p=!0));d--;for(let E of y){let S=E.realpathCached()||E;S.shouldWalk(i,o)&&c.push(S)}p&&!r.flowing?r.once("drain",l):m||l()},m=!0;u.readdirCB(h,!0),m=!1}};return l(),r}streamSync(e=this.cwd,n={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ft||(n=e,e=this.cwd);let{withFileTypes:t=!0,follow:s=!1,filter:a,walkFilter:o}=n,r=new ch({objectMode:!0}),i=new Set;(!a||a(e))&&r.write(t?e:e.fullpath());let c=[e],d=0,l=()=>{let p=!1;for(;!p;){let u=c.shift();if(!u){d===0&&r.end();return}d++,i.add(u);let h=u.readdirSync();for(let m of h)(!a||a(m))&&(r.write(t?m:m.fullpath())||(p=!0));d--;for(let m of h){let f=m;if(m.isSymbolicLink()){if(!(s&&(f=m.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(i,o)&&c.push(f)}}p&&!r.flowing&&r.once("drain",l)};return l(),r}chdir(e=this.cwd){let n=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Ev](n)}},tS=class extends Rv{sep="\\";constructor(e=process.cwd(),n={}){let{nocase:t=!0}=n;super(e,Vr.win32,"\\",{...n,nocase:t}),this.nocase=t;for(let s=this.cwd;s;s=s.parent)s.nocase=this.nocase}parseRootPath(e){return Vr.win32.parse(e).root.toUpperCase()}newRoot(e){return new Sv(this.rootPath,gs,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},sS=class extends Rv{sep="/";constructor(e=process.cwd(),n={}){let{nocase:t=!1}=n;super(e,Vr.posix,"/",{...n,nocase:t}),this.nocase=t}parseRootPath(e){return"/"}newRoot(e){return new bv(this.rootPath,gs,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},_v=class extends sS{constructor(e=process.cwd(),n={}){let{nocase:t=!0}=n;super(e,{...n,nocase:t})}},cde=process.platform==="win32"?Sv:bv,TK=process.platform==="win32"?tS:process.platform==="darwin"?_v:sS,RK=e=>e.length>=1,_K=e=>e.length>=1,AK=Symbol.for("nodejs.util.inspect.custom"),Av=class wv{#e;#n;#a;length;#s;#r;#m;#u;#l;#i;#c=!0;constructor(n,t,s,a){if(!RK(n))throw new TypeError("empty pattern list");if(!_K(t))throw new TypeError("empty glob list");if(t.length!==n.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=n.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#e=n,this.#n=t,this.#a=s,this.#s=a,this.#a===0){if(this.isUNC()){let[o,r,i,c,...d]=this.#e,[l,p,u,h,...m]=this.#n;d[0]===""&&(d.shift(),m.shift());let f=[o,r,i,c,""].join("/"),y=[l,p,u,h,""].join("/");this.#e=[f,...d],this.#n=[y,...m],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[o,...r]=this.#e,[i,...c]=this.#n;r[0]===""&&(r.shift(),c.shift());let d=o+"/",l=i+"/";this.#e=[d,...r],this.#n=[l,...c],this.length=this.#e.length}}}[AK](){return"Pattern <"+this.#n.slice(this.#a).join("/")+">"}pattern(){return this.#e[this.#a]}isString(){return typeof this.#e[this.#a]=="string"}isGlobstar(){return this.#e[this.#a]===rt}isRegExp(){return this.#e[this.#a]instanceof RegExp}globString(){return this.#m=this.#m||(this.#a===0?this.isAbsolute()?this.#n[0]+this.#n.slice(1).join("/"):this.#n.join("/"):this.#n.slice(this.#a).join("/"))}hasMore(){return this.length>this.#a+1}rest(){return this.#r!==void 0?this.#r:this.hasMore()?(this.#r=new wv(this.#e,this.#n,this.#a+1,this.#s),this.#r.#i=this.#i,this.#r.#l=this.#l,this.#r.#u=this.#u,this.#r):this.#r=null}isUNC(){let n=this.#e;return this.#l!==void 0?this.#l:this.#l=this.#s==="win32"&&this.#a===0&&n[0]===""&&n[1]===""&&typeof n[2]=="string"&&!!n[2]&&typeof n[3]=="string"&&!!n[3]}isDrive(){let n=this.#e;return this.#u!==void 0?this.#u:this.#u=this.#s==="win32"&&this.#a===0&&this.length>1&&typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0])}isAbsolute(){let n=this.#e;return this.#i!==void 0?this.#i:this.#i=n[0]===""&&n.length>1||this.isDrive()||this.isUNC()}root(){let n=this.#e[0];return typeof n=="string"&&this.isAbsolute()&&this.#a===0?n:""}checkFollowGlobstar(){return!(this.#a===0||!this.isGlobstar()||!this.#c)}markFollowGlobstar(){return this.#a===0||!this.isGlobstar()||!this.#c?!1:(this.#c=!1,!0)}},wK=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",jO=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:n,nocase:t,noext:s,noglobstar:a,platform:o=wK}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:n,nocase:t,noext:s,noglobstar:a,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let r of e)this.add(r)}add(e){let n=new _a(e,this.mmopts);for(let t=0;t<n.set.length;t++){let s=n.set[t],a=n.globParts[t];if(!s||!a)throw new Error("invalid pattern object");for(;s[0]==="."&&a[0]===".";)s.shift(),a.shift();let o=new Av(s,a,0,this.platform),r=new _a(o.globString(),this.mmopts),i=a[a.length-1]==="**",c=o.isAbsolute();c?this.absolute.push(r):this.relative.push(r),i&&(c?this.absoluteChildren.push(r):this.relativeChildren.push(r))}}ignored(e){let n=e.fullpath(),t=`${n}/`,s=e.relative()||".",a=`${s}/`;for(let o of this.relative)if(o.match(s)||o.match(a))return!0;for(let o of this.absolute)if(o.match(n)||o.match(t))return!0;return!1}childrenIgnored(e){let n=e.fullpath()+"/",t=(e.relative()||".")+"/";for(let s of this.relativeChildren)if(s.match(t))return!0;for(let s of this.absoluteChildren)if(s.match(n))return!0;return!1}},OK=class Ov{store;constructor(n=new Map){this.store=n}copy(){return new Ov(new Map(this.store))}hasWalked(n,t){return this.store.get(n.fullpath())?.has(t.globString())}storeWalked(n,t){let s=n.fullpath(),a=this.store.get(s);a?a.add(t.globString()):this.store.set(s,new Set([t.globString()]))}},vK=class{store=new Map;add(e,n,t){let s=(n?2:0)|(t?1:0),a=this.store.get(e);this.store.set(e,a===void 0?s:s&a)}entries(){return[...this.store.entries()].map(([e,n])=>[e,!!(n&2),!!(n&1)])}},kK=class{store=new Map;add(e,n){if(!e.canReaddir())return;let t=this.store.get(e);t?t.find(s=>s.globString()===n.globString())||t.push(n):this.store.set(e,[n])}get(e){let n=this.store.get(e);if(!n)throw new Error("attempting to walk unknown path");return n}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},YO=class vv{hasWalkedCache;matches=new vK;subwalks=new kK;patterns;follow;dot;opts;constructor(n,t){this.opts=n,this.follow=!!n.follow,this.dot=!!n.dot,this.hasWalkedCache=t?t.copy():new OK}processPatterns(n,t){this.patterns=t;let s=t.map(a=>[n,a]);for(let[a,o]of s){this.hasWalkedCache.storeWalked(a,o);let r=o.root(),i=o.isAbsolute()&&this.opts.absolute!==!1;if(r){a=a.resolve(r==="/"&&this.opts.root!==void 0?this.opts.root:r);let p=o.rest();if(p)o=p;else{this.matches.add(a,!0,!1);continue}}if(a.isENOENT())continue;let c,d,l=!1;for(;typeof(c=o.pattern())=="string"&&(d=o.rest());)a=a.resolve(c),o=d,l=!0;if(c=o.pattern(),d=o.rest(),l){if(this.hasWalkedCache.hasWalked(a,o))continue;this.hasWalkedCache.storeWalked(a,o)}if(typeof c=="string"){let p=c===".."||c===""||c===".";this.matches.add(a.resolve(c),i,p);continue}else if(c===rt){(!a.isSymbolicLink()||this.follow||o.checkFollowGlobstar())&&this.subwalks.add(a,o);let p=d?.pattern(),u=d?.rest();if(!d||(p===""||p===".")&&!u)this.matches.add(a,i,p===""||p===".");else if(p===".."){let h=a.parent||a;u?this.hasWalkedCache.hasWalked(h,u)||this.subwalks.add(h,u):this.matches.add(h,i,!0)}}else c instanceof RegExp&&this.subwalks.add(a,o)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new vv(this.opts,this.hasWalkedCache)}filterEntries(n,t){let s=this.subwalks.get(n),a=this.child();for(let o of t)for(let r of s){let i=r.isAbsolute(),c=r.pattern(),d=r.rest();c===rt?a.testGlobstar(o,r,d,i):c instanceof RegExp?a.testRegExp(o,c,d,i):a.testString(o,c,d,i)}return a}testGlobstar(n,t,s,a){if((this.dot||!n.name.startsWith("."))&&(t.hasMore()||this.matches.add(n,a,!1),n.canReaddir()&&(this.follow||!n.isSymbolicLink()?this.subwalks.add(n,t):n.isSymbolicLink()&&(s&&t.checkFollowGlobstar()?this.subwalks.add(n,s):t.markFollowGlobstar()&&this.subwalks.add(n,t)))),s){let o=s.pattern();if(typeof o=="string"&&o!==".."&&o!==""&&o!==".")this.testString(n,o,s.rest(),a);else if(o===".."){let r=n.parent||n;this.subwalks.add(r,s)}else o instanceof RegExp&&this.testRegExp(n,o,s.rest(),a)}}testRegExp(n,t,s,a){t.test(n.name)&&(s?this.subwalks.add(n,s):this.matches.add(n,a,!1))}testString(n,t,s,a){n.isNamed(t)&&(s?this.subwalks.add(n,s):this.matches.add(n,a,!1))}},IK=(e,n)=>typeof e=="string"?new jO([e],n):Array.isArray(e)?new jO(e,n):e,kv=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#n;#a;signal;maxDepth;includeChildMatches;constructor(e,n,t){if(this.patterns=e,this.path=n,this.opts=t,this.#a=!t.posix&&t.platform==="win32"?"\\":"/",this.includeChildMatches=t.includeChildMatches!==!1,(t.ignore||!this.includeChildMatches)&&(this.#n=IK(t.ignore??[],t),!this.includeChildMatches&&typeof this.#n.add!="function")){let s="cannot ignore child matches, ignore lacks add() method.";throw new Error(s)}this.maxDepth=t.maxDepth||1/0,t.signal&&(this.signal=t.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#s(e){return this.seen.has(e)||!!this.#n?.ignored?.(e)}#r(e){return!!this.#n?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,n){if(n&&this.opts.nodir)return;let t;if(this.opts.realpath){if(t=e.realpathCached()||await e.realpath(),!t)return;e=t}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=await s.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(s,n)}matchCheckTest(e,n){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!n||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#s(e)?e:void 0}matchCheckSync(e,n){if(n&&this.opts.nodir)return;let t;if(this.opts.realpath){if(t=e.realpathCached()||e.realpathSync(),!t)return;e=t}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let a=s.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(s,n)}matchFinish(e,n){if(this.#s(e))return;if(!this.includeChildMatches&&this.#n?.add){let a=`${e.relativePosix()}/**`;this.#n.add(a)}let t=this.opts.absolute===void 0?n:this.opts.absolute;this.seen.add(e);let s=this.opts.mark&&e.isDirectory()?this.#a:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(t){let a=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(a+s)}else{let a=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!a.startsWith(".."+this.#a)?"."+this.#a:"";this.matchEmit(a?o+a+s:"."+s)}}async match(e,n,t){let s=await this.matchCheck(e,t);s&&this.matchFinish(s,n)}matchSync(e,n,t){let s=this.matchCheckSync(e,t);s&&this.matchFinish(s,n)}walkCB(e,n,t){this.signal?.aborted&&t(),this.walkCB2(e,n,new YO(this.opts),t)}walkCB2(e,n,t,s){if(this.#r(e))return s();if(this.signal?.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2(e,n,t,s));return}t.processPatterns(e,n);let a=1,o=()=>{--a===0&&s()};for(let[r,i,c]of t.matches.entries())this.#s(r)||(a++,this.match(r,i,c).then(()=>o()));for(let r of t.subwalkTargets()){if(this.maxDepth!==1/0&&r.depth()>=this.maxDepth)continue;a++;let i=r.readdirCached();r.calledReaddir()?this.walkCB3(r,i,t,o):r.readdirCB((c,d)=>this.walkCB3(r,d,t,o),!0)}o()}walkCB3(e,n,t,s){t=t.filterEntries(e,n);let a=1,o=()=>{--a===0&&s()};for(let[r,i,c]of t.matches.entries())this.#s(r)||(a++,this.match(r,i,c).then(()=>o()));for(let[r,i]of t.subwalks.entries())a++,this.walkCB2(r,i,t.child(),o);o()}walkCBSync(e,n,t){this.signal?.aborted&&t(),this.walkCB2Sync(e,n,new YO(this.opts),t)}walkCB2Sync(e,n,t,s){if(this.#r(e))return s();if(this.signal?.aborted&&s(),this.paused){this.onResume(()=>this.walkCB2Sync(e,n,t,s));return}t.processPatterns(e,n);let a=1,o=()=>{--a===0&&s()};for(let[r,i,c]of t.matches.entries())this.#s(r)||this.matchSync(r,i,c);for(let r of t.subwalkTargets()){if(this.maxDepth!==1/0&&r.depth()>=this.maxDepth)continue;a++;let i=r.readdirSync();this.walkCB3Sync(r,i,t,o)}o()}walkCB3Sync(e,n,t,s){t=t.filterEntries(e,n);let a=1,o=()=>{--a===0&&s()};for(let[r,i,c]of t.matches.entries())this.#s(r)||this.matchSync(r,i,c);for(let[r,i]of t.subwalks.entries())a++,this.walkCB2Sync(r,i,t.child(),o);o()}},VO=class extends kv{matches=new Set;constructor(e,n,t){super(e,n,t)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,n)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?n(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},$O=class extends kv{results;constructor(e,n,t){super(e,n,t),this.results=new ch({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}},NK=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",bo=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,n){if(!n)throw new TypeError("glob options required");if(this.withFileTypes=!!n.withFileTypes,this.signal=n.signal,this.follow=!!n.follow,this.dot=!!n.dot,this.dotRelative=!!n.dotRelative,this.nodir=!!n.nodir,this.mark=!!n.mark,n.cwd?(n.cwd instanceof URL||n.cwd.startsWith("file://"))&&(n.cwd=(0,sv.fileURLToPath)(n.cwd)):this.cwd="",this.cwd=n.cwd||"",this.root=n.root,this.magicalBraces=!!n.magicalBraces,this.nobrace=!!n.nobrace,this.noext=!!n.noext,this.realpath=!!n.realpath,this.absolute=n.absolute,this.includeChildMatches=n.includeChildMatches!==!1,this.noglobstar=!!n.noglobstar,this.matchBase=!!n.matchBase,this.maxDepth=typeof n.maxDepth=="number"?n.maxDepth:1/0,this.stat=!!n.stat,this.ignore=n.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(i=>i.replace(/\\/g,"/"))),this.matchBase){if(n.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(i=>i.includes("/")?i:`./**/${i}`)}if(this.pattern=e,this.platform=n.platform||NK,this.opts={...n,platform:this.platform},n.scurry){if(this.scurry=n.scurry,n.nocase!==void 0&&n.nocase!==n.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let i=n.platform==="win32"?tS:n.platform==="darwin"?_v:n.platform?sS:TK;this.scurry=new i(this.cwd,{nocase:n.nocase,fs:n.fs})}this.nocase=this.scurry.nocase;let t=this.platform==="darwin"||this.platform==="win32",s={braceExpandMax:1e4,...n,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:t,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},a=this.pattern.map(i=>new _a(i,s)),[o,r]=a.reduce((i,c)=>(i[0].push(...c.set),i[1].push(...c.globParts),i),[[],[]]);this.patterns=o.map((i,c)=>{let d=r[c];if(!d)throw new Error("invalid pattern object");return new Av(i,d,0,this.platform)})}async walk(){return[...await new VO(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new VO(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new $O(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new $O(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}},LK=(e,n={})=>{Array.isArray(e)||(e=[e]);for(let t of e)if(new _a(t,n).hasMagic())return!0;return!1};function uh(e,n={}){return new bo(e,n).streamSync()}function Iv(e,n={}){return new bo(e,n).stream()}function Nv(e,n={}){return new bo(e,n).walkSync()}async function QO(e,n={}){return new bo(e,n).walk()}function hh(e,n={}){return new bo(e,n).iterateSync()}function Lv(e,n={}){return new bo(e,n).iterate()}var PK=uh,CK=Object.assign(Iv,{sync:uh}),DK=hh,UK=Object.assign(Lv,{sync:hh}),MK=Object.assign(Nv,{stream:uh,iterate:hh}),dh=Object.assign(QO,{glob:QO,globSync:Nv,sync:MK,globStream:Iv,stream:CK,globStreamSync:uh,streamSync:PK,globIterate:Lv,iterate:UK,globIterateSync:hh,iterateSync:DK,Glob:bo,hasMagic:LK,escape:XO,unescape:Yr});dh.glob=dh;function FK(e){return Ot((0,mh.pathToFileURL)(e).href)}function aS(e){return e.startsWith("file://")?(0,mh.fileURLToPath)(e):e}function Pv(e={}){let n=e.ignoredPathSegments;return{async read(t){try{return await(0,Td.readFile)(aS(t),{encoding:"utf8",signal:e.signal})}catch(s){let a=s.code;if(a==="ENOENT"||a==="EISDIR")return;throw s}},async exists(t){try{return await(0,Td.stat)(aS(t)),!0}catch{return!1}},async glob(t,s){return(await dh(s,{cwd:aS(t),withFileTypes:!0,dot:e.includeHidden===!0,follow:!1,nodir:!0,nocase:e.caseInsensitive===!0,ignore:{childrenIgnored:o=>o.isSymbolicLink()||n?.includes(o.name)===!0},signal:e.signal})).filter(o=>!o.isSymbolicLink()).map(o=>FK(o.fullpath())).sort()}}}x();b();x();b();var Rd="asset bundle 103";var _d=[{uri:"hexasync://index",name:"index",title:"HexaSync Profile Template \u2014 knowledge base",description:"Use this knowledge base to choose a component, understand its actual authoring contract and adapt its supported examples.",mimeType:"text/markdown",text:`# HexaSync Profile Template \u2014 knowledge base
147
147
 
148
148
  > Addressable through MCP as **\`hexasync://index\`**.
149
149
 
@@ -1274,7 +1274,7 @@ A reused language or component has one canonical explanation. Follow the interna
1274
1274
  }
1275
1275
  `,assetPath:"assets/dependencies/dependency.json"},{uri:"hexasync://assets/docs/examples.json",name:"assets/docs/examples.json",title:"docs/examples.json",description:"Bundled data: docs/examples.json.",mimeType:"application/json",text:`{
1276
1276
  "$split": "This JSON is served in parts. Each {\\"$resource\\": uri} object stands for the JSON value read from that resource; each {\\"$parts\\": [...]} object stands for the array formed by concatenating the arrays read from its parts, in order.",
1277
- "bundle": 102,
1277
+ "bundle": 103,
1278
1278
  "connectorFacetNote": "These component snippets do not infer provider connector identity. Use their canonical component documents for connection assumptions.",
1279
1279
  "entries": {
1280
1280
  "$resource": "hexasync://assets/docs/examples.json/entries"
@@ -41859,7 +41859,7 @@ A reused language or component has one canonical explanation. Follow the interna
41859
41859
  }
41860
41860
  }
41861
41861
  }
41862
- `,assetPath:"assets/webhooks/WebhookTarget.json"},{uri:"hexasync://docs/AI-INDEX",name:"docs/AI-INDEX",title:"HexaSync Profile Template Knowledge Base",description:"Asset bundle 102 \xB7 extension 2611.8.1.",mimeType:"text/markdown",text:"<!-- GENERATED KNOWLEDGE INDEX \u2014 DO NOT EDIT. Run `yarn ai:index`. -->\n# HexaSync Profile Template Knowledge Base\n\n**Asset bundle 102 \xB7 extension 2611.8.1.**\n\n## Authoring boundaries\n\n- Worker Workflow steps and frontend creation/setup steps are different domains. Shared names do not make their payloads or execution interchangeable.\n- Use actual existing component and provider identities. Resolution and unresolved outcomes belong to each component contract.\n- Context roots depend on the workflow host and execution stage. A legal authoring root is not a promise that it exists at entry.\n- Examples explain inputs, prerequisites and expected effects.\n- This index is a retrieval map. Read the linked component page for defaults, precedence, variants and failure behavior.\n\n## Component pages\n\n| question | reference |\n| --- | --- |\n| root collections, identities and includes | [Profile root](hexasync://docs/PROFILE-ROOT) |\n| frontend creation/setup/authorization steps and connector definitions | [Frontend steps](hexasync://docs/PROFILE-ROOT/profile-root-fields-1/frontend-steps-creationsteps-setupsteps-authorizationsteps), [Connector definition](hexasync://docs/PROFILE-ROOT/profile-root-fields-1/connector-definition-document) |\n| Workflow selection, envelope, argument placement and flags | [Step envelope](hexasync://docs/steps/STEP-ENVELOPE) |\n| host/stage context, Scriban, JSONata and expression call sites | [Expressions and context](hexasync://docs/expressions/CONTEXT-AND-IO) |\n| next targets, branches, termination and loop guards | [Routing](hexasync://docs/routing/NEXT) |\n| response parsers and site-specific result handling | [Response filters](hexasync://docs/responseFilters/RESPONSE-FILTERS) |\n| Builder DSL versus API Filter DSL | [QueryDSL](hexasync://docs/query-dsl/QUERY-DSL) |\n| connection binding, options, auth and HTTP request builders | [Connections](hexasync://docs/connections/CONNECTIONS), [API](hexasync://docs/steps/API) |\n| self connector identity (`**SelfConnectorProviderId**`, `IS_SELF_CONNECTOR`) and why `CONN-1` names it | [The self connector](hexasync://docs/connections/CONNECTIONS/the-self-connector#its-identity-and-why-conn-1-names-it) |\n| pulling, pushing, ingress and startup hosts | [Pullers](hexasync://docs/pullers/PULLERS), [Pushers](hexasync://docs/pushers/PUSHERS), [Webhooks](hexasync://docs/webhooks/WEBHOOKS), [Startup](hexasync://docs/startupTasks/STARTUP-TASKS) |\n| creating/binding gateway webhooks, captured delivery payloads as samples, replay limits, hosted Gateway MCP sign-in | [Gateway MCP webhook workflow](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow) |\n| How do I decide incremental vs full pull for an entity, validate its watermark, resume and terminate safely, classify API failures, and reconcile deletions? | [Puller completeness contract](hexasync://docs/pullers/PULLERS/puller-completeness-contract), [Entity classification](hexasync://docs/pullers/PULLERS/entity-classification) |\n| endpoint filter/anchor/page-size facts, watermark boundary inclusivity, timezone and overlap, natural-key ordering and ties, request budget and 429 handling | [Earn endpoint request facts](hexasync://docs/pullers/PULLERS/puller-completeness-contract#earn-endpoint-request-facts), [Watermark boundary validation](hexasync://docs/pullers/PULLERS/puller-completeness-contract#watermark-boundary-validation), [Natural-key ordering and ties](hexasync://docs/pullers/PULLERS/puller-completeness-contract#natural-key-ordering-and-ties), [Request budget and throttling](hexasync://docs/pullers/PULLERS/puller-completeness-contract#request-budget-and-throttling) |\n| deletion reconciliation through a periodic full run, one schedule per job type, a second cadence through a trigger task, retries and job history | [Deletion reconciliation through a periodic full run](hexasync://docs/pullers/PULLERS/puller-completeness-contract#deletion-reconciliation-through-a-periodic-full-run), [One schedule per job type](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#one-schedule-per-job-type), [Periodic processing through a trigger task](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#periodic-processing-through-a-trigger-task), [Choosing pull and enqueue cadence](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#choosing-pull-and-enqueue-cadence) |\n| mapping API/event members to snake_case columns before saving, explicit destination bodies | [Explicit field mapping](hexasync://docs/steps/SAVE_TASK_DATA#explicit-field-mapping), [Explicit mapping for push](hexasync://docs/transformations/TRANSFORMATIONS/explicit-mapping-for-push) |\n| classifying HTTP status, thrown calls and invalid envelopes into one error code without one step per error class | [Classify once, raise once](hexasync://docs/steps/Error#classify-once-raise-once) |\n| several vendor accounts, credential scope per connection, shared provider quota | [One connection, one credential scope](hexasync://docs/connections/CONNECTIONS/one-connection-one-credential-scope) |\n| webhook signature, raw body, acknowledgement, multi-event deliveries, partial payloads, registration health | [Provider webhook authoring standards](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow#provider-webhook-authoring-standards), [Worked sample](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow#worked-sample-a-signed-credential-scope-delivery) |\n| immediate startup pull, scheduler setup and first-reconcile defaults | [Typed scheduler](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata), [Legacy scheduler initialization](hexasync://docs/startupTasks/STARTUP-TASKS/legacy-target-tasks#legacy-scheduler-initialization), [Dashboard versus execution](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#dashboard-presentation-versus-execution) |\n| task binding, dependency gates and physical storage | [Objects](hexasync://docs/objects/object), [Associations](hexasync://docs/objectAssociations/OBJECT-ASSOCIATIONS), [Dependencies](hexasync://docs/dependencies/DEPENDENCIES), [Tasks](hexasync://docs/tasks/TASKS-AND-TABLES), [Tables](hexasync://docs/tables/TABLES) |\n| transformation order, item context, abort/no-op and executor outcomes | [Transformation chain](hexasync://docs/transformations/TRANSFORMATIONS/transformation-chain-contract) |\n| stored SQL validity versus per-item diagnostics | [Validations](hexasync://docs/validations/VALIDATIONS) |\n| metric readers, handlers, scoring and reports | [Metrics](hexasync://docs/metrics/METRICS_REFERENCE), [Reports](hexasync://docs/reports/REPORTS) |\n| one worker executor and its alternatives | [Worker step index](hexasync://docs/steps/INDEX) |\n\n## Collections: root declaration shapes\n\n- `connectors` \u2014 array of connections/connection\n- `contributors` \u2014 array of contributor\n- `dependencies` \u2014 array of dependencies/dependency\n- `externals` \u2014 array of externals\n- `metricGroups` \u2014 array of metrics/metricGroup\n- `objectAssociations` \u2014 map of objectAssociations/objectAssociation\n- `objects` \u2014 array of objects/object\n- `pullers` \u2014 array of pullers/puller\n- `pushers` \u2014 array of pushers/pusher\n- `reports` \u2014 array of reports/report\n- `startupTasks` \u2014 array of startupTasks/startupTask\n- `tables` \u2014 array of tables/table\n- `transformations` \u2014 map of arrays of transformations/transformation\n- `validations` \u2014 map of arrays of validations/validation\n- `webhooks` \u2014 array of webhooks/Webhook\n\n## Worker executable authoring choices (42)\n`API`, `BASE64_TO_MIME_TYPE`, `CACHE`, `CHECK_FORMAT`, `DIRECT_INDEX`, `DOWNLOAD_CSV`, `ENQUEUER`, `EXCEL_READER`, `EXCEPTION`, `Error`, `FORWARD`, `GET_KEY_VALUE`, `IF`, `IGNORE_ITEM`, `INVALIDATE_CACHE`, `JSONata`, `LOOKUP_STEP`, `METRIC_QUERY`, `PUBLISH_EVENT`, `PULLER`, `PUSHER`, `QUERY_MANY`, `QUERY_METRICS`, `QUERY_SINGLE`, `REMOVE_DATA`, `RESET_ITEM`, `RESOLVE_RAW_DATA`, `SAVE_TASK_DATA`, `SEED_DATA`, `SET_KEY_VALUE`, `SLEEP`, `SQL`, `SQL_PROXY`, `SWITCH`, `Scriban`, `TRACK_FOR_REMOVAL`, `UPDATE_ITEM_STATUS`, `UPDATE_ITEM_SYNC_PROCESS`, `UPDATE_TASK_DATA_STATUS`, `VALUES`, `VERIFY_CACHED`, `WEBHOOK_FORWARD`\n\nRegistered but throwing (9): `Begin`, `Composite`, `End`, `GraphQL`, `Liquid`, `OData`, `QueryDSL`, `Restful`, `cURL`. Read their rejected forms and actual alternatives through the worker step index.\n\n## Frontend declaration vocabulary (19)\n`API`, `BROWSER`, `FORM`, `GATEWAY_API`, `GET_LOCAL_STORAGE`, `HEALTH_CHECK_WORKER`, `IF`, `INTEGRATION_APP_MANAGEMENT`, `JSONATA`, `LIQUID`, `MULTIPLE_CHOICE_FORM`, `READ_QUERIES`, `REDIRECT`, `SELECT_GOOGLE_DRIVE`, `SET_LOCAL_STORAGE`, `SHOW_INFO`, `SINGLE_CHOICE_FORM`, `SWITCH`, `WAIT`\n\n## Transformation authoring vocabulary (12)\n`BulkClone`, `BulkRename`, `Clone`, `Jsonata`, `Nested_SQL`, `None`, `QUERY_MANY`, `QUERY_SINGLE`, `RESOLVE_RAW_DATA`, `Rename`, `SQL`, `Scriban`\n`None` is [disabled](hexasync://docs/transformations/TRANSFORMATIONS/none--disabled-versus-absent-discriminator). `RenameDependency` is [declared but unimplemented](hexasync://docs/transformations/TRANSFORMATIONS/renamedependency--declared-but-unimplemented) and is not an accepted authoring discriminator.\n\n## Supported validation vocabulary (23)\n`BETWEEN`, `CONTAIN`, `END_WITH`, `EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `IN`, `IS_EMPTY`, `IS_NULL`, `LENGTH`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `MAX_LENGTH`, `MIN_LENGTH`, `NOT_CONTAIN`, `NOT_EMPTY`, `NOT_END_WITH`, `NOT_EQUAL`, `NOT_IN`, `NOT_NULL`, `NOT_START_WITH`, `REGEX`, `START_WITH`\nDeclaration-only members and datetime deployment prerequisites are explained on the validations page.\n\n## Builder DSL operators (35)\n`!=`, `<`, `<=`, `<>`, `=`, `>`, `>=`, `AND`, `BETWEEN`, `CONTAINS`, `ENDS_WITH`, `HAS_ALL_BITS`, `HAS_BITS`, `IN`, `ISNIL`, `ISNULL`, `IS_NIL`, `IS_NOT_NULL`, `IS_NULL`, `NIL`, `NNIL`, `NNULL`, `NOT_CONTAINS`, `NOT_ENDS_WITH`, `NOT_HAS_ALL_BITS`, `NOT_HAS_BITS`, `NOT_IN`, `NOT_NULL`, `NOT_REGEX`, `NOT_STARTS_WITH`, `NULL`, `OR`, `REGEX`, `STARTS_WITH`, `^LAST_[+-]?[0-9]+_[A-Za-z]+$`\n\n## Builder DSL operand kinds (5)\n`ARG`, `FIELD`, `PARAM`, `QUERY`, `VALUE`\nAPI Filter DSL has its own predicate vocabulary, request envelope and bit-mask semantics; do not substitute Builder syntax.\n\n## Editor/CLI diagnostic rule IDs (64)\n`API-1`, `API-2`, `ARG-1`, `ARG-2`, `ARG-3`, `ARG-4`, `ARG-5`, `ARG-6`, `ARG-7`, `COL-1`, `CONN-0`, `CONN-1`, `CONN-2`, `CONN-3`, `CONN-4`, `CONN-5`, `CTX-1`, `CTX-2`, `CTX-3`, `DEP-1`, `DRIFT-1`, `DUP-1`, `DUP-3`, `DUP-4`, `DUP-5`, `FLOW-3`, `FLOW-4`, `FLOW-5`, `FLOW-6`, `FLOW-7`, `FLOW-8`, `MDI-1`, `OVW-1`, `PLK-1`, `PLK-2`, `QDSL-1`, `REF-1`, `REF-13`, `REF-15`, `REF-16`, `REF-2`, `REF-3`, `REF-5`, `REF-6`, `REF-7`, `REF-9`, `REF-K1`, `REF-K2`, `RET-1`, `STEP-1`, `STEP-2`, `STEP-3`, `TBL-1`, `TBL-2`, `TBL-3`, `TBL-4`, `TBL-5`, `TBL-6`, `TBL-7`, `UNIMP-1`, `VAR-1`, `VAR-2`, `VAR-3`, `VAR-4`\nUse `hexasync_explain_rule` for diagnostic meaning and consequences.\n\n## Catalog systems with connector codes (16)\n- KiotViet \u2014 `kiotviet`\n- Lazada \u2014 `lazada`\n- Lightspeed X Series \u2014 `lightspeed-x-series`\n- Misa AMIS RPA \u2014 `misa-amis-frontend`\n- Misa AMIS \u2014 `misa-amis`\n- Sapo Omni V3 \u2014 `sapo-omni-v3`\n- Shopee \u2014 `shopee`\n- Shopify Custom App \u2014 `shopify-custom-app`\n- Shopify \u2014 `shopify-public-app`\n- Shopline Private App \u2014 `shopline-private-app`\n- Shopline \u2014 `shopline`\n- TikTok Shop (Gateway V3) \u2014 `tiktokshop`\n- TikTok Shop \u2014 `tiktokshop`\n- WooCommerce \u2014 `woocommerce`\n- Xero \u2014 `v2/xero`\n- Zalo \u2014 `zalo`\n\n## Catalog systems without a supported connector code (8)\n- Anchanto OMS (SelluSeller)\n- Brightpearl\n- Lightspeed X Series (Gateway V2)\n- MeInvoice\n- Packhai OMS\n- Wix\n- Zendesk\n- Zoho Desk\nCatalog presence does not create an executable connector or an authentication scheme.\n\n## Actual MCP retrieval\n\n- `resources/list` and `resources/read` expose the component pages and shipped schema data without a private source checkout.\n- `hexasync_explain_type` reads [step inputs](hexasync://assets/steps/inputs.json) and [step results](hexasync://assets/steps/outputs.json); read the component page for conditional output branches.\n- `hexasync_explain_position` describes the static authoring position; use the context page for host/stage availability.\n- `hexasync_search_examples` reads [1275 authored YAML examples](hexasync://assets/docs/examples.json), including their surrounding explanation and component page. Fragments are not necessarily complete profiles or successful-input examples. Connector identity is not guessed.\n- `hexasync_list_connectors` reads the [connector catalog](hexasync://assets/connectors/catalog.json); use existing workspace identities rather than inventing IDs.\n- This server never calls the gateway. Webhook resources, captured deliveries and replay are tools of the separately signed-in hosted Gateway MCP; read the [Gateway MCP webhook workflow](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow) before asking the user.\n- [Root schema](hexasync://assets/main.json) reaches component item contracts. The [full knowledge index](hexasync://index) is the navigation entry.\n"},{uri:"hexasync://docs/connections/CONNECTIONS",name:"docs/connections/CONNECTIONS",title:"Connections and connectors",description:"Syntax. A profile declares connections as a list under connectors: (the legacy spelling connections: is still read):",mimeType:"text/markdown",text:`# Connections and connectors
41862
+ `,assetPath:"assets/webhooks/WebhookTarget.json"},{uri:"hexasync://docs/AI-INDEX",name:"docs/AI-INDEX",title:"HexaSync Profile Template Knowledge Base",description:"Asset bundle 103 \xB7 extension 2611.8.2.",mimeType:"text/markdown",text:"<!-- GENERATED KNOWLEDGE INDEX \u2014 DO NOT EDIT. Run `yarn ai:index`. -->\n# HexaSync Profile Template Knowledge Base\n\n**Asset bundle 103 \xB7 extension 2611.8.2.**\n\n## Authoring boundaries\n\n- Worker Workflow steps and frontend creation/setup steps are different domains. Shared names do not make their payloads or execution interchangeable.\n- Use actual existing component and provider identities. Resolution and unresolved outcomes belong to each component contract.\n- Context roots depend on the workflow host and execution stage. A legal authoring root is not a promise that it exists at entry.\n- Examples explain inputs, prerequisites and expected effects.\n- This index is a retrieval map. Read the linked component page for defaults, precedence, variants and failure behavior.\n\n## Component pages\n\n| question | reference |\n| --- | --- |\n| root collections, identities and includes | [Profile root](hexasync://docs/PROFILE-ROOT) |\n| frontend creation/setup/authorization steps and connector definitions | [Frontend steps](hexasync://docs/PROFILE-ROOT/profile-root-fields-1/frontend-steps-creationsteps-setupsteps-authorizationsteps), [Connector definition](hexasync://docs/PROFILE-ROOT/profile-root-fields-1/connector-definition-document) |\n| Workflow selection, envelope, argument placement and flags | [Step envelope](hexasync://docs/steps/STEP-ENVELOPE) |\n| host/stage context, Scriban, JSONata and expression call sites | [Expressions and context](hexasync://docs/expressions/CONTEXT-AND-IO) |\n| next targets, branches, termination and loop guards | [Routing](hexasync://docs/routing/NEXT) |\n| response parsers and site-specific result handling | [Response filters](hexasync://docs/responseFilters/RESPONSE-FILTERS) |\n| Builder DSL versus API Filter DSL | [QueryDSL](hexasync://docs/query-dsl/QUERY-DSL) |\n| connection binding, options, auth and HTTP request builders | [Connections](hexasync://docs/connections/CONNECTIONS), [API](hexasync://docs/steps/API) |\n| self connector identity (`**SelfConnectorProviderId**`, `IS_SELF_CONNECTOR`) and why `CONN-1` names it | [The self connector](hexasync://docs/connections/CONNECTIONS/the-self-connector#its-identity-and-why-conn-1-names-it) |\n| pulling, pushing, ingress and startup hosts | [Pullers](hexasync://docs/pullers/PULLERS), [Pushers](hexasync://docs/pushers/PUSHERS), [Webhooks](hexasync://docs/webhooks/WEBHOOKS), [Startup](hexasync://docs/startupTasks/STARTUP-TASKS) |\n| creating/binding gateway webhooks, captured delivery payloads as samples, replay limits, hosted Gateway MCP sign-in | [Gateway MCP webhook workflow](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow) |\n| How do I decide incremental vs full pull for an entity, validate its watermark, resume and terminate safely, classify API failures, and reconcile deletions? | [Puller completeness contract](hexasync://docs/pullers/PULLERS/puller-completeness-contract), [Entity classification](hexasync://docs/pullers/PULLERS/entity-classification) |\n| endpoint filter/anchor/page-size facts, watermark boundary inclusivity, timezone and overlap, natural-key ordering and ties, request budget and 429 handling | [Earn endpoint request facts](hexasync://docs/pullers/PULLERS/puller-completeness-contract#earn-endpoint-request-facts), [Watermark boundary validation](hexasync://docs/pullers/PULLERS/puller-completeness-contract#watermark-boundary-validation), [Natural-key ordering and ties](hexasync://docs/pullers/PULLERS/puller-completeness-contract#natural-key-ordering-and-ties), [Request budget and throttling](hexasync://docs/pullers/PULLERS/puller-completeness-contract#request-budget-and-throttling) |\n| deletion reconciliation through a periodic full run, one schedule per job type, a second cadence through a trigger task, retries and job history | [Deletion reconciliation through a periodic full run](hexasync://docs/pullers/PULLERS/puller-completeness-contract#deletion-reconciliation-through-a-periodic-full-run), [One schedule per job type](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#one-schedule-per-job-type), [Periodic processing through a trigger task](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#periodic-processing-through-a-trigger-task), [Choosing pull and enqueue cadence](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#choosing-pull-and-enqueue-cadence) |\n| mapping API/event members to snake_case columns before saving, explicit destination bodies | [Explicit field mapping](hexasync://docs/steps/SAVE_TASK_DATA#explicit-field-mapping), [Explicit mapping for push](hexasync://docs/transformations/TRANSFORMATIONS/explicit-mapping-for-push) |\n| classifying HTTP status, thrown calls and invalid envelopes into one error code without one step per error class | [Classify once, raise once](hexasync://docs/steps/Error#classify-once-raise-once) |\n| several vendor accounts, credential scope per connection, shared provider quota | [One connection, one credential scope](hexasync://docs/connections/CONNECTIONS/one-connection-one-credential-scope) |\n| webhook signature, raw body, acknowledgement, multi-event deliveries, partial payloads, registration health | [Provider webhook authoring standards](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow#provider-webhook-authoring-standards), [Worked sample](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow#worked-sample-a-signed-credential-scope-delivery) |\n| immediate startup pull, scheduler setup and first-reconcile defaults | [Typed scheduler](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata), [Legacy scheduler initialization](hexasync://docs/startupTasks/STARTUP-TASKS/legacy-target-tasks#legacy-scheduler-initialization), [Dashboard versus execution](hexasync://docs/startupTasks/STARTUP-TASKS/scheduler-metadata#dashboard-presentation-versus-execution) |\n| task binding, dependency gates and physical storage | [Objects](hexasync://docs/objects/object), [Associations](hexasync://docs/objectAssociations/OBJECT-ASSOCIATIONS), [Dependencies](hexasync://docs/dependencies/DEPENDENCIES), [Tasks](hexasync://docs/tasks/TASKS-AND-TABLES), [Tables](hexasync://docs/tables/TABLES) |\n| transformation order, item context, abort/no-op and executor outcomes | [Transformation chain](hexasync://docs/transformations/TRANSFORMATIONS/transformation-chain-contract) |\n| stored SQL validity versus per-item diagnostics | [Validations](hexasync://docs/validations/VALIDATIONS) |\n| metric readers, handlers, scoring and reports | [Metrics](hexasync://docs/metrics/METRICS_REFERENCE), [Reports](hexasync://docs/reports/REPORTS) |\n| one worker executor and its alternatives | [Worker step index](hexasync://docs/steps/INDEX) |\n\n## Collections: root declaration shapes\n\n- `connectors` \u2014 array of connections/connection\n- `contributors` \u2014 array of contributor\n- `dependencies` \u2014 array of dependencies/dependency\n- `externals` \u2014 array of externals\n- `metricGroups` \u2014 array of metrics/metricGroup\n- `objectAssociations` \u2014 map of objectAssociations/objectAssociation\n- `objects` \u2014 array of objects/object\n- `pullers` \u2014 array of pullers/puller\n- `pushers` \u2014 array of pushers/pusher\n- `reports` \u2014 array of reports/report\n- `startupTasks` \u2014 array of startupTasks/startupTask\n- `tables` \u2014 array of tables/table\n- `transformations` \u2014 map of arrays of transformations/transformation\n- `validations` \u2014 map of arrays of validations/validation\n- `webhooks` \u2014 array of webhooks/Webhook\n\n## Worker executable authoring choices (42)\n`API`, `BASE64_TO_MIME_TYPE`, `CACHE`, `CHECK_FORMAT`, `DIRECT_INDEX`, `DOWNLOAD_CSV`, `ENQUEUER`, `EXCEL_READER`, `EXCEPTION`, `Error`, `FORWARD`, `GET_KEY_VALUE`, `IF`, `IGNORE_ITEM`, `INVALIDATE_CACHE`, `JSONata`, `LOOKUP_STEP`, `METRIC_QUERY`, `PUBLISH_EVENT`, `PULLER`, `PUSHER`, `QUERY_MANY`, `QUERY_METRICS`, `QUERY_SINGLE`, `REMOVE_DATA`, `RESET_ITEM`, `RESOLVE_RAW_DATA`, `SAVE_TASK_DATA`, `SEED_DATA`, `SET_KEY_VALUE`, `SLEEP`, `SQL`, `SQL_PROXY`, `SWITCH`, `Scriban`, `TRACK_FOR_REMOVAL`, `UPDATE_ITEM_STATUS`, `UPDATE_ITEM_SYNC_PROCESS`, `UPDATE_TASK_DATA_STATUS`, `VALUES`, `VERIFY_CACHED`, `WEBHOOK_FORWARD`\n\nRegistered but throwing (9): `Begin`, `Composite`, `End`, `GraphQL`, `Liquid`, `OData`, `QueryDSL`, `Restful`, `cURL`. Read their rejected forms and actual alternatives through the worker step index.\n\n## Frontend declaration vocabulary (19)\n`API`, `BROWSER`, `FORM`, `GATEWAY_API`, `GET_LOCAL_STORAGE`, `HEALTH_CHECK_WORKER`, `IF`, `INTEGRATION_APP_MANAGEMENT`, `JSONATA`, `LIQUID`, `MULTIPLE_CHOICE_FORM`, `READ_QUERIES`, `REDIRECT`, `SELECT_GOOGLE_DRIVE`, `SET_LOCAL_STORAGE`, `SHOW_INFO`, `SINGLE_CHOICE_FORM`, `SWITCH`, `WAIT`\n\n## Transformation authoring vocabulary (12)\n`BulkClone`, `BulkRename`, `Clone`, `Jsonata`, `Nested_SQL`, `None`, `QUERY_MANY`, `QUERY_SINGLE`, `RESOLVE_RAW_DATA`, `Rename`, `SQL`, `Scriban`\n`None` is [disabled](hexasync://docs/transformations/TRANSFORMATIONS/none--disabled-versus-absent-discriminator). `RenameDependency` is [declared but unimplemented](hexasync://docs/transformations/TRANSFORMATIONS/renamedependency--declared-but-unimplemented) and is not an accepted authoring discriminator.\n\n## Supported validation vocabulary (23)\n`BETWEEN`, `CONTAIN`, `END_WITH`, `EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `IN`, `IS_EMPTY`, `IS_NULL`, `LENGTH`, `LESS_THAN`, `LESS_THAN_OR_EQUAL`, `MAX_LENGTH`, `MIN_LENGTH`, `NOT_CONTAIN`, `NOT_EMPTY`, `NOT_END_WITH`, `NOT_EQUAL`, `NOT_IN`, `NOT_NULL`, `NOT_START_WITH`, `REGEX`, `START_WITH`\nDeclaration-only members and datetime deployment prerequisites are explained on the validations page.\n\n## Builder DSL operators (35)\n`!=`, `<`, `<=`, `<>`, `=`, `>`, `>=`, `AND`, `BETWEEN`, `CONTAINS`, `ENDS_WITH`, `HAS_ALL_BITS`, `HAS_BITS`, `IN`, `ISNIL`, `ISNULL`, `IS_NIL`, `IS_NOT_NULL`, `IS_NULL`, `NIL`, `NNIL`, `NNULL`, `NOT_CONTAINS`, `NOT_ENDS_WITH`, `NOT_HAS_ALL_BITS`, `NOT_HAS_BITS`, `NOT_IN`, `NOT_NULL`, `NOT_REGEX`, `NOT_STARTS_WITH`, `NULL`, `OR`, `REGEX`, `STARTS_WITH`, `^LAST_[+-]?[0-9]+_[A-Za-z]+$`\n\n## Builder DSL operand kinds (5)\n`ARG`, `FIELD`, `PARAM`, `QUERY`, `VALUE`\nAPI Filter DSL has its own predicate vocabulary, request envelope and bit-mask semantics; do not substitute Builder syntax.\n\n## Editor/CLI diagnostic rule IDs (64)\n`API-1`, `API-2`, `ARG-1`, `ARG-2`, `ARG-3`, `ARG-4`, `ARG-5`, `ARG-6`, `ARG-7`, `COL-1`, `CONN-0`, `CONN-1`, `CONN-2`, `CONN-3`, `CONN-4`, `CONN-5`, `CTX-1`, `CTX-2`, `CTX-3`, `DEP-1`, `DRIFT-1`, `DUP-1`, `DUP-3`, `DUP-4`, `DUP-5`, `FLOW-3`, `FLOW-4`, `FLOW-5`, `FLOW-6`, `FLOW-7`, `FLOW-8`, `MDI-1`, `OVW-1`, `PLK-1`, `PLK-2`, `QDSL-1`, `REF-1`, `REF-13`, `REF-15`, `REF-16`, `REF-2`, `REF-3`, `REF-5`, `REF-6`, `REF-7`, `REF-9`, `REF-K1`, `REF-K2`, `RET-1`, `STEP-1`, `STEP-2`, `STEP-3`, `TBL-1`, `TBL-2`, `TBL-3`, `TBL-4`, `TBL-5`, `TBL-6`, `TBL-7`, `UNIMP-1`, `VAR-1`, `VAR-2`, `VAR-3`, `VAR-4`\nUse `hexasync_explain_rule` for diagnostic meaning and consequences.\n\n## Catalog systems with connector codes (16)\n- KiotViet \u2014 `kiotviet`\n- Lazada \u2014 `lazada`\n- Lightspeed X Series \u2014 `lightspeed-x-series`\n- Misa AMIS RPA \u2014 `misa-amis-frontend`\n- Misa AMIS \u2014 `misa-amis`\n- Sapo Omni V3 \u2014 `sapo-omni-v3`\n- Shopee \u2014 `shopee`\n- Shopify Custom App \u2014 `shopify-custom-app`\n- Shopify \u2014 `shopify-public-app`\n- Shopline Private App \u2014 `shopline-private-app`\n- Shopline \u2014 `shopline`\n- TikTok Shop (Gateway V3) \u2014 `tiktokshop`\n- TikTok Shop \u2014 `tiktokshop`\n- WooCommerce \u2014 `woocommerce`\n- Xero \u2014 `v2/xero`\n- Zalo \u2014 `zalo`\n\n## Catalog systems without a supported connector code (8)\n- Anchanto OMS (SelluSeller)\n- Brightpearl\n- Lightspeed X Series (Gateway V2)\n- MeInvoice\n- Packhai OMS\n- Wix\n- Zendesk\n- Zoho Desk\nCatalog presence does not create an executable connector or an authentication scheme.\n\n## Actual MCP retrieval\n\n- `resources/list` and `resources/read` expose the component pages and shipped schema data without a private source checkout.\n- `hexasync_explain_type` reads [step inputs](hexasync://assets/steps/inputs.json) and [step results](hexasync://assets/steps/outputs.json); read the component page for conditional output branches.\n- `hexasync_explain_position` describes the static authoring position; use the context page for host/stage availability.\n- `hexasync_search_examples` reads [1275 authored YAML examples](hexasync://assets/docs/examples.json), including their surrounding explanation and component page. Fragments are not necessarily complete profiles or successful-input examples. Connector identity is not guessed.\n- `hexasync_list_connectors` reads the [connector catalog](hexasync://assets/connectors/catalog.json); use existing workspace identities rather than inventing IDs.\n- This server never calls the gateway. Webhook resources, captured deliveries and replay are tools of the separately signed-in hosted Gateway MCP; read the [Gateway MCP webhook workflow](hexasync://docs/webhooks/WEBHOOKS/gateway-mcp-webhook-workflow) before asking the user.\n- [Root schema](hexasync://assets/main.json) reaches component item contracts. The [full knowledge index](hexasync://index) is the navigation entry.\n"},{uri:"hexasync://docs/connections/CONNECTIONS",name:"docs/connections/CONNECTIONS",title:"Connections and connectors",description:"Syntax. A profile declares connections as a list under connectors: (the legacy spelling connections: is still read):",mimeType:"text/markdown",text:`# Connections and connectors
41863
41863
 
41864
41864
  > Addressable through the MCP as **\`hexasync://docs/connections/CONNECTIONS\`**.
41865
41865
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beehexa/hexasync-template-ide-mcp",
3
- "version": "2611.8.1",
3
+ "version": "2611.8.2",
4
4
  "description": "HexaSync Template IDE MCP server: HexaSync profile template knowledge, examples and validation for any MCP client over stdio. Run with npx -y @beehexa/hexasync-template-ide-mcp@latest.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -54,13 +54,13 @@
54
54
  "build": "node build.mjs"
55
55
  },
56
56
  "devDependencies": {
57
- "@beehexa/hexasync-template-agent-core": "2611.8.1",
58
- "@beehexa/hexasync-template-compose": "2611.8.1",
59
- "@beehexa/hexasync-template-index": "2611.8.1",
60
- "@beehexa/hexasync-template-io-node": "2611.8.1",
61
- "@beehexa/hexasync-template-model": "2611.8.1",
62
- "@beehexa/hexasync-template-ports": "2611.8.1",
63
- "@beehexa/hexasync-template-validate": "2611.8.1",
57
+ "@beehexa/hexasync-template-agent-core": "2611.8.2",
58
+ "@beehexa/hexasync-template-compose": "2611.8.2",
59
+ "@beehexa/hexasync-template-index": "2611.8.2",
60
+ "@beehexa/hexasync-template-io-node": "2611.8.2",
61
+ "@beehexa/hexasync-template-model": "2611.8.2",
62
+ "@beehexa/hexasync-template-ports": "2611.8.2",
63
+ "@beehexa/hexasync-template-validate": "2611.8.2",
64
64
  "@modelcontextprotocol/server": "2.3.0",
65
65
  "esbuild": "0.28.1",
66
66
  "typescript": "7.0.2",