@xopcai/xopc 0.0.329 → 0.0.330
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-Bs1qnnhD.js → agent-avatar-dicebear-BDG0hI-J.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-ArM6Sm9S.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-BX_Bhre1.js +1 -0
- package/dist/gateway/static/root/assets/agents-BiQqpMw0.js +70 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BrIji9B5.js → app-management-settings-panel-DgttzUCG.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-Uts-MQ7K.js → appearance-settings-CHpyWV8Z.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-BhfYQcm8.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-_EzRfBuI.js → archive-plugin-B7Q7Oeo7.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CHg7_XFl.js → attachment-load-BYwqQ8qN.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CGMErk_w.js → automations-page-CsvAtTNd.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DMH_1Ped.js +7 -0
- package/dist/gateway/static/root/assets/{binary-plugins-D3WB-tVn.js → binary-plugins-DdgWCI-M.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Cm1W-14I.js → block-editor-DyOagNnn.js} +53 -53
- package/dist/gateway/static/root/assets/{browser-automation-inputs-VnvK-GQP.js → browser-automation-inputs-CwF8OQFN.js} +1 -1
- package/dist/gateway/static/root/assets/browser-automations-page-D_EQjiiu.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-BE6691Jz.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-page-MweWNrC1.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CdSWkh89.js +8 -0
- package/dist/gateway/static/root/assets/{capability-header-actions-C3chJDQu.js → capability-header-actions-C5F2GNE9.js} +1 -1
- package/dist/gateway/static/root/assets/channels-NGfwR3He.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-ClbmjCL2.js → chat-terminal-dock-C6tl9Rfw.js} +2 -2
- package/dist/gateway/static/root/assets/{computer-settings-page-BfZaf516.js → computer-settings-page-C0MsVw4l.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-F-fYNIx8.js → connector-service-page-DsF60pPs.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-BE8NdQcR.js +2 -0
- package/dist/gateway/static/root/assets/date-picker-CELKKqYN.js +1 -0
- package/dist/gateway/static/root/assets/{dependency-picker-B_z3zihW.js → dependency-picker-BcEwCnI5.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-C1TZzKS3.js → desktop-pet-Ww7Gm8-x.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-D-dbAxGu.js +1 -0
- package/dist/gateway/static/root/assets/device-pairing-wizard-DsYY6szg.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-BfxaNwMB.js → directory-picker-path-field-CVmuCRyO.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-Bs8_FYCm.js → extension-debug-page-UUHNJj-d.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DH5vFbBw.js → extension-page-BvL452mX.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-hGKovxxC.js → extension-settings-page-CrNnUSOs.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-BYMrbKZE.js → gateway-config-swr-DMm1vU51.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-DrHhtZqv.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DMqYXHAn.js → gateway-startup-retry-Ck6tj6yE.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-YgI6jfGA.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-D1sQGaJz.js → image-generation-api-BOh6j0BF.js} +1 -1
- package/dist/gateway/static/root/assets/imports-page-BuqdzA7h.js +1 -0
- package/dist/gateway/static/root/assets/index-DJmO2VAY.css +1 -0
- package/dist/gateway/static/root/assets/index-vCIBfJp7.js +121 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CMitbles.js → keyboard-shortcuts-settings-D9L7IdUg.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DO8uUtos.js +1 -0
- package/dist/gateway/static/root/assets/local-apps-page-BEvyufm7.js +1 -0
- package/dist/gateway/static/root/assets/locale-store-DAOwT3Zp.js +1 -0
- package/dist/gateway/static/root/assets/logs-page-Jev1m9sS.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-41i7B1RO.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-DXubGEic.js → markdown-view-nL4xzvI8.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DLJrmU9J.js → media-plugins-dHbcqMan.js} +1 -1
- package/dist/gateway/static/root/assets/{messages-D0G_sZvA.js → messages-BZbt9x1y.js} +3 -3
- package/dist/gateway/static/root/assets/note-detail-panel-DonP0E6Q.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-CYHMeVKo.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-C3JiQEKD.js → page-context-capture-button-BKsMcPOy.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-buk_gdip.js → preview-open-alternatives-Du18QgWc.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-DwEEO0Ak.js → product-open-page-IY1QL6s0.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-Bpw9mxfV.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-BdYbDNUn.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-tx8XCHOs.js → registry-api-DCFXWBOt.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CLhbz3TF.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-De7HmmBu.js → runtime-tools-settings-panel-CuTFmXyj.js} +2 -2
- package/dist/gateway/static/root/assets/scenes-page-XwK2IEmr.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-DPMEuj5D.js → schema-form-qWQii8IU.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-4-QoiDES.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BggQVM1y.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-DM0D-BQ_.js → settings-form-section-B0ZBr0L9.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-CWS9yOH3.js → settings-page-DpII4NO3.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-HPpC7EE0.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-CcRi2yGy.js → share-preview-page-B2CGYZHc.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-DhVCRYGP.js +1 -0
- package/dist/gateway/static/root/assets/skill-api-_ddww47C.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-XPZkWJJe.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-uF7DkJMC.js +2 -0
- package/dist/gateway/static/root/assets/system-settings-panel-25ABVt7H.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-gepxhO4j.js +1 -0
- package/dist/gateway/static/root/assets/tunnel-api-CwQGBI_4.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-ZTHe1zCM.js → use-autosave-CL3wytbs.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-DldQW9Wh.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-C8Kpkct-.js → voice-api-key-field-zjAzQrx4.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-BvzxINUk.js → voice-config-api-DvzQ-128.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-ClB6T-dm.js → work-discovery-overlay-MaPPjWwl.js} +1 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-C3dQN1fE.js +3 -0
- package/dist/gateway/static/root/assets/workflows-page-B9lnTU3U.js +6 -0
- package/dist/gateway/static/root/index.html +8 -14
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +19 -4
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -1
- package/dist/src/agent/capabilities/definitions.d.ts +3 -2
- package/dist/src/agent/capabilities/definitions.js +3 -2
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/orchestration/llm-turn-retry.js +2 -15
- package/dist/src/agent/service.d.ts +1 -0
- package/dist/src/agent/service.js +5 -2
- package/dist/src/agent/tasks/task-judge-service.js +1 -1
- package/dist/src/agent/tools/factory.js +3 -2
- package/dist/src/agent/tools/index.d.ts +1 -0
- package/dist/src/agent/tools/index.js +2 -1
- package/dist/src/agent/tools/workflow-manage-tool.d.ts +2 -0
- package/dist/src/agent/tools/workflow-manage-tool.js +225 -0
- package/dist/src/agent/tools/xopc-use-tool.js +1 -1
- package/dist/src/agent-catalog/capabilities.js +2 -2
- package/dist/src/auth/credentials.js +1 -1
- package/dist/src/auth/oauth-provider-lock.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/automations/capabilities/drafts.js +1 -1
- package/dist/src/automations/draft/automation-draft-service.js +13 -4
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/chat-previews/service.js +1 -2
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +2 -2
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/config/index.js +4 -4
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.js +1 -1
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/extensions/bundled-extension-activation.d.ts +3 -1
- package/dist/src/extensions/bundled-extension-activation.js +5 -8
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/gateway-workflow-host.types.d.ts +1 -0
- package/dist/src/gateway/hono/lib/config-payload.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +27 -5
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +1 -1
- package/dist/src/gateway/hono/routes/workflows.js +1 -23
- package/dist/src/gateway/image-generation-setup.js +2 -2
- package/dist/src/gateway/lock.js +1 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +4 -4
- package/dist/src/gateway/service/config-coordinator.js +6 -6
- package/dist/src/gateway/service/marketplace-service.js +8 -6
- package/dist/src/gateway/service.d.ts +1 -1
- package/dist/src/gateway/service.js +14 -14
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- package/dist/src/home-intelligence/generator.js +7 -6
- package/dist/src/home-intelligence/host.js +1 -1
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/model-response.d.ts +2 -0
- package/dist/src/providers/model-response.js +24 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tui/backends/embedded-backend.js +6 -3
- package/dist/src/tui/tui-commands.js +2 -2
- package/dist/src/tui/tui-startup-resources.js +1 -1
- package/dist/src/tui/tui.js +3 -3
- package/dist/src/voice/platform-streams.js +15 -7
- package/dist/src/voice/realtime/agentEngine.js +19 -3
- package/dist/src/voice/realtime/pcmFrameBuffer.js +2 -1
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/dist/src/voice/realtime/playback-echo.js +16 -1
- package/dist/src/workflows/authoring/index.d.ts +1 -0
- package/dist/src/workflows/authoring/index.js +2 -1
- package/dist/src/workflows/authoring/workflow-draft-defaults.d.ts +3 -0
- package/dist/src/workflows/authoring/workflow-draft-defaults.js +63 -0
- package/dist/src/workflows/domain/index.js +1 -1
- package/dist/src/workflows/engine/workflow-engine.js +1 -1
- package/dist/src/workflows/index.js +2 -2
- package/dist/src/workflows/service/workflow-run-service.d.ts +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +34 -11
- package/dist/src/workflows/service/workflow-session-bridge.js +2 -2
- package/package.json +4 -4
- package/skills/engineering/workflow-authoring/SKILL.md +32 -0
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DHJyAT7t.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-DLKj_iIh.js +0 -1
- package/dist/gateway/static/root/assets/agents-SXZ5O0g4.js +0 -70
- package/dist/gateway/static/root/assets/apps-page-DcclVdxW.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-Cc4yqiF6.js +0 -7
- package/dist/gateway/static/root/assets/box-DvYoGszj.js +0 -1
- package/dist/gateway/static/root/assets/braces-Cfmtagno.js +0 -1
- package/dist/gateway/static/root/assets/browser-automations-page-CZYCvSSU.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-DDz9PE6m.js +0 -3
- package/dist/gateway/static/root/assets/calendar-clock-D-quYVPe.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-DH3aDk53.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-C8jMZAJl.js +0 -8
- package/dist/gateway/static/root/assets/capability-discover-page-CgGvsf3t.js +0 -1
- package/dist/gateway/static/root/assets/channels-CuVS_KsY.js +0 -1
- package/dist/gateway/static/root/assets/chevron-left-DqFhpbvK.js +0 -1
- package/dist/gateway/static/root/assets/clock-3-DnrAnuyZ.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-B4SLpvSL.js +0 -2
- package/dist/gateway/static/root/assets/date-picker-DXQTsUJn.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-B5JGIfqn.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-DFYK_Ywf.js +0 -1
- package/dist/gateway/static/root/assets/extension-marketplace-api-DqV4YRYs.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-BIsiP-JI.js +0 -1
- package/dist/gateway/static/root/assets/gauge-C78eD2BA.js +0 -1
- package/dist/gateway/static/root/assets/git-branch-Dh9uxTot.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CoBivEvx.js +0 -1
- package/dist/gateway/static/root/assets/image-Cwyalflz.js +0 -1
- package/dist/gateway/static/root/assets/imports-page-rssb4rjP.js +0 -1
- package/dist/gateway/static/root/assets/inbox-DNoSz682.js +0 -1
- package/dist/gateway/static/root/assets/index-C4QN4gCi.css +0 -1
- package/dist/gateway/static/root/assets/index-Cr4SINLG.js +0 -121
- package/dist/gateway/static/root/assets/is-masked-secret-DOkL5b_X.js +0 -1
- package/dist/gateway/static/root/assets/layout-grid-CEVZdVFU.js +0 -1
- package/dist/gateway/static/root/assets/list-BBGUdmkF.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-Di82Oacm.js +0 -1
- package/dist/gateway/static/root/assets/local-apps-page-CCvA9d9L.js +0 -1
- package/dist/gateway/static/root/assets/locale-store-BSkKhYkc.js +0 -1
- package/dist/gateway/static/root/assets/lock-keyhole-DEK5kH0u.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-BK8ol1q0.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-CebXkEtB.js +0 -1
- package/dist/gateway/static/root/assets/message-circle-Badhj-4D.js +0 -1
- package/dist/gateway/static/root/assets/message-square-fVE7Ghj1.js +0 -1
- package/dist/gateway/static/root/assets/models-hub-cache-B0EUPwTv.js +0 -1
- package/dist/gateway/static/root/assets/network-BUQLY1BV.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-xsKDIJdK.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-BFm7XnWH.js +0 -8
- package/dist/gateway/static/root/assets/paperclip-f1HujQY1.js +0 -1
- package/dist/gateway/static/root/assets/power-ZI-pBczI.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-CRQGCRSU.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-DcqylysA.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-Cq5MaiRW.js +0 -1
- package/dist/gateway/static/root/assets/scenes-page-GXJ-b3dO.js +0 -2
- package/dist/gateway/static/root/assets/server-BlHCBjiE.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-C6FwYIRA.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BEyQiZs0.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BhGKiTPf.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DNmcCBfX.js +0 -1
- package/dist/gateway/static/root/assets/skill-api-BCAV_F1P.js +0 -1
- package/dist/gateway/static/root/assets/skill-card-icon-BrrpZ3Mw.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BEV2WXGk.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-C8zOGpKw.js +0 -2
- package/dist/gateway/static/root/assets/star-BUWJqJ5c.js +0 -1
- package/dist/gateway/static/root/assets/stethoscope-DRqTAtjD.js +0 -1
- package/dist/gateway/static/root/assets/store-SzD1Jvgm.js +0 -1
- package/dist/gateway/static/root/assets/system-settings-panel-C_lajq9u.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-Dk8Bmlhw.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-CYvKiE_f.js +0 -1
- package/dist/gateway/static/root/assets/upload-rrb46c3c.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-C_SPNZbP.js +0 -2
- package/dist/gateway/static/root/assets/user-round-C9jxPhMR.js +0 -1
- package/dist/gateway/static/root/assets/wand-sparkles-DWuJz5ya.js +0 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-X0Cyh2AR.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-BrL6dzf0.js +0 -6
- package/dist/src/workflows/draft/index.d.ts +0 -3
- package/dist/src/workflows/draft/index.js +0 -3
- package/dist/src/workflows/draft/workflow-draft-prompt.d.ts +0 -22
- package/dist/src/workflows/draft/workflow-draft-prompt.js +0 -54
- package/dist/src/workflows/draft/workflow-draft-service.d.ts +0 -12
- package/dist/src/workflows/draft/workflow-draft-service.js +0 -125
- package/dist/src/workflows/draft/workflow-draft-validator.d.ts +0 -4
- package/dist/src/workflows/draft/workflow-draft-validator.js +0 -123
- package/dist/src/workflows/draft/workflow-draft.types.d.ts +0 -44
- package/dist/src/workflows/draft/workflow-draft.types.js +0 -1
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{i as e,t}from"./rolldown-runtime-aKtaBQYM.js";import{a as n,n as r,t as i}from"./vendor-react-BOUWij0V.js";import{g as a,t as o}from"./chunk-KS7C4IRE-BMYIfy9x.js";import{t as s}from"./createLucideIcon-DPHK1VkS.js";import{t as c}from"./calendar-clock-D-quYVPe.js";import{t as l}from"./check-DUBLcKHA.js";import{n as u,r as d,s as f}from"./popover-select-DcsFzD_i.js";import{t as p}from"./circle-check-C23XjkUj.js";import{t as m}from"./clock-3-DnrAnuyZ.js";import{t as h}from"./ellipsis-0k4rZLoy.js";import{t as g}from"./markdown-view-DXubGEic.js";import{t as _}from"./git-branch-Dh9uxTot.js";import{t as v}from"./message-circle-Badhj-4D.js";import{t as y}from"./pencil-DmIY3Oa-.js";import{t as b}from"./plus-Q2yW6OE7.js";import{t as x}from"./search-DA7gz22f.js";import{a as S,i as C,n as w,r as T,t as E}from"./workflow-run-setup-panel-X0Cyh2AR.js";import{t as D}from"./x-B_N4OPjy.js";import{t as O}from"./messages-D0G_sZvA.js";import{t as k}from"./cn-JdwAhgNB.js";import{n as A}from"./locale-store-BSkKhYkc.js";import{a as j,n as M,o as ee,r as N,s as P,t as F}from"./dist-BGTk37IG.js";import{i as I}from"./vendor-swr-BIWyz7Rc.js";import{t as L}from"./button-CS04eWY9.js";import{o as R,s as z}from"./dist-3h6cXXhT.js";import{t as B}from"./skeleton-BwbyijEw.js";import{n as te,r as ne}from"./settings-shell-layer-context-BTQUDoJ2.js";import{Bc as re,Bn as V,Cc as H,Eo as U,Hl as ie,Hn as ae,Ic as oe,Ii as se,Oa as ce,Oc as W,Tn as le,Ul as G,Vn as ue,Wa as de,Wl as fe,Wn as pe,Xc as me,_o as he,el as ge,l as K,qc as _e,tu as ve,y as ye,zn as be}from"./index-Cr4SINLG.js";import{i as q,n as xe,r as Se,t as Ce}from"./browser-automation-inputs-VnvK-GQP.js";var we=s(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),Te=r(),J=e(n(),1),Y=i(),Ee=Array.from({length:24},(e,t)=>t);function De(e){let t=/^(\d{2}):(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return n>23||r>59?null:{hour:n,minute:r}}function Oe(){let e=new Date;return{hour:e.getHours(),minute:e.getMinutes()}}function ke(e,t){return`${String(e).padStart(2,`0`)}:${String(t).padStart(2,`0`)}`}function Ae(e){let t=(0,Te.c)(80),{value:n,onChange:r,disabled:i,allowEmpty:a,clearLabel:o,ariaLabel:s,ariaLabelledBy:c,className:u,triggerClassName:d,id:p,name:h,minuteStep:g}=e,_=a===void 0?!1:a,v=g===void 0?1:g,y=De(n),b=y??Oe(),[x,S]=(0,J.useState)(!1),[C,w]=(0,J.useState)(null),[T,E]=(0,J.useState)(b.hour),[O,A]=(0,J.useState)(b.minute),j=(0,J.useRef)([]),M=(0,J.useRef)([]),ee=ne(),N=te(C),P=f(ee,N!==null),F=Math.max(1,Math.min(60,Math.round(v))),I=Array.from({length:Math.ceil(60/F)},(e,t)=>t*F).filter(je),L;t[0]===r?L=t[1]:(L=(e,t,n)=>{let i=n===void 0?!1:n;E(e),A(t),r(ke(e,t)),i&&S(!1)},t[0]=r,t[1]=L);let B=L,re=X,V;t[2]===u?V=t[3]:(V=k(`relative min-w-0`,u),t[2]=u,t[3]=V);let H=z,U;t[4]===n?U=t[5]:(U=e=>{if(e){let e=De(n)??Oe();E(e.hour),A(e.minute)}S(e)},t[4]=n,t[5]=U);let ie=_&&n&&`pr-9`,ae=i&&`cursor-not-allowed opacity-50 hover:border-edge`,oe;t[6]!==ie||t[7]!==ae||t[8]!==d?(oe=k(`box-border flex h-10 w-full min-w-0 items-center gap-2 rounded-lg border border-edge bg-surface-panel px-3 text-left text-sm text-fg`,`transition-colors hover:border-edge-strong focus-visible:border-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/20`,ie,ae,d),t[6]=ie,t[7]=ae,t[8]=d,t[9]=oe):oe=t[9];let se;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,Y.jsx)(m,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":`true`}),t[10]=se):se=t[10];let ce=!y&&`text-fg-subtle`,W;t[11]===ce?W=t[12]:(W=k(`tabular-nums`,ce),t[11]=ce,t[12]=W);let le=y?ke(y.hour,y.minute):`--:--`,G;t[13]!==W||t[14]!==le?(G=(0,Y.jsx)(`span`,{className:W,children:le}),t[13]=W,t[14]=le,t[15]=G):G=t[15];let ue;t[16]!==s||t[17]!==c||t[18]!==i||t[19]!==p||t[20]!==G||t[21]!==oe?(ue=(0,Y.jsx)(R,{asChild:!0,children:(0,Y.jsxs)(`button`,{ref:w,id:p,type:`button`,disabled:i,"aria-label":s,"aria-labelledby":c,"aria-haspopup":`listbox`,className:oe,children:[se,G]})}),t[16]=s,t[17]=c,t[18]=i,t[19]=p,t[20]=G,t[21]=oe,t[22]=ue):ue=t[22];let de=z,fe=N??void 0,pe=z,me=k(P,`w-[18rem] overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-popover outline-none`),he=e=>{e.preventDefault(),requestAnimationFrame(()=>j.current[T]?.focus())},ge;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,Y.jsx)(m,{className:`size-3.5`,"aria-hidden":`true`}),t[23]=ge):ge=t[23];let K=s??`HH:mm`,_e;t[24]===K?_e=t[25]:(_e=(0,Y.jsxs)(`span`,{className:`flex items-center gap-2 text-xs font-medium text-fg-muted`,children:[ge,K]}),t[24]=K,t[25]=_e);let ve;t[26]!==T||t[27]!==O?(ve=ke(T,O),t[26]=T,t[27]=O,t[28]=ve):ve=t[28];let ye;t[29]===ve?ye=t[30]:(ye=(0,Y.jsx)(`span`,{className:`font-mono text-base font-semibold tabular-nums text-fg`,children:ve}),t[29]=ve,t[30]=ye);let be;t[31]!==_e||t[32]!==ye?(be=(0,Y.jsxs)(`div`,{className:`flex items-center justify-between border-b border-edge-subtle bg-surface-inset px-3 py-2.5`,children:[_e,ye]}),t[31]=_e,t[32]=ye,t[33]=be):be=t[33];let q;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,Y.jsx)(`div`,{className:`px-1 pb-1.5 text-[11px] font-semibold tracking-wider text-fg-subtle`,children:`HH`}),t[34]=q):q=t[34];let xe=`${s??`HH:mm`} HH`,Se=Ee.map((e,t)=>(0,Y.jsx)(`button`,{ref:e=>{j.current[t]=e},type:`button`,role:`option`,"aria-selected":T===e,tabIndex:T===e?0:-1,className:k(`relative flex h-8 items-center justify-center rounded-md text-xs tabular-nums text-fg-muted transition-colors`,`hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/30`,T===e&&`bg-accent-soft font-semibold text-accent-fg`),onClick:()=>B(e,O),onKeyDown:e=>re(e,Ee,T,e=>B(e,O),j),children:String(e).padStart(2,`0`)},e)),Ce;t[35]!==xe||t[36]!==Se?(Ce=(0,Y.jsxs)(`div`,{className:`pr-2`,children:[q,(0,Y.jsx)(`div`,{role:`listbox`,"aria-label":xe,className:`grid max-h-56 grid-cols-3 gap-1 overflow-y-auto pr-1`,children:Se})]}),t[35]=xe,t[36]=Se,t[37]=Ce):Ce=t[37];let we;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,Y.jsx)(`div`,{className:`px-1 pb-1.5 text-[11px] font-semibold tracking-wider text-fg-subtle`,children:`MM`}),t[38]=we):we=t[38];let Ae=`${s??`HH:mm`} MM`,Me=I.map((e,t)=>(0,Y.jsxs)(`button`,{ref:e=>{M.current[t]=e},type:`button`,role:`option`,"aria-selected":O===e,tabIndex:O===e?0:-1,className:k(`relative flex h-8 items-center justify-center rounded-md text-xs tabular-nums text-fg-muted transition-colors`,`hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/30`,O===e&&`bg-accent-soft font-semibold text-accent-fg`),onClick:()=>B(T,e,!0),onKeyDown:e=>re(e,I,O,e=>B(T,e),M),children:[(0,Y.jsx)(l,{className:k(`absolute left-0.5 size-3`,O!==e&&`invisible`),"aria-hidden":`true`}),String(e).padStart(2,`0`)]},e)),Z;t[39]!==Ae||t[40]!==Me?(Z=(0,Y.jsx)(`div`,{role:`listbox`,"aria-label":Ae,className:`grid max-h-56 grid-cols-3 gap-1 overflow-y-auto pr-1`,children:Me}),t[39]=Ae,t[40]=Me,t[41]=Z):Z=t[41];let Ne;t[42]!==we||t[43]!==Z?(Ne=(0,Y.jsxs)(`div`,{className:`pl-2`,children:[we,Z]}),t[42]=we,t[43]=Z,t[44]=Ne):Ne=t[44];let Pe;t[45]!==Ce||t[46]!==Ne?(Pe=(0,Y.jsxs)(`div`,{className:`grid grid-cols-2 divide-x divide-edge-subtle p-2`,children:[Ce,Ne]}),t[45]=Ce,t[46]=Ne,t[47]=Pe):Pe=t[47];let Fe;t[48]!==pe.Content||t[49]!==me||t[50]!==he||t[51]!==be||t[52]!==Pe?(Fe=(0,Y.jsxs)(pe.Content,{side:`bottom`,align:`start`,sideOffset:6,collisionPadding:12,className:me,onOpenAutoFocus:he,children:[be,Pe]}),t[48]=pe.Content,t[49]=me,t[50]=he,t[51]=be,t[52]=Pe,t[53]=Fe):Fe=t[53];let Ie;t[54]!==de.Portal||t[55]!==fe||t[56]!==Fe?(Ie=(0,Y.jsx)(de.Portal,{container:fe,children:Fe}),t[54]=de.Portal,t[55]=fe,t[56]=Fe,t[57]=Ie):Ie=t[57];let Le;t[58]!==x||t[59]!==ue||t[60]!==Ie||t[61]!==H.Root||t[62]!==U?(Le=(0,Y.jsxs)(H.Root,{open:x,onOpenChange:U,children:[ue,Ie]}),t[58]=x,t[59]=ue,t[60]=Ie,t[61]=H.Root,t[62]=U,t[63]=Le):Le=t[63];let Re;t[64]!==_||t[65]!==s||t[66]!==o||t[67]!==i||t[68]!==r||t[69]!==n?(Re=_&&n?(0,Y.jsx)(`button`,{type:`button`,disabled:i,"aria-label":o??s,title:o,className:`absolute right-1.5 top-1/2 flex size-7 -translate-y-1/2 items-center justify-center rounded-md text-fg-subtle hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/30 disabled:pointer-events-none`,onClick:()=>r(``),children:(0,Y.jsx)(D,{className:`size-3.5`,"aria-hidden":`true`})}):null,t[64]=_,t[65]=s,t[66]=o,t[67]=i,t[68]=r,t[69]=n,t[70]=Re):Re=t[70];let ze;t[71]!==i||t[72]!==h||t[73]!==n?(ze=h?(0,Y.jsx)(`input`,{type:`hidden`,name:h,value:n,disabled:i}):null,t[71]=i,t[72]=h,t[73]=n,t[74]=ze):ze=t[74];let Be;return t[75]!==V||t[76]!==Le||t[77]!==Re||t[78]!==ze?(Be=(0,Y.jsxs)(`div`,{className:V,children:[Le,Re,ze]}),t[75]=V,t[76]=Le,t[77]=Re,t[78]=ze,t[79]=Be):Be=t[79],Be}function X(e,t,n,r,i){let a=null,o=Math.max(0,t.indexOf(n));if((e.key===`ArrowDown`||e.key===`ArrowRight`)&&(a=(o+1)%t.length),(e.key===`ArrowUp`||e.key===`ArrowLeft`)&&(a=(o-1+t.length)%t.length),e.key===`Home`&&(a=0),e.key===`End`&&(a=t.length-1),a===null)return;e.preventDefault();let s=t[a];r(s),i.current?.[a]?.focus()}function je(e){return e<60}var Me=t((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),Z=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronField=void 0,e.CronField=class e{#e=!1;#t=!1;#n=!1;#r=[];options={rawValue:``};static get min(){throw Error(`min must be overridden`)}static get max(){throw Error(`max must be overridden`)}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}constructor(t,n={rawValue:``}){if(!Array.isArray(t))throw Error(`${this.constructor.name} Validation error, values is not an array`);if(!(t.length>0))throw Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...n,rawValue:n.rawValue??``},this.#r=t.sort(e.sorter),this.#n=this.options.wildcard===void 0?this.#i():this.options.wildcard,this.#e=this.options.rawValue.includes(`L`)||t.includes(`L`),this.#t=this.options.rawValue.includes(`?`)||t.includes(`?`)}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return this.#e}get hasQuestionMarkChar(){return this.#t}get isWildcard(){return this.#n}get values(){return this.#r}static sorter(e,t){let n=typeof e==`number`,r=typeof t==`number`;return n&&r?e-t:!n&&!r?e.localeCompare(t):n?-1:1}static findNearestValueInList(e,t,n=!1){if(n){for(let n=e.length-1;n>=0;n--)if(e[n]<t)return e[n];return null}for(let n=0;n<e.length;n++)if(e[n]>t)return e[n];return null}findNearestValue(e,t=!1){return this.constructor.findNearestValueInList(this.values,e,t)}serialize(){return{wildcard:this.#n,values:this.#r}}validate(){let e,t=this.chars.length>0?` or chars ${this.chars.join(``)}`:``,n=e=>t=>RegExp(`^\\d{0,2}${t}$`).test(e);if(!this.#r.every(t=>(e=t,typeof t==`number`?t>=this.min&&t<=this.max:this.chars.some(n(t)))))throw Error(`${this.constructor.name} Validation error, got value ${e} expected range ${this.min}-${this.max}${t}`);let r=this.#r.find((e,t)=>this.#r.indexOf(e)!==t);if(r)throw Error(`${this.constructor.name} Validation error, duplicate values found: ${r}`)}#i(){return this.options.rawValue.length>0?[`*`,`?`].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(e,t)=>t+this.min).every(e=>this.#r.includes(e))}}})),Ne=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfMonth=void 0;var t=Z(),n=1,r=31,i=Object.freeze([`L`]);e.CronDayOfMonth=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Pe=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfWeek=void 0;var t=Z(),n=0,r=7,i=Object.freeze([`L`]);e.CronDayOfWeek=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}}})),Fe=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronHour=void 0;var t=Z(),n=0,r=23,i=Object.freeze([]);e.CronHour=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Ie=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMinute=void 0;var t=Z(),n=0,r=59,i=Object.freeze([]);e.CronMinute=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Le=t((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=class extends Error{},n=class extends t{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},r=class extends t{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},i=class extends t{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},a=class extends t{},o=class extends t{constructor(e){super(`Invalid unit ${e}`)}},s=class extends t{},c=class extends t{constructor(){super(`Zone is an abstract class`)}},l=`numeric`,u=`short`,d=`long`,f={year:l,month:l,day:l},p={year:l,month:u,day:l},m={year:l,month:u,day:l,weekday:u},h={year:l,month:d,day:l},g={year:l,month:d,day:l,weekday:d},_={hour:l,minute:l},v={hour:l,minute:l,second:l},y={hour:l,minute:l,second:l,timeZoneName:u},b={hour:l,minute:l,second:l,timeZoneName:d},x={hour:l,minute:l,hourCycle:`h23`},S={hour:l,minute:l,second:l,hourCycle:`h23`},C={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:u},w={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:d},T={year:l,month:l,day:l,hour:l,minute:l},E={year:l,month:l,day:l,hour:l,minute:l,second:l},D={year:l,month:u,day:l,hour:l,minute:l},O={year:l,month:u,day:l,hour:l,minute:l,second:l},k={year:l,month:u,day:l,weekday:u,hour:l,minute:l},A={year:l,month:d,day:l,hour:l,minute:l,timeZoneName:u},j={year:l,month:d,day:l,hour:l,minute:l,second:l,timeZoneName:u},M={year:l,month:d,day:l,weekday:d,hour:l,minute:l,timeZoneName:d},ee={year:l,month:d,day:l,weekday:d,hour:l,minute:l,second:l,timeZoneName:d},N=class{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}},P=null,F=class e extends N{static get instance(){return P===null&&(P=new e),P}get type(){return`system`}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return wt(e,t,n)}formatOffset(e,t){return Ot(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type===`system`}get isValid(){return!0}},I=new Map;function L(e){let t=I.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,era:`short`}),I.set(e,t)),t}var R={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function z(e,t){let n=e.format(t).replace(/\u200E/g,``),[,r,i,a,o,s,c,l]=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n);return[a,r,i,o,s,c,l]}function B(e,t){let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let{type:t,value:i}=n[e],a=R[t];t===`era`?r[a]=i:Q(a)||(r[a]=parseInt(i,10))}return r}var te=new Map,ne=class e extends N{static create(t){let n=te.get(t);return n===void 0&&te.set(t,n=new e(t)),n}static resetCache(){te.clear(),I.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat(`en-US`,{timeZone:e}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=e.isValidZone(t)}get type(){return`iana`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return wt(e,t,n,this.name)}formatOffset(e,t){return Ot(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=L(this.name),[r,i,a,o,s,c,l]=n.formatToParts?B(n,t):z(n,t);o===`BC`&&(r=-Math.abs(r)+1);let u=bt({year:r,month:i,day:a,hour:s===24?0:s,minute:c,second:l,millisecond:0}),d=+t,f=d%1e3;return d-=f>=0?f:1e3+f,(u-d)/(60*1e3)}equals(e){return e.type===`iana`&&e.name===this.name}get isValid(){return this.valid}},re={};function V(e,t={}){let n=JSON.stringify([e,t]),r=re[n];return r||(r=new Intl.ListFormat(e,t),re[n]=r),r}var H=new Map;function U(e,t={}){let n=JSON.stringify([e,t]),r=H.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,t),H.set(n,r)),r}var ie=new Map;function ae(e,t={}){let n=JSON.stringify([e,t]),r=ie.get(n);return r===void 0&&(r=new Intl.NumberFormat(e,t),ie.set(n,r)),r}var oe=new Map;function se(e,t={}){let{base:n,...r}=t,i=JSON.stringify([e,r]),a=oe.get(i);return a===void 0&&(a=new Intl.RelativeTimeFormat(e,t),oe.set(i,a)),a}var ce=null;function W(){return ce||(ce=new Intl.DateTimeFormat().resolvedOptions().locale,ce)}var le=new Map;function G(e){let t=le.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),le.set(e,t)),t}var ue=new Map;function de(e){let t=ue.get(e);if(!t){let n=new Intl.Locale(e);t=`getWeekInfo`in n?n.getWeekInfo():n.weekInfo,`minimalDays`in t||(t={...be,...t}),ue.set(e,t)}return t}function fe(e){let t=e.indexOf(`-x-`);t!==-1&&(e=e.substring(0,t));let n=e.indexOf(`-u-`);if(n===-1)return[e];{let t,r;try{t=U(e).resolvedOptions(),r=e}catch{let i=e.substring(0,n);t=U(i).resolvedOptions(),r=i}let{numberingSystem:i,calendar:a}=t;return[r,i,a]}}function pe(e,t,n){return n||t?(e.includes(`-u-`)||(e+=`-u`),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}function me(e){let t=[];for(let n=1;n<=12;n++){let r=gi.utc(2009,n,1);t.push(e(r))}return t}function he(e){let t=[];for(let n=1;n<=7;n++){let r=gi.utc(2016,11,13+n);t.push(e(r))}return t}function ge(e,t,n,r){let i=e.listingMode();return i===`error`?null:i===`en`?n(t):r(t)}function K(e){return e.numberingSystem&&e.numberingSystem!==`latn`?!1:e.numberingSystem===`latn`||!e.locale||e.locale.startsWith(`en`)||G(e.locale).numberingSystem===`latn`}var _e=class{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:r,floor:i,...a}=n;if(!t||Object.keys(a).length>0){let t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=ae(e,t)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else return $(this.floor?Math.floor(e):gt(e,3),this.padTo)}},ve=class{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type===`fixed`){let t=-1*(e.offset/60),n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;e.offset!==0&&ne.create(n).valid?(r=n,this.dt=e):(r=`UTC`,this.dt=e.offset===0?e:e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type===`system`?this.dt=e:e.zone.type===`iana`?(this.dt=e,r=e.zone.name):(r=`UTC`,this.dt=e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone);let i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=U(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(``):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if(e.type===`timeZoneName`){let t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}else return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},ye=class{constructor(e,t,n){this.opts={style:`long`,...n},!t&&it()&&(this.rtf=se(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):qt(t,e,this.opts.numeric,this.opts.style!==`long`)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},be={firstDay:1,minimalDays:4,weekend:[6,7]},q=class e{static fromOpts(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,i,a=!1){let o=t||Ie.defaultLocale;return new e(o||(a?`en-US`:W()),n||Ie.defaultNumberingSystem,r||Ie.defaultOutputCalendar,ut(i)||Ie.defaultWeekSettings,o)}static resetCache(){ce=null,H.clear(),ie.clear(),oe.clear(),le.clear(),ue.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return e.create(t,n,r,i)}constructor(e,t,n,r,i){let[a,o,s]=fe(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.weekSettings=r,this.intl=pe(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached??=K(this),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem===`latn`)&&(this.outputCalendar===null||this.outputCalendar===`gregory`);return e&&t?`en`:`intl`}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,ut(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return ge(this,e,Nt,()=>{let n=this.intl===`ja`||this.intl.startsWith(`ja-`);t&=!n;let r=t?{month:e,day:`numeric`}:{month:e},i=t?`format`:`standalone`;if(!this.monthsCache[i][e]){let t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,`month`);this.monthsCache[i][e]=me(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return ge(this,e,Lt,()=>{let n=t?{weekday:e,year:`numeric`,month:`long`,day:`numeric`}:{weekday:e},r=t?`format`:`standalone`;return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=he(e=>this.extract(e,n,`weekday`))),this.weekdaysCache[r][e]})}meridiems(){return ge(this,void 0,()=>Rt,()=>{if(!this.meridiemCache){let e={hour:`numeric`,hourCycle:`h12`};this.meridiemCache=[gi.utc(2016,11,13,9),gi.utc(2016,11,13,19)].map(t=>this.extract(t,e,`dayperiod`))}return this.meridiemCache})}eras(e){return ge(this,e,Ht,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[gi.utc(-40,1,1),gi.utc(2017,1,1)].map(e=>this.extract(e,t,`era`))),this.eraCache[e]})}extract(e,t,n){let r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new _e(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new ve(e,this.intl,t)}relFormatter(e={}){return new ye(this.intl,this.isEnglish(),e)}listFormatter(e={}){return V(this.intl,e)}isEnglish(){return this.locale===`en`||this.locale.toLowerCase()===`en-us`||G(this.intl).locale.startsWith(`en-us`)}getWeekSettings(){return this.weekSettings?this.weekSettings:at()?de(this.locale):be}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},xe=null,Se=class e extends N{static get utcInstance(){return xe===null&&(xe=new e(0)),xe}static instance(t){return t===0?e.utcInstance:new e(t)}static parseSpecifier(t){if(t){let n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new e(Tt(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return`fixed`}get name(){return this.fixed===0?`UTC`:`UTC${Ot(this.fixed,`narrow`)}`}get ianaName(){return this.fixed===0?`Etc/UTC`:`Etc/GMT${Ot(-this.fixed,`narrow`)}`}offsetName(){return this.name}formatOffset(e,t){return Ot(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type===`fixed`&&e.fixed===this.fixed}get isValid(){return!0}},Ce=class extends N{constructor(e){super(),this.zoneName=e}get type(){return`invalid`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return``}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function we(e,t){if(Q(e)||e===null)return t;if(e instanceof N)return e;if(nt(e)){let n=e.toLowerCase();return n==="default"?t:n===`local`||n===`system`?F.instance:n===`utc`||n===`gmt`?Se.utcInstance:Se.parseSpecifier(n)||ne.create(e)}else if(et(e))return Se.instance(e);else if(typeof e==`object`&&`offset`in e&&typeof e.offset==`function`)return e;else return new Ce(e)}var Te={arab:`[٠-٩]`,arabext:`[۰-۹]`,bali:`[᭐-᭙]`,beng:`[০-৯]`,deva:`[०-९]`,fullwide:`[0-9]`,gujr:`[૦-૯]`,hanidec:`[〇|一|二|三|四|五|六|七|八|九]`,khmr:`[០-៩]`,knda:`[೦-೯]`,laoo:`[໐-໙]`,limb:`[᥆-᥏]`,mlym:`[൦-൯]`,mong:`[᠐-᠙]`,mymr:`[၀-၉]`,orya:`[୦-୯]`,tamldec:`[௦-௯]`,telu:`[౦-౯]`,thai:`[๐-๙]`,tibt:`[༠-༩]`,latn:`\\d`},J={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Y=Te.hanidec.replace(/[\[|\]]/g,``).split(``);function Ee(e){let t=parseInt(e,10);if(isNaN(t)){t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(e[n].search(Te.hanidec)!==-1)t+=Y.indexOf(e[n]);else for(let e in J){let[n,i]=J[e];r>=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}else return t}var De=new Map;function Oe(){De.clear()}function ke({numberingSystem:e},t=``){let n=e||`latn`,r=De.get(n);r===void 0&&(r=new Map,De.set(n,r));let i=r.get(t);return i===void 0&&(i=RegExp(`${Te[n]}${t}`),r.set(t,i)),i}var Ae=()=>Date.now(),X=`system`,je=null,Me=null,Z=null,Ne=60,Pe,Fe=null,Ie=class{static get now(){return Ae}static set now(e){Ae=e}static set defaultZone(e){X=e}static get defaultZone(){return we(X,F.instance)}static get defaultLocale(){return je}static set defaultLocale(e){je=e}static get defaultNumberingSystem(){return Me}static set defaultNumberingSystem(e){Me=e}static get defaultOutputCalendar(){return Z}static set defaultOutputCalendar(e){Z=e}static get defaultWeekSettings(){return Fe}static set defaultWeekSettings(e){Fe=ut(e)}static get twoDigitCutoffYear(){return Ne}static set twoDigitCutoffYear(e){Ne=e%100}static get throwOnInvalid(){return Pe}static set throwOnInvalid(e){Pe=e}static resetCaches(){q.resetCache(),ne.resetCache(),gi.resetCache(),Oe()}},Le=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},Re=[0,31,59,90,120,151,181,212,243,273,304,334],ze=[0,31,60,91,121,152,182,213,244,274,305,335];function Be(e,t){return new Le(`unit out of range`,`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Ve(e,t,n){let r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let i=r.getUTCDay();return i===0?7:i}function He(e,t,n){return n+(_t(e)?ze:Re)[t-1]}function Ue(e,t){let n=_t(e)?ze:Re,r=n.findIndex(e=>e<t),i=t-n[r];return{month:r+1,day:i}}function We(e,t){return(e-t+7)%7+1}function Ge(e,t=4,n=1){let{year:r,month:i,day:a}=e,o=He(r,i,a),s=We(Ve(r,i,a),n),c=Math.floor((o-s+14-t)/7),l;return c<1?(l=r-1,c=St(l,t,n)):c>St(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:s,...kt(e)}}function Ke(e,t=4,n=1){let{weekYear:r,weekNumber:i,weekday:a}=e,o=We(Ve(r,1,t),n),s=vt(r),c=i*7+a-o-7+t,l;c<1?(l=r-1,c+=vt(l)):c>s?(l=r+1,c-=vt(r)):l=r;let{month:u,day:d}=Ue(l,c);return{year:l,month:u,day:d,...kt(e)}}function qe(e){let{year:t,month:n,day:r}=e;return{year:t,ordinal:He(t,n,r),...kt(e)}}function Je(e){let{year:t,ordinal:n}=e,{month:r,day:i}=Ue(t,n);return{year:t,month:r,day:i,...kt(e)}}function Ye(e,t){if(!Q(e.localWeekday)||!Q(e.localWeekNumber)||!Q(e.localWeekYear)){if(!Q(e.weekday)||!Q(e.weekNumber)||!Q(e.weekYear))throw new a(`Cannot mix locale-based week fields with ISO-based week fields`);return Q(e.localWeekday)||(e.weekday=e.localWeekday),Q(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Q(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Xe(e,t=4,n=1){let r=tt(e.weekYear),i=dt(e.weekNumber,1,St(e.weekYear,t,n)),a=dt(e.weekday,1,7);return r?i?a?!1:Be(`weekday`,e.weekday):Be(`week`,e.weekNumber):Be(`weekYear`,e.weekYear)}function Ze(e){let t=tt(e.year),n=dt(e.ordinal,1,vt(e.year));return t?n?!1:Be(`ordinal`,e.ordinal):Be(`year`,e.year)}function Qe(e){let t=tt(e.year),n=dt(e.month,1,12),r=dt(e.day,1,yt(e.year,e.month));return t?n?r?!1:Be(`day`,e.day):Be(`month`,e.month):Be(`year`,e.year)}function $e(e){let{hour:t,minute:n,second:r,millisecond:i}=e,a=dt(t,0,23)||t===24&&n===0&&r===0&&i===0,o=dt(n,0,59),s=dt(r,0,59),c=dt(i,0,999);return a?o?s?c?!1:Be(`millisecond`,i):Be(`second`,r):Be(`minute`,n):Be(`hour`,t)}function Q(e){return e===void 0}function et(e){return typeof e==`number`}function tt(e){return typeof e==`number`&&e%1==0}function nt(e){return typeof e==`string`}function rt(e){return Object.prototype.toString.call(e)===`[object Date]`}function it(){try{return typeof Intl<`u`&&!!Intl.RelativeTimeFormat}catch{return!1}}function at(){try{return typeof Intl<`u`&&!!Intl.Locale&&(`weekInfo`in Intl.Locale.prototype||`getWeekInfo`in Intl.Locale.prototype)}catch{return!1}}function ot(e){return Array.isArray(e)?e:[e]}function st(e,t,n){if(e.length!==0)return e.reduce((e,r)=>{let i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function ct(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}function lt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ut(e){if(e==null)return null;if(typeof e!=`object`)throw new s(`Week settings must be an object`);if(!dt(e.firstDay,1,7)||!dt(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!dt(e,1,7)))throw new s(`Invalid week settings`);return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function dt(e,t,n){return tt(e)&&e>=t&&e<=n}function ft(e,t){return e-t*Math.floor(e/t)}function $(e,t=2){let n=e<0,r;return r=n?`-`+(``+-e).padStart(t,`0`):(``+e).padStart(t,`0`),r}function pt(e){if(!(Q(e)||e===null||e===``))return parseInt(e,10)}function mt(e){if(!(Q(e)||e===null||e===``))return parseFloat(e)}function ht(e){if(!(Q(e)||e===null||e===``)){let t=parseFloat(`0.`+e)*1e3;return Math.floor(t)}}function gt(e,t,n=`round`){let r=10**t;switch(n){case`expand`:return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case`trunc`:return Math.trunc(e*r)/r;case`round`:return Math.round(e*r)/r;case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:throw RangeError(`Value rounding ${n} is out of range`)}}function _t(e){return e%4==0&&(e%100!=0||e%400==0)}function vt(e){return _t(e)?366:365}function yt(e,t){let n=ft(t-1,12)+1,r=e+(t-n)/12;return n===2?_t(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function bt(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function xt(e,t,n){return-We(Ve(e,1,t),n)+t-1}function St(e,t=4,n=1){let r=xt(e,t,n),i=xt(e+1,t,n);return(vt(e)-r+i)/7}function Ct(e){return e>99?e:e>Ie.twoDigitCutoffYear?1900+e:2e3+e}function wt(e,t,n,r=null){let i=new Date(e),a={hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`};r&&(a.timeZone=r);let o={timeZoneName:t,...a},s=new Intl.DateTimeFormat(n,o).formatToParts(i).find(e=>e.type.toLowerCase()===`timezonename`);return s?s.value:null}function Tt(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);let r=parseInt(t,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function Et(e){let t=Number(e);if(typeof e==`boolean`||e===``||!Number.isFinite(t))throw new s(`Invalid unit value ${e}`);return t}function Dt(e,t){let n={};for(let r in e)if(lt(e,r)){let i=e[r];if(i==null)continue;n[t(r)]=Et(i)}return n}function Ot(e,t){let n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?`+`:`-`;switch(t){case`short`:return`${i}${$(n,2)}:${$(r,2)}`;case`narrow`:return`${i}${n}${r>0?`:${r}`:``}`;case`techie`:return`${i}${$(n,2)}${$(r,2)}`;default:throw RangeError(`Value format ${t} is out of range for property format`)}}function kt(e){return ct(e,[`hour`,`minute`,`second`,`millisecond`])}var At=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],jt=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],Mt=[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`];function Nt(e){switch(e){case`narrow`:return[...Mt];case`short`:return[...jt];case`long`:return[...At];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`];case`2-digit`:return[`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`,`12`];default:return null}}var Pt=[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`],Ft=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`],It=[`M`,`T`,`W`,`T`,`F`,`S`,`S`];function Lt(e){switch(e){case`narrow`:return[...It];case`short`:return[...Ft];case`long`:return[...Pt];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`];default:return null}}var Rt=[`AM`,`PM`],zt=[`Before Christ`,`Anno Domini`],Bt=[`BC`,`AD`],Vt=[`B`,`A`];function Ht(e){switch(e){case`narrow`:return[...Vt];case`short`:return[...Bt];case`long`:return[...zt];default:return null}}function Ut(e){return Rt[e.hour<12?0:1]}function Wt(e,t){return Lt(t)[e.weekday-1]}function Gt(e,t){return Nt(t)[e.month-1]}function Kt(e,t){return Ht(t)[e.year<0?0:1]}function qt(e,t,n=`always`,r=!1){let i={years:[`year`,`yr.`],quarters:[`quarter`,`qtr.`],months:[`month`,`mo.`],weeks:[`week`,`wk.`],days:[`day`,`day`,`days`],hours:[`hour`,`hr.`],minutes:[`minute`,`min.`],seconds:[`second`,`sec.`]},a=[`hours`,`minutes`,`seconds`].indexOf(e)===-1;if(n===`auto`&&a){let n=e===`days`;switch(t){case 1:return n?`tomorrow`:`next ${i[e][0]}`;case-1:return n?`yesterday`:`last ${i[e][0]}`;case 0:return n?`today`:`this ${i[e][0]}`}}let o=Object.is(t,-0)||t<0,s=Math.abs(t),c=s===1,l=i[e],u=r?c?l[1]:l[2]||l[1]:c?i[e][0]:e;return o?`${s} ${u} ago`:`in ${s} ${u}`}function Jt(e,t){let n=``;for(let r of e)r.literal?n+=r.val:n+=t(r.val);return n}var Yt={D:f,DD:p,DDD:h,DDDD:g,t:_,tt:v,ttt:y,tttt:b,T:x,TT:S,TTT:C,TTTT:w,f:T,ff:D,fff:A,ffff:M,F:E,FF:O,FFF:j,FFFF:ee},Xt=class e{static create(t,n={}){return new e(t,n)}static parseFormat(e){let t=null,n=``,r=!1,i=[];for(let a=0;a<e.length;a++){let o=e.charAt(a);o===`'`?((n.length>0||r)&&i.push({literal:r||/^\s+$/.test(n),val:n===``?`'`:n}),t=null,n=``,r=!r):r||o===t?n+=o:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return Yt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return $(e,t);let r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(t,n){let r=this.loc.listingMode()===`en`,i=this.loc.outputCalendar&&this.loc.outputCalendar!==`gregory`,a=(e,n)=>this.loc.extract(t,e,n),o=e=>t.isOffsetFixed&&t.offset===0&&e.allowZ?`Z`:t.isValid?t.zone.formatOffset(t.ts,e.format):``,s=()=>r?Ut(t):a({hour:`numeric`,hourCycle:`h12`},`dayperiod`),c=(e,n)=>r?Gt(t,e):a(n?{month:e}:{month:e,day:`numeric`},`month`),l=(e,n)=>r?Wt(t,e):a(n?{weekday:e}:{weekday:e,month:`long`,day:`numeric`},`weekday`),u=n=>{let r=e.macroTokenToFormatOpts(n);return r?this.formatWithSystemDefault(t,r):n},d=e=>r?Kt(t,e):a({era:e},`era`);return Jt(e.parseFormat(n),e=>{switch(e){case`S`:return this.num(t.millisecond);case`u`:case`SSS`:return this.num(t.millisecond,3);case`s`:return this.num(t.second);case`ss`:return this.num(t.second,2);case`uu`:return this.num(Math.floor(t.millisecond/10),2);case`uuu`:return this.num(Math.floor(t.millisecond/100));case`m`:return this.num(t.minute);case`mm`:return this.num(t.minute,2);case`h`:return this.num(t.hour%12==0?12:t.hour%12);case`hh`:return this.num(t.hour%12==0?12:t.hour%12,2);case`H`:return this.num(t.hour);case`HH`:return this.num(t.hour,2);case`Z`:return o({format:`narrow`,allowZ:this.opts.allowZ});case`ZZ`:return o({format:`short`,allowZ:this.opts.allowZ});case`ZZZ`:return o({format:`techie`,allowZ:this.opts.allowZ});case`ZZZZ`:return t.zone.offsetName(t.ts,{format:`short`,locale:this.loc.locale});case`ZZZZZ`:return t.zone.offsetName(t.ts,{format:`long`,locale:this.loc.locale});case`z`:return t.zoneName;case`a`:return s();case`d`:return i?a({day:`numeric`},`day`):this.num(t.day);case`dd`:return i?a({day:`2-digit`},`day`):this.num(t.day,2);case`c`:return this.num(t.weekday);case`ccc`:return l(`short`,!0);case`cccc`:return l(`long`,!0);case`ccccc`:return l(`narrow`,!0);case`E`:return this.num(t.weekday);case`EEE`:return l(`short`,!1);case`EEEE`:return l(`long`,!1);case`EEEEE`:return l(`narrow`,!1);case`L`:return i?a({month:`numeric`,day:`numeric`},`month`):this.num(t.month);case`LL`:return i?a({month:`2-digit`,day:`numeric`},`month`):this.num(t.month,2);case`LLL`:return c(`short`,!0);case`LLLL`:return c(`long`,!0);case`LLLLL`:return c(`narrow`,!0);case`M`:return i?a({month:`numeric`},`month`):this.num(t.month);case`MM`:return i?a({month:`2-digit`},`month`):this.num(t.month,2);case`MMM`:return c(`short`,!1);case`MMMM`:return c(`long`,!1);case`MMMMM`:return c(`narrow`,!1);case`y`:return i?a({year:`numeric`},`year`):this.num(t.year);case`yy`:return i?a({year:`2-digit`},`year`):this.num(t.year.toString().slice(-2),2);case`yyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,4);case`yyyyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,6);case`G`:return d(`short`);case`GG`:return d(`long`);case`GGGGG`:return d(`narrow`);case`kk`:return this.num(t.weekYear.toString().slice(-2),2);case`kkkk`:return this.num(t.weekYear,4);case`W`:return this.num(t.weekNumber);case`WW`:return this.num(t.weekNumber,2);case`n`:return this.num(t.localWeekNumber);case`nn`:return this.num(t.localWeekNumber,2);case`ii`:return this.num(t.localWeekYear.toString().slice(-2),2);case`iiii`:return this.num(t.localWeekYear,4);case`o`:return this.num(t.ordinal);case`ooo`:return this.num(t.ordinal,3);case`q`:return this.num(t.quarter);case`qq`:return this.num(t.quarter,2);case`X`:return this.num(Math.floor(t.ts/1e3));case`x`:return this.num(t.ts);default:return u(e)}})}formatDurationFromString(t,n){let r=this.opts.signMode===`negativeLargestOnly`?-1:1,i=e=>{switch(e[0]){case`S`:return`milliseconds`;case`s`:return`seconds`;case`m`:return`minutes`;case`h`:return`hours`;case`d`:return`days`;case`w`:return`weeks`;case`M`:return`months`;case`y`:return`years`;default:return null}},a=(e,t)=>n=>{let a=i(n);if(a){let i=t.isNegativeDuration&&a!==t.largestUnit?r:1,o;return o=this.opts.signMode===`negativeLargestOnly`&&a!==t.largestUnit?`never`:this.opts.signMode===`all`?`always`:`auto`,this.num(e.get(a)*i,n.length,o)}else return n},o=e.parseFormat(n),s=o.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),c=t.shiftTo(...s.map(i).filter(e=>e));return Jt(o,a(c,{isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]}))}},Zt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Qt(...e){let t=e.reduce((e,t)=>e+t.source,``);return RegExp(`^${t}$`)}function $t(...e){return t=>e.reduce(([e,n,r],i)=>{let[a,o,s]=i(t,r);return[{...e,...a},o||n,s]},[{},null,1]).slice(0,2)}function en(e,...t){if(e==null)return[null,null];for(let[n,r]of t){let t=n.exec(e);if(t)return r(t)}return[null,null]}function tn(...e){return(t,n)=>{let r={},i;for(i=0;i<e.length;i++)r[e[i]]=pt(t[n+i]);return[r,null,n+i]}}var nn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,rn=`(?:${nn.source}?(?:\\[(${Zt.source})\\])?)?`,an=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,on=RegExp(`${an.source}${rn}`),sn=RegExp(`(?:[Tt]${on.source})?`),cn=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ln=/(\d{4})-?W(\d\d)(?:-?(\d))?/,un=/(\d{4})-?(\d{3})/,dn=tn(`weekYear`,`weekNumber`,`weekDay`),fn=tn(`year`,`ordinal`),pn=/(\d{4})-(\d\d)-(\d\d)/,mn=RegExp(`${an.source} ?(?:${nn.source}|(${Zt.source}))?`),hn=RegExp(`(?: ${mn.source})?`);function gn(e,t,n){let r=e[t];return Q(r)?n:pt(r)}function _n(e,t){return[{year:gn(e,t),month:gn(e,t+1,1),day:gn(e,t+2,1)},null,t+3]}function vn(e,t){return[{hours:gn(e,t,0),minutes:gn(e,t+1,0),seconds:gn(e,t+2,0),milliseconds:ht(e[t+3])},null,t+4]}function yn(e,t){let n=!e[t]&&!e[t+1],r=Tt(e[t+1],e[t+2]);return[{},n?null:Se.instance(r),t+3]}function bn(e,t){return[{},e[t]?ne.create(e[t]):null,t+1]}var xn=RegExp(`^T?${an.source}$`),Sn=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Cn(e){let[t,n,r,i,a,o,s,c,l]=e,u=t[0]===`-`,d=c&&c[0]===`-`,f=(e,t=!1)=>e!==void 0&&(t||e&&u)?-e:e;return[{years:f(mt(n)),months:f(mt(r)),weeks:f(mt(i)),days:f(mt(a)),hours:f(mt(o)),minutes:f(mt(s)),seconds:f(mt(c),c===`-0`),milliseconds:f(ht(l),d)}]}var wn={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Tn(e,t,n,r,i,a,o){let s={year:t.length===2?Ct(pt(t)):pt(t),month:jt.indexOf(n)+1,day:pt(r),hour:pt(i),minute:pt(a)};return o&&(s.second=pt(o)),e&&(s.weekday=e.length>3?Pt.indexOf(e)+1:Ft.indexOf(e)+1),s}var En=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Dn(e){let[,t,n,r,i,a,o,s,c,l,u,d]=e,f=Tn(t,i,r,n,a,o,s),p;return p=c?wn[c]:l?0:Tt(u,d),[f,new Se(p)]}function On(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).trim()}var kn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,An=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,jn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Mn(e){let[,t,n,r,i,a,o,s]=e;return[Tn(t,i,r,n,a,o,s),Se.utcInstance]}function Nn(e){let[,t,n,r,i,a,o,s]=e;return[Tn(t,s,n,r,i,a,o),Se.utcInstance]}var Pn=Qt(cn,sn),Fn=Qt(ln,sn),In=Qt(un,sn),Ln=Qt(on),Rn=$t(_n,vn,yn,bn),zn=$t(dn,vn,yn,bn),Bn=$t(fn,vn,yn,bn),Vn=$t(vn,yn,bn);function Hn(e){return en(e,[Pn,Rn],[Fn,zn],[In,Bn],[Ln,Vn])}function Un(e){return en(On(e),[En,Dn])}function Wn(e){return en(e,[kn,Mn],[An,Mn],[jn,Nn])}function Gn(e){return en(e,[Sn,Cn])}var Kn=$t(vn);function qn(e){return en(e,[xn,Kn])}var Jn=Qt(pn,hn),Yn=Qt(mn),Xn=$t(vn,yn,bn);function Zn(e){return en(e,[Jn,Rn],[Yn,Xn])}var Qn=`Invalid Duration`,$n={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},er={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...$n},tr=146097/400,nr=146097/4800,rr={years:{quarters:4,months:12,weeks:tr/7,days:tr,hours:tr*24,minutes:tr*24*60,seconds:tr*24*60*60,milliseconds:tr*24*60*60*1e3},quarters:{months:3,weeks:tr/28,days:tr/4,hours:tr*24/4,minutes:tr*24*60/4,seconds:tr*24*60*60/4,milliseconds:tr*24*60*60*1e3/4},months:{weeks:nr/7,days:nr,hours:nr*24,minutes:nr*24*60,seconds:nr*24*60*60,milliseconds:nr*24*60*60*1e3},...$n},ir=[`years`,`quarters`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`],ar=ir.slice(0).reverse();function or(e,t,n=!1){return new ur({values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix})}function sr(e,t){let n=t.milliseconds??0;for(let r of ar.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function cr(e,t){let n=sr(e,t)<0?-1:1;ir.reduceRight((r,i)=>{if(Q(t[i]))return r;if(r){let a=t[r]*n,o=e[i][r],s=Math.floor(a/o);t[i]+=s*n,t[r]-=s*o*n}return i},null),ir.reduce((n,r)=>{if(Q(t[r]))return n;if(n){let i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function lr(e){let t={};for(let[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}var ur=class e{constructor(e){let t=e.conversionAccuracy===`longterm`||!1,n=t?rr:er;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||q.create(),this.conversionAccuracy=t?`longterm`:`casual`,this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,n){return e.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(typeof t!=`object`||!t)throw new s(`Duration.fromObject: argument expected to be an object, got ${t===null?`null`:typeof t}`);return new e({values:Dt(t,e.normalizeUnit),loc:q.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(et(t))return e.fromMillis(t);if(e.isDuration(t))return t;if(typeof t==`object`)return e.fromObject(t);throw new s(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){let[r]=Gn(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){let[r]=qn(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Duration is invalid`);let r=t instanceof Le?t:new Le(t,n);if(Ie.throwOnInvalid)throw new i(r);return new e({invalid:r})}static normalizeUnit(e){let t={year:`years`,years:`years`,quarter:`quarters`,quarters:`quarters`,month:`months`,months:`months`,week:`weeks`,weeks:`weeks`,day:`days`,days:`days`,hour:`hours`,hours:`hours`,minute:`minutes`,minutes:`minutes`,second:`seconds`,seconds:`seconds`,millisecond:`milliseconds`,milliseconds:`milliseconds`}[e&&e.toLowerCase()];if(!t)throw new o(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){let n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?Xt.create(this.loc,n).formatDurationFromString(this,e):Qn}toHuman(e={}){if(!this.isValid)return Qn;let t=e.showZeros!==!1,n=ir.map(n=>{let r=this.values[n];return Q(r)||r===0&&!t?null:this.loc.numberFormatter({style:`unit`,unitDisplay:`long`,...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:`conjunction`,style:e.listStyle||`narrow`,...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e=`P`;return this.years!==0&&(e+=this.years+`Y`),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+`M`),this.weeks!==0&&(e+=this.weeks+`W`),this.days!==0&&(e+=this.days+`D`),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+=`T`),this.hours!==0&&(e+=this.hours+`H`),this.minutes!==0&&(e+=this.minutes+`M`),(this.seconds!==0||this.milliseconds!==0)&&(e+=gt(this.seconds+this.milliseconds/1e3,3)+`S`),e===`P`&&(e+=`T0S`),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:`extended`,...e,includeOffset:!1},gi.fromMillis(t,{zone:`UTC`}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?sr(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t),r={};for(let e of ir)(lt(n.values,e)||lt(this.values,e))&&(r[e]=n.get(e)+this.get(e));return or(this,{values:r},!0)}minus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=Et(e(this.values[n],n));return or(this,{values:t},!0)}get(t){return this[e.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let n={...this.values,...Dt(t,e.normalizeUnit)};return or(this,{values:n})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){let i={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n};return or(this,i)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return cr(this.matrix,e),or(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=lr(this.normalize().shiftToAll().toObject());return or(this,{values:e},!0)}shiftTo(...t){if(!this.isValid||t.length===0)return this;t=t.map(t=>e.normalizeUnit(t));let n={},r={},i=this.toObject(),a;for(let e of ir)if(t.indexOf(e)>=0){a=e;let t=0;for(let n in r)t+=this.matrix[n][e]*r[n],r[n]=0;et(i[e])&&(t+=i[e]);let o=Math.trunc(t);n[e]=o,r[e]=(t*1e3-o*1e3)/1e3}else et(i[e])&&(r[e]=i[e]);for(let e in r)r[e]!==0&&(n[a]+=e===a?r[e]:r[e]/this.matrix[a][e]);return cr(this.matrix,n),or(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo(`years`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return or(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=lr(this.values);return or(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(e,t){return e===void 0||e===0?t===void 0||t===0:e===t}for(let n of ir)if(!t(this.values[n],e.values[n]))return!1;return!0}},dr=`Invalid Interval`;function fr(e,t){return!e||!e.isValid?pr.invalid(`missing or invalid start`):!t||!t.isValid?pr.invalid(`missing or invalid end`):t<e?pr.invalid(`end before start`,`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}var pr=class e{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Interval is invalid`);let i=t instanceof Le?t:new Le(t,n);if(Ie.throwOnInvalid)throw new r(i);return new e({invalid:i})}static fromDateTimes(t,n){let r=_i(t),i=_i(n);return fr(r,i)??new e({start:r,end:i})}static after(t,n){let r=ur.fromDurationLike(n),i=_i(t);return e.fromDateTimes(i,i.plus(r))}static before(t,n){let r=ur.fromDurationLike(n),i=_i(t);return e.fromDateTimes(i.minus(r),i)}static fromISO(t,n){let[r,i]=(t||``).split(`/`,2);if(r&&i){let t,a;try{t=gi.fromISO(r,n),a=t.isValid}catch{a=!1}let o,s;try{o=gi.fromISO(i,n),s=o.isValid}catch{s=!1}if(a&&s)return e.fromDateTimes(t,o);if(a){let r=ur.fromISO(i,n);if(r.isValid)return e.after(t,r)}else if(s){let t=ur.fromISO(r,n);if(t.isValid)return e.before(o,t)}}return e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e=`milliseconds`){return this.isValid?this.toDuration(e).get(e):NaN}count(e=`milliseconds`,t){if(!this.isValid)return NaN;let n=this.start.startOf(e,t),r;return r=t!=null&&t.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:t,end:n}={}){return this.isValid?e.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];let n=t.map(_i).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),r=[],{s:i}=this,a=0;for(;i<this.e;){let t=n[a]||this.e,o=+t>+this.e?this.e:t;r.push(e.fromDateTimes(i,o)),i=o,a+=1}return r}splitBy(t){let n=ur.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as(`milliseconds`)===0)return[];let{s:r}=this,i=1,a,o=[];for(;r<this.e;){let t=this.start.plus(n.mapUnits(e=>e*i));a=+t>+this.e?this.e:t,o.push(e.fromDateTimes(r,a)),r=a,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(t){if(!this.isValid)return this;let n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:e.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;let n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,r)}static merge(e){let[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(t){let n=null,r=0,i=[],a=t.map(e=>[{time:e.s,type:`s`},{time:e.e,type:`e`}]),o=Array.prototype.concat(...a).sort((e,t)=>e.time-t.time);for(let t of o)r+=t.type===`s`?1:-1,r===1?n=t.time:(n&&+n!=+t.time&&i.push(e.fromDateTimes(n,t.time)),n=null);return e.merge(i)}difference(...t){return e.xor([this].concat(t)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:dr}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=f,t={}){return this.isValid?Xt.create(this.s.loc.clone(t),e).formatInterval(this):dr}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:dr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:dr}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:dr}toFormat(e,{separator:t=` – `}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:dr}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ur.invalid(this.invalidReason)}mapEndpoints(t){return e.fromDateTimes(t(this.s),t(this.e))}},mr=class{static hasDST(e=Ie.defaultZone){let t=gi.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return ne.isValidZone(e)}static normalizeZone(e){return we(e,Ie.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||q.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||q.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||q.create(e)).getWeekendDays().slice()}static months(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||q.create(t,n,i)).months(e)}static monthsFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||q.create(t,n,i)).months(e,!0)}static weekdays(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||q.create(t,n,null)).weekdays(e)}static weekdaysFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||q.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return q.create(e).meridiems()}static eras(e=`short`,{locale:t=null}={}){return q.create(t,null,`gregory`).eras(e)}static features(){return{relative:it(),localeWeek:at()}}};function hr(e,t){let n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf(`day`).valueOf(),r=n(t)-n(e);return Math.floor(ur.fromMillis(r).as(`days`))}function gr(e,t,n){let r=[[`years`,(e,t)=>t.year-e.year],[`quarters`,(e,t)=>t.quarter-e.quarter+(t.year-e.year)*4],[`months`,(e,t)=>t.month-e.month+(t.year-e.year)*12],[`weeks`,(e,t)=>{let n=hr(e,t);return(n-n%7)/7}],[`days`,hr]],i={},a=e,o,s;for(let[c,l]of r)n.indexOf(c)>=0&&(o=c,i[c]=l(e,t),s=a.plus(i),s>t?(i[c]--,e=a.plus(i),e>t&&(s=e,i[c]--,e=a.plus(i))):e=s);return[e,i,s,o]}function _r(e,t,n,r){let[i,a,o,s]=gr(e,t,n),c=t-i,l=n.filter(e=>[`hours`,`minutes`,`seconds`,`milliseconds`].indexOf(e)>=0);l.length===0&&(o<t&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+c/(o-i)));let u=ur.fromObject(a,r);return l.length>0?ur.fromMillis(c,r).shiftTo(...l).plus(u):u}var vr=`missing Intl.DateTimeFormat.formatToParts support`;function yr(e,t=e=>e){return{regex:e,deser:([e])=>t(Ee(e))}}var br=`[ \xA0]`,xr=new RegExp(br,`g`);function Sr(e){return e.replace(/\./g,`\\.?`).replace(xr,br)}function Cr(e){return e.replace(/\./g,``).replace(xr,` `).toLowerCase()}function wr(e,t){return e===null?null:{regex:RegExp(e.map(Sr).join(`|`)),deser:([n])=>e.findIndex(e=>Cr(n)===Cr(e))+t}}function Tr(e,t){return{regex:e,deser:([,e,t])=>Tt(e,t),groups:t}}function Er(e){return{regex:e,deser:([e])=>e}}function Dr(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,`\\$&`)}function Or(e,t){let n=ke(t),r=ke(t,`{2}`),i=ke(t,`{3}`),a=ke(t,`{4}`),o=ke(t,`{6}`),s=ke(t,`{1,2}`),c=ke(t,`{1,3}`),l=ke(t,`{1,6}`),u=ke(t,`{1,9}`),d=ke(t,`{2,4}`),f=ke(t,`{4,6}`),p=e=>({regex:RegExp(Dr(e.val)),deser:([e])=>e,literal:!0}),m=(m=>{if(e.literal)return p(m);switch(m.val){case`G`:return wr(t.eras(`short`),0);case`GG`:return wr(t.eras(`long`),0);case`y`:return yr(l);case`yy`:return yr(d,Ct);case`yyyy`:return yr(a);case`yyyyy`:return yr(f);case`yyyyyy`:return yr(o);case`M`:return yr(s);case`MM`:return yr(r);case`MMM`:return wr(t.months(`short`,!0),1);case`MMMM`:return wr(t.months(`long`,!0),1);case`L`:return yr(s);case`LL`:return yr(r);case`LLL`:return wr(t.months(`short`,!1),1);case`LLLL`:return wr(t.months(`long`,!1),1);case`d`:return yr(s);case`dd`:return yr(r);case`o`:return yr(c);case`ooo`:return yr(i);case`HH`:return yr(r);case`H`:return yr(s);case`hh`:return yr(r);case`h`:return yr(s);case`mm`:return yr(r);case`m`:return yr(s);case`q`:return yr(s);case`qq`:return yr(r);case`s`:return yr(s);case`ss`:return yr(r);case`S`:return yr(c);case`SSS`:return yr(i);case`u`:return Er(u);case`uu`:return Er(s);case`uuu`:return yr(n);case`a`:return wr(t.meridiems(),0);case`kkkk`:return yr(a);case`kk`:return yr(d,Ct);case`W`:return yr(s);case`WW`:return yr(r);case`E`:case`c`:return yr(n);case`EEE`:return wr(t.weekdays(`short`,!1),1);case`EEEE`:return wr(t.weekdays(`long`,!1),1);case`ccc`:return wr(t.weekdays(`short`,!0),1);case`cccc`:return wr(t.weekdays(`long`,!0),1);case`Z`:case`ZZ`:return Tr(RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case`ZZZ`:return Tr(RegExp(`([+-]${s.source})(${r.source})?`),2);case`z`:return Er(/[a-z_+-/]{1,256}?/i);case` `:return Er(/[^\S\n\r]/);default:return p(m)}})(e)||{invalidReason:vr};return m.token=e,m}var kr={year:{"2-digit":`yy`,numeric:`yyyyy`},month:{numeric:`M`,"2-digit":`MM`,short:`MMM`,long:`MMMM`},day:{numeric:`d`,"2-digit":`dd`},weekday:{short:`EEE`,long:`EEEE`},dayperiod:`a`,dayPeriod:`a`,hour12:{numeric:`h`,"2-digit":`hh`},hour24:{numeric:`H`,"2-digit":`HH`},minute:{numeric:`m`,"2-digit":`mm`},second:{numeric:`s`,"2-digit":`ss`},timeZoneName:{long:`ZZZZZ`,short:`ZZZ`}};function Ar(e,t,n){let{type:r,value:i}=e;if(r===`literal`){let e=/^\s+$/.test(i);return{literal:!e,val:e?` `:i}}let a=t[r],o=r;r===`hour`&&(o=t.hour12==null?t.hourCycle==null?n.hour12?`hour12`:`hour24`:t.hourCycle===`h11`||t.hourCycle===`h12`?`hour12`:`hour24`:t.hour12?`hour12`:`hour24`);let s=kr[o];if(typeof s==`object`&&(s=s[a]),s)return{literal:!1,val:s}}function jr(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,``)}$`,e]}function Mr(e,t,n){let r=e.match(t);if(r){let e={},t=1;for(let i in n)if(lt(n,i)){let a=n[i],o=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(r.slice(t,t+o))),t+=o}return[r,e]}else return[r,{}]}function Nr(e){let t=e=>{switch(e){case`S`:return`millisecond`;case`s`:return`second`;case`m`:return`minute`;case`h`:case`H`:return`hour`;case`d`:return`day`;case`o`:return`ordinal`;case`L`:case`M`:return`month`;case`y`:return`year`;case`E`:case`c`:return`weekday`;case`W`:return`weekNumber`;case`k`:return`weekYear`;case`q`:return`quarter`;default:return null}},n=null,r;return Q(e.z)||(n=ne.create(e.z)),Q(e.Z)||(n||=new Se(e.Z),r=e.Z),Q(e.q)||(e.M=(e.q-1)*3+1),Q(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Q(e.u)||(e.S=ht(e.u)),[Object.keys(e).reduce((n,r)=>{let i=t(r);return i&&(n[i]=e[r]),n},{}),n,r]}var Pr=null;function Fr(){return Pr||=gi.fromMillis(1555555555555),Pr}function Ir(e,t){if(e.literal)return e;let n=Vr(Xt.macroTokenToFormatOpts(e.val),t);return n==null||n.includes(void 0)?e:n}function Lr(e,t){return Array.prototype.concat(...e.map(e=>Ir(e,t)))}var Rr=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Lr(Xt.parseFormat(t),e),this.units=this.tokens.map(t=>Or(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){let[e,t]=jr(this.units);this.regex=RegExp(e,`i`),this.handlers=t}}explainFromTokens(e){if(this.isValid){let[t,n]=Mr(e,this.regex,this.handlers),[r,i,o]=n?Nr(n):[null,null,void 0];if(lt(n,`a`)&<(n,`H`))throw new a(`Can't include meridiem when specifying 24-hour format`);return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function zr(e,t,n){return new Rr(e,n).explainFromTokens(t)}function Br(e,t,n){let{result:r,zone:i,specificOffset:a,invalidReason:o}=zr(e,t,n);return[r,i,a,o]}function Vr(e,t){if(!e)return null;let n=Xt.create(t,e).dtFormatter(Fr()),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>Ar(t,e,i))}var Hr=`Invalid DateTime`,Ur=864e13;function Wr(e){return new Le(`unsupported zone`,`the zone "${e.name}" is not supported`)}function Gr(e){return e.weekData===null&&(e.weekData=Ge(e.c)),e.weekData}function Kr(e){return e.localWeekData===null&&(e.localWeekData=Ge(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function qr(e,t){let n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new gi({...n,...t,old:n})}function Jr(e,t,n){let r=e-t*60*1e3,i=n.offset(r);if(t===i)return[r,t];r-=(i-t)*60*1e3;let a=n.offset(r);return i===a?[r,i]:[e-Math.min(i,a)*60*1e3,Math.max(i,a)]}function Yr(e,t){e+=t*60*1e3;let n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Xr(e,t,n){return Jr(bt(e),t,n)}function Zr(e,t){let n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:r,month:i,day:Math.min(e.c.day,yt(r,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=ur.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as(`milliseconds`),[s,c]=Jr(bt(a),n,e.zone);return o!==0&&(s+=o,c=e.zone.offset(s)),{ts:s,o:c}}function Qr(e,t,n,r,i,a){let{setZone:o,zone:s}=n;if(e&&Object.keys(e).length!==0||t){let r=t||s,i=gi.fromObject(e,{...n,zone:r,specificOffset:a});return o?i:i.setZone(s)}else return gi.invalid(new Le(`unparsable`,`the input "${i}" can't be parsed as ${r}`))}function $r(e,t,n=!0){return e.isValid?Xt.create(q.create(`en-US`),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ei(e,t,n){let r=e.c.year>9999||e.c.year<0,i=``;if(r&&e.c.year>=0&&(i+=`+`),i+=$(e.c.year,r?6:4),n===`year`)return i;if(t){if(i+=`-`,i+=$(e.c.month),n===`month`)return i;i+=`-`}else if(i+=$(e.c.month),n===`month`)return i;return i+=$(e.c.day),i}function ti(e,t,n,r,i,a,o){let s=!n||e.c.millisecond!==0||e.c.second!==0,c=``;switch(o){case`day`:case`month`:case`year`:break;default:if(c+=$(e.c.hour),o===`hour`)break;if(t){if(c+=`:`,c+=$(e.c.minute),o===`minute`)break;s&&(c+=`:`,c+=$(e.c.second))}else{if(c+=$(e.c.minute),o===`minute`)break;s&&(c+=$(e.c.second))}if(o===`second`)break;s&&(!r||e.c.millisecond!==0)&&(c+=`.`,c+=$(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&e.offset===0&&!a?c+=`Z`:e.o<0?(c+=`-`,c+=$(Math.trunc(-e.o/60)),c+=`:`,c+=$(Math.trunc(-e.o%60))):(c+=`+`,c+=$(Math.trunc(e.o/60)),c+=`:`,c+=$(Math.trunc(e.o%60)))),a&&(c+=`[`+e.zone.ianaName+`]`),c}var ni={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ri={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ii={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ai=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],oi=[`weekYear`,`weekNumber`,`weekday`,`hour`,`minute`,`second`,`millisecond`],si=[`year`,`ordinal`,`hour`,`minute`,`second`,`millisecond`];function ci(e){let t={year:`year`,years:`year`,month:`month`,months:`month`,day:`day`,days:`day`,hour:`hour`,hours:`hour`,minute:`minute`,minutes:`minute`,quarter:`quarter`,quarters:`quarter`,second:`second`,seconds:`second`,millisecond:`millisecond`,milliseconds:`millisecond`,weekday:`weekday`,weekdays:`weekday`,weeknumber:`weekNumber`,weeksnumber:`weekNumber`,weeknumbers:`weekNumber`,weekyear:`weekYear`,weekyears:`weekYear`,ordinal:`ordinal`}[e.toLowerCase()];if(!t)throw new o(e);return t}function li(e){switch(e.toLowerCase()){case`localweekday`:case`localweekdays`:return`localWeekday`;case`localweeknumber`:case`localweeknumbers`:return`localWeekNumber`;case`localweekyear`:case`localweekyears`:return`localWeekYear`;default:return ci(e)}}function ui(e){if(mi===void 0&&(mi=Ie.now()),e.type!==`iana`)return e.offset(mi);let t=e.name,n=hi.get(t);return n===void 0&&(n=e.offset(mi),hi.set(t,n)),n}function di(e,t){let n=we(t.zone,Ie.defaultZone);if(!n.isValid)return gi.invalid(Wr(n));let r=q.fromObject(t),i,a;if(Q(e.year))i=Ie.now();else{for(let t of ai)Q(e[t])&&(e[t]=ni[t]);let t=Qe(e)||$e(e);if(t)return gi.invalid(t);let r=ui(n);[i,a]=Xr(e,r,n)}return new gi({ts:i,zone:n,loc:r,o:a})}function fi(e,t,n){let r=Q(n.round)?!0:n.round,i=Q(n.rounding)?`trunc`:n.rounding,a=(e,a)=>(e=gt(e,r||n.calendary?0:2,n.calendary?`round`:i),t.loc.clone(n).relFormatter(n).format(e,a)),o=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return a(o(n.unit),n.unit);for(let e of n.units){let t=o(e);if(Math.abs(t)>=1)return a(t,e)}return a(e>t?-0:0,n.units[n.units.length-1])}function pi(e){let t={},n;return e.length>0&&typeof e[e.length-1]==`object`?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}var mi,hi=new Map,gi=class e{constructor(e){let t=e.zone||Ie.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new Le(`invalid input`):null)||(t.isValid?null:Wr(t));this.ts=Q(e.ts)?Ie.now():e.ts;let r=null,i=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{let a=et(e.o)&&!e.old?e.o:t.offset(this.ts);r=Yr(this.ts,a),n=Number.isNaN(r.year)?new Le(`invalid input`):null,r=n?null:r,i=n?null:a}this._zone=t,this.loc=e.loc||q.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new e({})}static local(){let[e,t]=pi(arguments),[n,r,i,a,o,s,c]=t;return di({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static utc(){let[e,t]=pi(arguments),[n,r,i,a,o,s,c]=t;return e.zone=Se.utcInstance,di({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static fromJSDate(t,n={}){let r=rt(t)?t.valueOf():NaN;if(Number.isNaN(r))return e.invalid(`invalid input`);let i=we(n.zone,Ie.defaultZone);return i.isValid?new e({ts:r,zone:i,loc:q.fromObject(n)}):e.invalid(Wr(i))}static fromMillis(t,n={}){if(!et(t))throw new s(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`);return t<-864e13||t>Ur?e.invalid(`Timestamp out of range`):new e({ts:t,zone:we(n.zone,Ie.defaultZone),loc:q.fromObject(n)})}static fromSeconds(t,n={}){if(et(t))return new e({ts:t*1e3,zone:we(n.zone,Ie.defaultZone),loc:q.fromObject(n)});throw new s(`fromSeconds requires a numerical input`)}static fromObject(t,n={}){t||={};let r=we(n.zone,Ie.defaultZone);if(!r.isValid)return e.invalid(Wr(r));let i=q.fromObject(n),o=Dt(t,li),{minDaysInFirstWeek:s,startOfWeek:c}=Ye(o,i),l=Ie.now(),u=Q(n.specificOffset)?r.offset(l):n.specificOffset,d=!Q(o.ordinal),f=!Q(o.year),p=!Q(o.month)||!Q(o.day),m=f||p,h=o.weekYear||o.weekNumber;if((m||d)&&h)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(p&&d)throw new a(`Can't mix ordinal dates with month/day`);let g=h||o.weekday&&!m,_,v,y=Yr(l,u);g?(_=oi,v=ri,y=Ge(y,s,c)):d?(_=si,v=ii,y=qe(y)):(_=ai,v=ni);let b=!1;for(let e of _){let t=o[e];Q(t)?b?o[e]=v[e]:o[e]=y[e]:b=!0}let x=(g?Xe(o,s,c):d?Ze(o):Qe(o))||$e(o);if(x)return e.invalid(x);let[S,C]=Xr(g?Ke(o,s,c):d?Je(o):o,u,r),w=new e({ts:S,zone:r,o:C,loc:i});return o.weekday&&m&&t.weekday!==w.weekday?e.invalid(`mismatched weekday`,`you can't specify both a weekday of ${o.weekday} and a date of ${w.toISO()}`):w.isValid?w:e.invalid(w.invalid)}static fromISO(e,t={}){let[n,r]=Hn(e);return Qr(n,r,t,`ISO 8601`,e)}static fromRFC2822(e,t={}){let[n,r]=Un(e);return Qr(n,r,t,`RFC 2822`,e)}static fromHTTP(e,t={}){let[n,r]=Wn(e);return Qr(n,r,t,`HTTP`,t)}static fromFormat(t,n,r={}){if(Q(t)||Q(n))throw new s(`fromFormat requires an input string and a format`);let{locale:i=null,numberingSystem:a=null}=r,[o,c,l,u]=Br(q.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),t,n);return u?e.invalid(u):Qr(o,c,r,`format ${n}`,t,l)}static fromString(t,n,r={}){return e.fromFormat(t,n,r)}static fromSQL(e,t={}){let[n,r]=Zn(e);return Qr(n,r,t,`SQL`,e)}static invalid(t,r=null){if(!t)throw new s(`need to specify a reason the DateTime is invalid`);let i=t instanceof Le?t:new Le(t,r);if(Ie.throwOnInvalid)throw new n(i);return new e({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=Vr(e,q.fromObject(t));return n?n.map(e=>e?e.val:null).join(``):null}static expandFormat(e,t={}){return Lr(Xt.parseFormat(e),q.fromObject(t)).map(e=>e.val).join(``)}static resetCache(){mi=void 0,hi.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Gr(this).weekYear:NaN}get weekNumber(){return this.isValid?Gr(this).weekNumber:NaN}get weekday(){return this.isValid?Gr(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Kr(this).weekday:NaN}get localWeekNumber(){return this.isValid?Kr(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Kr(this).weekYear:NaN}get ordinal(){return this.isValid?qe(this.c).ordinal:NaN}get monthShort(){return this.isValid?mr.months(`short`,{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?mr.months(`long`,{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?mr.weekdays(`short`,{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?mr.weekdays(`long`,{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:`short`,locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:`long`,locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,n=bt(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),a=this.zone.offset(n-r*t),o=this.zone.offset(n-i*t);if(a===o)return[this];let s=n-a*t,c=n-o*t,l=Yr(s,a),u=Yr(c,o);return l.hour===u.hour&&l.minute===u.minute&&l.second===u.second&&l.millisecond===u.millisecond?[qr(this,{ts:s}),qr(this,{ts:c})]:[this]}get isInLeapYear(){return _t(this.year)}get daysInMonth(){return yt(this.year,this.month)}get daysInYear(){return this.isValid?vt(this.year):NaN}get weeksInWeekYear(){return this.isValid?St(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?St(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:r}=Xt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(Se.instance(e),t)}toLocal(){return this.setZone(Ie.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=we(t,Ie.defaultZone),t.equals(this.zone))return this;if(t.isValid){let e=this.ts;if(n||r){let n=t.offset(this.ts),r=this.toObject();[e]=Xr(r,n,t)}return qr(this,{ts:e,zone:t})}else return e.invalid(Wr(t))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let r=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return qr(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=Dt(e,li),{minDaysInFirstWeek:n,startOfWeek:r}=Ye(t,this.loc),i=!Q(t.weekYear)||!Q(t.weekNumber)||!Q(t.weekday),o=!Q(t.ordinal),s=!Q(t.year),c=!Q(t.month)||!Q(t.day),l=s||c,u=t.weekYear||t.weekNumber;if((l||o)&&u)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(c&&o)throw new a(`Can't mix ordinal dates with month/day`);let d;i?d=Ke({...Ge(this.c,n,r),...t},n,r):Q(t.ordinal)?(d={...this.toObject(),...t},Q(t.day)&&(d.day=Math.min(yt(d.year,d.month),d.day))):d=Je({...qe(this.c),...t});let[f,p]=Xr(d,this.o,this.zone);return qr(this,{ts:f,o:p})}plus(e){if(!this.isValid)return this;let t=ur.fromDurationLike(e);return qr(this,Zr(this,t))}minus(e){if(!this.isValid)return this;let t=ur.fromDurationLike(e).negate();return qr(this,Zr(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},r=ur.normalizeUnit(e);switch(r){case`years`:n.month=1;case`quarters`:case`months`:n.day=1;case`weeks`:case`days`:n.hour=0;case`hours`:n.minute=0;case`minutes`:n.second=0;case`seconds`:n.millisecond=0;break}if(r===`weeks`)if(t){let e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1;return r===`quarters`&&(n.month=(Math.ceil(this.month/3)-1)*3+1),this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Xt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Hr}toLocaleString(e=f,t={}){return this.isValid?Xt.create(this.loc.clone(t),e).formatDateTime(this):Hr}toLocaleParts(e={}){return this.isValid?Xt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e=`extended`,suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:i=!1,precision:a=`milliseconds`}={}){if(!this.isValid)return null;a=ci(a);let o=e===`extended`,s=ei(this,o,a);return ai.indexOf(a)>=3&&(s+=`T`),s+=ti(this,o,t,n,r,i,a),s}toISODate({format:e=`extended`,precision:t=`day`}={}){return this.isValid?ei(this,e===`extended`,ci(t)):null}toISOWeekDate(){return $r(this,`kkkk-'W'WW-c`)}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:a=`extended`,precision:o=`milliseconds`}={}){return this.isValid?(o=ci(o),(r&&ai.indexOf(o)>=3?`T`:``)+ti(this,a===`extended`,t,e,n,i,o)):null}toRFC2822(){return $r(this,`EEE, dd LLL yyyy HH:mm:ss ZZZ`,!1)}toHTTP(){return $r(this.toUTC(),`EEE, dd LLL yyyy HH:mm:ss 'GMT'`)}toSQLDate(){return this.isValid?ei(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r=`HH:mm:ss.SSS`;return(t||e)&&(n&&(r+=` `),t?r+=`z`:e&&(r+=`ZZ`)),$r(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Hr}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t=`milliseconds`,n={}){if(!this.isValid||!e.isValid)return ur.invalid(`created by diffing an invalid DateTime`);let r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=ot(t).map(ur.normalizeUnit),a=e.valueOf()>this.valueOf(),o=_r(a?this:e,a?e:this,i,r);return a?o.negate():o}diffNow(t=`milliseconds`,n={}){return this.diff(e.now(),t,n)}until(e){return this.isValid?pr.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(t={}){if(!this.isValid)return null;let n=t.base||e.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0,i=[`years`,`months`,`days`,`hours`,`minutes`,`seconds`],a=t.unit;return Array.isArray(t.unit)&&(i=t.unit,a=void 0),fi(n,this.plus(r),{...t,numeric:`always`,units:i,unit:a})}toRelativeCalendar(t={}){return this.isValid?fi(t.base||e.fromObject({},{zone:this.zone}),this,{...t,numeric:`auto`,units:[`years`,`months`,`days`],calendary:!0}):null}static min(...t){if(!t.every(e.isDateTime))throw new s(`min requires all arguments be DateTimes`);return st(t,e=>e.valueOf(),Math.min)}static max(...t){if(!t.every(e.isDateTime))throw new s(`max requires all arguments be DateTimes`);return st(t,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:r=null,numberingSystem:i=null}=n;return zr(q.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(t,n,r={}){return e.fromFormatExplain(t,n,r)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:r=null}=t;return new Rr(q.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),e)}static fromFormatParser(t,n,r={}){if(Q(t)||Q(n))throw new s(`fromFormatParser requires an input string and a format parser`);let{locale:i=null,numberingSystem:a=null}=r,o=q.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(n.locale))throw new s(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);let{result:c,zone:l,specificOffset:u,invalidReason:d}=n.explainFromTokens(t);return d?e.invalid(d):Qr(c,l,r,`format ${n.format}`,t,u)}static get DATE_SHORT(){return f}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return h}static get DATE_HUGE(){return g}static get TIME_SIMPLE(){return _}static get TIME_WITH_SECONDS(){return v}static get TIME_WITH_SHORT_OFFSET(){return y}static get TIME_WITH_LONG_OFFSET(){return b}static get TIME_24_SIMPLE(){return x}static get TIME_24_WITH_SECONDS(){return S}static get TIME_24_WITH_SHORT_OFFSET(){return C}static get TIME_24_WITH_LONG_OFFSET(){return w}static get DATETIME_SHORT(){return T}static get DATETIME_SHORT_WITH_SECONDS(){return E}static get DATETIME_MED(){return D}static get DATETIME_MED_WITH_SECONDS(){return O}static get DATETIME_MED_WITH_WEEKDAY(){return k}static get DATETIME_FULL(){return A}static get DATETIME_FULL_WITH_SECONDS(){return j}static get DATETIME_HUGE(){return M}static get DATETIME_HUGE_WITH_SECONDS(){return ee}};function _i(e){if(gi.isDateTime(e))return e;if(e&&e.valueOf&&et(e.valueOf()))return gi.fromJSDate(e);if(e&&typeof e==`object`)return gi.fromObject(e);throw new s(`Unknown datetime argument: ${e}, of type ${typeof e}`)}e.DateTime=gi,e.Duration=ur,e.FixedOffsetZone=Se,e.IANAZone=ne,e.Info=mr,e.Interval=pr,e.InvalidZone=Ce,e.Settings=Ie,e.SystemZone=F,e.VERSION=`3.7.2`,e.Zone=N})),Re=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDate=e.DAYS_IN_MONTH=e.DateMathOp=e.TimeUnit=void 0;var t=Le(),n;(function(e){e.Second=`Second`,e.Minute=`Minute`,e.Hour=`Hour`,e.Day=`Day`,e.Month=`Month`,e.Year=`Year`})(n||(e.TimeUnit=n={}));var r;(function(e){e.Add=`Add`,e.Subtract=`Subtract`})(r||(e.DateMathOp=r={})),e.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var i=class i{#e;#t=null;#n=null;#r={add:{[n.Year]:this.addYear.bind(this),[n.Month]:this.addMonth.bind(this),[n.Day]:this.addDay.bind(this),[n.Hour]:this.addHour.bind(this),[n.Minute]:this.addMinute.bind(this),[n.Second]:this.addSecond.bind(this)},subtract:{[n.Year]:this.subtractYear.bind(this),[n.Month]:this.subtractMonth.bind(this),[n.Day]:this.subtractDay.bind(this),[n.Hour]:this.subtractHour.bind(this),[n.Minute]:this.subtractMinute.bind(this),[n.Second]:this.subtractSecond.bind(this)}};constructor(e,n){let r={zone:n};if(e?e instanceof i?(this.#e=e.#e,this.#t=e.#t,this.#n=e.#n):e instanceof Date?this.#e=t.DateTime.fromJSDate(e,r):typeof e==`number`?this.#e=t.DateTime.fromMillis(e,r):(this.#e=t.DateTime.fromISO(e,r),this.#e.isValid||(this.#e=t.DateTime.fromRFC2822(e,r)),this.#e.isValid||(this.#e=t.DateTime.fromSQL(e,r)),this.#e.isValid||(this.#e=t.DateTime.fromFormat(e,`EEE, d MMM yyyy HH:mm:ss`,r))):this.#e=t.DateTime.local(),!this.#e.isValid)throw Error(`CronDate: unhandled timestamp: ${e}`);n&&n!==this.#e.zoneName&&(this.#e=this.#e.setZone(n))}static#i(e){return e%4==0&&e%100!=0||e%400==0}get dstStart(){return this.#t}set dstStart(e){this.#t=e}get dstEnd(){return this.#n}set dstEnd(e){this.#n=e}addYear(){this.#e=this.#e.plus({years:1})}addMonth(){this.#e=this.#e.plus({months:1}).startOf(`month`)}addDay(){this.#e=this.#e.plus({days:1}).startOf(`day`)}addHour(){this.#e=this.#e.plus({hours:1}).startOf(`hour`)}addMinute(){this.#e=this.#e.plus({minutes:1}).startOf(`minute`)}addSecond(){this.#e=this.#e.plus({seconds:1})}subtractYear(){this.#e=this.#e.minus({years:1})}subtractMonth(){this.#e=this.#e.minus({months:1}).endOf(`month`).startOf(`second`)}subtractDay(){this.#e=this.#e.minus({days:1}).endOf(`day`).startOf(`second`)}subtractHour(){this.#e=this.#e.minus({hours:1}).endOf(`hour`).startOf(`second`)}subtractMinute(){this.#e=this.#e.minus({minutes:1}).endOf(`minute`).startOf(`second`)}subtractSecond(){this.#e=this.#e.minus({seconds:1})}addUnit(e){this.#r.add[e]()}subtractUnit(e){this.#r.subtract[e]()}invokeDateOperation(e,t){if(e===r.Add){this.addUnit(t);return}if(e===r.Subtract){this.subtractUnit(t);return}throw Error(`Invalid verb: ${e}`)}getDate(){return this.#e.day}getFullYear(){return this.#e.year}getDay(){let e=this.#e.weekday;return e===7?0:e}getMonth(){return this.#e.month-1}getHours(){return this.#e.hour}getMinutes(){return this.#e.minute}getSeconds(){return this.#e.second}getMilliseconds(){return this.#e.millisecond}getUTCOffset(){return this.#e.offset}setStartOfDay(){this.#e=this.#e.startOf(`day`)}setEndOfDay(){this.#e=this.#e.endOf(`day`)}getTime(){return this.#e.valueOf()}getUTCDate(){return this.#a().day}getUTCFullYear(){return this.#a().year}getUTCDay(){let e=this.#a().weekday;return e===7?0:e}getUTCMonth(){return this.#a().month-1}getUTCHours(){return this.#a().hour}getUTCMinutes(){return this.#a().minute}getUTCSeconds(){return this.#a().second}toISOString(){return this.#e.toUTC().toISO()}toJSON(){return this.#e.toJSON()}setDate(e){this.#e=this.#e.set({day:e})}setFullYear(e){this.#e=this.#e.set({year:e})}setDay(e){this.#e=this.#e.set({weekday:e})}setMonth(e){this.#e=this.#e.set({month:e+1})}setHours(e){this.#e=this.#e.set({hour:e})}setMinutes(e){this.#e=this.#e.set({minute:e})}setSeconds(e){this.#e=this.#e.set({second:e})}setMilliseconds(e){this.#e=this.#e.set({millisecond:e})}toString(){return this.toDate().toString()}toDate(){return this.#e.toJSDate()}isLastDayOfMonth(){let{day:t,month:n}=this.#e;if(n===2){let r=i.#i(this.#e.year);return t===e.DAYS_IN_MONTH[n-1]-+!r}return t===e.DAYS_IN_MONTH[n-1]}isLastWeekdayOfMonth(){let{day:t,month:n}=this.#e,r;return r=n===2?e.DAYS_IN_MONTH[n-1]-+!i.#i(this.#e.year):e.DAYS_IN_MONTH[n-1],t>r-7}applyDateOperation(e,t,r){if(t===n.Month||t===n.Day){this.invokeDateOperation(e,t);return}let i=this.getHours();this.invokeDateOperation(e,t);let a=this.getHours(),o=a-i;o===2?r!==24&&(this.dstStart=a):o===0&&this.getMinutes()===0&&this.getSeconds()===0&&r!==24&&(this.dstEnd=a)}#a(){return this.#e.toUTC()}};e.CronDate=i,e.default=i})),ze=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMonth=void 0;var t=Re(),n=Z(),r=1,i=12,a=Object.freeze([]);e.CronMonth=class extends n.CronField{static get min(){return r}static get max(){return i}static get chars(){return a}static get daysInMonth(){return t.DAYS_IN_MONTH}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Be=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronSecond=void 0;var t=Z(),n=0,r=59,i=Object.freeze([]);e.CronSecond=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Ve=t((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Me(),e),n(Ne(),e),n(Pe(),e),n(Z(),e),n(Fe(),e),n(Ie(),e),n(ze(),e),n(Be(),e)})),He=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronFieldCollection=void 0;var t=Ve();e.CronFieldCollection=class e{#e;#t;#n;#r;#i;#a;static from(n,r){return new e({second:this.resolveField(t.CronSecond,n.second,r.second),minute:this.resolveField(t.CronMinute,n.minute,r.minute),hour:this.resolveField(t.CronHour,n.hour,r.hour),dayOfMonth:this.resolveField(t.CronDayOfMonth,n.dayOfMonth,r.dayOfMonth),month:this.resolveField(t.CronMonth,n.month,r.month),dayOfWeek:this.resolveField(t.CronDayOfWeek,n.dayOfWeek,r.dayOfWeek)})}static resolveField(e,n,r){return r?r instanceof t.CronField?r:new e(r):n}constructor({second:e,minute:n,hour:r,dayOfMonth:i,month:a,dayOfWeek:o}){if(!e)throw Error(`Validation error, Field second is missing`);if(!n)throw Error(`Validation error, Field minute is missing`);if(!r)throw Error(`Validation error, Field hour is missing`);if(!i)throw Error(`Validation error, Field dayOfMonth is missing`);if(!a)throw Error(`Validation error, Field month is missing`);if(!o)throw Error(`Validation error, Field dayOfWeek is missing`);if(a.values.length===1&&!i.hasLastChar&&!(parseInt(i.values[0],10)<=t.CronMonth.daysInMonth[a.values[0]-1]))throw Error(`Invalid explicit day of month definition`);this.#e=e,this.#t=n,this.#n=r,this.#i=a,this.#a=o,this.#r=i}get second(){return this.#e}get minute(){return this.#t}get hour(){return this.#n}get dayOfMonth(){return this.#r}get month(){return this.#i}get dayOfWeek(){return this.#a}static compactField(e){if(e.length===0)return[];let t=[],n;return e.forEach((e,r,i)=>{if(n===void 0){n={start:e,count:1};return}let a=i[r-1]||n.start,o=i[r+1];if(e===`L`||e===`W`){t.push(n),t.push({start:e,count:1}),n=void 0;return}if(n.step===void 0&&o!==void 0){let t=e-a;if(t<=o-e){n={...n,count:2,end:e,step:t};return}n.step=1}e-(n.end??0)===n.step?(n.count++,n.end=e):(n.count===1?t.push({start:n.start,count:1}):n.count===2?(t.push({start:n.start,count:1}),t.push({start:n.end??a,count:1})):t.push(n),n={start:e,count:1})}),n&&t.push(n),t}static#o(e,t,n){let r=t.step;return r?r===1&&t.start===e.min&&t.end&&t.end>=n?e.hasQuestionMarkChar?`?`:`*`:r!==1&&t.start===e.min&&t.end&&t.end>=n-r+1?`*/${r}`:null:null}static#s(e,t){let n=e.step;if(n===1)return`${e.start}-${e.end}`;let r=e.start===0?e.count-1:e.count;if(!n)throw Error(`Unexpected range step`);if(!e.end)throw Error(`Unexpected range end`);if(n*r>e.end){let t=(t,r)=>{if(typeof e.start!=`number`)throw Error(`Unexpected range start`);return r%n===0?e.start+r:null};if(typeof e.start!=`number`)throw Error(`Unexpected range start`);let r={length:e.end-e.start+1};return Array.from(r,t).filter(e=>e!==null).join(`,`)}return e.end===t-n+1?`${e.start}/${n}`:`${e.start}-${e.end}/${n}`}stringifyField(n){let r=n.max,i=n.values;if(n instanceof t.CronDayOfWeek){r=6;let e=this.#a.values;i=e[e.length-1]===7?e.slice(0,-1):e}n instanceof t.CronDayOfMonth&&(r=this.#i.values.length===1?t.CronMonth.daysInMonth[this.#i.values[0]-1]:n.max);let a=e.compactField(i);if(a.length===1){let t=e.#o(n,a[0],r);if(t)return t}return a.map(i=>{let a=i.count===1?i.start.toString():e.#s(i,r);return n instanceof t.CronDayOfWeek&&n.nthDay>0?`${a}#${n.nthDay}`:a}).join(`,`)}stringify(e=!1){let t=[];return e&&t.push(this.stringifyField(this.#e)),t.push(this.stringifyField(this.#t),this.stringifyField(this.#n),this.stringifyField(this.#r),this.stringifyField(this.#i),this.stringifyField(this.#a)),t.join(` `)}serialize(){return{second:this.#e.serialize(),minute:this.#t.serialize(),hour:this.#n.serialize(),dayOfMonth:this.#r.serialize(),month:this.#i.serialize(),dayOfWeek:this.#a.serialize()}}}})),Ue=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpression=e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;var t=Re();e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=`Out of the time span range`,e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=`Invalid expression, loop limit exceeded`;var n=1e4,r=class r{#e;#t;#n;#r;#i;#a;#o=null;#s=!1;constructor(e,n){this.#e=n,this.#t=n.tz,this.#r=n.startDate?new t.CronDate(n.startDate,this.#t):null,this.#i=n.endDate?new t.CronDate(n.endDate,this.#t):null;let r=n.currentDate??n.startDate;if(r){let e=new t.CronDate(r,this.#t);this.#r&&e.getTime()<this.#r.getTime()?r=this.#r:this.#i&&e.getTime()>this.#i.getTime()&&(r=this.#i)}this.#n=new t.CronDate(r,this.#t),this.#a=e}get fields(){return this.#a}static fieldsToExpression(e,t){return new r(e,t||{})}static#c(e,t){return t.some(t=>t===e)}#l(e,t){return e[t?e.length-1:0]}#u(e){let n=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`;if(this.#o===n)return this.#s;let r=new t.CronDate(e);r.setStartOfDay();let i=new t.CronDate(e);return i.setEndOfDay(),this.#o=n,this.#s=r.getUTCOffset()!==i.getUTCOffset(),this.#s}#d(e,n,r){let i=this.#a.second.values,a=e.getSeconds(),o=this.#a.second.findNearestValue(a,r);if(o!==null){e.setSeconds(o);return}e.applyDateOperation(n,t.TimeUnit.Minute,this.#a.hour.values.length),e.setSeconds(this.#l(i,r))}#f(e,n,r){let i=this.#a.minute.values,a=this.#a.second.values,o=e.getMinutes(),s=this.#a.minute.findNearestValue(o,r);if(s!==null){e.setMinutes(s),e.setSeconds(this.#l(a,r));return}e.applyDateOperation(n,t.TimeUnit.Hour,this.#a.hour.values.length),e.setMinutes(this.#l(i,r)),e.setSeconds(this.#l(a,r))}static#p(e,t){let n=t.isLastWeekdayOfMonth();return e.some(e=>{let r=parseInt(e.toString().charAt(0),10)%7;if(Number.isNaN(r))throw Error(`Invalid last weekday of the month expression: ${e}`);return t.getDay()===r&&n})}next(){return this.#_()}prev(){return this.#_(!0)}hasNext(){let e=this.#n;try{return this.#_(),!0}catch{return!1}finally{this.#n=e}}hasPrev(){let e=this.#n;try{return this.#_(!0),!0}catch{return!1}finally{this.#n=e}}take(e){let t=[];if(e>=0)for(let n=0;n<e;n++)try{t.push(this.next())}catch{return t}else for(let n=0;n>e;n--)try{t.push(this.prev())}catch{return t}return t}reset(e){this.#n=new t.CronDate(e||this.#e.currentDate)}stringify(e=!1){return this.#a.stringify(e)}includesDate(e){let{second:n,minute:r,hour:i,month:a}=this.#a,o=new t.CronDate(e,this.#t);return!(!n.values.includes(o.getSeconds())||!r.values.includes(o.getMinutes())||!i.values.includes(o.getHours())||!a.values.includes(o.getMonth()+1)||!this.#m(o)||this.#a.dayOfWeek.nthDay>0&&Math.ceil(o.getDate()/7)!==this.#a.dayOfWeek.nthDay)}toString(){return this.#e.expression||this.stringify(!0)}#m(e){let t=this.#a.dayOfMonth.isWildcard,n=!t,i=this.#a.dayOfWeek.isWildcard,a=!i,o=r.#c(e.getDate(),this.#a.dayOfMonth.values)||this.#a.dayOfMonth.hasLastChar&&e.isLastDayOfMonth(),s=r.#c(e.getDay(),this.#a.dayOfWeek.values)||this.#a.dayOfWeek.hasLastChar&&r.#p(this.#a.dayOfWeek.values,e);return!!(n&&a&&(o||s)||o&&!a||t&&!i&&s)}#h(e,n,i){let a=this.#a.hour.values,o=a,s=e.getHours(),c=r.#c(s,a),l=e.dstStart===s,u=e.dstEnd===s;if(l)return r.#c(s-1,a)?!0:(e.invokeDateOperation(n,t.TimeUnit.Hour),!1);if(u&&!i)return e.dstEnd=null,e.applyDateOperation(t.DateMathOp.Add,t.TimeUnit.Hour,o.length),!1;if(c)return!0;e.dstStart=null;let d=this.#a.hour.findNearestValue(s,i);if(d===null)return e.applyDateOperation(n,t.TimeUnit.Day,o.length),!1;if(this.#u(e)){let r=i?s-d:d-s;for(let i=0;i<r;i++)e.applyDateOperation(n,t.TimeUnit.Hour,o.length)}else e.setHours(d);return e.setMinutes(this.#l(this.#a.minute.values,i)),e.setSeconds(this.#l(this.#a.second.values,i)),!1}#g(t){if(!this.#r&&!this.#i)return;let n=t.getTime();if(this.#r&&n<this.#r.getTime()||this.#i&&n>this.#i.getTime())throw Error(e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}#_(i=!1){let a=i?t.DateMathOp.Subtract:t.DateMathOp.Add,o=new t.CronDate(this.#n),s=o.getTime(),c=0;for(;++c<n;){if(this.#g(o),!this.#m(o)){o.applyDateOperation(a,t.TimeUnit.Day,this.#a.hour.values.length);continue}if(!(this.#a.dayOfWeek.nthDay<=0||Math.ceil(o.getDate()/7)===this.#a.dayOfWeek.nthDay)){o.applyDateOperation(a,t.TimeUnit.Day,this.#a.hour.values.length);continue}if(!r.#c(o.getMonth()+1,this.#a.month.values)){o.applyDateOperation(a,t.TimeUnit.Month,this.#a.hour.values.length);continue}if(this.#h(o,a,i)){if(!r.#c(o.getMinutes(),this.#a.minute.values)){this.#f(o,a,i);continue}if(!r.#c(o.getSeconds(),this.#a.second.values)){this.#d(o,a,i);continue}if(s===o.getTime()){(a===`Add`||o.getMilliseconds()===0)&&o.applyDateOperation(a,t.TimeUnit.Second,this.#a.hour.values.length);continue}break}}if(c>n)throw Error(e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return o.getMilliseconds()!==0&&o.setMilliseconds(0),this.#n=o,o}[Symbol.iterator](){return{next:()=>({value:this.#_(),done:!this.hasNext()})}}};e.CronExpression=r,e.default=r})),We=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.seededRandom=r;function t(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return()=>t>>>0}function n(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function r(e){return n(e?t(e)():Math.floor(Math.random()*1e10))}})),Ge=t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpressionParser=e.DayOfWeek=e.Months=e.CronUnit=e.PredefinedExpressions=void 0;var t=He(),n=Ue(),r=We(),i=Ve(),a;(function(e){e[`@yearly`]=`0 0 0 1 1 *`,e[`@annually`]=`0 0 0 1 1 *`,e[`@monthly`]=`0 0 0 1 * *`,e[`@weekly`]=`0 0 0 * * 0`,e[`@daily`]=`0 0 0 * * *`,e[`@hourly`]=`0 0 * * * *`,e[`@minutely`]=`0 * * * * *`,e[`@secondly`]=`* * * * * *`,e[`@weekdays`]=`0 0 0 * * 1-5`,e[`@weekends`]=`0 0 0 * * 0,6`})(a||(e.PredefinedExpressions=a={}));var o;(function(e){e.Second=`Second`,e.Minute=`Minute`,e.Hour=`Hour`,e.DayOfMonth=`DayOfMonth`,e.Month=`Month`,e.DayOfWeek=`DayOfWeek`})(o||(e.CronUnit=o={}));var s;(function(e){e[e.jan=1]=`jan`,e[e.feb=2]=`feb`,e[e.mar=3]=`mar`,e[e.apr=4]=`apr`,e[e.may=5]=`may`,e[e.jun=6]=`jun`,e[e.jul=7]=`jul`,e[e.aug=8]=`aug`,e[e.sep=9]=`sep`,e[e.oct=10]=`oct`,e[e.nov=11]=`nov`,e[e.dec=12]=`dec`})(s||(e.Months=s={}));var c;(function(e){e[e.sun=0]=`sun`,e[e.mon=1]=`mon`,e[e.tue=2]=`tue`,e[e.wed=3]=`wed`,e[e.thu=4]=`thu`,e[e.fri=5]=`fri`,e[e.sat=6]=`sat`})(c||(e.DayOfWeek=c={})),e.CronExpressionParser=class e{static parse(s,c={}){let{strict:l=!1,hashSeed:u}=c,d=(0,r.seededRandom)(u);s=a[s]||s;let f=e.#e(s,l);if(!(f.dayOfMonth===`*`||f.dayOfWeek===`*`||!l))throw Error(`Cannot use both dayOfMonth and dayOfWeek together in strict mode!`);let p=e.#t(o.Second,f.second,i.CronSecond.constraints,d),m=e.#t(o.Minute,f.minute,i.CronMinute.constraints,d),h=e.#t(o.Hour,f.hour,i.CronHour.constraints,d),g=e.#t(o.Month,f.month,i.CronMonth.constraints,d),_=e.#t(o.DayOfMonth,f.dayOfMonth,i.CronDayOfMonth.constraints,d),{dayOfWeek:v,nthDayOfWeek:y}=e.#u(f.dayOfWeek),b=e.#t(o.DayOfWeek,v,i.CronDayOfWeek.constraints,d),x=new t.CronFieldCollection({second:new i.CronSecond(p,{rawValue:f.second}),minute:new i.CronMinute(m,{rawValue:f.minute}),hour:new i.CronHour(h,{rawValue:f.hour}),dayOfMonth:new i.CronDayOfMonth(_,{rawValue:f.dayOfMonth}),month:new i.CronMonth(g,{rawValue:f.month}),dayOfWeek:new i.CronDayOfWeek(b,{rawValue:f.dayOfWeek,nthDayOfWeek:y})});return new n.CronExpression(x,{...c,expression:s})}static#e(e,t){if(t&&!e.length)throw Error(`Invalid cron expression`);e||=`0 * * * * *`;let n=e.trim().split(/\s+/);if(t&&n.length<6)throw Error(`Invalid cron expression, expected 6 fields`);if(n.length>6)throw Error(`Invalid cron expression, too many fields`);let r=[`*`,`*`,`*`,`*`,`*`,`0`];n.length<r.length&&n.unshift(...r.slice(n.length));let[i,a,o,s,c,l]=n;return{second:i,minute:a,hour:o,dayOfMonth:s,month:c,dayOfWeek:l}}static#t(e,t,n,r){if((e===o.Month||e===o.DayOfWeek)&&(t=t.replace(/[a-z]{3}/gi,e=>{e=e.toLowerCase();let t=s[e]||c[e];if(t===void 0)throw Error(`Validation error, cannot resolve alias "${e}"`);return t.toString()})),!n.validChars.test(t))throw Error(`Invalid characters, got value: ${t}`);return t=this.#n(t,n),t=this.#r(t,n,r),this.#i(e,t,n)}static#n(e,t){return e.replace(/[*?]/g,t.min+`-`+t.max)}static#r(e,t,n){let r=n();return e.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(e,n,i,a)=>{if(n&&i&&a){let e=parseInt(n,10),o=parseInt(i,10),s=parseInt(a,10);if(e>o)throw Error(`Invalid range: ${e}-${o}, min > max`);if(s<=0)throw Error(`Invalid step: ${s}, must be positive`);let c=Math.max(e,t.min),l=Math.floor(r*s),u=[];for(let e=Math.floor(c/s)*s+l;e<=o;e+=s)e>=c&&u.push(e);return u.join(`,`)}else if(n&&i){let e=parseInt(n,10),t=parseInt(i,10);if(e>t)throw Error(`Invalid range: ${e}-${t}, min > max`);return String(Math.floor(r*(t-e+1))+e)}else if(a){let e=parseInt(a,10);if(e<=0)throw Error(`Invalid step: ${e}, must be positive`);let n=Math.floor(r*e),i=[];for(let r=Math.floor(t.min/e)*e+n;r<=t.max;r+=e)r>=t.min&&i.push(r);return i.join(`,`)}else return String(Math.floor(r*(t.max-t.min+1)+t.min))})}static#i(t,n,r){let i=[];function a(n,r){if(Array.isArray(n))i.push(...n);else if(e.#d(r,n))i.push(n);else{let e=parseInt(n.toString(),10);if(!(e>=r.min&&e<=r.max))throw Error(`Constraint error, got value ${n} expected range ${r.min}-${r.max}`);i.push(t===o.DayOfWeek?e%7:n)}}return n.split(`,`).forEach(n=>{if(!(n.length>0))throw Error(`Invalid list value format`);a(e.#a(t,n,r),r)}),i}static#a(t,n,r){let i=n.split(`/`);if(i.length>2)throw Error(`Invalid repeat: ${n}`);return i.length===2?(isNaN(parseInt(i[0],10))||(i[0]=`${i[0]}-${r.max}`),e.#l(t,i[0],parseInt(i[1],10),r)):e.#l(t,n,1,r)}static#o(e,t,n){if(!(!isNaN(e)&&!isNaN(t)&&e>=n.min&&t<=n.max))throw Error(`Constraint error, got range ${e}-${t} expected range ${n.min}-${n.max}`);if(e>t)throw Error(`Invalid range: ${e}-${t}, min(${e}) > max(${t})`)}static#s(e){if(!(!isNaN(e)&&e>0))throw Error(`Constraint error, cannot repeat at every ${e} time.`)}static#c(e,t,n,r){let i=[];e===o.DayOfWeek&&n%7==0&&i.push(0);for(let e=t;e<=n;e+=r)i.indexOf(e)===-1&&i.push(e);return i}static#l(e,t,n,r){let i=t.split(`-`);if(i.length<=1)return isNaN(+t)?t:+t;let[a,o]=i.map(e=>parseInt(e,10));return this.#o(a,o,r),this.#s(n),this.#c(e,a,o,n)}static#u(e){let t=e.split(`#`);if(t.length<=1)return{dayOfWeek:t[0]};let n=+t[t.length-1],r=e.match(/([,-/])/);if(r!==null)throw Error(`Constraint error, invalid dayOfWeek \`#\` and \`${r?.[0]}\` special characters are incompatible`);if(!(t.length<=2&&!isNaN(n)&&n>=1&&n<=5))throw Error(`Constraint error, invalid dayOfWeek occurrence number (#)`);return{dayOfWeek:t[0],nthDayOfWeek:n}}static#d(e,t){return e.chars.some(e=>t.toString().includes(e))}}})),Ke=t(((e,t)=>{t.exports={}})),qe=t((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a=e(r),o=0;o<a.length;o++)a[o]!=="default"&&t(i,r,a[o]);return n(i,r),i}})();Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=void 0;var i=Ge();e.CronFileParser=class e{static async parseFile(t){let{readFile:n}=await Promise.resolve().then(()=>r(Ke())),i=await n(t,`utf8`);return e.#e(i)}static parseFileSync(t){let{readFileSync:n}=Ke(),r=n(t,`utf8`);return e.#e(r)}static#e(t){let n=t.split(`
|
|
2
|
-
`),r={variables:{},expressions:[],errors:{}};for(let t of n){let n=t.trim();if(n.length===0||n.startsWith(`#`))continue;let i=n.match(/^(.*)=(.*)$/);if(i){let[,e,t]=i;r.variables[e]=t.replace(/["']/g,``);continue}try{let t=e.#t(n);r.expressions.push(t.interval)}catch(e){r.errors[n]=e}}return r}static#t(e){let t=e.split(` `);return{interval:i.CronExpressionParser.parse(t.slice(0,5).join(` `)),command:t.slice(5,t.length)}}}})),Je=t((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=e.CronExpressionParser=e.CronExpression=e.CronFieldCollection=e.CronDate=void 0;var r=Ge(),i=Re();Object.defineProperty(e,"CronDate",{enumerable:!0,get:function(){return i.CronDate}});var a=He();Object.defineProperty(e,"CronFieldCollection",{enumerable:!0,get:function(){return a.CronFieldCollection}});var o=Ue();Object.defineProperty(e,"CronExpression",{enumerable:!0,get:function(){return o.CronExpression}});var s=Ge();Object.defineProperty(e,"CronExpressionParser",{enumerable:!0,get:function(){return s.CronExpressionParser}});var c=qe();Object.defineProperty(e,"CronFileParser",{enumerable:!0,get:function(){return c.CronFileParser}}),n(Ve(),e),e.default=r.CronExpressionParser}))();function Ye(e){return Array.isArray(e)?e.filter(e=>typeof e==`number`).sort((e,t)=>e-t):[]}function Xe(e){if(e.length<2)return null;let t=e[1]-e[0];if(t<=0)return null;for(let n=2;n<e.length;n++)if(e[n]-e[n-1]!==t)return null;return t}function Ze(e,t,n){let r=new Date;return r.setHours(e,t,0,0),r.toLocaleTimeString(n,{hour:`numeric`,minute:`2-digit`})}function Qe(e,t){let n=e===7?0:e;return new Date(Date.UTC(2023,0,1)+n*864e5).toLocaleDateString(t,{weekday:`short`,timeZone:`UTC`})}function $e(e,t){return e.length<=1?e[0]??``:t.startsWith(`zh`)?e.join(`、`):e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(`, `)}, and ${e.at(-1)}`}function Q(e){return e.length===5&&e.every((e,t)=>e===t+1)}function et(e){if(e.length!==2)return!1;let t=[...e].toSorted((e,t)=>e-t);return t[0]===0&&t[1]===6}function tt(e,t,n,r){try{let i=Je.CronExpressionParser.parse(e,{...r?.timezone?{tz:r.timezone}:{}}).fields,a=Ye(i.minute.values),o=Ye(i.hour.values),s=Ye(i.dayOfWeek.values),c=Ye(i.dayOfMonth.values);if(a.length===60&&i.hour.isWildcard&&i.dayOfMonth.isWildcard&&i.month.isWildcard&&i.dayOfWeek.isWildcard)return n.everyMinute;if(!i.minute.isWildcard&&i.hour.isWildcard&&i.dayOfMonth.isWildcard&&i.month.isWildcard&&i.dayOfWeek.isWildcard&&a.length>1){let e=Xe(a);if(e!=null&&e>0)return n.everyNMinutes.replace(`{{n}}`,String(e))}if(!i.minute.isWildcard&&a.length===1&&!i.hour.isWildcard&&o.length>1&&i.dayOfMonth.isWildcard&&i.month.isWildcard&&i.dayOfWeek.isWildcard){let e=Xe(o);if(e!=null&&e>0)return n.everyNHours.replace(`{{n}}`,String(e))}if(!i.minute.isWildcard&&a.length===1&&i.hour.isWildcard&&i.dayOfMonth.isWildcard&&i.month.isWildcard&&i.dayOfWeek.isWildcard&&o.length===24)return n.hourly;let l=!i.minute.isWildcard&&a.length===1&&!i.hour.isWildcard&&o.length===1?Ze(o[0],a[0],t):``;if(l&&i.dayOfMonth.isWildcard&&i.month.isWildcard&&i.dayOfWeek.isWildcard)return n.dailyAt.replace(`{{time}}`,l);if(l&&i.dayOfMonth.isWildcard&&i.month.isWildcard&&!i.dayOfWeek.isWildcard&&Q(s))return n.weekdaysAt.replace(`{{time}}`,l);if(l&&i.dayOfMonth.isWildcard&&i.month.isWildcard&&!i.dayOfWeek.isWildcard&&et(s))return n.weekendsAt.replace(`{{time}}`,l);if(l&&i.dayOfMonth.isWildcard&&i.month.isWildcard&&!i.dayOfWeek.isWildcard&&s.length===1){let e=Qe(s[0],t);return n.weeklyOn.replace(`{{day}}`,e).replace(`{{time}}`,l)}if(l&&i.dayOfMonth.isWildcard&&i.month.isWildcard&&!i.dayOfWeek.isWildcard&&s.length>1){let e=$e(s.map(e=>Qe(e,t)),t);return n.daysAt.replace(`{{days}}`,e).replace(`{{time}}`,l)}return l&&!i.dayOfMonth.isWildcard&&c.length===1&&i.month.isWildcard&&i.dayOfWeek.isWildcard?n.monthlyAt.replace(`{{day}}`,String(c[0])).replace(`{{time}}`,l):n.customSchedule}catch{return null}}function nt(e,t,n,r){let i=e.trim();return i?tt(i,t,n,r)||rt(r?.nextRun,t)||n.customSchedule:rt(r?.nextRun,t)||`—`}function rt(e,t){if(!e)return``;let n=new Date(e);return Number.isNaN(n.getTime())?``:n.toLocaleString(t,{weekday:`short`,hour:`numeric`,minute:`2-digit`})}var it=1e3,at=60*it,ot=60*at,st=24*ot,ct=7*st,lt=new Intl.ListFormat(`en-US`,{type:`conjunction`}),ut=Object.fromEntries([`second`,`minute`,`hour`,`day`,`week`].map(e=>[e,new Intl.NumberFormat(`en-US`,{style:`unit`,unit:e,unitDisplay:`long`})])),dt={en:new Intl.DateTimeFormat(`en-US`,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}),zh:new Intl.DateTimeFormat(`zh-CN`,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})},ft={en:new Intl.DateTimeFormat(`en-US`,{hour:`2-digit`,minute:`2-digit`}),zh:new Intl.DateTimeFormat(`zh-CN`,{hour:`2-digit`,minute:`2-digit`})},$={minute:at,hour:ot,day:st,week:ct};function pt(e){return e===`zh`?`zh-CN`:`en-US`}function mt(e,t,n){return n===`zh`?`${e} ${t===`week`?`周`:t===`day`?`天`:t===`hour`?`小时`:t===`minute`?`分钟`:`秒`}`:ut[String(t)].format(e)}function ht(e,t){return t===`zh`?e.join(` `):lt.format(e)}function gt(e,t){let n=typeof e==`number`?e:Number.parseFloat(e);return Math.max(at,Math.round((Number.isFinite(n)&&n>0?n:1)*$[t]))}function _t(e,t,n){let r=typeof e==`number`?e:Number.parseFloat(e),i=Number.isFinite(r)&&r>0?r:1;return String(Number.parseFloat((i*$[t]/$[n]).toFixed(6)))}function vt(e,t){let n=Math.max(it,Math.round(e)),r=n===st?[{unit:`hour`,ms:ot}]:n>=ct&&n%ct===0?[{unit:`week`,ms:ct}]:n>=st?[{unit:`day`,ms:st},{unit:`hour`,ms:ot},{unit:`minute`,ms:at},{unit:`second`,ms:it}]:n>=ot?[{unit:`hour`,ms:ot},{unit:`minute`,ms:at},{unit:`second`,ms:it}]:n>=at?[{unit:`minute`,ms:at},{unit:`second`,ms:it}]:[{unit:`second`,ms:it}],i=n,a=[];for(let{unit:e,ms:n}of r){let r=Math.floor(i/n);r<=0||(a.push(mt(r,e,t)),i%=n)}return ht(a,t)}function yt(e,t){let n=vt(e,t);return t===`zh`?`每 ${n}运行一次`:`Runs every ${n}`}function bt(e,t){return dt[t].format(new Date(e))}function xt(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())}function St(e,t,n=Date.now()){let r=new Date(e),i=Math.round((xt(r)-xt(new Date(n)))/st),a=ft[t].format(r);return i===0?t===`zh`?`今天 ${a}`:`today at ${a}`:i===1?t===`zh`?`明天 ${a}`:`tomorrow at ${a}`:i===-1?t===`zh`?`昨天 ${a}`:`yesterday at ${a}`:bt(e,t)}function Ct(e,t){return e.eventType===`task.attention_required.v2`&&e.payloadMatch?.reason===`blocked`?t.trigger.taskBlockedWhen:e.eventType===`note.created`?t.trigger.noteCreatedWhen:e.eventType===`workflow.run.completed`&&e.payloadMatch?.status===`failed`?t.trigger.workflowFailedWhen:e.eventType===`session.transcript.updated`?t.trigger.sessionUpdatedWhen:t.trigger.eventWithType.replace(`{type}`,e.eventType)}function wt(e,t,n,r){if(e.kind===`manual`)return t.trigger.manualWhen;if(e.kind===`webhook`)return t.trigger.webhookWhen;if(e.kind===`event`)return Ct(e,t);let i=e.schedule;return i.kind===`once`?t.trigger.onceAt.replace(`{time}`,St(Date.parse(i.at),r)):i.kind===`interval`?yt(i.everyMs,r):nt(i.expr,pt(r),n.scheduleBadge,{timezone:i.tz})}function Tt(e,t,n,r=Date.now()){return e.enabled?e.state.nextRunAtMs?St(e.state.nextRunAtMs,n,r):e.trigger.kind===`manual`?t.info.noAutomaticTrigger:e.trigger.kind===`event`||e.trigger.kind===`webhook`?t.info.waitingForTrigger:t.info.noUpcomingRun:t.info.pausedNoAutomaticRuns}function Et(e,t,n,r=Date.now()){if(!e.state.lastRunAtMs)return t.info.notRunYet;let i=St(e.state.lastRunAtMs,n,r),a=e.state.lastRunStatus;return a?`${i} · ${t.status[a]}`:i}var Dt={name:``,description:``,projectId:``,triggerMode:`daily`,time:`09:00`,weekday:`1`,intervalValue:`1`,intervalUnit:`hour`,cronExpr:`0 9 * * *`,webhookSecretId:``,onceAt:``,eventType:``,eventSource:``,eventPayloadMatch:``,actionMode:`agent`,agentId:``,model:``,instruction:``,taskId:``,workflowId:``,workflowGoal:``,workflowInput:{goal:``,argValues:{},schemaInput:{},concurrency:``,maxSubagents:``},workflowInputValid:!0,browserAutomationId:``,browserAutomationInputs:{},safetyMode:`suggest_only`,timeoutSeconds:`1800`,conversationMode:`new_session`,notificationPolicy:`attention`,completionWebhookUrl:``,disableAfterFailures:`3`},Ot=[{value:`15`,unit:`minute`},{value:`30`,unit:`minute`},{value:`1`,unit:`hour`},{value:`6`,unit:`hour`},{value:`24`,unit:`hour`}];function kt(e,t){let[n,r]=e.time.split(`:`),i=Number.parseInt(n||`9`,10),a=Number.parseInt(r||`0`,10),o;if(e.triggerMode===`manual`)o={kind:`manual`};else if(e.triggerMode===`once`)o={kind:`schedule`,schedule:{kind:`once`,at:new Date(e.onceAt).toISOString()}};else if(e.triggerMode===`webhook`)o={kind:`webhook`,...e.webhookSecretId.trim()?{secretId:e.webhookSecretId.trim()}:{}};else if(e.triggerMode===`taskBlocked`)o={kind:`event`,eventType:`task.attention_required.v2`,source:`tasks`,payloadMatch:{reason:`blocked`}};else if(e.triggerMode===`noteCreated`)o={kind:`event`,eventType:`note.created`,source:`notes`};else if(e.triggerMode===`workflowFailed`)o={kind:`event`,eventType:`workflow.run.completed`,source:`workflows`,payloadMatch:{status:`failed`}};else if(e.triggerMode===`sessionUpdated`)o={kind:`event`,eventType:`session.transcript.updated`,source:`sessions`};else if(e.triggerMode===`event`){let t=e.eventPayloadMatch.trim()?JSON.parse(e.eventPayloadMatch):void 0;o={kind:`event`,eventType:e.eventType.trim(),...e.eventSource.trim()?{source:e.eventSource.trim()}:{},...t?{payloadMatch:t}:{}}}else o=e.triggerMode===`interval`?{kind:`schedule`,schedule:{kind:`interval`,everyMs:gt(e.intervalValue,e.intervalUnit)}}:e.triggerMode===`weekly`?{kind:`schedule`,schedule:{kind:`cron`,expr:`${a} ${i} * * ${e.weekday}`}}:e.triggerMode===`cron`?{kind:`schedule`,schedule:{kind:`cron`,expr:e.cronExpr.trim()}}:{kind:`schedule`,schedule:{kind:`cron`,expr:`${a} ${i} * * *`}};let s=T(t,e.workflowInput),c=e.workflowInput.goal.trim()||e.workflowGoal.trim(),l=e.actionMode===`browser_automation`||e.actionMode===`task_command`?`auto_apply`:e.safetyMode,u;return u=e.actionMode===`workflow`?{kind:`workflow`,workflowId:e.workflowId.trim(),...e.agentId.trim()?{agentId:e.agentId.trim()}:{},...s===void 0?{}:{input:s},...c?{goal:c}:{},...e.workflowInput.concurrency.trim()?{concurrency:Math.max(1,Number.parseInt(e.workflowInput.concurrency,10)||1)}:{},...e.workflowInput.maxSubagents.trim()?{maxSubagents:Math.max(1,Number.parseInt(e.workflowInput.maxSubagents,10)||1)}:{}}:e.actionMode===`browser_automation`?{kind:`browser_automation`,automationId:e.browserAutomationId.trim(),inputs:e.browserAutomationInputs}:e.actionMode===`task_command`?{kind:`task_command`,taskId:e.taskId.trim(),command:{type:`start`,executor:{kind:`agent`,agentId:e.agentId.trim()}}}:{kind:`agent`,instruction:e.instruction.trim(),...e.agentId.trim()?{agentId:e.agentId.trim()}:{},...e.model.trim()?{model:e.model.trim()}:{}},{name:e.name.trim(),...e.description.trim()?{description:e.description.trim()}:{},...e.projectId.trim()?{projectId:e.projectId.trim()}:{},trigger:o,action:u,safety:{mode:l},conversationMode:e.conversationMode,notificationPolicy:e.notificationPolicy,...l===`auto_apply`&&e.completionWebhookUrl.trim()?{completionWebhookUrl:e.completionWebhookUrl.trim()}:{},reliability:{executionTimeoutSeconds:Math.max(1,Number.parseInt(e.timeoutSeconds,10)||1800),disableAfterConsecutiveFailures:Math.max(1,Number.parseInt(e.disableAfterFailures,10)||3)}}}function At(e){let t=e.match(/^(\d{1,2})\s+(\d{1,2})\s+\*\s+\*\s+\*$/);if(t)return{triggerMode:`daily`,time:`${t[2].padStart(2,`0`)}:${t[1].padStart(2,`0`)}`,weekday:`1`,cronExpr:e};let n=e.match(/^(\d{1,2})\s+(\d{1,2})\s+\*\s+\*\s+([0-6])$/);return n?{triggerMode:`weekly`,time:`${n[2].padStart(2,`0`)}:${n[1].padStart(2,`0`)}`,weekday:n[3],cronExpr:e}:{triggerMode:`cron`,time:Dt.time,weekday:Dt.weekday,cronExpr:e}}function jt(e){let t=[[`week`,10080*6e4],[`day`,1440*6e4],[`hour`,60*6e4],[`minute`,6e4]],[n,r]=t.find(([,t])=>e>=t&&e%t===0)??t.at(-1);return{intervalValue:String(e/r),intervalUnit:n}}function Mt(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let n=t.getTimezoneOffset()*6e4;return new Date(t.getTime()-n).toISOString().slice(0,16)}function Nt(e){let t=e.payloadMatch;return e.eventType===`task.attention_required.v2`&&e.source===`tasks`&&t?.reason===`blocked`?{triggerMode:`taskBlocked`}:e.eventType===`note.created`&&e.source===`notes`&&!t?{triggerMode:`noteCreated`}:e.eventType===`workflow.run.completed`&&e.source===`workflows`&&t?.status===`failed`?{triggerMode:`workflowFailed`}:e.eventType===`session.transcript.updated`&&e.source===`sessions`&&!t?{triggerMode:`sessionUpdated`}:{triggerMode:`event`,eventType:e.eventType,eventSource:e.source??``,eventPayloadMatch:t?JSON.stringify(t,null,2):``}}function Pt(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function Ft(e){if(!e.trim())return!0;try{let t=JSON.parse(e);return!!t&&typeof t==`object`&&!Array.isArray(t)&&Object.values(t).every(e=>e===null||[`string`,`number`,`boolean`].includes(typeof e))}catch{return!1}}function It(e,t=[]){let n={triggerMode:`manual`};if(e.trigger.kind===`webhook`)n={triggerMode:`webhook`,webhookSecretId:e.trigger.secretId??``};else if(e.trigger.kind===`event`)n=Nt(e.trigger);else if(e.trigger.kind===`schedule`){let t=e.trigger.schedule;t.kind===`cron`&&(n=At(t.expr)),t.kind===`interval`&&(n={triggerMode:`interval`,...jt(t.everyMs)}),t.kind===`once`&&(n={triggerMode:`once`,onceAt:Mt(t.at)})}let r=e.action,i=r.kind===`workflow`?t.find(e=>e.id===r.workflowId)??null:null,a=r.kind===`workflow`?Pt(r.input):{},o=e.reliability?.executionTimeoutSeconds??(`timeoutSeconds`in r?r.timeoutSeconds:void 0)??e.reliability?.timeoutSeconds??(r.kind===`browser_automation`?600:1800);return{...Dt,...n,name:e.name,description:e.description??``,projectId:e.projectId??``,actionMode:r.kind,agentId:r.kind===`agent`||r.kind===`workflow`?r.agentId??``:r.kind===`task_command`&&r.command.type===`start`&&r.command.executor.kind===`agent`?r.command.executor.agentId:``,model:r.kind===`agent`?r.model??``:``,instruction:r.kind===`agent`?r.instruction:``,taskId:r.kind===`task_command`?r.taskId:``,workflowId:r.kind===`workflow`?r.workflowId:``,workflowGoal:r.kind===`workflow`?r.goal??``:``,browserAutomationId:r.kind===`browser_automation`?r.automationId:``,browserAutomationInputs:r.kind===`browser_automation`?r.inputs??{}:{},workflowInput:{goal:r.kind===`workflow`?r.goal??``:``,argValues:i?w(i.name,a):{},schemaInput:a,concurrency:r.kind===`workflow`&&r.concurrency?String(r.concurrency):``,maxSubagents:r.kind===`workflow`&&r.maxSubagents?String(r.maxSubagents):``},workflowInputValid:!0,safetyMode:e.safety?.mode??`auto_apply`,timeoutSeconds:String(o),conversationMode:e.conversationMode??`new_session`,notificationPolicy:e.notificationPolicy??`attention`,completionWebhookUrl:e.completionWebhookUrl??``,disableAfterFailures:String(e.reliability?.disableAfterConsecutiveFailures??3)}}function Lt(e,t,n){let r=kt(t,n),i=e.trigger.kind===`schedule`&&r.trigger.kind===`schedule`&&e.trigger.schedule.kind===r.trigger.schedule.kind?{...r.trigger,schedule:{...e.trigger.schedule,...r.trigger.schedule}}:r.trigger,a=r.action;return e.action.kind===`agent`&&r.action.kind===`agent`?a={...e.action,...r.action,agentId:r.action.agentId,model:r.action.model}:e.action.kind===`workflow`&&r.action.kind===`workflow`?a={...e.action,...r.action,agentId:r.action.agentId,input:r.action.input,goal:r.action.goal,concurrency:r.action.concurrency,maxSubagents:r.action.maxSubagents}:e.action.kind===`browser_automation`&&r.action.kind===`browser_automation`?a={...e.action,...r.action}:e.action.kind===`task_command`&&r.action.kind===`task_command`&&(a=r.action),{...r,description:t.description.trim(),projectId:t.projectId.trim(),completionWebhookUrl:t.completionWebhookUrl.trim(),trigger:i,action:a,reliability:{...e.reliability,...r.reliability}}}function Rt(e){return[`reminder`,`brief`,`review`,`followUp`].map(t=>{let n=e.scenarios[t];return{...n,requiresProject:t===`followUp`,form:{...Dt,name:n.name,instruction:t===`reminder`?``:n.instruction,triggerMode:t===`reminder`?`once`:t===`review`?`weekly`:`daily`,time:t===`brief`?`08:30`:t===`review`?`17:00`:`09:00`,weekday:`5`,notificationPolicy:`all`}}})}var zt=`w-full rounded-lg border border-edge bg-surface-base px-3 py-2 text-sm text-fg focus-visible:outline-2 focus-visible:outline-accent`;function Bt(e){let t=(0,Te.c)(99),{form:n,setForm:r,labels:i,projects:a,projectLocked:o,source:s,requiresProject:c}=e,l;t[0]===r?l=t[1]:(l=e=>r(t=>({...t,...e})),t[0]=r,t[1]=l);let f=l,p;t[2]!==i.experience.source||t[3]!==s?(p=(0,Y.jsxs)(`p`,{className:`text-sm text-fg-muted`,children:[i.experience.source,`: `,s]}),t[2]=i.experience.source,t[3]=s,t[4]=p):p=t[4];let m;t[5]===f?m=t[6]:(m=e=>f({name:e.target.value}),t[5]=f,t[6]=m);let h;t[7]!==n.name||t[8]!==m?(h=(0,Y.jsx)(`input`,{className:zt,value:n.name,onChange:m}),t[7]=n.name,t[8]=m,t[9]=h):h=t[9];let g;t[10]!==i.form.name||t[11]!==h?(g=(0,Y.jsxs)(`label`,{className:`grid gap-2 text-sm text-fg`,children:[i.form.name,h]}),t[10]=i.form.name,t[11]=h,t[12]=g):g=t[12];let _;t[13]===f?_=t[14]:(_=e=>f({instruction:e.target.value}),t[13]=f,t[14]=_);let v;t[15]!==n.instruction||t[16]!==_?(v=(0,Y.jsx)(`textarea`,{className:zt,rows:5,value:n.instruction,onChange:_}),t[15]=n.instruction,t[16]=_,t[17]=v):v=t[17];let y;t[18]!==i.info.task||t[19]!==v?(y=(0,Y.jsxs)(`label`,{className:`grid gap-2 text-sm text-fg`,children:[i.info.task,v]}),t[18]=i.info.task,t[19]=v,t[20]=y):y=t[20];let b;t[21]!==n.projectId||t[22]!==i.form.noProject||t[23]!==i.form.project||t[24]!==o||t[25]!==a||t[26]!==f?(b=!o&&(0,Y.jsxs)(`label`,{className:`grid gap-2 text-sm text-fg`,children:[i.form.project,(0,Y.jsxs)(u,{className:zt,value:n.projectId,onChange:e=>f({projectId:e.target.value}),children:[(0,Y.jsx)(d,{value:``,children:i.form.noProject}),a.map(Vt)]})]}),t[21]=n.projectId,t[22]=i.form.noProject,t[23]=i.form.project,t[24]=o,t[25]=a,t[26]=f,t[27]=b):b=t[27];let x;t[28]!==n.projectId||t[29]!==i.experience.projectRequired||t[30]!==c?(x=c&&!n.projectId?(0,Y.jsx)(`p`,{role:`status`,className:`text-sm text-fg-muted`,children:i.experience.projectRequired}):null,t[28]=n.projectId,t[29]=i.experience.projectRequired,t[30]=c,t[31]=x):x=t[31];let S;t[32]===f?S=t[33]:(S=e=>f({triggerMode:e.target.value}),t[32]=f,t[33]=S);let C;t[34]===i.trigger.once?C=t[35]:(C=(0,Y.jsx)(d,{value:`once`,children:i.trigger.once}),t[34]=i.trigger.once,t[35]=C);let w;t[36]===i.trigger.daily?w=t[37]:(w=(0,Y.jsx)(d,{value:`daily`,children:i.trigger.daily}),t[36]=i.trigger.daily,t[37]=w);let T;t[38]===i.trigger.weekly?T=t[39]:(T=(0,Y.jsx)(d,{value:`weekly`,children:i.trigger.weekly}),t[38]=i.trigger.weekly,t[39]=T);let E;t[40]!==n.triggerMode||t[41]!==S||t[42]!==C||t[43]!==w||t[44]!==T?(E=(0,Y.jsxs)(u,{className:zt,value:n.triggerMode,onChange:S,children:[C,w,T]}),t[40]=n.triggerMode,t[41]=S,t[42]=C,t[43]=w,t[44]=T,t[45]=E):E=t[45];let D;t[46]!==i.form.trigger||t[47]!==E?(D=(0,Y.jsxs)(`label`,{className:`grid gap-2 text-sm text-fg`,children:[i.form.trigger,E]}),t[46]=i.form.trigger,t[47]=E,t[48]=D):D=t[48];let O;t[49]!==n.onceAt||t[50]!==n.time||t[51]!==n.triggerMode||t[52]!==i.form.onceAt||t[53]!==i.form.time||t[54]!==f?(O=n.triggerMode===`once`?(0,Y.jsxs)(`label`,{className:`grid gap-2 text-sm text-fg`,children:[i.form.onceAt,(0,Y.jsx)(`input`,{type:`datetime-local`,className:zt,value:n.onceAt,onChange:e=>f({onceAt:e.target.value})})]}):(0,Y.jsxs)(`div`,{className:`grid gap-2 text-sm text-fg`,children:[(0,Y.jsx)(`span`,{children:i.form.time}),(0,Y.jsx)(Ae,{value:n.time,onChange:e=>f({time:e}),ariaLabel:i.form.time})]}),t[49]=n.onceAt,t[50]=n.time,t[51]=n.triggerMode,t[52]=i.form.onceAt,t[53]=i.form.time,t[54]=f,t[55]=O):O=t[55];let k;t[56]!==n.triggerMode||t[57]!==n.weekday||t[58]!==i.form.day||t[59]!==i.weekdays||t[60]!==f?(k=n.triggerMode===`weekly`&&(0,Y.jsxs)(`label`,{className:`grid gap-2 text-sm text-fg`,children:[i.form.day,(0,Y.jsx)(u,{className:zt,value:n.weekday,onChange:e=>f({weekday:e.target.value}),children:[`sunday`,`monday`,`tuesday`,`wednesday`,`thursday`,`friday`,`saturday`].map((e,t)=>(0,Y.jsx)(d,{value:String(t),children:i.weekdays[e]},e))})]}),t[56]=n.triggerMode,t[57]=n.weekday,t[58]=i.form.day,t[59]=i.weekdays,t[60]=f,t[61]=k):k=t[61];let A;t[62]!==D||t[63]!==O||t[64]!==k?(A=(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[D,O,k]}),t[62]=D,t[63]=O,t[64]=k,t[65]=A):A=t[65];let j;t[66]!==n.onceAt||t[67]!==n.triggerMode||t[68]!==i.experience.futureTime?(j=n.triggerMode===`once`&&n.onceAt&&new Date(n.onceAt).getTime()<=Date.now()?(0,Y.jsx)(`p`,{role:`status`,className:`text-sm text-red-700 dark:text-red-300`,children:i.experience.futureTime}):null,t[66]=n.onceAt,t[67]=n.triggerMode,t[68]=i.experience.futureTime,t[69]=j):j=t[69];let M;t[70]===i.experience.scheduleNote?M=t[71]:(M=(0,Y.jsx)(`p`,{className:`text-xs text-fg-muted`,children:i.experience.scheduleNote}),t[70]=i.experience.scheduleNote,t[71]=M);let ee;t[72]===f?ee=t[73]:(ee=e=>f({notificationPolicy:e.target.value}),t[72]=f,t[73]=ee);let N;t[74]===i.draft.notifyAll?N=t[75]:(N=(0,Y.jsx)(d,{value:`all`,children:i.draft.notifyAll}),t[74]=i.draft.notifyAll,t[75]=N);let P;t[76]===i.draft.notifyAttention?P=t[77]:(P=(0,Y.jsx)(d,{value:`attention`,children:i.draft.notifyAttention}),t[76]=i.draft.notifyAttention,t[77]=P);let F;t[78]===i.draft.notifyNone?F=t[79]:(F=(0,Y.jsx)(d,{value:`none`,children:i.draft.notifyNone}),t[78]=i.draft.notifyNone,t[79]=F);let I;t[80]!==n.notificationPolicy||t[81]!==ee||t[82]!==N||t[83]!==P||t[84]!==F?(I=(0,Y.jsxs)(u,{className:zt,value:n.notificationPolicy,onChange:ee,children:[N,P,F]}),t[80]=n.notificationPolicy,t[81]=ee,t[82]=N,t[83]=P,t[84]=F,t[85]=I):I=t[85];let L;t[86]!==i.draft.notifications||t[87]!==I?(L=(0,Y.jsxs)(`label`,{className:`grid gap-2 text-sm text-fg`,children:[i.draft.notifications,I]}),t[86]=i.draft.notifications,t[87]=I,t[88]=L):L=t[88];let R;return t[89]!==x||t[90]!==A||t[91]!==p||t[92]!==j||t[93]!==M||t[94]!==L||t[95]!==g||t[96]!==y||t[97]!==b?(R=(0,Y.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-5 overflow-y-auto px-5 py-4`,children:[p,g,y,b,x,A,j,M,L]}),t[89]=x,t[90]=A,t[91]=p,t[92]=j,t[93]=M,t[94]=L,t[95]=g,t[96]=y,t[97]=b,t[98]=R):R=t[98],R}function Vt(e){return(0,Y.jsx)(d,{value:e.id,children:e.name},e.id)}function Ht(e,t){return t.reduce((t,n)=>n.automationId===e&&(!t||n.createdAtMs>t.createdAtMs)?n:t,void 0)}function Ut(e,t){let n=Ht(e.id,t),r=!!(e.state.lastRunAtMs&&(!n||e.state.lastRunAtMs>n.createdAtMs)),i=r?e.state.lastRunStatus:n?.status??e.state.lastRunStatus;return i!==`failed`&&i!==`timeout`?null:`${i}:${(r?e.state.lastRunAtMs:n?.createdAtMs??e.state.lastRunAtMs)??`unknown`}`}function Wt(e,t){return Ut(e,t)!==null}var Gt=`xopc.automations.dismissedExecutionIssues`;function Kt(){if(typeof window>`u`)return{};try{let e=JSON.parse(window.localStorage.getItem(Gt)??`{}`);return!e||typeof e!=`object`||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`string`))}catch{return{}}}function qt(e,t,n){return e?bt(e,n):t.never}function Jt(e,t){return e.kind===`workflow`?t.action.workflowWithId.replace(`{id}`,e.workflowId):e.kind===`browser_automation`?`Browser automation: ${e.automationId}`:e.kind===`task_command`?t.action.taskWithId.replace(`{id}`,e.taskId):e.agentId?t.action.agentWithId.replace(`{id}`,e.agentId):t.action.agent}function Yt(e,t){return e.kind===`workflow`?t.sources.workflow:e.kind===`browser_automation`?t.sources.browser:e.kind===`task_command`?t.sources.task:t.sources.agent}function Xt(e,t){return e===`workflow`?t.action.runWorkflow:e===`browser_automation`?t.sources.browser:e===`task_command`?t.action.runTask:t.action.runAgent}function Zt(e,t){return e===`cron`?t.trigger.customCron:e===`event`?t.trigger.customEvent:t.trigger[e]}function Qt(e){let t=(0,Te.c)(8),{kind:n,className:r}=e;if(n===`workflow`){let e;return t[0]===r?e=t[1]:(e=(0,Y.jsx)(_,{className:r,"aria-hidden":!0}),t[0]=r,t[1]=e),e}if(n===`browser_automation`){let e;return t[2]===r?e=t[3]:(e=(0,Y.jsx)(we,{className:r,"aria-hidden":!0}),t[2]=r,t[3]=e),e}if(n===`task_command`){let e;return t[4]===r?e=t[5]:(e=(0,Y.jsx)(p,{className:r,"aria-hidden":!0}),t[4]=r,t[5]=e),e}let i;return t[6]===r?i=t[7]:(i=(0,Y.jsx)(oe,{className:r,"aria-hidden":!0}),t[6]=r,t[7]=i),i}function $t(e){return e.safety?.mode??`auto_apply`}function en(e){return e===`succeeded`?`bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`:e===`failed`||e===`timeout`?`bg-red-500/10 text-red-700 dark:text-red-300`:e===`running`||e===`queued`||e===`cancelling`?`bg-blue-500/10 text-blue-700 dark:text-blue-300`:`bg-surface-hover text-fg-muted`}function tn(e,t){if(e==null)return t.never;if(e<1e3)return`${e}ms`;let n=Math.round(e/1e3);return n<60?`${n}s`:`${Math.floor(n/60)}m ${n%60}s`}function nn(e){return e.status===`running`||e.status===`queued`||e.status===`cancelling`}function rn(e){return e.status===`failed`||e.status===`timeout`}function an(e,t){return e.action.kind===`agent`?e.action.instruction:e.action.kind===`workflow`?e.action.goal?.trim()||Jt(e.action,t):(e.action.kind,Jt(e.action,t))}function on(e){return(e.description?.match(/\[managed-by=([^\]]+)\]/))?.[1]?.trim()||null}function sn(e){return e.id.startsWith(`system-`)||!!on(e)}function cn(e){return e.description?.replace(/\s*\[managed-by=[^\]]+\]\s*/g,` `).trim()??``}function ln(e){return nn(e)?0:rn(e)?1:e.status===`succeeded`?2:3}function un(e){return[...e].sort((e,t)=>{let n=ln(e)-ln(t);return n===0?t.createdAtMs-e.createdAtMs:n})}function dn(){let e=(0,Te.c)(6),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(`section`,{className:`grid grid-cols-2 gap-px overflow-hidden rounded-xl border border-edge-subtle bg-edge-subtle xl:grid-cols-4`,children:Array.from({length:4}).map(pn)}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0 space-y-2`,children:[(0,Y.jsx)(B,{className:`h-4 w-36`}),(0,Y.jsx)(B,{className:`h-3 w-56 max-w-full`})]}),(0,Y.jsx)(B,{className:`h-7 w-20 rounded-full`})]}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Y.jsxs)(`section`,{className:`rounded-xl bg-surface-panel p-4 shadow-surface`,children:[n,(0,Y.jsx)(`div`,{className:`mt-4 grid gap-2`,children:Array.from({length:6}).map(fn)})]}),e[2]=r):r=e[2];let i,a;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,Y.jsx)(B,{className:`h-4 w-32`}),a=(0,Y.jsx)(B,{className:`mt-4 h-24 rounded-lg`}),e[3]=i,e[4]=a):(i=e[3],a=e[4]);let o;return e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Y.jsxs)(`div`,{className:`grid gap-4`,"aria-hidden":`true`,children:[t,(0,Y.jsxs)(`div`,{className:`grid min-h-0 items-start gap-4 xl:grid-cols-[minmax(18rem,0.8fr)_minmax(0,1.5fr)]`,children:[r,(0,Y.jsxs)(`section`,{className:`hidden rounded-xl bg-surface-panel p-4 shadow-surface xl:block`,children:[i,a,(0,Y.jsxs)(`div`,{className:`mt-4 grid gap-2`,children:[(0,Y.jsx)(B,{className:`h-12 rounded-lg`}),(0,Y.jsx)(B,{className:`h-12 rounded-lg`}),(0,Y.jsx)(B,{className:`h-12 rounded-lg`})]})]})]})]}),e[5]=o):o=e[5],o}function fn(e,t){return(0,Y.jsx)(`div`,{className:`rounded-lg bg-surface-base p-3`,children:(0,Y.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(B,{className:`size-4 rounded-full`}),(0,Y.jsx)(B,{className:`h-4 w-32`}),(0,Y.jsx)(B,{className:`h-5 w-20 rounded-full`})]}),(0,Y.jsx)(B,{className:`mt-3 h-4 w-full`}),(0,Y.jsx)(B,{className:`mt-2 h-4 w-3/5`})]}),(0,Y.jsx)(B,{className:`h-8 w-24 rounded-md`})]})},t)}function pn(e,t){return(0,Y.jsxs)(`div`,{className:`flex min-h-12 items-center gap-2.5 bg-surface-base px-3 py-2.5`,children:[(0,Y.jsx)(B,{className:`size-4 rounded-full`}),(0,Y.jsx)(B,{className:`h-3 w-14`}),(0,Y.jsx)(B,{className:`ml-auto h-4 w-10`})]},t)}function mn({projectId:e,embedded:t=!1,title:n,subtitle:r}){let i=A(e=>e.language),o=O(i),s=o.automations,l=o.cron,f=U(e=>e.setPageHeader),m=U(e=>e.clearPageHeader),[h,g]=a(),v=!t&&h.get(`view`)===`activity`,y=h.get(`run`)?.trim()??``,S=h.get(`automation`)?.trim()??``,w=h.get(`draft`)?.trim()??``,T=h.get(`action`)?.trim()??``,E=h.get(`taskId`)?.trim()??``,R=h.get(`projectId`)?.trim()??``,z=e?.trim()||R,B=!!e?.trim(),te=h.get(`autogenerate`)===`1`,ne=(0,J.useRef)(``),re=h.get(`status`),V=re===`active`||re===`paused`||re===`running`||re===`attention`?re:`all`,ae=h.get(`ownership`)===`system`?`system`:`user`,se=h.get(`source`),W=se===`agent`||se===`workflow`||se===`task_command`||se===`browser_automation`?se:`all`,le=h.get(`q`)??``,G=e=>g(t=>{let n=new URLSearchParams(t);return e===`all`?n.delete(`status`):n.set(`status`,e),n.delete(`automation`),n}),ue=e=>g(t=>{let n=new URLSearchParams(t);return e===`user`?n.delete(`ownership`):n.set(`ownership`,e),n.delete(`automation`),n}),fe=e=>g(t=>{let n=new URLSearchParams(t);return e?n.set(`q`,e):n.delete(`q`),n.delete(`automation`),n},{replace:!0}),pe=e=>g(t=>{let n=new URLSearchParams(t);return e===`all`?n.delete(`source`):n.set(`source`,e),n.delete(`automation`),n}),me=()=>g(e=>{let t=new URLSearchParams(e);return t.delete(`status`),t.delete(`source`),t.delete(`q`),t.delete(`automation`),t}),[ge,be]=(0,J.useState)(null),[Se,Ce]=(0,J.useState)(!1),[Te,Ee]=(0,J.useState)(`blank`),[De,Oe]=(0,J.useState)(null),[ke,Ae]=(0,J.useState)(!1),[X,je]=(0,J.useState)(Dt),[Me,Z]=(0,J.useState)(null),[Ne,Pe]=(0,J.useState)(null),[Fe,Ie]=(0,J.useState)(!1),[Le,Re]=(0,J.useState)(null),[ze,Be]=(0,J.useState)(``),[Ve,He]=(0,J.useState)(null),[Ue,We]=(0,J.useState)(!1),[Ge,Ke]=(0,J.useState)(!1),[qe,Je]=(0,J.useState)(z),[Ye,Xe]=(0,J.useState)(`new_session`),[Ze,Qe]=(0,J.useState)(`attention`),[$e,Q]=(0,J.useState)(null),[et,tt]=(0,J.useState)(!1),[nt,rt]=(0,J.useState)(!1),[it,at]=(0,J.useState)(!1),[ot,st]=(0,J.useState)(null),[ct,lt]=(0,J.useState)(Kt),ut=I([`automations`,z],()=>K.list(z?{projectId:z}:void 0),{keepPreviousData:!0,refreshInterval:15e3}),dt=I([`automation-runs`,z],()=>K.runs(50,void 0,z?{projectId:z}:void 0),{keepPreviousData:!0,refreshInterval:1e4}),ft=I(z?`automations-global-system-source`:null,()=>K.list(),{keepPreviousData:!0,refreshInterval:15e3}),$=I(z?`automation-runs-global-system-source`:null,()=>K.runs(50),{keepPreviousData:!0,refreshInterval:1e4}),pt=I(Le?[`automation-history`,Le,z]:null,()=>K.runs(50,Le,z?{projectId:z}:void 0),{refreshInterval:1e4}),mt=I(Ne?`automation-run-events:${Ne}`:null,()=>K.runEvents(Ne),{refreshInterval:5e3}),ht=I(`automation-workflow-definitions`,ye),gt=I(`automation-browser-automations`,()=>q.list()),_t=I(`automation-chat-agents`,de),vt=I(`automation-tasks`,K.tasks),yt=I(`automation-projects`,()=>he({sortBy:`name`,sortOrder:`asc`,limit:200})),bt=ut.isLoading&&!ut.data||dt.isLoading&&!dt.data||!!z&&ft.isLoading&&!ft.data||!!z&&$.isLoading&&!$.data,xt=!bt&&(ut.isLoading||dt.isLoading||ft.isLoading||$.isLoading),Ct=ut.data?.automations??[],Tt=z?ft.data?.automations??[]:Ct,Et=(0,J.useMemo)(()=>un(dt.data?.runs??[]),[dt.data?.runs]),Ot=(0,J.useMemo)(()=>z?un($.data?.runs??[]):Et,[$.data?.runs,z,Et]),At=(0,J.useMemo)(()=>Ct.filter(e=>!sn(e)),[Ct]),jt=(0,J.useMemo)(()=>Tt.filter(sn),[Tt]),Mt=(0,J.useMemo)(()=>[...At,...jt],[jt,At]),Nt=(0,J.useMemo)(()=>new Set(jt.map(e=>e.id)),[jt]),Pt=(0,J.useMemo)(()=>Et.filter(e=>!Nt.has(e.automationId)),[Et,Nt]),zt=(0,J.useMemo)(()=>Ot.filter(e=>Nt.has(e.automationId)),[Ot,Nt]),Vt=(0,J.useMemo)(()=>z?[...Et,...zt]:Et,[z,Et,zt]),qt=(0,J.useMemo)(()=>Vt.find(e=>e.id===Ne)??pt.data?.runs.find(e=>e.id===Ne)??null,[Vt,Ne,pt.data]),Jt=(0,J.useMemo)(()=>Mt.find(e=>e.id===Le)??null,[Mt,Le]),Yt=(0,J.useMemo)(()=>Mt.find(e=>e.id===De)??null,[Mt,De]),Xt=(0,J.useMemo)(()=>[...pt.data?.runs??Vt].filter(e=>e.automationId===Le).sort((e,t)=>t.createdAtMs-e.createdAtMs),[Vt,Le,pt.data]),Zt=mt.data?.events??[],Qt=(0,J.useMemo)(()=>Pt.filter(e=>!nn(e)&&e.readAtMs==null),[Pt]),$t=le.trim().toLocaleLowerCase(),en=ae===`system`?jt:At,tn=ae===`system`?zt:Pt,rn=(0,J.useMemo)(()=>new Set(tn.filter(nn).map(e=>e.automationId)),[tn]),on=(0,J.useMemo)(()=>en.filter(e=>V===`attention`&&!Wt(e,tn)||V===`running`&&!rn.has(e.id)||V===`active`&&!e.enabled||V===`paused`&&e.enabled||W!==`all`&&e.action.kind!==W?!1:$t?[e.name,cn(e),an(e,s),wt(e.trigger,s,l,i)].some(e=>e.toLocaleLowerCase().includes($t)):!0),[l,V,s,i,$t,en,tn,rn,W]),ln=(0,J.useMemo)(()=>ht.data??[],[ht.data]),fn=(0,J.useMemo)(()=>(gt.data?.automations??[]).filter(e=>e.enabled),[gt.data]),pn=_t.data?.items??[],mn=(0,J.useMemo)(()=>(vt.data?.items??[]).map(e=>e.task),[vt.data]),_n=yt.data?.items??[],vn=(0,J.useMemo)(()=>ln.find(e=>e.id===X.workflowId.trim())??null,[X.workflowId,ln]),yn=(0,J.useMemo)(()=>fn.find(e=>e.id===X.browserAutomationId.trim())??null,[fn,X.browserAutomationId]),Cn=X.actionMode===`workflow`&&(!X.workflowId.trim()||ln.length>0&&!ln.some(e=>e.id===X.workflowId)),wn=X.actionMode===`workflow`&&vn?!C(vn,X.workflowInput,X.workflowInputValid).valid:!1,Tn=!!X.name.trim()&&(X.triggerMode!==`once`||Number.isFinite(new Date(X.onceAt).getTime())&&(!!Yt||new Date(X.onceAt).getTime()>Date.now()))&&(![`daily`,`weekly`].includes(X.triggerMode)||/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(X.time))&&(X.triggerMode!==`event`||!!X.eventType.trim()&&Ft(X.eventPayloadMatch))&&(X.actionMode===`workflow`?!Cn&&!wn:X.actionMode===`browser_automation`?yn!==null&&xe(yn,X.browserAutomationInputs):X.actionMode===`task_command`?!!(X.taskId.trim()&&X.agentId.trim()):!!X.instruction.trim()),En=(0,J.useMemo)(()=>Rt(s),[s]),kn=(0,J.useMemo)(()=>At.filter(e=>Wt(e,Pt)),[At,Pt]),An=(0,J.useMemo)(()=>en.filter(e=>Wt(e,tn)),[en,tn]),jn=kn.some(e=>{let t=Ut(e,Pt);return t!==null&&ct[e.id]!==t}),Mn=tn.filter(nn).length,Nn=en.filter(e=>e.enabled&&e.state.nextRunAtMs).sort((e,t)=>(e.state.nextRunAtMs??1/0)-(t.state.nextRunAtMs??1/0))[0],Pn=(0,J.useMemo)(()=>({all:en.length,agent:en.filter(e=>e.action.kind===`agent`).length,workflow:en.filter(e=>e.action.kind===`workflow`).length,task_command:en.filter(e=>e.action.kind===`task_command`).length,browser_automation:en.filter(e=>e.action.kind===`browser_automation`).length}),[en]),Fn=(0,J.useCallback)(()=>{lt(e=>{let t={...e};for(let e of kn){let n=Ut(e,Pt);n&&(t[e.id]=n)}try{window.localStorage.setItem(Gt,JSON.stringify(t))}catch{}return t})},[kn,Pt]);(0,J.useEffect)(()=>{if(!xt){if(on.length===0){Re(null);return}if(S&&on.some(e=>e.id===S)){Re(S);return}Le&&on.some(e=>e.id===Le)||Re(on[0].id)}},[S,on,xt,Le]);let Rn=(0,J.useCallback)(async()=>{await Promise.all([ut.mutate(),dt.mutate(),ft.mutate(),$.mutate(),pt.mutate(),mt.mutate()])},[ut.mutate,ft.mutate,$.mutate,mt.mutate,dt.mutate,pt.mutate]),zn=(0,J.useCallback)(e=>{if(B){Re(null),Pe(null);return}g(t=>{let n=new URLSearchParams(t);return e?n.set(`projectId`,e):n.delete(`projectId`),n.delete(`automation`),n.delete(`run`),n}),Re(null),Pe(null)},[B,g]);(0,J.useEffect)(()=>{B&&(Je(z),je(e=>e.projectId===z?e:{...e,projectId:z}))},[z,B]);let Bn=(0,J.useCallback)(e=>{if(Oe(null),Ae(!1),Z(null),Ee(e),Ce(!0),e===`blank`){je({...Dt,projectId:z});return}Be(``),He(null),Ke(!1),Je(z),Xe(`new_session`),Qe(`attention`)},[z]),Hn=e=>{be(e),je({...e.form,projectId:z}),Oe(null),Ae(!1),Z(null),Ee(`quick`),Ce(!0)},Un=(0,J.useCallback)(e=>{je(It(e,ln)),Oe(e.id),Ae(!1),Re(null),Ee(`blank`),Ce(!0)},[ln]),Wn=(0,J.useCallback)(()=>{Ve&&(je({...It(Ve.automation,ln),projectId:qe,conversationMode:Ye,notificationPolicy:Ze}),Oe(null),Ae(!0),Ee(`blank`))},[Ve,Ye,Ze,qe,ln]),Gn=(0,J.useCallback)(async()=>{at(!0),Z(null);try{await Rn()}catch(e){Z(e instanceof Error?e.message:String(e))}finally{at(!1)}},[s.feedback.actionFailed,Rn]);(0,J.useEffect)(()=>{let e=Mt.find(e=>e.id===S);!e||!sn(e)||ae===`system`||g(e=>{let t=new URLSearchParams(e);return t.set(`ownership`,`system`),t},{replace:!0})},[S,Mt,ae,g]),(0,J.useEffect)(()=>{T===`create`&&(Bn(`blank`),E&&je(e=>({...e,actionMode:`task_command`,taskId:E,safetyMode:`auto_apply`})),g(e=>{let t=new URLSearchParams(e);return t.delete(`action`),t.delete(`taskId`),t},{replace:!0}))},[T,Bn,g,E]),(0,J.useEffect)(()=>{if(!w)return;let e=`${i}:${te?`auto`:`seed`}:${w}`;ne.current!==e&&(ne.current=e,Be(w),He(null),Ke(!1),Je(z),Ee(`draft`),Ce(!0),g(e=>{let t=new URLSearchParams(e);return t.delete(`draft`),t.delete(`autogenerate`),t},{replace:!0}),te&&(Z(null),We(!0),K.draft({prompt:w,language:i}).then(e=>{He(e.draft),Ke(!1)}).catch(e=>{Z(e instanceof Error?e.message:String(e))}).finally(()=>{We(!1)})))},[te,w,i,z,g]);let Kn=(0,J.useCallback)(e=>{let t=Et.find(t=>t.id===e)??pt.data?.runs.find(t=>t.id===e);if(!t||nn(t)||t.readAtMs!=null)return;let n=Date.now();dt.mutate(t=>t&&{...t,runs:t.runs.map(t=>t.id===e?{...t,readAtMs:n}:t)},!1),pt.mutate(t=>t&&{...t,runs:t.runs.map(t=>t.id===e?{...t,readAtMs:n}:t)},!1),K.markRunRead(e).catch(e=>{Z(e instanceof Error?e.message:String(e)),dt.mutate(),pt.mutate()})},[Et,dt.mutate,pt.data,pt.mutate]),qn=(0,J.useCallback)(e=>{Kn(e),Pe(e),Ie(!0),g(t=>{let n=new URLSearchParams(t);return n.set(`run`,e),n},{replace:!0})},[Kn,g]),Jn=(0,J.useCallback)(e=>{Re(e);let t=Ht(e,Vt);g(t=>{let n=new URLSearchParams(t);return n.set(`automation`,e),n},{replace:!0}),t&&t.readAtMs==null&&!nn(t)&&Kn(t.id)},[Vt,Kn,g]),Yn=(0,J.useCallback)(()=>{if(!Nn)return;Re(Nn.id);let e=Ht(Nn.id,Vt);g(e=>{let t=new URLSearchParams(e);return t.delete(`status`),t.delete(`source`),t.delete(`q`),t.set(`automation`,Nn.id),t},{replace:!0}),e&&e.readAtMs==null&&!nn(e)&&Kn(e.id)},[Vt,Kn,Nn,g]);(0,J.useEffect)(()=>{y&&(Kn(y),Pe(y),Ie(!0))},[Kn,y]),(0,J.useEffect)(()=>{Q(null),rt(!1)},[Ne]);async function Xn(){if(Z(null),X.triggerMode===`once`&&!Yt&&new Date(X.onceAt).getTime()<=Date.now()){Z(s.experience.futureTime);return}if(!(!Tn||ot)&&!(Te===`quick`&&ge?.requiresProject&&!X.projectId)){if(ke&&Ve){st(`draft:edit`);try{let e=kt(X,vn),{simulation:t}=await K.simulate(e);He({...Ve,automation:e,simulation:t}),Je(X.projectId),Xe(X.conversationMode),Qe(X.notificationPolicy),Ke(!1),Ae(!1),Ee(`draft`)}catch(e){Z(e instanceof Error?e.message:String(e))}finally{st(null)}return}if(Yt){let e=Yt.id;await Zn(`automation:${e}:edit`,()=>K.update(e,Lt(Yt,X,vn)))&&(Ce(!1),Oe(null),Re(e));return}st(`automation:create`);try{let e=kt(X,vn),{automation:t}=await K.create(e);je(Dt),Ce(!1),g(e=>{let n=new URLSearchParams(e);return n.delete(`status`),n.delete(`q`),n.delete(`run`),n.set(`automation`,t.id),B||(t.projectId?n.set(`projectId`,t.projectId):n.delete(`projectId`)),n}),await Rn(),Re(t.id)}catch(e){Z(e instanceof Error?e.message:String(e))}finally{st(null)}}}async function Zn(e,t){Z(null),st(e);try{return await t(),await Rn(),!0}catch(e){return Z(e instanceof Error?e.message:String(e)),!1}finally{st(null)}}async function Qn(){await Zn(`runs:read-all`,()=>K.markAllRunsRead(z||void 0))}async function $n(){let e=ze.trim();if(e){Z(null),We(!0);try{He((await K.draft({prompt:e,language:i})).draft),Ke(!1)}catch(e){Z(e instanceof Error?e.message:String(e))}finally{We(!1)}}}async function er(){if(!Ve)return;let e=``,t=``;await Zn(`draft:publish`,async()=>{let{automation:n}=await K.create({...Ve.automation,...qe?{projectId:qe}:{projectId:void 0},conversationMode:Ye,notificationPolicy:Ze});He(null),Be(``),Ke(!1),Ce(!1),G(`all`),fe(``),e=n.id,t=n.projectId??``})&&e&&(zn(t),Re(e))}async function tr(){if(!Ve)return;let e=``,t=``,n=``;await Zn(`draft:test`,async()=>{let{automation:r}=await K.create({...Ve.automation,...qe?{projectId:qe}:{projectId:void 0},conversationMode:Ye,notificationPolicy:Ze,enabled:!1}),{run:i}=await K.runNow(r.id);e=r.id,t=r.projectId??``,n=i.id,He(null),Be(``),Ke(!1),Ce(!1),G(`all`),fe(``)})&&e&&n&&(zn(t),Re(e),qn(n))}async function nr(e){Z(null),tt(!0),Q(null),rt(!1);try{Q((await K.repairDraft(e.id,{language:i})).repair)}catch(e){Z(e instanceof Error?e.message:String(e))}finally{tt(!1)}}async function rr(e){$e&&await Zn(`run:${e.id}:repair`,async()=>{await K.update(e.automationId,$e.patch),Q(null),rt(!1)})}let ir=(0,J.useMemo)(()=>(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(ce,{className:`size-9 shrink-0 p-0`,loading:it,label:s.refresh,onClick:Gn}),(0,Y.jsxs)(L,{variant:`primary`,onClick:()=>Bn(`draft`),children:[(0,Y.jsx)(b,{className:`size-4`}),s.new]})]}),[s.new,s.refresh,Bn,it,Gn]);return(0,J.useLayoutEffect)(()=>{if(!t)return f({startExtra:null,main:(0,Y.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:s.title}),end:ir}),()=>m()},[m,t,ir,s.title,f]),(0,Y.jsxs)(`div`,{className:k(`flex min-h-0 min-w-0 flex-1 flex-col`,t?`bg-transparent`:`bg-surface-panel`),children:[(0,Y.jsxs)(`div`,{className:k(`flex w-full flex-col gap-4`,t?`py-1`:`mx-auto max-w-[96rem] px-4 py-7 sm:px-6 lg:px-8 lg:py-9`),children:[t?(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3 rounded-xl border border-edge-subtle bg-surface-base px-4 py-3 shadow-surface`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(H,{className:`size-4 text-accent-fg`,"aria-hidden":!0}),(0,Y.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:n||s.title})]}),(0,Y.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:r||s.subtitle})]}),ir]}):null,Me||ut.error||dt.error||ft.error||$.error?(0,Y.jsx)(`div`,{role:`alert`,className:`rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-700 dark:text-red-300`,children:Me||s.feedback.actionFailed}):null,v?bt?(0,Y.jsx)(dn,{}):(0,Y.jsx)(xn,{runs:tn,ownership:ae,labels:s,language:i,unreadCount:ae===`user`?Qt.length:0,loading:xt||it,onOwnershipChange:ue,onRefresh:Gn,onSelectRun:qn}):(0,Y.jsxs)(Y.Fragment,{children:[bt?null:(0,Y.jsxs)(`section`,{"aria-labelledby":`automation-overview-title`,children:[(0,Y.jsx)(`h2`,{id:`automation-overview-title`,className:`sr-only`,children:s.overview.title}),(0,Y.jsxs)(`div`,{className:`grid grid-cols-2 gap-px overflow-hidden rounded-xl border border-edge-subtle bg-edge-subtle xl:grid-cols-4`,children:[(0,Y.jsx)(bn,{icon:(0,Y.jsx)(H,{className:`size-4`,"aria-hidden":!0}),label:s.metrics.enabled,value:String(en.filter(e=>e.enabled).length),active:V===`active`,onClick:()=>G(`active`)}),(0,Y.jsx)(bn,{icon:(0,Y.jsx)(ve,{className:`size-4`,"aria-hidden":!0}),label:s.metrics.running,value:String(Mn),active:V===`running`,onClick:()=>G(`running`)}),(0,Y.jsx)(bn,{icon:(0,Y.jsx)(ie,{className:`size-4`,"aria-hidden":!0}),label:s.dashboard.needsAttention,value:String(An.length),tone:An.length>0?`danger`:`default`,active:V===`attention`,onClick:()=>G(`attention`)}),(0,Y.jsx)(bn,{icon:(0,Y.jsx)(c,{className:`size-4`,"aria-hidden":!0}),label:s.metrics.next,value:Nn?St(Nn.state.nextRunAtMs,i):`—`,onClick:Nn?Yn:void 0})]})]}),!bt&&jn&&ae===`user`?(0,Y.jsxs)(`div`,{className:`flex items-center rounded-lg border border-red-500/20 bg-red-500/5`,children:[(0,Y.jsxs)(`button`,{type:`button`,onClick:()=>G(`attention`),className:`flex min-w-0 flex-1 items-center gap-3 rounded-l-lg px-4 py-3 text-left focus-visible:ring-2 focus-visible:ring-accent`,children:[(0,Y.jsx)(ie,{className:`size-4 shrink-0 text-red-700 dark:text-red-300`,"aria-hidden":!0}),(0,Y.jsxs)(`span`,{className:`min-w-0 text-sm text-fg`,children:[(0,Y.jsxs)(`span`,{className:`font-medium`,children:[s.experience.executionIssues,` · `,kn.length]}),(0,Y.jsx)(`span`,{className:`ml-2 text-fg-muted`,children:s.experience.issuesDescription})]})]}),(0,Y.jsx)(`button`,{type:`button`,onClick:Fn,className:`mr-2 rounded-md p-2 text-fg-muted hover:bg-red-500/10 hover:text-fg focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":s.close,title:s.close,children:(0,Y.jsx)(D,{className:`size-4`,"aria-hidden":!0})})]}):null,bt?(0,Y.jsx)(dn,{}):(0,Y.jsxs)(`section`,{className:`grid min-h-0 items-start gap-4 xl:grid-cols-[minmax(18rem,0.8fr)_minmax(0,1.5fr)]`,"aria-busy":xt,children:[(0,Y.jsxs)(`aside`,{className:`flex max-h-[42rem] flex-col overflow-hidden rounded-xl border border-edge-subtle bg-surface-base shadow-surface xl:sticky xl:top-20 xl:max-h-[calc(100vh-7rem)]`,children:[(0,Y.jsxs)(`div`,{className:`shrink-0 border-b border-edge-subtle p-3`,children:[B?null:(0,Y.jsxs)(u,{"aria-label":s.filters.project,className:Vn,value:z,onChange:e=>zn(e.target.value),children:[(0,Y.jsx)(d,{value:``,children:s.filters.allProjects}),_n.map(e=>(0,Y.jsx)(d,{value:e.id,children:e.name},e.id))]}),(0,Y.jsxs)(`label`,{className:k(`flex items-center gap-2 rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg-muted focus-within:border-accent`,!B&&`mt-2`),children:[(0,Y.jsx)(x,{className:`size-4 shrink-0`,"aria-hidden":!0}),(0,Y.jsx)(`input`,{className:`min-w-0 flex-1 bg-transparent text-fg outline-none placeholder:text-fg-subtle`,value:le,onChange:e=>fe(e.target.value),placeholder:s.filters.search,"aria-label":s.filters.search})]}),(0,Y.jsxs)(`div`,{className:`mt-3 flex items-center justify-between gap-3`,children:[(0,Y.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:s.filters.ownership}),(0,Y.jsxs)(`div`,{className:`flex rounded-lg bg-surface-panel p-0.5`,role:`group`,"aria-label":s.filters.ownership,children:[(0,Y.jsxs)(`button`,{type:`button`,className:k(`rounded-md px-2.5 py-1.5 text-xs font-medium text-fg-muted hover:text-fg`,ae===`user`&&`bg-surface-base text-fg shadow-sm`),onClick:()=>ue(`user`),"aria-pressed":ae===`user`,children:[s.filters.userManaged,` · `,At.length]}),(0,Y.jsxs)(`button`,{type:`button`,className:k(`rounded-md px-2.5 py-1.5 text-xs font-medium text-fg-muted hover:text-fg`,ae===`system`&&`bg-surface-base text-fg shadow-sm`),onClick:()=>ue(`system`),"aria-pressed":ae===`system`,children:[s.system.title,` · `,jt.length]})]})]}),(0,Y.jsx)(`nav`,{className:`mt-3 flex flex-wrap items-center gap-1`,"aria-label":s.filters.status,children:[{id:`all`,label:s.filters.all},{id:`active`,label:s.filters.active},{id:`running`,label:s.metrics.running},{id:`paused`,label:s.paused},{id:`attention`,label:s.experience.executionIssues}].map(e=>(0,Y.jsx)(`button`,{type:`button`,className:k(`rounded-md px-2.5 py-1.5 text-xs font-medium text-fg-muted hover:bg-surface-hover hover:text-fg`,V===e.id&&`bg-surface-hover text-fg`),onClick:()=>G(e.id),"aria-pressed":V===e.id,children:e.label},e.id))}),(0,Y.jsxs)(`div`,{className:`mt-3 border-t border-edge-subtle pt-3`,children:[(0,Y.jsx)(`div`,{className:`mb-2 text-xs font-medium text-fg-muted`,children:s.filters.executor}),(0,Y.jsx)(`div`,{className:`flex flex-wrap gap-1`,role:`group`,"aria-label":s.filters.executor,children:[{id:`all`,label:s.filters.allSources,icon:H},{id:`agent`,label:s.sources.agent,icon:oe},{id:`workflow`,label:s.sources.workflow,icon:_},{id:`task_command`,label:s.sources.task,icon:p},{id:`browser_automation`,label:s.sources.browser,icon:we}].map(e=>(0,Y.jsxs)(`button`,{type:`button`,className:k(`flex min-h-8 items-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-xs text-fg-muted hover:bg-surface-hover hover:text-fg`,W===e.id&&`border-edge bg-surface-hover text-fg`),onClick:()=>pe(e.id),"aria-pressed":W===e.id,children:[(0,Y.jsx)(e.icon,{className:`size-3.5`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{children:e.label}),(0,Y.jsx)(`span`,{className:`text-fg-subtle`,children:Pn[e.id]})]},e.id))})]}),Qt.length>0&&ae===`user`?(0,Y.jsxs)(`div`,{className:`mt-2 flex items-center justify-between gap-2 rounded-md bg-accent/8 px-2.5 py-1.5 text-xs text-accent-fg`,children:[(0,Y.jsxs)(`span`,{children:[s.filters.unread,` · `,Qt.length]}),(0,Y.jsx)(`button`,{type:`button`,className:`font-medium hover:underline`,disabled:ot===`runs:read-all`,onClick:()=>void Qn(),children:s.filters.markAllRead})]}):null,(0,Y.jsxs)(`div`,{className:`mt-3 flex items-center justify-between gap-3 text-xs text-fg-muted`,children:[(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[xt?(0,Y.jsx)(_e,{className:`size-3 animate-spin`,"aria-hidden":!0}):null,xt?s.loading:s.filters.results.replace(`{count}`,String(on.length))]}),V!==`all`||W!==`all`||$t?(0,Y.jsx)(`button`,{type:`button`,className:`font-medium text-accent-fg hover:underline`,onClick:me,children:s.filters.clear}):null]})]}),(0,Y.jsx)(Sn,{automations:on,runs:tn,labels:s,cronLabels:l,language:i,selectedAutomationId:Le,onOpenDetails:Jn})]}),Jt?(0,Y.jsx)(On,{automation:Jt,runs:Xt,runsLoading:pt.isLoading,runsError:pt.error?s.feedback.actionFailed:void 0,labels:s,cronLabels:l,language:i,projects:_n,busyAction:ot,onEdit:Un,onSelectRun:qn,onAction:Zn},Jt.id):(0,Y.jsx)(`div`,{className:`min-h-[28rem] overflow-hidden rounded-xl border border-edge-subtle bg-surface-base shadow-surface`,children:ae===`user`&&en.length===0?(0,Y.jsxs)(`div`,{className:`p-5`,children:[(0,Y.jsx)(`h2`,{className:`text-sm font-semibold text-fg`,children:s.experience.scenes}),(0,Y.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:s.experience.scenesDescription}),(0,Y.jsx)(hn,{templates:En,labels:s,onSelect:Hn}),(0,Y.jsx)(L,{className:`mt-4`,variant:`ghost`,onClick:()=>Bn(`draft`),children:s.experience.custom})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(In,{className:`min-h-56 rounded-none border-0 shadow-none`,icon:(0,Y.jsx)(H,{className:`size-5`}),title:en.length===0?s.empty.automations:s.empty.filtered}),en.length>0?(0,Y.jsx)(`div`,{className:`flex justify-center border-t border-edge-subtle p-4`,children:(0,Y.jsx)(L,{variant:`ghost`,onClick:me,children:s.filters.clear})}):null]})})]}),!bt&&At.length>0?(0,Y.jsx)(`div`,{children:(0,Y.jsxs)(L,{variant:`ghost`,onClick:()=>Bn(`draft`),children:[(0,Y.jsx)(b,{className:`size-4`,"aria-hidden":!0}),s.experience.discover]})}):null]})]}),(0,Y.jsx)(F,{open:Se,onOpenChange:e=>{Ce(e),e||(Oe(null),Ae(!1))},children:(0,Y.jsxs)(ee,{children:[(0,Y.jsx)(j,{className:`xopc-dialog-overlay fixed inset-0 z-65 bg-scrim backdrop-blur-[1px]`}),(0,Y.jsxs)(N,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-66 flex h-[min(760px,calc(100vh-2rem))] w-[min(100%-2rem,48rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl border border-edge bg-surface-overlay shadow-popover outline-none`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-edge px-5 py-4`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(P,{className:`text-base font-semibold text-fg`,children:Te===`draft`?s.draft.title:Yt?s.editTitle:ke?s.draft.editTitle:s.createTitle}),(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:Te===`draft`?s.draft.subtitle:s.form.createFlowHint})]}),(0,Y.jsx)(M,{asChild:!0,children:(0,Y.jsx)(L,{variant:`ghost`,"aria-label":s.close,children:(0,Y.jsx)(D,{className:`size-4`})})})]}),Me?(0,Y.jsx)(`p`,{role:`alert`,className:`px-5 py-2 text-sm text-red-700 dark:text-red-300`,children:Me}):null,Te===`draft`?(0,Y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-5`,children:(0,Y.jsx)(gn,{labels:s,prompt:ze,draft:Ve,loading:Ue,approved:Ge,publishBusy:ot===`draft:publish`,testBusy:ot===`draft:test`,templates:En,projects:_n,projectId:qe,conversationMode:Ye,notificationPolicy:Ze,onPromptChange:Be,onGenerate:$n,onEdit:Wn,onPublish:er,onTest:tr,onProjectChange:Je,onConversationModeChange:Xe,onNotificationPolicyChange:Qe,projectLocked:B,onApprovedChange:Ke,onDiscard:()=>{He(null),Ke(!1)},onTemplateSelect:e=>{Hn(e),je({...e.form,projectId:qe})},onOpenAdvanced:()=>{je({...Dt,projectId:qe,conversationMode:Ye,notificationPolicy:Ze}),Ee(`blank`)}})}):(0,Y.jsxs)(Y.Fragment,{children:[Te===`quick`&&ge?(0,Y.jsx)(Bt,{form:X,setForm:je,labels:s,projects:_n,projectLocked:B,source:ge.source,requiresProject:ge.requiresProject}):(0,Y.jsx)(Ln,{form:X,labels:s,setForm:je,projects:_n,workflowDefinitions:ln,selectedWorkflow:vn,workflowsLoading:ht.isLoading,browserAutomations:fn,selectedBrowserAutomation:yn,browserAutomationsLoading:gt.isLoading,agentOptions:pn,agentsLoading:_t.isLoading,defaultAgentId:_t.data?.defaultId??``,taskOptions:mn,tasksLoading:vt.isLoading,language:i,projectLocked:B}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2 border-t border-edge px-5 py-4`,children:[Te===`quick`?(0,Y.jsx)(L,{variant:`ghost`,onClick:()=>Ee(`blank`),children:s.draft.advancedCreate}):null,ke?(0,Y.jsx)(L,{variant:`ghost`,onClick:()=>{Ae(!1),Ee(`draft`)},children:s.cancel}):(0,Y.jsx)(M,{asChild:!0,children:(0,Y.jsx)(L,{variant:`ghost`,children:s.cancel})}),(0,Y.jsx)(L,{variant:`primary`,onClick:Xn,disabled:!Tn||!!ot||Te===`quick`&&!!ge?.requiresProject&&!X.projectId,children:ot===`automation:create`||ot===`draft:edit`||Yt&&ot===`automation:${Yt.id}:edit`?s.feedback.working:Yt||ke?s.save:s.experience.createEnabled})]})]})]})]})}),(0,Y.jsx)(F,{open:Fe&&!!qt,onOpenChange:e=>{Ie(e),!e&&g(e=>{let t=new URLSearchParams(e);return t.delete(`run`),t},{replace:!0})},children:(0,Y.jsxs)(ee,{children:[(0,Y.jsx)(j,{className:`xopc-dialog-overlay fixed inset-0 z-65 bg-scrim backdrop-blur-[1px]`}),(0,Y.jsxs)(N,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-66 flex h-[min(85vh,40rem)] w-[min(100%-2rem,32rem)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl border border-edge bg-surface-overlay shadow-popover outline-none`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-edge px-4 py-3`,children:[(0,Y.jsx)(P,{className:`truncate text-base font-semibold text-fg`,children:qt?.automationName??s.dashboard.result}),(0,Y.jsx)(M,{asChild:!0,children:(0,Y.jsx)(L,{variant:`ghost`,"aria-label":s.close,children:(0,Y.jsx)(D,{className:`size-4`})})})]}),(0,Y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:(0,Y.jsx)(Dn,{className:`rounded-none border-0`,run:qt,events:Zt,labels:s,cronLabels:l,language:i,loading:mt.isLoading,repairDraft:$e,repairLoading:et,repairApproved:nt,busyAction:ot,onRepairApprovedChange:rt,onSuggestRepair:nr,onApplyRepair:rr})})]})]})})]})}function hn(e){let t=(0,Te.c)(9),{templates:n,labels:r,onSelect:i}=e,a;if(t[0]!==r||t[1]!==i||t[2]!==n){let e;t[4]!==r||t[5]!==i?(e=e=>(0,Y.jsxs)(`button`,{type:`button`,onClick:()=>i(e),className:`rounded-lg border border-edge-subtle bg-surface-panel p-4 text-left hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,children:[(0,Y.jsx)(c,{className:`mb-3 size-4 text-accent-fg`,"aria-hidden":!0}),(0,Y.jsx)(`div`,{className:`text-sm font-medium text-fg`,children:e.name}),(0,Y.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:e.description}),(0,Y.jsxs)(`p`,{className:`mt-3 text-xs text-fg-muted`,children:[r.experience.source,`: `,e.source]})]},e.name),t[4]=r,t[5]=i,t[6]=e):e=t[6],a=n.map(e),t[0]=r,t[1]=i,t[2]=n,t[3]=a}else a=t[3];let o;return t[7]===a?o=t[8]:(o=(0,Y.jsx)(`div`,{className:`mt-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-4`,children:a}),t[7]=a,t[8]=o),o}function gn(e){let t=(0,Te.c)(110),{labels:n,prompt:r,draft:i,loading:a,approved:o,publishBusy:s,testBusy:c,templates:l,projects:f,projectId:p,conversationMode:m,notificationPolicy:h,onPromptChange:g,onGenerate:_,onEdit:v,onPublish:b,onTest:x,onProjectChange:S,onConversationModeChange:C,onNotificationPolicyChange:w,onApprovedChange:T,onDiscard:E,onTemplateSelect:D,onOpenAdvanced:O,projectLocked:A}=e,j=s===void 0?!1:s,M=c===void 0?!1:c,ee=A===void 0?!1:A,N=!!(i&&i.simulation.requiredConfirmations.length>0),P;t[0]!==i||t[1]!==n.draft.advancedCreate||t[2]!==n.draft.suggestions||t[3]!==n.draft.suggestionsDescription||t[4]!==n.experience||t[5]!==O||t[6]!==D||t[7]!==l?(P=i?null:(0,Y.jsxs)(`div`,{className:`mb-5 border-b border-edge-subtle pb-4`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`div`,{className:`text-sm font-semibold text-fg`,children:n.draft.suggestions}),(0,Y.jsx)(`div`,{className:`mt-1 text-xs text-fg-muted`,children:n.draft.suggestionsDescription})]}),(0,Y.jsx)(L,{variant:`ghost`,onClick:O,children:n.draft.advancedCreate})]}),(0,Y.jsx)(`div`,{className:`mt-3 grid gap-2 sm:grid-cols-2`,children:l.map(e=>(0,Y.jsxs)(`button`,{type:`button`,className:`focus-visible:ring-2 focus-visible:ring-accent rounded-lg border border-edge-subtle bg-surface-panel p-3 text-left hover:bg-surface-hover`,onClick:()=>D(e),children:[(0,Y.jsx)(`div`,{className:`text-sm font-medium text-fg`,children:e.name}),(0,Y.jsx)(`div`,{className:`mt-1 line-clamp-2 text-xs text-fg-muted`,children:e.description}),(0,Y.jsxs)(`div`,{className:`mt-2 text-xs text-fg-muted`,children:[n.experience.source,`: `,e.source]})]},e.name))})]}),t[0]=i,t[1]=n.draft.advancedCreate,t[2]=n.draft.suggestions,t[3]=n.draft.suggestionsDescription,t[4]=n.experience,t[5]=O,t[6]=D,t[7]=l,t[8]=P):P=t[8];let F;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Y.jsx)(oe,{className:`size-4 text-accent`}),t[9]=F):F=t[9];let I;t[10]===n.draft.title?I=t[11]:(I=(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[F,n.draft.title]}),t[10]=n.draft.title,t[11]=I);let R;t[12]===n.draft.subtitle?R=t[13]:(R=(0,Y.jsx)(`div`,{className:`mt-1 text-sm text-fg-muted`,children:n.draft.subtitle}),t[12]=n.draft.subtitle,t[13]=R);let z;t[14]!==I||t[15]!==R?(z=(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[I,R]}),t[14]=I,t[15]=R,t[16]=z):z=t[16];let B;t[17]!==a||t[18]!==r?(B=a||!r.trim(),t[17]=a,t[18]=r,t[19]=B):B=t[19];let te;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,Y.jsx)(oe,{className:`size-4`}),t[20]=te):te=t[20];let ne=a?n.draft.generating:n.draft.generate,re;t[21]!==_||t[22]!==ne||t[23]!==B?(re=(0,Y.jsxs)(L,{variant:`primary`,onClick:_,disabled:B,children:[te,ne]}),t[21]=_,t[22]=ne,t[23]=B,t[24]=re):re=t[24];let V;t[25]!==re||t[26]!==z?(V=(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[z,re]}),t[25]=re,t[26]=z,t[27]=V):V=t[27];let H;t[28]===g?H=t[29]:(H=e=>g(e.target.value),t[28]=g,t[29]=H);let U;t[30]!==n.draft.placeholder||t[31]!==n.draft.title||t[32]!==r||t[33]!==H?(U=(0,Y.jsx)(`textarea`,{"aria-label":n.draft.title,className:`mt-4 min-h-20 w-full resize-y rounded-lg border border-edge bg-surface-base px-3 py-2 text-sm text-fg outline-none focus:border-accent`,value:r,onChange:H,placeholder:n.draft.placeholder}),t[30]=n.draft.placeholder,t[31]=n.draft.title,t[32]=r,t[33]=H,t[34]=U):U=t[34];let ie=ee?`sm:grid-cols-2`:`sm:grid-cols-3`,ae;t[35]===ie?ae=t[36]:(ae=k(`mt-3 grid gap-3`,ie),t[35]=ie,t[36]=ae);let se;t[37]!==n.draft.noProject||t[38]!==n.draft.project||t[39]!==S||t[40]!==p||t[41]!==ee||t[42]!==f?(se=ee?null:(0,Y.jsx)(Hn,{label:n.draft.project,children:(0,Y.jsxs)(u,{className:Vn,value:p,onChange:e=>S(e.target.value),children:[(0,Y.jsx)(d,{value:``,children:n.draft.noProject}),f.map(_n)]})}),t[37]=n.draft.noProject,t[38]=n.draft.project,t[39]=S,t[40]=p,t[41]=ee,t[42]=f,t[43]=se):se=t[43];let ce;t[44]===C?ce=t[45]:(ce=e=>C(e.target.value),t[44]=C,t[45]=ce);let W;t[46]===n.draft.newConversation?W=t[47]:(W=(0,Y.jsx)(d,{value:`new_session`,children:n.draft.newConversation}),t[46]=n.draft.newConversation,t[47]=W);let le;t[48]===n.draft.continuousConversation?le=t[49]:(le=(0,Y.jsx)(d,{value:`continuous`,children:n.draft.continuousConversation}),t[48]=n.draft.continuousConversation,t[49]=le);let G;t[50]!==m||t[51]!==ce||t[52]!==W||t[53]!==le?(G=(0,Y.jsxs)(u,{className:Vn,value:m,onChange:ce,children:[W,le]}),t[50]=m,t[51]=ce,t[52]=W,t[53]=le,t[54]=G):G=t[54];let ue;t[55]!==n.draft.conversation||t[56]!==G?(ue=(0,Y.jsx)(Hn,{label:n.draft.conversation,children:G}),t[55]=n.draft.conversation,t[56]=G,t[57]=ue):ue=t[57];let de;t[58]===w?de=t[59]:(de=e=>w(e.target.value),t[58]=w,t[59]=de);let fe;t[60]===n.draft.notifyAttention?fe=t[61]:(fe=(0,Y.jsx)(d,{value:`attention`,children:n.draft.notifyAttention}),t[60]=n.draft.notifyAttention,t[61]=fe);let pe;t[62]===n.draft.notifyAll?pe=t[63]:(pe=(0,Y.jsx)(d,{value:`all`,children:n.draft.notifyAll}),t[62]=n.draft.notifyAll,t[63]=pe);let he;t[64]===n.draft.notifyNone?he=t[65]:(he=(0,Y.jsx)(d,{value:`none`,children:n.draft.notifyNone}),t[64]=n.draft.notifyNone,t[65]=he);let ge;t[66]!==h||t[67]!==de||t[68]!==fe||t[69]!==pe||t[70]!==he?(ge=(0,Y.jsxs)(u,{className:Vn,value:h,onChange:de,children:[fe,pe,he]}),t[66]=h,t[67]=de,t[68]=fe,t[69]=pe,t[70]=he,t[71]=ge):ge=t[71];let K;t[72]!==n.draft.notifications||t[73]!==ge?(K=(0,Y.jsx)(Hn,{label:n.draft.notifications,children:ge}),t[72]=n.draft.notifications,t[73]=ge,t[74]=K):K=t[74];let _e;t[75]!==ae||t[76]!==se||t[77]!==ue||t[78]!==K?(_e=(0,Y.jsxs)(`div`,{className:ae,children:[se,ue,K]}),t[75]=ae,t[76]=se,t[77]=ue,t[78]=K,t[79]=_e):_e=t[79];let ve;t[80]!==o||t[81]!==i||t[82]!==n.draft.approval||t[83]!==n.draft.assumptions||t[84]!==n.draft.discard||t[85]!==n.draft.edit||t[86]!==n.draft.publish||t[87]!==n.draft.review||t[88]!==n.draft.risks||t[89]!==n.draft.safety||t[90]!==n.draft.testOnce||t[91]!==n.draft.testing||t[92]!==n.feedback||t[93]!==n.info||t[94]!==n.none||t[95]!==T||t[96]!==E||t[97]!==v||t[98]!==b||t[99]!==x||t[100]!==j||t[101]!==N||t[102]!==M?(ve=i?(0,Y.jsxs)(`div`,{className:`mt-4 grid gap-3 rounded-lg bg-surface-base p-4 lg:grid-cols-[1fr_1fr]`,children:[(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`div`,{className:`text-sm font-semibold text-fg`,children:i.automation.name}),i.automation.description?(0,Y.jsx)(`div`,{className:`mt-1 text-sm text-fg-muted`,children:i.automation.description}):null,(0,Y.jsxs)(`div`,{className:`mt-3 grid gap-2 text-sm`,children:[(0,Y.jsx)(Fn,{label:n.info.when,value:i.simulation.triggerSummary}),(0,Y.jsx)(Fn,{label:n.info.run,value:i.simulation.actionSummary})]})]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`div`,{className:`text-xs font-semibold uppercase text-fg-muted`,children:n.draft.review}),(0,Y.jsx)(vn,{title:n.draft.safety,items:[...i.simulation.safetyNotes,...i.simulation.requiredConfirmations],empty:n.none}),(0,Y.jsx)(vn,{title:n.draft.assumptions,items:i.assumptions,empty:n.none}),(0,Y.jsx)(vn,{title:n.draft.risks,items:i.risks,empty:n.none}),N?(0,Y.jsxs)(`label`,{className:`mt-4 flex items-start gap-2 text-sm text-fg`,children:[(0,Y.jsx)(`input`,{className:`mt-1`,type:`checkbox`,checked:o,onChange:e=>T(e.target.checked)}),(0,Y.jsx)(`span`,{children:n.draft.approval})]}):null,(0,Y.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,Y.jsx)(L,{variant:`ghost`,onClick:E,children:n.draft.discard}),(0,Y.jsxs)(L,{variant:`secondary`,onClick:v,children:[(0,Y.jsx)(y,{className:`size-4`}),n.draft.edit]}),(0,Y.jsxs)(L,{variant:`secondary`,onClick:x,disabled:M||j||N&&!o,children:[(0,Y.jsx)(me,{className:`size-4`}),M?n.draft.testing:n.draft.testOnce]}),(0,Y.jsx)(L,{variant:`primary`,onClick:b,disabled:j||N&&!o,children:j?n.feedback.working:n.draft.publish})]})]})]}):null,t[80]=o,t[81]=i,t[82]=n.draft.approval,t[83]=n.draft.assumptions,t[84]=n.draft.discard,t[85]=n.draft.edit,t[86]=n.draft.publish,t[87]=n.draft.review,t[88]=n.draft.risks,t[89]=n.draft.safety,t[90]=n.draft.testOnce,t[91]=n.draft.testing,t[92]=n.feedback,t[93]=n.info,t[94]=n.none,t[95]=T,t[96]=E,t[97]=v,t[98]=b,t[99]=x,t[100]=j,t[101]=N,t[102]=M,t[103]=ve):ve=t[103];let ye;return t[104]!==V||t[105]!==U||t[106]!==_e||t[107]!==ve||t[108]!==P?(ye=(0,Y.jsxs)(`section`,{className:`rounded-lg border border-edge-subtle bg-surface-base p-4 shadow-surface`,children:[P,V,U,_e,ve]}),t[104]=V,t[105]=U,t[106]=_e,t[107]=ve,t[108]=P,t[109]=ye):ye=t[109],ye}function _n(e){return(0,Y.jsx)(d,{value:e.id,children:e.name},e.id)}function vn(e){let t=(0,Te.c)(10),{title:n,items:r,empty:i}=e,a;t[0]===n?a=t[1]:(a=(0,Y.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:n}),t[0]=n,t[1]=a);let o;t[2]!==i||t[3]!==r?(o=r.length>0?r.map(yn):(0,Y.jsx)(`li`,{className:`text-fg-muted`,children:i}),t[2]=i,t[3]=r,t[4]=o):o=t[4];let s;t[5]===o?s=t[6]:(s=(0,Y.jsx)(`ul`,{className:`mt-1 space-y-1 text-sm text-fg`,children:o}),t[5]=o,t[6]=s);let c;return t[7]!==a||t[8]!==s?(c=(0,Y.jsxs)(`div`,{className:`mt-3`,children:[a,s]}),t[7]=a,t[8]=s,t[9]=c):c=t[9],c}function yn(e){return(0,Y.jsxs)(`li`,{children:[`- `,e]},e)}function bn(e){let t=(0,Te.c)(25),{icon:n,label:r,value:i,tone:a,active:o,onClick:s}=e,c=a===void 0?`default`:a,l=c===`danger`?`text-red-600 dark:text-red-300`:`text-fg-subtle`,u;t[0]===l?u=t[1]:(u=k(`shrink-0`,l),t[0]=l,t[1]=u);let d;t[2]!==n||t[3]!==u?(d=(0,Y.jsx)(`span`,{className:u,children:n}),t[2]=n,t[3]=u,t[4]=d):d=t[4];let f;t[5]===r?f=t[6]:(f=(0,Y.jsx)(`span`,{className:`truncate text-xs font-medium text-fg-muted`,children:r}),t[5]=r,t[6]=f);let p=c===`danger`?`text-red-700 dark:text-red-300`:`text-fg`,m;t[7]===p?m=t[8]:(m=k(`ml-auto truncate text-sm font-semibold tabular-nums`,p),t[7]=p,t[8]=m);let h;t[9]!==m||t[10]!==i?(h=(0,Y.jsx)(`span`,{className:m,children:i}),t[9]=m,t[10]=i,t[11]=h):h=t[11];let g;t[12]!==d||t[13]!==f||t[14]!==h?(g=(0,Y.jsxs)(Y.Fragment,{children:[d,f,h]}),t[12]=d,t[13]=f,t[14]=h,t[15]=g):g=t[15];let _=g,v=o&&`bg-accent/8`,y=s&&`cursor-pointer hover:bg-surface-hover focus-visible:z-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent`,b;t[16]!==v||t[17]!==y?(b=k(`flex min-h-12 min-w-0 items-center gap-2.5 bg-surface-base px-3 py-2.5 text-left transition-colors`,v,y),t[16]=v,t[17]=y,t[18]=b):b=t[18];let x=b,S=`${r}: ${i}`,C;return t[19]!==S||t[20]!==o||t[21]!==x||t[22]!==_||t[23]!==s?(C=s?(0,Y.jsx)(`button`,{type:`button`,className:x,onClick:s,"aria-label":S,"aria-pressed":o,children:_}):(0,Y.jsx)(`div`,{className:x,"aria-label":S,children:_}),t[19]=S,t[20]=o,t[21]=x,t[22]=_,t[23]=s,t[24]=C):C=t[24],C}function xn(e){let t=(0,Te.c)(74),{runs:n,ownership:r,labels:i,language:a,unreadCount:o,loading:s,onOwnershipChange:c,onRefresh:l,onSelectRun:u}=e,d;t[0]===n?d=t[1]:(d=n.filter(nn),t[0]=n,t[1]=d);let f=d.length,m;t[2]===n?m=t[3]:(m=n.filter(rn),t[2]=n,t[3]=m);let h=m.length,g;t[4]===i.dashboard.activity?g=t[5]:(g=(0,Y.jsx)(`h2`,{id:`automation-activity-title`,className:`text-sm font-semibold text-fg`,children:i.dashboard.activity}),t[4]=i.dashboard.activity,t[5]=g);let _;t[6]===i.dashboard.activityDescription?_=t[7]:(_=(0,Y.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-fg-muted`,children:i.dashboard.activityDescription}),t[6]=i.dashboard.activityDescription,t[7]=_);let v;t[8]!==g||t[9]!==_?(v=(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[g,_]}),t[8]=g,t[9]=_,t[10]=v):v=t[10];let y=i.filters.ownership,b=r===`user`&&`bg-surface-base text-fg shadow-sm`,x;t[11]===b?x=t[12]:(x=k(`rounded-md px-2.5 py-1.5 text-xs font-medium text-fg-muted hover:text-fg`,b),t[11]=b,t[12]=x);let S;t[13]===c?S=t[14]:(S=()=>c(`user`),t[13]=c,t[14]=S);let C=r===`user`,w;t[15]!==i.filters.userManaged||t[16]!==C||t[17]!==x||t[18]!==S?(w=(0,Y.jsx)(`button`,{type:`button`,className:x,onClick:S,"aria-pressed":C,children:i.filters.userManaged}),t[15]=i.filters.userManaged,t[16]=C,t[17]=x,t[18]=S,t[19]=w):w=t[19];let T=r===`system`&&`bg-surface-base text-fg shadow-sm`,E;t[20]===T?E=t[21]:(E=k(`rounded-md px-2.5 py-1.5 text-xs font-medium text-fg-muted hover:text-fg`,T),t[20]=T,t[21]=E);let D;t[22]===c?D=t[23]:(D=()=>c(`system`),t[22]=c,t[23]=D);let O=r===`system`,A;t[24]!==i.system.title||t[25]!==E||t[26]!==D||t[27]!==O?(A=(0,Y.jsx)(`button`,{type:`button`,className:E,onClick:D,"aria-pressed":O,children:i.system.title}),t[24]=i.system.title,t[25]=E,t[26]=D,t[27]=O,t[28]=A):A=t[28];let j;t[29]!==i.filters.ownership||t[30]!==w||t[31]!==A?(j=(0,Y.jsxs)(`div`,{className:`flex rounded-lg bg-surface-panel p-0.5`,role:`group`,"aria-label":y,children:[w,A]}),t[29]=i.filters.ownership,t[30]=w,t[31]=A,t[32]=j):j=t[32];let M;t[33]!==i.refresh||t[34]!==s||t[35]!==l?(M=(0,Y.jsx)(ce,{className:`size-9 shrink-0 p-0`,loading:s,label:i.refresh,onClick:l}),t[33]=i.refresh,t[34]=s,t[35]=l,t[36]=M):M=t[36];let ee;t[37]!==j||t[38]!==M?(ee=(0,Y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[j,M]}),t[37]=j,t[38]=M,t[39]=ee):ee=t[39];let N;t[40]!==ee||t[41]!==v?(N=(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3 border-b border-edge-subtle px-4 py-3 sm:px-5`,children:[v,ee]}),t[40]=ee,t[41]=v,t[42]=N):N=t[42];let P;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Y.jsx)(ve,{className:`size-4`,"aria-hidden":!0}),t[43]=P):P=t[43];let F=i.metrics.total,I=String(n.length),L;t[44]!==i.metrics.total||t[45]!==I?(L=(0,Y.jsx)(bn,{icon:P,label:F,value:I}),t[44]=i.metrics.total,t[45]=I,t[46]=L):L=t[46];let R;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Y.jsx)(me,{className:`size-4`,"aria-hidden":!0}),t[47]=R):R=t[47];let z=i.metrics.running,B=String(f),te;t[48]!==i.metrics.running||t[49]!==B?(te=(0,Y.jsx)(bn,{icon:R,label:z,value:B}),t[48]=i.metrics.running,t[49]=B,t[50]=te):te=t[50];let ne;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,Y.jsx)(ie,{className:`size-4`,"aria-hidden":!0}),t[51]=ne):ne=t[51];let re=i.dashboard.needsAttention,V=String(h),H=h>0?`danger`:`default`,U;t[52]!==i.dashboard.needsAttention||t[53]!==V||t[54]!==H?(U=(0,Y.jsx)(bn,{icon:ne,label:re,value:V,tone:H}),t[52]=i.dashboard.needsAttention,t[53]=V,t[54]=H,t[55]=U):U=t[55];let ae;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,Y.jsx)(p,{className:`size-4`,"aria-hidden":!0}),t[56]=ae):ae=t[56];let oe=i.filters.unread,se=String(o),W;t[57]!==i.filters.unread||t[58]!==se?(W=(0,Y.jsx)(bn,{icon:ae,label:oe,value:se}),t[57]=i.filters.unread,t[58]=se,t[59]=W):W=t[59];let le;t[60]!==L||t[61]!==te||t[62]!==U||t[63]!==W?(le=(0,Y.jsxs)(`div`,{className:`grid grid-cols-2 gap-px border-b border-edge-subtle bg-edge-subtle lg:grid-cols-4`,children:[L,te,U,W]}),t[60]=L,t[61]=te,t[62]=U,t[63]=W,t[64]=le):le=t[64];let G;t[65]!==i||t[66]!==a||t[67]!==u||t[68]!==n?(G=n.length===0?(0,Y.jsx)(In,{className:`min-h-64 rounded-none border-0 shadow-none`,icon:(0,Y.jsx)(ve,{className:`size-5`}),title:i.empty.runs}):(0,Y.jsx)(`div`,{className:`divide-y divide-edge-subtle`,children:n.map(e=>(0,Y.jsxs)(`button`,{type:`button`,className:`flex w-full min-w-0 items-start gap-3 px-4 py-3 text-left hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent sm:px-5`,onClick:()=>u(e.id),children:[(0,Y.jsx)(`span`,{className:k(`mt-1.5 size-2 shrink-0 rounded-full`,nn(e)?`bg-blue-500`:rn(e)?`bg-red-500`:`bg-emerald-500`),"aria-hidden":!0}),(0,Y.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium text-fg`,children:e.automationName}),e.readAtMs==null&&!nn(e)?(0,Y.jsx)(`span`,{className:`size-2 shrink-0 rounded-full bg-blue-500`,children:(0,Y.jsx)(`span`,{className:`sr-only`,children:i.filters.unread})}):null]}),(0,Y.jsx)(`span`,{className:k(`mt-1 line-clamp-2 block text-sm text-fg-muted`,e.error&&`text-red-700 dark:text-red-300`),children:e.error||e.summary||i.status[e.status]}),(0,Y.jsx)(`span`,{className:`mt-1 block text-xs text-fg-subtle`,children:qt(e.createdAtMs,i,a)})]}),(0,Y.jsx)(`span`,{className:k(`shrink-0 rounded-full px-2 py-0.5 text-xs`,en(e.status)),children:i.status[e.status]})]},e.id))}),t[65]=i,t[66]=a,t[67]=u,t[68]=n,t[69]=G):G=t[69];let ue;return t[70]!==N||t[71]!==le||t[72]!==G?(ue=(0,Y.jsxs)(`section`,{className:`overflow-hidden rounded-xl border border-edge-subtle bg-surface-base shadow-surface`,"aria-labelledby":`automation-activity-title`,children:[N,le,G]}),t[70]=N,t[71]=le,t[72]=G,t[73]=ue):ue=t[73],ue}function Sn(e){let t=(0,Te.c)(20),{automations:n,runs:r,labels:i,cronLabels:a,language:o,selectedAutomationId:s,onOpenDetails:l}=e;if(n.length===0){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Y.jsx)(H,{className:`size-5`}),t[0]=e):e=t[0];let n;return t[1]===i.empty.filtered?n=t[2]:(n=(0,Y.jsx)(In,{className:`rounded-none border-0 shadow-none`,icon:e,title:i.empty.filtered}),t[1]=i.empty.filtered,t[2]=n),n}let u;if(t[3]!==n||t[4]!==a||t[5]!==i||t[6]!==o||t[7]!==l||t[8]!==r||t[9]!==s){let e;t[11]!==a||t[12]!==i||t[13]!==o||t[14]!==l||t[15]!==r||t[16]!==s?(e=e=>{let t=r.filter(t=>t.automationId===e.id).sort(Cn),n=t.find(nn),u=t[0];return(0,Y.jsxs)(`button`,{type:`button`,className:k(`block w-full p-3 text-left outline-none hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent`,s===e.id&&`bg-surface-hover`),style:{contentVisibility:`auto`,containIntrinsicSize:`auto 130px`},"aria-current":s===e.id?`true`:void 0,onClick:()=>l(e.id),children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Y.jsx)(`span`,{className:k(`size-2 shrink-0 rounded-full`,n?`bg-blue-500`:Wt(e,t)?`bg-red-500`:e.enabled?`bg-emerald-500`:`bg-fg-subtle`)}),(0,Y.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm font-medium text-fg`,children:e.name}),(0,Y.jsx)(`span`,{className:`shrink-0 text-xs text-fg-muted`,children:e.enabled?i.enabled:i.paused}),u&&u.readAtMs==null&&!nn(u)?(0,Y.jsx)(`span`,{className:`ml-auto size-2 shrink-0 rounded-full bg-blue-500`,children:(0,Y.jsx)(`span`,{className:`sr-only`,children:i.filters.unread})}):null]}),(0,Y.jsxs)(`div`,{className:`mt-2 flex min-w-0 flex-wrap items-center gap-1.5 pl-4 text-xs`,children:[(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md border border-edge-subtle bg-surface-panel px-1.5 py-0.5 text-fg-muted`,children:[(0,Y.jsx)(Qt,{kind:e.action.kind,className:`size-3`}),Yt(e.action,i)]}),(0,Y.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1 rounded-md bg-surface-panel px-1.5 py-0.5 text-fg-muted`,children:[(0,Y.jsx)(c,{className:`size-3 shrink-0`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`truncate`,children:wt(e.trigger,i,a,o)})]})]}),(0,Y.jsxs)(`div`,{className:`mt-2 flex min-w-0 items-center justify-between gap-2 pl-4 text-xs text-fg-subtle`,children:[(0,Y.jsx)(`span`,{className:k(`line-clamp-2`,u?.error&&`text-red-700 dark:text-red-300`),children:u?u.error||u.summary||i.status[u.status]:e.state.lastError||(e.state.lastRunStatus?i.status[e.state.lastRunStatus]:i.experience.noRuns)}),u?.status?(0,Y.jsx)(`span`,{className:k(`shrink-0 rounded-full px-1.5 py-0.5`,en(u.status)),children:i.status[u.status]}):null]}),(0,Y.jsxs)(`div`,{className:`mt-2 space-y-1 pl-4 text-xs text-fg-muted`,children:[u?(0,Y.jsxs)(`div`,{children:[i.last,`: `,qt(u.createdAtMs,i,o)]}):null,(0,Y.jsx)(`div`,{children:e.enabled?`${i.next}: ${Tt(e,i,o)}`:i.paused})]})]},e.id)},t[11]=a,t[12]=i,t[13]=o,t[14]=l,t[15]=r,t[16]=s,t[17]=e):e=t[17],u=n.map(e),t[3]=n,t[4]=a,t[5]=i,t[6]=o,t[7]=l,t[8]=r,t[9]=s,t[10]=u}else u=t[10];let d;return t[18]===u?d=t[19]:(d=(0,Y.jsx)(`div`,{className:`min-h-0 overflow-y-auto divide-y divide-edge-subtle`,children:u}),t[18]=u,t[19]=d),d}function Cn(e,t){return t.createdAtMs-e.createdAtMs}function wn(e,t){let n=t.events,r=e.data&&typeof e.data==`object`?e.data:{},i=typeof r.actionKind==`string`?r.actionKind:null,a=typeof r.status==`string`&&r.status in t.status?t.status[r.status]:null;switch(e.type){case`run.queued`:return e.message.toLowerCase().includes(`manual`)?n.manualQueued:e.message.toLowerCase().includes(`scheduled`)?n.scheduledQueued:n.eventQueued;case`run.started`:return n.runStarted;case`action.started`:return i?n.actionStarted.replace(`{kind}`,i):n.actionStartedFallback;case`action.completed`:return i?n.actionCompleted.replace(`{kind}`,i):n.actionCompletedFallback;case`action.failed`:return i?n.actionFailed.replace(`{kind}`,i):n.actionFailedFallback;case`completion_hook.started`:return n.completionHookStarted;case`completion_hook.completed`:return n.completionHookCompleted;case`completion_hook.failed`:return n.completionHookFailed;case`run.completed`:return a?n.runCompleted.replace(`{status}`,a):n.runCompletedFallback;default:return e.message}}function Tn(e){let t=(0,Te.c)(17),{value:n,labels:r,title:i,defaultExpanded:a}=e,[o,s]=(0,J.useState)(a===void 0?!1:a),c;t[0]===n?c=t[1]:(c=JSON.stringify(n,null,2),t[0]=n,t[1]=c);let l=c,u;t[2]===l?u=t[3]:(u=l.split(`
|
|
3
|
-
`),t[2]=l,t[3]=u);let d=u.length,f=l.length>720||d>18,p;t[4]!==f||t[5]!==l?(p=f?`${l.split(`
|
|
4
|
-
`).slice(0,10).join(`
|
|
5
|
-
`).trimEnd()}...`:l,t[4]=f,t[5]=l,t[6]=p):p=t[6];let m=p,h;t[7]!==o||t[8]!==f||t[9]!==r||t[10]!==i?(h=f?(0,Y.jsxs)(`button`,{type:`button`,className:`flex w-full items-center justify-between gap-3 px-2.5 py-2 text-left text-xs font-medium text-fg-muted hover:bg-surface-hover hover:text-fg`,onClick:()=>s(En),"aria-expanded":o,children:[(0,Y.jsx)(`span`,{children:i}),(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-accent-fg`,children:[o?r.details.hideDetails:r.details.showDetails,(0,Y.jsx)(fe,{className:k(`size-3.5 transition-transform`,o&&`rotate-180`),"aria-hidden":!0})]})]}):(0,Y.jsx)(`div`,{className:`px-2.5 py-2 text-xs font-medium text-fg-muted`,children:i}),t[7]=o,t[8]=f,t[9]=r,t[10]=i,t[11]=h):h=t[11];let g=o||!f?l:m,_;t[12]===g?_=t[13]:(_=(0,Y.jsx)(`pre`,{className:`whitespace-pre-wrap break-all px-2.5 pb-2 text-xs leading-relaxed text-fg-muted`,children:g}),t[12]=g,t[13]=_);let v;return t[14]!==h||t[15]!==_?(v=(0,Y.jsxs)(`div`,{className:`mt-2 rounded-md border border-edge/70 bg-surface-inset/35`,children:[h,_]}),t[14]=h,t[15]=_,t[16]=v):v=t[16],v}function En(e){return!e}function Dn(e){let t=(0,Te.c)(148),{className:n,run:r,events:i,labels:a,cronLabels:s,language:c,loading:l,repairDraft:u,repairLoading:d,repairApproved:f,busyAction:m,onRepairApprovedChange:h,onSuggestRepair:y,onApplyRepair:b}=e;if(!r){let e;t[0]===n?e=t[1]:(e=k(`flex min-h-64 flex-col justify-center rounded-lg border border-edge-subtle bg-surface-base px-4 text-center text-sm text-fg-muted shadow-surface`,n),t[0]=n,t[1]=e);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Y.jsx)(ve,{className:`mx-auto size-5`}),t[2]=r):r=t[2];let i;t[3]===a.selectRun?i=t[4]:(i=(0,Y.jsx)(`div`,{className:`mt-2`,children:a.selectRun}),t[3]=a.selectRun,t[4]=i);let o;return t[5]!==e||t[6]!==i?(o=(0,Y.jsxs)(`aside`,{className:e,children:[r,i]}),t[5]=e,t[6]=i,t[7]=o):o=t[7],o}let x=r.error||r.summary,S=r.conversationId?`/chat/${encodeURIComponent(r.conversationId)}`:r.workflowRunId?`/workflows?run=${encodeURIComponent(r.workflowRunId)}`:null,C=r.conversationId?a.runDetail.openConversation:a.runDetail.openWorkflow,w=r.conversationId?v:_,T=nn(r)?ve:r.status===`succeeded`?p:ie,E;t[8]===n?E=t[9]:(E=k(`rounded-lg border border-edge-subtle bg-surface-base shadow-surface`,n),t[8]=n,t[9]=E);let D;t[10]===r.automationName?D=t[11]:(D=(0,Y.jsx)(`div`,{className:`truncate text-sm font-semibold text-fg`,children:r.automationName}),t[10]=r.automationName,t[11]=D);let O;t[12]===r.id?O=t[13]:(O=r.id.slice(0,8),t[12]=r.id,t[13]=O);let A;t[14]===O?A=t[15]:(A=(0,Y.jsx)(`div`,{className:`mt-1 text-xs text-fg-muted`,children:O}),t[14]=O,t[15]=A);let j;t[16]!==D||t[17]!==A?(j=(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[D,A]}),t[16]=D,t[17]=A,t[18]=j):j=t[18];let M;t[19]===r.status?M=t[20]:(M=k(`shrink-0 rounded-full px-2 py-0.5 text-xs`,en(r.status)),t[19]=r.status,t[20]=M);let ee=a.status[r.status],N;t[21]!==M||t[22]!==ee?(N=(0,Y.jsx)(`span`,{className:M,children:ee}),t[21]=M,t[22]=ee,t[23]=N):N=t[23];let P;t[24]!==j||t[25]!==N?(P=(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[j,N]}),t[24]=j,t[25]=N,t[26]=P):P=t[26];let F;t[27]!==a||t[28]!==c||t[29]!==r.createdAtMs?(F=qt(r.createdAtMs,a,c),t[27]=a,t[28]=c,t[29]=r.createdAtMs,t[30]=F):F=t[30];let I;t[31]===F?I=t[32]:(I=(0,Y.jsx)(`span`,{children:F}),t[31]=F,t[32]=I);let R;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Y.jsx)(`span`,{"aria-hidden":!0,children:`·`}),t[33]=R):R=t[33];let z=a.details.duration,te;t[34]!==a||t[35]!==r.durationMs?(te=tn(r.durationMs,a),t[34]=a,t[35]=r.durationMs,t[36]=te):te=t[36];let ne;t[37]!==a.details.duration||t[38]!==te?(ne=(0,Y.jsxs)(`span`,{children:[z,` `,te]}),t[37]=a.details.duration,t[38]=te,t[39]=ne):ne=t[39];let re;t[40]!==I||t[41]!==ne?(re=(0,Y.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-fg-muted`,children:[I,R,ne]}),t[40]=I,t[41]=ne,t[42]=re):re=t[42];let V;t[43]!==a.repair||t[44]!==y||t[45]!==d||t[46]!==r?(V=r.status===`failed`||r.status===`timeout`||r.status===`cancelled`?(0,Y.jsx)(`div`,{className:`mt-3 flex justify-end`,children:(0,Y.jsxs)(L,{variant:`secondary`,onClick:()=>y(r),disabled:d,children:[(0,Y.jsx)(oe,{className:`size-4`}),d?a.repair.generating:a.repair.suggest]})}):null,t[43]=a.repair,t[44]=y,t[45]=d,t[46]=r,t[47]=V):V=t[47];let H;t[48]!==re||t[49]!==V||t[50]!==P?(H=(0,Y.jsxs)(`div`,{className:`border-b border-edge px-4 py-3`,children:[P,re,V]}),t[48]=re,t[49]=V,t[50]=P,t[51]=H):H=t[51];let U;t[52]===r?U=t[53]:(U=nn(r)?`text-blue-500`:rn(r)?`text-red-500`:r.status===`succeeded`?`text-emerald-500`:`text-fg-muted`,t[52]=r,t[53]=U);let ae;t[54]===U?ae=t[55]:(ae=k(`size-4`,U),t[54]=U,t[55]=ae);let se;t[56]!==T||t[57]!==ae?(se=(0,Y.jsx)(T,{className:ae}),t[56]=T,t[57]=ae,t[58]=se):se=t[58];let ce;t[59]!==a.runDetail.resultTitle||t[60]!==se?(ce=(0,Y.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[se,a.runDetail.resultTitle]}),t[59]=a.runDetail.resultTitle,t[60]=se,t[61]=ce):ce=t[61];let W;t[62]!==w||t[63]!==C||t[64]!==S?(W=S?(0,Y.jsx)(L,{asChild:!0,variant:`secondary`,className:`h-8 rounded-md px-2.5 text-xs`,children:(0,Y.jsxs)(o,{to:S,children:[(0,Y.jsx)(w,{className:`size-3.5`}),C,(0,Y.jsx)(G,{className:`size-3.5`})]})}):null,t[62]=w,t[63]=C,t[64]=S,t[65]=W):W=t[65];let le;t[66]!==ce||t[67]!==W?(le=(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[ce,W]}),t[66]=ce,t[67]=W,t[68]=le):le=t[68];let ue=r.error&&`border-red-500/25 bg-red-500/5`,de;t[69]===ue?de=t[70]:(de=k(`mt-3 max-h-80 overflow-y-auto rounded-lg border border-edge/70 bg-surface-inset/25 p-3`,ue),t[69]=ue,t[70]=de);let pe;t[71]!==a.runDetail.noResult||t[72]!==a.runDetail.resultPending||t[73]!==x||t[74]!==r?(pe=x?r.error?(0,Y.jsx)(`p`,{className:`whitespace-pre-wrap break-words text-sm leading-relaxed text-red-700 dark:text-red-300`,children:x}):(0,Y.jsx)(g,{content:x,compact:!0,className:`text-sm`}):(0,Y.jsx)(`p`,{className:`text-sm leading-relaxed text-fg-muted`,children:nn(r)?a.runDetail.resultPending:a.runDetail.noResult}),t[71]=a.runDetail.noResult,t[72]=a.runDetail.resultPending,t[73]=x,t[74]=r,t[75]=pe):pe=t[75];let me;t[76]!==de||t[77]!==pe?(me=(0,Y.jsx)(`div`,{className:de,children:pe}),t[76]=de,t[77]=pe,t[78]=me):me=t[78];let he;t[79]!==le||t[80]!==me?(he=(0,Y.jsxs)(`section`,{className:`border-b border-edge p-4`,children:[le,me]}),t[79]=le,t[80]=me,t[81]=he):he=t[81];let ge;t[82]===a.runDetail.runInfo?ge=t[83]:(ge=(0,Y.jsx)(`div`,{className:`text-xs font-semibold uppercase text-fg-muted`,children:a.runDetail.runInfo}),t[82]=a.runDetail.runInfo,t[83]=ge);let K;t[84]!==s||t[85]!==a||t[86]!==c||t[87]!==r.manual||t[88]!==r.triggerSnapshot?(K=r.manual?a.trigger.manual:wt(r.triggerSnapshot,a,s,c),t[84]=s,t[85]=a,t[86]=c,t[87]=r.manual,t[88]=r.triggerSnapshot,t[89]=K):K=t[89];let _e;t[90]!==a.explain.whyRan||t[91]!==K?(_e=(0,Y.jsx)(Nn,{label:a.explain.whyRan,value:K}),t[90]=a.explain.whyRan,t[91]=K,t[92]=_e):_e=t[92];let ye=a.details.started,be;t[93]!==a||t[94]!==c||t[95]!==r.startedAtMs?(be=qt(r.startedAtMs,a,c),t[93]=a,t[94]=c,t[95]=r.startedAtMs,t[96]=be):be=t[96];let q;t[97]!==a.details.started||t[98]!==be?(q=(0,Y.jsx)(Nn,{label:ye,value:be}),t[97]=a.details.started,t[98]=be,t[99]=q):q=t[99];let xe;t[100]!==a.details.model||t[101]!==r.model?(xe=r.model?(0,Y.jsx)(Nn,{label:a.details.model,value:r.model}):null,t[100]=a.details.model,t[101]=r.model,t[102]=xe):xe=t[102];let Se;t[103]!==_e||t[104]!==q||t[105]!==xe?(Se=(0,Y.jsxs)(`div`,{className:`mt-3 grid gap-2 text-xs text-fg-muted`,children:[_e,q,xe]}),t[103]=_e,t[104]=q,t[105]=xe,t[106]=Se):Se=t[106];let Ce;t[107]!==ge||t[108]!==Se?(Ce=(0,Y.jsxs)(`section`,{className:`border-b border-edge p-4`,children:[ge,Se]}),t[107]=ge,t[108]=Se,t[109]=Ce):Ce=t[109];let J;t[110]!==m||t[111]!==a||t[112]!==b||t[113]!==h||t[114]!==f||t[115]!==u||t[116]!==r?(J=u?(0,Y.jsxs)(`div`,{className:`border-b border-edge px-4 py-3`,children:[(0,Y.jsx)(`div`,{className:`text-xs font-semibold uppercase text-fg-muted`,children:a.repair.title}),(0,Y.jsx)(`div`,{className:`mt-2 text-sm text-fg`,children:u.explanation}),u.expectedEffect?(0,Y.jsx)(`div`,{className:`mt-2 text-sm text-fg-muted`,children:u.expectedEffect}):null,(0,Y.jsx)(vn,{title:a.repair.risks,items:u.risks,empty:a.none}),(0,Y.jsx)(Tn,{value:u.patch,labels:a,title:a.details.repairPatch}),u.requiresApproval?(0,Y.jsxs)(`label`,{className:`mt-3 flex items-start gap-2 text-sm text-fg`,children:[(0,Y.jsx)(`input`,{className:`mt-1`,type:`checkbox`,checked:f,onChange:e=>h(e.target.checked)}),(0,Y.jsx)(`span`,{children:a.repair.approval})]}):null,(0,Y.jsx)(`div`,{className:`mt-3 flex justify-end`,children:(0,Y.jsx)(L,{variant:`primary`,onClick:()=>b(r),disabled:m===`run:${r.id}:repair`||u.requiresApproval&&!f,children:m===`run:${r.id}:repair`?a.feedback.working:a.repair.apply})})]}):null,t[110]=m,t[111]=a,t[112]=b,t[113]=h,t[114]=f,t[115]=u,t[116]=r,t[117]=J):J=t[117];let Ee;t[118]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,Y.jsx)(we,{className:`size-4 shrink-0`}),t[118]=Ee):Ee=t[118];let De;t[119]===a.runDetail.technicalEvents?De=t[120]:(De=(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2 text-sm font-medium text-fg-muted`,children:[Ee,a.runDetail.technicalEvents]}),t[119]=a.runDetail.technicalEvents,t[120]=De);let Oe;t[121]!==i.length||t[122]!==a.runDetail.eventCount?(Oe=a.runDetail.eventCount.replace(`{count}`,String(i.length)),t[121]=i.length,t[122]=a.runDetail.eventCount,t[123]=Oe):Oe=t[123];let ke;t[124]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,Y.jsx)(fe,{className:`size-4 transition-transform group-open:rotate-180`}),t[124]=ke):ke=t[124];let Ae;t[125]===Oe?Ae=t[126]:(Ae=(0,Y.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 text-xs text-fg-muted`,children:[Oe,ke]}),t[125]=Oe,t[126]=Ae);let X;t[127]!==De||t[128]!==Ae?(X=(0,Y.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-3 rounded-md outline-none hover:text-fg focus-visible:ring-2 focus-visible:ring-accent`,children:[De,Ae]}),t[127]=De,t[128]=Ae,t[129]=X):X=t[129];let je;t[130]===a.runDetail.technicalEventsDescription?je=t[131]:(je=(0,Y.jsx)(`p`,{className:`mt-2 text-xs leading-relaxed text-fg-muted`,children:a.runDetail.technicalEventsDescription}),t[130]=a.runDetail.technicalEventsDescription,t[131]=je);let Me;t[132]!==i||t[133]!==a||t[134]!==c||t[135]!==l?(Me=(0,Y.jsx)(`div`,{className:`mt-4`,children:l?(0,Y.jsxs)(`div`,{className:`space-y-3`,"aria-label":a.loading,children:[(0,Y.jsx)(B,{className:`h-10 w-full`}),(0,Y.jsx)(B,{className:`h-10 w-4/5`}),(0,Y.jsx)(B,{className:`h-10 w-11/12`})]}):i.length===0?(0,Y.jsx)(`div`,{className:`text-sm text-fg-muted`,children:a.empty.events}):(0,Y.jsx)(`ol`,{className:`space-y-3`,children:i.map(e=>(0,Y.jsxs)(`li`,{className:`grid grid-cols-[0.75rem_1fr] gap-3`,children:[(0,Y.jsx)(`span`,{className:k(`mt-1 size-2 rounded-full`,Pn(e.type))}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsx)(`div`,{className:`text-sm text-fg`,children:wn(e,a)}),(0,Y.jsxs)(`div`,{className:`mt-1 text-xs text-fg-muted`,children:[qt(e.createdAtMs,a,c),` · `,e.type]}),e.data&&typeof e.data==`object`?(0,Y.jsxs)(`details`,{className:`group/event mt-2 rounded-md border border-edge/70 bg-surface-inset/35`,children:[(0,Y.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-2 px-2.5 py-2 text-xs font-medium text-fg-muted outline-none hover:text-fg`,children:[a.details.eventData,(0,Y.jsx)(fe,{className:`size-3.5 transition-transform group-open/event:rotate-180`})]}),(0,Y.jsx)(`pre`,{className:`max-h-72 overflow-auto whitespace-pre-wrap break-all border-t border-edge/70 px-2.5 py-2 text-xs leading-relaxed text-fg-muted`,children:JSON.stringify(e.data,null,2)})]}):null]})]},e.id))})}),t[132]=i,t[133]=a,t[134]=c,t[135]=l,t[136]=Me):Me=t[136];let Z;t[137]!==X||t[138]!==je||t[139]!==Me?(Z=(0,Y.jsxs)(`details`,{className:`group px-4 py-3`,children:[X,je,Me]}),t[137]=X,t[138]=je,t[139]=Me,t[140]=Z):Z=t[140];let Ne;return t[141]!==E||t[142]!==H||t[143]!==he||t[144]!==Ce||t[145]!==J||t[146]!==Z?(Ne=(0,Y.jsxs)(`aside`,{className:E,children:[H,he,Ce,J,Z]}),t[141]=E,t[142]=H,t[143]=he,t[144]=Ce,t[145]=J,t[146]=Z,t[147]=Ne):Ne=t[147],Ne}function On(e){let t=(0,Te.c)(141),{automation:n,runs:r,runsLoading:i,runsError:a,labels:o,cronLabels:s,language:l,projects:u,busyAction:d,onEdit:f,onSelectRun:m,onAction:v}=e,b=d===`automation:${n.id}:run`,x=d===`automation:${n.id}:toggle`,S=d===`automation:${n.id}:delete`,C;t[0]===n?C=t[1]:(C=sn(n),t[0]=n,t[1]=C);let w=C,T;t[2]===n.name?T=t[3]:(T=(0,Y.jsx)(`h2`,{className:`truncate text-lg font-semibold text-fg`,children:n.name}),t[2]=n.name,t[3]=T);let E=n.enabled?`bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`:`bg-surface-hover text-fg-muted`,D;t[4]===E?D=t[5]:(D=k(`shrink-0 rounded-full px-2 py-0.5 text-xs`,E),t[4]=E,t[5]=D);let O=n.enabled?o.enabled:o.paused,A;t[6]!==D||t[7]!==O?(A=(0,Y.jsx)(`span`,{className:D,children:O}),t[6]=D,t[7]=O,t[8]=A):A=t[8];let j;t[9]!==T||t[10]!==A?(j=(0,Y.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[T,A]}),t[9]=T,t[10]=A,t[11]=j):j=t[11];let M;t[12]===n?M=t[13]:(M=cn(n)?(0,Y.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:cn(n)}):null,t[12]=n,t[13]=M);let ee;t[14]===n.action.kind?ee=t[15]:(ee=(0,Y.jsx)(Qt,{kind:n.action.kind,className:`size-3.5`}),t[14]=n.action.kind,t[15]=ee);let N;t[16]!==n.action||t[17]!==o?(N=Yt(n.action,o),t[16]=n.action,t[17]=o,t[18]=N):N=t[18];let P;t[19]!==N||t[20]!==ee?(P=(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-md border border-edge-subtle bg-surface-base px-2 py-1`,children:[ee,N]}),t[19]=N,t[20]=ee,t[21]=P):P=t[21];let F;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Y.jsx)(c,{className:`size-3.5`,"aria-hidden":!0}),t[22]=F):F=t[22];let I;t[23]!==n.trigger||t[24]!==s||t[25]!==o||t[26]!==l?(I=wt(n.trigger,o,s,l),t[23]=n.trigger,t[24]=s,t[25]=o,t[26]=l,t[27]=I):I=t[27];let R;t[28]===I?R=t[29]:(R=(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-md border border-edge-subtle bg-surface-base px-2 py-1`,children:[F,I]}),t[28]=I,t[29]=R);let z;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,Y.jsx)(_,{className:`size-3.5`,"aria-hidden":!0}),t[30]=z):z=t[30];let te;t[31]!==n.projectId||t[32]!==o.info||t[33]!==u?(te=u.find(e=>e.id===n.projectId)?.name??o.info.noProject,t[31]=n.projectId,t[32]=o.info,t[33]=u,t[34]=te):te=t[34];let ne;t[35]===te?ne=t[36]:(ne=(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-md border border-edge-subtle bg-surface-base px-2 py-1`,children:[z,te]}),t[35]=te,t[36]=ne);let re;t[37]!==P||t[38]!==R||t[39]!==ne?(re=(0,Y.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-2 text-xs text-fg-muted`,children:[P,R,ne]}),t[37]=P,t[38]=R,t[39]=ne,t[40]=re):re=t[40];let H;t[41]!==re||t[42]!==j||t[43]!==M?(H=(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[j,M,re]}),t[41]=re,t[42]=j,t[43]=M,t[44]=H):H=t[44];let U;t[45]!==n||t[46]!==d||t[47]!==S||t[48]!==o.dashboard.delete||t[49]!==o.dashboard.deleted||t[50]!==o.dashboard.pause||t[51]!==o.dashboard.resume||t[52]!==o.dashboard.resumed||t[53]!==o.dashboard.runNow||t[54]!==o.details||t[55]!==o.edit||t[56]!==o.experience.deleteConfirm||t[57]!==o.feedback||t[58]!==v||t[59]!==f||t[60]!==w||t[61]!==b||t[62]!==x?(U=w?null:(0,Y.jsxs)(`div`,{className:`flex w-full flex-wrap items-center gap-2`,children:[(0,Y.jsxs)(L,{variant:`secondary`,disabled:d!==null,onClick:()=>void v(`automation:${n.id}:toggle`,()=>n.enabled?K.pause(n.id):K.resume(n.id),n.enabled?o.feedback.paused:o.dashboard.resumed),children:[x?(0,Y.jsx)(_e,{className:`size-4 animate-spin`}):n.enabled?(0,Y.jsx)(ge,{className:`size-4`}):(0,Y.jsx)(me,{className:`size-4`}),n.enabled?o.dashboard.pause:o.dashboard.resume]}),(0,Y.jsxs)(L,{variant:`primary`,disabled:d!==null,onClick:()=>void v(`automation:${n.id}:run`,()=>K.runNow(n.id),o.feedback.rerunQueued),children:[b?(0,Y.jsx)(_e,{className:`size-4 animate-spin`}):(0,Y.jsx)(me,{className:`size-4`}),o.dashboard.runNow]}),(0,Y.jsxs)(ae,{children:[(0,Y.jsx)(pe,{asChild:!0,children:(0,Y.jsx)(L,{variant:`ghost`,className:`size-9 p-0`,"aria-label":o.details.moreActions,children:(0,Y.jsx)(h,{className:`size-4`})})}),(0,Y.jsx)(ue,{children:(0,Y.jsxs)(be,{align:`end`,className:`z-70 min-w-40 rounded-lg border border-edge bg-surface-panel p-1 shadow-popover`,children:[(0,Y.jsxs)(V,{className:`flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-sm text-fg outline-none hover:bg-surface-hover`,onSelect:()=>f(n),children:[(0,Y.jsx)(y,{className:`size-4`}),o.edit]}),(0,Y.jsxs)(V,{className:`flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-sm text-red-700 outline-none hover:bg-red-500/10 dark:text-red-300`,disabled:d!==null,onSelect:()=>{window.confirm(o.experience.deleteConfirm)&&v(`automation:${n.id}:delete`,()=>K.remove(n.id),o.dashboard.deleted)},children:[S?(0,Y.jsx)(_e,{className:`size-4 animate-spin`}):(0,Y.jsx)(W,{className:`size-4`}),o.dashboard.delete]})]})})]})]}),t[45]=n,t[46]=d,t[47]=S,t[48]=o.dashboard.delete,t[49]=o.dashboard.deleted,t[50]=o.dashboard.pause,t[51]=o.dashboard.resume,t[52]=o.dashboard.resumed,t[53]=o.dashboard.runNow,t[54]=o.details,t[55]=o.edit,t[56]=o.experience.deleteConfirm,t[57]=o.feedback,t[58]=v,t[59]=f,t[60]=w,t[61]=b,t[62]=x,t[63]=U):U=t[63];let ie;t[64]!==H||t[65]!==U?(ie=(0,Y.jsxs)(`header`,{className:`flex flex-col items-start gap-3 border-b border-edge px-5 py-4`,children:[H,U]}),t[64]=H,t[65]=U,t[66]=ie):ie=t[66];let oe;t[67]===o.dashboard.latestResult?oe=t[68]:(oe=(0,Y.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:o.dashboard.latestResult}),t[67]=o.dashboard.latestResult,t[68]=oe);let se;t[69]!==o.experience.viewResult||t[70]!==m||t[71]!==r[0]?(se=r[0]?(0,Y.jsx)(L,{variant:`secondary`,onClick:()=>m(r[0].id),children:o.experience.viewResult}):null,t[69]=o.experience.viewResult,t[70]=m,t[71]=r[0],t[72]=se):se=t[72];let ce;t[73]!==oe||t[74]!==se?(ce=(0,Y.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-2`,children:[oe,se]}),t[73]=oe,t[74]=se,t[75]=ce):ce=t[75];let le;t[76]!==o||t[77]!==l||t[78]!==r[0]||t[79]!==a||t[80]!==i?(le=a?(0,Y.jsx)(`p`,{role:`alert`,className:`text-sm text-red-700 dark:text-red-300`,children:a}):i?(0,Y.jsx)(B,{className:`h-28 w-full`}):r[0]?(0,Y.jsxs)(`div`,{className:`space-y-3 rounded-lg border border-edge-subtle bg-surface-base p-4`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-fg-muted`,children:[(0,Y.jsx)(`span`,{className:k(`rounded-full px-2 py-0.5`,en(r[0].status)),children:o.status[r[0].status]}),qt(r[0].createdAtMs,o,l)]}),(0,Y.jsx)(g,{content:r[0].error||r[0].summary||(nn(r[0])?o.runDetail.resultPending:o.runDetail.noResult),compact:!0})]}):(0,Y.jsx)(`p`,{className:`text-sm text-fg-muted`,children:o.experience.noRuns}),t[76]=o,t[77]=l,t[78]=r[0],t[79]=a,t[80]=i,t[81]=le):le=t[81];let G;t[82]!==n||t[83]!==o||t[84]!==l?(G=n.enabled?`${o.next}: ${Tt(n,o,l)}`:o.paused,t[82]=n,t[83]=o,t[84]=l,t[85]=G):G=t[85];let de;t[86]===G?de=t[87]:(de=(0,Y.jsx)(`p`,{className:`mt-3 text-xs text-fg-muted`,children:G}),t[86]=G,t[87]=de);let fe;t[88]!==ce||t[89]!==le||t[90]!==de?(fe=(0,Y.jsxs)(`section`,{children:[ce,le,de]}),t[88]=ce,t[89]=le,t[90]=de,t[91]=fe):fe=t[91];let he;t[92]===o.dashboard.runHistory?he=t[93]:(he=(0,Y.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:o.dashboard.runHistory}),t[92]=o.dashboard.runHistory,t[93]=he);let ye;t[94]===o.dashboard.runHistoryDescription?ye=t[95]:(ye=(0,Y.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:o.dashboard.runHistoryDescription}),t[94]=o.dashboard.runHistoryDescription,t[95]=ye);let q;t[96]!==he||t[97]!==ye?(q=(0,Y.jsxs)(`div`,{children:[he,ye]}),t[96]=he,t[97]=ye,t[98]=q):q=t[98];let xe;t[99]===r.length?xe=t[100]:(xe=(0,Y.jsx)(`span`,{className:`rounded-full bg-surface-base px-2.5 py-1 text-xs text-fg-muted`,children:r.length}),t[99]=r.length,t[100]=xe);let Se;t[101]!==q||t[102]!==xe?(Se=(0,Y.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[q,xe]}),t[101]=q,t[102]=xe,t[103]=Se):Se=t[103];let Ce;t[104]!==o||t[105]!==l||t[106]!==m||t[107]!==r||t[108]!==i?(Ce=i?(0,Y.jsx)(B,{className:`h-24 w-full`}):r.length===0?(0,Y.jsx)(In,{className:`min-h-24 py-6`,icon:(0,Y.jsx)(ve,{className:`size-5`}),title:o.empty.runs}):(0,Y.jsx)(`div`,{className:`divide-y divide-edge-subtle overflow-hidden rounded-xl border border-edge-subtle bg-surface-base`,children:r.slice(0,8).map(e=>(0,Y.jsxs)(`button`,{type:`button`,className:`block w-full p-3 text-left hover:bg-surface-hover`,onClick:()=>m(e.id),children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-3`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[e.status===`succeeded`?(0,Y.jsx)(p,{className:`size-4 shrink-0 text-emerald-600 dark:text-emerald-300`}):(0,Y.jsx)(ve,{className:`size-4 shrink-0 text-fg-muted`}),(0,Y.jsx)(`span`,{className:`truncate text-sm font-medium text-fg`,children:qt(e.createdAtMs,o,l)})]}),(0,Y.jsx)(`span`,{className:k(`shrink-0 rounded-full px-2 py-0.5 text-xs`,en(e.status)),children:o.status[e.status]})]}),(0,Y.jsx)(`p`,{className:k(`mt-1 line-clamp-2 pl-6 text-sm text-fg-muted`,e.error&&`text-red-700 dark:text-red-300`),children:e.error||e.summary||Jt(e.actionSnapshot,o)})]},e.id))}),t[104]=o,t[105]=l,t[106]=m,t[107]=r,t[108]=i,t[109]=Ce):Ce=t[109];let we;t[110]!==Se||t[111]!==Ce?(we=(0,Y.jsxs)(`section`,{className:`min-w-0`,children:[Se,Ce]}),t[110]=Se,t[111]=Ce,t[112]=we):we=t[112];let J;t[113]===o.experience.settings?J=t[114]:(J=(0,Y.jsx)(`summary`,{className:`cursor-pointer text-sm font-medium text-fg`,children:o.experience.settings}),t[113]=o.experience.settings,t[114]=J);let Ee;t[115]!==n||t[116]!==o?(Ee=an(n,o),t[115]=n,t[116]=o,t[117]=Ee):Ee=t[117];let De;t[118]===Ee?De=t[119]:(De=(0,Y.jsx)(g,{content:Ee,compact:!0}),t[118]=Ee,t[119]=De);let Oe;t[120]!==n||t[121]!==s||t[122]!==o||t[123]!==l||t[124]!==u?(Oe=(0,Y.jsx)(An,{automation:n,labels:o,cronLabels:s,language:l,projects:u}),t[120]=n,t[121]=s,t[122]=o,t[123]=l,t[124]=u,t[125]=Oe):Oe=t[125];let ke;t[126]!==De||t[127]!==Oe?(ke=(0,Y.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[De,Oe]}),t[126]=De,t[127]=Oe,t[128]=ke):ke=t[128];let Ae;t[129]!==J||t[130]!==ke?(Ae=(0,Y.jsxs)(`details`,{className:`rounded-lg border border-edge-subtle p-4`,children:[J,ke]}),t[129]=J,t[130]=ke,t[131]=Ae):Ae=t[131];let X;t[132]!==we||t[133]!==Ae?(X=(0,Y.jsxs)(`div`,{className:`grid gap-5`,children:[we,Ae]}),t[132]=we,t[133]=Ae,t[134]=X):X=t[134];let je;t[135]!==fe||t[136]!==X?(je=(0,Y.jsxs)(`div`,{className:`grid gap-5 p-5`,children:[fe,X]}),t[135]=fe,t[136]=X,t[137]=je):je=t[137];let Me;return t[138]!==ie||t[139]!==je?(Me=(0,Y.jsxs)(`article`,{className:`min-w-0 overflow-hidden rounded-xl border border-edge-subtle bg-surface-panel shadow-surface`,children:[ie,je]}),t[138]=ie,t[139]=je,t[140]=Me):Me=t[140],Me}function kn(e,t){return e===`suggest_only`?t.safety.suggestOnlyDescription:e===`ask_before_apply`?t.safety.askBeforeApplyDescription:t.safety.autoApplyDescription}function An(e){let t=(0,Te.c)(146),{automation:n,labels:r,cronLabels:i,language:a,projects:o}=e,s,l,u,d,f,m,h,g,y,b,x;if(t[0]!==n||t[1]!==i||t[2]!==r||t[3]!==a){let e=$t(n),o;t[15]!==n||t[16]!==r||t[17]!==a?(o=Tt(n,r,a),t[15]=n,t[16]=r,t[17]=a,t[18]=o):o=t[18];let v=o,S;t[19]!==n.state.nextRunAtMs||t[20]!==a?(S=n.state.nextRunAtMs?bt(n.state.nextRunAtMs,a):void 0,t[19]=n.state.nextRunAtMs,t[20]=a,t[21]=S):S=t[21];let C=S;if(t[22]!==n.trigger.eventType||t[23]!==n.trigger.kind||t[24]!==n.trigger.schedule||t[25]!==n.trigger.secretId||t[26]!==n.trigger.source||t[27]!==r.info.anchor||t[28]!==r.info.calendarSchedule||t[29]!==r.info.eventSource||t[30]!==r.info.eventType||t[31]!==r.info.expression||t[32]!==r.info.fixedInterval||t[33]!==r.info.oneTimeSchedule||t[34]!==r.info.rawInterval||t[35]!==r.info.scheduleType||t[36]!==r.info.timezone||t[37]!==r.info.webhookSecret||t[38]!==a){if(x=[],n.trigger.kind===`schedule`){let e=n.trigger.schedule,i=e.kind===`interval`?r.info.fixedInterval:e.kind===`cron`?r.info.calendarSchedule:r.info.oneTimeSchedule,o;if(t[40]!==r.info.scheduleType||t[41]!==i?(o={label:r.info.scheduleType,value:i},t[40]=r.info.scheduleType,t[41]=i,t[42]=o):o=t[42],x.push(o),e.kind===`interval`){let n=`${e.everyMs} ms`,i;if(t[43]!==r.info.rawInterval||t[44]!==n?(i={label:r.info.rawInterval,value:n},t[43]=r.info.rawInterval,t[44]=n,t[45]=i):i=t[45],x.push(i),e.anchorMs){let n=r.info.anchor,i;t[46]!==a||t[47]!==e.anchorMs?(i=bt(e.anchorMs,a),t[46]=a,t[47]=e.anchorMs,t[48]=i):i=t[48];let o;t[49]!==r.info.anchor||t[50]!==i?(o={label:n,value:i},t[49]=r.info.anchor,t[50]=i,t[51]=o):o=t[51],x.push(o)}}else if(e.kind===`cron`){let n;if(t[52]!==r.info.expression||t[53]!==e.expr?(n={label:r.info.expression,value:e.expr},t[52]=r.info.expression,t[53]=e.expr,t[54]=n):n=t[54],x.push(n),e.tz){let n;t[55]!==r.info.timezone||t[56]!==e.tz?(n={label:r.info.timezone,value:e.tz},t[55]=r.info.timezone,t[56]=e.tz,t[57]=n):n=t[57],x.push(n)}}else{let n;t[58]!==r.info.oneTimeSchedule||t[59]!==e.at?(n={label:r.info.oneTimeSchedule,value:e.at},t[58]=r.info.oneTimeSchedule,t[59]=e.at,t[60]=n):n=t[60],x.push(n)}}else if(n.trigger.kind===`event`){let e;if(t[61]!==n.trigger.eventType||t[62]!==r.info.eventType?(e={label:r.info.eventType,value:n.trigger.eventType},t[61]=n.trigger.eventType,t[62]=r.info.eventType,t[63]=e):e=t[63],x.push(e),n.trigger.source){let e;t[64]!==n.trigger.source||t[65]!==r.info.eventSource?(e={label:r.info.eventSource,value:n.trigger.source},t[64]=n.trigger.source,t[65]=r.info.eventSource,t[66]=e):e=t[66],x.push(e)}}else if(n.trigger.kind===`webhook`&&n.trigger.secretId){let e;t[67]!==n.trigger.secretId||t[68]!==r.info.webhookSecret?(e={label:r.info.webhookSecret,value:n.trigger.secretId},t[67]=n.trigger.secretId,t[68]=r.info.webhookSecret,t[69]=e):e=t[69],x.push(e)}t[22]=n.trigger.eventType,t[23]=n.trigger.kind,t[24]=n.trigger.schedule,t[25]=n.trigger.secretId,t[26]=n.trigger.source,t[27]=r.info.anchor,t[28]=r.info.calendarSchedule,t[29]=r.info.eventSource,t[30]=r.info.eventType,t[31]=r.info.expression,t[32]=r.info.fixedInterval,t[33]=r.info.oneTimeSchedule,t[34]=r.info.rawInterval,t[35]=r.info.scheduleType,t[36]=r.info.timezone,t[37]=r.info.webhookSecret,t[38]=a,t[39]=x}else x=t[39];y=`h-fit overflow-hidden rounded-xl border border-edge-subtle bg-surface-base shadow-surface`,t[70]===r.info.overview?b=t[71]:(b=(0,Y.jsx)(`div`,{className:`border-b border-edge-subtle px-4 py-3`,children:(0,Y.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:r.info.overview})}),t[70]=r.info.overview,t[71]=b),m=`grid gap-4 p-4`;let w;t[72]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Y.jsx)(c,{className:`size-4`,"aria-hidden":!0}),t[72]=w):w=t[72];let T=r.info.schedule,E;t[73]!==n.trigger||t[74]!==i||t[75]!==r||t[76]!==a?(E=wt(n.trigger,r,i,a),t[73]=n.trigger,t[74]=i,t[75]=r,t[76]=a,t[77]=E):E=t[77];let D=n.enabled?`${r.info.nextRun}:${v}`:v;t[78]!==r.info.schedule||t[79]!==C||t[80]!==E||t[81]!==D?(h=(0,Y.jsx)(Mn,{icon:w,label:T,value:E,description:D,descriptionTitle:C}),t[78]=r.info.schedule,t[79]=C,t[80]=E,t[81]=D,t[82]=h):h=t[82];let O;t[83]===n.action.kind?O=t[84]:(O=n.action.kind===`workflow`?(0,Y.jsx)(_,{className:`size-4`,"aria-hidden":!0}):n.action.kind===`browser_automation`?(0,Y.jsx)(we,{className:`size-4`,"aria-hidden":!0}):n.action.kind===`task_command`?(0,Y.jsx)(p,{className:`size-4`,"aria-hidden":!0}):(0,Y.jsx)(H,{className:`size-4`,"aria-hidden":!0}),t[83]=n.action.kind,t[84]=O);let k=r.info.action,A;t[85]!==n.action||t[86]!==r?(A=Jt(n.action,r),t[85]=n.action,t[86]=r,t[87]=A):A=t[87],t[88]!==r.info.action||t[89]!==O||t[90]!==A?(g=(0,Y.jsx)(Mn,{icon:O,label:k,value:A}),t[88]=r.info.action,t[89]=O,t[90]=A,t[91]=g):g=t[91],s=Mn,t[92]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Y.jsx)(re,{className:`size-4`,"aria-hidden":!0}),t[92]=l):l=t[92],u=r.info.permission,d=r.safety[e],f=kn(e,r),t[0]=n,t[1]=i,t[2]=r,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=d,t[8]=f,t[9]=m,t[10]=h,t[11]=g,t[12]=y,t[13]=b,t[14]=x}else s=t[4],l=t[5],u=t[6],d=t[7],f=t[8],m=t[9],h=t[10],g=t[11],y=t[12],b=t[13],x=t[14];let S;t[93]!==s||t[94]!==l||t[95]!==u||t[96]!==d||t[97]!==f?(S=(0,Y.jsx)(s,{icon:l,label:u,value:d,description:f}),t[93]=s,t[94]=l,t[95]=u,t[96]=d,t[97]=f,t[98]=S):S=t[98];let C;t[99]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Y.jsx)(_,{className:`size-4`,"aria-hidden":!0}),t[99]=C):C=t[99];let w;t[100]!==n.projectId||t[101]!==r.info.noProject||t[102]!==o?(w=o.find(e=>e.id===n.projectId)?.name??r.info.noProject,t[100]=n.projectId,t[101]=r.info.noProject,t[102]=o,t[103]=w):w=t[103];let T;t[104]!==r.info.project||t[105]!==w?(T=(0,Y.jsx)(Mn,{icon:C,label:r.info.project,value:w}),t[104]=r.info.project,t[105]=w,t[106]=T):T=t[106];let E;t[107]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Y.jsx)(v,{className:`size-4`,"aria-hidden":!0}),t[107]=E):E=t[107];let D=n.conversationMode===`continuous`?r.info.continuousConversation:r.info.newConversation,O;t[108]!==r.info.conversation||t[109]!==D?(O=(0,Y.jsx)(Mn,{icon:E,label:r.info.conversation,value:D}),t[108]=r.info.conversation,t[109]=D,t[110]=O):O=t[110];let k;t[111]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,Y.jsx)(ie,{className:`size-4`,"aria-hidden":!0}),t[111]=k):k=t[111];let A=n.notificationPolicy===`all`?r.info.notifyAll:n.notificationPolicy===`none`?r.info.notifyNone:r.info.notifyAttention,j;t[112]!==r.info.notifications||t[113]!==A?(j=(0,Y.jsx)(Mn,{icon:k,label:r.info.notifications,value:A}),t[112]=r.info.notifications,t[113]=A,t[114]=j):j=t[114];let M;t[115]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Y.jsx)(ve,{className:`size-4`,"aria-hidden":!0}),t[115]=M):M=t[115];let ee=r.info.lastRun,N;t[116]!==n||t[117]!==r||t[118]!==a?(N=Et(n,r,a),t[116]=n,t[117]=r,t[118]=a,t[119]=N):N=t[119];let P=n.state.lastRunStatus===`failed`||n.state.lastRunStatus===`timeout`?`danger`:`default`,F;t[120]!==r.info.lastRun||t[121]!==N||t[122]!==P?(F=(0,Y.jsx)(Mn,{icon:M,label:ee,value:N,valueTone:P}),t[120]=r.info.lastRun,t[121]=N,t[122]=P,t[123]=F):F=t[123];let I;t[124]!==n.state.consecutiveFailures||t[125]!==n.state.lastError||t[126]!==r.dashboard?(I=n.state.consecutiveFailures?(0,Y.jsxs)(`div`,{className:`rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-700 dark:text-red-300`,children:[r.dashboard.failures,`:`,n.state.consecutiveFailures,n.state.lastError?(0,Y.jsx)(`p`,{className:`mt-1 break-words text-xs`,children:n.state.lastError}):null]}):n.state.lastError?(0,Y.jsx)(`p`,{className:`break-words text-sm text-red-700 dark:text-red-300`,children:n.state.lastError}):null,t[124]=n.state.consecutiveFailures,t[125]=n.state.lastError,t[126]=r.dashboard,t[127]=I):I=t[127];let L;t[128]!==r.info.technicalDetails||t[129]!==x?(L=x.length>0?(0,Y.jsxs)(`details`,{className:`group border-t border-edge-subtle pt-3`,children:[(0,Y.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-2 text-sm text-fg-muted outline-none hover:text-fg focus-visible:ring-2 focus-visible:ring-accent`,children:[(0,Y.jsx)(`span`,{children:r.info.technicalDetails}),(0,Y.jsx)(fe,{className:`size-4 transition-transform group-open:rotate-180`,"aria-hidden":!0})]}),(0,Y.jsx)(`div`,{className:`mt-3 grid gap-2`,children:x.map(jn)})]}):null,t[128]=r.info.technicalDetails,t[129]=x,t[130]=L):L=t[130];let R;t[131]!==S||t[132]!==T||t[133]!==O||t[134]!==j||t[135]!==F||t[136]!==I||t[137]!==L||t[138]!==m||t[139]!==h||t[140]!==g?(R=(0,Y.jsxs)(`div`,{className:m,children:[h,g,S,T,O,j,F,I,L]}),t[131]=S,t[132]=T,t[133]=O,t[134]=j,t[135]=F,t[136]=I,t[137]=L,t[138]=m,t[139]=h,t[140]=g,t[141]=R):R=t[141];let z;return t[142]!==R||t[143]!==y||t[144]!==b?(z=(0,Y.jsxs)(`aside`,{className:y,children:[b,R]}),t[142]=R,t[143]=y,t[144]=b,t[145]=z):z=t[145],z}function jn(e){return(0,Y.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,Y.jsx)(`span`,{className:`text-xs text-fg-subtle`,children:e.label}),(0,Y.jsx)(`span`,{className:`break-all font-mono text-xs text-fg-muted`,children:e.value})]},`${e.label}:${e.value}`)}function Mn(e){let t=(0,Te.c)(19),{icon:n,label:r,value:i,description:a,descriptionTitle:o,valueTone:s}=e,c=s===void 0?`default`:s,l;t[0]===n?l=t[1]:(l=(0,Y.jsx)(`span`,{className:`mt-0.5 text-fg-subtle`,children:n}),t[0]=n,t[1]=l);let u;t[2]===r?u=t[3]:(u=(0,Y.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:r}),t[2]=r,t[3]=u);let d=c===`danger`?`text-red-700 dark:text-red-300`:`text-fg`,f;t[4]===d?f=t[5]:(f=k(`mt-1 text-sm font-medium leading-5`,d),t[4]=d,t[5]=f);let p;t[6]!==f||t[7]!==i?(p=(0,Y.jsx)(`div`,{className:f,children:i}),t[6]=f,t[7]=i,t[8]=p):p=t[8];let m;t[9]!==a||t[10]!==o?(m=a?(0,Y.jsx)(`div`,{className:`mt-1 text-xs leading-5 text-fg-subtle`,title:o,children:a}):null,t[9]=a,t[10]=o,t[11]=m):m=t[11];let h;t[12]!==u||t[13]!==p||t[14]!==m?(h=(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[u,p,m]}),t[12]=u,t[13]=p,t[14]=m,t[15]=h):h=t[15];let g;return t[16]!==l||t[17]!==h?(g=(0,Y.jsxs)(`div`,{className:`grid grid-cols-[1.25rem_1fr] gap-2.5`,children:[l,h]}),t[16]=l,t[17]=h,t[18]=g):g=t[18],g}function Nn(e){let t=(0,Te.c)(7),{label:n,value:r}=e,i;t[0]===n?i=t[1]:(i=(0,Y.jsx)(`span`,{children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,Y.jsx)(`span`,{className:`min-w-0 truncate text-fg`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Y.jsxs)(`div`,{className:`grid grid-cols-[5rem_1fr] gap-2`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Pn(e){return e.endsWith(`.failed`)?`bg-red-500`:e.endsWith(`.completed`)?`bg-emerald-500`:e.endsWith(`.started`)?`bg-blue-500`:`bg-fg-muted`}function Fn(e){let t=(0,Te.c)(7),{label:n,value:r}=e,i;t[0]===n?i=t[1]:(i=(0,Y.jsx)(`div`,{className:`text-xs font-medium uppercase text-fg-muted`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,Y.jsx)(`div`,{className:`mt-1 truncate text-sm text-fg`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function In(e){let t=(0,Te.c)(8),{className:n,icon:r,title:i}=e,a;t[0]===n?a=t[1]:(a=k(`flex min-h-48 flex-col items-center justify-center text-fg-muted`,n),t[0]=n,t[1]=a);let o;t[2]===i?o=t[3]:(o=(0,Y.jsx)(`div`,{className:`mt-2 text-sm`,children:i}),t[2]=i,t[3]=o);let s;return t[4]!==r||t[5]!==a||t[6]!==o?(s=(0,Y.jsxs)(`div`,{className:a,children:[r,o]}),t[4]=r,t[5]=a,t[6]=o,t[7]=s):s=t[7],s}function Ln(e){let t=(0,Te.c)(337),{form:n,labels:r,setForm:i,projects:a,workflowDefinitions:o,selectedWorkflow:s,workflowsLoading:c,browserAutomations:l,selectedBrowserAutomation:f,browserAutomationsLoading:p,agentOptions:m,agentsLoading:h,defaultAgentId:g,taskOptions:_,tasksLoading:v,language:y,projectLocked:b}=e,x=b===void 0?!1:b,C=O(y).agentsSettings,w;t[0]===i?w=t[1]:(w=e=>i(t=>({...t,...e})),t[0]=i,t[1]=w);let T=w,D=gt(n.intervalValue,n.intervalUnit),A=Date.now(),j;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(j=[1,2,3],t[2]=j):j=t[2];let M;t[3]!==D||t[4]!==A||t[5]!==y?(M=j.map(e=>St(A+D*e,y,A)),t[3]=D,t[4]=A,t[5]=y,t[6]=M):M=t[6];let ee=M,N;if(t[7]!==n.projectId||t[8]!==n.taskId||t[9]!==_){let e;t[11]!==n.projectId||t[12]!==n.taskId?(e=e=>e.id===n.taskId||e.phase!==`closed`&&(!n.projectId||e.projectId===n.projectId),t[11]=n.projectId,t[12]=n.taskId,t[13]=e):e=t[13],N=_.filter(e),t[7]=n.projectId,t[8]=n.taskId,t[9]=_,t[10]=N}else N=t[10];let P=N,F,I;t[14]!==g||t[15]!==n.actionMode||t[16]!==n.agentId||t[17]!==i?(F=()=>{n.actionMode!==`task_command`||n.agentId.trim()||!g||i(e=>({...e,agentId:g}))},I=[g,n.actionMode,n.agentId,i],t[14]=g,t[15]=n.actionMode,t[16]=n.agentId,t[17]=i,t[18]=F,t[19]=I):(F=t[18],I=t[19]),(0,J.useEffect)(F,I);let L,R;t[20]!==n.actionMode||t[21]!==n.workflowId||t[22]!==i||t[23]!==o?(L=()=>{if(n.actionMode!==`workflow`||n.workflowId.trim())return;let e=o[0]?.id;e&&i(t=>({...t,workflowId:e,workflowGoal:``,workflowInput:{goal:``,argValues:{},schemaInput:{},concurrency:``,maxSubagents:``},workflowInputValid:!0}))},R=[n.actionMode,n.workflowId,i,o],t[20]=n.actionMode,t[21]=n.workflowId,t[22]=i,t[23]=o,t[24]=L,t[25]=R):(L=t[24],R=t[25]),(0,J.useEffect)(L,R);let z,B;t[26]!==l||t[27]!==n.actionMode||t[28]!==n.browserAutomationId||t[29]!==i?(z=()=>{if(n.actionMode!==`browser_automation`||n.browserAutomationId.trim())return;let e=l[0];e&&i(t=>({...t,browserAutomationId:e.id,browserAutomationInputs:Se(e)}))},B=[l,n.actionMode,n.browserAutomationId,i],t[26]=l,t[27]=n.actionMode,t[28]=n.browserAutomationId,t[29]=i,t[30]=z,t[31]=B):(z=t[30],B=t[31]),(0,J.useEffect)(z,B);let te;t[32]===T?te=t[33]:(te=e=>T({name:e.target.value}),t[32]=T,t[33]=te);let ne;t[34]!==n.name||t[35]!==te?(ne=(0,Y.jsx)(`input`,{className:Vn,value:n.name,onChange:te}),t[34]=n.name,t[35]=te,t[36]=ne):ne=t[36];let re;t[37]!==r.form.name||t[38]!==ne?(re=(0,Y.jsx)(Hn,{label:r.form.name,children:ne}),t[37]=r.form.name,t[38]=ne,t[39]=re):re=t[39];let V;t[40]===T?V=t[41]:(V=e=>T({description:e.target.value}),t[40]=T,t[41]=V);let H;t[42]!==n.description||t[43]!==V?(H=(0,Y.jsx)(`input`,{className:Vn,value:n.description,onChange:V}),t[42]=n.description,t[43]=V,t[44]=H):H=t[44];let U;t[45]!==r.form.description||t[46]!==H?(U=(0,Y.jsx)(Hn,{label:r.form.description,children:H}),t[45]=r.form.description,t[46]=H,t[47]=U):U=t[47];let ie;t[48]!==n.projectId||t[49]!==r.form.noProject||t[50]!==r.form.project||t[51]!==x||t[52]!==a||t[53]!==T?(ie=x?null:(0,Y.jsx)(Hn,{label:r.form.project,children:(0,Y.jsxs)(u,{className:Vn,value:n.projectId,onChange:e=>T({projectId:e.target.value}),children:[(0,Y.jsx)(d,{value:``,children:r.form.noProject}),a.map(Bn)]})}),t[48]=n.projectId,t[49]=r.form.noProject,t[50]=r.form.project,t[51]=x,t[52]=a,t[53]=T,t[54]=ie):ie=t[54];let ae=r.form.rulePreview,oe;t[55]===r.form.rulePreview?oe=t[56]:(oe=(0,Y.jsx)(`div`,{className:`text-xs font-medium text-accent-fg`,children:r.form.rulePreview}),t[55]=r.form.rulePreview,t[56]=oe);let ce;t[57]!==n.triggerMode||t[58]!==r?(ce=Zt(n.triggerMode,r),t[57]=n.triggerMode,t[58]=r,t[59]=ce):ce=t[59];let W;t[60]===ce?W=t[61]:(W=(0,Y.jsx)(`span`,{children:ce}),t[60]=ce,t[61]=W);let ue;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,Y.jsx)(G,{className:`size-4 text-fg-subtle`,"aria-hidden":!0}),t[62]=ue):ue=t[62];let de;t[63]!==n.actionMode||t[64]!==r?(de=Xt(n.actionMode,r),t[63]=n.actionMode,t[64]=r,t[65]=de):de=t[65];let pe;t[66]===de?pe=t[67]:(pe=(0,Y.jsx)(`span`,{children:de}),t[66]=de,t[67]=pe);let me;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,Y.jsx)(G,{className:`size-4 text-fg-subtle`,"aria-hidden":!0}),t[68]=me):me=t[68];let he;t[69]!==n.projectId||t[70]!==r.form.noProject||t[71]!==r.form.project||t[72]!==a?(he=n.projectId?a.find(e=>e.id===n.projectId)?.name??r.form.project:r.form.noProject,t[69]=n.projectId,t[70]=r.form.noProject,t[71]=r.form.project,t[72]=a,t[73]=he):he=t[73];let ge;t[74]===he?ge=t[75]:(ge=(0,Y.jsx)(`span`,{children:he}),t[74]=he,t[75]=ge);let K;t[76]!==W||t[77]!==pe||t[78]!==ge?(K=(0,Y.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center gap-2 text-sm text-fg`,children:[W,ue,pe,me,ge]}),t[76]=W,t[77]=pe,t[78]=ge,t[79]=K):K=t[79];let _e;t[80]!==r.form.rulePreview||t[81]!==oe||t[82]!==K?(_e=(0,Y.jsxs)(`div`,{className:`rounded-xl border border-accent/20 bg-accent/5 px-4 py-3`,"aria-label":ae,children:[oe,K]}),t[80]=r.form.rulePreview,t[81]=oe,t[82]=K,t[83]=_e):_e=t[83];let ve;t[84]!==r.form.trigger||t[85]!==r.form.triggerStepDescription?(ve=(0,Y.jsx)(Un,{step:`1`,title:r.form.trigger,description:r.form.triggerStepDescription}),t[84]=r.form.trigger,t[85]=r.form.triggerStepDescription,t[86]=ve):ve=t[86];let ye;t[87]===T?ye=t[88]:(ye=e=>T({triggerMode:e.target.value}),t[87]=T,t[88]=ye);let be;t[89]===r.trigger.manual?be=t[90]:(be=(0,Y.jsx)(d,{value:`manual`,children:r.trigger.manual}),t[89]=r.trigger.manual,t[90]=be);let q;t[91]===r.trigger.once?q=t[92]:(q=(0,Y.jsx)(d,{value:`once`,children:r.trigger.once}),t[91]=r.trigger.once,t[92]=q);let xe;t[93]===r.trigger.daily?xe=t[94]:(xe=(0,Y.jsx)(d,{value:`daily`,children:r.trigger.daily}),t[93]=r.trigger.daily,t[94]=xe);let we;t[95]===r.trigger.weekly?we=t[96]:(we=(0,Y.jsx)(d,{value:`weekly`,children:r.trigger.weekly}),t[95]=r.trigger.weekly,t[96]=we);let Ee;t[97]===r.trigger.interval?Ee=t[98]:(Ee=(0,Y.jsx)(d,{value:`interval`,children:r.trigger.interval}),t[97]=r.trigger.interval,t[98]=Ee);let De;t[99]===r.trigger.customCron?De=t[100]:(De=(0,Y.jsx)(d,{value:`cron`,children:r.trigger.customCron}),t[99]=r.trigger.customCron,t[100]=De);let Oe;t[101]===r.trigger.webhook?Oe=t[102]:(Oe=(0,Y.jsx)(d,{value:`webhook`,children:r.trigger.webhook}),t[101]=r.trigger.webhook,t[102]=Oe);let ke;t[103]===r.trigger.taskBlocked?ke=t[104]:(ke=(0,Y.jsx)(d,{value:`taskBlocked`,children:r.trigger.taskBlocked}),t[103]=r.trigger.taskBlocked,t[104]=ke);let X;t[105]===r.trigger.noteCreated?X=t[106]:(X=(0,Y.jsx)(d,{value:`noteCreated`,children:r.trigger.noteCreated}),t[105]=r.trigger.noteCreated,t[106]=X);let je;t[107]===r.trigger.workflowFailed?je=t[108]:(je=(0,Y.jsx)(d,{value:`workflowFailed`,children:r.trigger.workflowFailed}),t[107]=r.trigger.workflowFailed,t[108]=je);let Me;t[109]===r.trigger.sessionUpdated?Me=t[110]:(Me=(0,Y.jsx)(d,{value:`sessionUpdated`,children:r.trigger.sessionUpdated}),t[109]=r.trigger.sessionUpdated,t[110]=Me);let Z;t[111]===r.trigger.customEvent?Z=t[112]:(Z=(0,Y.jsx)(d,{value:`event`,children:r.trigger.customEvent}),t[111]=r.trigger.customEvent,t[112]=Z);let Ne;t[113]!==n.triggerMode||t[114]!==ye||t[115]!==be||t[116]!==q||t[117]!==xe||t[118]!==we||t[119]!==Ee||t[120]!==De||t[121]!==Oe||t[122]!==ke||t[123]!==X||t[124]!==je||t[125]!==Me||t[126]!==Z?(Ne=(0,Y.jsxs)(u,{className:Vn,value:n.triggerMode,onChange:ye,children:[be,q,xe,we,Ee,De,Oe,ke,X,je,Me,Z]}),t[113]=n.triggerMode,t[114]=ye,t[115]=be,t[116]=q,t[117]=xe,t[118]=we,t[119]=Ee,t[120]=De,t[121]=Oe,t[122]=ke,t[123]=X,t[124]=je,t[125]=Me,t[126]=Z,t[127]=Ne):Ne=t[127];let Pe;t[128]!==n.onceAt||t[129]!==n.triggerMode||t[130]!==r.form.onceAt||t[131]!==T?(Pe=n.triggerMode===`once`?(0,Y.jsx)(Hn,{label:r.form.onceAt,children:(0,Y.jsx)(`input`,{className:Vn,type:`datetime-local`,value:n.onceAt,onChange:e=>T({onceAt:e.target.value})})}):null,t[128]=n.onceAt,t[129]=n.triggerMode,t[130]=r.form.onceAt,t[131]=T,t[132]=Pe):Pe=t[132];let Fe;t[133]!==n.time||t[134]!==n.triggerMode||t[135]!==n.weekday||t[136]!==r.form.day||t[137]!==r.form.time||t[138]!==r.weekdays||t[139]!==T?(Fe=n.triggerMode===`daily`||n.triggerMode===`weekly`?(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Hn,{label:r.form.time,children:(0,Y.jsx)(Ae,{value:n.time,onChange:e=>T({time:e}),ariaLabel:r.form.time})}),n.triggerMode===`weekly`?(0,Y.jsx)(Hn,{label:r.form.day,children:(0,Y.jsxs)(u,{className:Vn,value:n.weekday,onChange:e=>T({weekday:e.target.value}),children:[(0,Y.jsx)(d,{value:`1`,children:r.weekdays.monday}),(0,Y.jsx)(d,{value:`2`,children:r.weekdays.tuesday}),(0,Y.jsx)(d,{value:`3`,children:r.weekdays.wednesday}),(0,Y.jsx)(d,{value:`4`,children:r.weekdays.thursday}),(0,Y.jsx)(d,{value:`5`,children:r.weekdays.friday}),(0,Y.jsx)(d,{value:`6`,children:r.weekdays.saturday}),(0,Y.jsx)(d,{value:`0`,children:r.weekdays.sunday})]})}):null]}):null,t[133]=n.time,t[134]=n.triggerMode,t[135]=n.weekday,t[136]=r.form.day,t[137]=r.form.time,t[138]=r.weekdays,t[139]=T,t[140]=Fe):Fe=t[140];let Ie=n.triggerMode===`interval`?(0,Y.jsxs)(`div`,{className:`grid gap-3 rounded-lg border border-edge-subtle bg-surface-base p-3`,children:[(0,Y.jsx)(Hn,{label:r.form.intervalEvery,children:(0,Y.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-[minmax(0,1fr)_10rem]`,children:[(0,Y.jsx)(`input`,{className:Vn,type:`number`,min:6e4/gt(1,n.intervalUnit),step:`any`,inputMode:`decimal`,value:n.intervalValue,onChange:e=>T({intervalValue:e.target.value})}),(0,Y.jsxs)(u,{className:Vn,value:n.intervalUnit,onChange:e=>{let t=e.target.value;T({intervalValue:_t(n.intervalValue,n.intervalUnit,t),intervalUnit:t})},children:[(0,Y.jsx)(d,{value:`minute`,children:r.form.intervalUnits.minute}),(0,Y.jsx)(d,{value:`hour`,children:r.form.intervalUnits.hour}),(0,Y.jsx)(d,{value:`day`,children:r.form.intervalUnits.day}),(0,Y.jsx)(d,{value:`week`,children:r.form.intervalUnits.week})]})]})}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:r.form.commonIntervals}),(0,Y.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:Ot.map(e=>{let t=gt(e.value,e.unit),n=t===D;return(0,Y.jsx)(`button`,{type:`button`,"aria-pressed":n,className:k(`rounded-full border px-2.5 py-1 text-xs transition-colors`,n?`border-accent bg-accent/10 text-accent`:`border-edge-subtle text-fg-muted hover:border-edge hover:bg-surface-hover hover:text-fg`),onClick:()=>T({intervalValue:e.value,intervalUnit:e.unit}),children:vt(t,y)},`${e.value}:${e.unit}`)})})]}),(0,Y.jsxs)(`div`,{className:`rounded-lg bg-surface-panel px-3 py-2.5`,children:[(0,Y.jsx)(`div`,{className:`text-sm font-medium text-fg`,children:yt(D,y)}),(0,Y.jsxs)(`div`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:[r.form.nextThreeRuns,`:`,ee.join(y===`zh`?`、`:`, `)]}),(0,Y.jsx)(`div`,{className:`mt-1 text-xs leading-5 text-fg-subtle`,children:r.form.fixedIntervalHint})]})]}):null,Le;t[141]!==n.cronExpr||t[142]!==n.triggerMode||t[143]!==r.form.expression||t[144]!==T?(Le=n.triggerMode===`cron`?(0,Y.jsx)(Hn,{label:r.form.expression,children:(0,Y.jsx)(`input`,{className:Vn,value:n.cronExpr,onChange:e=>T({cronExpr:e.target.value})})}):null,t[141]=n.cronExpr,t[142]=n.triggerMode,t[143]=r.form.expression,t[144]=T,t[145]=Le):Le=t[145];let Re;t[146]!==n.triggerMode||t[147]!==n.webhookSecretId||t[148]!==r.form.secretId||t[149]!==T?(Re=n.triggerMode===`webhook`?(0,Y.jsx)(Hn,{label:r.form.secretId,children:(0,Y.jsx)(`input`,{className:Vn,value:n.webhookSecretId,onChange:e=>T({webhookSecretId:e.target.value})})}):null,t[146]=n.triggerMode,t[147]=n.webhookSecretId,t[148]=r.form.secretId,t[149]=T,t[150]=Re):Re=t[150];let ze;t[151]!==n.eventPayloadMatch||t[152]!==n.eventSource||t[153]!==n.eventType||t[154]!==n.triggerMode||t[155]!==r.form.eventPayloadMatch||t[156]!==r.form.eventSource||t[157]!==r.form.eventType||t[158]!==r.form.invalidJsonObject||t[159]!==T?(ze=n.triggerMode===`event`?(0,Y.jsxs)(`div`,{className:`grid gap-3 rounded-lg border border-edge-subtle bg-surface-base p-3`,children:[(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,Y.jsx)(Hn,{label:r.form.eventType,children:(0,Y.jsx)(`input`,{className:Vn,value:n.eventType,onChange:e=>T({eventType:e.target.value})})}),(0,Y.jsx)(Hn,{label:r.form.eventSource,children:(0,Y.jsx)(`input`,{className:Vn,value:n.eventSource,onChange:e=>T({eventSource:e.target.value})})})]}),(0,Y.jsxs)(Hn,{label:r.form.eventPayloadMatch,children:[(0,Y.jsx)(`textarea`,{className:k(Vn,`min-h-24 resize-y font-mono text-xs`),value:n.eventPayloadMatch,onChange:e=>T({eventPayloadMatch:e.target.value}),placeholder:`{
|
|
6
|
-
"status": "blocked"
|
|
7
|
-
}`}),Ft(n.eventPayloadMatch)?null:(0,Y.jsx)(`span`,{className:`text-xs text-red-700 dark:text-red-300`,children:r.form.invalidJsonObject})]})]}):null,t[151]=n.eventPayloadMatch,t[152]=n.eventSource,t[153]=n.eventType,t[154]=n.triggerMode,t[155]=r.form.eventPayloadMatch,t[156]=r.form.eventSource,t[157]=r.form.eventType,t[158]=r.form.invalidJsonObject,t[159]=T,t[160]=ze):ze=t[160];let Be;t[161]!==r.form.action||t[162]!==r.form.actionStepDescription?(Be=(0,Y.jsx)(Un,{step:`2`,title:r.form.action,description:r.form.actionStepDescription}),t[161]=r.form.action,t[162]=r.form.actionStepDescription,t[163]=Be):Be=t[163];let Ve;t[164]!==n.timeoutSeconds||t[165]!==n.workflowId||t[166]!==T||t[167]!==o?(Ve=e=>{let t=e.target.value,r=Number.parseInt(n.timeoutSeconds,10);T({actionMode:t,...r===600||r===1800?{timeoutSeconds:t===`browser_automation`?`600`:`1800`}:{},...t===`browser_automation`||t===`task_command`?{safetyMode:`auto_apply`}:{},...t===`workflow`&&!n.workflowId.trim()&&o[0]?{workflowId:o[0].id,workflowGoal:``,workflowInput:{goal:``,argValues:{},schemaInput:{},concurrency:``,maxSubagents:``},workflowInputValid:!0}:{}})},t[164]=n.timeoutSeconds,t[165]=n.workflowId,t[166]=T,t[167]=o,t[168]=Ve):Ve=t[168];let He;t[169]===r.action.runAgent?He=t[170]:(He=(0,Y.jsx)(d,{value:`agent`,children:r.action.runAgent}),t[169]=r.action.runAgent,t[170]=He);let Ue;t[171]===r.action.runWorkflow?Ue=t[172]:(Ue=(0,Y.jsx)(d,{value:`workflow`,children:r.action.runWorkflow}),t[171]=r.action.runWorkflow,t[172]=Ue);let We;t[173]===r.action.runTask?We=t[174]:(We=(0,Y.jsx)(d,{value:`task_command`,children:r.action.runTask}),t[173]=r.action.runTask,t[174]=We);let Ge=y===`zh`?`浏览器自动化`:`Browser automation`,Ke;t[175]===Ge?Ke=t[176]:(Ke=(0,Y.jsx)(d,{value:`browser_automation`,children:Ge}),t[175]=Ge,t[176]=Ke);let qe;t[177]!==n.actionMode||t[178]!==Ve||t[179]!==He||t[180]!==Ue||t[181]!==We||t[182]!==Ke?(qe=(0,Y.jsxs)(u,{className:Vn,value:n.actionMode,onChange:Ve,children:[He,Ue,We,Ke]}),t[177]=n.actionMode,t[178]=Ve,t[179]=He,t[180]=Ue,t[181]=We,t[182]=Ke,t[183]=qe):qe=t[183];let Je=n.actionMode===`browser_automation`?null:(0,Y.jsx)(Hn,{label:r.form.agent,children:(0,Y.jsxs)(u,{className:Vn,value:n.agentId,onChange:e=>T({agentId:e.target.value}),children:[(0,Y.jsx)(d,{value:``,children:h?r.form.loadingAgents:r.form.defaultAgent}),m.map(e=>(0,Y.jsx)(d,{value:e.id,children:le(e,C)},e.id))]})}),Ye;t[184]!==P||t[185]!==l||t[186]!==p||t[187]!==n.actionMode||t[188]!==n.agentId||t[189]!==n.browserAutomationId||t[190]!==n.browserAutomationInputs||t[191]!==n.description||t[192]!==n.instruction||t[193]!==n.model||t[194]!==n.name||t[195]!==n.taskId||t[196]!==n.triggerMode||t[197]!==n.workflowId||t[198]!==n.workflowInput||t[199]!==r.form.defaultModel||t[200]!==r.form.instruction||t[201]!==r.form.loadingTasks||t[202]!==r.form.loadingWorkflows||t[203]!==r.form.model||t[204]!==r.form.modelHint||t[205]!==r.form.noModels||t[206]!==r.form.noTasks||t[207]!==r.form.noWorkflows||t[208]!==r.form.searchModels||t[209]!==r.form.task||t[210]!==r.form.taskClosed||t[211]!==r.form.taskContextHint||t[212]!==r.form.triggeredRun||t[213]!==r.form.workflow||t[214]!==y||t[215]!==f||t[216]!==s||t[217]!==v||t[218]!==T||t[219]!==o||t[220]!==c?(Ye=n.actionMode===`agent`?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(Hn,{label:r.form.model,children:[(0,Y.jsx)(se,{value:n.model,onChange:e=>T({model:e}),placeholder:r.form.defaultModel,emptyLabel:r.form.defaultModel,searchPlaceholder:r.form.searchModels,noMatches:r.form.noModels,allowEmpty:!0,showProviderSettingsFooter:!0,contentAlign:`start`,className:`w-full`,ariaLabel:r.form.model}),(0,Y.jsx)(`span`,{className:`text-xs text-fg-subtle`,children:r.form.modelHint})]}),(0,Y.jsxs)(Hn,{label:r.form.instruction,children:[(0,Y.jsx)(`div`,{className:`flex justify-end`,children:(0,Y.jsx)(S,{value:n.instruction,onApply:e=>T({instruction:e}),fieldId:`automation.instruction`,fieldLabel:r.form.instruction,scenario:`automation.instruction`,locale:y,context:{automationName:n.name,automationDescription:n.description,triggerMode:n.triggerMode,agentId:n.agentId,model:n.model},showLabel:!1})}),(0,Y.jsx)(`textarea`,{className:k(Vn,`min-h-32 resize-y`),value:n.instruction,onChange:e=>T({instruction:e.target.value})})]})]}):n.actionMode===`workflow`?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Hn,{label:r.form.workflow,children:(0,Y.jsxs)(u,{className:Vn,value:n.workflowId,onChange:e=>T({workflowId:e.target.value,workflowGoal:``,workflowInput:{goal:``,argValues:{},schemaInput:{},concurrency:``,maxSubagents:``},workflowInputValid:!0}),disabled:c||o.length===0,children:[c?(0,Y.jsx)(d,{value:``,children:r.form.loadingWorkflows}):null,!c&&o.length===0?(0,Y.jsx)(d,{value:``,children:r.form.noWorkflows}):null,o.map(zn)]})}),s?(0,Y.jsx)(E,{definition:s,language:y,value:n.workflowInput,onChange:e=>T({workflowInput:e,workflowGoal:e.goal,workflowInputValid:!0}),mode:`automation`,badgeLabel:r.form.triggeredRun,onValidityChange:e=>T({workflowInputValid:e.valid}),aiAssist:{inputScenario:`automation.workflowInput`,goalScenario:`automation.workflowGoal`,context:{automationName:n.name,automationDescription:n.description,triggerMode:n.triggerMode,workflowId:s.id,workflowTitle:s.title,workflowDescription:s.description}},inputClassName:`rounded-lg`}):null]}):n.actionMode===`task_command`?(0,Y.jsx)(Y.Fragment,{children:(0,Y.jsxs)(Hn,{label:r.form.task,children:[(0,Y.jsxs)(u,{className:Vn,value:n.taskId,onChange:e=>T({taskId:e.target.value}),disabled:v||P.length===0,children:[v?(0,Y.jsx)(d,{value:``,children:r.form.loadingTasks}):null,!v&&P.length===0?(0,Y.jsx)(d,{value:``,children:r.form.noTasks}):null,P.map(e=>(0,Y.jsxs)(d,{value:e.id,disabled:e.phase===`closed`,children:[e.title,e.phase===`closed`?` · ${r.form.taskClosed}`:``]},e.id))]}),(0,Y.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:r.form.taskContextHint})]})}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Hn,{label:y===`zh`?`浏览器自动化`:`Browser automation`,children:(0,Y.jsxs)(u,{className:Vn,value:n.browserAutomationId,onChange:e=>{let t=l.find(t=>t.id===e.target.value);T({browserAutomationId:e.target.value,browserAutomationInputs:t?Se(t):{}})},disabled:p||l.length===0,children:[l.length===0?(0,Y.jsx)(d,{value:``,children:y===`zh`?`没有已启用的浏览器自动化`:`No enabled browser automations`}):null,l.map(Rn)]})}),f&&Object.keys(f.inputs).length>0?(0,Y.jsx)(Hn,{label:y===`zh`?`运行时填写`:`Run inputs`,children:(0,Y.jsx)(Ce,{automation:f,values:n.browserAutomationInputs,language:y,onChange:e=>T({browserAutomationInputs:e})})}):null]}),t[184]=P,t[185]=l,t[186]=p,t[187]=n.actionMode,t[188]=n.agentId,t[189]=n.browserAutomationId,t[190]=n.browserAutomationInputs,t[191]=n.description,t[192]=n.instruction,t[193]=n.model,t[194]=n.name,t[195]=n.taskId,t[196]=n.triggerMode,t[197]=n.workflowId,t[198]=n.workflowInput,t[199]=r.form.defaultModel,t[200]=r.form.instruction,t[201]=r.form.loadingTasks,t[202]=r.form.loadingWorkflows,t[203]=r.form.model,t[204]=r.form.modelHint,t[205]=r.form.noModels,t[206]=r.form.noTasks,t[207]=r.form.noWorkflows,t[208]=r.form.searchModels,t[209]=r.form.task,t[210]=r.form.taskClosed,t[211]=r.form.taskContextHint,t[212]=r.form.triggeredRun,t[213]=r.form.workflow,t[214]=y,t[215]=f,t[216]=s,t[217]=v,t[218]=T,t[219]=o,t[220]=c,t[221]=Ye):Ye=t[221];let Xe;t[222]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,Y.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-full bg-surface-hover text-xs text-fg-muted`,children:`3`}),t[222]=Xe):Xe=t[222];let Ze;t[223]===r.form.advancedDescription?Ze=t[224]:(Ze=(0,Y.jsx)(`span`,{className:`ml-2 text-xs font-normal text-fg-muted`,children:r.form.advancedDescription}),t[223]=r.form.advancedDescription,t[224]=Ze);let Qe;t[225]!==r.form.advanced||t[226]!==Ze?(Qe=(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[Xe,(0,Y.jsxs)(`span`,{children:[r.form.advanced,Ze]})]}),t[225]=r.form.advanced,t[226]=Ze,t[227]=Qe):Qe=t[227];let $e;t[228]===Symbol.for(`react.memo_cache_sentinel`)?($e=(0,Y.jsx)(fe,{className:`size-4 transition-transform group-open:rotate-180`}),t[228]=$e):$e=t[228];let Q;t[229]===Qe?Q=t[230]:(Q=(0,Y.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center justify-between gap-3 px-4 py-3 text-sm font-semibold text-fg outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[Qe,$e]}),t[229]=Qe,t[230]=Q);let et;t[231]!==n.actionMode||t[232]!==n.safetyMode||t[233]!==r.form.safety||t[234]!==r.safety||t[235]!==T?(et=n.actionMode!==`browser_automation`&&n.actionMode!==`task_command`?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Un,{title:r.form.safety}),(0,Y.jsxs)(Hn,{label:r.form.safety,children:[(0,Y.jsxs)(u,{className:Vn,value:n.safetyMode,onChange:e=>{let t=e.target.value;T({safetyMode:t})},children:[(0,Y.jsx)(d,{value:`suggest_only`,children:r.safety.suggest_only}),(0,Y.jsx)(d,{value:`ask_before_apply`,children:r.safety.ask_before_apply}),(0,Y.jsx)(d,{value:`auto_apply`,children:r.safety.auto_apply})]}),(0,Y.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:n.safetyMode===`suggest_only`?r.safety.suggestOnlyDescription:n.safetyMode===`ask_before_apply`?r.safety.askBeforeApplyDescription:r.safety.autoApplyDescription})]})]}):null,t[231]=n.actionMode,t[232]=n.safetyMode,t[233]=r.form.safety,t[234]=r.safety,t[235]=T,t[236]=et):et=t[236];let tt;t[237]===r.form.results?tt=t[238]:(tt=(0,Y.jsx)(Un,{title:r.form.results}),t[237]=r.form.results,t[238]=tt);let nt;t[239]===T?nt=t[240]:(nt=e=>T({conversationMode:e.target.value}),t[239]=T,t[240]=nt);let rt;t[241]===r.form.newConversation?rt=t[242]:(rt=(0,Y.jsx)(d,{value:`new_session`,children:r.form.newConversation}),t[241]=r.form.newConversation,t[242]=rt);let it;t[243]===r.form.continuousConversation?it=t[244]:(it=(0,Y.jsx)(d,{value:`continuous`,children:r.form.continuousConversation}),t[243]=r.form.continuousConversation,t[244]=it);let at;t[245]!==n.conversationMode||t[246]!==nt||t[247]!==rt||t[248]!==it?(at=(0,Y.jsxs)(u,{className:Vn,value:n.conversationMode,onChange:nt,children:[rt,it]}),t[245]=n.conversationMode,t[246]=nt,t[247]=rt,t[248]=it,t[249]=at):at=t[249];let ot;t[250]!==r.form.conversation||t[251]!==at?(ot=(0,Y.jsx)(Hn,{label:r.form.conversation,children:at}),t[250]=r.form.conversation,t[251]=at,t[252]=ot):ot=t[252];let st;t[253]===T?st=t[254]:(st=e=>T({notificationPolicy:e.target.value}),t[253]=T,t[254]=st);let ct;t[255]===r.form.notifyAttention?ct=t[256]:(ct=(0,Y.jsx)(d,{value:`attention`,children:r.form.notifyAttention}),t[255]=r.form.notifyAttention,t[256]=ct);let lt;t[257]===r.form.notifyAll?lt=t[258]:(lt=(0,Y.jsx)(d,{value:`all`,children:r.form.notifyAll}),t[257]=r.form.notifyAll,t[258]=lt);let ut;t[259]===r.form.notifyNone?ut=t[260]:(ut=(0,Y.jsx)(d,{value:`none`,children:r.form.notifyNone}),t[259]=r.form.notifyNone,t[260]=ut);let dt;t[261]!==n.notificationPolicy||t[262]!==st||t[263]!==ct||t[264]!==lt||t[265]!==ut?(dt=(0,Y.jsxs)(u,{className:Vn,value:n.notificationPolicy,onChange:st,children:[ct,lt,ut]}),t[261]=n.notificationPolicy,t[262]=st,t[263]=ct,t[264]=lt,t[265]=ut,t[266]=dt):dt=t[266];let ft;t[267]!==r.form.notifications||t[268]!==dt?(ft=(0,Y.jsx)(Hn,{label:r.form.notifications,children:dt}),t[267]=r.form.notifications,t[268]=dt,t[269]=ft):ft=t[269];let $;t[270]!==n.completionWebhookUrl||t[271]!==n.safetyMode||t[272]!==r.form.completionWebhook||t[273]!==T?($=n.safetyMode===`auto_apply`?(0,Y.jsx)(Hn,{label:r.form.completionWebhook,children:(0,Y.jsx)(`input`,{className:Vn,value:n.completionWebhookUrl,onChange:e=>T({completionWebhookUrl:e.target.value})})}):null,t[270]=n.completionWebhookUrl,t[271]=n.safetyMode,t[272]=r.form.completionWebhook,t[273]=T,t[274]=$):$=t[274];let pt;t[275]===r.form.reliability?pt=t[276]:(pt=(0,Y.jsx)(Un,{title:r.form.reliability}),t[275]=r.form.reliability,t[276]=pt);let mt;t[277]===T?mt=t[278]:(mt=e=>T({timeoutSeconds:e.target.value}),t[277]=T,t[278]=mt);let ht;t[279]!==n.timeoutSeconds||t[280]!==mt?(ht=(0,Y.jsx)(`input`,{className:Vn,inputMode:`numeric`,value:n.timeoutSeconds,onChange:mt}),t[279]=n.timeoutSeconds,t[280]=mt,t[281]=ht):ht=t[281];let bt;t[282]!==r.form.timeoutSeconds||t[283]!==ht?(bt=(0,Y.jsx)(Hn,{label:r.form.timeoutSeconds,children:ht}),t[282]=r.form.timeoutSeconds,t[283]=ht,t[284]=bt):bt=t[284];let xt;t[285]===T?xt=t[286]:(xt=e=>T({disableAfterFailures:e.target.value}),t[285]=T,t[286]=xt);let Ct;t[287]!==n.disableAfterFailures||t[288]!==xt?(Ct=(0,Y.jsx)(`input`,{className:Vn,inputMode:`numeric`,value:n.disableAfterFailures,onChange:xt}),t[287]=n.disableAfterFailures,t[288]=xt,t[289]=Ct):Ct=t[289];let wt;t[290]!==r.form.disableAfterFailures||t[291]!==Ct?(wt=(0,Y.jsx)(Hn,{label:r.form.disableAfterFailures,children:Ct}),t[290]=r.form.disableAfterFailures,t[291]=Ct,t[292]=wt):wt=t[292];let Tt;t[293]!==bt||t[294]!==wt?(Tt=(0,Y.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[bt,wt]}),t[293]=bt,t[294]=wt,t[295]=Tt):Tt=t[295];let Et;t[296]===r.form.effectivePolicy?Et=t[297]:(Et=(0,Y.jsx)(`p`,{className:`text-xs font-medium text-fg`,children:r.form.effectivePolicy}),t[296]=r.form.effectivePolicy,t[297]=Et);let Dt=n.timeoutSeconds||`—`,kt;t[298]!==r.form.executionDeadline||t[299]!==Dt?(kt=(0,Y.jsxs)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:[r.form.executionDeadline,`: `,Dt,`s`]}),t[298]=r.form.executionDeadline,t[299]=Dt,t[300]=kt):kt=t[300];let At;t[301]===r.form.downstreamTimeoutHint?At=t[302]:(At=(0,Y.jsx)(`p`,{className:`mt-0.5 text-xs leading-relaxed text-fg-subtle`,children:r.form.downstreamTimeoutHint}),t[301]=r.form.downstreamTimeoutHint,t[302]=At);let jt;t[303]!==Et||t[304]!==kt||t[305]!==At?(jt=(0,Y.jsxs)(`div`,{className:`rounded-lg border border-edge bg-surface-inset/40 px-3 py-2.5`,children:[Et,kt,At]}),t[303]=Et,t[304]=kt,t[305]=At,t[306]=jt):jt=t[306];let Mt;t[307]!==et||t[308]!==tt||t[309]!==ot||t[310]!==ft||t[311]!==$||t[312]!==pt||t[313]!==Tt||t[314]!==jt?(Mt=(0,Y.jsxs)(`div`,{className:`grid gap-4 border-t border-edge-subtle p-4`,children:[et,tt,ot,ft,$,pt,Tt,jt]}),t[307]=et,t[308]=tt,t[309]=ot,t[310]=ft,t[311]=$,t[312]=pt,t[313]=Tt,t[314]=jt,t[315]=Mt):Mt=t[315];let Nt;t[316]!==Q||t[317]!==Mt?(Nt=(0,Y.jsxs)(`details`,{className:`group rounded-xl border border-edge-subtle bg-surface-base`,children:[Q,Mt]}),t[316]=Q,t[317]=Mt,t[318]=Nt):Nt=t[318];let Pt;return t[319]!==re||t[320]!==U||t[321]!==ie||t[322]!==_e||t[323]!==ve||t[324]!==Ne||t[325]!==Pe||t[326]!==Fe||t[327]!==Ie||t[328]!==Le||t[329]!==Re||t[330]!==ze||t[331]!==Be||t[332]!==qe||t[333]!==Je||t[334]!==Ye||t[335]!==Nt?(Pt=(0,Y.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-5 py-4`,children:(0,Y.jsxs)(`div`,{className:`grid gap-4`,children:[re,U,ie,_e,ve,Ne,Pe,Fe,Ie,Le,Re,ze,Be,qe,Je,Ye,Nt]})}),t[319]=re,t[320]=U,t[321]=ie,t[322]=_e,t[323]=ve,t[324]=Ne,t[325]=Pe,t[326]=Fe,t[327]=Ie,t[328]=Le,t[329]=Re,t[330]=ze,t[331]=Be,t[332]=qe,t[333]=Je,t[334]=Ye,t[335]=Nt,t[336]=Pt):Pt=t[336],Pt}function Rn(e){return(0,Y.jsx)(d,{value:e.id,children:e.name},e.id)}function zn(e){return(0,Y.jsx)(d,{value:e.id,children:e.title||e.name},e.id)}function Bn(e){return(0,Y.jsx)(d,{value:e.id,children:e.name},e.id)}var Vn=`min-h-11 w-full rounded-lg border border-edge bg-surface-base px-3 py-2 text-base sm:min-h-0 sm:text-sm text-fg outline-none focus:border-accent`;function Hn(e){let t=(0,Te.c)(5),{label:n,children:r}=e,i;t[0]===n?i=t[1]:(i=(0,Y.jsx)(`span`,{className:`text-xs font-medium text-fg-muted`,children:n}),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,Y.jsxs)(`div`,{className:`grid gap-1.5`,children:[i,r]}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a}function Un(e){let t=(0,Te.c)(12),{title:n,step:r,description:i}=e,a;t[0]===r?a=t[1]:(a=r?(0,Y.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-full bg-accent/10 text-xs font-semibold text-accent-fg`,children:r}):(0,Y.jsx)(_,{className:`mt-0.5 size-4 text-fg-muted`}),t[0]=r,t[1]=a);let o;t[2]===n?o=t[3]:(o=(0,Y.jsx)(`div`,{className:`text-sm font-semibold text-fg`,children:n}),t[2]=n,t[3]=o);let s;t[4]===i?s=t[5]:(s=i?(0,Y.jsx)(`p`,{className:`mt-0.5 text-xs leading-5 text-fg-muted`,children:i}):null,t[4]=i,t[5]=s);let c;t[6]!==o||t[7]!==s?(c=(0,Y.jsxs)(`div`,{children:[o,s]}),t[6]=o,t[7]=s,t[8]=c):c=t[8];let l;return t[9]!==a||t[10]!==c?(l=(0,Y.jsxs)(`div`,{className:`flex items-start gap-2 pt-2`,children:[a,c]}),t[9]=a,t[10]=c,t[11]=l):l=t[11],l}export{mn as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-DPHK1VkS.js";var t=e(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-DPHK1VkS.js";var t=e(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]);export{t};
|