@xopcai/xopc 0.0.421 → 0.0.422
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/dist/background.js +184 -2
- package/dist/browser-ext/dist/sidepanel.js +9 -0
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-CKrylgib.js → activity-store-CvJ9rdwP.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-Dv5Rda4y.js → agent-avatar-dicebear-CFP6g4w7.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-B1ycycx2.js → agent-avatar-display-BHBe88Gu.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-D285zy0S.js → agent-defaults-settings-panel-DlGRuKMv.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-D3yCqVan.js → agent-plugin-dialog-C_Dm-u6_.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-DyAuR3rG.js → agents-BdVJHOiK.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-CASGzvkW.js → agents-admin-api-Do1Pza0R.js} +1 -1
- package/dist/gateway/static/root/assets/{api-Uk05lF9i.js → api-BQv5dLcH.js} +1 -1
- package/dist/gateway/static/root/assets/{api-C4LxuNzq.js → api-ONg37_fH.js} +1 -1
- package/dist/gateway/static/root/assets/app-link-1j40sJ-z.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CDnZNKHt.js → app-management-settings-panel-B4Wqhf4J.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CmCF7PZ5.js → appearance-settings-Dm1kRzKL.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-BR9qoA2P.js → apps-page-D1MMk1P7.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-nuHYYVty.js → archive-plugin-p_yLkyaC.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-api-DtJfd1QM.js → automation-api-DQaWBR03.js} +1 -1
- package/dist/gateway/static/root/assets/automation-result-state-CO_243JM.js +1 -0
- package/dist/gateway/static/root/assets/automation-task-card-D2p9qlYE.js +3 -0
- package/dist/gateway/static/root/assets/{automations-page-DM4IdUJh.js → automations-page-Ba64H37d.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BkzC3oIM.js +9 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CHCAr8jt.js → binary-plugins-B-6kyqtt.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-B0v8KxsO.js → block-editor-B5ysJ96n.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automation-inputs-DjUW7PEB.js → browser-automation-inputs-C2A3NIt3.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-Cf8AoQz1.js → browser-automations-page-CnbXFw1_.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-control-api-C6NZgaA1.js → browser-control-api-Aj_seKE9.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-DV2FNEDf.js → browser-settings-page-C7fxPq_z.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-CwdjWz2r.js → capabilities-BgtCwC_E.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-D0-HCZ5J.js → capabilities-DOTgaSgA.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-DwDkritH.js → capabilities-page-m3b9sLFG.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-mme16Fbp.js → capabilities-settings-panel-pYWZtPeU.js} +3 -3
- package/dist/gateway/static/root/assets/{channels-lKFLu8p-.js → channels-DGpRM6pj.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-l80cvSac.js → chat-agents-api-EvJ_Wvuc.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-BwP5QXEk.js → chat-chart-block-BQDbHLcw.js} +1 -1
- package/dist/gateway/static/root/assets/chat-page-GF9NIuZN.js +72 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-D2bV9YUL.js → chat-terminal-dock-DHFTGoEp.js} +2 -2
- package/dist/gateway/static/root/assets/{command-palette-api-CtapG8ck.js → command-palette-api-DPA_yEuy.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-DYuhKZRC.js → composer-payload-handoff-BTjauSNp.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-DZtMuihL.js → computer-settings-page-BFSSQfcx.js} +1 -1
- package/dist/gateway/static/root/assets/{connected-providers-grid-BQH5k3iC.js → connected-providers-grid-DM2glQN3.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-DrvFdP3G.js → connector-service-page-CFvg58qa.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-BzkgVBYC.js → connectors-api-CbC6Yht5.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-BtRNVCFy.js → connectors-page-D7pipFHA.js} +1 -1
- package/dist/gateway/static/root/assets/date-picker-Dd3MbG0x.js +1 -0
- package/dist/gateway/static/root/assets/{dependency-picker-Dh8hPmsT.js → dependency-picker-DcsHg2ml.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-CFz8bqyI.js → desktop-pet-DldzQT2h.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-COaboNn1.js → desktop-pet-settings-CYdI4KxB.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-D8XYHVqG.js → dev-view-store-JiJv585f.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-D8cLc41G.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-Cjv7rdo3.js → directory-picker-path-field-8WOXv8zw.js} +1 -1
- package/dist/gateway/static/root/assets/{discussion-annotation-sync-YvlVw17j.js → discussion-annotation-sync-B-grSe0w.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CXx3m5-B.js → extension-debug-page-EEQkTNEu.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-CnOdNwbo.js → extension-iframe-host-vlZVeMCY.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-BABmUY2s.js → extension-marketplace-api-_o2In_al.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-C1nGr4DD.js → extension-page-CPrT111s.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-BA0Y2Rvs.js → extension-provider-B2Mf3FBu.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-QIPI8e7k.js → extension-settings-page-CznJEgWV.js} +1 -1
- package/dist/gateway/static/root/assets/{file-preview-surface-BsB7bnFH.js → file-preview-surface-7h8_fZul.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-Bt8w0Iio.js → gateway-config-swr-DbbNEOKj.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-CyCCNUxm.js → gateway-realtime-D20ZrAuM.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-C6sMzYDT.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-Ty4AzDxa.js → gateway-restart-5ut-lhJm.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-BvKq7vuz.js → gateway-settings-BCf_cibp.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-N3k-C7c2.js → gateway-startup-retry-DlHL0DpH.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-D8EB2vfY.js → global-defaults-api-CmODomcV.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-eRuAzi58.js → home-page-uz22TRB-.js} +2 -2
- package/dist/gateway/static/root/assets/{image-generation-api-C99Fsofm.js → image-generation-api-dzPnpUFu.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-Cp9RquVb.js → imports-page-ChBoNMyE.js} +1 -1
- package/dist/gateway/static/root/assets/index-CSIg7V1A.js +11 -0
- package/dist/gateway/static/root/assets/index-Dv8mUlNN.css +1 -0
- package/dist/gateway/static/root/assets/{install-connector-dialog-CsoAidXp.js → install-connector-dialog-CNcdQDX0.js} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DFhOP2aD.js → keyboard-shortcuts-settings-CRbYq2_g.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-DbtU_A-l.js → local-app-workbench-page-04cX5TJu.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-rjhHfLpe.js → local-apps-page-fWM0FEhN.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-DHM4vWDO.js → local-session-drafts-ClrSe5mH.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-5Hf8J8-_.js → locale-store-VNjH18Dj.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-Dx_JIOpF.js → logs-page-6GanGLrm.js} +1 -1
- package/dist/gateway/static/root/assets/management-settings-BxD_lc4E.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-pzSRu7av.js → markdown-view-DLCBYWtx.js} +2 -2
- package/dist/gateway/static/root/assets/{media-plugins-3cJuHbO7.js → media-plugins-BvtNwKFb.js} +1 -1
- package/dist/gateway/static/root/assets/{messages-uXxg5p54.js → messages-Btr7C0hF.js} +2 -2
- package/dist/gateway/static/root/assets/{model-selector-ksLo-5B_.js → model-selector-DYUnp917.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-DhZng2nF.js → models-hub-cache-_qE7L-_H.js} +1 -1
- package/dist/gateway/static/root/assets/{note-detail-panel-B6RbjwJq.js → note-detail-panel-bjRZesmS.js} +3 -3
- package/dist/gateway/static/root/assets/note-image-lightbox-D7Jqb75C.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-DocbsBbT.js → notes-api-Bxa11X3a.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-B7889s6-.js → notes-page-D2QpJ3WZ.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-CCFIPbA0.js → oauth-api-DIE4UpP7.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-GxkF0vWJ.js → oauth-provider-connect-B95tiddN.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-CvWLVeRA.js → page-context-capture-button-C-QbbwmN.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-CMRDNv4d.js → page-context-draft-BHmOfksL.js} +1 -1
- package/dist/gateway/static/root/assets/page-header-store-bPV8_tKL.js +1 -0
- package/dist/gateway/static/root/assets/{personal-avatar-CqNJ48Ge.js → personal-avatar-nXrmMfrV.js} +1 -1
- package/dist/gateway/static/root/assets/personal-page-BCwlYT3F.js +1 -0
- package/dist/gateway/static/root/assets/{personal-settings-panel-DAcl8DU4.js → personal-settings-panel-vkYmXK8h.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-DLWblGj7.js → phone-dependencies-card-CZDAxTWv.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-ugrT9GJu.js → phone-model-picker-4Snfs8Hq.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-DIIt7JOE.js → phone-settings-page-D8HperfA.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-mawKT5kV.js → phone-workspace-store-Di9R9Ux5.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-BdueMT3q.js → plugin-details-dialog-DJsDu-_8.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-CmLZNwbm.js → preference-select-fields-C6abaM3k.js} +1 -1
- package/dist/gateway/static/root/assets/{product-automation-feedback-DYwhL37Y.js → product-automation-feedback-C74s9Mjz.js} +1 -1
- package/dist/gateway/static/root/assets/product-delivery-DRyD9_Xq.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-B5G4X71t.js → product-open-page-AbDP5w1c.js} +1 -1
- package/dist/gateway/static/root/assets/product-preview-content-CktjvFbc.js +1 -0
- package/dist/gateway/static/root/assets/product-preview-modal-CzsqLwB4.js +2 -0
- package/dist/gateway/static/root/assets/{project-detail-page-CRJb69vP.js → project-detail-page-Cf3tggGP.js} +2 -2
- package/dist/gateway/static/root/assets/{project-understanding-D3w8cZEm.js → project-understanding-jmhFbHch.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-CkifzKjz.js → projects-page-jMgZiFnO.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-CKFg2PZQ.js → providers-api-CJBYFKAK.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-ZkmRf0GR.js → recording-upload-Dl9a5yOV.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-B1Mh3bNo.js → registry-api-BwkbPUYu.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-Dw5rG-aA.js → remote-access-hub-CBQ_bOy9.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-BUWsH3fp.js → resource-unavailable-35wBZxmz.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-BcA6SPeC.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-BXvn5ImA.js → runtime-tools-api-BF28JDAO.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-BALcypHp.js → runtime-tools-settings-panel-Bq2xQ2qd.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-CpVUnz89.js → service-recommendation-list-CdaS4MPF.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-VquhIBHI.js → session-api-zJXYlRPt.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-wWxpzSo0.js +23 -0
- package/dist/gateway/static/root/assets/{sessions-page-DlvPkE5Y.js → sessions-page-BkjD_dUD.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BUMCEtA_.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-c9_iZ-46.js → settings-advanced-section-C84IghdL.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-Dem6-TBe.js → settings-mode-store-CtQBJvbO.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-B_wNfFQe.js → settings-page-eEIz9InP.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-C8a_oOyw.js → settings-page-header-CsPAYlqV.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-CTSRWljG.js → settings-page-layout-lPLeJQoV.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-BNZoqF40.js → setup-status-panel-BSU5WpaE.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-C5JTTxsy.js → share-link-dialog-NaM6jvIz.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-D-KxzXgm.js → share-preview-page-CHjZn27s.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-CztKbxdd.js → shares-api-B9rVcV1y.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-CzR21j6e.js → shares-settings-5sB15V5v.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-B7kWl6LK.js → skill-api-D6zVfEuK.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-Cn07P6qZ.js → skill-list-api-SLmTBYF5.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-Bhl0u16_.js → skill-reload-api-UQkq2orI.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-BmkuxHZe.js → skills-page-Ca0pYZ4i.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-Ce6zIcki.js → system-settings-panel-BARWbjRN.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-CysJhG3B.js → task-detail-page-roqAsGue.js} +2 -2
- package/dist/gateway/static/root/assets/{task-result-evidence-CGZKMnNo.js → task-result-evidence-Bb1F7nAM.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-YwLUkuyV.js → terminal-panel-store-DYDeXXAg.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-DOJ9tu-j.js → theme-store-DbStcH89.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-BplBpTdL.js → tracing-settings-page-YfkNCxbP.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-B5-Ypvqa.js → tunnel-api-BK_ivyIb.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-CmwtE8Kd.js → understanding-activity-store-p7Z7oq8z.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-9apSmAVL.js → understanding-refresh-store-D-U6rcwZ.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-cPbirpXX.js → usage-page-URFSiswS.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-B3p2QWaF.js → use-autosave-B7cbumro.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-D-AEYC85.js → use-composer-attachments-DAtiwLsE.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-CO4SC-LX.js → use-file-preview-expanded-B8erpWsX.js} +2 -2
- package/dist/gateway/static/root/assets/{use-personal-profile-DocmhC9I.js → use-personal-profile-DDW29nm-.js} +1 -1
- package/dist/gateway/static/root/assets/{use-workspace-tree-VraTGKx-.js → use-workspace-tree-DCoTf22f.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-DuRALzhe.js → user-model-page-DSV5NkNj.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-DbSQHZZW.js → voice-api-key-field-DzYdJZN4.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-D9iNJSvm.js → voice-config-api-wotvT6Hw.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-hso9_VvT.js → voice-input-shortcut-events-BI6PuiIB.js} +1 -1
- package/dist/gateway/static/root/assets/voice-transcribe-api-DAK9eLRr.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-fsL9RJqB.js → work-discovery-overlay-BzmB9Rub.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-DAQPKVDs.js → work-discovery-page-CmGjxUIT.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-Ta73QrNw.js → working-directory-picker-modal-B-EHm52-.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-CgrcNyBc.js → workspace-api-uhiEMPpK.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-DrPVyikA.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-file-preview-dialog-B7uBuPtA.js → workspace-file-preview-dialog-BDm06MZm.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-Bi2vRvaQ.js → workspace-open-location-menu-Bv83uoqu.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-CCOOBG-7.js → xopc-cloud-account-card-Cd5GdpGL.js} +1 -1
- package/dist/gateway/static/root/index.html +84 -84
- package/dist/gateway/static/root/notification-sw.js +21 -7
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-protocol/src/context.js +115 -0
- package/dist/packages/endpoint-tools-protocol/src/index.js +4 -0
- package/dist/packages/endpoint-tools-protocol/src/location-sharing.js +51 -0
- package/dist/packages/gateway-contract/src/gateway-scopes.js +5 -1
- package/dist/packages/gateway-contract/src/index.js +2 -0
- package/dist/packages/gateway-contract/src/phone-workspace.js +6 -0
- package/dist/packages/gateway-contract/src/product-delivery.js +9 -3
- package/dist/src/agent/embedded/external-tool-discovery.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +2 -2
- package/dist/src/agent/embedded/run-turn.js +72 -9
- package/dist/src/agent/embedded/session-runner.js +2 -1
- package/dist/src/agent/embedded/types.d.ts +1 -1
- package/dist/src/agent/prompt/system-prompt.js +1 -0
- package/dist/src/agent/service/direct-turn-helpers.d.ts +0 -7
- package/dist/src/agent/service/direct-turn-helpers.js +3 -2
- package/dist/src/agent/service/process-direct-streaming.js +2 -1
- package/dist/src/agent/source-context/device-environment.d.ts +3 -0
- package/dist/src/agent/source-context/device-environment.js +38 -0
- package/dist/src/agent/source-context/injector.js +2 -1
- package/dist/src/agent/tool-manuals/phone.d.ts +1 -1
- package/dist/src/agent/tool-manuals/phone.js +1 -1
- package/dist/src/agent/tools/automation-tool.js +3 -2
- package/dist/src/agent/tools/factory.js +1 -1
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/phone-use-tool.js +46 -2
- package/dist/src/agent/tools/xopc-use-tool.js +1 -0
- package/dist/src/computer/runtime.d.ts +1 -1
- package/dist/src/config/schema.d.ts +1 -0
- package/dist/src/endpoint-tools/context-store.d.ts +29 -0
- package/dist/src/endpoint-tools/context-store.js +138 -0
- package/dist/src/endpoint-tools/location-sharing.d.ts +42 -0
- package/dist/src/endpoint-tools/location-sharing.js +203 -0
- package/dist/src/endpoint-tools/runtime.d.ts +4 -0
- package/dist/src/endpoint-tools/runtime.js +8 -0
- package/dist/src/endpoint-tools/turn-context.d.ts +2 -1
- package/dist/src/endpoint-tools/turn-context.js +4 -2
- package/dist/src/gateway/hono/middleware/auth.js +1 -1
- package/dist/src/gateway/hono/routes/devices.js +1 -0
- package/dist/src/gateway/hono/routes/endpoint-compatibility.js +4 -0
- package/dist/src/gateway/hono/routes/endpoint-environment.d.ts +3 -0
- package/dist/src/gateway/hono/routes/endpoint-environment.js +98 -0
- package/dist/src/gateway/hono/routes/endpoint-tools.js +1 -0
- package/dist/src/gateway/hono/routes/lazy-bundles.js +16 -0
- package/dist/src/gateway/hono/routes/location-sharing.d.ts +3 -0
- package/dist/src/gateway/hono/routes/location-sharing.js +164 -0
- package/dist/src/gateway/hono/routes/phone.js +246 -34
- package/dist/src/gateway/hono/routes/session-command-handler.js +1 -1
- package/dist/src/gateway/hono/routes/session-input-handler.js +2 -1
- package/dist/src/gateway/hono/routes/tunnel.js +10 -0
- package/dist/src/gateway/security/gateway-scopes.js +6 -0
- package/dist/src/gateway/security/phone-access.d.ts +4 -0
- package/dist/src/gateway/security/phone-access.js +20 -0
- package/dist/src/gateway/service/agent-runner.js +3 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +1 -0
- package/dist/src/gateway/service/run-gateway-agent.js +2 -1
- package/dist/src/gateway/service/session-input-coordinator.d.ts +3 -0
- package/dist/src/gateway/service/session-input-coordinator.js +50 -2
- package/dist/src/gateway/service.d.ts +1 -0
- package/dist/src/gateway/service.js +8 -0
- package/dist/src/gateway/session-reset-service.js +4 -0
- package/dist/src/notifications/planner.js +6 -6
- package/dist/src/phone/assistance-service.d.ts +6 -0
- package/dist/src/phone/assistance-service.js +32 -0
- package/dist/src/phone/assistance.d.ts +40 -0
- package/dist/src/phone/assistance.js +273 -0
- package/dist/src/phone/cloud-phones.d.ts +5 -0
- package/dist/src/phone/cloud-phones.js +14 -0
- package/dist/src/phone/contracts.d.ts +7 -1
- package/dist/src/phone/contracts.js +5 -0
- package/dist/src/phone/environment-adapter.d.ts +3 -0
- package/dist/src/phone/environment-adapter.js +11 -0
- package/dist/src/phone/location-baseline-store.d.ts +9 -0
- package/dist/src/phone/location-baseline-store.js +61 -0
- package/dist/src/phone/location-environment.d.ts +61 -0
- package/dist/src/phone/location-environment.js +157 -0
- package/dist/src/phone/model-adapter.js +16 -5
- package/dist/src/phone/runtime.d.ts +17 -2
- package/dist/src/phone/runtime.js +203 -20
- package/dist/src/phone/stream-gateway.d.ts +5 -0
- package/dist/src/phone/stream-gateway.js +85 -51
- package/dist/src/phone/wuying-location.d.ts +18 -0
- package/dist/src/phone/wuying-location.js +86 -0
- package/dist/src/storage/sqlite/device-access-repository.d.ts +4 -0
- package/dist/src/storage/sqlite/device-access-repository.js +18 -1
- package/dist/src/tunnel/broker-client.d.ts +8 -0
- package/dist/src/tunnel/broker-client.js +18 -1
- package/dist/src/voice/realtime/runtime.js +1 -1
- package/package.json +4 -3
- package/dist/gateway/static/root/assets/app-link-CytZ5zkp.js +0 -1
- package/dist/gateway/static/root/assets/automation-display-BlGt8MAC.js +0 -2
- package/dist/gateway/static/root/assets/automation-task-card-Cp3RIw5d.js +0 -2
- package/dist/gateway/static/root/assets/automations-workspace-CXLu04I-.js +0 -9
- package/dist/gateway/static/root/assets/chat-page-CT3K7lFT.js +0 -71
- package/dist/gateway/static/root/assets/date-picker-ByTasrfl.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-BKMpLdIA.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-0gmDfPeP.js +0 -1
- package/dist/gateway/static/root/assets/index-6vVrWfwM.js +0 -11
- package/dist/gateway/static/root/assets/index-DDGK6klk.css +0 -1
- package/dist/gateway/static/root/assets/management-settings-CuSzixOw.js +0 -1
- package/dist/gateway/static/root/assets/note-image-lightbox-BCjvBqwy.js +0 -1
- package/dist/gateway/static/root/assets/page-header-store-reh1es-3.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-D95FHaw9.js +0 -1
- package/dist/gateway/static/root/assets/product-delivery-BU_H84jL.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-content-BUheyLqt.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-modal-Cj_Zxu4G.js +0 -2
- package/dist/gateway/static/root/assets/route-preload-CRKbVwQ1.js +0 -2
- package/dist/gateway/static/root/assets/session-manager-DNMosCtW.js +0 -23
- package/dist/gateway/static/root/assets/settings-advanced-gate-Ckc1aCLG.js +0 -1
- package/dist/gateway/static/root/assets/voice-transcribe-api-BqIs0jgv.js +0 -1
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-Dw6wtadX.js +0 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { LocationSample } from '@xopcai/endpoint-tools-protocol';
|
|
2
|
+
export type LocationCommand = (args: string[], signal: AbortSignal) => Promise<string>;
|
|
3
|
+
export interface WuyingLocationBaseline {
|
|
4
|
+
property: string;
|
|
5
|
+
fingerprint: string;
|
|
6
|
+
order: 'latitude-first' | 'longitude-first';
|
|
7
|
+
}
|
|
8
|
+
/** Detect the installed image's property layout from an actual GPS fix; never guess tuple order. */
|
|
9
|
+
export declare class WuyingLocationAdapter {
|
|
10
|
+
private readonly command;
|
|
11
|
+
constructor(command: LocationCommand);
|
|
12
|
+
private read;
|
|
13
|
+
private fingerprint;
|
|
14
|
+
prepare(signal: AbortSignal): Promise<WuyingLocationBaseline>;
|
|
15
|
+
private verify;
|
|
16
|
+
apply(sample: LocationSample, baseline: WuyingLocationBaseline, assertCurrent: () => void, signal: AbortSignal): Promise<void>;
|
|
17
|
+
restore(baseline: WuyingLocationBaseline, signal: AbortSignal): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { PhoneError, init_contracts } from "./contracts.js";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
import { setTimeout } from "node:timers/promises";
|
|
4
|
+
//#region src/phone/wuying-location.ts
|
|
5
|
+
init_contracts();
|
|
6
|
+
const propertyName = "persist.location.data";
|
|
7
|
+
const numeric = "-?\\d+(?:\\.\\d+)?";
|
|
8
|
+
function tuple(raw) {
|
|
9
|
+
if (!new RegExp(`^${numeric},${numeric},${numeric},wgs$`).test(raw) || raw.length > 160) throw new PhoneError("PHONE_ENV_UNSUPPORTED", "Cloud phone location format is unsupported", 409);
|
|
10
|
+
const values = raw.split(",").slice(0, 3).map(Number);
|
|
11
|
+
if (values.some((value) => !Number.isFinite(value))) throw new PhoneError("PHONE_ENV_UNSUPPORTED", "Cloud phone location format is unsupported", 409);
|
|
12
|
+
return values;
|
|
13
|
+
}
|
|
14
|
+
function fixes(dump) {
|
|
15
|
+
return [...dump.matchAll(/^\s*last location=Location\[gps\s+(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)/gm)].map((match) => ({
|
|
16
|
+
latitude: Number(match[1]),
|
|
17
|
+
longitude: Number(match[2])
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
const matches = (fix, latitude, longitude) => Math.hypot(fix.latitude - latitude, (fix.longitude - longitude) * Math.cos(latitude * Math.PI / 180)) * 111320 <= 15;
|
|
21
|
+
/** Detect the installed image's property layout from an actual GPS fix; never guess tuple order. */
|
|
22
|
+
var WuyingLocationAdapter = class {
|
|
23
|
+
constructor(command) {
|
|
24
|
+
this.command = command;
|
|
25
|
+
}
|
|
26
|
+
async read(args, signal) {
|
|
27
|
+
const output = await this.command(args, signal);
|
|
28
|
+
if (/Exception|Permission denied|Error:|Failed to set/i.test(output)) throw new PhoneError("PHONE_ENV_OPERATION_FAILED", "Cloud phone location command failed", 502);
|
|
29
|
+
return output.trim();
|
|
30
|
+
}
|
|
31
|
+
async fingerprint(signal) {
|
|
32
|
+
return createHash("sha256").update(await this.read(["getprop", "ro.build.fingerprint"], signal)).digest("hex");
|
|
33
|
+
}
|
|
34
|
+
async prepare(signal) {
|
|
35
|
+
if (Number(await this.read(["getprop", "ro.build.version.sdk"], signal)) < 31) throw new PhoneError("PHONE_ENV_UNSUPPORTED", "This cloud phone image is unsupported", 409);
|
|
36
|
+
const property = await this.read(["getprop", propertyName], signal);
|
|
37
|
+
const [first, second] = tuple(property);
|
|
38
|
+
const current = fixes(await this.read(["dumpsys", "location"], signal));
|
|
39
|
+
const latitudeFirst = Math.abs(first) <= 90 && Math.abs(second) <= 180 && current.some((fix) => matches(fix, first, second));
|
|
40
|
+
if (latitudeFirst === (Math.abs(first) <= 180 && Math.abs(second) <= 90 && current.some((fix) => matches(fix, second, first)))) throw new PhoneError("PHONE_ENV_UNSUPPORTED", "A current GPS fix is required to verify cloud phone coordinate order", 409);
|
|
41
|
+
return {
|
|
42
|
+
property,
|
|
43
|
+
fingerprint: await this.fingerprint(signal),
|
|
44
|
+
order: latitudeFirst ? "latitude-first" : "longitude-first"
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
async verify(raw, baseline, signal) {
|
|
48
|
+
const [first, second] = tuple(raw);
|
|
49
|
+
const latitude = baseline.order === "latitude-first" ? first : second;
|
|
50
|
+
const longitude = baseline.order === "latitude-first" ? second : first;
|
|
51
|
+
for (let attempt = 0; attempt < 12; attempt++) {
|
|
52
|
+
signal.throwIfAborted();
|
|
53
|
+
const property = await this.read(["getprop", propertyName], signal);
|
|
54
|
+
const current = fixes(await this.read(["dumpsys", "location"], signal));
|
|
55
|
+
if (property === raw && current.length && current.every((fix) => matches(fix, latitude, longitude))) return;
|
|
56
|
+
await setTimeout(500, void 0, { signal });
|
|
57
|
+
}
|
|
58
|
+
throw new PhoneError("PHONE_ENV_UNVERIFIED", "Cloud phone GPS has not confirmed the requested location", 409);
|
|
59
|
+
}
|
|
60
|
+
async apply(sample, baseline, assertCurrent, signal) {
|
|
61
|
+
const [, , altitude] = tuple(baseline.property);
|
|
62
|
+
const [first, second] = baseline.order === "latitude-first" ? [sample.latitude, sample.longitude] : [sample.longitude, sample.latitude];
|
|
63
|
+
const raw = `${first.toFixed(7)},${second.toFixed(7)},${altitude},wgs`;
|
|
64
|
+
if (await this.fingerprint(signal) !== baseline.fingerprint) throw new PhoneError("PHONE_ENV_UNSUPPORTED", "Cloud phone image changed", 409);
|
|
65
|
+
assertCurrent();
|
|
66
|
+
await this.read([
|
|
67
|
+
"setprop",
|
|
68
|
+
propertyName,
|
|
69
|
+
raw
|
|
70
|
+
], signal);
|
|
71
|
+
await this.verify(raw, baseline, signal);
|
|
72
|
+
assertCurrent();
|
|
73
|
+
}
|
|
74
|
+
async restore(baseline, signal) {
|
|
75
|
+
tuple(baseline.property);
|
|
76
|
+
if (await this.fingerprint(signal) !== baseline.fingerprint) throw new PhoneError("PHONE_ENV_CLEANUP_PENDING", "Cloud phone image changed; location cleanup needs inspection", 409);
|
|
77
|
+
await this.read([
|
|
78
|
+
"setprop",
|
|
79
|
+
propertyName,
|
|
80
|
+
baseline.property
|
|
81
|
+
], signal);
|
|
82
|
+
await this.verify(baseline.property, baseline, signal);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
//#endregion
|
|
86
|
+
export { WuyingLocationAdapter };
|
|
@@ -63,3 +63,7 @@ export declare function rotateDeviceRefreshToken(input: {
|
|
|
63
63
|
now?: number;
|
|
64
64
|
}): DeviceTokenPair;
|
|
65
65
|
export declare function revokeDevice(deviceId: string, now?: number): boolean;
|
|
66
|
+
/** Checks a live transport without retaining its bearer token. */
|
|
67
|
+
export declare function isDeviceAccessSessionActive(deviceId: string, sessionId: string, now?: number): boolean;
|
|
68
|
+
/** Changes only phone permissions, preserving all other grants. */
|
|
69
|
+
export declare function setDevicePhoneAccess(deviceId: string, access: 'none' | 'view' | 'control'): DeviceRecord | undefined;
|
|
@@ -217,5 +217,22 @@ function revokeDevice(deviceId, now = Date.now()) {
|
|
|
217
217
|
return changed;
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
+
/** Checks a live transport without retaining its bearer token. */
|
|
221
|
+
function isDeviceAccessSessionActive(deviceId, sessionId, now = Date.now()) {
|
|
222
|
+
return Boolean(getSqliteDatabase().prepare(`SELECT 1 FROM device_access_sessions a JOIN devices d ON d.device_id = a.device_id
|
|
223
|
+
WHERE a.device_id = ? AND a.session_id = ? AND a.revoked_at IS NULL AND d.revoked_at IS NULL AND a.expires_at > ?`).get(deviceId, sessionId, now));
|
|
224
|
+
}
|
|
225
|
+
/** Changes only phone permissions, preserving all other grants. */
|
|
226
|
+
function setDevicePhoneAccess(deviceId, access) {
|
|
227
|
+
return runSqliteWriteTransaction((db) => {
|
|
228
|
+
const device = getDevice(deviceId);
|
|
229
|
+
if (!device || device.revokedAt !== void 0 || device.platform === "chrome") return void 0;
|
|
230
|
+
const scopes = device.scopes.filter((scope) => scope !== "phone.view" && scope !== "phone.control");
|
|
231
|
+
if (access !== "none") scopes.push("phone.view");
|
|
232
|
+
if (access === "control") scopes.push("phone.control");
|
|
233
|
+
db.prepare("UPDATE devices SET scopes_json = ? WHERE device_id = ?").run(JSON.stringify(scopes), deviceId);
|
|
234
|
+
return getDevice(deviceId);
|
|
235
|
+
});
|
|
236
|
+
}
|
|
220
237
|
//#endregion
|
|
221
|
-
export { DeviceRefreshRateLimitError, authenticateDeviceAccessToken, buildRefreshProofMessage, createDevice, getDevice, issueDeviceTokenPair, listDevices, registerInitialDeviceRefreshToken, revokeDevice, rotateDeviceRefreshToken };
|
|
238
|
+
export { DeviceRefreshRateLimitError, authenticateDeviceAccessToken, buildRefreshProofMessage, createDevice, getDevice, isDeviceAccessSessionActive, issueDeviceTokenPair, listDevices, registerInitialDeviceRefreshToken, revokeDevice, rotateDeviceRefreshToken, setDevicePhoneAccess };
|
|
@@ -11,6 +11,14 @@ export declare class TunnelBrokerError extends Error {
|
|
|
11
11
|
readonly status: number;
|
|
12
12
|
constructor(status: number, message: string);
|
|
13
13
|
}
|
|
14
|
+
export declare class TunnelRegistrationKeyRejectedError extends TunnelBrokerError {
|
|
15
|
+
readonly code = "TUNNEL_REGISTRATION_KEY_REJECTED";
|
|
16
|
+
constructor();
|
|
17
|
+
}
|
|
18
|
+
export declare class TunnelRecoveryProofRejectedError extends TunnelBrokerError {
|
|
19
|
+
readonly code = "TUNNEL_RECOVERY_PROOF_REJECTED";
|
|
20
|
+
constructor();
|
|
21
|
+
}
|
|
14
22
|
export declare class TunnelBrokerClient {
|
|
15
23
|
private readonly baseUrl;
|
|
16
24
|
constructor(baseUrl: string);
|
|
@@ -11,6 +11,20 @@ var TunnelBrokerError = class extends Error {
|
|
|
11
11
|
this.status = status;
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
+
var TunnelRegistrationKeyRejectedError = class extends TunnelBrokerError {
|
|
15
|
+
code = "TUNNEL_REGISTRATION_KEY_REJECTED";
|
|
16
|
+
constructor() {
|
|
17
|
+
super(401, "Tunnel register failed: 401");
|
|
18
|
+
this.name = "TunnelRegistrationKeyRejectedError";
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var TunnelRecoveryProofRejectedError = class extends TunnelBrokerError {
|
|
22
|
+
code = "TUNNEL_RECOVERY_PROOF_REJECTED";
|
|
23
|
+
constructor() {
|
|
24
|
+
super(403, "Active lease ownership proof required");
|
|
25
|
+
this.name = "TunnelRecoveryProofRejectedError";
|
|
26
|
+
}
|
|
27
|
+
};
|
|
14
28
|
const registrationResponseSchema = z.object({
|
|
15
29
|
tunnelId: z.string().regex(/^[a-zA-Z0-9_-]{1,128}$/),
|
|
16
30
|
tunnelToken: z.string().min(1).max(256),
|
|
@@ -52,6 +66,9 @@ var TunnelBrokerClient = class {
|
|
|
52
66
|
status: res.status,
|
|
53
67
|
url
|
|
54
68
|
}, "Tunnel register failed");
|
|
69
|
+
const body = await res.json().catch(() => null);
|
|
70
|
+
if (res.status === 403 && body?.code === "REGISTRATION_DENIED" && body.error === "Active lease ownership proof required") throw new TunnelRecoveryProofRejectedError();
|
|
71
|
+
if (res.status === 401) throw new TunnelRegistrationKeyRejectedError();
|
|
55
72
|
throw new TunnelBrokerError(res.status, `Tunnel register failed: ${res.status}`);
|
|
56
73
|
}
|
|
57
74
|
const registration = registrationResponseSchema.parse(await res.json());
|
|
@@ -87,4 +104,4 @@ function resolveBrokerApiBase(brokerUrl) {
|
|
|
87
104
|
return `${trimmed}/api`;
|
|
88
105
|
}
|
|
89
106
|
//#endregion
|
|
90
|
-
export { TunnelBrokerClient, TunnelBrokerError, resolveBrokerApiBase };
|
|
107
|
+
export { TunnelBrokerClient, TunnelBrokerError, TunnelRecoveryProofRejectedError, TunnelRegistrationKeyRejectedError, resolveBrokerApiBase };
|
|
@@ -12,8 +12,8 @@ import { mergeSttConfigFromAppConfig } from "../stt/config.js";
|
|
|
12
12
|
import { ALIBABA_REALTIME_TTS_MODEL } from "../tts/providers/alibaba-speech.js";
|
|
13
13
|
import { resolveSpeechProviderChain } from "../tts/factory.js";
|
|
14
14
|
import { mergeTtsConfigFromAppConfig } from "../tts/merge-config.js";
|
|
15
|
-
import { voiceConversationInstructions } from "./conversation-context.js";
|
|
16
15
|
import { verifyDeviceConnectionProof } from "../../gateway/security/device-request-proof.js";
|
|
16
|
+
import { voiceConversationInstructions } from "./conversation-context.js";
|
|
17
17
|
import { createPreauthConnectionBudget } from "../../gateway/security/preauth-connection-budget.js";
|
|
18
18
|
import { claimOpeningGreeting, finishOpeningGreeting, openingGreetingText } from "./opening-greeting.js";
|
|
19
19
|
import { createAgentVoiceEngine } from "./agentEngine.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xopcai/xopc",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.422",
|
|
4
4
|
"description": "Local-first personal AI with Ada, task delegation, files, projects and automations. Use cloud or local models.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -171,8 +171,8 @@
|
|
|
171
171
|
"vue": "^3.5.35",
|
|
172
172
|
"xlsx": "file:web/vendor/xlsx-0.20.3.tgz",
|
|
173
173
|
"@xopcai/browser-control-contract": "0.1.0",
|
|
174
|
-
"@xopcai/endpoint-tools-client": "0.0.0",
|
|
175
174
|
"@xopcai/computer-control-contract": "0.1.0",
|
|
175
|
+
"@xopcai/endpoint-tools-client": "0.0.0",
|
|
176
176
|
"@xopcai/endpoint-tools-protocol": "0.0.0",
|
|
177
177
|
"@xopcai/gateway-contract": "0.0.0",
|
|
178
178
|
"@xopcai/image-providers": "0.1.0",
|
|
@@ -192,7 +192,8 @@
|
|
|
192
192
|
"docker:run": "docker run --rm -it -p 18790:18790 -v ${HOME}/.xopc:/home/node/.xopc xopc:local",
|
|
193
193
|
"docker:compose:up": "sh -c 'if docker compose version >/dev/null 2>&1; then DOCKER_BUILDKIT=1 docker compose up --build xopc-gateway; else COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose up --build xopc-gateway; fi'",
|
|
194
194
|
"docker:compose:down": "sh -c 'if docker compose version >/dev/null 2>&1; then docker compose down; else docker-compose down; fi'",
|
|
195
|
-
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
195
|
+
"typecheck": "tsc --noEmit -p tsconfig.json && pnpm run typecheck:electron",
|
|
196
|
+
"typecheck:electron": "tsc -p tsconfig.electron.json",
|
|
196
197
|
"test:codemode:gateway": "node --import tsx/esm scripts/verify-codemode-gateway.mjs",
|
|
197
198
|
"test:tool-discovery:gateway": "cross-env XOPC_TOOL_DISCOVERY_SMOKE=1 node --import tsx/esm scripts/verify-codemode-gateway.mjs",
|
|
198
199
|
"test:native-tools:gateway": "cross-env XOPC_NATIVE_TOOLS_SMOKE=1 node --import tsx/esm scripts/verify-codemode-gateway.mjs",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,r as t}from"./product-delivery-BU_H84jL.js";var n=new Set([`agents`,`capabilities`,`personal`,`user-model`,`automations`,`browser-automations`,`channels`,`chat`,`connectors`,`extensions`,`local-apps`,`notes`,`onboarding`,`open`,`projects`,`settings`,`skills`,`tasks`,`you`]);function r(e){if(!e.startsWith(`/`)||e.startsWith(`//`)||e.includes(`\\`))return null;let t=e.slice(1).split(/[/?#]/,1)[0]??``;return t&&n.has(t)?e:null}function i(e){try{let t=new URL(e);return t.protocol!==`xopc:`||t.hostname!==`settings`?null:r(`/settings${t.pathname===`/`?``:t.pathname}${t.search}${t.hash}`)}catch{return null}}function a(n,a=window.location.href){let o=n.trim();if(!o)return{kind:`blocked`};let s=t(o);if(s){let t=e({...s,title:s.id,capabilities:[`open`]});return t?{kind:`internal-route`,route:t}:{kind:`blocked`}}let c=i(o);if(c)return{kind:`internal-route`,route:c};if(o.startsWith(`#/`)){let e=r(o.slice(1));return e?{kind:`internal-route`,route:e}:{kind:`blocked`}}if(o.startsWith(`/`)){let e=r(o);return e?{kind:`internal-route`,route:e}:{kind:`blocked`}}try{let e=new URL(o,a);if(e.protocol!==`http:`&&e.protocol!==`https:`||e.username||e.password)return{kind:`blocked`};let t=new URL(a);if(e.origin===t.origin&&e.hash.startsWith(`#/`)){let t=r(e.hash.slice(1));if(t)return{kind:`internal-route`,route:t}}return{kind:`external-http`,url:e.toString()}}catch{return{kind:`blocked`}}}function o(e,t,n){for(let r of e.querySelectorAll(`a`)){if(n?.(r))continue;let e=a(r.getAttribute(`href`)??``);if(r.dataset.xopcLinkKind=e.kind,e.kind===`blocked`){r.replaceWith(...Array.from(r.childNodes));continue}if(e.kind===`internal-route`){if(r.setAttribute(`href`,`#${e.route}`),r.removeAttribute(`target`),t){let n=e.route.slice(1).split(/[/?#]/,1)[0]??``,i=t.destinations[n]??t.open,a=r.dataset.xopcLinkLabel??r.textContent?.trim()??``;r.dataset.xopcLinkLabel=a,(/^(?:xopc:\/\/|#\/)/i.test(a)||/^(?:Open(?: in xopc)?|打开)$/i.test(a))&&(r.textContent=i),r.title||=i}continue}r.target=`_blank`;let i=new Set(r.rel.split(/\s+/).filter(Boolean));i.add(`noopener`),i.add(`noreferrer`),r.rel=[...i].join(` `)}}async function s(e){let t=a(e);if(t.kind!==`external-http`)return{ok:!1,error:`Only external HTTP(S) links can be opened`};let n=window.electronAPI?.shell?.openExternalUrl;return n?n(t.url):(window.open(t.url,`_blank`,`noopener,noreferrer`),{ok:!0})}export{s as n,a as r,o as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-aKtaBQYM.js";var t=e((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),n=e((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){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){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!==void 0)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))}}})),r=e((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`},ee={hour:l,minute:l,second:l,hourCycle:`h23`},te={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:u},S={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:d},ne={year:l,month:l,day:l,hour:l,minute:l},re={year:l,month:l,day:l,hour:l,minute:l,second:l},ie={year:l,month:u,day:l,hour:l,minute:l},ae={year:l,month:u,day:l,hour:l,minute:l,second:l},oe={year:l,month:u,day:l,weekday:u,hour:l,minute:l},C={year:l,month:d,day:l,hour:l,minute:l,timeZoneName:u},w={year:l,month:d,day:l,hour:l,minute:l,second:l,timeZoneName:u},T={year:l,month:d,day:l,weekday:d,hour:l,minute:l,timeZoneName:d},E={year:l,month:d,day:l,weekday:d,hour:l,minute:l,second:l,timeZoneName:d},D=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}},se=null,ce=class e extends D{static get instance(){return se===null&&(se=new e),se}get type(){return`system`}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Pt(e,t,n)}formatOffset(e,t){return Rt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type===`system`}get isValid(){return!0}},le=new Map;function ue(e){let t=le.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`}),le.set(e,t)),t}var de={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function fe(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 pe(e,t){let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let{type:t,value:i}=n[e],a=de[t];t===`era`?r[a]=i:I(a)||(r[a]=parseInt(i,10))}return r}var me=new Map,O=class e extends D{static create(t){let n=me.get(t);return n===void 0&&me.set(t,n=new e(t)),n}static resetCache(){me.clear(),le.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 Pt(e,t,n,this.name)}formatOffset(e,t){return Rt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=ue(this.name),[r,i,a,o,s,c,l]=n.formatToParts?pe(n,t):fe(n,t);o===`BC`&&(r=-Math.abs(r)+1);let u=At({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}},he={};function ge(e,t={}){let n=JSON.stringify([e,t]),r=he[n];return r||(r=new Intl.ListFormat(e,t),he[n]=r),r}var _e=new Map;function ve(e,t={}){let n=JSON.stringify([e,t]),r=_e.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,t),_e.set(n,r)),r}var ye=new Map;function be(e,t={}){let n=JSON.stringify([e,t]),r=ye.get(n);return r===void 0&&(r=new Intl.NumberFormat(e,t),ye.set(n,r)),r}var xe=new Map;function Se(e,t={}){let{base:n,...r}=t,i=JSON.stringify([e,r]),a=xe.get(i);return a===void 0&&(a=new Intl.RelativeTimeFormat(e,t),xe.set(i,a)),a}var Ce=null;function we(){return Ce||(Ce=new Intl.DateTimeFormat().resolvedOptions().locale,Ce)}var Te=new Map;function Ee(e){let t=Te.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),Te.set(e,t)),t}var De=new Map;function Oe(e){let t=De.get(e);if(!t){let n=new Intl.Locale(e);t=`getWeekInfo`in n?n.getWeekInfo():n.weekInfo,`minimalDays`in t||(t={...Re,...t}),De.set(e,t)}return t}function ke(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=ve(e).resolvedOptions(),r=e}catch{let i=e.substring(0,n);t=ve(i).resolvedOptions(),r=i}let{numberingSystem:i,calendar:a}=t;return[r,i,a]}}function Ae(e,t,n){return n||t?(e.includes(`-u-`)||(e+=`-u`),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}function je(e){let t=[];for(let n=1;n<=12;n++){let r=$.utc(2009,n,1);t.push(e(r))}return t}function Me(e){let t=[];for(let n=1;n<=7;n++){let r=$.utc(2016,11,13+n);t.push(e(r))}return t}function Ne(e,t,n,r){let i=e.listingMode();return i===`error`?null:i===`en`?n(t):r(t)}function Pe(e){return e.numberingSystem&&e.numberingSystem!==`latn`?!1:e.numberingSystem===`latn`||!e.locale||e.locale.startsWith(`en`)||Ee(e.locale).numberingSystem===`latn`}var Fe=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=be(e,t)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else return B(this.floor?Math.floor(e):Dt(e,3),this.padTo)}},Ie=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&&O.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=ve(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()}},Le=class{constructor(e,t,n){this.opts={style:`long`,...n},!t&&yt()&&(this.rtf=Se(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):rn(t,e,this.opts.numeric,this.opts.style!==`long`)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},Re={firstDay:1,minimalDays:4,weekend:[6,7]},k=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||N.defaultLocale,s=o||(a?`en-US`:we()),c=n||N.defaultNumberingSystem,l=r||N.defaultOutputCalendar,u=wt(i)||N.defaultWeekSettings;return new e(s,c,l,u,o)}static resetCache(){Ce=null,_e.clear(),ye.clear(),xe.clear(),Te.clear(),De.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]=ke(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.weekSettings=r,this.intl=Ae(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??=Pe(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,wt(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 Ne(this,e,Ut,()=>{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]=je(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return Ne(this,e,qt,()=>{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]=Me(e=>this.extract(e,n,`weekday`))),this.weekdaysCache[r][e]})}meridiems(){return Ne(this,void 0,()=>Jt,()=>{if(!this.meridiemCache){let e={hour:`numeric`,hourCycle:`h12`};this.meridiemCache=[$.utc(2016,11,13,9),$.utc(2016,11,13,19)].map(t=>this.extract(t,e,`dayperiod`))}return this.meridiemCache})}eras(e){return Ne(this,e,Qt,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[$.utc(-40,1,1),$.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 Fe(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Ie(e,this.intl,t)}relFormatter(e={}){return new Le(this.intl,this.isEnglish(),e)}listFormatter(e={}){return ge(this.intl,e)}isEnglish(){return this.locale===`en`||this.locale.toLowerCase()===`en-us`||Ee(this.intl).locale.startsWith(`en-us`)}getWeekSettings(){return this.weekSettings?this.weekSettings:bt()?Oe(this.locale):Re}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})`}},ze=null,A=class e extends D{static get utcInstance(){return ze===null&&(ze=new e(0)),ze}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(Ft(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return`fixed`}get name(){return this.fixed===0?`UTC`:`UTC${Rt(this.fixed,`narrow`)}`}get ianaName(){return this.fixed===0?`Etc/UTC`:`Etc/GMT${Rt(-this.fixed,`narrow`)}`}offsetName(){return this.name}formatOffset(e,t){return Rt(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}},Be=class extends D{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 j(e,t){if(I(e)||e===null)return t;if(e instanceof D)return e;if(_t(e)){let n=e.toLowerCase();return n==="default"?t:n===`local`||n===`system`?ce.instance:n===`utc`||n===`gmt`?A.utcInstance:A.parseSpecifier(n)||O.create(e)}else if(L(e))return A.instance(e);else if(typeof e==`object`&&`offset`in e&&typeof e.offset==`function`)return e;else return new Be(e)}var Ve={arab:`[٠-٩]`,arabext:`[۰-۹]`,bali:`[᭐-᭙]`,beng:`[০-৯]`,deva:`[०-९]`,fullwide:`[0-9]`,gujr:`[૦-૯]`,hanidec:`[〇|一|二|三|四|五|六|七|八|九]`,khmr:`[០-៩]`,knda:`[೦-೯]`,laoo:`[໐-໙]`,limb:`[᥆-᥏]`,mlym:`[൦-൯]`,mong:`[᠐-᠙]`,mymr:`[၀-၉]`,orya:`[୦-୯]`,tamldec:`[௦-௯]`,telu:`[౦-౯]`,thai:`[๐-๙]`,tibt:`[༠-༩]`,latn:`\\d`},He={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]},Ue=Ve.hanidec.replace(/[\[|\]]/g,``).split(``);function We(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(Ve.hanidec)!==-1)t+=Ue.indexOf(e[n]);else for(let e in He){let[n,i]=He[e];r>=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}else return t}var Ge=new Map;function Ke(){Ge.clear()}function M({numberingSystem:e},t=``){let n=e||`latn`,r=Ge.get(n);r===void 0&&(r=new Map,Ge.set(n,r));let i=r.get(t);return i===void 0&&(i=RegExp(`${Ve[n]}${t}`),r.set(t,i)),i}var qe=()=>Date.now(),Je=`system`,Ye=null,Xe=null,Ze=null,Qe=60,$e,et=null,N=class{static get now(){return qe}static set now(e){qe=e}static set defaultZone(e){Je=e}static get defaultZone(){return j(Je,ce.instance)}static get defaultLocale(){return Ye}static set defaultLocale(e){Ye=e}static get defaultNumberingSystem(){return Xe}static set defaultNumberingSystem(e){Xe=e}static get defaultOutputCalendar(){return Ze}static set defaultOutputCalendar(e){Ze=e}static get defaultWeekSettings(){return et}static set defaultWeekSettings(e){et=wt(e)}static get twoDigitCutoffYear(){return Qe}static set twoDigitCutoffYear(e){Qe=e%100}static get throwOnInvalid(){return $e}static set throwOnInvalid(e){$e=e}static resetCaches(){k.resetCache(),O.resetCache(),$.resetCache(),Ke()}},P=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},tt=[0,31,59,90,120,151,181,212,243,273,304,334],nt=[0,31,60,91,121,152,182,213,244,274,305,335];function F(e,t){return new P(`unit out of range`,`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function rt(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 it(e,t,n){return n+(Ot(e)?nt:tt)[t-1]}function at(e,t){let n=Ot(e)?nt:tt,r=n.findIndex(e=>e<t),i=t-n[r];return{month:r+1,day:i}}function ot(e,t){return(e-t+7)%7+1}function st(e,t=4,n=1){let{year:r,month:i,day:a}=e,o=it(r,i,a),s=ot(rt(r,i,a),n),c=Math.floor((o-s+14-t)/7),l;return c<1?(l=r-1,c=Mt(l,t,n)):c>Mt(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:s,...zt(e)}}function ct(e,t=4,n=1){let{weekYear:r,weekNumber:i,weekday:a}=e,o=ot(rt(r,1,t),n),s=U(r),c=i*7+a-o-7+t,l;c<1?(l=r-1,c+=U(l)):c>s?(l=r+1,c-=U(r)):l=r;let{month:u,day:d}=at(l,c);return{year:l,month:u,day:d,...zt(e)}}function lt(e){let{year:t,month:n,day:r}=e;return{year:t,ordinal:it(t,n,r),...zt(e)}}function ut(e){let{year:t,ordinal:n}=e,{month:r,day:i}=at(t,n);return{year:t,month:r,day:i,...zt(e)}}function dt(e,t){if(!I(e.localWeekday)||!I(e.localWeekNumber)||!I(e.localWeekYear)){if(!I(e.weekday)||!I(e.weekNumber)||!I(e.weekYear))throw new a(`Cannot mix locale-based week fields with ISO-based week fields`);return I(e.localWeekday)||(e.weekday=e.localWeekday),I(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),I(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 ft(e,t=4,n=1){let r=gt(e.weekYear),i=z(e.weekNumber,1,Mt(e.weekYear,t,n)),a=z(e.weekday,1,7);return r?i?!a&&F(`weekday`,e.weekday):F(`week`,e.weekNumber):F(`weekYear`,e.weekYear)}function pt(e){let t=gt(e.year),n=z(e.ordinal,1,U(e.year));return t?!n&&F(`ordinal`,e.ordinal):F(`year`,e.year)}function mt(e){let t=gt(e.year),n=z(e.month,1,12),r=z(e.day,1,kt(e.year,e.month));return t?n?!r&&F(`day`,e.day):F(`month`,e.month):F(`year`,e.year)}function ht(e){let{hour:t,minute:n,second:r,millisecond:i}=e,a=z(t,0,23)||t===24&&n===0&&r===0&&i===0,o=z(n,0,59),s=z(r,0,59),c=z(i,0,999);return a?o?s?!c&&F(`millisecond`,i):F(`second`,r):F(`minute`,n):F(`hour`,t)}function I(e){return e===void 0}function L(e){return typeof e==`number`}function gt(e){return typeof e==`number`&&e%1==0}function _t(e){return typeof e==`string`}function vt(e){return Object.prototype.toString.call(e)===`[object Date]`}function yt(){try{return typeof Intl<`u`&&!!Intl.RelativeTimeFormat}catch{return!1}}function bt(){try{return typeof Intl<`u`&&!!Intl.Locale&&(`weekInfo`in Intl.Locale.prototype||`getWeekInfo`in Intl.Locale.prototype)}catch{return!1}}function xt(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 R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function wt(e){if(e==null)return null;if(typeof e!=`object`)throw new s(`Week settings must be an object`);if(!z(e.firstDay,1,7)||!z(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!z(e,1,7)))throw new s(`Invalid week settings`);return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function z(e,t,n){return gt(e)&&e>=t&&e<=n}function Tt(e,t){return e-t*Math.floor(e/t)}function B(e,t=2){let n=e<0,r;return r=n?`-`+(``+-e).padStart(t,`0`):(``+e).padStart(t,`0`),r}function V(e){if(!(I(e)||e===null||e===``))return parseInt(e,10)}function H(e){if(!(I(e)||e===null||e===``))return parseFloat(e)}function Et(e){if(!(I(e)||e===null||e===``)){let t=parseFloat(`0.`+e)*1e3;return Math.floor(t)}}function Dt(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 Ot(e){return e%4==0&&(e%100!=0||e%400==0)}function U(e){return Ot(e)?366:365}function kt(e,t){let n=Tt(t-1,12)+1,r=e+(t-n)/12;return n===2?Ot(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function At(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 jt(e,t,n){return-ot(rt(e,1,t),n)+t-1}function Mt(e,t=4,n=1){let r=jt(e,t,n),i=jt(e+1,t,n);return(U(e)-r+i)/7}function Nt(e){return e>99?e:e>N.twoDigitCutoffYear?1900+e:2e3+e}function Pt(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 Ft(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 It(e){let t=Number(e);if(typeof e==`boolean`||e===``||!Number.isFinite(t))throw new s(`Invalid unit value ${e}`);return t}function Lt(e,t){let n={};for(let r in e)if(R(e,r)){let i=e[r];if(i==null)continue;n[t(r)]=It(i)}return n}function Rt(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}${B(n,2)}:${B(r,2)}`;case`narrow`:return`${i}${n}${r>0?`:${r}`:``}`;case`techie`:return`${i}${B(n,2)}${B(r,2)}`;default:throw RangeError(`Value format ${t} is out of range for property format`)}}function zt(e){return Ct(e,[`hour`,`minute`,`second`,`millisecond`])}var Bt=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],Vt=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],Ht=[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`];function Ut(e){switch(e){case`narrow`:return[...Ht];case`short`:return[...Vt];case`long`:return[...Bt];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 Wt=[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`],Gt=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`],Kt=[`M`,`T`,`W`,`T`,`F`,`S`,`S`];function qt(e){switch(e){case`narrow`:return[...Kt];case`short`:return[...Gt];case`long`:return[...Wt];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`];default:return null}}var Jt=[`AM`,`PM`],Yt=[`Before Christ`,`Anno Domini`],Xt=[`BC`,`AD`],Zt=[`B`,`A`];function Qt(e){switch(e){case`narrow`:return[...Zt];case`short`:return[...Xt];case`long`:return[...Yt];default:return null}}function $t(e){return Jt[e.hour<12?0:1]}function en(e,t){return qt(t)[e.weekday-1]}function tn(e,t){return Ut(t)[e.month-1]}function nn(e,t){return Qt(t)[e.year<0?0:1]}function rn(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 an(e,t){let n=``;for(let r of e)r.literal?n+=r.val:n+=t(r.val);return n}var on={D:f,DD:p,DDD:h,DDDD:g,t:_,tt:v,ttt:y,tttt:b,T:x,TT:ee,TTT:te,TTTT:S,f:ne,ff:ie,fff:C,ffff:T,F:re,FF:ae,FFF:w,FFFF:E},W=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 on[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 B(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?$t(t):a({hour:`numeric`,hourCycle:`h12`},`dayperiod`),c=(e,n)=>r?tn(t,e):a(n?{month:e}:{month:e,day:`numeric`},`month`),l=(e,n)=>r?en(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?nn(t,e):a({era:e},`era`);return an(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 an(o,a(c,{isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]}))}},sn=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function G(...e){let t=e.reduce((e,t)=>e+t.source,``);return RegExp(`^${t}$`)}function cn(...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 ln(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 un(...e){return(t,n)=>{let r={},i;for(i=0;i<e.length;i++)r[e[i]]=V(t[n+i]);return[r,null,n+i]}}var dn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,fn=`(?:${dn.source}?(?:\\[(${sn.source})\\])?)?`,pn=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,mn=RegExp(`${pn.source}${fn}`),hn=RegExp(`(?:[Tt]${mn.source})?`),gn=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,_n=/(\d{4})-?W(\d\d)(?:-?(\d))?/,vn=/(\d{4})-?(\d{3})/,yn=un(`weekYear`,`weekNumber`,`weekDay`),bn=un(`year`,`ordinal`),xn=/(\d{4})-(\d\d)-(\d\d)/,Sn=RegExp(`${pn.source} ?(?:${dn.source}|(${sn.source}))?`),Cn=RegExp(`(?: ${Sn.source})?`);function wn(e,t,n){let r=e[t];return I(r)?n:V(r)}function Tn(e,t){return[{year:wn(e,t),month:wn(e,t+1,1),day:wn(e,t+2,1)},null,t+3]}function En(e,t){return[{hours:wn(e,t,0),minutes:wn(e,t+1,0),seconds:wn(e,t+2,0),milliseconds:Et(e[t+3])},null,t+4]}function Dn(e,t){let n=!e[t]&&!e[t+1],r=Ft(e[t+1],e[t+2]);return[{},n?null:A.instance(r),t+3]}function On(e,t){return[{},e[t]?O.create(e[t]):null,t+1]}var kn=RegExp(`^T?${pn.source}$`),An=/^-?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 jn(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(H(n)),months:f(H(r)),weeks:f(H(i)),days:f(H(a)),hours:f(H(o)),minutes:f(H(s)),seconds:f(H(c),c===`-0`),milliseconds:f(Et(l),d)}]}var Mn={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nn(e,t,n,r,i,a,o){let s={year:t.length===2?Nt(V(t)):V(t),month:Vt.indexOf(n)+1,day:V(r),hour:V(i),minute:V(a)};return o&&(s.second=V(o)),e&&(s.weekday=e.length>3?Wt.indexOf(e)+1:Gt.indexOf(e)+1),s}var Pn=/^(?:(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 Fn(e){let[,t,n,r,i,a,o,s,c,l,u,d]=e,f=Nn(t,i,r,n,a,o,s),p;return p=c?Mn[c]:l?0:Ft(u,d),[f,new A(p)]}function In(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).trim()}var Ln=/^(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$/,Rn=/^(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$/,zn=/^(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 Bn(e){let[,t,n,r,i,a,o,s]=e;return[Nn(t,i,r,n,a,o,s),A.utcInstance]}function Vn(e){let[,t,n,r,i,a,o,s]=e;return[Nn(t,s,n,r,i,a,o),A.utcInstance]}var Hn=G(gn,hn),Un=G(_n,hn),Wn=G(vn,hn),Gn=G(mn),Kn=cn(Tn,En,Dn,On),qn=cn(yn,En,Dn,On),Jn=cn(bn,En,Dn,On),Yn=cn(En,Dn,On);function Xn(e){return ln(e,[Hn,Kn],[Un,qn],[Wn,Jn],[Gn,Yn])}function Zn(e){return ln(In(e),[Pn,Fn])}function Qn(e){return ln(e,[Ln,Bn],[Rn,Bn],[zn,Vn])}function $n(e){return ln(e,[An,jn])}var er=cn(En);function tr(e){return ln(e,[kn,er])}var nr=G(xn,Cn),rr=G(Sn),ir=cn(En,Dn,On);function ar(e){return ln(e,[nr,Kn],[rr,ir])}var or=`Invalid Duration`,sr={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}},cr={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},...sr},K=146097/400,lr=146097/4800,ur={years:{quarters:4,months:12,weeks:K/7,days:K,hours:K*24,minutes:K*24*60,seconds:K*24*60*60,milliseconds:K*24*60*60*1e3},quarters:{months:3,weeks:K/28,days:K/4,hours:K*24/4,minutes:K*24*60/4,seconds:K*24*60*60/4,milliseconds:K*24*60*60*1e3/4},months:{weeks:lr/7,days:lr,hours:lr*24,minutes:lr*24*60,seconds:lr*24*60*60,milliseconds:lr*24*60*60*1e3},...sr},q=[`years`,`quarters`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`],dr=q.slice(0).reverse();function J(e,t,n=!1){return new Y({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 fr(e,t){let n=t.milliseconds??0;for(let r of dr.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function pr(e,t){let n=fr(e,t)<0?-1:1;q.reduceRight((r,i)=>{if(I(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),q.reduce((n,r)=>{if(I(t[r]))return n;if(n){let i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function mr(e){let t={};for(let[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}var Y=class e{constructor(e){let t=e.conversionAccuracy===`longterm`||!1,n=t?ur:cr;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||k.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:Lt(t,e.normalizeUnit),loc:k.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(L(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]=$n(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]=tr(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 P?t:new P(t,n);if(N.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?W.create(this.loc,n).formatDurationFromString(this,e):or}toHuman(e={}){if(!this.isValid)return or;let t=e.showZeros!==!1,n=q.map(n=>{let r=this.values[n];return I(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+=Dt(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},$.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?fr(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 q)(R(n.values,e)||R(this.values,e))&&(r[e]=n.get(e)+this.get(e));return J(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]=It(e(this.values[n],n));return J(this,{values:t},!0)}get(t){return this[e.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let n={...this.values,...Lt(t,e.normalizeUnit)};return J(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 J(this,i)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return pr(this.matrix,e),J(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=mr(this.normalize().shiftToAll().toObject());return J(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 q)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;L(i[e])&&(t+=i[e]);let o=Math.trunc(t);n[e]=o,r[e]=(t*1e3-o*1e3)/1e3}else L(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 pr(this.matrix,n),J(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 J(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=mr(this.values);return J(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 q)if(!t(this.values[n],e.values[n]))return!1;return!0}},hr=`Invalid Interval`;function gr(e,t){return!e||!e.isValid?_r.invalid(`missing or invalid start`):!t||!t.isValid?_r.invalid(`missing or invalid end`):t<e?_r.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 _r=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 P?t:new P(t,n);if(N.throwOnInvalid)throw new r(i);return new e({invalid:i})}static fromDateTimes(t,n){let r=_i(t),i=_i(n);return gr(r,i)??new e({start:r,end:i})}static after(t,n){let r=Y.fromDurationLike(n),i=_i(t);return e.fromDateTimes(i,i.plus(r))}static before(t,n){let r=Y.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=$.fromISO(r,n),a=t.isValid}catch{a=!1}let o,s;try{o=$.fromISO(i,n),s=o.isValid}catch{s=!1}if(a&&s)return e.fromDateTimes(t,o);if(a){let r=Y.fromISO(i,n);if(r.isValid)return e.after(t,r)}else if(s){let t=Y.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=Y.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()})`:hr}[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?W.create(this.s.loc.clone(t),e).formatInterval(this):hr}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:hr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:hr}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:hr}toFormat(e,{separator:t=` – `}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:hr}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Y.invalid(this.invalidReason)}mapEndpoints(t){return e.fromDateTimes(t(this.s),t(this.e))}},vr=class{static hasDST(e=N.defaultZone){let t=$.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return O.isValidZone(e)}static normalizeZone(e){return j(e,N.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||k.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||k.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||k.create(e)).getWeekendDays().slice()}static months(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||k.create(t,n,i)).months(e)}static monthsFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||k.create(t,n,i)).months(e,!0)}static weekdays(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||k.create(t,n,null)).weekdays(e)}static weekdaysFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||k.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return k.create(e).meridiems()}static eras(e=`short`,{locale:t=null}={}){return k.create(t,null,`gregory`).eras(e)}static features(){return{relative:yt(),localeWeek:bt()}}};function yr(e,t){let n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf(`day`).valueOf(),r=n(t)-n(e);return Math.floor(Y.fromMillis(r).as(`days`))}function br(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=yr(e,t);return(n-n%7)/7}],[`days`,yr]],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 xr(e,t,n,r){let[i,a,o,s]=br(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=Y.fromObject(a,r);return l.length>0?Y.fromMillis(c,r).shiftTo(...l).plus(u):u}var Sr=`missing Intl.DateTimeFormat.formatToParts support`;function X(e,t=e=>e){return{regex:e,deser:([e])=>t(We(e))}}var Cr=`[ \xA0]`,wr=new RegExp(Cr,`g`);function Tr(e){return e.replace(/\./g,`\\.?`).replace(wr,Cr)}function Er(e){return e.replace(/\./g,``).replace(wr,` `).toLowerCase()}function Z(e,t){return e===null?null:{regex:RegExp(e.map(Tr).join(`|`)),deser:([n])=>e.findIndex(e=>Er(n)===Er(e))+t}}function Dr(e,t){return{regex:e,deser:([,e,t])=>Ft(e,t),groups:t}}function Or(e){return{regex:e,deser:([e])=>e}}function kr(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,`\\$&`)}function Ar(e,t){let n=M(t),r=M(t,`{2}`),i=M(t,`{3}`),a=M(t,`{4}`),o=M(t,`{6}`),s=M(t,`{1,2}`),c=M(t,`{1,3}`),l=M(t,`{1,6}`),u=M(t,`{1,9}`),d=M(t,`{2,4}`),f=M(t,`{4,6}`),p=e=>({regex:RegExp(kr(e.val)),deser:([e])=>e,literal:!0}),m=(m=>{if(e.literal)return p(m);switch(m.val){case`G`:return Z(t.eras(`short`),0);case`GG`:return Z(t.eras(`long`),0);case`y`:return X(l);case`yy`:return X(d,Nt);case`yyyy`:return X(a);case`yyyyy`:return X(f);case`yyyyyy`:return X(o);case`M`:return X(s);case`MM`:return X(r);case`MMM`:return Z(t.months(`short`,!0),1);case`MMMM`:return Z(t.months(`long`,!0),1);case`L`:return X(s);case`LL`:return X(r);case`LLL`:return Z(t.months(`short`,!1),1);case`LLLL`:return Z(t.months(`long`,!1),1);case`d`:return X(s);case`dd`:return X(r);case`o`:return X(c);case`ooo`:return X(i);case`HH`:return X(r);case`H`:return X(s);case`hh`:return X(r);case`h`:return X(s);case`mm`:return X(r);case`m`:return X(s);case`q`:return X(s);case`qq`:return X(r);case`s`:return X(s);case`ss`:return X(r);case`S`:return X(c);case`SSS`:return X(i);case`u`:return Or(u);case`uu`:return Or(s);case`uuu`:return X(n);case`a`:return Z(t.meridiems(),0);case`kkkk`:return X(a);case`kk`:return X(d,Nt);case`W`:return X(s);case`WW`:return X(r);case`E`:case`c`:return X(n);case`EEE`:return Z(t.weekdays(`short`,!1),1);case`EEEE`:return Z(t.weekdays(`long`,!1),1);case`ccc`:return Z(t.weekdays(`short`,!0),1);case`cccc`:return Z(t.weekdays(`long`,!0),1);case`Z`:case`ZZ`:return Dr(RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case`ZZZ`:return Dr(RegExp(`([+-]${s.source})(${r.source})?`),2);case`z`:return Or(/[a-z_+-/]{1,256}?/i);case` `:return Or(/[^\S\n\r]/);default:return p(m)}})(e)||{invalidReason:Sr};return m.token=e,m}var jr={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 Mr(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=jr[o];if(typeof s==`object`&&(s=s[a]),s)return{literal:!1,val:s}}function Nr(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,``)}$`,e]}function Pr(e,t,n){let r=e.match(t);if(r){let e={},t=1;for(let i in n)if(R(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 Fr(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 I(e.z)||(n=O.create(e.z)),I(e.Z)||(n||=new A(e.Z),r=e.Z),I(e.q)||(e.M=(e.q-1)*3+1),I(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),I(e.u)||(e.S=Et(e.u)),[Object.keys(e).reduce((n,r)=>{let i=t(r);return i&&(n[i]=e[r]),n},{}),n,r]}var Ir=null;function Lr(){return Ir||=$.fromMillis(1555555555555),Ir}function Rr(e,t){if(e.literal)return e;let n=Ur(W.macroTokenToFormatOpts(e.val),t);return n==null||n.includes(void 0)?e:n}function zr(e,t){return Array.prototype.concat(...e.map(e=>Rr(e,t)))}var Br=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=zr(W.parseFormat(t),e),this.units=this.tokens.map(t=>Ar(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){let[e,t]=Nr(this.units);this.regex=RegExp(e,`i`),this.handlers=t}}explainFromTokens(e){if(this.isValid){let[t,n]=Pr(e,this.regex,this.handlers),[r,i,o]=n?Fr(n):[null,null,void 0];if(R(n,`a`)&&R(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 Vr(e,t,n){return new Br(e,n).explainFromTokens(t)}function Hr(e,t,n){let{result:r,zone:i,specificOffset:a,invalidReason:o}=Vr(e,t,n);return[r,i,a,o]}function Ur(e,t){if(!e)return null;let n=W.create(t,e).dtFormatter(Lr()),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>Mr(t,e,i))}var Wr=`Invalid DateTime`,Gr=864e13;function Kr(e){return new P(`unsupported zone`,`the zone "${e.name}" is not supported`)}function qr(e){return e.weekData===null&&(e.weekData=st(e.c)),e.weekData}function Jr(e){return e.localWeekData===null&&(e.localWeekData=st(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Q(e,t){let n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new $({...n,...t,old:n})}function Yr(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 Xr(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 Zr(e,t,n){return Yr(At(e),t,n)}function Qr(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,kt(r,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=Y.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]=Yr(At(a),n,e.zone);return o!==0&&(s+=o,c=e.zone.offset(s)),{ts:s,o:c}}function $r(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=$.fromObject(e,{...n,zone:r,specificOffset:a});return o?i:i.setZone(s)}else return $.invalid(new P(`unparsable`,`the input "${i}" can't be parsed as ${r}`))}function ei(e,t,n=!0){return e.isValid?W.create(k.create(`en-US`),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ti(e,t,n){let r=e.c.year>9999||e.c.year<0,i=``;if(r&&e.c.year>=0&&(i+=`+`),i+=B(e.c.year,r?6:4),n===`year`)return i;if(t){if(i+=`-`,i+=B(e.c.month),n===`month`)return i;i+=`-`}else if(i+=B(e.c.month),n===`month`)return i;return i+=B(e.c.day),i}function ni(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+=B(e.c.hour),o===`hour`)break;if(t){if(c+=`:`,c+=B(e.c.minute),o===`minute`)break;s&&(c+=`:`,c+=B(e.c.second))}else{if(c+=B(e.c.minute),o===`minute`)break;s&&(c+=B(e.c.second))}if(o===`second`)break;s&&(!r||e.c.millisecond!==0)&&(c+=`.`,c+=B(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&e.offset===0&&!a?c+=`Z`:e.o<0?(c+=`-`,c+=B(Math.trunc(-e.o/60)),c+=`:`,c+=B(Math.trunc(-e.o%60))):(c+=`+`,c+=B(Math.trunc(e.o/60)),c+=`:`,c+=B(Math.trunc(e.o%60)))),a&&(c+=`[`+e.zone.ianaName+`]`),c}var ri={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ii={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ai={ordinal:1,hour:0,minute:0,second:0,millisecond:0},oi=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],si=[`weekYear`,`weekNumber`,`weekday`,`hour`,`minute`,`second`,`millisecond`],ci=[`year`,`ordinal`,`hour`,`minute`,`second`,`millisecond`];function li(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 ui(e){switch(e.toLowerCase()){case`localweekday`:case`localweekdays`:return`localWeekday`;case`localweeknumber`:case`localweeknumbers`:return`localWeekNumber`;case`localweekyear`:case`localweekyears`:return`localWeekYear`;default:return li(e)}}function di(e){if(hi===void 0&&(hi=N.now()),e.type!==`iana`)return e.offset(hi);let t=e.name,n=gi.get(t);return n===void 0&&(n=e.offset(hi),gi.set(t,n)),n}function fi(e,t){let n=j(t.zone,N.defaultZone);if(!n.isValid)return $.invalid(Kr(n));let r=k.fromObject(t),i,a;if(I(e.year))i=N.now();else{for(let t of oi)I(e[t])&&(e[t]=ri[t]);let t=mt(e)||ht(e);if(t)return $.invalid(t);let r=di(n);[i,a]=Zr(e,r,n)}return new $({ts:i,zone:n,loc:r,o:a})}function pi(e,t,n){let r=I(n.round)?!0:n.round,i=I(n.rounding)?`trunc`:n.rounding,a=(e,a)=>(e=Dt(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 mi(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 hi,gi=new Map,$=class e{constructor(e){let t=e.zone||N.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new P(`invalid input`):null)||(t.isValid?null:Kr(t));this.ts=I(e.ts)?N.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=L(e.o)&&!e.old?e.o:t.offset(this.ts);r=Xr(this.ts,a),n=Number.isNaN(r.year)?new P(`invalid input`):null,r=n?null:r,i=n?null:a}this._zone=t,this.loc=e.loc||k.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]=mi(arguments),[n,r,i,a,o,s,c]=t;return fi({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static utc(){let[e,t]=mi(arguments),[n,r,i,a,o,s,c]=t;return e.zone=A.utcInstance,fi({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static fromJSDate(t,n={}){let r=vt(t)?t.valueOf():NaN;if(Number.isNaN(r))return e.invalid(`invalid input`);let i=j(n.zone,N.defaultZone);return i.isValid?new e({ts:r,zone:i,loc:k.fromObject(n)}):e.invalid(Kr(i))}static fromMillis(t,n={}){if(!L(t))throw new s(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`);return t<-864e13||t>Gr?e.invalid(`Timestamp out of range`):new e({ts:t,zone:j(n.zone,N.defaultZone),loc:k.fromObject(n)})}static fromSeconds(t,n={}){if(L(t))return new e({ts:t*1e3,zone:j(n.zone,N.defaultZone),loc:k.fromObject(n)});throw new s(`fromSeconds requires a numerical input`)}static fromObject(t,n={}){t||={};let r=j(n.zone,N.defaultZone);if(!r.isValid)return e.invalid(Kr(r));let i=k.fromObject(n),o=Lt(t,ui),{minDaysInFirstWeek:s,startOfWeek:c}=dt(o,i),l=N.now(),u=I(n.specificOffset)?r.offset(l):n.specificOffset,d=!I(o.ordinal),f=!I(o.year),p=!I(o.month)||!I(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=Xr(l,u);g?(_=si,v=ii,y=st(y,s,c)):d?(_=ci,v=ai,y=lt(y)):(_=oi,v=ri);let b=!1;for(let e of _){let t=o[e];I(t)?b?o[e]=v[e]:o[e]=y[e]:b=!0}let x=(g?ft(o,s,c):d?pt(o):mt(o))||ht(o);if(x)return e.invalid(x);let[ee,te]=Zr(g?ct(o,s,c):d?ut(o):o,u,r),S=new e({ts:ee,zone:r,o:te,loc:i});return o.weekday&&m&&t.weekday!==S.weekday?e.invalid(`mismatched weekday`,`you can't specify both a weekday of ${o.weekday} and a date of ${S.toISO()}`):S.isValid?S:e.invalid(S.invalid)}static fromISO(e,t={}){let[n,r]=Xn(e);return $r(n,r,t,`ISO 8601`,e)}static fromRFC2822(e,t={}){let[n,r]=Zn(e);return $r(n,r,t,`RFC 2822`,e)}static fromHTTP(e,t={}){let[n,r]=Qn(e);return $r(n,r,t,`HTTP`,t)}static fromFormat(t,n,r={}){if(I(t)||I(n))throw new s(`fromFormat requires an input string and a format`);let{locale:i=null,numberingSystem:a=null}=r,[o,c,l,u]=Hr(k.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),t,n);return u?e.invalid(u):$r(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]=ar(e);return $r(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 P?t:new P(t,r);if(N.throwOnInvalid)throw new n(i);return new e({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=Ur(e,k.fromObject(t));return n?n.map(e=>e?e.val:null).join(``):null}static expandFormat(e,t={}){return zr(W.parseFormat(e),k.fromObject(t)).map(e=>e.val).join(``)}static resetCache(){hi=void 0,gi.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?qr(this).weekYear:NaN}get weekNumber(){return this.isValid?qr(this).weekNumber:NaN}get weekday(){return this.isValid?qr(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Jr(this).weekday:NaN}get localWeekNumber(){return this.isValid?Jr(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Jr(this).weekYear:NaN}get ordinal(){return this.isValid?lt(this.c).ordinal:NaN}get monthShort(){return this.isValid?vr.months(`short`,{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?vr.months(`long`,{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?vr.weekdays(`short`,{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?vr.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=At(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=Xr(s,a),u=Xr(c,o);return l.hour===u.hour&&l.minute===u.minute&&l.second===u.second&&l.millisecond===u.millisecond?[Q(this,{ts:s}),Q(this,{ts:c})]:[this]}get isInLeapYear(){return Ot(this.year)}get daysInMonth(){return kt(this.year,this.month)}get daysInYear(){return this.isValid?U(this.year):NaN}get weeksInWeekYear(){return this.isValid?Mt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Mt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:r}=W.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(A.instance(e),t)}toLocal(){return this.setZone(N.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=j(t,N.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]=Zr(r,n,t)}return Q(this,{ts:e,zone:t})}else return e.invalid(Kr(t))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let r=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return Q(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=Lt(e,ui),{minDaysInFirstWeek:n,startOfWeek:r}=dt(t,this.loc),i=!I(t.weekYear)||!I(t.weekNumber)||!I(t.weekday),o=!I(t.ordinal),s=!I(t.year),c=!I(t.month)||!I(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=ct({...st(this.c,n,r),...t},n,r):I(t.ordinal)?(d={...this.toObject(),...t},I(t.day)&&(d.day=Math.min(kt(d.year,d.month),d.day))):d=ut({...lt(this.c),...t});let[f,p]=Zr(d,this.o,this.zone);return Q(this,{ts:f,o:p})}plus(e){if(!this.isValid)return this;let t=Y.fromDurationLike(e);return Q(this,Qr(this,t))}minus(e){if(!this.isValid)return this;let t=Y.fromDurationLike(e).negate();return Q(this,Qr(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},r=Y.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?W.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Wr}toLocaleString(e=f,t={}){return this.isValid?W.create(this.loc.clone(t),e).formatDateTime(this):Wr}toLocaleParts(e={}){return this.isValid?W.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=li(a);let o=e===`extended`,s=ti(this,o,a);return oi.indexOf(a)>=3&&(s+=`T`),s+=ni(this,o,t,n,r,i,a),s}toISODate({format:e=`extended`,precision:t=`day`}={}){return this.isValid?ti(this,e===`extended`,li(t)):null}toISOWeekDate(){return ei(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=li(o),(r&&oi.indexOf(o)>=3?`T`:``)+ni(this,a===`extended`,t,e,n,i,o)):null}toRFC2822(){return ei(this,`EEE, dd LLL yyyy HH:mm:ss ZZZ`,!1)}toHTTP(){return ei(this.toUTC(),`EEE, dd LLL yyyy HH:mm:ss 'GMT'`)}toSQLDate(){return this.isValid?ti(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`)),ei(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Wr}[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 Y.invalid(`created by diffing an invalid DateTime`);let r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=xt(t).map(Y.normalizeUnit),a=e.valueOf()>this.valueOf(),o=xr(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?_r.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),pi(n,this.plus(r),{...t,numeric:`always`,units:i,unit:a})}toRelativeCalendar(t={}){return this.isValid?pi(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 Vr(k.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 Br(k.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),e)}static fromFormatParser(t,n,r={}){if(I(t)||I(n))throw new s(`fromFormatParser requires an input string and a format parser`);let{locale:i=null,numberingSystem:a=null}=r,o=k.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):$r(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 ee}static get TIME_24_WITH_SHORT_OFFSET(){return te}static get TIME_24_WITH_LONG_OFFSET(){return S}static get DATETIME_SHORT(){return ne}static get DATETIME_SHORT_WITH_SECONDS(){return re}static get DATETIME_MED(){return ie}static get DATETIME_MED_WITH_SECONDS(){return ae}static get DATETIME_MED_WITH_WEEKDAY(){return oe}static get DATETIME_FULL(){return C}static get DATETIME_FULL_WITH_SECONDS(){return w}static get DATETIME_HUGE(){return T}static get DATETIME_HUGE_WITH_SECONDS(){return E}};function _i(e){if($.isDateTime(e))return e;if(e&&e.valueOf&&L(e.valueOf()))return $.fromJSDate(e);if(e&&typeof e==`object`)return $.fromObject(e);throw new s(`Unknown datetime argument: ${e}, of type ${typeof e}`)}e.DateTime=$,e.Duration=Y,e.FixedOffsetZone=A,e.IANAZone=O,e.Info=vr,e.Interval=_r,e.InvalidZone=Be,e.Settings=N,e.SystemZone=ce,e.VERSION=`3.7.2`,e.Zone=D})),i=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDate=e.DAYS_IN_MONTH=e.DateMathOp=e.TimeUnit=void 0;var t=r(),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 i;(function(e){e.Add=`Add`,e.Subtract=`Subtract`})(i||(e.DateMathOp=i={})),e.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var a=class r{#e;#t=null;#n=null;#r=null;constructor(e,n){let i={zone:n};if(e?e instanceof r?(this.#e=e.#e,this.#t=e.#t,this.#n=e.#n,this.#r=e.#r):e instanceof Date?this.#e=t.DateTime.fromJSDate(e,i):typeof e==`number`?this.#e=t.DateTime.fromMillis(e,i):(this.#e=t.DateTime.fromISO(e,i),this.#e.isValid||(this.#e=t.DateTime.fromRFC2822(e,i)),this.#e.isValid||(this.#e=t.DateTime.fromSQL(e,i)),this.#e.isValid||(this.#e=t.DateTime.fromFormat(e,`EEE, d MMM yyyy HH:mm:ss`,i))):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}get dstStartLandingHour(){return this.#n}clearDstStart(){this.#t=null,this.#n=null}get dstEnd(){return this.#r}set dstEnd(e){this.#r=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){switch(e){case n.Year:return this.addYear();case n.Month:return this.addMonth();case n.Day:return this.addDay();case n.Hour:return this.addHour();case n.Minute:return this.addMinute();case n.Second:return this.addSecond()}}subtractUnit(e){switch(e){case n.Year:return this.subtractYear();case n.Month:return this.subtractMonth();case n.Day:return this.subtractDay();case n.Hour:return this.subtractHour();case n.Minute:return this.subtractMinute();case n.Second:return this.subtractSecond()}}invokeDateOperation(e,t){if(e===i.Add){this.addUnit(t);return}if(e===i.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 i=r.#i(this.#e.year);return t===e.DAYS_IN_MONTH[n-1]-+!i}return t===e.DAYS_IN_MONTH[n-1]}isLastWeekdayOfMonth(){let{day:t,month:n}=this.#e,i;return i=n===2?e.DAYS_IN_MONTH[n-1]-+!r.#i(this.#e.year):e.DAYS_IN_MONTH[n-1],t>i-7}applyDateOperation(e,t,r){if(t===n.Month||t===n.Day){this.invokeDateOperation(e,t);return}let a=this.getHours(),o=this.getUTCOffset();this.invokeDateOperation(e,t);let s=this.getHours(),c=(s-a+24)%24;e===i.Add&&this.getUTCOffset()>o&&c>=2?r!==24&&(this.#t=(a+1)%24,this.#n=s):c===0&&this.getMinutes()===0&&this.getSeconds()===0&&r!==24&&(this.dstEnd=s)}#a(){return this.#e.toUTC()}};e.CronDate=a,e.default=a})),a=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMonth=void 0;var t=i(),r=n(),a=1,o=12,s=Object.freeze([]);e.CronMonth=class extends r.CronField{static get min(){return a}static get max(){return o}static get chars(){return s}static get daysInMonth(){return t.DAYS_IN_MONTH}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),o=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfMonth=void 0;var t=n(),r=a(),i=1,o=31,s=Object.freeze([`L`]);e.CronDayOfMonth=class e extends t.CronField{static fromMonth(t,n,i){if(t.length!==1)return new e(n,i);let a=r.CronMonth.daysInMonth[t[0]-1],o=n.filter(e=>typeof e!=`number`||e<=a);return new e(o.length>0?o:n,i)}static get min(){return i}static get max(){return o}static get chars(){return s}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}}})),s=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfWeek=void 0;var t=n(),r=0,i=7,a=Object.freeze([`L`]);e.CronDayOfWeek=class extends t.CronField{static get min(){return r}static get max(){return i}static get chars(){return a}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){if(super(e,t),this.validate(),this.values.some(e=>e===`L`))throw Error(`${this.constructor.name} Validation error, unexpected standalone L`)}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}}})),c=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronHour=void 0;var t=n(),r=0,i=23,a=Object.freeze([]);e.CronHour=class extends t.CronField{static get min(){return r}static get max(){return i}static get chars(){return a}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),l=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMinute=void 0;var t=n(),r=0,i=59,a=Object.freeze([]);e.CronMinute=class extends t.CronField{static get min(){return r}static get max(){return i}static get chars(){return a}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),u=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronSecond=void 0;var t=n(),r=0,i=59,a=Object.freeze([]);e.CronSecond=class extends t.CronField{static get min(){return r}static get max(){return i}static get chars(){return a}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),d=e((e=>{var r=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]})),i=e&&e.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&r(t,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(t(),e),i(o(),e),i(s(),e),i(n(),e),i(c(),e),i(l(),e),i(a(),e),i(u(),e)})),f=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronFieldCollection=void 0;var t=d();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&&o.isWildcard&&!(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,n,r){let i=n.step;return i?i===1&&n.start===e.min&&n.end&&n.end>=r?(e instanceof t.CronDayOfMonth||e instanceof t.CronDayOfWeek)&&!e.isWildcard?null:e.hasQuestionMarkChar?`?`:`*`:i!==1&&n.start===e.min&&n.end&&n.end>=r-i+1?`*/${i}`:null:null}static#s(e){let t=e.step;if(t===1)return`${e.start}-${e.end}`;let n=e.start===0?e.count-1:e.count;if(!t)throw Error(`Unexpected range step`);if(!e.end)throw Error(`Unexpected range end`);if(t*n>e.end){let n=(n,r)=>{if(typeof e.start!=`number`)throw Error(`Unexpected range start`);return r%t===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,n).filter(e=>e!==null).join(`,`)}return`${e.start}-${e.end}/${t}`}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(r=>{let i=r.count===1?r.start.toString():e.#s(r);return n instanceof t.CronDayOfWeek&&n.nthDay>0?`${i}#${n.nthDay}`:i}).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()}}}})),p=e((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=i();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){if(!t.isLastWeekdayOfMonth())return!1;let n=t.getDay();return e.some(e=>n===parseInt(e.toString().charAt(0),10)%7)}static#m(e,t){return e<=0||Math.ceil(t.getDate()/7)===e}next(){return this.#v()}prev(){return this.#v(!0)}hasNext(){let e=this.#n;try{return this.#v(),!0}catch{return!1}finally{this.#n=e}}hasPrev(){let e=this.#n;try{return this.#v(!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,this.#t)}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.#h(o))}toString(){return this.#e.expression||this.stringify(!0)}#h(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=this.#a.dayOfWeek.nthDay,c=r.#c(e.getDay(),this.#a.dayOfWeek.values)&&r.#m(s,e)||this.#a.dayOfWeek.hasLastChar&&r.#p(this.#a.dayOfWeek.values,e);return!!(n&&a&&(o||c)||o&&!a||t&&!i&&c)}#g(e,n,i){let a=this.#a.hour.values,o=a,s=e.getHours(),c=r.#c(s,a),l=e.dstEnd===s;if(e.dstStart!==null&&e.dstStartLandingHour===s){for(let t=e.dstStart;t!==s;t=(t+1)%24)if(r.#c(t,a))return!0}if(l&&!i)return e.dstEnd=null,e.applyDateOperation(t.DateMathOp.Add,t.TimeUnit.Hour,o.length),!1;if(c)return!0;e.clearDstStart();let u=this.#a.hour.findNearestValue(s,i);if(u===null)return e.applyDateOperation(n,t.TimeUnit.Day,o.length),!1;if(this.#u(e)){let r=i?s-u:u-s;for(let a=0;a<r&&(e.applyDateOperation(n,t.TimeUnit.Hour,o.length),!(!i&&e.getHours()>=u||i&&e.getHours()<=u));a++);}else e.setHours(u);return e.setMinutes(this.#l(this.#a.minute.values,i)),e.setSeconds(this.#l(this.#a.second.values,i)),!1}#_(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)}#v(i=!1){let a=i?t.DateMathOp.Subtract:t.DateMathOp.Add,o=new t.CronDate(this.#n),s=o.getTime();o.getMilliseconds()>0&&(o.setMilliseconds(0),i||o.applyDateOperation(t.DateMathOp.Add,t.TimeUnit.Second,this.#a.hour.values.length));let c=0;for(;++c<n;){if(this.#_(o),!this.#h(o)){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.#g(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()){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 this.#n=o,o}[Symbol.iterator](){return{next:()=>{try{return{value:this.#v(),done:!1}}catch{return{value:void 0,done:!0}}}}}};e.CronExpression=r,e.default=r})),m=e((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))}})),h=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpressionParser=e.DayOfWeek=e.Months=e.CronUnit=e.PredefinedExpressions=void 0;var t=f(),n=p(),r=m(),i=d(),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={}));var l=256,u=1024;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,l),m=e.#t(o.Minute,f.minute,i.CronMinute.constraints,d,l),h=e.#t(o.Hour,f.hour,i.CronHour.constraints,d,l),g=e.#t(o.Month,f.month,i.CronMonth.constraints,d,l),_=e.#t(o.DayOfMonth,f.dayOfMonth,i.CronDayOfMonth.constraints,d,l),{dayOfWeek:v,nthDayOfWeek:y}=e.#h(f.dayOfWeek),b=e.#t(o.DayOfWeek,v,i.CronDayOfWeek.constraints,d,l),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:i.CronDayOfMonth.fromMonth(g,_,{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`);if(e||=`0 * * * * *`,e.length>u)throw Error(`Invalid cron expression, too long, expected at most ${u} characters`);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(0,r.length-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,i){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,e,i),this.#l(e,t,n)}static#n(e,t){return e.replace(/[*?]/g,t.min+`-`+t.max)}static#r(t,n,r,i,a){let o=r(),s=0;return t.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(t,r,c,l)=>{if(r&&c&&l){let t=parseInt(r,10),u=parseInt(c,10),d=parseInt(l,10);if(d<=0)throw Error(`Invalid step: ${d}, must be positive`);let f=e.#o(t,u,n,i,a);return s+=Math.ceil((f.max-f.min+1)/d),e.#c(i,s),e.#s(o,f.min,f.max,d,i,a)}else if(r&&c){let t=parseInt(r,10),s=parseInt(c,10),l=e.#o(t,s,n,i,a);return String(e.#i(o,l.min,l.max))}else if(l){let t=parseInt(l,10);if(t<=0)throw Error(`Invalid step: ${t}, must be positive`);return s+=Math.ceil((n.max-n.min+1)/t),e.#c(i,s),e.#s(o,n.min,n.max,t,i,a)}else return String(e.#i(o,n.min,n.max))})}static#i(e,t,n){return Math.floor(e*(n-t+1))+t}static#a(e){return e.charAt(0).toLowerCase()+e.slice(1)}static#o(t,n,r,i,a){if(t>n)throw Error(`Invalid range: ${t}-${n}, min > max`);if(a&&(t<r.min||n>r.max))throw Error(`Invalid range: ${t}-${n}, outside the ${r.min}-${r.max} range of the ${e.#a(i)} field`);let o=Math.max(t,r.min),s=Math.min(n,r.max);if(o>s)throw Error(`Invalid range: ${t}-${n}, no usable value in the ${e.#a(i)} field`);return{min:o,max:s}}static#s(t,n,r,i,a,o){if(o&&i>r-n+1)throw Error(`Invalid step: ${i}, wider than the ${n}-${r} range of the ${e.#a(a)} field`);let s=Math.floor(t*i),c=[];for(let e=Math.floor(n/i)*i+s;e<=r;e+=i)e>=n&&c.push(e);return c.length===0?String(e.#i(t,n,r)):c.join(`,`)}static#c(e,t){if(t>l)throw Error(`Constraint error, too many values in ${e} field, expected at most ${l}`)}static#l(t,n,r){let i=[];function a(n,r){if(Array.isArray(n))i.push(...n);else if(e.#g(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)}}let s=n.split(`,`);for(let n of s){if(e.#c(t,i.length),!(n.length>0))throw Error(`Invalid list value format`);a(e.#u(t,n,r),r)}return i}static#u(t,n,r){let i=n.split(`/`);if(i.length>2)throw Error(`Invalid repeat: ${n}`);return i.length===2?(i[0].includes(`-`)||(i[0]=`${i[0]}-${r.max}`),e.#m(t,i[0],parseInt(i[1],10),r)):e.#m(t,n,1,r)}static#d(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#f(e){if(!(!isNaN(e)&&e>0))throw Error(`Constraint error, cannot repeat at every ${e} time.`)}static#p(e,t,n,r){let i=[];e===o.DayOfWeek&&n%7==0&&(n-t)%r===0&&i.push(0);for(let e=t;e<=n;e+=r)i.indexOf(e)===-1&&i.push(e);return i}static#m(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.#d(a,o,r),this.#f(n),this.#p(e,a,o,n)}static#h(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#g(e,t){return e.chars.some(e=>t.toString().includes(e))}}})),g=e(((e,t)=>{t.exports={}})),_=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=void 0;var t=h();e.CronFileParser=class e{static async parseFile(t){let{readFile:n}=g(),r=await n(t,`utf8`);return e.#e(r)}static parseFileSync(t){let{readFileSync:n}=g(),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 n=e.split(/\s+/);return{interval:t.CronExpressionParser.parse(n.slice(0,5).join(` `)),command:n.slice(5,n.length)}}}})),v=e((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=h(),a=i();Object.defineProperty(e,"CronDate",{enumerable:!0,get:function(){return a.CronDate}});var o=f();Object.defineProperty(e,"CronFieldCollection",{enumerable:!0,get:function(){return o.CronFieldCollection}});var s=p();Object.defineProperty(e,"CronExpression",{enumerable:!0,get:function(){return s.CronExpression}});var c=h();Object.defineProperty(e,"CronExpressionParser",{enumerable:!0,get:function(){return c.CronExpressionParser}});var l=_();Object.defineProperty(e,"CronFileParser",{enumerable:!0,get:function(){return l.CronFileParser}}),n(d(),e),e.default=r.CronExpressionParser})),y=v();function b(e){return Array.isArray(e)?e.filter(e=>typeof e==`number`).sort((e,t)=>e-t):[]}function x(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 ee(e,t,n){let r=new Date;return r.setHours(e,t,0,0),r.toLocaleTimeString(n,{hour:`numeric`,minute:`2-digit`})}function te(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 S(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 ne(e){return e.length===5&&e.every((e,t)=>e===t+1)}function re(e){if(e.length!==2)return!1;let t=[...e].toSorted((e,t)=>e-t);return t[0]===0&&t[1]===6}function ie(e,t,n,r){try{let i=y.CronExpressionParser.parse(e,{...r?.timezone?{tz:r.timezone}:{}}).fields,a=b(i.minute.values),o=b(i.hour.values),s=b(i.dayOfWeek.values),c=b(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=x(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=x(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?ee(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&&ne(s))return n.weekdaysAt.replace(`{{time}}`,l);if(l&&i.dayOfMonth.isWildcard&&i.month.isWildcard&&!i.dayOfWeek.isWildcard&&re(s))return n.weekendsAt.replace(`{{time}}`,l);if(l&&i.dayOfMonth.isWildcard&&i.month.isWildcard&&!i.dayOfWeek.isWildcard&&s.length===1){let e=te(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=S(s.map(e=>te(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 ae(e,t,n,r){let i=e.trim();return i?ie(i,t,n,r)||oe(r?.nextRun,t)||n.customSchedule:oe(r?.nextRun,t)||`—`}function oe(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 C=1e3,w=60*C,T=60*w,E=24*T,D=7*E,se=new Intl.ListFormat(`en-US`,{type:`conjunction`}),ce=Object.fromEntries([`second`,`minute`,`hour`,`day`,`week`].map(e=>[e,new Intl.NumberFormat(`en-US`,{style:`unit`,unit:e,unitDisplay:`long`})])),le={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`})},ue={en:new Intl.DateTimeFormat(`en-US`,{hour:`2-digit`,minute:`2-digit`}),zh:new Intl.DateTimeFormat(`zh-CN`,{hour:`2-digit`,minute:`2-digit`})},de={minute:w,hour:T,day:E,week:D};function fe(e){return e===`zh`?`zh-CN`:`en-US`}function pe(e,t,n){return n===`zh`?`${e} ${t===`week`?`周`:t===`day`?`天`:t===`hour`?`小时`:t===`minute`?`分钟`:`秒`}`:ce[String(t)].format(e)}function me(e,t){return t===`zh`?e.join(` `):se.format(e)}function O(e,t){let n=typeof e==`number`?e:Number.parseFloat(e);return Math.max(w,Math.round((Number.isFinite(n)&&n>0?n:1)*de[t]))}function he(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*de[t]/de[n]).toFixed(6)))}function ge(e,t){let n=Math.max(C,Math.round(e)),r=n===E?[{unit:`hour`,ms:T}]:n>=D&&n%D===0?[{unit:`week`,ms:D}]:n>=E?[{unit:`day`,ms:E},{unit:`hour`,ms:T},{unit:`minute`,ms:w},{unit:`second`,ms:C}]:n>=T?[{unit:`hour`,ms:T},{unit:`minute`,ms:w},{unit:`second`,ms:C}]:n>=w?[{unit:`minute`,ms:w},{unit:`second`,ms:C}]:[{unit:`second`,ms:C}],i=n,a=[];for(let{unit:e,ms:n}of r){let r=Math.floor(i/n);r<=0||(a.push(pe(r,e,t)),i%=n)}return me(a,t)}function _e(e,t){let n=ge(e,t);return t===`zh`?`每 ${n}运行一次`:`Runs every ${n}`}function ve(e,t){return le[t].format(new Date(e))}function ye(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())}function be(e,t,n=Date.now()){let r=new Date(e),i=Math.round((ye(r)-ye(new Date(n)))/E),a=ue[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}`:ve(e,t)}function xe(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===`session.transcript.updated`?t.trigger.sessionUpdatedWhen:t.trigger.eventWithType.replace(`{type}`,e.eventType)}function Se(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 xe(e,t);let i=e.schedule;return i.kind===`once`?t.trigger.onceAt.replace(`{time}`,be(Date.parse(i.at),r)):i.kind===`interval`?_e(i.everyMs,r):ae(i.expr,fe(r),n.scheduleBadge,{timezone:i.tz})}function Ce(e,t,n,r=Date.now()){return e.enabled?e.state.nextRunAtMs?be(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 we(e,t,n,r=Date.now()){if(!e.state.lastRunAtMs)return t.info.notRunYet;let i=be(e.state.lastRunAtMs,n,r),a=e.state.lastRunStatus;return a?`${i} · ${t.status[a]}`:i}function Te(e){return!e.enabled&&e.trigger.kind===`schedule`&&e.trigger.schedule.kind===`once`&&e.state.lastRunStatus===`succeeded`&&(e.state.lastRunAtMs??0)>=Date.parse(e.trigger.schedule.at)&&!e.state.runningRunId}export{he as a,_e as c,v as d,Se as i,be as l,we as n,ve as o,Ce as r,ge as s,O as t,Te as u};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i,u as a}from"./chunk-KS7C4IRE-CiwuuyV8.js";import{t as o}from"./messages-uXxg5p54.js";import{t as s}from"./calendar-clock-D-quYVPe.js";import{t as c}from"./check-DUBLcKHA.js";import{t as l}from"./chevron-down-ccbiQQz_.js";import{c as u,l as d,n as f,r as p,u as m}from"./popover-select-DD8fmrxH.js";import{t as h}from"./clock-3-DnrAnuyZ.js";import{t as g}from"./message-circle-Badhj-4D.js";import{t as _}from"./pencil-DmIY3Oa-.js";import{t as v}from"./x-B_N4OPjy.js";import{t as y}from"./cn-0WouolD0.js";import{i as ee,o as b}from"./vendor-swr-CdRzEUwF.js";import{t as x}from"./button-CnRSIP6m.js";import{t as S}from"./skeleton-BI5TyibZ.js";import{a as C,i as w,n as te,o as ne,r as re,s as T,t as ie}from"./dist-DfWfZ9iu.js";import{c as ae,s as oe}from"./dist-CaUuvp8-.js";import{t as E}from"./chat-agents-api-l80cvSac.js";import{n as se}from"./model-selector-ksLo-5B_.js";import{t as D}from"./automation-api-DtJfd1QM.js";import{d as ce,i as le,r as O,t as ue,u as k}from"./automation-display-BlGt8MAC.js";var de=n(),A=e(t(),1),j=r();function M({label:e,children:t}){let n=(0,A.useId)(),r,i=A.Children.map(t,(e,t)=>{if(!(0,A.isValidElement)(e)||e.type!==`input`&&e.type!==`textarea`&&e.type!==`select`&&e.type!==f)return e;let i=e,a=i.props.id??`${n}-${t}`;return r??=a,(0,A.cloneElement)(i,{id:a,...!i.props[`aria-label`]&&!i.props[`aria-labelledby`]?{"aria-labelledby":`${n}-label`}:{}})});return(0,j.jsxs)(`div`,{className:`grid gap-1.5`,role:`group`,"aria-labelledby":`${n}-label`,children:[r?(0,j.jsx)(`label`,{id:`${n}-label`,htmlFor:r,className:`text-xs font-medium text-fg-muted`,children:e}):(0,j.jsx)(`span`,{id:`${n}-label`,className:`text-xs font-medium text-fg-muted`,children:e}),i]})}var fe=Array.from({length:24},(e,t)=>t);function pe(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 N(){let e=new Date;return{hour:e.getHours(),minute:e.getMinutes()}}function P(e,t){return`${String(e).padStart(2,`0`)}:${String(t).padStart(2,`0`)}`}function F(e){let t=(0,de.c)(80),{value:n,onChange:r,disabled:i,allowEmpty:a,clearLabel:o,ariaLabel:s,ariaLabelledBy:l,className:f,triggerClassName:p,id:g,name:_,minuteStep:ee}=e,b=a!==void 0&&a,x=ee===void 0?1:ee,S=pe(n),C=S??N(),[w,te]=(0,A.useState)(!1),[ne,re]=(0,A.useState)(null),[T,ie]=(0,A.useState)(C.hour),[E,se]=(0,A.useState)(C.minute),D=(0,A.useRef)([]),ce=(0,A.useRef)([]),le=d(),O=u(ne),ue=m(le,O!==null),k=Math.max(1,Math.min(60,Math.round(x))),M=Array.from({length:Math.ceil(60/k)},(e,t)=>t*k).filter(me),F;t[0]===r?F=t[1]:(F=(e,t,n)=>{let i=n!==void 0&&n;ie(e),se(t),r(P(e,t)),i&&te(!1)},t[0]=r,t[1]=F);let L=F,R=I,z;t[2]===f?z=t[3]:(z=y(`relative min-w-0`,f),t[2]=f,t[3]=z);let B=ae,V;t[4]===n?V=t[5]:(V=e=>{if(e){let e=pe(n)??N();ie(e.hour),se(e.minute)}te(e)},t[4]=n,t[5]=V);let he=b&&n&&`pr-9`,ge=i&&`cursor-not-allowed opacity-50 hover:border-edge`,H;t[6]!==he||t[7]!==ge||t[8]!==p?(H=y(`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`,he,ge,p),t[6]=he,t[7]=ge,t[8]=p,t[9]=H):H=t[9];let _e;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,j.jsx)(h,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":`true`}),t[10]=_e):_e=t[10];let U=!S&&`text-fg-subtle`,W;t[11]===U?W=t[12]:(W=y(`tabular-nums`,U),t[11]=U,t[12]=W);let ve=S?P(S.hour,S.minute):`--:--`,G;t[13]!==W||t[14]!==ve?(G=(0,j.jsx)(`span`,{className:W,children:ve}),t[13]=W,t[14]=ve,t[15]=G):G=t[15];let K;t[16]!==s||t[17]!==l||t[18]!==i||t[19]!==g||t[20]!==G||t[21]!==H?(K=(0,j.jsx)(oe,{asChild:!0,children:(0,j.jsxs)(`button`,{ref:re,id:g,type:`button`,disabled:i,"aria-label":s,"aria-labelledby":l,"aria-haspopup":`listbox`,className:H,children:[_e,G]})}),t[16]=s,t[17]=l,t[18]=i,t[19]=g,t[20]=G,t[21]=H,t[22]=K):K=t[22];let ye=ae,q=O??void 0,be=ae,xe=y(ue,`w-[18rem] overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-popover outline-none`),Se=e=>{e.preventDefault(),requestAnimationFrame(()=>D.current[T]?.focus())},Ce;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,j.jsx)(h,{className:`size-3.5`,"aria-hidden":`true`}),t[23]=Ce):Ce=t[23];let we=s??`HH:mm`,J;t[24]===we?J=t[25]:(J=(0,j.jsxs)(`span`,{className:`flex items-center gap-2 text-xs font-medium text-fg-muted`,children:[Ce,we]}),t[24]=we,t[25]=J);let Y;t[26]!==T||t[27]!==E?(Y=P(T,E),t[26]=T,t[27]=E,t[28]=Y):Y=t[28];let X;t[29]===Y?X=t[30]:(X=(0,j.jsx)(`span`,{className:`font-mono text-base font-semibold tabular-nums text-fg`,children:Y}),t[29]=Y,t[30]=X);let Z;t[31]!==J||t[32]!==X?(Z=(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b border-edge-subtle bg-surface-inset px-3 py-2.5`,children:[J,X]}),t[31]=J,t[32]=X,t[33]=Z):Z=t[33];let Te;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,j.jsx)(`div`,{className:`px-1 pb-1.5 text-[11px] font-semibold tracking-wider text-fg-subtle`,children:`HH`}),t[34]=Te):Te=t[34];let Ee=`${s??`HH:mm`} HH`,De=fe.map((e,t)=>(0,j.jsx)(`button`,{ref:e=>{D.current[t]=e},type:`button`,role:`option`,"aria-selected":T===e,tabIndex:T===e?0:-1,className:y(`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:()=>L(e,E),onKeyDown:e=>R(e,fe,T,e=>L(e,E),D),children:String(e).padStart(2,`0`)},e)),Oe;t[35]!==Ee||t[36]!==De?(Oe=(0,j.jsxs)(`div`,{className:`pr-2`,children:[Te,(0,j.jsx)(`div`,{role:`listbox`,"aria-label":Ee,className:`grid max-h-56 grid-cols-3 gap-1 overflow-y-auto pr-1`,children:De})]}),t[35]=Ee,t[36]=De,t[37]=Oe):Oe=t[37];let Q;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,j.jsx)(`div`,{className:`px-1 pb-1.5 text-[11px] font-semibold tracking-wider text-fg-subtle`,children:`MM`}),t[38]=Q):Q=t[38];let ke=`${s??`HH:mm`} MM`,Ae=M.map((e,t)=>(0,j.jsxs)(`button`,{ref:e=>{ce.current[t]=e},type:`button`,role:`option`,"aria-selected":E===e,tabIndex:E===e?0:-1,className:y(`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`,E===e&&`bg-accent-soft font-semibold text-accent-fg`),onClick:()=>L(T,e,!0),onKeyDown:e=>R(e,M,E,e=>L(T,e),ce),children:[(0,j.jsx)(c,{className:y(`absolute left-0.5 size-3`,E!==e&&`invisible`),"aria-hidden":`true`}),String(e).padStart(2,`0`)]},e)),je;t[39]!==ke||t[40]!==Ae?(je=(0,j.jsx)(`div`,{role:`listbox`,"aria-label":ke,className:`grid max-h-56 grid-cols-3 gap-1 overflow-y-auto pr-1`,children:Ae}),t[39]=ke,t[40]=Ae,t[41]=je):je=t[41];let Me;t[42]!==Q||t[43]!==je?(Me=(0,j.jsxs)(`div`,{className:`pl-2`,children:[Q,je]}),t[42]=Q,t[43]=je,t[44]=Me):Me=t[44];let Ne;t[45]!==Oe||t[46]!==Me?(Ne=(0,j.jsxs)(`div`,{className:`grid grid-cols-2 divide-x divide-edge-subtle p-2`,children:[Oe,Me]}),t[45]=Oe,t[46]=Me,t[47]=Ne):Ne=t[47];let Pe;t[48]!==be.Content||t[49]!==xe||t[50]!==Se||t[51]!==Z||t[52]!==Ne?(Pe=(0,j.jsxs)(be.Content,{side:`bottom`,align:`start`,sideOffset:6,collisionPadding:12,className:xe,onOpenAutoFocus:Se,children:[Z,Ne]}),t[48]=be.Content,t[49]=xe,t[50]=Se,t[51]=Z,t[52]=Ne,t[53]=Pe):Pe=t[53];let Fe;t[54]!==ye.Portal||t[55]!==q||t[56]!==Pe?(Fe=(0,j.jsx)(ye.Portal,{container:q,children:Pe}),t[54]=ye.Portal,t[55]=q,t[56]=Pe,t[57]=Fe):Fe=t[57];let Ie;t[58]!==w||t[59]!==K||t[60]!==Fe||t[61]!==B.Root||t[62]!==V?(Ie=(0,j.jsxs)(B.Root,{open:w,onOpenChange:V,children:[K,Fe]}),t[58]=w,t[59]=K,t[60]=Fe,t[61]=B.Root,t[62]=V,t[63]=Ie):Ie=t[63];let Le;t[64]!==b||t[65]!==s||t[66]!==o||t[67]!==i||t[68]!==r||t[69]!==n?(Le=b&&n?(0,j.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,j.jsx)(v,{className:`size-3.5`,"aria-hidden":`true`})}):null,t[64]=b,t[65]=s,t[66]=o,t[67]=i,t[68]=r,t[69]=n,t[70]=Le):Le=t[70];let $;t[71]!==i||t[72]!==_||t[73]!==n?($=_?(0,j.jsx)(`input`,{type:`hidden`,name:_,value:n,disabled:i}):null,t[71]=i,t[72]=_,t[73]=n,t[74]=$):$=t[74];let Re;return t[75]!==z||t[76]!==Ie||t[77]!==Le||t[78]!==$?(Re=(0,j.jsxs)(`div`,{className:z,children:[Ie,Le,$]}),t[75]=z,t[76]=Ie,t[77]=Le,t[78]=$,t[79]=Re):Re=t[79],Re}function I(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 me(e){return e<60}async function L(e){let{conversationId:t}=await D.openConfiguration({automationId:e.automationId?.trim()||void 0,projectId:e.projectId?.trim()||void 0,...e.runId?{runId:e.runId}:{}}),n=new URLSearchParams(e.automationId?{automation:e.automationId.trim()}:{new:`1`,setupChat:t});return e.projectId?.trim()&&n.set(`projectId`,e.projectId.trim()),e.prompt?.trim()&&n.set(`chatDraft`,e.prompt.trim()),`/automations?${n.toString()}`}var R={name:``,description:``,projectId:``,triggerMode:`daily`,time:`09:00`,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||`UTC`,weekday:`1`,intervalValue:`1`,intervalUnit:`hour`,cronExpr:`0 9 * * *`,webhookSecretId:``,onceAt:``,eventType:``,eventSource:``,eventPayloadMatch:``,actionMode:`agent`,agentId:``,model:``,instruction:``,taskId:``,browserAutomationId:``,browserAutomationInputs:{},safetyMode:`suggest_only`,timeoutSeconds:`1800`,conversationMode:`new_session`,notificationPolicy:`attention`,resultWebhookEndpoint:``,resultWebhookSecretId:``,disableAfterFailures:`3`},z=[{value:`15`,unit:`minute`},{value:`30`,unit:`minute`},{value:`1`,unit:`hour`},{value:`6`,unit:`hour`},{value:`24`,unit:`hour`}];function B(e){let[t,n]=e.time.split(`:`),r=Number.parseInt(t||`9`,10),i=Number.parseInt(n||`0`,10),a;if(e.triggerMode===`manual`)a={kind:`manual`};else if(e.triggerMode===`once`)a={kind:`schedule`,schedule:{kind:`once`,at:new Date(e.onceAt).toISOString()}};else if(e.triggerMode===`webhook`)a={kind:`webhook`,...e.webhookSecretId.trim()?{secretId:e.webhookSecretId.trim()}:{}};else if(e.triggerMode===`taskBlocked`)a={kind:`event`,eventType:`task.attention_required.v2`,source:`tasks`,payloadMatch:{reason:`blocked`}};else if(e.triggerMode===`noteCreated`)a={kind:`event`,eventType:`note.created`,source:`notes`};else if(e.triggerMode===`sessionUpdated`)a={kind:`event`,eventType:`session.transcript.updated`,source:`sessions`};else if(e.triggerMode===`event`){let t=e.eventPayloadMatch.trim()?JSON.parse(e.eventPayloadMatch):void 0;a={kind:`event`,eventType:e.eventType.trim(),...e.eventSource.trim()?{source:e.eventSource.trim()}:{},...t?{payloadMatch:t}:{}}}else a=e.triggerMode===`interval`?{kind:`schedule`,schedule:{kind:`interval`,everyMs:ue(e.intervalValue,e.intervalUnit)}}:e.triggerMode===`weekly`?{kind:`schedule`,schedule:{kind:`cron`,...e.timezone?.trim()?{tz:e.timezone.trim()}:{},expr:`${i} ${r} * * ${e.weekday}`}}:e.triggerMode===`cron`?{kind:`schedule`,schedule:{kind:`cron`,...e.timezone?.trim()?{tz:e.timezone.trim()}:{},expr:e.cronExpr.trim()}}:{kind:`schedule`,schedule:{kind:`cron`,...e.timezone?.trim()?{tz:e.timezone.trim()}:{},expr:`${i} ${r} * * *`}};let o=e.actionMode===`browser_automation`||e.actionMode===`task_command`?`auto_apply`:e.safetyMode,s;return s=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:a,action:s,safety:{mode:o},conversationMode:e.conversationMode,delivery:{notificationPolicy:e.notificationPolicy,destinations:[{key:`gateway_event`,kind:`gateway_event`},...e.resultWebhookEndpoint.trim()&&e.resultWebhookSecretId.trim()?[{key:`result_webhook`,kind:`webhook`,endpoint:e.resultWebhookEndpoint.trim(),secretId:e.resultWebhookSecretId.trim()}]:[]]},reliability:{executionTimeoutSeconds:Math.max(1,Number.parseInt(e.timeoutSeconds,10)||1800),disableAfterConsecutiveFailures:Math.max(1,Number.parseInt(e.disableAfterFailures,10)||3)}}}function V(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:R.time,weekday:R.weekday,cronExpr:e}}function he(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 ge(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 H(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===`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 _e(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 U(e){let t={triggerMode:`manual`};if(e.trigger.kind===`webhook`)t={triggerMode:`webhook`,webhookSecretId:e.trigger.secretId??``};else if(e.trigger.kind===`event`)t=H(e.trigger);else if(e.trigger.kind===`schedule`){let n=e.trigger.schedule;n.kind===`cron`&&(t={...V(n.expr),timezone:n.tz??``}),n.kind===`interval`&&(t={triggerMode:`interval`,...he(n.everyMs)}),n.kind===`once`&&(t={triggerMode:`once`,onceAt:ge(n.at)})}let n=e.action,r=e.reliability?.executionTimeoutSeconds??(`timeoutSeconds`in n?n.timeoutSeconds:void 0)??(n.kind===`browser_automation`?600:1800);return{...R,...t,name:e.name,description:e.description??``,projectId:e.projectId??``,actionMode:n.kind===`system`?`agent`:n.kind,agentId:n.kind===`agent`?n.agentId??``:n.kind===`task_command`&&n.command.type===`start`&&n.command.executor.kind===`agent`?n.command.executor.agentId:``,model:n.kind===`agent`?n.model??``:``,instruction:n.kind===`agent`?n.instruction:``,taskId:n.kind===`task_command`?n.taskId:``,browserAutomationId:n.kind===`browser_automation`?n.automationId:``,browserAutomationInputs:n.kind===`browser_automation`?n.inputs??{}:{},safetyMode:e.safety?.mode??`auto_apply`,timeoutSeconds:String(r),conversationMode:e.conversationMode??`new_session`,notificationPolicy:e.delivery.notificationPolicy,resultWebhookEndpoint:e.delivery.destinations.find(e=>e.kind===`webhook`)?.endpoint??``,resultWebhookSecretId:e.delivery.destinations.find(e=>e.kind===`webhook`)?.secretId??``,disableAfterFailures:String(e.reliability?.disableAfterConsecutiveFailures??3)}}function W(e,t){let n=B(t),r=e.trigger.kind===`schedule`&&n.trigger.kind===`schedule`&&e.trigger.schedule.kind===n.trigger.schedule.kind?{...n.trigger,schedule:{...e.trigger.schedule,...n.trigger.schedule}}:n.trigger,i=n.action;e.action.kind===`agent`&&n.action.kind===`agent`?i={...e.action,...n.action,agentId:n.action.agentId,model:n.action.model}:e.action.kind===`browser_automation`&&n.action.kind===`browser_automation`?i={...e.action,...n.action}:e.action.kind===`task_command`&&n.action.kind===`task_command`&&(i=n.action);let a=e.delivery.destinations.filter(e=>e.kind===`gateway_event`),o=e.delivery.destinations.filter(e=>e.kind===`webhook`);return{...n,description:t.description.trim(),projectId:t.projectId.trim(),delivery:{notificationPolicy:t.notificationPolicy,destinations:[...a.length>0?a:[{key:`gateway_event`,kind:`gateway_event`}],...e.delivery.destinations.filter(e=>e.kind===`file`||e.kind===`card`),...o.slice(1),...t.resultWebhookEndpoint.trim()&&t.resultWebhookSecretId.trim()?[{key:o[0]?.key??`result_webhook`,kind:`webhook`,endpoint:t.resultWebhookEndpoint.trim(),secretId:t.resultWebhookSecretId.trim()}]:[]]},trigger:r,action:i,reliability:{...e.reliability,...n.reliability}}}var ve=ce();function G(e,t=new Date){let n=B(e);if(n.trigger.kind!==`schedule`||n.trigger.schedule.kind!==`cron`||!n.trigger.schedule.tz)return[];let r=ve.CronExpressionParser.parse(n.trigger.schedule.expr,{currentDate:t,tz:n.trigger.schedule.tz});return[new Date(r.next().getTime()).toISOString(),new Date(r.next().getTime()).toISOString(),new Date(r.next().getTime()).toISOString()]}function K(e){let t=(0,de.c)(35),{form:n,onChange:r,language:i}=e;if(![`daily`,`weekly`,`cron`,`once`].includes(n.triggerMode))return null;let a=i===`zh`;if(n.triggerMode===`once`){let e=a?`按当前浏览器时区输入,保存为绝对时间:`:`Entered in this browser timezone and stored as an absolute time: `,n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=Intl.DateTimeFormat().resolvedOptions(),t[0]=n):n=t[0];let r;return t[1]!==e||t[2]!==n.timeZone?(r=(0,j.jsxs)(`p`,{className:`text-xs text-fg-muted`,children:[e,n.timeZone]}),t[1]=e,t[2]=n.timeZone,t[3]=r):r=t[3],r}let o,s,c,l,u,d;if(t[4]!==n||t[5]!==r||t[6]!==a){let e=[],i=!1;try{e=G(n)}catch{i=!0}u=`rounded-lg bg-surface-base p-3`;let f=a?`时区与接下来的运行时间`:`Timezone and upcoming runs`,p=n.timezone?` · ${n.timezone}`:``;t[13]!==f||t[14]!==p?(d=(0,j.jsxs)(`summary`,{className:`cursor-pointer text-xs text-fg-muted focus-visible:outline-accent`,children:[f,p]}),t[13]=f,t[14]=p,t[15]=d):d=t[15],o=`mt-3 space-y-2`;let m=a?`时区`:`Timezone`,h=n.timezone??``,g;t[16]===r?g=t[17]:(g=e=>r({timezone:e.target.value}),t[16]=r,t[17]=g);let _;t[18]!==h||t[19]!==g?(_=(0,j.jsx)(`input`,{className:`rounded-lg border border-edge bg-surface-panel px-3 py-2 text-sm text-fg`,value:h,placeholder:`Asia/Shanghai`,onChange:g,"aria-invalid":i}),t[18]=h,t[19]=g,t[20]=_):_=t[20],t[21]!==_||t[22]!==m?(s=(0,j.jsx)(M,{label:m,children:_}),t[21]=_,t[22]=m,t[23]=s):s=t[23];let v=n.timezone?a?`按 ${n.timezone} 运行;下方显示执行时区时间与当前浏览器的当地时间。`:`Runs in ${n.timezone}; schedule-zone and browser-local times follow.`:a?`此规则未指定时区,沿用服务所在电脑的时区。指定时区后可预览;更改前请确认原定时间。`:`This legacy rule uses the service computer timezone. Specify a timezone to preview; confirm the intended schedule before changing it.`;t[24]===v?c=t[25]:(c=(0,j.jsx)(`p`,{className:`text-xs text-fg-muted`,children:v}),t[24]=v,t[25]=c),l=i?(0,j.jsx)(`p`,{role:`alert`,className:`text-xs text-danger`,children:a?`请检查时区和定时规则。`:`Check the timezone and schedule expression.`}):(0,j.jsx)(`ol`,{className:`space-y-1 text-xs text-fg-muted`,children:e.map(e=>(0,j.jsxs)(`li`,{children:[new Date(e).toLocaleString(a?`zh-CN`:`en-US`,{timeZone:n.timezone,timeZoneName:`short`}),` · `,a?`你这里:`:`Your local time: `,new Date(e).toLocaleString(a?`zh-CN`:`en-US`,{timeZoneName:`short`})]},e))}),t[4]=n,t[5]=r,t[6]=a,t[7]=o,t[8]=s,t[9]=c,t[10]=l,t[11]=u,t[12]=d}else o=t[7],s=t[8],c=t[9],l=t[10],u=t[11],d=t[12];let f;t[26]!==o||t[27]!==s||t[28]!==c||t[29]!==l?(f=(0,j.jsxs)(`div`,{className:o,children:[s,c,l]}),t[26]=o,t[27]=s,t[28]=c,t[29]=l,t[30]=f):f=t[30];let p;return t[31]!==u||t[32]!==d||t[33]!==f?(p=(0,j.jsxs)(`details`,{className:u,children:[d,f]}),t[31]=u,t[32]=d,t[33]=f,t[34]=p):p=t[34],p}async function ye(){await b(e=>typeof e==`string`?e.startsWith(`automation`):Array.isArray(e)&&typeof e[0]==`string`&&e[0].startsWith(`automation`))}var q=`w-full rounded-lg border border-edge bg-surface-base px-3 py-2 text-sm text-fg focus-visible:outline-accent`;function be({automation:e,projectId:t,language:n,onClose:r,onCreated:i}){let{data:a,error:s}=ee(`automation-chat-agents`,E),c=(0,A.useRef)(null),[u]=(0,A.useState)(()=>document.activeElement instanceof HTMLElement?document.activeElement:null),[d,m]=(0,A.useState)(e),[h,g]=(0,A.useState)(()=>e?U(e):{...R,projectId:t??``,safetyMode:`auto_apply`}),[_,y]=(0,A.useState)(h),[b,S]=(0,A.useState)(!1),[ae,oe]=(0,A.useState)(``),[ce,le]=(0,A.useState)(!1),O=n===`zh`,k=e=>y(t=>({...t,...e})),de=()=>{b||JSON.stringify(_)!==JSON.stringify(h)&&!window.confirm(O?`放弃尚未保存的修改?`:`Discard unsaved changes?`)||r()},fe=async()=>{S(!0),oe(``),le(!1);try{if(_.triggerMode===`once`&&(!_.onceAt||!Number.isFinite(new Date(_.onceAt).getTime())||new Date(_.onceAt).getTime()<=Date.now()))throw Error(O?`请选择未来的运行时间。`:`Choose a future run time.`);if(d&&d.action.kind!==`agent`)throw Error(O?`请在任务页编辑此类型任务。`:`Edit this task type on the task page.`);if([`daily`,`weekly`].includes(_.triggerMode)&&!/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(_.time))throw Error(O?`请选择有效的运行时间。`:`Choose a valid run time.`);if(_.triggerMode===`interval`&&ue(_.intervalValue,_.intervalUnit)<6e4)throw Error(O?`运行间隔至少为一分钟。`:`Use an interval of at least one minute.`);G(_);let e=_.name.trim()||_.instruction.trim().split(`
|
|
2
|
-
`)[0].slice(0,80),t=B({..._,name:e});if(d&&d.action.kind===`agent`)await D.update(d.id,{expectedRevision:d.updatedAtMs,name:e,action:{...d.action,instruction:_.instruction.trim(),agentId:_.agentId.trim()||void 0,model:_.model.trim()||void 0},trigger:t.trigger,conversationMode:_.conversationMode,delivery:{...d.delivery,notificationPolicy:_.notificationPolicy}});else{let e=await D.create({...t,enabled:!0});i?.(e.automation)}await ye(),r()}catch(e){le(e?.status===409),oe(e?.status===409?O?`任务已在其他地方更新,请核对最新设置后再保存。`:`This task changed elsewhere. Review the latest settings before saving.`:e instanceof Error?e.message:String(e))}finally{S(!1)}},pe=async()=>{if(!(!d||!window.confirm(O?`载入最新设置将替换当前未保存的修改,是否继续?`:`Loading the latest settings replaces your unsaved edits. Continue?`))){S(!0);try{let{automation:e}=await D.get(d.id),t=U(e);m(e),g(t),y(t),oe(``),le(!1)}catch{oe(O?`暂时无法载入最新设置,请重试。`:`Could not load the latest settings. Try again.`)}finally{S(!1)}}},N=_.timezone||(O?`默认时区`:`Default timezone`);try{N=O&&_.timezone===`Asia/Shanghai`?`中国时间`:new Intl.DateTimeFormat(O?`zh-CN`:`en-US`,{timeZone:N,timeZoneName:`shortGeneric`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value||N}catch{}let P=``;try{let e=G(_)[0];e&&_.timezone!==Intl.DateTimeFormat().resolvedOptions().timeZone&&(P=`${O?`你这里的下次时间:`:`Next run in your timezone: `}${new Date(e).toLocaleString(O?`zh-CN`:`en-US`,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,timeZoneName:`short`})}`)}catch{}let I=`flex min-h-12 items-center justify-between gap-4 border-b border-edge last:border-b-0`,me=`min-h-10 w-32 shrink-0 justify-end border-0 bg-transparent py-2 pl-3 pr-0 text-right text-sm text-fg-muted shadow-none`;return(0,j.jsx)(ie,{open:!0,onOpenChange:e=>{e||de()},children:(0,j.jsxs)(ne,{children:[(0,j.jsx)(C,{className:`fixed inset-0 z-65 bg-scrim`}),(0,j.jsxs)(re,{onCloseAutoFocus:e=>{e.preventDefault(),u?.isConnected&&u.focus()},onOpenAutoFocus:e=>{e.preventDefault(),c.current?.focus()},style:{height:`min(${d?600:440}px, calc(100dvh - 2rem))`},className:`fixed left-1/2 top-1/2 z-66 flex w-[min(42.5rem,calc(100%-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-2xl border border-edge bg-surface-overlay shadow-popover`,children:[(0,j.jsxs)(`header`,{className:`flex shrink-0 items-center justify-between px-5 pb-3 pt-5`,children:[(0,j.jsx)(T,{className:`text-base font-semibold text-fg`,children:d?O?`编辑定时任务`:`Edit scheduled task`:O?`设定定时任务`:`Schedule a task`}),(0,j.jsx)(te,{asChild:!0,children:(0,j.jsx)(x,{variant:`ghost`,disabled:b,"aria-label":O?`关闭`:`Close`,children:(0,j.jsx)(v,{className:`size-4`})})})]}),(0,j.jsx)(w,{className:`sr-only`,children:O?`描述要做的事,选择重复频率和时间。`:`Describe the task and choose its frequency and time.`}),(0,j.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-4 overflow-y-auto px-5 pb-3`,children:[d?(0,j.jsx)(`input`,{"aria-label":O?`任务名称`:`Task name`,className:`w-full rounded-xl border border-edge bg-transparent px-4 py-3 text-sm text-fg focus-visible:outline-accent`,value:_.name,onChange:e=>k({name:e.target.value})}):null,(0,j.jsxs)(`label`,{className:`block`,children:[(0,j.jsx)(`span`,{className:`sr-only`,children:O?`要做什么`:`What should happen`}),(0,j.jsx)(`textarea`,{ref:c,"aria-label":O?`任务说明`:`Task description`,placeholder:O?`希望定期帮你做什么?`:`What would you like done regularly?`,className:`block h-32 w-full resize-none rounded-xl border border-edge bg-transparent px-4 py-3 text-sm leading-6 text-fg placeholder:text-fg-subtle focus-visible:outline-accent`,value:_.instruction,onChange:e=>k({instruction:e.target.value})})]}),(0,j.jsxs)(`section`,{"aria-label":O?`运行时间`:`Schedule`,className:`rounded-xl border border-edge px-4`,children:[(0,j.jsxs)(`div`,{className:I,children:[(0,j.jsx)(`span`,{className:`text-sm text-fg`,children:O?`重复`:`Repeat`}),(0,j.jsxs)(f,{"aria-label":O?`重复`:`Repeat`,className:me,value:_.triggerMode,onChange:e=>k({triggerMode:e.target.value}),children:[(0,j.jsx)(p,{value:`once`,children:O?`仅一次`:`Once`}),(0,j.jsx)(p,{value:`daily`,children:O?`每天`:`Daily`}),(0,j.jsx)(p,{value:`weekly`,children:O?`每周`:`Weekly`}),(0,j.jsx)(p,{value:`interval`,children:O?`固定间隔`:`At intervals`}),(0,j.jsx)(p,{value:`cron`,children:O?`自定义`:`Custom`}),[`once`,`daily`,`weekly`,`interval`,`cron`].includes(_.triggerMode)?null:(0,j.jsx)(p,{value:_.triggerMode,children:O?`保持当前触发方式`:`Keep current trigger`})]})]}),[`daily`,`weekly`].includes(_.triggerMode)?(0,j.jsxs)(`div`,{className:I,children:[(0,j.jsx)(`span`,{className:`text-sm text-fg`,children:O?`时间`:`Time`}),(0,j.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 text-sm text-fg-muted`,children:[(0,j.jsx)(`span`,{className:`truncate text-xs`,children:N}),(0,j.jsx)(F,{value:_.time,onChange:e=>k({time:e}),ariaLabel:O?`时间`:`Time`,className:`w-auto`,triggerClassName:`w-auto border-0 bg-transparent px-0 shadow-none`})]})]}):null,_.triggerMode===`weekly`?(0,j.jsxs)(`div`,{className:I,children:[(0,j.jsx)(`span`,{className:`text-sm text-fg`,children:O?`星期`:`Day`}),(0,j.jsx)(f,{"aria-label":O?`星期`:`Day`,className:me,value:_.weekday,onChange:e=>k({weekday:e.target.value}),children:Object.entries(O?{1:`星期一`,2:`星期二`,3:`星期三`,4:`星期四`,5:`星期五`,6:`星期六`,0:`星期日`}:{1:`Monday`,2:`Tuesday`,3:`Wednesday`,4:`Thursday`,5:`Friday`,6:`Saturday`,0:`Sunday`}).map(([e,t])=>(0,j.jsx)(p,{value:e,children:t},e))})]}):null,_.triggerMode===`once`?(0,j.jsxs)(`div`,{className:I,children:[(0,j.jsx)(`label`,{htmlFor:`automation-once-at`,className:`text-sm text-fg`,children:O?`时间`:`Time`}),(0,j.jsx)(`input`,{id:`automation-once-at`,type:`datetime-local`,className:`min-w-0 bg-transparent py-3 text-sm text-fg-muted`,value:_.onceAt,onInput:e=>k({onceAt:e.currentTarget.value}),onChange:e=>k({onceAt:e.target.value})})]}):null,_.triggerMode===`cron`?(0,j.jsxs)(`div`,{className:I,children:[(0,j.jsx)(`label`,{htmlFor:`automation-cron`,className:`text-sm text-fg`,children:O?`时间规则`:`Schedule`}),(0,j.jsx)(`input`,{id:`automation-cron`,className:`min-w-0 bg-transparent py-3 text-right text-sm text-fg-muted`,value:_.cronExpr,onChange:e=>k({cronExpr:e.target.value})})]}):null,_.triggerMode===`interval`?(0,j.jsxs)(`div`,{className:I,children:[(0,j.jsx)(`label`,{htmlFor:`automation-interval`,className:`text-sm text-fg`,children:O?`每隔`:`Every`}),(0,j.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,j.jsx)(`input`,{id:`automation-interval`,type:`number`,min:`1`,"aria-label":O?`间隔数值`:`Interval value`,className:`w-16 bg-transparent text-right text-sm text-fg-muted`,value:_.intervalValue,onChange:e=>k({intervalValue:e.target.value})}),(0,j.jsxs)(f,{"aria-label":O?`间隔单位`:`Interval unit`,className:me,value:_.intervalUnit,onChange:e=>k({intervalUnit:e.target.value}),children:[(0,j.jsx)(p,{value:`minute`,children:O?`分钟`:`Minutes`}),(0,j.jsx)(p,{value:`hour`,children:O?`小时`:`Hours`}),(0,j.jsx)(p,{value:`day`,children:O?`天`:`Days`}),(0,j.jsx)(p,{value:`week`,children:O?`周`:`Weeks`})]})]})]}):null]}),P?(0,j.jsx)(`p`,{className:`text-xs text-fg-muted`,role:`status`,children:P}):null,_.triggerMode===`once`?(0,j.jsx)(`p`,{className:`text-xs text-fg-muted`,children:O?`按你所在时区输入,换时区后仍在同一时刻运行。`:`Enter your local time. Changing timezone keeps the same instant.`}):null,(0,j.jsxs)(`details`,{className:`group`,children:[(0,j.jsxs)(`summary`,{className:`flex w-fit cursor-pointer list-none items-center gap-1 rounded-md px-1 py-2 text-sm text-fg-muted focus-visible:outline-accent`,children:[O?`高级`:`Advanced`,(0,j.jsx)(l,{className:`size-3.5 transition-transform group-open:rotate-180`,"aria-hidden":!0})]}),(0,j.jsxs)(`div`,{className:`mt-2 grid gap-4 pb-2`,children:[d?null:(0,j.jsx)(M,{label:O?`任务名称(可选)`:`Task name (optional)`,children:(0,j.jsx)(`input`,{className:q,value:_.name,onChange:e=>k({name:e.target.value}),placeholder:O?`根据说明自动命名`:`Named from your description`})}),(0,j.jsx)(M,{label:O?`时区`:`Timezone`,children:(0,j.jsx)(`input`,{className:q,value:_.timezone??``,placeholder:`Asia/Shanghai`,onChange:e=>k({timezone:e.target.value})})}),(0,j.jsxs)(M,{label:O?`执行助手`:`Run with`,children:[(0,j.jsxs)(f,{"aria-label":O?`执行助手`:`Run with`,className:q,value:_.agentId,onChange:e=>k({agentId:e.target.value}),children:[(0,j.jsx)(p,{value:``,children:O?`默认助手`:`Default assistant`}),_.agentId&&!a?.items.some(e=>e.id===_.agentId)?(0,j.jsx)(p,{value:_.agentId,children:_.agentId}):null,a?.items.map(e=>(0,j.jsx)(p,{value:e.id,children:e.name||e.id},e.id))]}),(0,j.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:s?O?`暂时无法加载助手,请稍后重试。`:`Could not load assistants. Try again later.`:O?`从下次运行生效,切换时衔接最近的执行结果。`:`Applies to the next run, carrying over the latest result when switching.`})]}),(0,j.jsx)(M,{label:O?`使用模型`:`Model`,children:(0,j.jsx)(se,{value:_.model,onChange:e=>k({model:e}),allowEmpty:!0,placeholder:o(n).automations.form.defaultModel,searchPlaceholder:o(n).automations.form.searchModels,noMatches:o(n).automations.form.noModels,emptyLabel:O?`默认模型`:`Default model`,ariaLabel:O?`使用模型`:`Model`})}),(0,j.jsx)(M,{label:O?`运行上下文`:`Run context`,children:(0,j.jsxs)(f,{className:q,value:_.conversationMode,onChange:e=>k({conversationMode:e.target.value}),children:[(0,j.jsx)(p,{value:`new_session`,children:O?`每次独立运行`:`Independent runs`}),(0,j.jsx)(p,{value:`continuous`,children:O?`延续之前的运行`:`Continue previous runs`})]})}),(0,j.jsx)(M,{label:O?`通知我`:`Notify me`,children:(0,j.jsxs)(f,{className:q,value:_.notificationPolicy,onChange:e=>k({notificationPolicy:e.target.value}),children:[(0,j.jsx)(p,{value:`attention`,children:O?`需要关注时`:`When attention is needed`}),(0,j.jsx)(p,{value:`all`,children:O?`每次完成时`:`After every run`}),(0,j.jsx)(p,{value:`none`,children:O?`不通知`:`Never`})]})})]})]}),ae?(0,j.jsxs)(`div`,{role:`alert`,className:`space-y-2 text-sm text-danger`,children:[(0,j.jsx)(`p`,{children:ae}),ce?(0,j.jsx)(x,{variant:`secondary`,disabled:b,onClick:()=>void pe(),children:O?`载入最新设置`:`Load latest settings`}):null,(0,j.jsx)(`p`,{children:O?`内容已保留,请核对后重试。`:`Your edits are preserved. Review and retry.`})]}):null]}),(0,j.jsxs)(`footer`,{className:`flex shrink-0 justify-end gap-2 px-5 pb-5 pt-3`,children:[(0,j.jsx)(x,{variant:`ghost`,className:`rounded-full bg-surface-base px-4`,disabled:b,onClick:de,children:O?`取消`:`Cancel`}),(0,j.jsx)(x,{variant:`primary`,className:`rounded-full px-4 disabled:bg-surface-active disabled:text-fg-subtle disabled:opacity-100`,disabled:b||!_.instruction.trim(),onClick:()=>void fe(),children:b?O?`保存中…`:`Saving…`:d?O?`保存`:`Save`:O?`创建`:`Create`})]})]})]})})}function xe({automationId:e,language:t,inConfiguration:n=!1}){let r=a(),[c,l]=(0,A.useState)(!1),[u,d]=(0,A.useState)(!1),[f,p]=(0,A.useState)(``),{data:m,error:h,isLoading:v,mutate:y}=ee([`automation-card`,e],()=>D.get(e),{refreshInterval:5e3,shouldRetryOnError:!1}),b=t===`zh`,C=m?.automation,w=o(t);if(v&&!C)return(0,j.jsx)(S,{className:`my-3 h-20 w-full rounded-xl`});if(h||!C)return(0,j.jsxs)(`div`,{className:`my-3 rounded-xl border border-edge p-4 text-sm text-fg-muted`,children:[(0,j.jsx)(`p`,{children:b?`任务已删除或暂时无法读取。`:`This task was deleted or is unavailable.`}),(0,j.jsx)(`button`,{type:`button`,className:`mt-2 underline`,onClick:()=>void y(),children:b?`重试`:`Retry`})]});let te=async()=>{d(!0),p(``);try{r(await L({automationId:C.id}))}catch(e){p(e instanceof Error?e.message:String(e))}finally{d(!1)}};return(0,j.jsxs)(`div`,{className:`my-3 overflow-hidden rounded-xl border border-edge bg-surface-panel`,"data-product-delivery":`automation`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 p-3`,children:[(0,j.jsx)(s,{className:`size-6 shrink-0 text-fg-muted`,"aria-hidden":!0}),(0,j.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,j.jsx)(`p`,{className:`truncate text-sm font-medium text-fg`,children:C.name}),(0,j.jsxs)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:[le(C.trigger,w.automations,w.cron,t),C.trigger.kind===`schedule`&&C.trigger.schedule.kind===`cron`&&C.trigger.schedule.tz?` · ${C.trigger.schedule.tz}`:``,` · `,k(C)?b?`已完成`:`Completed`:C.enabled?w.automations.enabled:w.automations.paused]}),(0,j.jsx)(`p`,{className:`mt-1 text-xs text-fg-subtle`,children:C.enabled?`${b?`下次:`:`Next: `}${O(C,w.automations,t)}`:k(C)?b?`这项一次性任务已完成`:`This one-time task is complete`:b?`恢复后将按计划运行`:`Resume to run on schedule`})]}),!C.management&&C.action.kind===`agent`?(0,j.jsxs)(x,{variant:`ghost`,onClick:()=>l(!0),children:[(0,j.jsx)(_,{className:`size-4`,"aria-hidden":!0}),b?`编辑`:`Edit`]}):null,!n&&!C.management&&C.action.kind!==`system`?(0,j.jsxs)(x,{variant:`ghost`,disabled:u,onClick:()=>void te(),children:[(0,j.jsx)(g,{className:`size-4`,"aria-hidden":!0}),b?`继续对话`:`Continue in chat`]}):null,(0,j.jsx)(i,{className:`rounded-md border border-edge px-3 py-2 text-xs text-fg hover:bg-surface-hover`,to:`/automations?automation=${encodeURIComponent(C.id)}`,children:b?`打开`:`Open`})]}),[`failed`,`timeout`].includes(C.state.lastRunStatus??``)?(0,j.jsx)(`p`,{className:`px-4 pb-3 text-xs text-fg-muted`,children:b?`上次运行未完成。可以在对话中说明“帮我修复”,再试运行。`:`The last run did not finish. Ask in chat to fix it, then try again.`}):null,f?(0,j.jsx)(`p`,{role:`alert`,className:`px-4 pb-3 text-sm text-danger`,children:f}):null,c?(0,j.jsx)(be,{automation:C,language:t,onClose:()=>l(!1)}):null]})}function Se(e){let t=(0,de.c)(22),{conversationId:n,language:r,running:i}=e,a,o;t[0]===n?(a=t[1],o=t[2]):(a=[`automation-configuration`,n],o=()=>D.configuration(n),t[0]=n,t[1]=a,t[2]=o);let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s={refreshInterval:3e3,shouldRetryOnError:!1},t[3]=s):s=t[3];let{data:c,error:l,mutate:u}=ee(a,o,s),d;t[4]!==u||t[5]!==i?(d=()=>{i||(u(),ye())},t[4]=u,t[5]=i,t[6]=d):d=t[6];let f;if(t[7]!==n||t[8]!==u||t[9]!==i?(f=[i,n,u],t[7]=n,t[8]=u,t[9]=i,t[10]=f):f=t[10],(0,A.useEffect)(d,f),l){let e;t[11]===u?e=t[12]:(e=()=>void u(),t[11]=u,t[12]=e);let n=r===`zh`?`任务配置暂时无法读取,点击重试`:`Task configuration unavailable. Retry`,i;return t[13]!==e||t[14]!==n?(i=(0,j.jsx)(`button`,{type:`button`,className:`mb-4 text-sm text-fg-muted underline`,onClick:e,children:n}),t[13]=e,t[14]=n,t[15]=i):i=t[15],i}if(!c){let e;return t[16]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsx)(S,{className:`mb-4 h-20 rounded-xl`}),t[16]=e):e=t[16],e}if(c.deleted){let e=r===`zh`?`这个定时任务已删除,配置讨论仍可查看。`:`This scheduled task was deleted. Its configuration discussion is preserved.`,n;return t[17]===e?n=t[18]:(n=(0,j.jsx)(`p`,{className:`mb-4 text-sm text-fg-muted`,children:e}),t[17]=e,t[18]=n),n}let p;return t[19]!==c.automation||t[20]!==r?(p=c.automation?(0,j.jsx)(xe,{automationId:c.automation.id,language:r,inConfiguration:!0}):null,t[19]=c.automation,t[20]=r,t[21]=p):p=t[21],p}function Ce({automationId:e,language:t,runId:n,variant:r=`primary`}){let i=a(),[o,s]=(0,A.useState)(!1),[c,l]=(0,A.useState)(``),u=async()=>{s(!0),l(``);try{i(await L({automationId:e,runId:n,prompt:n?t===`zh`?`帮我看看这次为什么没有完成,并修复问题。`:`Help me understand why this did not finish and fix the problem.`:void 0}))}catch(e){l(e instanceof Error?e.message:String(e))}finally{s(!1)}};return(0,j.jsxs)(`span`,{children:[(0,j.jsxs)(x,{variant:r,disabled:o,onClick:()=>void u(),children:[(0,j.jsx)(g,{className:`size-4`,"aria-hidden":!0}),n?t===`zh`?`对话修复`:`Fix in chat`:t===`zh`?`继续对话`:`Continue in chat`]}),c?(0,j.jsx)(`span`,{role:`alert`,className:`ml-2 text-xs text-danger`,children:c}):null]})}export{K as a,W as c,R as d,_e as f,M as h,xe as i,B as l,F as m,Ce as n,G as o,L as p,be as r,z as s,Se as t,U as u};
|