@opengeni/react 6.5.2-canary.41607687019001 → 6.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/app-state.d.ts +4 -0
- package/dist/app/app-state.js +19 -14
- package/dist/app/components/Composer.js +25 -23
- package/dist/app/components/agent/agent-capability-picker.js +10 -8
- package/dist/app/components/artifacts/artifact-browse-controls.js +4 -4
- package/dist/app/components/artifacts/artifact-library.js +21 -19
- package/dist/app/components/artifacts/artifact-page-chrome.js +3 -3
- package/dist/app/components/artifacts/artifact-viewer.js +23 -22
- package/dist/app/components/artifacts/artifact-viewer.js.map +1 -1
- package/dist/app/components/artifacts/chat-interactive-block.js +12 -12
- package/dist/app/components/artifacts/copy-artifact-link.js +7 -5
- package/dist/app/components/artifacts/file-reach-dialog.js +11 -9
- package/dist/app/components/artifacts/inline-chat-image.js +18 -18
- package/dist/app/components/artifacts/retained-file-preview.js +24 -23
- package/dist/app/components/artifacts/retained-text-preview.js +3 -3
- package/dist/app/components/artifacts/site-audience.js +6 -5
- package/dist/app/components/artifacts/site-conversations.js +16 -14
- package/dist/app/components/artifacts/site-data.js +18 -16
- package/dist/app/components/artifacts/site-public-link.js +3 -2
- package/dist/app/components/artifacts/site-publishing-page.js +39 -37
- package/dist/app/components/artifacts/site-publishing.js +34 -32
- package/dist/app/components/artifacts/site-settings.js +38 -36
- package/dist/app/components/artifacts/site-version-menu.js +8 -7
- package/dist/app/components/billing-class-mark.js +3 -3
- package/dist/app/components/bots/bot-launch-strip.js +17 -17
- package/dist/app/components/bots/bot-template-dialog.js +30 -28
- package/dist/app/components/bots/bot-template-shortcuts.js +19 -19
- package/dist/app/components/bots/bot-templates-page.js +38 -36
- package/dist/app/components/bots/bot-templates-page.js.map +1 -1
- package/dist/app/components/capabilities/capability-detail-sheet.js +13 -11
- package/dist/app/components/capabilities/capability-logo-source.js +13 -13
- package/dist/app/components/capabilities/capability-logo.js +4 -3
- package/dist/app/components/capabilities/connector-tool-permissions.js +8 -6
- package/dist/app/components/capabilities/native-connect-setup.js +14 -14
- package/dist/app/components/capabilities/own-logins-shared-heads-up.js +7 -6
- package/dist/app/components/capabilities/perform-capability-action.js +7 -6
- package/dist/app/components/capabilities/prepared-mcp-setup-card.js +17 -17
- package/dist/app/components/capabilities/session-capability-card.js +72 -70
- package/dist/app/components/capabilities/session-capability-card.js.map +1 -1
- package/dist/app/components/capabilities/session-chrome-card.js +28 -26
- package/dist/app/components/capabilities/session-connection-accounts.js +4 -3
- package/dist/app/components/capabilities/session-custom-mcp-card.js +20 -19
- package/dist/app/components/capabilities/session-github-card.js +22 -20
- package/dist/app/components/capabilities/session-machine-card.js +27 -25
- package/dist/app/components/capabilities/session-personal-github-card.js +16 -16
- package/dist/app/components/capabilities/session-plugin-card.js +10 -9
- package/dist/app/components/capabilities/use-capabilities-catalog.js +4 -3
- package/dist/app/components/capabilities/use-connection-accounts.js +5 -4
- package/dist/app/components/command-menu/chat-status.js +15 -13
- package/dist/app/components/command-menu/chat-switcher.js +35 -33
- package/dist/app/components/command-menu/chat-switcher.js.map +1 -1
- package/dist/app/components/command-menu/command-menu.js +53 -50
- package/dist/app/components/command-menu/command-menu.js.map +1 -1
- package/dist/app/components/command-menu/shortcut-sheet.js +18 -16
- package/dist/app/components/command-menu/shortcut-sheet.js.map +1 -1
- package/dist/app/components/common.js +4 -3
- package/dist/app/components/composer-capabilities-menu-body.js +4 -4
- package/dist/app/components/composer-mobile-plus-panel.js +8 -8
- package/dist/app/components/composer-mobile-plus.js +1 -1
- package/dist/app/components/credit-required-gate.js +3 -3
- package/dist/app/components/credit-required-prompt.js +10 -8
- package/dist/app/components/credit-required-prompt.js.map +1 -1
- package/dist/app/components/credits/checkout-credits-celebration.js +3 -2
- package/dist/app/components/credits/checkout-return.js +3 -2
- package/dist/app/components/credits/checkout-return.js.map +1 -1
- package/dist/app/components/credits/coupon-redeem.js +5 -4
- package/dist/app/components/credits/credit-refusal-notice.js +7 -5
- package/dist/app/components/cross-slot-deep-link-recovery.js +5 -4
- package/dist/app/components/desktop/app-shots.js +13 -11
- package/dist/app/components/desktop/computer-use.js +6 -4
- package/dist/app/components/desktop/this-computer.js +9 -7
- package/dist/app/components/feedback.js +5 -4
- package/dist/app/components/follow-up-repository-menu-body.js +8 -6
- package/dist/app/components/follow-up-repository-menu-body.js.map +1 -1
- package/dist/app/components/follow-up-repository-picker.js +1 -1
- package/dist/app/components/github-app-connect-launcher.js +5 -4
- package/dist/app/components/in-app-help-link.js +3 -3
- package/dist/app/components/knowledge/agent-learning-settings.js +3 -2
- package/dist/app/components/knowledge/agent-learning-settings.js.map +1 -1
- package/dist/app/components/machines/connect-machine-dialog.js +18 -16
- package/dist/app/components/manual-repository-editor.js +3 -2
- package/dist/app/components/markdown.js +6 -6
- package/dist/app/components/models/models-ui.js +12 -10
- package/dist/app/components/my-things.js +12 -10
- package/dist/app/components/my-things.js.map +1 -1
- package/dist/app/components/new-session-starters.js +3 -3
- package/dist/app/components/own-where-it-works.js +9 -7
- package/dist/app/components/personal-resource-attachment-surface.js +4 -4
- package/dist/app/components/pickers.js +5 -5
- package/dist/app/components/rail/channel-create-dialog.js +7 -5
- package/dist/app/components/rail/project-glyph.js +17 -17
- package/dist/app/components/rail/project-profile.js +31 -29
- package/dist/app/components/rail/rail-context.js +3 -3
- package/dist/app/components/rail/rail-sections.js +68 -66
- package/dist/app/components/rail/session-header.js +59 -57
- package/dist/app/components/rail/session-list.js +66 -64
- package/dist/app/components/rail/session-row-content.js +4 -4
- package/dist/app/components/rail/session-row-hover-details.js +14 -12
- package/dist/app/components/rail/session-shell.js +90 -88
- package/dist/app/components/rail/site-session-group-heading.js +8 -8
- package/dist/app/components/repository-picker.js +8 -6
- package/dist/app/components/secrets/session-secrets-panel.js +4 -3
- package/dist/app/components/secrets/vault-model.js +3 -2
- package/dist/app/components/session/agent-configuration-panel.js +25 -23
- package/dist/app/components/session/agent-configuration-panel.js.map +1 -1
- package/dist/app/components/session/artifact-link-boundary.js +3 -3
- package/dist/app/components/session/artifact-session-page.js +11 -9
- package/dist/app/components/session/banners.js +8 -8
- package/dist/app/components/session/codex-usage-notice.js +5 -3
- package/dist/app/components/session/console-new-conversation.js +42 -40
- package/dist/app/components/session/context-text-reader.js +3 -2
- package/dist/app/components/session/descendant-requests.js +39 -37
- package/dist/app/components/session/descendant-requests.js.map +1 -1
- package/dist/app/components/session/editable-artifacts-workspace.js +36 -34
- package/dist/app/components/session/editable-artifacts-workspace.js.map +1 -1
- package/dist/app/components/session/failed-session-banner.js +13 -11
- package/dist/app/components/session/failed-session-banner.js.map +1 -1
- package/dist/app/components/session/failure-recovery-boundary.js +3 -3
- package/dist/app/components/session/human-input-delegation-record.js +2 -2
- package/dist/app/components/session/human-input.js +33 -31
- package/dist/app/components/session/inspector.js +57 -55
- package/dist/app/components/session/inspector.js.map +1 -1
- package/dist/app/components/session/message-actions.js +5 -4
- package/dist/app/components/session/message-actions.js.map +1 -1
- package/dist/app/components/session/message-resource-attachments.js +12 -11
- package/dist/app/components/session/message-resource-attachments.js.map +1 -1
- package/dist/app/components/session/model-context-inspector.js +6 -4
- package/dist/app/components/session/model-recovery-notice.js +3 -3
- package/dist/app/components/session/new-session-settings-menu.js +11 -9
- package/dist/app/components/session/new-session-setup-strip.js +18 -18
- package/dist/app/components/session/sandbox-recovery-actions.js +3 -3
- package/dist/app/components/session/sandbox-switcher.js +10 -9
- package/dist/app/components/session/sandbox-workspace.js +47 -46
- package/dist/app/components/session/search-markdown-highlight.js +7 -7
- package/dist/app/components/session/search-results-view.js +8 -8
- package/dist/app/components/session/session-admin-access.js +13 -11
- package/dist/app/components/session/session-admission-notice.js +7 -5
- package/dist/app/components/session/session-avatar-picker.js +22 -20
- package/dist/app/components/session/session-avatar.js +16 -16
- package/dist/app/components/session/session-machine-access-notice.js +7 -5
- package/dist/app/components/session/session-profile-dialog.js +29 -27
- package/dist/app/components/session/session-profile-editor.js +30 -28
- package/dist/app/components/session/session-retention.js +10 -8
- package/dist/app/components/session/session-search-dialog.js +10 -10
- package/dist/app/components/session/session-skill-reviews.js +2 -1
- package/dist/app/components/session/session-skill-reviews.js.map +1 -1
- package/dist/app/components/session/session-tenancy-control.js +13 -11
- package/dist/app/components/session/session-tenancy-control.js.map +1 -1
- package/dist/app/components/session/session-unattended-setting.js +7 -5
- package/dist/app/components/session/session-usage-limit-section.js +11 -9
- package/dist/app/components/session/share-chat-dialog.js +9 -7
- package/dist/app/components/session/site-origin-link.js +3 -3
- package/dist/app/components/session/subagents.js +8 -8
- package/dist/app/components/session/subscription-account-indicator.js +6 -6
- package/dist/app/components/session-connectors-menu-body.js +4 -3
- package/dist/app/components/session-connectors-menu-body.js.map +1 -1
- package/dist/app/components/settings/row-select.js +7 -5
- package/dist/app/components/toaster.js +3 -2
- package/dist/app/components/transcription-settings.js +11 -9
- package/dist/app/components/ui/destructive-confirm.js +11 -9
- package/dist/app/components/usage/usage-entry.js +5 -5
- package/dist/app/components/window-bar.js +16 -14
- package/dist/app/components/workspace-composer-plus.js +22 -21
- package/dist/app/components/workspace-reach.js +6 -4
- package/dist/app/components/workspace-tenant-boundary.js +5 -4
- package/dist/app/embed/memory-navigation.js +3 -3
- package/dist/app/embed/session-app.js +211 -209
- package/dist/app/lib/actions/actions-provider.js +15 -13
- package/dist/app/lib/agent-capabilities.js +3 -3
- package/dist/app/lib/app-surfaces.js +7 -6
- package/dist/app/lib/archive-session.d.ts +9 -4
- package/dist/app/lib/archive-session.js +4 -2
- package/dist/app/lib/bot-templates.js +3 -2
- package/dist/app/lib/capabilities.js +3 -2
- package/dist/app/lib/codex-usage-query.js +2 -2
- package/dist/app/lib/composer-connectors.js +17 -16
- package/dist/app/lib/console-site.js +2 -2
- package/dist/app/lib/console-text.js +2 -2
- package/dist/app/lib/events.js +9 -9
- package/dist/app/lib/failed-session-copy.js +3 -3
- package/dist/app/lib/inbox.js +4 -2
- package/dist/app/lib/model-access-onboarding.js +3 -3
- package/dist/app/lib/move-chat-to-machine.js +3 -3
- package/dist/app/lib/navigation.js +2 -2
- package/dist/app/lib/session-branch-cache.js +6 -6
- package/dist/app/lib/session-create.js +4 -4
- package/dist/app/lib/session-group-pagination.js +6 -6
- package/dist/app/lib/session-hover-facts.js +13 -11
- package/dist/app/lib/session-model.js +2 -2
- package/dist/app/lib/session-rail.js +3 -3
- package/dist/app/lib/session-rename.js +3 -3
- package/dist/app/lib/session-restart-operation-controller.js +4 -3
- package/dist/app/lib/session-tenancy.js +3 -2
- package/dist/app/lib/session-usage-limit.js +3 -2
- package/dist/app/lib/sessions-group.js +5 -5
- package/dist/app/lib/site-publishing.js +3 -2
- package/dist/app/lib/site-tool-consent-dialog.js +9 -7
- package/dist/app/lib/site-tool-consent-dialog.js.map +1 -1
- package/dist/app/lib/site-tool-consent.js +1 -1
- package/dist/app/lib/subscription-plans.js +3 -2
- package/dist/app/lib/toast.js +2 -1
- package/dist/app/lib/turn-failure-analytics.js +4 -4
- package/dist/app/lib/use-duplicate-site.js +6 -5
- package/dist/app/lib/use-follow-up-repositories.js +6 -5
- package/dist/app/lib/use-workspace-integrations.js +4 -3
- package/dist/app/lib/use-workspace-machines.js +4 -4
- package/dist/app/lib/use-workspace-model-catalog.js +5 -4
- package/dist/app/lib/use-workspace-rigs.js +2 -2
- package/dist/app/lib/workspace-navigation-preference.js +4 -4
- package/dist/app/lib/workspace-scope-context.js +3 -3
- package/dist/app/routes/artifacts.js +67 -66
- package/dist/app/routes/artifacts.js.map +1 -1
- package/dist/app/routes/retained-artifact.js +42 -40
- package/dist/app/routes/retained-artifact.js.map +1 -1
- package/dist/app/routes/session-unavailable.js +8 -7
- package/dist/app/routes/session.js +119 -117
- package/dist/app/routes/sessions-index-hydration.js +5 -5
- package/dist/app/routes/sessions-index.js +104 -102
- package/dist/app/routes/site-view.js +67 -65
- package/dist/app/routes/site-view.js.map +1 -1
- package/dist/artifacts-document.js +4 -4
- package/dist/artifacts-presentation.js +4 -4
- package/dist/artifacts-spreadsheet.js +4 -4
- package/dist/artifacts.js +10 -10
- package/dist/automations.js +17 -15
- package/dist/automations.js.map +1 -1
- package/dist/browser-viewer-TC27OCIP.js +23 -0
- package/dist/chat-interactive-block-RWPQBHVS.js +18 -0
- package/dist/chunk-2BDT3UZQ.js +229 -0
- package/dist/chunk-2CLNIEK4.js +373 -0
- package/dist/chunk-2FSBSCZJ.js +451 -0
- package/dist/chunk-2I7HDP53.js +199 -0
- package/dist/chunk-2INLDVK3.js +15 -0
- package/dist/chunk-2KALVELR.js +126 -0
- package/dist/chunk-2M3J7ZWQ.js +418 -0
- package/dist/chunk-2OP6WLGV.js +708 -0
- package/dist/chunk-2RG7NIAS.js +2936 -0
- package/dist/chunk-2STUPWEL.js +135 -0
- package/dist/chunk-2YUOVM3G.js +271 -0
- package/dist/chunk-2Z3NQNTM.js +3670 -0
- package/dist/chunk-3CPWWGNK.js +920 -0
- package/dist/chunk-3ED2U6XE.js +37 -0
- package/dist/chunk-3GZA4BUW.js +216 -0
- package/dist/chunk-3IK6UYO6.js +1022 -0
- package/dist/chunk-3PZ7JZI2.js +431 -0
- package/dist/chunk-4DVJ6ONS.js +50 -0
- package/dist/chunk-4DVNUCRR.js +2386 -0
- package/dist/chunk-4DVNUCRR.js.map +1 -0
- package/dist/chunk-4E3ZJRTZ.js +41 -0
- package/dist/chunk-4SAWSRAA.js +141 -0
- package/dist/chunk-53AGXXZM.js +307 -0
- package/dist/chunk-54YW6SZZ.js +818 -0
- package/dist/chunk-57AZS3IE.js +2317 -0
- package/dist/chunk-5CPEEAFD.js +143 -0
- package/dist/chunk-5EWSRZ2Y.js +340 -0
- package/dist/chunk-5IE76VCY.js +387 -0
- package/dist/chunk-5NWEKLDZ.js +170 -0
- package/dist/chunk-5O2FCCHZ.js +198 -0
- package/dist/chunk-5QAY6K77.js +399 -0
- package/dist/chunk-5YKW2K6I.js +625 -0
- package/dist/chunk-5YKW2K6I.js.map +1 -0
- package/dist/chunk-6BCXNDEI.js +4116 -0
- package/dist/chunk-6BCXNDEI.js.map +1 -0
- package/dist/chunk-6DK6Z4UN.js +2599 -0
- package/dist/chunk-6DVCC7QS.js +702 -0
- package/dist/chunk-6JHU2UBS.js +2058 -0
- package/dist/chunk-6PZ7OBYU.js +490 -0
- package/dist/chunk-6WD2INST.js +539 -0
- package/dist/chunk-6WD2INST.js.map +1 -0
- package/dist/chunk-6WGRDRMA.js +163 -0
- package/dist/chunk-77WAKEAH.js +186 -0
- package/dist/chunk-7T2ZE3VT.js +5558 -0
- package/dist/chunk-7T2ZE3VT.js.map +1 -0
- package/dist/chunk-7TDO3CUM.js +393 -0
- package/dist/chunk-7TIX2UAR.js +247 -0
- package/dist/chunk-7V5REBCP.js +148 -0
- package/dist/chunk-7VMZGLYI.js +339 -0
- package/dist/chunk-7W37NS3I.js +236 -0
- package/dist/chunk-7X6SDK2C.js +111 -0
- package/dist/chunk-7ZNUHRP5.js +95 -0
- package/dist/chunk-A36PZALD.js +84 -0
- package/dist/chunk-AUI6VA63.js +107 -0
- package/dist/chunk-AW2MQB37.js +24 -0
- package/dist/chunk-AWKES45Y.js +198 -0
- package/dist/chunk-AXHZYXUV.js +132 -0
- package/dist/chunk-BHNSJVBC.js +129 -0
- package/dist/chunk-BJEJFISW.js +50 -0
- package/dist/chunk-BJFH6JI5.js +422 -0
- package/dist/chunk-BMICEQZQ.js +960 -0
- package/dist/chunk-BTLBYBLU.js +29 -0
- package/dist/chunk-BXBDYNRP.js +89 -0
- package/dist/chunk-C372BFOV.js +357 -0
- package/dist/chunk-C43KRXGA.js +234 -0
- package/dist/chunk-C43KRXGA.js.map +1 -0
- package/dist/chunk-CMKGILJK.js +4824 -0
- package/dist/chunk-CRAOSVHC.js +50 -0
- package/dist/chunk-CRU35QQH.js +281 -0
- package/dist/chunk-CUIWCGMA.js +172 -0
- package/dist/chunk-D5TWNFFE.js +38 -0
- package/dist/chunk-DF5EAHDN.js +4461 -0
- package/dist/chunk-DJAXC5OK.js +56 -0
- package/dist/chunk-DXBYWSL5.js +3550 -0
- package/dist/chunk-DXR5PDFP.js +84 -0
- package/dist/chunk-DZWARC4M.js +267 -0
- package/dist/chunk-DZXEDSQI.js +106 -0
- package/dist/chunk-E7XERZWC.js +48 -0
- package/dist/chunk-ECJBYNLJ.js +79 -0
- package/dist/chunk-EDI6SJ2N.js +43 -0
- package/dist/chunk-EWSOC6WF.js +114 -0
- package/dist/chunk-F2OPHAUN.js +103 -0
- package/dist/chunk-F4ISQGGM.js +81 -0
- package/dist/chunk-FO4LYKJL.js +197 -0
- package/dist/chunk-FPXASDG5.js +73 -0
- package/dist/chunk-FSOQDUCG.js +117 -0
- package/dist/chunk-FSOQDUCG.js.map +1 -0
- package/dist/chunk-FVXBNBHO.js +157 -0
- package/dist/chunk-FYWT2O76.js +34 -0
- package/dist/chunk-FYWT2O76.js.map +1 -0
- package/dist/chunk-FZC5N55X.js +981 -0
- package/dist/chunk-GAVYGBFI.js +99 -0
- package/dist/chunk-GFIMOUDT.js +846 -0
- package/dist/chunk-GFIMOUDT.js.map +1 -0
- package/dist/chunk-GKVJIDHF.js +33 -0
- package/dist/chunk-GVN5SZLX.js +212 -0
- package/dist/chunk-H3T7IWNA.js +134 -0
- package/dist/chunk-HAX4LCR5.js +261 -0
- package/dist/chunk-HC4JFZVU.js +121 -0
- package/dist/chunk-HEFPPMBQ.js +581 -0
- package/dist/chunk-HGKTHF2U.js +1356 -0
- package/dist/chunk-HGKTHF2U.js.map +1 -0
- package/dist/chunk-HNLR7Q4Z.js +83 -0
- package/dist/chunk-HSOXMJOT.js +12 -0
- package/dist/chunk-I4MRDSUF.js +281 -0
- package/dist/chunk-I4QEJ62Y.js +202 -0
- package/dist/chunk-I5B5L6Q4.js +56 -0
- package/dist/chunk-I5QZJODL.js +264 -0
- package/dist/chunk-I7ITSXSJ.js +603 -0
- package/dist/chunk-I7XIZRFD.js +390 -0
- package/dist/chunk-IDANQPRH.js +82 -0
- package/dist/chunk-IFB3WJ36.js +212 -0
- package/dist/chunk-IHTAKKTK.js +264 -0
- package/dist/chunk-IKXNLWAL.js +205 -0
- package/dist/chunk-IKXNLWAL.js.map +1 -0
- package/dist/chunk-ILDXWY37.js +173 -0
- package/dist/chunk-IMDQUHBJ.js +570 -0
- package/dist/chunk-IMZCQBOT.js +119 -0
- package/dist/chunk-IXPTECSC.js +403 -0
- package/dist/chunk-J255A3N5.js +71 -0
- package/dist/chunk-J5F5HPPW.js +141 -0
- package/dist/chunk-JDTGRRNU.js +5045 -0
- package/dist/chunk-JDTGRRNU.js.map +1 -0
- package/dist/chunk-JEA3QDX7.js +2469 -0
- package/dist/chunk-JEUPAVYY.js +156 -0
- package/dist/chunk-JKHKLL5W.js +194 -0
- package/dist/chunk-JQL7ZH6C.js +650 -0
- package/dist/chunk-JWB44UGJ.js +57 -0
- package/dist/chunk-JZ4NLCAP.js +333 -0
- package/dist/chunk-K2A5PXQ5.js +412 -0
- package/dist/chunk-K56XV3C3.js +623 -0
- package/dist/chunk-K6GAXXVA.js +23 -0
- package/dist/chunk-KCBMFSMS.js +199 -0
- package/dist/chunk-KF2FV3ZJ.js +268 -0
- package/dist/chunk-KJD65EJP.js +278 -0
- package/dist/chunk-KLEUWIMZ.js +386 -0
- package/dist/chunk-KODELWYT.js +309 -0
- package/dist/chunk-KRDR5RJD.js +83 -0
- package/dist/chunk-KUDGXAF7.js +914 -0
- package/dist/chunk-KY2R73CG.js +171 -0
- package/dist/chunk-KY2R73CG.js.map +1 -0
- package/dist/chunk-KYS77RPN.js +85 -0
- package/dist/chunk-L7YTNTIK.js +368 -0
- package/dist/chunk-LHPNABDH.js +686 -0
- package/dist/chunk-MFROMEKA.js +401 -0
- package/dist/chunk-MIHN76LX.js +2656 -0
- package/dist/chunk-MIYFS2XN.js +42 -0
- package/dist/chunk-MJUCFQMS.js +65 -0
- package/dist/chunk-MM4FNWI4.js +3064 -0
- package/dist/chunk-MNZG4OHU.js +790 -0
- package/dist/chunk-MVW6HNPI.js +250 -0
- package/dist/chunk-MVW6HNPI.js.map +1 -0
- package/dist/chunk-N6AACDUW.js +200 -0
- package/dist/chunk-NC55IFN3.js +781 -0
- package/dist/chunk-NC7PVOEK.js +98 -0
- package/dist/chunk-NCYMNCJO.js +70 -0
- package/dist/chunk-ND2BXV3P.js +259 -0
- package/dist/chunk-NDBTFUO6.js +272 -0
- package/dist/chunk-NDQJZ7HF.js +206 -0
- package/dist/chunk-NGJJJPZZ.js +162 -0
- package/dist/chunk-NJTSNNE7.js +251 -0
- package/dist/chunk-NPGISCU6.js +4159 -0
- package/dist/chunk-NPGISCU6.js.map +1 -0
- package/dist/chunk-NRTE7DNV.js +1270 -0
- package/dist/chunk-NULUNM7H.js +290 -0
- package/dist/chunk-NUNZS36W.js +227 -0
- package/dist/chunk-NW53H5RW.js +2424 -0
- package/dist/chunk-NXCMHIKI.js +263 -0
- package/dist/chunk-O3LKCBP5.js +159 -0
- package/dist/chunk-O4EA4F3W.js +103 -0
- package/dist/chunk-O4EA4F3W.js.map +1 -0
- package/dist/chunk-O4OOG3D6.js +116 -0
- package/dist/chunk-O4OOG3D6.js.map +1 -0
- package/dist/chunk-O6N4ABCA.js +376 -0
- package/dist/chunk-O732GAFC.js +112 -0
- package/dist/chunk-OF4TIKYC.js +690 -0
- package/dist/chunk-OMPVOMPP.js +70 -0
- package/dist/chunk-OPJJSKUK.js +118 -0
- package/dist/chunk-OPWCMA4D.js +196 -0
- package/dist/chunk-ORJPS5VN.js +1193 -0
- package/dist/chunk-OSY5K7L7.js +187 -0
- package/dist/chunk-OV6QJRT4.js +45 -0
- package/dist/chunk-OVKYVZMW.js +108 -0
- package/dist/chunk-OZCBM3UC.js +171 -0
- package/dist/chunk-P3A2EINJ.js +61 -0
- package/dist/chunk-PTAG4PDC.js +27 -0
- package/dist/chunk-PTF5B7TJ.js +298 -0
- package/dist/chunk-Q3DPEYX4.js +848 -0
- package/dist/chunk-Q6CGOPJD.js +215 -0
- package/dist/chunk-Q6CGOPJD.js.map +1 -0
- package/dist/chunk-QB2KMIDP.js +100 -0
- package/dist/chunk-QCSJ4CWE.js +1067 -0
- package/dist/chunk-QIOQ2NPQ.js +414 -0
- package/dist/chunk-QK5EFEUT.js +353 -0
- package/dist/chunk-QPQBLYQJ.js +41 -0
- package/dist/chunk-QPSGCC5D.js +184 -0
- package/dist/chunk-QZAAUQRN.js +474 -0
- package/dist/chunk-QZM6YDJW.js +489 -0
- package/dist/chunk-QZM6YDJW.js.map +1 -0
- package/dist/chunk-RGBI63KJ.js +188 -0
- package/dist/chunk-RLBKLAEY.js +138 -0
- package/dist/chunk-RMFKVOM7.js +304 -0
- package/dist/chunk-ROKQU7WG.js +258 -0
- package/dist/chunk-RPVREAU7.js +251 -0
- package/dist/chunk-RQKLF42C.js +723 -0
- package/dist/chunk-SC6RRD2D.js +38 -0
- package/dist/chunk-SC6RRD2D.js.map +1 -0
- package/dist/chunk-SEO7TICN.js +94 -0
- package/dist/chunk-SHHJCL7X.js +432 -0
- package/dist/chunk-SIRLACNZ.js +114 -0
- package/dist/chunk-SKPHMYAA.js +237 -0
- package/dist/chunk-SODC7T6L.js +1583 -0
- package/dist/chunk-SQJIKMN3.js +366 -0
- package/dist/chunk-SVINDKVW.js +26 -0
- package/dist/chunk-SYCDHPZF.js +335 -0
- package/dist/chunk-T2QX3FDP.js +133 -0
- package/dist/chunk-T3OWFVMS.js +1187 -0
- package/dist/chunk-T6XI5FLY.js +61 -0
- package/dist/chunk-T7OXJZCX.js +62 -0
- package/dist/chunk-TAT5USZN.js +353 -0
- package/dist/chunk-TPQTRNER.js +172 -0
- package/dist/chunk-TUIN4MB7.js +266 -0
- package/dist/chunk-TX3VECZU.js +71 -0
- package/dist/chunk-TXLIEOJX.js +9624 -0
- package/dist/chunk-U3DN4HEY.js +27 -0
- package/dist/chunk-U7XM7CB4.js +191 -0
- package/dist/chunk-UJK53QFL.js +140 -0
- package/dist/chunk-UMTXA2TH.js +319 -0
- package/dist/chunk-UPDSXFK5.js +199 -0
- package/dist/chunk-UTIAXH52.js +269 -0
- package/dist/chunk-UVN5TMHU.js +1184 -0
- package/dist/chunk-V4Z4B2E3.js +52 -0
- package/dist/chunk-V4Z4B2E3.js.map +1 -0
- package/dist/chunk-VGYXW3VG.js +246 -0
- package/dist/chunk-VS7AHPCZ.js +255 -0
- package/dist/chunk-VTTAJOQ7.js +121 -0
- package/dist/chunk-VWPOLUAO.js +99 -0
- package/dist/chunk-X3MWB2QU.js +3851 -0
- package/dist/chunk-X6KAJI3V.js +211 -0
- package/dist/chunk-XBLRHV5R.js +50 -0
- package/dist/chunk-XDFP2LMW.js +605 -0
- package/dist/chunk-XEQMZB3C.js +525 -0
- package/dist/chunk-XEYLT5VA.js +223 -0
- package/dist/chunk-XHIQ5I6N.js +918 -0
- package/dist/chunk-XLH7QY2R.js +378 -0
- package/dist/chunk-XWFAMUZQ.js +113 -0
- package/dist/chunk-Y4BB2KS2.js +294 -0
- package/dist/chunk-Y4BB2KS2.js.map +1 -0
- package/dist/chunk-Y4OBB2VN.js +84 -0
- package/dist/chunk-YCVD6CI3.js +234 -0
- package/dist/chunk-YENLNISG.js +270 -0
- package/dist/chunk-YIRVLKAX.js +351 -0
- package/dist/chunk-YL73CVNK.js +390 -0
- package/dist/chunk-YLS6QE5G.js +288 -0
- package/dist/chunk-YNF2OC54.js +366 -0
- package/dist/chunk-YNF2OC54.js.map +1 -0
- package/dist/chunk-YPWU5KPE.js +147 -0
- package/dist/chunk-YQXTDZSU.js +2984 -0
- package/dist/chunk-YSJEAAOL.js +178 -0
- package/dist/chunk-YWIFM7D7.js +499 -0
- package/dist/chunk-YWVI6ZMK.js +103 -0
- package/dist/chunk-Z4FMAFNH.js +847 -0
- package/dist/chunk-Z654FWNU.js +136 -0
- package/dist/chunk-Z7Y523PS.js +130 -0
- package/dist/chunk-ZD67RM6G.js +60 -0
- package/dist/chunk-ZEG4VPBL.js +187 -0
- package/dist/chunk-ZHDFQITM.js +283 -0
- package/dist/chunk-ZHDFQITM.js.map +1 -0
- package/dist/chunk-ZLYCOBHW.js +75 -0
- package/dist/chunk-ZNJ5MTXV.js +89 -0
- package/dist/chunk-ZSGY3H53.js +155 -0
- package/dist/chunk-ZTPXACWB.js +1788 -0
- package/dist/chunk-ZUA3JMI6.js +107 -0
- package/dist/chunk-ZYAZUPPV.js +559 -0
- package/dist/composer.js +8 -8
- package/dist/computer-viewer-TDDO25AV.js +21 -0
- package/dist/connect.js +12 -12
- package/dist/desktop-dictation.js +12 -10
- package/dist/desktop-dictation.js.map +1 -1
- package/dist/desktop.js +2 -2
- package/dist/editor.js +2 -2
- package/dist/embedded-new-voice-2G3VLPVQ.js +24 -0
- package/dist/embedded-voice-T5IWOWGD.js +24 -0
- package/dist/fleet-decision-row-WM64KXP3.js +361 -0
- package/dist/in-chat-connect-model.js +5 -5
- package/dist/index.js +51 -51
- package/dist/interaction.js +5 -5
- package/dist/machines.js +3 -3
- package/dist/meetings-recorder.js +1 -1
- package/dist/meetings.js +40 -32
- package/dist/meetings.js.map +1 -1
- package/dist/messages/en.d.ts +3 -0
- package/dist/messages.js +1 -1
- package/dist/model-policy-picker-menu-SMC6J6QN.js +22 -0
- package/dist/payment-page-card-G4U63KUV.js +223 -0
- package/dist/platform-activity-row-BUZGZAKZ.js +128 -0
- package/dist/queue-surface-implementation-4KUZ4PJV.js +908 -0
- package/dist/realtime.js +4 -4
- package/dist/recorder-host-WF2RRR56.js +69 -0
- package/dist/recorder-host-WF2RRR56.js.map +1 -0
- package/dist/recordings.js +3 -3
- package/dist/sandbox-files-ESDMOFSD.js +27 -0
- package/dist/session-app.js +211 -209
- package/dist/session-connect-cards-Q53KMMYY.js +25 -0
- package/dist/session-list-model.js +2 -2
- package/dist/session-realtime-CF3I35WJ.js +30 -0
- package/dist/session-realtime.js +2 -2
- package/dist/session-ui.js +33 -31
- package/dist/session.js +5 -5
- package/dist/sites.js +2 -2
- package/dist/terminal.js +2 -2
- package/dist/this-computer.js +3 -3
- package/dist/timeline-annotation-markers-CJK4RYZ4.js +157 -0
- package/dist/timeline-annotation-selection-67GF5H26.js +208 -0
- package/dist/timeline-annotations-dialog-ONJPQDJQ.js +283 -0
- package/dist/ui/access-list.js +11 -9
- package/dist/ui/access-list.js.map +1 -1
- package/dist/ui/api-error.d.ts +6 -3
- package/dist/ui/api-error.js +2 -1
- package/dist/ui/cadence-picker.js +6 -4
- package/dist/ui/choice-cards.js +5 -3
- package/dist/ui/confirm-dialog.js +2 -2
- package/dist/ui/copy-field.js +5 -3
- package/dist/ui/detail-page.js +2 -2
- package/dist/ui/detail-sheet.js +2 -2
- package/dist/ui/diff-view.js +4 -3
- package/dist/ui/disclosure.js +3 -3
- package/dist/ui/email-chips-input.js +5 -3
- package/dist/ui/error-message.js +2 -1
- package/dist/ui/error-reference.d.ts +15 -0
- package/dist/ui/error-text.d.ts +10 -0
- package/dist/ui/error-text.js +9 -0
- package/dist/ui/error-text.js.map +1 -0
- package/dist/ui/field.js +4 -2
- package/dist/ui/flush-form-page.js +8 -6
- package/dist/ui/form-dialog.js +7 -5
- package/dist/ui/list-row.js +3 -3
- package/dist/ui/load-failure.js +3 -2
- package/dist/ui/load-failure.js.map +1 -1
- package/dist/ui/notice.js +3 -1
- package/dist/ui/relative-time.js +2 -2
- package/dist/ui/revision-history.js +9 -7
- package/dist/ui/revision-history.js.map +1 -1
- package/dist/ui/role-select.js +10 -8
- package/dist/ui/segmented-control.js +4 -2
- package/dist/ui/select-menu.js +5 -3
- package/dist/ui/setting-row.js +3 -1
- package/dist/ui/switch.js +4 -2
- package/dist/ui/usage-meter.js +3 -3
- package/dist/ui/word-list-row.js +4 -2
- package/dist/usage.js +2 -2
- package/dist/workbench.js +4 -4
- package/package.json +5 -6
- package/src/app/app-state.tsx +126 -14
- package/src/app/components/artifacts/site-data.tsx +2 -2
- package/src/app/components/artifacts/site-settings.tsx +2 -2
- package/src/app/components/rail/session-list.tsx +7 -8
- package/src/app/components/rail/session-shell.tsx +3 -3
- package/src/app/components/repository-picker.tsx +8 -1
- package/src/app/components/session/model-context-inspector.tsx +2 -1
- package/src/app/components/session/session-admin-access.tsx +2 -2
- package/src/app/lib/actions/chat-operations.ts +4 -4
- package/src/app/lib/archive-session.test.tsx +265 -2
- package/src/app/lib/archive-session.tsx +175 -9
- package/src/app/lib/copy-link.ts +2 -2
- package/src/app/lib/inbox.tsx +2 -2
- package/src/app/lib/session-failure-toasts.ts +3 -2
- package/src/app/lib/toast.test.tsx +215 -0
- package/src/app/lib/toast.tsx +67 -2
- package/src/app/personal-github-reconnect.test.tsx +356 -0
- package/src/app/routes/artifacts.tsx +1 -2
- package/src/components/tool-action-review.tsx +14 -1
- package/src/meetings/delete-meeting-dialog.tsx +2 -1
- package/src/meetings/meeting-ask.tsx +2 -1
- package/src/meetings/meeting-detail-page.tsx +2 -1
- package/src/meetings/meeting-notes.tsx +2 -1
- package/src/meetings/meeting-settings.tsx +4 -1
- package/src/meetings/meeting-transcript.tsx +4 -1
- package/src/meetings/recorder-context.tsx +10 -0
- package/src/meetings/recorder-host.test.tsx +60 -2
- package/src/meetings/recorder-host.tsx +16 -3
- package/src/meetings/recorder-panel.tsx +2 -1
- package/src/meetings/recorder-workspace.test.tsx +26 -1
- package/src/messages/en.ts +6 -0
- package/src/ui/api-error.test.ts +29 -5
- package/src/ui/api-error.tsx +10 -4
- package/src/ui/error-message.tsx +8 -0
- package/src/ui/error-reference.test.ts +54 -0
- package/src/ui/error-reference.ts +51 -0
- package/src/ui/error-text.test.tsx +66 -0
- package/src/ui/error-text.tsx +49 -0
- package/src/ui/field.tsx +4 -1
- package/src/ui/notice.tsx +7 -2
- package/src/ui/setting-row.tsx +4 -1
- package/styles/app.css +12 -0
- package/styles/compiled.css +9 -0
- package/dist/browser-viewer-NOP5EAUO.js +0 -23
- package/dist/chat-interactive-block-G7O44JHR.js +0 -18
- package/dist/chunk-26RWVLRD.js +0 -135
- package/dist/chunk-2AHTY7OT.js +0 -247
- package/dist/chunk-2GDNWKSC.js +0 -3670
- package/dist/chunk-2JENKGCE.js +0 -339
- package/dist/chunk-2KYQC4T5.js +0 -155
- package/dist/chunk-2RREGDQH.js +0 -708
- package/dist/chunk-2T7DX6KR.js +0 -353
- package/dist/chunk-2VB2O4FQ.js +0 -920
- package/dist/chunk-2VTTKH23.js +0 -94
- package/dist/chunk-2XNG2KNT.js +0 -172
- package/dist/chunk-2YC6JQRO.js +0 -399
- package/dist/chunk-2ZVRJRXC.js +0 -27
- package/dist/chunk-35737UT4.js +0 -162
- package/dist/chunk-366XZ4PM.js +0 -41
- package/dist/chunk-36MIDGAH.js +0 -199
- package/dist/chunk-3FD76LXM.js +0 -212
- package/dist/chunk-3OVIXY4O.js +0 -213
- package/dist/chunk-3OVIXY4O.js.map +0 -1
- package/dist/chunk-3QNRBEYH.js +0 -432
- package/dist/chunk-3QX55WLC.js +0 -15
- package/dist/chunk-3USJPT2S.js +0 -1022
- package/dist/chunk-42CMQ5VR.js +0 -251
- package/dist/chunk-4LPOWQJY.js +0 -42
- package/dist/chunk-4NBTZRKT.js +0 -79
- package/dist/chunk-4OXI6HCV.js +0 -118
- package/dist/chunk-4SZZAFYQ.js +0 -2317
- package/dist/chunk-4TQL3WP2.js +0 -140
- package/dist/chunk-4Y6BK7IU.js +0 -196
- package/dist/chunk-4YD7YZC5.js +0 -373
- package/dist/chunk-5DTST3TP.js +0 -81
- package/dist/chunk-5FH5LQVS.js +0 -130
- package/dist/chunk-5KWMYPJV.js +0 -847
- package/dist/chunk-5MUJDC6C.js +0 -84
- package/dist/chunk-5QM2WPKV.js +0 -41
- package/dist/chunk-5WUN7XPD.js +0 -1184
- package/dist/chunk-64PO2WXU.js +0 -1067
- package/dist/chunk-6AHATAAY.js +0 -431
- package/dist/chunk-6ED2YWBT.js +0 -56
- package/dist/chunk-6GXVYAGR.js +0 -170
- package/dist/chunk-6H4SJBPE.js +0 -85
- package/dist/chunk-6MT3HHUB.js +0 -84
- package/dist/chunk-6UHCBH4G.js +0 -198
- package/dist/chunk-6WLX3NR3.js +0 -198
- package/dist/chunk-73NXYYWE.js +0 -112
- package/dist/chunk-76ERNKIZ.js +0 -603
- package/dist/chunk-776QZ573.js +0 -57
- package/dist/chunk-7BYWOFVH.js +0 -171
- package/dist/chunk-7O5CGGIQ.js +0 -108
- package/dist/chunk-7QOHRZ67.js +0 -251
- package/dist/chunk-7WIDB4PL.js +0 -2058
- package/dist/chunk-7WKP3DYJ.js +0 -37
- package/dist/chunk-7XOVTPDI.js +0 -227
- package/dist/chunk-AB5MBIXY.js +0 -281
- package/dist/chunk-ADNMXBCX.js +0 -1193
- package/dist/chunk-AFBJTUFK.js +0 -202
- package/dist/chunk-ALVRWCXE.js +0 -61
- package/dist/chunk-AOHU6O3M.js +0 -247
- package/dist/chunk-AOHU6O3M.js.map +0 -1
- package/dist/chunk-APW4T4SW.js +0 -270
- package/dist/chunk-AXBSYWKX.js +0 -2656
- package/dist/chunk-B2I5ZW35.js +0 -422
- package/dist/chunk-B3LMRTRF.js +0 -223
- package/dist/chunk-BE2XENG2.js +0 -292
- package/dist/chunk-BE2XENG2.js.map +0 -1
- package/dist/chunk-BF4SADKX.js +0 -29
- package/dist/chunk-BKP43KK4.js +0 -1788
- package/dist/chunk-BM3NEZ6X.js +0 -781
- package/dist/chunk-BT3BAGB5.js +0 -216
- package/dist/chunk-BTSYDIVJ.js +0 -357
- package/dist/chunk-BUBNGKWG.js +0 -70
- package/dist/chunk-BVUJV5WR.js +0 -126
- package/dist/chunk-BZO5ZMUP.js +0 -27
- package/dist/chunk-C3HUF3M2.js +0 -157
- package/dist/chunk-C5QCAOES.js +0 -264
- package/dist/chunk-CGK6ALQU.js +0 -159
- package/dist/chunk-CPYGO76Q.js +0 -335
- package/dist/chunk-CQH4FWYA.js +0 -490
- package/dist/chunk-CZP5QXNB.js +0 -234
- package/dist/chunk-D2TOWEYH.js +0 -266
- package/dist/chunk-D6L4GHRH.js +0 -340
- package/dist/chunk-DKT3N37I.js +0 -50
- package/dist/chunk-DMMJIFKA.js +0 -84
- package/dist/chunk-DO74DQC7.js +0 -26
- package/dist/chunk-DOFJZ2JU.js +0 -83
- package/dist/chunk-DSXVY5WZ.js +0 -119
- package/dist/chunk-E337C2VK.js +0 -82
- package/dist/chunk-E6NRSRBE.js +0 -114
- package/dist/chunk-E6SQKHAU.js +0 -114
- package/dist/chunk-E7UIVD7F.js +0 -236
- package/dist/chunk-EGBII4CP.js +0 -229
- package/dist/chunk-EILSAQVJ.js +0 -200
- package/dist/chunk-ELL6HSYR.js +0 -307
- package/dist/chunk-EUBGLFFR.js +0 -73
- package/dist/chunk-EW6RNWSH.js +0 -212
- package/dist/chunk-EYUT5Y6V.js +0 -2599
- package/dist/chunk-F7U3QPZ3.js +0 -304
- package/dist/chunk-FBTJKSTM.js +0 -1270
- package/dist/chunk-FC2FTSK3.js +0 -2424
- package/dist/chunk-FOGNA3BU.js +0 -148
- package/dist/chunk-FQFKHNC7.js +0 -650
- package/dist/chunk-FTCHM755.js +0 -50
- package/dist/chunk-FXSHP4JZ.js +0 -3550
- package/dist/chunk-G6ZZC543.js +0 -818
- package/dist/chunk-G7FU6PUA.js +0 -100
- package/dist/chunk-GA4YEAMX.js +0 -3851
- package/dist/chunk-GE33BGB7.js +0 -12
- package/dist/chunk-GQ67HSJY.js +0 -570
- package/dist/chunk-GXXZ3WAK.js +0 -106
- package/dist/chunk-H2TCRX3H.js +0 -237
- package/dist/chunk-HLL4PBO7.js +0 -60
- package/dist/chunk-HLOEPV5C.js +0 -259
- package/dist/chunk-HUAGBS4O.js +0 -56
- package/dist/chunk-I36GSRUJ.js +0 -211
- package/dist/chunk-I6VBHT7S.js +0 -261
- package/dist/chunk-ICNNNOXE.js +0 -333
- package/dist/chunk-ICX64J4U.js +0 -172
- package/dist/chunk-ID36Y46W.js +0 -5046
- package/dist/chunk-ID36Y46W.js.map +0 -1
- package/dist/chunk-IGVVXLKJ.js +0 -559
- package/dist/chunk-IKJLSBUI.js +0 -2984
- package/dist/chunk-IKMUFDVS.js +0 -50
- package/dist/chunk-IKUNOX7F.js +0 -255
- package/dist/chunk-ILKDYBON.js +0 -288
- package/dist/chunk-IVYJX3OY.js +0 -187
- package/dist/chunk-JCY4CMDH.js +0 -107
- package/dist/chunk-JJZPLGIP.js +0 -474
- package/dist/chunk-JW33RV4V.js +0 -143
- package/dist/chunk-JWPA6ZPZ.js +0 -351
- package/dist/chunk-JZ4QXS6D.js +0 -50
- package/dist/chunk-K42OUZQ3.js +0 -386
- package/dist/chunk-K5TOVX5A.js +0 -206
- package/dist/chunk-K63HGHZX.js +0 -99
- package/dist/chunk-K6R5T44I.js +0 -75
- package/dist/chunk-KHJ5PXFM.js +0 -914
- package/dist/chunk-KJZRQ55O.js +0 -2319
- package/dist/chunk-KJZRQ55O.js.map +0 -1
- package/dist/chunk-KKI55ZMW.js +0 -65
- package/dist/chunk-KRPLAAFP.js +0 -199
- package/dist/chunk-KVFEZDBO.js +0 -134
- package/dist/chunk-L4I665WK.js +0 -45
- package/dist/chunk-L4OF77LE.js +0 -110
- package/dist/chunk-L4OF77LE.js.map +0 -1
- package/dist/chunk-LA5T52RM.js +0 -70
- package/dist/chunk-LM2W5YAT.js +0 -401
- package/dist/chunk-LQ62ECE6.js +0 -390
- package/dist/chunk-LQDUHU3Y.js +0 -71
- package/dist/chunk-LRJIYTZW.js +0 -4157
- package/dist/chunk-LRJIYTZW.js.map +0 -1
- package/dist/chunk-LRN6GYAZ.js +0 -138
- package/dist/chunk-M4SDVTKJ.js +0 -790
- package/dist/chunk-MA6O7CM6.js +0 -99
- package/dist/chunk-MBIBB6GI.js +0 -197
- package/dist/chunk-MF3ZFB4H.js +0 -199
- package/dist/chunk-MJJGJMYJ.js +0 -98
- package/dist/chunk-MLJADQFI.js +0 -4824
- package/dist/chunk-MQG7RV3B.js +0 -62
- package/dist/chunk-MTTGSQA5.js +0 -186
- package/dist/chunk-MW7Y3T55.js +0 -525
- package/dist/chunk-MYUFMVCH.js +0 -121
- package/dist/chunk-N3OARGH2.js +0 -61
- package/dist/chunk-NB2HMRT2.js +0 -353
- package/dist/chunk-NFDFYWMV.js +0 -141
- package/dist/chunk-NWGNFN3N.js +0 -1187
- package/dist/chunk-NWJRPDIO.js +0 -840
- package/dist/chunk-NWJRPDIO.js.map +0 -1
- package/dist/chunk-NXWBBZJV.js +0 -267
- package/dist/chunk-NY2QWROL.js +0 -71
- package/dist/chunk-O2IOPP3R.js +0 -848
- package/dist/chunk-O2UWH5RG.js +0 -141
- package/dist/chunk-O5YWDLYF.js +0 -393
- package/dist/chunk-OBMCZO7E.js +0 -121
- package/dist/chunk-OD3DCCCB.js +0 -132
- package/dist/chunk-OMH7R6I3.js +0 -390
- package/dist/chunk-OSA5EQG5.js +0 -113
- package/dist/chunk-OSJ3MUTZ.js +0 -2936
- package/dist/chunk-OWAYJ2OV.js +0 -368
- package/dist/chunk-OYXBFSGK.js +0 -269
- package/dist/chunk-PC2EBA5G.js +0 -4116
- package/dist/chunk-PC2EBA5G.js.map +0 -1
- package/dist/chunk-PC2MVXIP.js +0 -363
- package/dist/chunk-PC2MVXIP.js.map +0 -1
- package/dist/chunk-PENGLDR5.js +0 -309
- package/dist/chunk-PSMAWRPL.js +0 -191
- package/dist/chunk-PW4IMTYR.js +0 -702
- package/dist/chunk-PW54V7T5.js +0 -387
- package/dist/chunk-Q2EXYSMO.js +0 -24
- package/dist/chunk-Q2XJK5I4.js +0 -51
- package/dist/chunk-Q2XJK5I4.js.map +0 -1
- package/dist/chunk-Q4EFRI6X.js +0 -258
- package/dist/chunk-Q52CXW6C.js +0 -48
- package/dist/chunk-Q6XQ2R37.js +0 -184
- package/dist/chunk-QAJ53XBW.js +0 -23
- package/dist/chunk-QDTKECT4.js +0 -129
- package/dist/chunk-QE3ZFGI3.js +0 -43
- package/dist/chunk-QHHSUR2Y.js +0 -298
- package/dist/chunk-QHNVNR7B.js +0 -173
- package/dist/chunk-QIK2Q6N5.js +0 -376
- package/dist/chunk-QWL4L366.js +0 -38
- package/dist/chunk-R3J2PTVQ.js +0 -690
- package/dist/chunk-RBRX5ZS3.js +0 -319
- package/dist/chunk-REX6JIC7.js +0 -33
- package/dist/chunk-RGZ7EEC3.js +0 -537
- package/dist/chunk-RGZ7EEC3.js.map +0 -1
- package/dist/chunk-RIPS7GFR.js +0 -960
- package/dist/chunk-RTBZNFNV.js +0 -1354
- package/dist/chunk-RTBZNFNV.js.map +0 -1
- package/dist/chunk-SKMNW4SW.js +0 -187
- package/dist/chunk-SRFARKXC.js +0 -623
- package/dist/chunk-SWIHWCTW.js +0 -4461
- package/dist/chunk-TA5CFTO4.js +0 -103
- package/dist/chunk-TF4ZVJLI.js +0 -156
- package/dist/chunk-TG7DADJR.js +0 -9624
- package/dist/chunk-TI4R2ZD5.js +0 -623
- package/dist/chunk-TI4R2ZD5.js.map +0 -1
- package/dist/chunk-TNKWOUWP.js +0 -412
- package/dist/chunk-TNUSPXPW.js +0 -5555
- package/dist/chunk-TNUSPXPW.js.map +0 -1
- package/dist/chunk-TNYFHKVV.js +0 -366
- package/dist/chunk-TPMZBOFH.js +0 -178
- package/dist/chunk-TW3LKRJF.js +0 -263
- package/dist/chunk-TZAO65I4.js +0 -83
- package/dist/chunk-U5EFEMYU.js +0 -89
- package/dist/chunk-U6M4LS3M.js +0 -378
- package/dist/chunk-UI4HI5QK.js +0 -918
- package/dist/chunk-UJDOWCQ3.js +0 -272
- package/dist/chunk-UJUQ2QOX.js +0 -581
- package/dist/chunk-UQ3IM6FY.js +0 -133
- package/dist/chunk-UYE47LO6.js +0 -246
- package/dist/chunk-VADHIT26.js +0 -89
- package/dist/chunk-VFQ3H6CO.js +0 -163
- package/dist/chunk-VGUN6VB2.js +0 -188
- package/dist/chunk-VGWWEVSD.js +0 -723
- package/dist/chunk-VIEFJ2DM.js +0 -2469
- package/dist/chunk-VLXM36VS.js +0 -268
- package/dist/chunk-W3BFRR2G.js +0 -499
- package/dist/chunk-W5MPXR3A.js +0 -981
- package/dist/chunk-W5OWKVZG.js +0 -136
- package/dist/chunk-W6FRORMX.js +0 -486
- package/dist/chunk-W6FRORMX.js.map +0 -1
- package/dist/chunk-W7XROSZO.js +0 -232
- package/dist/chunk-W7XROSZO.js.map +0 -1
- package/dist/chunk-WEZ5PXZP.js +0 -403
- package/dist/chunk-WHWUWN2X.js +0 -197
- package/dist/chunk-WHWUWN2X.js.map +0 -1
- package/dist/chunk-WLEDGIVS.js +0 -114
- package/dist/chunk-WLEDGIVS.js.map +0 -1
- package/dist/chunk-WNDAKLHG.js +0 -281
- package/dist/chunk-WTJ4PLMU.js +0 -103
- package/dist/chunk-WV2KPJUW.js +0 -107
- package/dist/chunk-X3VY5EGY.js +0 -277
- package/dist/chunk-X3VY5EGY.js.map +0 -1
- package/dist/chunk-XDBYWVCW.js +0 -418
- package/dist/chunk-XF7MA4U5.js +0 -36
- package/dist/chunk-XF7MA4U5.js.map +0 -1
- package/dist/chunk-XOSQP3YA.js +0 -605
- package/dist/chunk-XYBV4ZJQ.js +0 -271
- package/dist/chunk-YBKVGLQR.js +0 -147
- package/dist/chunk-YDCUBUWH.js +0 -1583
- package/dist/chunk-YG6NARQY.js +0 -51
- package/dist/chunk-YG6NARQY.js.map +0 -1
- package/dist/chunk-YSVD5HI4.js +0 -278
- package/dist/chunk-YT3WGNG6.js +0 -290
- package/dist/chunk-YYICQDK4.js +0 -414
- package/dist/chunk-YYLMZLI6.js +0 -686
- package/dist/chunk-ZAMTKG5U.js +0 -95
- package/dist/chunk-ZDLYSXKN.js +0 -111
- package/dist/chunk-ZG447FSS.js +0 -194
- package/dist/chunk-ZIT5KD4Q.js +0 -264
- package/dist/chunk-ZUDOVDKR.js +0 -3064
- package/dist/chunk-ZW2ECJ3A.js +0 -451
- package/dist/computer-viewer-LPZ763KF.js +0 -21
- package/dist/embedded-new-voice-YVMKSLKJ.js +0 -24
- package/dist/embedded-voice-BJPQFXSU.js +0 -24
- package/dist/fleet-decision-row-AA4H5CDT.js +0 -361
- package/dist/model-policy-picker-menu-HSMWVO4P.js +0 -22
- package/dist/payment-page-card-3LTSFJGN.js +0 -223
- package/dist/platform-activity-row-5VYV6TX4.js +0 -128
- package/dist/queue-surface-implementation-NXHZUKD2.js +0 -908
- package/dist/recorder-host-ZKRWTDBM.js +0 -57
- package/dist/recorder-host-ZKRWTDBM.js.map +0 -1
- package/dist/sandbox-files-YCMLQUFU.js +0 -27
- package/dist/session-connect-cards-KSQLMRM5.js +0 -25
- package/dist/session-realtime-ZR6JLG3Y.js +0 -30
- package/dist/timeline-annotation-markers-YAHDPWVG.js +0 -157
- package/dist/timeline-annotation-selection-KHXNCEJP.js +0 -208
- package/dist/timeline-annotations-dialog-Y4XD3N7B.js +0 -283
- /package/dist/{browser-viewer-NOP5EAUO.js.map → browser-viewer-TC27OCIP.js.map} +0 -0
- /package/dist/{chat-interactive-block-G7O44JHR.js.map → chat-interactive-block-RWPQBHVS.js.map} +0 -0
- /package/dist/{chunk-EGBII4CP.js.map → chunk-2BDT3UZQ.js.map} +0 -0
- /package/dist/{chunk-4YD7YZC5.js.map → chunk-2CLNIEK4.js.map} +0 -0
- /package/dist/{chunk-ZW2ECJ3A.js.map → chunk-2FSBSCZJ.js.map} +0 -0
- /package/dist/{chunk-KRPLAAFP.js.map → chunk-2I7HDP53.js.map} +0 -0
- /package/dist/{chunk-3QX55WLC.js.map → chunk-2INLDVK3.js.map} +0 -0
- /package/dist/{chunk-BVUJV5WR.js.map → chunk-2KALVELR.js.map} +0 -0
- /package/dist/{chunk-XDBYWVCW.js.map → chunk-2M3J7ZWQ.js.map} +0 -0
- /package/dist/{chunk-2RREGDQH.js.map → chunk-2OP6WLGV.js.map} +0 -0
- /package/dist/{chunk-OSJ3MUTZ.js.map → chunk-2RG7NIAS.js.map} +0 -0
- /package/dist/{chunk-26RWVLRD.js.map → chunk-2STUPWEL.js.map} +0 -0
- /package/dist/{chunk-XYBV4ZJQ.js.map → chunk-2YUOVM3G.js.map} +0 -0
- /package/dist/{chunk-2GDNWKSC.js.map → chunk-2Z3NQNTM.js.map} +0 -0
- /package/dist/{chunk-2VB2O4FQ.js.map → chunk-3CPWWGNK.js.map} +0 -0
- /package/dist/{chunk-7WKP3DYJ.js.map → chunk-3ED2U6XE.js.map} +0 -0
- /package/dist/{chunk-BT3BAGB5.js.map → chunk-3GZA4BUW.js.map} +0 -0
- /package/dist/{chunk-3USJPT2S.js.map → chunk-3IK6UYO6.js.map} +0 -0
- /package/dist/{chunk-6AHATAAY.js.map → chunk-3PZ7JZI2.js.map} +0 -0
- /package/dist/{chunk-JZ4QXS6D.js.map → chunk-4DVJ6ONS.js.map} +0 -0
- /package/dist/{chunk-5QM2WPKV.js.map → chunk-4E3ZJRTZ.js.map} +0 -0
- /package/dist/{chunk-NFDFYWMV.js.map → chunk-4SAWSRAA.js.map} +0 -0
- /package/dist/{chunk-ELL6HSYR.js.map → chunk-53AGXXZM.js.map} +0 -0
- /package/dist/{chunk-G6ZZC543.js.map → chunk-54YW6SZZ.js.map} +0 -0
- /package/dist/{chunk-4SZZAFYQ.js.map → chunk-57AZS3IE.js.map} +0 -0
- /package/dist/{chunk-JW33RV4V.js.map → chunk-5CPEEAFD.js.map} +0 -0
- /package/dist/{chunk-D6L4GHRH.js.map → chunk-5EWSRZ2Y.js.map} +0 -0
- /package/dist/{chunk-PW54V7T5.js.map → chunk-5IE76VCY.js.map} +0 -0
- /package/dist/{chunk-6GXVYAGR.js.map → chunk-5NWEKLDZ.js.map} +0 -0
- /package/dist/{chunk-6UHCBH4G.js.map → chunk-5O2FCCHZ.js.map} +0 -0
- /package/dist/{chunk-2YC6JQRO.js.map → chunk-5QAY6K77.js.map} +0 -0
- /package/dist/{chunk-EYUT5Y6V.js.map → chunk-6DK6Z4UN.js.map} +0 -0
- /package/dist/{chunk-PW4IMTYR.js.map → chunk-6DVCC7QS.js.map} +0 -0
- /package/dist/{chunk-7WIDB4PL.js.map → chunk-6JHU2UBS.js.map} +0 -0
- /package/dist/{chunk-CQH4FWYA.js.map → chunk-6PZ7OBYU.js.map} +0 -0
- /package/dist/{chunk-VFQ3H6CO.js.map → chunk-6WGRDRMA.js.map} +0 -0
- /package/dist/{chunk-MTTGSQA5.js.map → chunk-77WAKEAH.js.map} +0 -0
- /package/dist/{chunk-O5YWDLYF.js.map → chunk-7TDO3CUM.js.map} +0 -0
- /package/dist/{chunk-2AHTY7OT.js.map → chunk-7TIX2UAR.js.map} +0 -0
- /package/dist/{chunk-FOGNA3BU.js.map → chunk-7V5REBCP.js.map} +0 -0
- /package/dist/{chunk-2JENKGCE.js.map → chunk-7VMZGLYI.js.map} +0 -0
- /package/dist/{chunk-E7UIVD7F.js.map → chunk-7W37NS3I.js.map} +0 -0
- /package/dist/{chunk-ZDLYSXKN.js.map → chunk-7X6SDK2C.js.map} +0 -0
- /package/dist/{chunk-ZAMTKG5U.js.map → chunk-7ZNUHRP5.js.map} +0 -0
- /package/dist/{chunk-DMMJIFKA.js.map → chunk-A36PZALD.js.map} +0 -0
- /package/dist/{chunk-WV2KPJUW.js.map → chunk-AUI6VA63.js.map} +0 -0
- /package/dist/{chunk-Q2EXYSMO.js.map → chunk-AW2MQB37.js.map} +0 -0
- /package/dist/{chunk-6WLX3NR3.js.map → chunk-AWKES45Y.js.map} +0 -0
- /package/dist/{chunk-OD3DCCCB.js.map → chunk-AXHZYXUV.js.map} +0 -0
- /package/dist/{chunk-QDTKECT4.js.map → chunk-BHNSJVBC.js.map} +0 -0
- /package/dist/{chunk-FTCHM755.js.map → chunk-BJEJFISW.js.map} +0 -0
- /package/dist/{chunk-B2I5ZW35.js.map → chunk-BJFH6JI5.js.map} +0 -0
- /package/dist/{chunk-RIPS7GFR.js.map → chunk-BMICEQZQ.js.map} +0 -0
- /package/dist/{chunk-BF4SADKX.js.map → chunk-BTLBYBLU.js.map} +0 -0
- /package/dist/{chunk-U5EFEMYU.js.map → chunk-BXBDYNRP.js.map} +0 -0
- /package/dist/{chunk-BTSYDIVJ.js.map → chunk-C372BFOV.js.map} +0 -0
- /package/dist/{chunk-MLJADQFI.js.map → chunk-CMKGILJK.js.map} +0 -0
- /package/dist/{chunk-DKT3N37I.js.map → chunk-CRAOSVHC.js.map} +0 -0
- /package/dist/{chunk-WNDAKLHG.js.map → chunk-CRU35QQH.js.map} +0 -0
- /package/dist/{chunk-2XNG2KNT.js.map → chunk-CUIWCGMA.js.map} +0 -0
- /package/dist/{chunk-QWL4L366.js.map → chunk-D5TWNFFE.js.map} +0 -0
- /package/dist/{chunk-SWIHWCTW.js.map → chunk-DF5EAHDN.js.map} +0 -0
- /package/dist/{chunk-HUAGBS4O.js.map → chunk-DJAXC5OK.js.map} +0 -0
- /package/dist/{chunk-FXSHP4JZ.js.map → chunk-DXBYWSL5.js.map} +0 -0
- /package/dist/{chunk-5MUJDC6C.js.map → chunk-DXR5PDFP.js.map} +0 -0
- /package/dist/{chunk-NXWBBZJV.js.map → chunk-DZWARC4M.js.map} +0 -0
- /package/dist/{chunk-GXXZ3WAK.js.map → chunk-DZXEDSQI.js.map} +0 -0
- /package/dist/{chunk-Q52CXW6C.js.map → chunk-E7XERZWC.js.map} +0 -0
- /package/dist/{chunk-4NBTZRKT.js.map → chunk-ECJBYNLJ.js.map} +0 -0
- /package/dist/{chunk-QE3ZFGI3.js.map → chunk-EDI6SJ2N.js.map} +0 -0
- /package/dist/{chunk-E6NRSRBE.js.map → chunk-EWSOC6WF.js.map} +0 -0
- /package/dist/{chunk-TA5CFTO4.js.map → chunk-F2OPHAUN.js.map} +0 -0
- /package/dist/{chunk-5DTST3TP.js.map → chunk-F4ISQGGM.js.map} +0 -0
- /package/dist/{chunk-MBIBB6GI.js.map → chunk-FO4LYKJL.js.map} +0 -0
- /package/dist/{chunk-EUBGLFFR.js.map → chunk-FPXASDG5.js.map} +0 -0
- /package/dist/{chunk-C3HUF3M2.js.map → chunk-FVXBNBHO.js.map} +0 -0
- /package/dist/{chunk-W5MPXR3A.js.map → chunk-FZC5N55X.js.map} +0 -0
- /package/dist/{chunk-MA6O7CM6.js.map → chunk-GAVYGBFI.js.map} +0 -0
- /package/dist/{chunk-REX6JIC7.js.map → chunk-GKVJIDHF.js.map} +0 -0
- /package/dist/{chunk-EW6RNWSH.js.map → chunk-GVN5SZLX.js.map} +0 -0
- /package/dist/{chunk-KVFEZDBO.js.map → chunk-H3T7IWNA.js.map} +0 -0
- /package/dist/{chunk-I6VBHT7S.js.map → chunk-HAX4LCR5.js.map} +0 -0
- /package/dist/{chunk-OBMCZO7E.js.map → chunk-HC4JFZVU.js.map} +0 -0
- /package/dist/{chunk-UJUQ2QOX.js.map → chunk-HEFPPMBQ.js.map} +0 -0
- /package/dist/{chunk-DOFJZ2JU.js.map → chunk-HNLR7Q4Z.js.map} +0 -0
- /package/dist/{chunk-GE33BGB7.js.map → chunk-HSOXMJOT.js.map} +0 -0
- /package/dist/{chunk-AB5MBIXY.js.map → chunk-I4MRDSUF.js.map} +0 -0
- /package/dist/{chunk-AFBJTUFK.js.map → chunk-I4QEJ62Y.js.map} +0 -0
- /package/dist/{chunk-6ED2YWBT.js.map → chunk-I5B5L6Q4.js.map} +0 -0
- /package/dist/{chunk-C5QCAOES.js.map → chunk-I5QZJODL.js.map} +0 -0
- /package/dist/{chunk-76ERNKIZ.js.map → chunk-I7ITSXSJ.js.map} +0 -0
- /package/dist/{chunk-OMH7R6I3.js.map → chunk-I7XIZRFD.js.map} +0 -0
- /package/dist/{chunk-E337C2VK.js.map → chunk-IDANQPRH.js.map} +0 -0
- /package/dist/{chunk-3FD76LXM.js.map → chunk-IFB3WJ36.js.map} +0 -0
- /package/dist/{chunk-ZIT5KD4Q.js.map → chunk-IHTAKKTK.js.map} +0 -0
- /package/dist/{chunk-QHNVNR7B.js.map → chunk-ILDXWY37.js.map} +0 -0
- /package/dist/{chunk-GQ67HSJY.js.map → chunk-IMDQUHBJ.js.map} +0 -0
- /package/dist/{chunk-DSXVY5WZ.js.map → chunk-IMZCQBOT.js.map} +0 -0
- /package/dist/{chunk-WEZ5PXZP.js.map → chunk-IXPTECSC.js.map} +0 -0
- /package/dist/{chunk-NY2QWROL.js.map → chunk-J255A3N5.js.map} +0 -0
- /package/dist/{chunk-O2UWH5RG.js.map → chunk-J5F5HPPW.js.map} +0 -0
- /package/dist/{chunk-VIEFJ2DM.js.map → chunk-JEA3QDX7.js.map} +0 -0
- /package/dist/{chunk-TF4ZVJLI.js.map → chunk-JEUPAVYY.js.map} +0 -0
- /package/dist/{chunk-ZG447FSS.js.map → chunk-JKHKLL5W.js.map} +0 -0
- /package/dist/{chunk-FQFKHNC7.js.map → chunk-JQL7ZH6C.js.map} +0 -0
- /package/dist/{chunk-776QZ573.js.map → chunk-JWB44UGJ.js.map} +0 -0
- /package/dist/{chunk-ICNNNOXE.js.map → chunk-JZ4NLCAP.js.map} +0 -0
- /package/dist/{chunk-TNKWOUWP.js.map → chunk-K2A5PXQ5.js.map} +0 -0
- /package/dist/{chunk-SRFARKXC.js.map → chunk-K56XV3C3.js.map} +0 -0
- /package/dist/{chunk-QAJ53XBW.js.map → chunk-K6GAXXVA.js.map} +0 -0
- /package/dist/{chunk-MF3ZFB4H.js.map → chunk-KCBMFSMS.js.map} +0 -0
- /package/dist/{chunk-VLXM36VS.js.map → chunk-KF2FV3ZJ.js.map} +0 -0
- /package/dist/{chunk-YSVD5HI4.js.map → chunk-KJD65EJP.js.map} +0 -0
- /package/dist/{chunk-K42OUZQ3.js.map → chunk-KLEUWIMZ.js.map} +0 -0
- /package/dist/{chunk-PENGLDR5.js.map → chunk-KODELWYT.js.map} +0 -0
- /package/dist/{chunk-TZAO65I4.js.map → chunk-KRDR5RJD.js.map} +0 -0
- /package/dist/{chunk-KHJ5PXFM.js.map → chunk-KUDGXAF7.js.map} +0 -0
- /package/dist/{chunk-6H4SJBPE.js.map → chunk-KYS77RPN.js.map} +0 -0
- /package/dist/{chunk-OWAYJ2OV.js.map → chunk-L7YTNTIK.js.map} +0 -0
- /package/dist/{chunk-YYLMZLI6.js.map → chunk-LHPNABDH.js.map} +0 -0
- /package/dist/{chunk-LM2W5YAT.js.map → chunk-MFROMEKA.js.map} +0 -0
- /package/dist/{chunk-AXBSYWKX.js.map → chunk-MIHN76LX.js.map} +0 -0
- /package/dist/{chunk-4LPOWQJY.js.map → chunk-MIYFS2XN.js.map} +0 -0
- /package/dist/{chunk-KKI55ZMW.js.map → chunk-MJUCFQMS.js.map} +0 -0
- /package/dist/{chunk-ZUDOVDKR.js.map → chunk-MM4FNWI4.js.map} +0 -0
- /package/dist/{chunk-M4SDVTKJ.js.map → chunk-MNZG4OHU.js.map} +0 -0
- /package/dist/{chunk-EILSAQVJ.js.map → chunk-N6AACDUW.js.map} +0 -0
- /package/dist/{chunk-BM3NEZ6X.js.map → chunk-NC55IFN3.js.map} +0 -0
- /package/dist/{chunk-MJJGJMYJ.js.map → chunk-NC7PVOEK.js.map} +0 -0
- /package/dist/{chunk-LA5T52RM.js.map → chunk-NCYMNCJO.js.map} +0 -0
- /package/dist/{chunk-HLOEPV5C.js.map → chunk-ND2BXV3P.js.map} +0 -0
- /package/dist/{chunk-UJDOWCQ3.js.map → chunk-NDBTFUO6.js.map} +0 -0
- /package/dist/{chunk-K5TOVX5A.js.map → chunk-NDQJZ7HF.js.map} +0 -0
- /package/dist/{chunk-35737UT4.js.map → chunk-NGJJJPZZ.js.map} +0 -0
- /package/dist/{chunk-42CMQ5VR.js.map → chunk-NJTSNNE7.js.map} +0 -0
- /package/dist/{chunk-FBTJKSTM.js.map → chunk-NRTE7DNV.js.map} +0 -0
- /package/dist/{chunk-YT3WGNG6.js.map → chunk-NULUNM7H.js.map} +0 -0
- /package/dist/{chunk-7XOVTPDI.js.map → chunk-NUNZS36W.js.map} +0 -0
- /package/dist/{chunk-FC2FTSK3.js.map → chunk-NW53H5RW.js.map} +0 -0
- /package/dist/{chunk-TW3LKRJF.js.map → chunk-NXCMHIKI.js.map} +0 -0
- /package/dist/{chunk-CGK6ALQU.js.map → chunk-O3LKCBP5.js.map} +0 -0
- /package/dist/{chunk-QIK2Q6N5.js.map → chunk-O6N4ABCA.js.map} +0 -0
- /package/dist/{chunk-73NXYYWE.js.map → chunk-O732GAFC.js.map} +0 -0
- /package/dist/{chunk-R3J2PTVQ.js.map → chunk-OF4TIKYC.js.map} +0 -0
- /package/dist/{chunk-BUBNGKWG.js.map → chunk-OMPVOMPP.js.map} +0 -0
- /package/dist/{chunk-4OXI6HCV.js.map → chunk-OPJJSKUK.js.map} +0 -0
- /package/dist/{chunk-4Y6BK7IU.js.map → chunk-OPWCMA4D.js.map} +0 -0
- /package/dist/{chunk-ADNMXBCX.js.map → chunk-ORJPS5VN.js.map} +0 -0
- /package/dist/{chunk-SKMNW4SW.js.map → chunk-OSY5K7L7.js.map} +0 -0
- /package/dist/{chunk-L4I665WK.js.map → chunk-OV6QJRT4.js.map} +0 -0
- /package/dist/{chunk-7O5CGGIQ.js.map → chunk-OVKYVZMW.js.map} +0 -0
- /package/dist/{chunk-7BYWOFVH.js.map → chunk-OZCBM3UC.js.map} +0 -0
- /package/dist/{chunk-ALVRWCXE.js.map → chunk-P3A2EINJ.js.map} +0 -0
- /package/dist/{chunk-BZO5ZMUP.js.map → chunk-PTAG4PDC.js.map} +0 -0
- /package/dist/{chunk-QHHSUR2Y.js.map → chunk-PTF5B7TJ.js.map} +0 -0
- /package/dist/{chunk-O2IOPP3R.js.map → chunk-Q3DPEYX4.js.map} +0 -0
- /package/dist/{chunk-G7FU6PUA.js.map → chunk-QB2KMIDP.js.map} +0 -0
- /package/dist/{chunk-64PO2WXU.js.map → chunk-QCSJ4CWE.js.map} +0 -0
- /package/dist/{chunk-YYICQDK4.js.map → chunk-QIOQ2NPQ.js.map} +0 -0
- /package/dist/{chunk-NB2HMRT2.js.map → chunk-QK5EFEUT.js.map} +0 -0
- /package/dist/{chunk-366XZ4PM.js.map → chunk-QPQBLYQJ.js.map} +0 -0
- /package/dist/{chunk-Q6XQ2R37.js.map → chunk-QPSGCC5D.js.map} +0 -0
- /package/dist/{chunk-JJZPLGIP.js.map → chunk-QZAAUQRN.js.map} +0 -0
- /package/dist/{chunk-VGUN6VB2.js.map → chunk-RGBI63KJ.js.map} +0 -0
- /package/dist/{chunk-LRN6GYAZ.js.map → chunk-RLBKLAEY.js.map} +0 -0
- /package/dist/{chunk-F7U3QPZ3.js.map → chunk-RMFKVOM7.js.map} +0 -0
- /package/dist/{chunk-Q4EFRI6X.js.map → chunk-ROKQU7WG.js.map} +0 -0
- /package/dist/{chunk-7QOHRZ67.js.map → chunk-RPVREAU7.js.map} +0 -0
- /package/dist/{chunk-VGWWEVSD.js.map → chunk-RQKLF42C.js.map} +0 -0
- /package/dist/{chunk-2VTTKH23.js.map → chunk-SEO7TICN.js.map} +0 -0
- /package/dist/{chunk-3QNRBEYH.js.map → chunk-SHHJCL7X.js.map} +0 -0
- /package/dist/{chunk-E6SQKHAU.js.map → chunk-SIRLACNZ.js.map} +0 -0
- /package/dist/{chunk-H2TCRX3H.js.map → chunk-SKPHMYAA.js.map} +0 -0
- /package/dist/{chunk-YDCUBUWH.js.map → chunk-SODC7T6L.js.map} +0 -0
- /package/dist/{chunk-TNYFHKVV.js.map → chunk-SQJIKMN3.js.map} +0 -0
- /package/dist/{chunk-DO74DQC7.js.map → chunk-SVINDKVW.js.map} +0 -0
- /package/dist/{chunk-CPYGO76Q.js.map → chunk-SYCDHPZF.js.map} +0 -0
- /package/dist/{chunk-UQ3IM6FY.js.map → chunk-T2QX3FDP.js.map} +0 -0
- /package/dist/{chunk-NWGNFN3N.js.map → chunk-T3OWFVMS.js.map} +0 -0
- /package/dist/{chunk-N3OARGH2.js.map → chunk-T6XI5FLY.js.map} +0 -0
- /package/dist/{chunk-MQG7RV3B.js.map → chunk-T7OXJZCX.js.map} +0 -0
- /package/dist/{chunk-2T7DX6KR.js.map → chunk-TAT5USZN.js.map} +0 -0
- /package/dist/{chunk-ICX64J4U.js.map → chunk-TPQTRNER.js.map} +0 -0
- /package/dist/{chunk-D2TOWEYH.js.map → chunk-TUIN4MB7.js.map} +0 -0
- /package/dist/{chunk-LQDUHU3Y.js.map → chunk-TX3VECZU.js.map} +0 -0
- /package/dist/{chunk-TG7DADJR.js.map → chunk-TXLIEOJX.js.map} +0 -0
- /package/dist/{chunk-2ZVRJRXC.js.map → chunk-U3DN4HEY.js.map} +0 -0
- /package/dist/{chunk-PSMAWRPL.js.map → chunk-U7XM7CB4.js.map} +0 -0
- /package/dist/{chunk-4TQL3WP2.js.map → chunk-UJK53QFL.js.map} +0 -0
- /package/dist/{chunk-RBRX5ZS3.js.map → chunk-UMTXA2TH.js.map} +0 -0
- /package/dist/{chunk-36MIDGAH.js.map → chunk-UPDSXFK5.js.map} +0 -0
- /package/dist/{chunk-OYXBFSGK.js.map → chunk-UTIAXH52.js.map} +0 -0
- /package/dist/{chunk-5WUN7XPD.js.map → chunk-UVN5TMHU.js.map} +0 -0
- /package/dist/{chunk-UYE47LO6.js.map → chunk-VGYXW3VG.js.map} +0 -0
- /package/dist/{chunk-IKUNOX7F.js.map → chunk-VS7AHPCZ.js.map} +0 -0
- /package/dist/{chunk-MYUFMVCH.js.map → chunk-VTTAJOQ7.js.map} +0 -0
- /package/dist/{chunk-K63HGHZX.js.map → chunk-VWPOLUAO.js.map} +0 -0
- /package/dist/{chunk-GA4YEAMX.js.map → chunk-X3MWB2QU.js.map} +0 -0
- /package/dist/{chunk-I36GSRUJ.js.map → chunk-X6KAJI3V.js.map} +0 -0
- /package/dist/{chunk-IKMUFDVS.js.map → chunk-XBLRHV5R.js.map} +0 -0
- /package/dist/{chunk-XOSQP3YA.js.map → chunk-XDFP2LMW.js.map} +0 -0
- /package/dist/{chunk-MW7Y3T55.js.map → chunk-XEQMZB3C.js.map} +0 -0
- /package/dist/{chunk-B3LMRTRF.js.map → chunk-XEYLT5VA.js.map} +0 -0
- /package/dist/{chunk-UI4HI5QK.js.map → chunk-XHIQ5I6N.js.map} +0 -0
- /package/dist/{chunk-U6M4LS3M.js.map → chunk-XLH7QY2R.js.map} +0 -0
- /package/dist/{chunk-OSA5EQG5.js.map → chunk-XWFAMUZQ.js.map} +0 -0
- /package/dist/{chunk-6MT3HHUB.js.map → chunk-Y4OBB2VN.js.map} +0 -0
- /package/dist/{chunk-CZP5QXNB.js.map → chunk-YCVD6CI3.js.map} +0 -0
- /package/dist/{chunk-APW4T4SW.js.map → chunk-YENLNISG.js.map} +0 -0
- /package/dist/{chunk-JWPA6ZPZ.js.map → chunk-YIRVLKAX.js.map} +0 -0
- /package/dist/{chunk-LQ62ECE6.js.map → chunk-YL73CVNK.js.map} +0 -0
- /package/dist/{chunk-ILKDYBON.js.map → chunk-YLS6QE5G.js.map} +0 -0
- /package/dist/{chunk-YBKVGLQR.js.map → chunk-YPWU5KPE.js.map} +0 -0
- /package/dist/{chunk-IKJLSBUI.js.map → chunk-YQXTDZSU.js.map} +0 -0
- /package/dist/{chunk-TPMZBOFH.js.map → chunk-YSJEAAOL.js.map} +0 -0
- /package/dist/{chunk-W3BFRR2G.js.map → chunk-YWIFM7D7.js.map} +0 -0
- /package/dist/{chunk-WTJ4PLMU.js.map → chunk-YWVI6ZMK.js.map} +0 -0
- /package/dist/{chunk-5KWMYPJV.js.map → chunk-Z4FMAFNH.js.map} +0 -0
- /package/dist/{chunk-W5OWKVZG.js.map → chunk-Z654FWNU.js.map} +0 -0
- /package/dist/{chunk-5FH5LQVS.js.map → chunk-Z7Y523PS.js.map} +0 -0
- /package/dist/{chunk-HLL4PBO7.js.map → chunk-ZD67RM6G.js.map} +0 -0
- /package/dist/{chunk-IVYJX3OY.js.map → chunk-ZEG4VPBL.js.map} +0 -0
- /package/dist/{chunk-K6R5T44I.js.map → chunk-ZLYCOBHW.js.map} +0 -0
- /package/dist/{chunk-VADHIT26.js.map → chunk-ZNJ5MTXV.js.map} +0 -0
- /package/dist/{chunk-2KYQC4T5.js.map → chunk-ZSGY3H53.js.map} +0 -0
- /package/dist/{chunk-BKP43KK4.js.map → chunk-ZTPXACWB.js.map} +0 -0
- /package/dist/{chunk-JCY4CMDH.js.map → chunk-ZUA3JMI6.js.map} +0 -0
- /package/dist/{chunk-IGVVXLKJ.js.map → chunk-ZYAZUPPV.js.map} +0 -0
- /package/dist/{computer-viewer-LPZ763KF.js.map → computer-viewer-TDDO25AV.js.map} +0 -0
- /package/dist/{embedded-new-voice-YVMKSLKJ.js.map → embedded-new-voice-2G3VLPVQ.js.map} +0 -0
- /package/dist/{embedded-voice-BJPQFXSU.js.map → embedded-voice-T5IWOWGD.js.map} +0 -0
- /package/dist/{fleet-decision-row-AA4H5CDT.js.map → fleet-decision-row-WM64KXP3.js.map} +0 -0
- /package/dist/{model-policy-picker-menu-HSMWVO4P.js.map → model-policy-picker-menu-SMC6J6QN.js.map} +0 -0
- /package/dist/{payment-page-card-3LTSFJGN.js.map → payment-page-card-G4U63KUV.js.map} +0 -0
- /package/dist/{platform-activity-row-5VYV6TX4.js.map → platform-activity-row-BUZGZAKZ.js.map} +0 -0
- /package/dist/{queue-surface-implementation-NXHZUKD2.js.map → queue-surface-implementation-4KUZ4PJV.js.map} +0 -0
- /package/dist/{sandbox-files-YCMLQUFU.js.map → sandbox-files-ESDMOFSD.js.map} +0 -0
- /package/dist/{session-connect-cards-KSQLMRM5.js.map → session-connect-cards-Q53KMMYY.js.map} +0 -0
- /package/dist/{session-realtime-ZR6JLG3Y.js.map → session-realtime-CF3I35WJ.js.map} +0 -0
- /package/dist/{timeline-annotation-markers-YAHDPWVG.js.map → timeline-annotation-markers-CJK4RYZ4.js.map} +0 -0
- /package/dist/{timeline-annotation-selection-KHXNCEJP.js.map → timeline-annotation-selection-67GF5H26.js.map} +0 -0
- /package/dist/{timeline-annotations-dialog-Y4XD3N7B.js.map → timeline-annotations-dialog-ONJPQDJQ.js.map} +0 -0
|
@@ -0,0 +1,2058 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
InlineDisabledReason,
|
|
4
|
+
SelectMenuPanel
|
|
5
|
+
} from "./chunk-3CPWWGNK.js";
|
|
6
|
+
import {
|
|
7
|
+
MENU_CHECK_CLASS,
|
|
8
|
+
MENU_SURFACE_CLASS
|
|
9
|
+
} from "./chunk-5OTQA7CM.js";
|
|
10
|
+
import {
|
|
11
|
+
containedPortal
|
|
12
|
+
} from "./chunk-UD6AAZSC.js";
|
|
13
|
+
import {
|
|
14
|
+
cn
|
|
15
|
+
} from "./chunk-TXS65BB2.js";
|
|
16
|
+
import {
|
|
17
|
+
createOpenGeniText,
|
|
18
|
+
useOpenGeniText
|
|
19
|
+
} from "./chunk-7T2ZE3VT.js";
|
|
20
|
+
|
|
21
|
+
// src/ui/cadence-picker.tsx
|
|
22
|
+
import {
|
|
23
|
+
useEffect,
|
|
24
|
+
useId,
|
|
25
|
+
useMemo,
|
|
26
|
+
useRef,
|
|
27
|
+
useState
|
|
28
|
+
} from "react";
|
|
29
|
+
import {
|
|
30
|
+
CalendarClockIcon,
|
|
31
|
+
CalendarIcon,
|
|
32
|
+
CheckIcon,
|
|
33
|
+
ChevronDownIcon,
|
|
34
|
+
ChevronLeftIcon,
|
|
35
|
+
ChevronRightIcon,
|
|
36
|
+
CircleAlertIcon,
|
|
37
|
+
GlobeIcon,
|
|
38
|
+
SearchIcon
|
|
39
|
+
} from "lucide-react";
|
|
40
|
+
import { Popover as PopoverPrimitive, Select as SelectPrimitive } from "radix-ui";
|
|
41
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
42
|
+
var SelectContainedPortal = containedPortal(SelectPrimitive.Portal);
|
|
43
|
+
var PopoverContainedPortal = containedPortal(PopoverPrimitive.Portal);
|
|
44
|
+
var WEEKDAYS = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
|
|
45
|
+
var WORKDAYS = ["mon", "tue", "wed", "thu", "fri"];
|
|
46
|
+
var ENGLISH = createOpenGeniText();
|
|
47
|
+
var WEEKDAY_KEYS = {
|
|
48
|
+
mon: {
|
|
49
|
+
short: "cadence.day.mon.short",
|
|
50
|
+
long: "cadence.day.mon.long",
|
|
51
|
+
plural: "cadence.day.mon.plural"
|
|
52
|
+
},
|
|
53
|
+
tue: {
|
|
54
|
+
short: "cadence.day.tue.short",
|
|
55
|
+
long: "cadence.day.tue.long",
|
|
56
|
+
plural: "cadence.day.tue.plural"
|
|
57
|
+
},
|
|
58
|
+
wed: {
|
|
59
|
+
short: "cadence.day.wed.short",
|
|
60
|
+
long: "cadence.day.wed.long",
|
|
61
|
+
plural: "cadence.day.wed.plural"
|
|
62
|
+
},
|
|
63
|
+
thu: {
|
|
64
|
+
short: "cadence.day.thu.short",
|
|
65
|
+
long: "cadence.day.thu.long",
|
|
66
|
+
plural: "cadence.day.thu.plural"
|
|
67
|
+
},
|
|
68
|
+
fri: {
|
|
69
|
+
short: "cadence.day.fri.short",
|
|
70
|
+
long: "cadence.day.fri.long",
|
|
71
|
+
plural: "cadence.day.fri.plural"
|
|
72
|
+
},
|
|
73
|
+
sat: {
|
|
74
|
+
short: "cadence.day.sat.short",
|
|
75
|
+
long: "cadence.day.sat.long",
|
|
76
|
+
plural: "cadence.day.sat.plural"
|
|
77
|
+
},
|
|
78
|
+
sun: {
|
|
79
|
+
short: "cadence.day.sun.short",
|
|
80
|
+
long: "cadence.day.sun.long",
|
|
81
|
+
plural: "cadence.day.sun.plural"
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
function weekdayName(t, day, form) {
|
|
85
|
+
return t(WEEKDAY_KEYS[day][form]);
|
|
86
|
+
}
|
|
87
|
+
var API_WEEKDAYS = {
|
|
88
|
+
mon: "MONDAY",
|
|
89
|
+
tue: "TUESDAY",
|
|
90
|
+
wed: "WEDNESDAY",
|
|
91
|
+
thu: "THURSDAY",
|
|
92
|
+
fri: "FRIDAY",
|
|
93
|
+
sat: "SATURDAY",
|
|
94
|
+
sun: "SUNDAY"
|
|
95
|
+
};
|
|
96
|
+
var MONTH_KEYS = [
|
|
97
|
+
{ short: "cadence.month.jan.short", long: "cadence.month.jan.long" },
|
|
98
|
+
{ short: "cadence.month.feb.short", long: "cadence.month.feb.long" },
|
|
99
|
+
{ short: "cadence.month.mar.short", long: "cadence.month.mar.long" },
|
|
100
|
+
{ short: "cadence.month.apr.short", long: "cadence.month.apr.long" },
|
|
101
|
+
{ short: "cadence.month.may.short", long: "cadence.month.may.long" },
|
|
102
|
+
{ short: "cadence.month.jun.short", long: "cadence.month.jun.long" },
|
|
103
|
+
{ short: "cadence.month.jul.short", long: "cadence.month.jul.long" },
|
|
104
|
+
{ short: "cadence.month.aug.short", long: "cadence.month.aug.long" },
|
|
105
|
+
{ short: "cadence.month.sep.short", long: "cadence.month.sep.long" },
|
|
106
|
+
{ short: "cadence.month.oct.short", long: "cadence.month.oct.long" },
|
|
107
|
+
{ short: "cadence.month.nov.short", long: "cadence.month.nov.long" },
|
|
108
|
+
{ short: "cadence.month.dec.short", long: "cadence.month.dec.long" }
|
|
109
|
+
];
|
|
110
|
+
function monthName(t, month, form) {
|
|
111
|
+
return t(MONTH_KEYS[month - 1][form]);
|
|
112
|
+
}
|
|
113
|
+
var TYPED_MONTHS = [
|
|
114
|
+
"january",
|
|
115
|
+
"february",
|
|
116
|
+
"march",
|
|
117
|
+
"april",
|
|
118
|
+
"may",
|
|
119
|
+
"june",
|
|
120
|
+
"july",
|
|
121
|
+
"august",
|
|
122
|
+
"september",
|
|
123
|
+
"october",
|
|
124
|
+
"november",
|
|
125
|
+
"december"
|
|
126
|
+
];
|
|
127
|
+
var UNIT_SECONDS = { minutes: 60, hours: 3600, days: 86400 };
|
|
128
|
+
var UNIT_LIMITS = { minutes: 1440, hours: 168, days: 365 };
|
|
129
|
+
var DAY_MS = 864e5;
|
|
130
|
+
var DEFAULT_CADENCE_TIME = "09:00";
|
|
131
|
+
var partsFormatters = /* @__PURE__ */ new Map();
|
|
132
|
+
function partsFormatter(timeZone) {
|
|
133
|
+
let formatter = partsFormatters.get(timeZone);
|
|
134
|
+
if (!formatter) {
|
|
135
|
+
formatter = new Intl.DateTimeFormat("en-US", {
|
|
136
|
+
timeZone,
|
|
137
|
+
hourCycle: "h23",
|
|
138
|
+
year: "numeric",
|
|
139
|
+
month: "numeric",
|
|
140
|
+
day: "numeric",
|
|
141
|
+
hour: "numeric",
|
|
142
|
+
minute: "numeric",
|
|
143
|
+
second: "numeric"
|
|
144
|
+
});
|
|
145
|
+
partsFormatters.set(timeZone, formatter);
|
|
146
|
+
}
|
|
147
|
+
return formatter;
|
|
148
|
+
}
|
|
149
|
+
function zonedParts(date, timeZone) {
|
|
150
|
+
const values = {};
|
|
151
|
+
for (const part of partsFormatter(timeZone).formatToParts(date)) {
|
|
152
|
+
if (part.type !== "literal") values[part.type] = Number(part.value);
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
year: values.year ?? 1970,
|
|
156
|
+
month: values.month ?? 1,
|
|
157
|
+
day: values.day ?? 1,
|
|
158
|
+
hour: (values.hour ?? 0) % 24,
|
|
159
|
+
minute: values.minute ?? 0,
|
|
160
|
+
second: values.second ?? 0
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function offsetMs(date, timeZone) {
|
|
164
|
+
const p = zonedParts(date, timeZone);
|
|
165
|
+
const asUtc = Date.UTC(p.year, p.month - 1, p.day, p.hour, p.minute, p.second);
|
|
166
|
+
return asUtc - Math.floor(date.getTime() / 1e3) * 1e3;
|
|
167
|
+
}
|
|
168
|
+
function zonedTimeToUtc(date, time, timeZone) {
|
|
169
|
+
const guess = Date.UTC(date.year, date.month - 1, date.day, time.hour, time.minute);
|
|
170
|
+
const first = offsetMs(new Date(guess), timeZone);
|
|
171
|
+
let instant = guess - first;
|
|
172
|
+
const second = offsetMs(new Date(instant), timeZone);
|
|
173
|
+
if (second !== first) instant = guess - second;
|
|
174
|
+
return new Date(instant);
|
|
175
|
+
}
|
|
176
|
+
function localDateOf(date, timeZone) {
|
|
177
|
+
const { year, month, day } = zonedParts(date, timeZone);
|
|
178
|
+
return { year, month, day };
|
|
179
|
+
}
|
|
180
|
+
function addDays(date, days) {
|
|
181
|
+
const next = new Date(Date.UTC(date.year, date.month - 1, date.day + days));
|
|
182
|
+
return { year: next.getUTCFullYear(), month: next.getUTCMonth() + 1, day: next.getUTCDate() };
|
|
183
|
+
}
|
|
184
|
+
function dayNumber(date) {
|
|
185
|
+
return Date.UTC(date.year, date.month - 1, date.day) / DAY_MS;
|
|
186
|
+
}
|
|
187
|
+
function weekdayOf(date) {
|
|
188
|
+
const index = (new Date(Date.UTC(date.year, date.month - 1, date.day)).getUTCDay() + 6) % 7;
|
|
189
|
+
return WEEKDAYS[index];
|
|
190
|
+
}
|
|
191
|
+
function daysInMonth(year, month) {
|
|
192
|
+
return new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
193
|
+
}
|
|
194
|
+
function formatLocalDate(date) {
|
|
195
|
+
return `${date.year}-${pad(date.month)}-${pad(date.day)}`;
|
|
196
|
+
}
|
|
197
|
+
function parseLocalDate(value) {
|
|
198
|
+
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
|
|
199
|
+
if (!match) return null;
|
|
200
|
+
const date = { year: Number(match[1]), month: Number(match[2]), day: Number(match[3]) };
|
|
201
|
+
if (date.month < 1 || date.month > 12) return null;
|
|
202
|
+
if (date.day < 1 || date.day > daysInMonth(date.year, date.month)) return null;
|
|
203
|
+
return date;
|
|
204
|
+
}
|
|
205
|
+
function timeZoneLabels(timeZone, text = ENGLISH) {
|
|
206
|
+
if (timeZone === "UTC" || timeZone === "Etc/UTC") return { label: "UTC", shortLabel: "UTC" };
|
|
207
|
+
const city = (timeZone.split("/").pop() ?? timeZone).replaceAll("_", " ");
|
|
208
|
+
return { label: text("cadence.zoneTime", { city }), shortLabel: city };
|
|
209
|
+
}
|
|
210
|
+
function pad(value) {
|
|
211
|
+
return String(value).padStart(2, "0");
|
|
212
|
+
}
|
|
213
|
+
function parseTime(value) {
|
|
214
|
+
const match = /^([01]\d|2[0-3]):([0-5]\d)$/.exec(value);
|
|
215
|
+
if (!match) return null;
|
|
216
|
+
return { hour: Number(match[1]), minute: Number(match[2]) };
|
|
217
|
+
}
|
|
218
|
+
function normalizeTime(input) {
|
|
219
|
+
const text = input.trim().toLowerCase().replace(/\s+/g, "");
|
|
220
|
+
if (!text) return null;
|
|
221
|
+
const meridiem = /^(\d{1,2})(?:[:.]?(\d{2}))?(am|pm)$/.exec(text);
|
|
222
|
+
if (meridiem) {
|
|
223
|
+
let hour2 = Number(meridiem[1]);
|
|
224
|
+
const minute2 = Number(meridiem[2] ?? "0");
|
|
225
|
+
if (hour2 < 1 || hour2 > 12 || minute2 > 59) return null;
|
|
226
|
+
if (meridiem[3] === "am") hour2 = hour2 === 12 ? 0 : hour2;
|
|
227
|
+
else hour2 = hour2 === 12 ? 12 : hour2 + 12;
|
|
228
|
+
return `${pad(hour2)}:${pad(minute2)}`;
|
|
229
|
+
}
|
|
230
|
+
let hour;
|
|
231
|
+
let minute;
|
|
232
|
+
const separated = /^(\d{1,2})[:.h](\d{1,2})$/.exec(text);
|
|
233
|
+
if (separated) {
|
|
234
|
+
hour = Number(separated[1]);
|
|
235
|
+
minute = Number(separated[2].length === 1 ? `${separated[2]}0` : separated[2]);
|
|
236
|
+
} else if (/^\d{1,2}$/.test(text)) {
|
|
237
|
+
hour = Number(text);
|
|
238
|
+
minute = 0;
|
|
239
|
+
} else if (/^\d{3,4}$/.test(text)) {
|
|
240
|
+
hour = Number(text.slice(0, -2));
|
|
241
|
+
minute = Number(text.slice(-2));
|
|
242
|
+
} else {
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
if (hour > 23 || minute > 59) return null;
|
|
246
|
+
return `${pad(hour)}:${pad(minute)}`;
|
|
247
|
+
}
|
|
248
|
+
function stepTime(value, minutes) {
|
|
249
|
+
const time = parseTime(value) ?? parseTime(DEFAULT_CADENCE_TIME);
|
|
250
|
+
const total = ((time.hour * 60 + time.minute + minutes) % 1440 + 1440) % 1440;
|
|
251
|
+
return `${pad(Math.floor(total / 60))}:${pad(total % 60)}`;
|
|
252
|
+
}
|
|
253
|
+
function dateLabel(t, date, today) {
|
|
254
|
+
const words = {
|
|
255
|
+
weekday: weekdayName(t, weekdayOf(date), "short"),
|
|
256
|
+
day: date.day,
|
|
257
|
+
month: monthName(t, date.month, "short")
|
|
258
|
+
};
|
|
259
|
+
return date.year === today.year ? t("cadence.date", words) : t("cadence.dateWithYear", { ...words, year: date.year });
|
|
260
|
+
}
|
|
261
|
+
function relativeDateLabel(t, date, today) {
|
|
262
|
+
const delta = dayNumber(date) - dayNumber(today);
|
|
263
|
+
if (delta === 0) return t("cadence.today");
|
|
264
|
+
if (delta === 1) return t("cadence.tomorrow");
|
|
265
|
+
return dateLabel(t, date, today);
|
|
266
|
+
}
|
|
267
|
+
function joinList(t, items) {
|
|
268
|
+
if (items.length <= 1) return items.join("");
|
|
269
|
+
return t("cadence.and", { head: items.slice(0, -1).join(", "), last: items.at(-1) });
|
|
270
|
+
}
|
|
271
|
+
function formatRunTime(date, { timeZone, now, text = ENGLISH }) {
|
|
272
|
+
const parts = zonedParts(date, timeZone);
|
|
273
|
+
const today = localDateOf(now, timeZone);
|
|
274
|
+
return text("cadence.runTime", {
|
|
275
|
+
date: relativeDateLabel(text, parts, today),
|
|
276
|
+
time: `${pad(parts.hour)}:${pad(parts.minute)}`
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
function describeNextRuns(runs, options) {
|
|
280
|
+
const [first, ...rest] = runs;
|
|
281
|
+
if (!first) return "";
|
|
282
|
+
const t = options.text ?? ENGLISH;
|
|
283
|
+
const today = localDateOf(options.now, options.timeZone);
|
|
284
|
+
const firstParts = zonedParts(first, options.timeZone);
|
|
285
|
+
const labels = rest.map((run, index) => {
|
|
286
|
+
const parts = zonedParts(run, options.timeZone);
|
|
287
|
+
const previous = zonedParts(runs[index], options.timeZone);
|
|
288
|
+
const time = `${pad(parts.hour)}:${pad(parts.minute)}`;
|
|
289
|
+
if (dayNumber(parts) === dayNumber(previous)) return time;
|
|
290
|
+
if (parts.hour === firstParts.hour && parts.minute === firstParts.minute) {
|
|
291
|
+
return relativeDateLabel(t, parts, today);
|
|
292
|
+
}
|
|
293
|
+
return t("cadence.runTime", { date: relativeDateLabel(t, parts, today), time });
|
|
294
|
+
});
|
|
295
|
+
const head = formatRunTime(first, options);
|
|
296
|
+
if (labels.length === 0) return head;
|
|
297
|
+
return t("cadence.then", { first: head, rest: joinList(t, labels) });
|
|
298
|
+
}
|
|
299
|
+
function listDays(t, days, form) {
|
|
300
|
+
const names = sortDays(days).map((day) => weekdayName(t, day, form));
|
|
301
|
+
if (form === "short" && names.length > 2) return names.join(", ");
|
|
302
|
+
return joinList(t, names);
|
|
303
|
+
}
|
|
304
|
+
function sortDays(days) {
|
|
305
|
+
return WEEKDAYS.filter((day) => days.includes(day));
|
|
306
|
+
}
|
|
307
|
+
function sameDays(a, b) {
|
|
308
|
+
const left = sortDays(a);
|
|
309
|
+
const right = sortDays(b);
|
|
310
|
+
return left.length === right.length && left.every((day, index) => day === right[index]);
|
|
311
|
+
}
|
|
312
|
+
function unitLabel(t, every, unit) {
|
|
313
|
+
switch (unit) {
|
|
314
|
+
case "minutes":
|
|
315
|
+
return t("cadence.every.minutes", { count: every });
|
|
316
|
+
case "hours":
|
|
317
|
+
return t("cadence.every.hours", { count: every });
|
|
318
|
+
case "days":
|
|
319
|
+
return t("cadence.every.days", { count: every });
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
function describeCadence(rule, options) {
|
|
323
|
+
const t = options.text ?? ENGLISH;
|
|
324
|
+
const labels = timeZoneLabels(options.timeZone, t);
|
|
325
|
+
const zone = options.timeZoneLabel ?? labels.label;
|
|
326
|
+
const zoneShort = options.timeZoneShortLabel ?? labels.shortLabel;
|
|
327
|
+
const at = (time) => t("cadence.at", { time, zone }).trim();
|
|
328
|
+
const atShort = (time) => t("cadence.atShort", { time, zone: zoneShort });
|
|
329
|
+
switch (rule.frequency) {
|
|
330
|
+
case "hourly":
|
|
331
|
+
return {
|
|
332
|
+
sentence: t("cadence.describe.hourly"),
|
|
333
|
+
short: t("cadence.describe.hourlyShort")
|
|
334
|
+
};
|
|
335
|
+
case "daily":
|
|
336
|
+
return {
|
|
337
|
+
sentence: t("cadence.describe.daily", { at: at(rule.time) }),
|
|
338
|
+
short: t("cadence.describe.dailyShort", { at: atShort(rule.time) })
|
|
339
|
+
};
|
|
340
|
+
case "weekdays":
|
|
341
|
+
return {
|
|
342
|
+
sentence: t("cadence.describe.weekdays", { at: at(rule.time) }),
|
|
343
|
+
short: t("cadence.describe.weekdaysShort", { at: atShort(rule.time) })
|
|
344
|
+
};
|
|
345
|
+
case "weekly": {
|
|
346
|
+
if (sameDays(rule.days, WORKDAYS)) {
|
|
347
|
+
return describeCadence({ frequency: "weekdays", time: rule.time }, options);
|
|
348
|
+
}
|
|
349
|
+
if (sameDays(rule.days, WEEKDAYS)) {
|
|
350
|
+
return describeCadence({ frequency: "daily", time: rule.time }, options);
|
|
351
|
+
}
|
|
352
|
+
if (rule.days.length === 0) {
|
|
353
|
+
return {
|
|
354
|
+
sentence: t("cadence.describe.weeklyNoDays"),
|
|
355
|
+
short: t("cadence.describe.weeklyNoDaysShort")
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
return {
|
|
359
|
+
sentence: t("cadence.describe.weekly", {
|
|
360
|
+
days: listDays(t, rule.days, "long"),
|
|
361
|
+
at: at(rule.time)
|
|
362
|
+
}),
|
|
363
|
+
short: t("cadence.describe.weeklyShort", {
|
|
364
|
+
days: listDays(t, rule.days, "short"),
|
|
365
|
+
at: atShort(rule.time)
|
|
366
|
+
})
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
case "monthly":
|
|
370
|
+
return {
|
|
371
|
+
sentence: t("cadence.describe.monthly", { day: rule.dayOfMonth, at: at(rule.time) }),
|
|
372
|
+
short: t("cadence.describe.monthlyShort", { day: rule.dayOfMonth, at: atShort(rule.time) })
|
|
373
|
+
};
|
|
374
|
+
case "interval": {
|
|
375
|
+
const every = unitLabel(t, rule.every, rule.unit);
|
|
376
|
+
if (rule.unit === "days" && rule.time) {
|
|
377
|
+
return {
|
|
378
|
+
sentence: t("cadence.describe.intervalAt", { every, at: at(rule.time) }),
|
|
379
|
+
short: t("cadence.describe.intervalAtShort", { every, at: atShort(rule.time) })
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
return {
|
|
383
|
+
sentence: t("cadence.describe.interval", { every }),
|
|
384
|
+
short: t("cadence.describe.intervalShort", { every })
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
case "once": {
|
|
388
|
+
const once = onceParts(rule, options.timeZone);
|
|
389
|
+
if (!once) {
|
|
390
|
+
return { sentence: t("cadence.describe.once"), short: t("cadence.describe.onceShort") };
|
|
391
|
+
}
|
|
392
|
+
const today = options.now ? localDateOf(options.now, options.timeZone) : once.date;
|
|
393
|
+
const date = dateLabel(t, once.date, today);
|
|
394
|
+
return {
|
|
395
|
+
sentence: t("cadence.describe.onceOn", { date, at: at(once.time) }),
|
|
396
|
+
short: t("cadence.describe.onceOnShort", { date, time: once.time, zone: zoneShort })
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
function onceParts(rule, timeZone) {
|
|
402
|
+
if ("at" in rule) {
|
|
403
|
+
const instant = new Date(rule.at);
|
|
404
|
+
if (Number.isNaN(instant.getTime())) return null;
|
|
405
|
+
const parts = zonedParts(instant, timeZone);
|
|
406
|
+
return { date: parts, time: `${pad(parts.hour)}:${pad(parts.minute)}` };
|
|
407
|
+
}
|
|
408
|
+
const date = parseLocalDate(rule.date);
|
|
409
|
+
return date ? { date, time: rule.time } : null;
|
|
410
|
+
}
|
|
411
|
+
function normalizeCadenceRule(rule, timeZone) {
|
|
412
|
+
if (rule.frequency !== "once" || !("at" in rule)) return rule;
|
|
413
|
+
const once = onceParts(rule, timeZone);
|
|
414
|
+
if (!once) return rule;
|
|
415
|
+
return { frequency: "once", date: formatLocalDate(once.date), time: once.time };
|
|
416
|
+
}
|
|
417
|
+
function validateCadence(rule, { timeZone, now, text = ENGLISH }) {
|
|
418
|
+
const timeIssue = (time) => time !== void 0 && !parseTime(time) ? { field: "time", message: text("cadence.issue.time") } : null;
|
|
419
|
+
switch (rule.frequency) {
|
|
420
|
+
case "hourly":
|
|
421
|
+
return null;
|
|
422
|
+
case "daily":
|
|
423
|
+
case "weekdays":
|
|
424
|
+
return timeIssue(rule.time);
|
|
425
|
+
case "weekly":
|
|
426
|
+
if (rule.days.length === 0) return { field: "days", message: text("cadence.issue.days") };
|
|
427
|
+
return timeIssue(rule.time);
|
|
428
|
+
case "monthly":
|
|
429
|
+
if (!Number.isInteger(rule.dayOfMonth) || rule.dayOfMonth < 1 || rule.dayOfMonth > 31) {
|
|
430
|
+
return { field: "dayOfMonth", message: text("cadence.issue.dayOfMonth") };
|
|
431
|
+
}
|
|
432
|
+
return timeIssue(rule.time);
|
|
433
|
+
case "interval": {
|
|
434
|
+
const limit = UNIT_LIMITS[rule.unit];
|
|
435
|
+
if (!Number.isInteger(rule.every) || rule.every < 1 || rule.every > limit) {
|
|
436
|
+
return { field: "every", message: text("cadence.issue.every", { limit }) };
|
|
437
|
+
}
|
|
438
|
+
return rule.unit === "days" ? timeIssue(rule.time) : null;
|
|
439
|
+
}
|
|
440
|
+
case "once": {
|
|
441
|
+
if (!("at" in rule)) {
|
|
442
|
+
if (!parseLocalDate(rule.date))
|
|
443
|
+
return { field: "date", message: text("cadence.issue.date") };
|
|
444
|
+
const issue = timeIssue(rule.time);
|
|
445
|
+
if (issue) return issue;
|
|
446
|
+
}
|
|
447
|
+
const [run] = onceRun(rule, timeZone);
|
|
448
|
+
if (!run) return { field: "date", message: text("cadence.issue.date") };
|
|
449
|
+
if (run.getTime() <= now.getTime()) {
|
|
450
|
+
return {
|
|
451
|
+
field: "date",
|
|
452
|
+
message: text("cadence.issue.passed", {
|
|
453
|
+
time: formatRunTime(run, { timeZone, now, text })
|
|
454
|
+
})
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
return null;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
function onceRun(rule, timeZone) {
|
|
462
|
+
if ("at" in rule) {
|
|
463
|
+
const instant = new Date(rule.at);
|
|
464
|
+
return Number.isNaN(instant.getTime()) ? [] : [instant];
|
|
465
|
+
}
|
|
466
|
+
const date = parseLocalDate(rule.date);
|
|
467
|
+
const time = parseTime(rule.time);
|
|
468
|
+
return date && time ? [zonedTimeToUtc(date, time, timeZone)] : [];
|
|
469
|
+
}
|
|
470
|
+
function intervalAnchor(rule, { timeZone, now }) {
|
|
471
|
+
if (rule.startAt) {
|
|
472
|
+
const start = new Date(rule.startAt).getTime();
|
|
473
|
+
if (!Number.isNaN(start)) return start;
|
|
474
|
+
}
|
|
475
|
+
const time = rule.unit === "days" && rule.time ? parseTime(rule.time) : null;
|
|
476
|
+
if (!time) return 0;
|
|
477
|
+
const today = localDateOf(now, timeZone);
|
|
478
|
+
const todayRun = zonedTimeToUtc(today, time, timeZone);
|
|
479
|
+
return todayRun.getTime() > now.getTime() ? todayRun.getTime() : zonedTimeToUtc(addDays(today, 1), time, timeZone).getTime();
|
|
480
|
+
}
|
|
481
|
+
function nextRuns(rule, options) {
|
|
482
|
+
const { timeZone, now } = options;
|
|
483
|
+
const count = options.count ?? 3;
|
|
484
|
+
if (validateCadence(rule, options)) return [];
|
|
485
|
+
const runs = [];
|
|
486
|
+
const nowMs = now.getTime();
|
|
487
|
+
const calendarRuns = (time, matches) => {
|
|
488
|
+
const clock = parseTime(time);
|
|
489
|
+
const today = localDateOf(now, timeZone);
|
|
490
|
+
for (let offset = 0; offset < 400 && runs.length < count; offset += 1) {
|
|
491
|
+
const date = addDays(today, offset);
|
|
492
|
+
if (!matches(date)) continue;
|
|
493
|
+
const run = zonedTimeToUtc(date, clock, timeZone);
|
|
494
|
+
if (run.getTime() > nowMs) runs.push(run);
|
|
495
|
+
}
|
|
496
|
+
};
|
|
497
|
+
switch (rule.frequency) {
|
|
498
|
+
case "hourly":
|
|
499
|
+
return nextRuns({ frequency: "interval", every: 1, unit: "hours" }, options);
|
|
500
|
+
case "daily":
|
|
501
|
+
calendarRuns(rule.time, () => true);
|
|
502
|
+
return runs;
|
|
503
|
+
case "weekdays":
|
|
504
|
+
calendarRuns(rule.time, (date) => WORKDAYS.includes(weekdayOf(date)));
|
|
505
|
+
return runs;
|
|
506
|
+
case "weekly":
|
|
507
|
+
calendarRuns(rule.time, (date) => rule.days.includes(weekdayOf(date)));
|
|
508
|
+
return runs;
|
|
509
|
+
case "monthly": {
|
|
510
|
+
const clock = parseTime(rule.time);
|
|
511
|
+
const today = localDateOf(now, timeZone);
|
|
512
|
+
for (let step = 0; step < 48 && runs.length < count; step += 1) {
|
|
513
|
+
const monthIndex = today.month - 1 + step;
|
|
514
|
+
const year = today.year + Math.floor(monthIndex / 12);
|
|
515
|
+
const month = monthIndex % 12 + 1;
|
|
516
|
+
if (rule.dayOfMonth > daysInMonth(year, month)) continue;
|
|
517
|
+
const run = zonedTimeToUtc({ year, month, day: rule.dayOfMonth }, clock, timeZone);
|
|
518
|
+
if (run.getTime() > nowMs) runs.push(run);
|
|
519
|
+
}
|
|
520
|
+
return runs;
|
|
521
|
+
}
|
|
522
|
+
case "interval": {
|
|
523
|
+
const period = rule.every * UNIT_SECONDS[rule.unit] * 1e3;
|
|
524
|
+
const anchor = intervalAnchor(rule, options);
|
|
525
|
+
let next = anchor > nowMs ? anchor : anchor + (Math.floor((nowMs - anchor) / period) + 1) * period;
|
|
526
|
+
while (runs.length < count) {
|
|
527
|
+
runs.push(new Date(next));
|
|
528
|
+
next += period;
|
|
529
|
+
}
|
|
530
|
+
return runs;
|
|
531
|
+
}
|
|
532
|
+
case "once":
|
|
533
|
+
return onceRun(rule, timeZone).filter((run) => run.getTime() > nowMs);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
function toScheduleSpec(rule, { timeZone, now }) {
|
|
537
|
+
const calendar = (time, extra) => {
|
|
538
|
+
const clock = parseTime(time) ?? parseTime(DEFAULT_CADENCE_TIME);
|
|
539
|
+
return {
|
|
540
|
+
type: "calendar",
|
|
541
|
+
timeZone,
|
|
542
|
+
hour: clock.hour,
|
|
543
|
+
minute: clock.minute,
|
|
544
|
+
...extra
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
switch (rule.frequency) {
|
|
548
|
+
case "hourly":
|
|
549
|
+
return { type: "interval", everySeconds: 3600 };
|
|
550
|
+
case "daily":
|
|
551
|
+
return calendar(rule.time, {});
|
|
552
|
+
case "weekdays":
|
|
553
|
+
return calendar(rule.time, { daysOfWeek: WORKDAYS.map((day) => API_WEEKDAYS[day]) });
|
|
554
|
+
case "weekly":
|
|
555
|
+
return calendar(rule.time, {
|
|
556
|
+
daysOfWeek: sortDays(rule.days).map((day) => API_WEEKDAYS[day])
|
|
557
|
+
});
|
|
558
|
+
case "monthly":
|
|
559
|
+
return calendar(rule.time, { daysOfMonth: [rule.dayOfMonth] });
|
|
560
|
+
case "interval": {
|
|
561
|
+
const everySeconds = rule.every * UNIT_SECONDS[rule.unit];
|
|
562
|
+
if (rule.startAt) return { type: "interval", everySeconds, startAt: rule.startAt };
|
|
563
|
+
if (rule.unit === "days" && rule.time) {
|
|
564
|
+
const anchor = intervalAnchor(rule, { timeZone, now });
|
|
565
|
+
return { type: "interval", everySeconds, startAt: new Date(anchor).toISOString() };
|
|
566
|
+
}
|
|
567
|
+
return { type: "interval", everySeconds };
|
|
568
|
+
}
|
|
569
|
+
case "once": {
|
|
570
|
+
const [run] = onceRun(rule, timeZone);
|
|
571
|
+
return { type: "once", runAt: (run ?? now).toISOString(), timeZone };
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
function cadenceFromScheduleSpec(spec, fallbackTimeZone) {
|
|
576
|
+
switch (spec.type) {
|
|
577
|
+
case "once": {
|
|
578
|
+
const instant = new Date(spec.runAt);
|
|
579
|
+
const parts = zonedParts(instant, spec.timeZone);
|
|
580
|
+
return {
|
|
581
|
+
timeZone: spec.timeZone,
|
|
582
|
+
rule: {
|
|
583
|
+
frequency: "once",
|
|
584
|
+
date: formatLocalDate(parts),
|
|
585
|
+
time: `${pad(parts.hour)}:${pad(parts.minute)}`
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
case "interval": {
|
|
590
|
+
const seconds = spec.everySeconds;
|
|
591
|
+
if (seconds === 3600 && !spec.startAt) {
|
|
592
|
+
return { timeZone: fallbackTimeZone, rule: { frequency: "hourly" } };
|
|
593
|
+
}
|
|
594
|
+
if (seconds % 86400 === 0) {
|
|
595
|
+
const time = spec.startAt ? zonedParts(new Date(spec.startAt), fallbackTimeZone) : null;
|
|
596
|
+
return {
|
|
597
|
+
timeZone: fallbackTimeZone,
|
|
598
|
+
rule: {
|
|
599
|
+
frequency: "interval",
|
|
600
|
+
every: seconds / 86400,
|
|
601
|
+
unit: "days",
|
|
602
|
+
...time ? { time: `${pad(time.hour)}:${pad(time.minute)}` } : {},
|
|
603
|
+
...spec.startAt ? { startAt: spec.startAt } : {}
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
const unit = seconds % 3600 === 0 ? "hours" : "minutes";
|
|
608
|
+
return {
|
|
609
|
+
timeZone: fallbackTimeZone,
|
|
610
|
+
rule: {
|
|
611
|
+
frequency: "interval",
|
|
612
|
+
every: Math.max(1, Math.round(seconds / UNIT_SECONDS[unit])),
|
|
613
|
+
unit,
|
|
614
|
+
...spec.startAt ? { startAt: spec.startAt } : {}
|
|
615
|
+
}
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
case "calendar": {
|
|
619
|
+
const time = `${pad(spec.hour)}:${pad(spec.minute)}`;
|
|
620
|
+
const monthDay = spec.daysOfMonth?.[0];
|
|
621
|
+
if (monthDay !== void 0) {
|
|
622
|
+
return {
|
|
623
|
+
timeZone: spec.timeZone,
|
|
624
|
+
rule: { frequency: "monthly", dayOfMonth: monthDay, time }
|
|
625
|
+
};
|
|
626
|
+
}
|
|
627
|
+
const days = (spec.daysOfWeek ?? []).flatMap(
|
|
628
|
+
(apiDay) => WEEKDAYS.filter((day) => API_WEEKDAYS[day] === apiDay)
|
|
629
|
+
);
|
|
630
|
+
if (days.length === 0 || sameDays(days, WEEKDAYS)) {
|
|
631
|
+
return { timeZone: spec.timeZone, rule: { frequency: "daily", time } };
|
|
632
|
+
}
|
|
633
|
+
if (sameDays(days, WORKDAYS)) {
|
|
634
|
+
return { timeZone: spec.timeZone, rule: { frequency: "weekdays", time } };
|
|
635
|
+
}
|
|
636
|
+
return { timeZone: spec.timeZone, rule: { frequency: "weekly", days: sortDays(days), time } };
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
var DAY_TOKENS = [
|
|
641
|
+
[/\bmon(?:day)?s?\b/g, "mon"],
|
|
642
|
+
[/\btue(?:s|sday)?s?\b/g, "tue"],
|
|
643
|
+
[/\bwed(?:nesday)?s?\b/g, "wed"],
|
|
644
|
+
[/\bthu(?:r|rs|rsday)?s?\b/g, "thu"],
|
|
645
|
+
[/\bfri(?:day)?s?\b/g, "fri"],
|
|
646
|
+
[/\bsat(?:urday)?s?\b/g, "sat"],
|
|
647
|
+
[/\bsun(?:day)?s?\b/g, "sun"]
|
|
648
|
+
];
|
|
649
|
+
var PARSE_HINT = 'Try "every weekday at 8" or "1st of every month at 9".';
|
|
650
|
+
function parseCadence(input, { timeZone, now }) {
|
|
651
|
+
let text = ` ${input.toLowerCase().replace(/[,;]/g, " ").replace(/\s+/g, " ").trim()} `;
|
|
652
|
+
text = text.replace(/^ (?:runs?|repeat|repeats) /, " ");
|
|
653
|
+
if (!text.trim()) {
|
|
654
|
+
return { ok: false, message: 'Describe when it should run, like "every weekday at 8".' };
|
|
655
|
+
}
|
|
656
|
+
let time = null;
|
|
657
|
+
let badTime = false;
|
|
658
|
+
const takeTime = (pattern, read) => {
|
|
659
|
+
if (time || badTime) return;
|
|
660
|
+
const match = pattern.exec(text);
|
|
661
|
+
if (!match) return;
|
|
662
|
+
const value = read(match);
|
|
663
|
+
if (value) time = value;
|
|
664
|
+
else badTime = true;
|
|
665
|
+
text = text.replace(match[0], " ");
|
|
666
|
+
};
|
|
667
|
+
takeTime(/\b(?:at )?(noon|midday)\b/, () => "12:00");
|
|
668
|
+
takeTime(/\b(?:at )?midnight\b/, () => "00:00");
|
|
669
|
+
takeTime(
|
|
670
|
+
/\b(?:at )?(\d{1,2})(?:[:.](\d{2}))? ?(am|pm)\b/,
|
|
671
|
+
(m) => normalizeTime(`${m[1]}${m[2] ? `:${m[2]}` : ""}${m[3]}`)
|
|
672
|
+
);
|
|
673
|
+
takeTime(
|
|
674
|
+
/\bat (\d{1,2})(?:[:.h](\d{2}))?\b/,
|
|
675
|
+
(m) => normalizeTime(`${m[1]}${m[2] ? `:${m[2]}` : ""}`)
|
|
676
|
+
);
|
|
677
|
+
takeTime(/\b(\d{1,2})[:.](\d{2})\b/, (m) => normalizeTime(`${m[1]}:${m[2]}`));
|
|
678
|
+
if (badTime) return { ok: false, message: "That time doesn't exist. Use a time like 08:00." };
|
|
679
|
+
const clock = time ?? DEFAULT_CADENCE_TIME;
|
|
680
|
+
const halfHour = /\bevery half(?: an)? hour\b/.exec(text);
|
|
681
|
+
if (halfHour) return { ok: true, rule: { frequency: "interval", every: 30, unit: "minutes" } };
|
|
682
|
+
if (/\bevery other day\b/.test(text)) {
|
|
683
|
+
return { ok: true, rule: { frequency: "interval", every: 2, unit: "days", time: clock } };
|
|
684
|
+
}
|
|
685
|
+
const interval = /\bevery (\d+) ?(minutes?|mins?|m|hours?|hrs?|h|days?|d)\b/.exec(text);
|
|
686
|
+
if (interval) {
|
|
687
|
+
const every = Number(interval[1]);
|
|
688
|
+
const token = interval[2];
|
|
689
|
+
const unit = token.startsWith("m") ? "minutes" : token.startsWith("h") ? "hours" : "days";
|
|
690
|
+
if (unit === "hours" && every === 1) return { ok: true, rule: { frequency: "hourly" } };
|
|
691
|
+
if (unit === "days" && every === 1)
|
|
692
|
+
return { ok: true, rule: { frequency: "daily", time: clock } };
|
|
693
|
+
const rule = unit === "days" ? { frequency: "interval", every, unit, time: clock } : { frequency: "interval", every, unit };
|
|
694
|
+
const issue = validateCadence(rule, { timeZone, now });
|
|
695
|
+
return issue ? { ok: false, message: issue.message } : { ok: true, rule };
|
|
696
|
+
}
|
|
697
|
+
if (/\b(?:every|each) minute\b/.test(text)) {
|
|
698
|
+
return { ok: true, rule: { frequency: "interval", every: 1, unit: "minutes" } };
|
|
699
|
+
}
|
|
700
|
+
if (/\b(?:hourly|(?:every|each) hour)\b/.test(text))
|
|
701
|
+
return { ok: true, rule: { frequency: "hourly" } };
|
|
702
|
+
if (/\b(?:monthly|(?:every|each|a|per) month|of (?:every|each|the) month)\b/.test(text)) {
|
|
703
|
+
if (/\blast day\b/.test(text)) {
|
|
704
|
+
return {
|
|
705
|
+
ok: false,
|
|
706
|
+
message: "The last day of the month isn't supported yet. Pick a day from 1 to 31."
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
const dayMatch = /\b(?:day )?(\d{1,2})(?:st|nd|rd|th)?\b/.exec(
|
|
710
|
+
text.replace(/\b(?:monthly|every|each|month|of|the|on)\b/g, " ")
|
|
711
|
+
);
|
|
712
|
+
const dayOfMonth = dayMatch ? Number(dayMatch[1]) : 1;
|
|
713
|
+
const rule = { frequency: "monthly", dayOfMonth, time: clock };
|
|
714
|
+
const issue = validateCadence(rule, { timeZone, now });
|
|
715
|
+
return issue ? { ok: false, message: issue.message } : { ok: true, rule };
|
|
716
|
+
}
|
|
717
|
+
if (/\b(?:weekdays?|workdays?|business days?|working days?)\b/.test(text) || /\bmon(?:day)? ?(?:-|to|through|until) ?fri(?:day)?\b/.test(text)) {
|
|
718
|
+
return { ok: true, rule: { frequency: "weekdays", time: clock } };
|
|
719
|
+
}
|
|
720
|
+
if (/\bweekends?\b/.test(text)) {
|
|
721
|
+
return { ok: true, rule: { frequency: "weekly", days: ["sat", "sun"], time: clock } };
|
|
722
|
+
}
|
|
723
|
+
const today = localDateOf(now, timeZone);
|
|
724
|
+
let onceDate = null;
|
|
725
|
+
if (/\btoday\b|\btonight\b/.test(text)) onceDate = today;
|
|
726
|
+
else if (/\btomorrow\b/.test(text)) onceDate = addDays(today, 1);
|
|
727
|
+
else {
|
|
728
|
+
const iso = /\b(\d{4}-\d{2}-\d{2})\b/.exec(text);
|
|
729
|
+
if (iso) onceDate = parseLocalDate(iso[1]);
|
|
730
|
+
const monthPattern = TYPED_MONTHS.map((name) => name.slice(0, 3)).join("|");
|
|
731
|
+
const dayMonth = new RegExp(
|
|
732
|
+
`\\b(\\d{1,2})(?:st|nd|rd|th)? (?:of )?(${monthPattern})[a-z]*\\b`
|
|
733
|
+
).exec(text);
|
|
734
|
+
const monthDay = new RegExp(`\\b(${monthPattern})[a-z]* (\\d{1,2})(?:st|nd|rd|th)?\\b`).exec(
|
|
735
|
+
text
|
|
736
|
+
);
|
|
737
|
+
const found = dayMonth ? { day: Number(dayMonth[1]), month: dayMonth[2] } : monthDay ? { day: Number(monthDay[2]), month: monthDay[1] } : null;
|
|
738
|
+
if (!onceDate && found) {
|
|
739
|
+
const month = TYPED_MONTHS.findIndex((name) => name.startsWith(found.month)) + 1;
|
|
740
|
+
let year = today.year;
|
|
741
|
+
if (month < today.month || month === today.month && found.day < today.day) year += 1;
|
|
742
|
+
onceDate = found.day <= daysInMonth(year, month) ? { year, month, day: found.day } : null;
|
|
743
|
+
if (!onceDate) return { ok: false, message: "That date doesn't exist. Pick another day." };
|
|
744
|
+
}
|
|
745
|
+
const nextDay = /\b(next|this) (mon|tue|wed|thu|fri|sat|sun)(?:day)?\b/.exec(text);
|
|
746
|
+
if (!onceDate && nextDay && !/\b(?:every|each)\b/.test(text)) {
|
|
747
|
+
const target = WEEKDAYS.indexOf(nextDay[2]);
|
|
748
|
+
const current = WEEKDAYS.indexOf(weekdayOf(today));
|
|
749
|
+
const delta = (target - current + 7) % 7;
|
|
750
|
+
onceDate = addDays(today, delta === 0 && nextDay[1] === "next" ? 7 : delta);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
if (onceDate) {
|
|
754
|
+
const rule = { frequency: "once", date: formatLocalDate(onceDate), time: clock };
|
|
755
|
+
const issue = validateCadence(rule, { timeZone, now });
|
|
756
|
+
return issue ? { ok: false, message: issue.message } : { ok: true, rule };
|
|
757
|
+
}
|
|
758
|
+
const days = /* @__PURE__ */ new Set();
|
|
759
|
+
for (const [pattern, day] of DAY_TOKENS) {
|
|
760
|
+
if (new RegExp(pattern.source).test(text)) days.add(day);
|
|
761
|
+
}
|
|
762
|
+
if (days.size > 0) {
|
|
763
|
+
const sorted = sortDays([...days]);
|
|
764
|
+
if (sameDays(sorted, WORKDAYS))
|
|
765
|
+
return { ok: true, rule: { frequency: "weekdays", time: clock } };
|
|
766
|
+
if (sameDays(sorted, WEEKDAYS)) return { ok: true, rule: { frequency: "daily", time: clock } };
|
|
767
|
+
return { ok: true, rule: { frequency: "weekly", days: sorted, time: clock } };
|
|
768
|
+
}
|
|
769
|
+
if (/\b(?:daily|(?:every|each) (?:day|morning|evening|night))\b/.test(text) || time && /\bevery\b/.test(text)) {
|
|
770
|
+
return { ok: true, rule: { frequency: "daily", time: clock } };
|
|
771
|
+
}
|
|
772
|
+
if (/\b(?:weekly|(?:every|each) week)\b/.test(text)) {
|
|
773
|
+
return { ok: true, rule: { frequency: "weekly", days: ["mon"], time: clock } };
|
|
774
|
+
}
|
|
775
|
+
return { ok: false, message: `Couldn't read that. ${PARSE_HINT}` };
|
|
776
|
+
}
|
|
777
|
+
var ALL_FREQUENCIES = [
|
|
778
|
+
"hourly",
|
|
779
|
+
"daily",
|
|
780
|
+
"weekdays",
|
|
781
|
+
"weekly",
|
|
782
|
+
"monthly",
|
|
783
|
+
"interval",
|
|
784
|
+
"once"
|
|
785
|
+
];
|
|
786
|
+
function frequencyWords(t, frequency) {
|
|
787
|
+
switch (frequency) {
|
|
788
|
+
case "hourly":
|
|
789
|
+
return {
|
|
790
|
+
label: t("cadence.frequency.hourly"),
|
|
791
|
+
trigger: t("cadence.frequency.hourly"),
|
|
792
|
+
preset: t("cadence.frequency.hourlyPreset"),
|
|
793
|
+
description: t("cadence.frequency.hourlyDescription")
|
|
794
|
+
};
|
|
795
|
+
case "daily":
|
|
796
|
+
return {
|
|
797
|
+
label: t("cadence.frequency.daily"),
|
|
798
|
+
trigger: t("cadence.frequency.daily"),
|
|
799
|
+
preset: t("cadence.frequency.dailyPreset"),
|
|
800
|
+
description: t("cadence.frequency.dailyDescription")
|
|
801
|
+
};
|
|
802
|
+
case "weekdays":
|
|
803
|
+
return {
|
|
804
|
+
label: t("cadence.frequency.weekdays"),
|
|
805
|
+
trigger: t("cadence.frequency.weekdays"),
|
|
806
|
+
preset: t("cadence.frequency.weekdaysPreset"),
|
|
807
|
+
description: t("cadence.frequency.weekdaysDescription")
|
|
808
|
+
};
|
|
809
|
+
case "weekly":
|
|
810
|
+
return {
|
|
811
|
+
label: t("cadence.frequency.weekly"),
|
|
812
|
+
trigger: t("cadence.frequency.weekly"),
|
|
813
|
+
preset: t("cadence.frequency.weeklyPreset"),
|
|
814
|
+
description: t("cadence.frequency.weeklyDescription")
|
|
815
|
+
};
|
|
816
|
+
case "monthly":
|
|
817
|
+
return {
|
|
818
|
+
label: t("cadence.frequency.monthly"),
|
|
819
|
+
trigger: t("cadence.frequency.monthly"),
|
|
820
|
+
preset: t("cadence.frequency.monthlyPreset"),
|
|
821
|
+
description: t("cadence.frequency.monthlyDescription")
|
|
822
|
+
};
|
|
823
|
+
case "interval":
|
|
824
|
+
return {
|
|
825
|
+
label: t("cadence.frequency.interval"),
|
|
826
|
+
trigger: t("cadence.frequency.intervalTrigger"),
|
|
827
|
+
preset: t("cadence.frequency.intervalPreset"),
|
|
828
|
+
description: t("cadence.frequency.intervalDescription")
|
|
829
|
+
};
|
|
830
|
+
case "once":
|
|
831
|
+
return {
|
|
832
|
+
label: t("cadence.frequency.once"),
|
|
833
|
+
trigger: t("cadence.frequency.once"),
|
|
834
|
+
preset: t("cadence.frequency.oncePreset"),
|
|
835
|
+
description: t("cadence.frequency.onceDescription")
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
function unitOptions(t, every) {
|
|
840
|
+
const one = every === 1;
|
|
841
|
+
return [
|
|
842
|
+
{ value: "minutes", label: one ? t("cadence.unit.minute") : t("cadence.unit.minutes") },
|
|
843
|
+
{ value: "hours", label: one ? t("cadence.unit.hour") : t("cadence.unit.hours") },
|
|
844
|
+
{ value: "days", label: one ? t("cadence.unit.day") : t("cadence.unit.days") }
|
|
845
|
+
];
|
|
846
|
+
}
|
|
847
|
+
function ruleTime(rule) {
|
|
848
|
+
if (rule.frequency === "hourly") return void 0;
|
|
849
|
+
if (rule.frequency === "once") return "at" in rule ? void 0 : rule.time;
|
|
850
|
+
return rule.time;
|
|
851
|
+
}
|
|
852
|
+
function usesTime(rule) {
|
|
853
|
+
if (rule.frequency === "hourly") return false;
|
|
854
|
+
if (rule.frequency === "interval") return rule.unit === "days";
|
|
855
|
+
return true;
|
|
856
|
+
}
|
|
857
|
+
function switchFrequency(rule, frequency, { timeZone, now }) {
|
|
858
|
+
const time = ruleTime(rule) ?? DEFAULT_CADENCE_TIME;
|
|
859
|
+
switch (frequency) {
|
|
860
|
+
case "hourly":
|
|
861
|
+
return { frequency: "hourly" };
|
|
862
|
+
case "daily":
|
|
863
|
+
return { frequency: "daily", time };
|
|
864
|
+
case "weekdays":
|
|
865
|
+
return { frequency: "weekdays", time };
|
|
866
|
+
case "weekly":
|
|
867
|
+
return {
|
|
868
|
+
frequency: "weekly",
|
|
869
|
+
days: rule.frequency === "weekly" && rule.days.length > 0 ? rule.days : ["mon"],
|
|
870
|
+
time
|
|
871
|
+
};
|
|
872
|
+
case "monthly":
|
|
873
|
+
return { frequency: "monthly", dayOfMonth: 1, time };
|
|
874
|
+
case "interval":
|
|
875
|
+
return { frequency: "interval", every: 30, unit: "minutes" };
|
|
876
|
+
case "once":
|
|
877
|
+
return {
|
|
878
|
+
frequency: "once",
|
|
879
|
+
date: formatLocalDate(addDays(localDateOf(now, timeZone), 1)),
|
|
880
|
+
time
|
|
881
|
+
};
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
function withTime(rule, time) {
|
|
885
|
+
if (rule.frequency === "hourly") return rule;
|
|
886
|
+
if (rule.frequency === "once") return "at" in rule ? rule : { ...rule, time };
|
|
887
|
+
return { ...rule, time };
|
|
888
|
+
}
|
|
889
|
+
function cadencePhrase(rule, timeZone, now) {
|
|
890
|
+
const { sentence } = describeCadence(rule, { timeZone, timeZoneLabel: "", now });
|
|
891
|
+
return sentence.replace(/^Runs /, "").trim();
|
|
892
|
+
}
|
|
893
|
+
var fieldBase = "inline-flex h-9 min-w-0 items-center gap-2 rounded-[10px] border border-border bg-surface px-3 text-sm text-fg transition-colors duration-[120ms] hover:border-border-strong disabled:cursor-not-allowed disabled:border-border disabled:bg-surface-2 disabled:text-fg-muted aria-invalid:border-danger aria-invalid:hover:border-danger data-[state=open]:border-border-strong pointer-coarse:h-11";
|
|
894
|
+
var inputBase = cn(
|
|
895
|
+
fieldBase,
|
|
896
|
+
"cursor-text justify-center px-2 text-center tabular-nums focus-visible:border-brand pointer-coarse:text-base"
|
|
897
|
+
);
|
|
898
|
+
var popoverPanel = cn(MENU_SURFACE_CLASS, "z-50 overflow-hidden p-0 outline-hidden");
|
|
899
|
+
var menuContent = cn(
|
|
900
|
+
popoverPanel,
|
|
901
|
+
"max-h-(--radix-select-content-available-height) min-w-(--radix-select-trigger-width)"
|
|
902
|
+
);
|
|
903
|
+
var menuItem = "relative flex min-h-8 cursor-pointer items-start gap-2.5 rounded-[10px] py-1.5 pr-9 pl-2.5 text-sm text-fg outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:text-fg-muted data-[highlighted]:bg-surface-2 pointer-coarse:min-h-11";
|
|
904
|
+
var connector = "text-sm text-fg-muted";
|
|
905
|
+
function ValueSelect({
|
|
906
|
+
value,
|
|
907
|
+
options,
|
|
908
|
+
onValueChange,
|
|
909
|
+
triggerLabel,
|
|
910
|
+
label,
|
|
911
|
+
disabled,
|
|
912
|
+
invalid,
|
|
913
|
+
describedBy,
|
|
914
|
+
className,
|
|
915
|
+
contentClassName
|
|
916
|
+
}) {
|
|
917
|
+
const selected = options.find((option) => option.value === value);
|
|
918
|
+
return /* @__PURE__ */ jsxs(
|
|
919
|
+
SelectPrimitive.Root,
|
|
920
|
+
{
|
|
921
|
+
value,
|
|
922
|
+
onValueChange: (next) => onValueChange(next),
|
|
923
|
+
disabled: disabled ?? false,
|
|
924
|
+
children: [
|
|
925
|
+
/* @__PURE__ */ jsxs(
|
|
926
|
+
SelectPrimitive.Trigger,
|
|
927
|
+
{
|
|
928
|
+
"aria-label": label,
|
|
929
|
+
"aria-invalid": invalid || void 0,
|
|
930
|
+
"aria-describedby": describedBy,
|
|
931
|
+
className: cn(fieldBase, "group/value-select justify-between", className),
|
|
932
|
+
children: [
|
|
933
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: /* @__PURE__ */ jsx(SelectPrimitive.Value, { children: triggerLabel ?? selected?.label }) }),
|
|
934
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
935
|
+
ChevronDownIcon,
|
|
936
|
+
{
|
|
937
|
+
"aria-hidden": "true",
|
|
938
|
+
className: "size-4 shrink-0 text-fg-subtle transition-transform duration-[120ms] group-data-[state=open]/value-select:rotate-180"
|
|
939
|
+
}
|
|
940
|
+
) })
|
|
941
|
+
]
|
|
942
|
+
}
|
|
943
|
+
),
|
|
944
|
+
/* @__PURE__ */ jsx(SelectContainedPortal, { children: /* @__PURE__ */ jsx(
|
|
945
|
+
SelectPrimitive.Content,
|
|
946
|
+
{
|
|
947
|
+
position: "popper",
|
|
948
|
+
sideOffset: 6,
|
|
949
|
+
align: "start",
|
|
950
|
+
className: cn(menuContent, contentClassName),
|
|
951
|
+
children: /* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: "max-h-[26rem] p-1.5", children: options.map((option) => /* @__PURE__ */ jsxs(SelectPrimitive.Item, { value: option.value, className: menuItem, children: [
|
|
952
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col", children: [
|
|
953
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children: /* @__PURE__ */ jsx("span", { children: option.label }) }),
|
|
954
|
+
option.description ? /* @__PURE__ */ jsx("span", { className: "mt-0.5 text-xs leading-4.5 text-fg-muted", children: option.description }) : null
|
|
955
|
+
] }),
|
|
956
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { className: "absolute top-2 right-2.5", children: /* @__PURE__ */ jsx(CheckIcon, { "aria-hidden": "true", className: MENU_CHECK_CLASS }) })
|
|
957
|
+
] }, option.value)) })
|
|
958
|
+
}
|
|
959
|
+
) })
|
|
960
|
+
]
|
|
961
|
+
}
|
|
962
|
+
);
|
|
963
|
+
}
|
|
964
|
+
function TimeField({
|
|
965
|
+
value,
|
|
966
|
+
onChange,
|
|
967
|
+
label: labelProp,
|
|
968
|
+
disabled,
|
|
969
|
+
id,
|
|
970
|
+
className
|
|
971
|
+
}) {
|
|
972
|
+
const t = useOpenGeniText();
|
|
973
|
+
const label = labelProp ?? t("cadence.picker.time");
|
|
974
|
+
const [draft, setDraft] = useState(value);
|
|
975
|
+
const [focused, setFocused] = useState(false);
|
|
976
|
+
useEffect(() => {
|
|
977
|
+
if (!focused) setDraft(value);
|
|
978
|
+
}, [focused, value]);
|
|
979
|
+
const normalized = normalizeTime(draft);
|
|
980
|
+
const invalid = !normalized || !parseTime(value);
|
|
981
|
+
const commit = () => {
|
|
982
|
+
if (normalized) {
|
|
983
|
+
setDraft(normalized);
|
|
984
|
+
if (normalized !== value) onChange(normalized);
|
|
985
|
+
}
|
|
986
|
+
};
|
|
987
|
+
const onKeyDown = (event) => {
|
|
988
|
+
if (event.key === "ArrowUp" || event.key === "ArrowDown") {
|
|
989
|
+
event.preventDefault();
|
|
990
|
+
const next = stepTime(normalized ?? value, event.key === "ArrowUp" ? 15 : -15);
|
|
991
|
+
setDraft(next);
|
|
992
|
+
onChange(next);
|
|
993
|
+
} else if (event.key === "Enter") {
|
|
994
|
+
commit();
|
|
995
|
+
}
|
|
996
|
+
};
|
|
997
|
+
return /* @__PURE__ */ jsx(
|
|
998
|
+
"input",
|
|
999
|
+
{
|
|
1000
|
+
id,
|
|
1001
|
+
type: "text",
|
|
1002
|
+
inputMode: "numeric",
|
|
1003
|
+
autoComplete: "off",
|
|
1004
|
+
spellCheck: false,
|
|
1005
|
+
"aria-label": label,
|
|
1006
|
+
"aria-invalid": invalid || void 0,
|
|
1007
|
+
disabled,
|
|
1008
|
+
value: draft,
|
|
1009
|
+
maxLength: 8,
|
|
1010
|
+
placeholder: "08:00",
|
|
1011
|
+
onChange: (event) => {
|
|
1012
|
+
setDraft(event.target.value);
|
|
1013
|
+
const next = normalizeTime(event.target.value);
|
|
1014
|
+
if (next && /^\d{1,2}[:.]\d{2}$/.test(event.target.value.trim())) onChange(next);
|
|
1015
|
+
},
|
|
1016
|
+
onFocus: (event) => {
|
|
1017
|
+
setFocused(true);
|
|
1018
|
+
event.currentTarget.select();
|
|
1019
|
+
},
|
|
1020
|
+
onBlur: () => {
|
|
1021
|
+
setFocused(false);
|
|
1022
|
+
commit();
|
|
1023
|
+
},
|
|
1024
|
+
onKeyDown,
|
|
1025
|
+
className: cn(inputBase, "w-[4.75rem] placeholder:text-fg-subtle", className)
|
|
1026
|
+
}
|
|
1027
|
+
);
|
|
1028
|
+
}
|
|
1029
|
+
function NumberField({
|
|
1030
|
+
value,
|
|
1031
|
+
onChange,
|
|
1032
|
+
label,
|
|
1033
|
+
max,
|
|
1034
|
+
disabled,
|
|
1035
|
+
invalid,
|
|
1036
|
+
describedBy
|
|
1037
|
+
}) {
|
|
1038
|
+
const [draft, setDraft] = useState(String(value));
|
|
1039
|
+
useEffect(() => setDraft(String(value)), [value]);
|
|
1040
|
+
return /* @__PURE__ */ jsx(
|
|
1041
|
+
"input",
|
|
1042
|
+
{
|
|
1043
|
+
type: "text",
|
|
1044
|
+
inputMode: "numeric",
|
|
1045
|
+
autoComplete: "off",
|
|
1046
|
+
"aria-label": label,
|
|
1047
|
+
"aria-invalid": invalid || void 0,
|
|
1048
|
+
"aria-describedby": describedBy,
|
|
1049
|
+
disabled,
|
|
1050
|
+
value: draft,
|
|
1051
|
+
onChange: (event) => {
|
|
1052
|
+
const text = event.target.value.replace(/[^\d]/g, "").slice(0, 4);
|
|
1053
|
+
setDraft(text);
|
|
1054
|
+
if (text) onChange(Number(text));
|
|
1055
|
+
},
|
|
1056
|
+
onBlur: () => setDraft(String(value)),
|
|
1057
|
+
onKeyDown: (event) => {
|
|
1058
|
+
if (event.key !== "ArrowUp" && event.key !== "ArrowDown") return;
|
|
1059
|
+
event.preventDefault();
|
|
1060
|
+
onChange(Math.min(max, Math.max(1, value + (event.key === "ArrowUp" ? 1 : -1))));
|
|
1061
|
+
},
|
|
1062
|
+
className: cn(inputBase, "w-16")
|
|
1063
|
+
}
|
|
1064
|
+
);
|
|
1065
|
+
}
|
|
1066
|
+
function DayToggleGroup({
|
|
1067
|
+
days,
|
|
1068
|
+
onChange,
|
|
1069
|
+
disabled,
|
|
1070
|
+
invalid,
|
|
1071
|
+
describedBy
|
|
1072
|
+
}) {
|
|
1073
|
+
const t = useOpenGeniText();
|
|
1074
|
+
return /* @__PURE__ */ jsx(
|
|
1075
|
+
"div",
|
|
1076
|
+
{
|
|
1077
|
+
role: "group",
|
|
1078
|
+
"aria-label": t("cadence.picker.days"),
|
|
1079
|
+
"aria-invalid": invalid || void 0,
|
|
1080
|
+
"aria-describedby": describedBy,
|
|
1081
|
+
className: cn(
|
|
1082
|
+
"inline-flex h-9 shrink-0 items-center gap-0.5 rounded-[10px] border p-[3px] transition-colors duration-[120ms] pointer-coarse:h-11",
|
|
1083
|
+
invalid ? "border-danger" : "border-border",
|
|
1084
|
+
disabled ? "bg-surface-2" : "bg-surface"
|
|
1085
|
+
),
|
|
1086
|
+
children: WEEKDAYS.map((day) => {
|
|
1087
|
+
const on = days.includes(day);
|
|
1088
|
+
return /* @__PURE__ */ jsx(
|
|
1089
|
+
"button",
|
|
1090
|
+
{
|
|
1091
|
+
type: "button",
|
|
1092
|
+
"aria-pressed": on,
|
|
1093
|
+
"aria-label": weekdayName(t, day, "long"),
|
|
1094
|
+
disabled,
|
|
1095
|
+
onClick: () => onChange(on ? days.filter((each) => each !== day) : sortDays([...days, day])),
|
|
1096
|
+
className: cn(
|
|
1097
|
+
"inline-flex h-7 w-9 items-center justify-center rounded-sm text-sm font-medium transition-colors duration-[120ms] disabled:cursor-not-allowed pointer-coarse:h-9 pointer-coarse:w-10",
|
|
1098
|
+
on ? "bg-brand/10 text-brand disabled:bg-surface-3 disabled:text-fg-muted" : "text-fg-muted hover:bg-surface-2 hover:text-fg disabled:text-fg-subtle disabled:hover:bg-transparent"
|
|
1099
|
+
),
|
|
1100
|
+
children: weekdayName(t, day, "short").slice(0, 2)
|
|
1101
|
+
},
|
|
1102
|
+
day
|
|
1103
|
+
);
|
|
1104
|
+
})
|
|
1105
|
+
}
|
|
1106
|
+
);
|
|
1107
|
+
}
|
|
1108
|
+
var allZonesCache = /* @__PURE__ */ new WeakMap();
|
|
1109
|
+
var NO_TIME_ZONES = [];
|
|
1110
|
+
function offsetLabelFor(timeZone, at) {
|
|
1111
|
+
try {
|
|
1112
|
+
const name = new Intl.DateTimeFormat("en-US", { timeZone, timeZoneName: "shortOffset" }).formatToParts(at).find((part) => part.type === "timeZoneName")?.value;
|
|
1113
|
+
if (!name || name === "GMT") return "UTC";
|
|
1114
|
+
return name.replace("GMT", "UTC");
|
|
1115
|
+
} catch {
|
|
1116
|
+
return "";
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
function allTimeZones(at, t) {
|
|
1120
|
+
const cached = allZonesCache.get(t);
|
|
1121
|
+
if (cached) return cached;
|
|
1122
|
+
const ids = typeof Intl.supportedValuesOf === "function" ? Intl.supportedValuesOf("timeZone") : [];
|
|
1123
|
+
const zones = ids.map((id) => ({
|
|
1124
|
+
id,
|
|
1125
|
+
...timeZoneLabels(id, t),
|
|
1126
|
+
offsetLabel: offsetLabelFor(id, at)
|
|
1127
|
+
}));
|
|
1128
|
+
allZonesCache.set(t, zones);
|
|
1129
|
+
return zones;
|
|
1130
|
+
}
|
|
1131
|
+
function zoneOption(timeZone, suggested, at, t) {
|
|
1132
|
+
return suggested.find((zone) => zone.id === timeZone) ?? {
|
|
1133
|
+
id: timeZone,
|
|
1134
|
+
...timeZoneLabels(timeZone, t),
|
|
1135
|
+
offsetLabel: offsetLabelFor(timeZone, at)
|
|
1136
|
+
};
|
|
1137
|
+
}
|
|
1138
|
+
function TimeZoneSearch({
|
|
1139
|
+
value,
|
|
1140
|
+
onSelect,
|
|
1141
|
+
timeZones = NO_TIME_ZONES,
|
|
1142
|
+
now,
|
|
1143
|
+
initialQuery = "",
|
|
1144
|
+
autoFocus = true,
|
|
1145
|
+
preview = false,
|
|
1146
|
+
className
|
|
1147
|
+
}) {
|
|
1148
|
+
const t = useOpenGeniText();
|
|
1149
|
+
const [clock] = useState(() => now ?? /* @__PURE__ */ new Date());
|
|
1150
|
+
const [query, setQuery] = useState(initialQuery);
|
|
1151
|
+
const listId = useId();
|
|
1152
|
+
const optionPrefix = useId();
|
|
1153
|
+
const options = useMemo(() => {
|
|
1154
|
+
const needle = query.trim().toLowerCase();
|
|
1155
|
+
if (!needle) return [...timeZones];
|
|
1156
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1157
|
+
const results = [];
|
|
1158
|
+
for (const zone of [...timeZones, ...allTimeZones(clock, t)]) {
|
|
1159
|
+
if (seen.has(zone.id)) continue;
|
|
1160
|
+
const haystack = `${zone.label} ${zone.id} ${zone.offsetLabel ?? ""}`.toLowerCase();
|
|
1161
|
+
if (haystack.includes(needle)) {
|
|
1162
|
+
seen.add(zone.id);
|
|
1163
|
+
results.push(zone);
|
|
1164
|
+
}
|
|
1165
|
+
if (results.length >= 50) break;
|
|
1166
|
+
}
|
|
1167
|
+
return results;
|
|
1168
|
+
}, [clock, query, t, timeZones]);
|
|
1169
|
+
const [active, setActive] = useState(
|
|
1170
|
+
() => Math.max(
|
|
1171
|
+
0,
|
|
1172
|
+
options.findIndex((zone) => zone.id === value)
|
|
1173
|
+
)
|
|
1174
|
+
);
|
|
1175
|
+
const activeIndex = Math.min(active, Math.max(0, options.length - 1));
|
|
1176
|
+
const searching = query.trim().length > 0;
|
|
1177
|
+
const panelOptions = useMemo(
|
|
1178
|
+
() => options.map((zone) => ({
|
|
1179
|
+
value: zone.id,
|
|
1180
|
+
label: zone.label,
|
|
1181
|
+
meta: zone.offsetLabel || void 0,
|
|
1182
|
+
// Search results name the region so "New Salem time" is findable and clear.
|
|
1183
|
+
description: searching && zone.id.includes("/") ? regionOf(zone.id) : void 0,
|
|
1184
|
+
group: searching ? void 0 : t("cadence.picker.suggested")
|
|
1185
|
+
})),
|
|
1186
|
+
[options, searching, t]
|
|
1187
|
+
);
|
|
1188
|
+
const onKeyDown = (event) => {
|
|
1189
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
1190
|
+
event.preventDefault();
|
|
1191
|
+
const delta = event.key === "ArrowDown" ? 1 : -1;
|
|
1192
|
+
setActive(
|
|
1193
|
+
(current) => options.length === 0 ? 0 : (Math.min(current, options.length - 1) + delta + options.length) % options.length
|
|
1194
|
+
);
|
|
1195
|
+
} else if (event.key === "Enter") {
|
|
1196
|
+
const zone = options[activeIndex];
|
|
1197
|
+
if (zone) {
|
|
1198
|
+
event.preventDefault();
|
|
1199
|
+
onSelect(zone.id);
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
};
|
|
1203
|
+
return /* @__PURE__ */ jsx(
|
|
1204
|
+
SelectMenuPanel,
|
|
1205
|
+
{
|
|
1206
|
+
options: panelOptions,
|
|
1207
|
+
value,
|
|
1208
|
+
activeIndex: options.length > 0 ? activeIndex : -1,
|
|
1209
|
+
onActiveIndexChange: setActive,
|
|
1210
|
+
onSelect,
|
|
1211
|
+
listboxId: listId,
|
|
1212
|
+
idPrefix: optionPrefix,
|
|
1213
|
+
"aria-label": t("cadence.picker.timeZones"),
|
|
1214
|
+
preview,
|
|
1215
|
+
emptyMessage: t("cadence.picker.noZonesMatch", { query: query.trim() }),
|
|
1216
|
+
className,
|
|
1217
|
+
header: /* @__PURE__ */ jsxs("div", { className: "flex h-11 shrink-0 items-center gap-2 border-b border-border px-3.5", children: [
|
|
1218
|
+
/* @__PURE__ */ jsx(SearchIcon, { "aria-hidden": "true", className: "size-4 shrink-0 text-fg-subtle" }),
|
|
1219
|
+
/* @__PURE__ */ jsx(
|
|
1220
|
+
"input",
|
|
1221
|
+
{
|
|
1222
|
+
role: "combobox",
|
|
1223
|
+
"aria-expanded": !preview,
|
|
1224
|
+
"aria-controls": listId,
|
|
1225
|
+
"aria-autocomplete": "list",
|
|
1226
|
+
"aria-activedescendant": options[activeIndex] ? `${optionPrefix}-${activeIndex}` : void 0,
|
|
1227
|
+
"aria-label": t("cadence.picker.searchZones"),
|
|
1228
|
+
autoFocus: autoFocus && !preview,
|
|
1229
|
+
autoComplete: "off",
|
|
1230
|
+
spellCheck: false,
|
|
1231
|
+
readOnly: preview,
|
|
1232
|
+
value: query,
|
|
1233
|
+
placeholder: t("cadence.picker.searchZonesPlaceholder"),
|
|
1234
|
+
onChange: (event) => {
|
|
1235
|
+
setQuery(event.target.value);
|
|
1236
|
+
setActive(0);
|
|
1237
|
+
},
|
|
1238
|
+
onKeyDown,
|
|
1239
|
+
className: "h-full min-w-0 flex-1 bg-transparent text-sm text-fg outline-hidden! placeholder:text-fg-subtle pointer-coarse:text-base"
|
|
1240
|
+
}
|
|
1241
|
+
)
|
|
1242
|
+
] })
|
|
1243
|
+
}
|
|
1244
|
+
);
|
|
1245
|
+
}
|
|
1246
|
+
function regionOf(timeZone) {
|
|
1247
|
+
return timeZone.split("/").slice(0, -1).join(" / ").replaceAll("_", " ");
|
|
1248
|
+
}
|
|
1249
|
+
function TimeZonePicker({
|
|
1250
|
+
value,
|
|
1251
|
+
onChange,
|
|
1252
|
+
timeZones = NO_TIME_ZONES,
|
|
1253
|
+
now,
|
|
1254
|
+
disabled,
|
|
1255
|
+
className,
|
|
1256
|
+
variant = "field"
|
|
1257
|
+
}) {
|
|
1258
|
+
const t = useOpenGeniText();
|
|
1259
|
+
const [open, setOpen] = useState(false);
|
|
1260
|
+
const [clock] = useState(() => now ?? /* @__PURE__ */ new Date());
|
|
1261
|
+
const current = zoneOption(value, timeZones, clock, t);
|
|
1262
|
+
return /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open, onOpenChange: setOpen, children: [
|
|
1263
|
+
/* @__PURE__ */ jsxs(
|
|
1264
|
+
PopoverPrimitive.Trigger,
|
|
1265
|
+
{
|
|
1266
|
+
type: "button",
|
|
1267
|
+
disabled,
|
|
1268
|
+
"aria-label": t("cadence.picker.timeZoneLabel", { zone: current.label }),
|
|
1269
|
+
className: cn(
|
|
1270
|
+
fieldBase,
|
|
1271
|
+
"group/zone justify-between",
|
|
1272
|
+
variant === "ghost" && "h-7 gap-1.5 border-transparent bg-transparent px-2 text-fg-muted hover:border-transparent hover:bg-surface-2 hover:text-fg disabled:bg-transparent data-[state=open]:border-transparent data-[state=open]:bg-surface-2 data-[state=open]:text-fg pointer-coarse:h-9",
|
|
1273
|
+
className
|
|
1274
|
+
),
|
|
1275
|
+
children: [
|
|
1276
|
+
variant === "ghost" ? /* @__PURE__ */ jsx(GlobeIcon, { "aria-hidden": "true", className: "size-4 shrink-0" }) : null,
|
|
1277
|
+
variant === "ghost" && current.shortLabel ? (
|
|
1278
|
+
// Inside a narrow field the city alone is enough ("Oslo").
|
|
1279
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1280
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate @max-[26rem]/cadence-text:hidden", children: current.label }),
|
|
1281
|
+
/* @__PURE__ */ jsx("span", { className: "hidden min-w-0 truncate @max-[26rem]/cadence-text:inline", children: current.shortLabel })
|
|
1282
|
+
] })
|
|
1283
|
+
) : /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: current.label }),
|
|
1284
|
+
/* @__PURE__ */ jsx(
|
|
1285
|
+
ChevronDownIcon,
|
|
1286
|
+
{
|
|
1287
|
+
"aria-hidden": "true",
|
|
1288
|
+
className: "size-4 shrink-0 text-fg-subtle transition-transform duration-[120ms] group-data-[state=open]/zone:rotate-180"
|
|
1289
|
+
}
|
|
1290
|
+
)
|
|
1291
|
+
]
|
|
1292
|
+
}
|
|
1293
|
+
),
|
|
1294
|
+
/* @__PURE__ */ jsx(PopoverContainedPortal, { children: /* @__PURE__ */ jsx(
|
|
1295
|
+
PopoverPrimitive.Content,
|
|
1296
|
+
{
|
|
1297
|
+
align: variant === "ghost" ? "end" : "start",
|
|
1298
|
+
sideOffset: 6,
|
|
1299
|
+
collisionPadding: 12,
|
|
1300
|
+
className: cn(
|
|
1301
|
+
popoverPanel,
|
|
1302
|
+
"flex max-h-[min(22rem,var(--radix-popover-content-available-height))] w-[min(20rem,calc(100vw-24px))] flex-col"
|
|
1303
|
+
),
|
|
1304
|
+
children: /* @__PURE__ */ jsx(
|
|
1305
|
+
TimeZoneSearch,
|
|
1306
|
+
{
|
|
1307
|
+
value,
|
|
1308
|
+
timeZones,
|
|
1309
|
+
now: clock,
|
|
1310
|
+
onSelect: (zone) => {
|
|
1311
|
+
onChange(zone);
|
|
1312
|
+
setOpen(false);
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
)
|
|
1316
|
+
}
|
|
1317
|
+
) })
|
|
1318
|
+
] });
|
|
1319
|
+
}
|
|
1320
|
+
function CalendarGrid({
|
|
1321
|
+
value,
|
|
1322
|
+
min,
|
|
1323
|
+
onSelect
|
|
1324
|
+
}) {
|
|
1325
|
+
const t = useOpenGeniText();
|
|
1326
|
+
const [focus, setFocus] = useState(value ?? min);
|
|
1327
|
+
const [view, setView] = useState({ year: focus.year, month: focus.month });
|
|
1328
|
+
const gridRef = useRef(null);
|
|
1329
|
+
const shouldFocus = useRef(true);
|
|
1330
|
+
useEffect(() => {
|
|
1331
|
+
if (!shouldFocus.current) return;
|
|
1332
|
+
gridRef.current?.querySelector(`[data-date="${formatLocalDate(focus)}"]`)?.focus();
|
|
1333
|
+
}, [focus, view]);
|
|
1334
|
+
const first = { year: view.year, month: view.month, day: 1 };
|
|
1335
|
+
const leading = WEEKDAYS.indexOf(weekdayOf(first));
|
|
1336
|
+
const total = daysInMonth(view.year, view.month);
|
|
1337
|
+
const cells = [
|
|
1338
|
+
...Array.from({ length: leading }, () => null),
|
|
1339
|
+
...Array.from({ length: total }, (_, index) => ({ ...first, day: index + 1 }))
|
|
1340
|
+
];
|
|
1341
|
+
const minDay = dayNumber(min);
|
|
1342
|
+
const move = (date) => {
|
|
1343
|
+
const target = dayNumber(date) < minDay ? min : date;
|
|
1344
|
+
shouldFocus.current = true;
|
|
1345
|
+
setFocus(target);
|
|
1346
|
+
setView({ year: target.year, month: target.month });
|
|
1347
|
+
};
|
|
1348
|
+
const shiftMonth = (delta) => {
|
|
1349
|
+
const index = view.month - 1 + delta;
|
|
1350
|
+
const year = view.year + Math.floor(index / 12);
|
|
1351
|
+
const month = (index % 12 + 12) % 12 + 1;
|
|
1352
|
+
shouldFocus.current = false;
|
|
1353
|
+
setView({ year, month });
|
|
1354
|
+
};
|
|
1355
|
+
const onKeyDown = (event) => {
|
|
1356
|
+
const steps = {
|
|
1357
|
+
ArrowLeft: -1,
|
|
1358
|
+
ArrowRight: 1,
|
|
1359
|
+
ArrowUp: -7,
|
|
1360
|
+
ArrowDown: 7
|
|
1361
|
+
};
|
|
1362
|
+
const step = steps[event.key];
|
|
1363
|
+
if (step !== void 0) {
|
|
1364
|
+
event.preventDefault();
|
|
1365
|
+
move(addDays(focus, step));
|
|
1366
|
+
} else if (event.key === "PageUp" || event.key === "PageDown") {
|
|
1367
|
+
event.preventDefault();
|
|
1368
|
+
const delta = event.key === "PageUp" ? -1 : 1;
|
|
1369
|
+
const index = focus.month - 1 + delta;
|
|
1370
|
+
const year = focus.year + Math.floor(index / 12);
|
|
1371
|
+
const month = (index % 12 + 12) % 12 + 1;
|
|
1372
|
+
move({ year, month, day: Math.min(focus.day, daysInMonth(year, month)) });
|
|
1373
|
+
}
|
|
1374
|
+
};
|
|
1375
|
+
const canGoBack = view.year > min.year || view.year === min.year && view.month > min.month;
|
|
1376
|
+
return /* @__PURE__ */ jsxs("div", { className: "w-[17.5rem] p-3", children: [
|
|
1377
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
1378
|
+
/* @__PURE__ */ jsx("p", { "aria-live": "polite", className: "text-sm font-semibold text-fg", children: t("cadence.picker.monthYear", {
|
|
1379
|
+
month: monthName(t, view.month, "long"),
|
|
1380
|
+
year: view.year
|
|
1381
|
+
}) }),
|
|
1382
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
1383
|
+
/* @__PURE__ */ jsx(
|
|
1384
|
+
"button",
|
|
1385
|
+
{
|
|
1386
|
+
type: "button",
|
|
1387
|
+
"aria-label": t("cadence.picker.previousMonth"),
|
|
1388
|
+
disabled: !canGoBack,
|
|
1389
|
+
onClick: () => shiftMonth(-1),
|
|
1390
|
+
className: "grid size-8 place-items-center rounded-[10px] text-fg-muted transition-colors duration-[120ms] hover:bg-surface-2 hover:text-fg disabled:cursor-not-allowed disabled:text-fg-subtle disabled:hover:bg-transparent pointer-coarse:size-11",
|
|
1391
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, { "aria-hidden": "true", className: "size-4" })
|
|
1392
|
+
}
|
|
1393
|
+
),
|
|
1394
|
+
/* @__PURE__ */ jsx(
|
|
1395
|
+
"button",
|
|
1396
|
+
{
|
|
1397
|
+
type: "button",
|
|
1398
|
+
"aria-label": t("cadence.picker.nextMonth"),
|
|
1399
|
+
onClick: () => shiftMonth(1),
|
|
1400
|
+
className: "grid size-8 place-items-center rounded-[10px] text-fg-muted transition-colors duration-[120ms] hover:bg-surface-2 hover:text-fg pointer-coarse:size-11",
|
|
1401
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, { "aria-hidden": "true", className: "size-4" })
|
|
1402
|
+
}
|
|
1403
|
+
)
|
|
1404
|
+
] })
|
|
1405
|
+
] }),
|
|
1406
|
+
/* @__PURE__ */ jsxs(
|
|
1407
|
+
"div",
|
|
1408
|
+
{
|
|
1409
|
+
ref: gridRef,
|
|
1410
|
+
role: "grid",
|
|
1411
|
+
"aria-label": t("cadence.picker.monthYear", {
|
|
1412
|
+
month: monthName(t, view.month, "long"),
|
|
1413
|
+
year: view.year
|
|
1414
|
+
}),
|
|
1415
|
+
onKeyDown,
|
|
1416
|
+
children: [
|
|
1417
|
+
/* @__PURE__ */ jsx("div", { role: "row", className: "grid grid-cols-7", children: WEEKDAYS.map((day) => /* @__PURE__ */ jsx(
|
|
1418
|
+
"span",
|
|
1419
|
+
{
|
|
1420
|
+
role: "columnheader",
|
|
1421
|
+
"aria-label": weekdayName(t, day, "long"),
|
|
1422
|
+
className: "grid h-8 place-items-center text-xs font-medium text-fg-subtle",
|
|
1423
|
+
children: weekdayName(t, day, "short").slice(0, 2)
|
|
1424
|
+
},
|
|
1425
|
+
day
|
|
1426
|
+
)) }),
|
|
1427
|
+
Array.from({ length: Math.ceil(cells.length / 7) }, (_, row) => /* @__PURE__ */ jsx(
|
|
1428
|
+
"div",
|
|
1429
|
+
{
|
|
1430
|
+
role: "row",
|
|
1431
|
+
className: "grid grid-cols-7",
|
|
1432
|
+
children: cells.slice(row * 7, row * 7 + 7).map((date, column) => {
|
|
1433
|
+
if (!date) return /* @__PURE__ */ jsx("span", { role: "gridcell" }, `blank-${WEEKDAYS[column]}`);
|
|
1434
|
+
const iso = formatLocalDate(date);
|
|
1435
|
+
const selected = value !== null && dayNumber(value) === dayNumber(date);
|
|
1436
|
+
const isToday = dayNumber(date) === minDay;
|
|
1437
|
+
const past = dayNumber(date) < minDay;
|
|
1438
|
+
const focused = dayNumber(date) === dayNumber(focus);
|
|
1439
|
+
return /* @__PURE__ */ jsx("span", { role: "gridcell", "aria-selected": selected, children: /* @__PURE__ */ jsxs(
|
|
1440
|
+
"button",
|
|
1441
|
+
{
|
|
1442
|
+
type: "button",
|
|
1443
|
+
"data-date": iso,
|
|
1444
|
+
tabIndex: focused ? 0 : -1,
|
|
1445
|
+
disabled: past,
|
|
1446
|
+
"aria-label": t(
|
|
1447
|
+
isToday ? "cadence.picker.monthDayToday" : "cadence.picker.monthDay",
|
|
1448
|
+
{
|
|
1449
|
+
weekday: weekdayName(t, weekdayOf(date), "long"),
|
|
1450
|
+
day: date.day,
|
|
1451
|
+
month: monthName(t, date.month, "long"),
|
|
1452
|
+
year: date.year
|
|
1453
|
+
}
|
|
1454
|
+
),
|
|
1455
|
+
onClick: () => onSelect(date),
|
|
1456
|
+
className: cn(
|
|
1457
|
+
"relative mx-auto grid size-9 place-items-center rounded-[10px] text-sm tabular-nums transition-colors duration-[120ms]",
|
|
1458
|
+
selected ? "border border-primary-border bg-primary font-medium text-primary-foreground" : past ? "cursor-not-allowed text-fg-subtle" : "text-fg hover:bg-surface-2"
|
|
1459
|
+
),
|
|
1460
|
+
children: [
|
|
1461
|
+
date.day,
|
|
1462
|
+
isToday && !selected ? /* @__PURE__ */ jsx(
|
|
1463
|
+
"span",
|
|
1464
|
+
{
|
|
1465
|
+
"aria-hidden": "true",
|
|
1466
|
+
className: "absolute bottom-1 size-1 rounded-full bg-brand"
|
|
1467
|
+
}
|
|
1468
|
+
) : null
|
|
1469
|
+
]
|
|
1470
|
+
}
|
|
1471
|
+
) }, iso);
|
|
1472
|
+
})
|
|
1473
|
+
},
|
|
1474
|
+
`week-${view.year}-${view.month}-${row}`
|
|
1475
|
+
))
|
|
1476
|
+
]
|
|
1477
|
+
}
|
|
1478
|
+
)
|
|
1479
|
+
] });
|
|
1480
|
+
}
|
|
1481
|
+
function DateField({
|
|
1482
|
+
value,
|
|
1483
|
+
onChange,
|
|
1484
|
+
timeZone,
|
|
1485
|
+
now,
|
|
1486
|
+
disabled,
|
|
1487
|
+
invalid,
|
|
1488
|
+
describedBy,
|
|
1489
|
+
className
|
|
1490
|
+
}) {
|
|
1491
|
+
const t = useOpenGeniText();
|
|
1492
|
+
const [open, setOpen] = useState(false);
|
|
1493
|
+
const date = parseLocalDate(value);
|
|
1494
|
+
const today = localDateOf(now, timeZone);
|
|
1495
|
+
const label = date ? dateLabel(t, date, today) : t("cadence.picker.pickDate");
|
|
1496
|
+
return /* @__PURE__ */ jsxs(PopoverPrimitive.Root, { open, onOpenChange: setOpen, children: [
|
|
1497
|
+
/* @__PURE__ */ jsxs(
|
|
1498
|
+
PopoverPrimitive.Trigger,
|
|
1499
|
+
{
|
|
1500
|
+
type: "button",
|
|
1501
|
+
disabled,
|
|
1502
|
+
"aria-label": t("cadence.picker.dateLabel", { date: label }),
|
|
1503
|
+
"aria-invalid": invalid || void 0,
|
|
1504
|
+
"aria-describedby": describedBy,
|
|
1505
|
+
className: cn(fieldBase, "justify-between", className),
|
|
1506
|
+
children: [
|
|
1507
|
+
/* @__PURE__ */ jsx(CalendarIcon, { "aria-hidden": "true", className: "size-4 shrink-0 text-fg-subtle" }),
|
|
1508
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: label })
|
|
1509
|
+
]
|
|
1510
|
+
}
|
|
1511
|
+
),
|
|
1512
|
+
/* @__PURE__ */ jsx(PopoverContainedPortal, { children: /* @__PURE__ */ jsx(
|
|
1513
|
+
PopoverPrimitive.Content,
|
|
1514
|
+
{
|
|
1515
|
+
align: "start",
|
|
1516
|
+
sideOffset: 6,
|
|
1517
|
+
collisionPadding: 12,
|
|
1518
|
+
className: popoverPanel,
|
|
1519
|
+
children: /* @__PURE__ */ jsx(
|
|
1520
|
+
CalendarGrid,
|
|
1521
|
+
{
|
|
1522
|
+
value: date,
|
|
1523
|
+
min: today,
|
|
1524
|
+
onSelect: (picked) => {
|
|
1525
|
+
onChange(formatLocalDate(picked));
|
|
1526
|
+
setOpen(false);
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
)
|
|
1530
|
+
}
|
|
1531
|
+
) })
|
|
1532
|
+
] });
|
|
1533
|
+
}
|
|
1534
|
+
function CadencePreview({
|
|
1535
|
+
value,
|
|
1536
|
+
now,
|
|
1537
|
+
timeZones = NO_TIME_ZONES,
|
|
1538
|
+
viewerTimeZone,
|
|
1539
|
+
count = 3,
|
|
1540
|
+
issue,
|
|
1541
|
+
id,
|
|
1542
|
+
className
|
|
1543
|
+
}) {
|
|
1544
|
+
const t = useOpenGeniText();
|
|
1545
|
+
const zone = zoneOption(value.timeZone, timeZones, now, t);
|
|
1546
|
+
const options = { timeZone: value.timeZone, now, text: t };
|
|
1547
|
+
const problem = issue ?? validateCadence(value.rule, options)?.message ?? null;
|
|
1548
|
+
const description = describeCadence(value.rule, {
|
|
1549
|
+
timeZone: value.timeZone,
|
|
1550
|
+
timeZoneLabel: zone.label,
|
|
1551
|
+
timeZoneShortLabel: zone.shortLabel,
|
|
1552
|
+
now,
|
|
1553
|
+
text: t
|
|
1554
|
+
});
|
|
1555
|
+
const runs = problem ? [] : nextRuns(value.rule, { ...options, count });
|
|
1556
|
+
const viewerZone = viewerTimeZone && viewerTimeZone !== value.timeZone && usesTime(value.rule) ? viewerTimeZone : null;
|
|
1557
|
+
const viewerLine = viewerZone && runs[0] ? (() => {
|
|
1558
|
+
const local = zonedParts(runs[0], viewerZone);
|
|
1559
|
+
const viewerLabel = zoneOption(viewerZone, timeZones, now, t).label;
|
|
1560
|
+
return t("cadence.picker.viewerTime", {
|
|
1561
|
+
time: `${pad(local.hour)}:${pad(local.minute)}`,
|
|
1562
|
+
zone: viewerLabel
|
|
1563
|
+
});
|
|
1564
|
+
})() : null;
|
|
1565
|
+
if (problem) {
|
|
1566
|
+
return /* @__PURE__ */ jsxs(
|
|
1567
|
+
"p",
|
|
1568
|
+
{
|
|
1569
|
+
id,
|
|
1570
|
+
role: "status",
|
|
1571
|
+
"aria-live": "polite",
|
|
1572
|
+
className: cn(
|
|
1573
|
+
"flex min-w-0 items-start gap-1.5 text-xs leading-4.5 text-danger",
|
|
1574
|
+
className
|
|
1575
|
+
),
|
|
1576
|
+
children: [
|
|
1577
|
+
/* @__PURE__ */ jsx(CircleAlertIcon, { "aria-hidden": "true", className: "mt-0.5 size-3.5 shrink-0" }),
|
|
1578
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 break-words", children: problem })
|
|
1579
|
+
]
|
|
1580
|
+
}
|
|
1581
|
+
);
|
|
1582
|
+
}
|
|
1583
|
+
return /* @__PURE__ */ jsxs(
|
|
1584
|
+
"div",
|
|
1585
|
+
{
|
|
1586
|
+
id,
|
|
1587
|
+
role: "status",
|
|
1588
|
+
"aria-live": "polite",
|
|
1589
|
+
className: cn(
|
|
1590
|
+
"flex min-w-0 items-start gap-2.5 rounded-[10px] bg-surface-2 px-3 py-2.5",
|
|
1591
|
+
className
|
|
1592
|
+
),
|
|
1593
|
+
children: [
|
|
1594
|
+
/* @__PURE__ */ jsx(CalendarClockIcon, { "aria-hidden": "true", className: "mt-0.5 size-4 shrink-0 text-fg-subtle" }),
|
|
1595
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
1596
|
+
/* @__PURE__ */ jsxs("p", { className: "text-sm font-medium text-fg", children: [
|
|
1597
|
+
description.sentence,
|
|
1598
|
+
"."
|
|
1599
|
+
] }),
|
|
1600
|
+
/* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs leading-4.5 text-fg-muted", children: runs.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1601
|
+
/* @__PURE__ */ jsx("span", { className: "text-fg-subtle", children: t("cadence.picker.next") }),
|
|
1602
|
+
describeNextRuns(runs, options)
|
|
1603
|
+
] }) : t("cadence.picker.noUpcomingRuns") }),
|
|
1604
|
+
viewerLine ? /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs leading-4.5 text-fg-subtle", children: viewerLine }) : null
|
|
1605
|
+
] })
|
|
1606
|
+
]
|
|
1607
|
+
}
|
|
1608
|
+
);
|
|
1609
|
+
}
|
|
1610
|
+
function FrequencySelect({ value, update, now, disabled, frequencies }) {
|
|
1611
|
+
const rule = value.rule;
|
|
1612
|
+
const t = useOpenGeniText();
|
|
1613
|
+
return /* @__PURE__ */ jsx(
|
|
1614
|
+
ValueSelect,
|
|
1615
|
+
{
|
|
1616
|
+
label: t("cadence.picker.howOften"),
|
|
1617
|
+
value: rule.frequency,
|
|
1618
|
+
triggerLabel: frequencyWords(t, rule.frequency).trigger,
|
|
1619
|
+
disabled,
|
|
1620
|
+
options: frequencies.map((frequency) => {
|
|
1621
|
+
const words = frequencyWords(t, frequency);
|
|
1622
|
+
return { value: frequency, label: words.label, description: words.description };
|
|
1623
|
+
}),
|
|
1624
|
+
onValueChange: (frequency) => update(switchFrequency(rule, frequency, { timeZone: value.timeZone, now })),
|
|
1625
|
+
contentClassName: "w-64"
|
|
1626
|
+
}
|
|
1627
|
+
);
|
|
1628
|
+
}
|
|
1629
|
+
var DAY_OF_MONTH_OPTIONS = Array.from({ length: 31 }, (_, index) => ({
|
|
1630
|
+
value: String(index + 1),
|
|
1631
|
+
label: String(index + 1)
|
|
1632
|
+
}));
|
|
1633
|
+
function Phrase({ inline, children }) {
|
|
1634
|
+
return inline ? /* @__PURE__ */ jsx("span", { className: "inline-flex min-w-0 items-center gap-2", children }) : /* @__PURE__ */ jsx(Fragment, { children });
|
|
1635
|
+
}
|
|
1636
|
+
function RuleDetails({
|
|
1637
|
+
value,
|
|
1638
|
+
update,
|
|
1639
|
+
issue,
|
|
1640
|
+
issueId,
|
|
1641
|
+
now,
|
|
1642
|
+
disabled,
|
|
1643
|
+
layout
|
|
1644
|
+
}) {
|
|
1645
|
+
const rule = normalizeCadenceRule(value.rule, value.timeZone);
|
|
1646
|
+
const invalid = (field) => issue?.field === field;
|
|
1647
|
+
const described = (field) => issue?.field === field ? issueId : void 0;
|
|
1648
|
+
const t = useOpenGeniText();
|
|
1649
|
+
const word = (text) => layout === "inline" ? /* @__PURE__ */ jsx("span", { className: connector, children: text }) : null;
|
|
1650
|
+
const inline = layout === "inline";
|
|
1651
|
+
switch (rule.frequency) {
|
|
1652
|
+
case "weekly":
|
|
1653
|
+
return /* @__PURE__ */ jsxs(Phrase, { inline, children: [
|
|
1654
|
+
word(t("cadence.picker.wordOn")),
|
|
1655
|
+
/* @__PURE__ */ jsx(
|
|
1656
|
+
DayToggleGroup,
|
|
1657
|
+
{
|
|
1658
|
+
days: rule.days,
|
|
1659
|
+
disabled,
|
|
1660
|
+
invalid: invalid("days"),
|
|
1661
|
+
describedBy: described("days"),
|
|
1662
|
+
onChange: (days) => update({ ...rule, days })
|
|
1663
|
+
}
|
|
1664
|
+
)
|
|
1665
|
+
] });
|
|
1666
|
+
case "monthly":
|
|
1667
|
+
return /* @__PURE__ */ jsxs(Phrase, { inline, children: [
|
|
1668
|
+
word(t("cadence.picker.wordOnDay")),
|
|
1669
|
+
/* @__PURE__ */ jsx(
|
|
1670
|
+
ValueSelect,
|
|
1671
|
+
{
|
|
1672
|
+
label: t("cadence.picker.dayOfMonth"),
|
|
1673
|
+
value: String(rule.dayOfMonth),
|
|
1674
|
+
options: DAY_OF_MONTH_OPTIONS,
|
|
1675
|
+
disabled,
|
|
1676
|
+
invalid: invalid("dayOfMonth"),
|
|
1677
|
+
describedBy: described("dayOfMonth"),
|
|
1678
|
+
onValueChange: (day) => update({ ...rule, dayOfMonth: Number(day) }),
|
|
1679
|
+
className: "w-[4.5rem]",
|
|
1680
|
+
contentClassName: "w-24"
|
|
1681
|
+
}
|
|
1682
|
+
)
|
|
1683
|
+
] });
|
|
1684
|
+
case "interval":
|
|
1685
|
+
return /* @__PURE__ */ jsxs(Phrase, { inline, children: [
|
|
1686
|
+
/* @__PURE__ */ jsx(
|
|
1687
|
+
NumberField,
|
|
1688
|
+
{
|
|
1689
|
+
label: t("cadence.picker.everyHowMany"),
|
|
1690
|
+
value: rule.every,
|
|
1691
|
+
max: UNIT_LIMITS[rule.unit],
|
|
1692
|
+
disabled,
|
|
1693
|
+
invalid: invalid("every"),
|
|
1694
|
+
describedBy: described("every"),
|
|
1695
|
+
onChange: (every) => update({ ...rule, every })
|
|
1696
|
+
}
|
|
1697
|
+
),
|
|
1698
|
+
/* @__PURE__ */ jsx(
|
|
1699
|
+
ValueSelect,
|
|
1700
|
+
{
|
|
1701
|
+
label: t("cadence.picker.unit"),
|
|
1702
|
+
value: rule.unit,
|
|
1703
|
+
options: unitOptions(t, rule.every),
|
|
1704
|
+
disabled,
|
|
1705
|
+
onValueChange: (unit) => update(
|
|
1706
|
+
unit === "days" ? {
|
|
1707
|
+
frequency: "interval",
|
|
1708
|
+
every: Math.min(rule.every, UNIT_LIMITS.days),
|
|
1709
|
+
unit,
|
|
1710
|
+
time: rule.time ?? DEFAULT_CADENCE_TIME
|
|
1711
|
+
} : { frequency: "interval", every: Math.min(rule.every, UNIT_LIMITS[unit]), unit }
|
|
1712
|
+
),
|
|
1713
|
+
className: "w-[6.5rem]"
|
|
1714
|
+
}
|
|
1715
|
+
)
|
|
1716
|
+
] });
|
|
1717
|
+
case "once":
|
|
1718
|
+
if ("at" in rule) return null;
|
|
1719
|
+
return /* @__PURE__ */ jsxs(Phrase, { inline, children: [
|
|
1720
|
+
word(t("cadence.picker.wordOn")),
|
|
1721
|
+
/* @__PURE__ */ jsx(
|
|
1722
|
+
DateField,
|
|
1723
|
+
{
|
|
1724
|
+
value: rule.date,
|
|
1725
|
+
timeZone: value.timeZone,
|
|
1726
|
+
now,
|
|
1727
|
+
disabled,
|
|
1728
|
+
invalid: invalid("date"),
|
|
1729
|
+
describedBy: described("date"),
|
|
1730
|
+
onChange: (date) => update({ ...rule, date })
|
|
1731
|
+
}
|
|
1732
|
+
)
|
|
1733
|
+
] });
|
|
1734
|
+
default:
|
|
1735
|
+
return null;
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
function monthDayHint(t, rule) {
|
|
1739
|
+
if (rule.frequency !== "monthly" || rule.dayOfMonth <= 28) return null;
|
|
1740
|
+
return rule.dayOfMonth === 29 ? t("cadence.picker.skipsFebruary") : t("cadence.picker.skipsShortMonths", { day: rule.dayOfMonth });
|
|
1741
|
+
}
|
|
1742
|
+
function SentenceVariant(props) {
|
|
1743
|
+
const { value, update, updateZone, now, disabled, timeZones } = props;
|
|
1744
|
+
const rule = value.rule;
|
|
1745
|
+
const time = ruleTime(normalizeCadenceRule(rule, value.timeZone));
|
|
1746
|
+
const showTime = usesTime(rule) && time !== void 0;
|
|
1747
|
+
const t = useOpenGeniText();
|
|
1748
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-x-2 gap-y-2", children: [
|
|
1749
|
+
/* @__PURE__ */ jsx(FrequencySelect, { ...props }),
|
|
1750
|
+
rule.frequency === "hourly" ? /* @__PURE__ */ jsx("span", { className: connector, children: t("cadence.picker.onTheHour") }) : null,
|
|
1751
|
+
/* @__PURE__ */ jsx(RuleDetails, { ...props, layout: "inline" }),
|
|
1752
|
+
showTime ? /* @__PURE__ */ jsxs("span", { className: "inline-flex min-w-0 items-center gap-2", children: [
|
|
1753
|
+
/* @__PURE__ */ jsx("span", { className: connector, children: t("cadence.picker.wordAt") }),
|
|
1754
|
+
/* @__PURE__ */ jsx(
|
|
1755
|
+
TimeField,
|
|
1756
|
+
{
|
|
1757
|
+
value: time,
|
|
1758
|
+
disabled,
|
|
1759
|
+
onChange: (next) => update(withTime(normalizeCadenceRule(rule, value.timeZone), next))
|
|
1760
|
+
}
|
|
1761
|
+
),
|
|
1762
|
+
/* @__PURE__ */ jsx(
|
|
1763
|
+
TimeZonePicker,
|
|
1764
|
+
{
|
|
1765
|
+
value: value.timeZone,
|
|
1766
|
+
onChange: updateZone,
|
|
1767
|
+
timeZones,
|
|
1768
|
+
now,
|
|
1769
|
+
disabled
|
|
1770
|
+
}
|
|
1771
|
+
)
|
|
1772
|
+
] }) : null
|
|
1773
|
+
] });
|
|
1774
|
+
}
|
|
1775
|
+
function PresetChips({
|
|
1776
|
+
value,
|
|
1777
|
+
frequencies,
|
|
1778
|
+
onChange,
|
|
1779
|
+
disabled,
|
|
1780
|
+
labelledBy
|
|
1781
|
+
}) {
|
|
1782
|
+
const t = useOpenGeniText();
|
|
1783
|
+
const refs = useRef([]);
|
|
1784
|
+
const onKeyDown = (event, index) => {
|
|
1785
|
+
const delta = event.key === "ArrowRight" || event.key === "ArrowDown" ? 1 : event.key === "ArrowLeft" || event.key === "ArrowUp" ? -1 : 0;
|
|
1786
|
+
if (!delta) return;
|
|
1787
|
+
event.preventDefault();
|
|
1788
|
+
const next = (index + delta + frequencies.length) % frequencies.length;
|
|
1789
|
+
onChange(frequencies[next]);
|
|
1790
|
+
refs.current[next]?.focus();
|
|
1791
|
+
};
|
|
1792
|
+
return /* @__PURE__ */ jsx("div", { role: "radiogroup", "aria-labelledby": labelledBy, className: "flex min-w-0 flex-wrap gap-1.5", children: frequencies.map((frequency, index) => {
|
|
1793
|
+
const checked = frequency === value;
|
|
1794
|
+
return /* @__PURE__ */ jsx(
|
|
1795
|
+
"button",
|
|
1796
|
+
{
|
|
1797
|
+
ref: (node) => {
|
|
1798
|
+
refs.current[index] = node;
|
|
1799
|
+
},
|
|
1800
|
+
type: "button",
|
|
1801
|
+
role: "radio",
|
|
1802
|
+
"aria-checked": checked,
|
|
1803
|
+
tabIndex: checked ? 0 : -1,
|
|
1804
|
+
disabled,
|
|
1805
|
+
onClick: () => onChange(frequency),
|
|
1806
|
+
onKeyDown: (event) => onKeyDown(event, index),
|
|
1807
|
+
className: cn(
|
|
1808
|
+
"inline-flex h-8 items-center rounded-full border px-3 text-sm font-medium transition-colors duration-[120ms] disabled:cursor-not-allowed pointer-coarse:h-11",
|
|
1809
|
+
// Selected matches the outlined segmented control: brand tint, soft brand edge.
|
|
1810
|
+
checked ? "border-brand/45 bg-brand/10 text-brand disabled:border-border disabled:bg-surface-3 disabled:text-fg-muted" : "border-border bg-surface text-fg-muted hover:border-border-strong hover:text-fg disabled:bg-surface-2 disabled:text-fg-subtle disabled:hover:border-border"
|
|
1811
|
+
),
|
|
1812
|
+
children: frequencyWords(t, frequency).preset
|
|
1813
|
+
},
|
|
1814
|
+
frequency
|
|
1815
|
+
);
|
|
1816
|
+
}) });
|
|
1817
|
+
}
|
|
1818
|
+
function PresetField({
|
|
1819
|
+
label,
|
|
1820
|
+
htmlFor,
|
|
1821
|
+
labelId,
|
|
1822
|
+
children
|
|
1823
|
+
}) {
|
|
1824
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-1.5", children: [
|
|
1825
|
+
htmlFor ? /* @__PURE__ */ jsx("label", { htmlFor, id: labelId, className: "text-xs leading-4.5 font-medium text-fg", children: label }) : /* @__PURE__ */ jsx("span", { id: labelId, className: "text-xs leading-4.5 font-medium text-fg", children: label }),
|
|
1826
|
+
/* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children })
|
|
1827
|
+
] });
|
|
1828
|
+
}
|
|
1829
|
+
function PresetsVariant(props) {
|
|
1830
|
+
const { value, update, updateZone, now, disabled, timeZones, frequencies } = props;
|
|
1831
|
+
const rule = normalizeCadenceRule(value.rule, value.timeZone);
|
|
1832
|
+
const time = ruleTime(rule);
|
|
1833
|
+
const repeatsId = useId();
|
|
1834
|
+
const timeId = useId();
|
|
1835
|
+
const t = useOpenGeniText();
|
|
1836
|
+
const detailLabel = {
|
|
1837
|
+
weekly: t("cadence.picker.days"),
|
|
1838
|
+
monthly: t("cadence.picker.dayOfMonth"),
|
|
1839
|
+
interval: t("cadence.picker.every"),
|
|
1840
|
+
once: t("cadence.picker.date")
|
|
1841
|
+
};
|
|
1842
|
+
const detail = detailLabel[rule.frequency];
|
|
1843
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-4", children: [
|
|
1844
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-2", children: [
|
|
1845
|
+
/* @__PURE__ */ jsx("span", { id: repeatsId, className: "text-xs leading-4.5 font-medium text-fg", children: t("cadence.picker.repeats") }),
|
|
1846
|
+
/* @__PURE__ */ jsx(
|
|
1847
|
+
PresetChips,
|
|
1848
|
+
{
|
|
1849
|
+
value: rule.frequency,
|
|
1850
|
+
frequencies,
|
|
1851
|
+
labelledBy: repeatsId,
|
|
1852
|
+
disabled,
|
|
1853
|
+
onChange: (frequency) => update(switchFrequency(rule, frequency, { timeZone: value.timeZone, now }))
|
|
1854
|
+
}
|
|
1855
|
+
)
|
|
1856
|
+
] }),
|
|
1857
|
+
detail ? /* @__PURE__ */ jsx(PresetField, { label: detail, children: /* @__PURE__ */ jsx(RuleDetails, { ...props, layout: "stacked" }) }) : null,
|
|
1858
|
+
usesTime(rule) && time !== void 0 ? /* @__PURE__ */ jsxs("div", { className: "grid min-w-0 grid-cols-[auto_minmax(0,1fr)] gap-4", children: [
|
|
1859
|
+
/* @__PURE__ */ jsx(PresetField, { label: t("cadence.picker.time"), htmlFor: timeId, children: /* @__PURE__ */ jsx(
|
|
1860
|
+
TimeField,
|
|
1861
|
+
{
|
|
1862
|
+
id: timeId,
|
|
1863
|
+
value: time,
|
|
1864
|
+
disabled,
|
|
1865
|
+
onChange: (next) => update(withTime(rule, next))
|
|
1866
|
+
}
|
|
1867
|
+
) }),
|
|
1868
|
+
/* @__PURE__ */ jsx(PresetField, { label: t("cadence.picker.timeZone"), children: /* @__PURE__ */ jsx(
|
|
1869
|
+
TimeZonePicker,
|
|
1870
|
+
{
|
|
1871
|
+
value: value.timeZone,
|
|
1872
|
+
onChange: updateZone,
|
|
1873
|
+
timeZones,
|
|
1874
|
+
now,
|
|
1875
|
+
disabled,
|
|
1876
|
+
className: "w-full max-w-60"
|
|
1877
|
+
}
|
|
1878
|
+
) })
|
|
1879
|
+
] }) : null
|
|
1880
|
+
] });
|
|
1881
|
+
}
|
|
1882
|
+
var TEXT_EXAMPLES = [
|
|
1883
|
+
"weekdays at 8",
|
|
1884
|
+
"mon and thu at 9:30",
|
|
1885
|
+
"1st of the month at 9",
|
|
1886
|
+
"every 30 min"
|
|
1887
|
+
];
|
|
1888
|
+
function TextVariant({
|
|
1889
|
+
value,
|
|
1890
|
+
update,
|
|
1891
|
+
updateZone,
|
|
1892
|
+
now,
|
|
1893
|
+
disabled,
|
|
1894
|
+
timeZones,
|
|
1895
|
+
inputIssueId,
|
|
1896
|
+
onIssue
|
|
1897
|
+
}) {
|
|
1898
|
+
const [text, setText] = useState(() => cadencePhrase(value.rule, value.timeZone, now));
|
|
1899
|
+
const inputId = useId();
|
|
1900
|
+
const read = (next) => {
|
|
1901
|
+
setText(next);
|
|
1902
|
+
const result = parseCadence(next, { timeZone: value.timeZone, now });
|
|
1903
|
+
if (result.ok) {
|
|
1904
|
+
onIssue(null);
|
|
1905
|
+
update(result.rule);
|
|
1906
|
+
} else {
|
|
1907
|
+
onIssue(result.message);
|
|
1908
|
+
}
|
|
1909
|
+
};
|
|
1910
|
+
return /* @__PURE__ */ jsxs("div", { className: "@container/cadence-text flex min-w-0 flex-col gap-2.5", children: [
|
|
1911
|
+
/* @__PURE__ */ jsxs(
|
|
1912
|
+
"div",
|
|
1913
|
+
{
|
|
1914
|
+
className: cn(
|
|
1915
|
+
"flex h-9 min-w-0 items-center gap-1 rounded-[10px] border border-border pr-1 pl-3 transition-colors duration-[120ms] pointer-coarse:h-11",
|
|
1916
|
+
disabled ? "bg-surface-2 text-fg-muted" : "bg-surface hover:border-border-strong focus-within:border-brand focus-within:outline-2 focus-within:outline-offset-2 focus-within:outline-brand/55 focus-within:hover:border-brand"
|
|
1917
|
+
),
|
|
1918
|
+
children: [
|
|
1919
|
+
/* @__PURE__ */ jsx(CalendarClockIcon, { "aria-hidden": "true", className: "size-4 shrink-0 text-fg-subtle" }),
|
|
1920
|
+
/* @__PURE__ */ jsx(
|
|
1921
|
+
"input",
|
|
1922
|
+
{
|
|
1923
|
+
id: inputId,
|
|
1924
|
+
type: "text",
|
|
1925
|
+
autoComplete: "off",
|
|
1926
|
+
spellCheck: false,
|
|
1927
|
+
"aria-label": "When it runs, in words",
|
|
1928
|
+
"aria-describedby": inputIssueId,
|
|
1929
|
+
disabled,
|
|
1930
|
+
value: text,
|
|
1931
|
+
placeholder: 'For example "every weekday at 8"',
|
|
1932
|
+
onChange: (event) => read(event.target.value),
|
|
1933
|
+
className: "h-full min-w-0 flex-1 bg-transparent px-1.5 text-sm text-fg outline-hidden! placeholder:text-fg-subtle disabled:cursor-not-allowed disabled:text-fg-muted pointer-coarse:text-base"
|
|
1934
|
+
}
|
|
1935
|
+
),
|
|
1936
|
+
/* @__PURE__ */ jsx(
|
|
1937
|
+
TimeZonePicker,
|
|
1938
|
+
{
|
|
1939
|
+
value: value.timeZone,
|
|
1940
|
+
onChange: updateZone,
|
|
1941
|
+
timeZones,
|
|
1942
|
+
now,
|
|
1943
|
+
disabled,
|
|
1944
|
+
variant: "ghost",
|
|
1945
|
+
className: "max-w-44 shrink-0"
|
|
1946
|
+
}
|
|
1947
|
+
)
|
|
1948
|
+
]
|
|
1949
|
+
}
|
|
1950
|
+
),
|
|
1951
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: [
|
|
1952
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-fg-subtle", children: "Try" }),
|
|
1953
|
+
TEXT_EXAMPLES.map((example) => /* @__PURE__ */ jsx(
|
|
1954
|
+
"button",
|
|
1955
|
+
{
|
|
1956
|
+
type: "button",
|
|
1957
|
+
disabled,
|
|
1958
|
+
onClick: () => read(example),
|
|
1959
|
+
className: "inline-flex h-7 items-center rounded-full border border-border bg-surface px-2.5 text-xs text-fg-muted transition-colors duration-[120ms] hover:border-border-strong hover:text-fg disabled:cursor-not-allowed disabled:bg-surface-2 disabled:text-fg-subtle disabled:hover:border-border pointer-coarse:h-9",
|
|
1960
|
+
children: example
|
|
1961
|
+
},
|
|
1962
|
+
example
|
|
1963
|
+
))
|
|
1964
|
+
] })
|
|
1965
|
+
] });
|
|
1966
|
+
}
|
|
1967
|
+
function CadencePicker({
|
|
1968
|
+
value,
|
|
1969
|
+
onChange,
|
|
1970
|
+
variant = "sentence",
|
|
1971
|
+
timeZones = NO_TIME_ZONES,
|
|
1972
|
+
frequencies = ALL_FREQUENCIES,
|
|
1973
|
+
now: nowProp,
|
|
1974
|
+
viewerTimeZone,
|
|
1975
|
+
previewCount = 3,
|
|
1976
|
+
disabled,
|
|
1977
|
+
disabledReason,
|
|
1978
|
+
"aria-labelledby": labelledBy,
|
|
1979
|
+
className
|
|
1980
|
+
}) {
|
|
1981
|
+
const [firstRender] = useState(() => /* @__PURE__ */ new Date());
|
|
1982
|
+
const now = nowProp ?? firstRender;
|
|
1983
|
+
const issueId = useId();
|
|
1984
|
+
const reasonId = useId();
|
|
1985
|
+
const t = useOpenGeniText();
|
|
1986
|
+
const [parseIssue, setParseIssue] = useState(null);
|
|
1987
|
+
const issue = validateCadence(value.rule, { timeZone: value.timeZone, now, text: t });
|
|
1988
|
+
const hint = monthDayHint(t, value.rule);
|
|
1989
|
+
const parts = {
|
|
1990
|
+
value,
|
|
1991
|
+
update: (rule) => onChange({ ...value, rule }),
|
|
1992
|
+
updateZone: (timeZone) => onChange({ ...value, timeZone }),
|
|
1993
|
+
issue,
|
|
1994
|
+
issueId,
|
|
1995
|
+
now,
|
|
1996
|
+
disabled,
|
|
1997
|
+
timeZones,
|
|
1998
|
+
frequencies
|
|
1999
|
+
};
|
|
2000
|
+
return /* @__PURE__ */ jsxs(
|
|
2001
|
+
"div",
|
|
2002
|
+
{
|
|
2003
|
+
role: "group",
|
|
2004
|
+
"aria-labelledby": labelledBy,
|
|
2005
|
+
"aria-describedby": disabled && disabledReason ? reasonId : void 0,
|
|
2006
|
+
"data-variant": variant,
|
|
2007
|
+
className: cn("flex min-w-0 flex-col gap-3", className),
|
|
2008
|
+
children: [
|
|
2009
|
+
variant === "presets" ? /* @__PURE__ */ jsx(PresetsVariant, { ...parts }) : variant === "text" ? /* @__PURE__ */ jsx(TextVariant, { ...parts, inputIssueId: issueId, onIssue: setParseIssue }) : /* @__PURE__ */ jsx(SentenceVariant, { ...parts }),
|
|
2010
|
+
hint && !issue ? /* @__PURE__ */ jsx("p", { className: "-mt-1 text-xs leading-4.5 text-fg-muted", children: hint }) : null,
|
|
2011
|
+
/* @__PURE__ */ jsx(
|
|
2012
|
+
CadencePreview,
|
|
2013
|
+
{
|
|
2014
|
+
id: issueId,
|
|
2015
|
+
value,
|
|
2016
|
+
now,
|
|
2017
|
+
timeZones,
|
|
2018
|
+
viewerTimeZone,
|
|
2019
|
+
count: previewCount,
|
|
2020
|
+
issue: variant === "text" ? parseIssue : null,
|
|
2021
|
+
className: variant === "text" && parseIssue || issue ? "-mt-1.5" : void 0
|
|
2022
|
+
}
|
|
2023
|
+
),
|
|
2024
|
+
disabled && disabledReason ? /* @__PURE__ */ jsx(InlineDisabledReason, { id: reasonId, children: disabledReason }) : null
|
|
2025
|
+
]
|
|
2026
|
+
}
|
|
2027
|
+
);
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
export {
|
|
2031
|
+
WEEKDAYS,
|
|
2032
|
+
DEFAULT_CADENCE_TIME,
|
|
2033
|
+
zonedParts,
|
|
2034
|
+
zonedTimeToUtc,
|
|
2035
|
+
formatLocalDate,
|
|
2036
|
+
parseLocalDate,
|
|
2037
|
+
timeZoneLabels,
|
|
2038
|
+
parseTime,
|
|
2039
|
+
normalizeTime,
|
|
2040
|
+
stepTime,
|
|
2041
|
+
formatRunTime,
|
|
2042
|
+
describeNextRuns,
|
|
2043
|
+
describeCadence,
|
|
2044
|
+
normalizeCadenceRule,
|
|
2045
|
+
validateCadence,
|
|
2046
|
+
nextRuns,
|
|
2047
|
+
toScheduleSpec,
|
|
2048
|
+
cadenceFromScheduleSpec,
|
|
2049
|
+
parseCadence,
|
|
2050
|
+
switchFrequency,
|
|
2051
|
+
cadencePhrase,
|
|
2052
|
+
TimeField,
|
|
2053
|
+
TimeZoneSearch,
|
|
2054
|
+
TimeZonePicker,
|
|
2055
|
+
CadencePreview,
|
|
2056
|
+
CadencePicker
|
|
2057
|
+
};
|
|
2058
|
+
//# sourceMappingURL=chunk-6JHU2UBS.js.map
|