tarsk 0.6.87 → 0.6.88
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/bundled-skills/email-me/SKILL.md +15 -0
- package/dist/bundled-skills/email-me/scripts/__tests__/email_me.test.js +64 -0
- package/dist/bundled-skills/email-me/scripts/email_me.js +45 -0
- package/dist/bundled-skills/handoff/SKILL.md +19 -0
- package/dist/bundled-skills/tarsk-agent/SKILL.md +372 -0
- package/dist/bundled-skills/tarsk-ask-user/SKILL.md +18 -0
- package/dist/bundled-skills/tarsk-ask-user/scripts/ask_user.js +101 -0
- package/dist/bundled-skills/tarsk-bash/SKILL.md +17 -0
- package/dist/bundled-skills/tarsk-bash/scripts/bash.js +248 -0
- package/dist/bundled-skills/tarsk-browser/SKILL.md +17 -0
- package/dist/bundled-skills/tarsk-browser/scripts/browser.js +252 -0
- package/dist/bundled-skills/tarsk-chat-title/SKILL.md +14 -0
- package/dist/bundled-skills/tarsk-chat-title/scripts/chat_title.js +37 -0
- package/dist/bundled-skills/tarsk-connect-mcp/SKILL.md +23 -0
- package/dist/bundled-skills/tarsk-connect-mcp/scripts/__tests__/connect_mcp.test.js +68 -0
- package/dist/bundled-skills/tarsk-connect-mcp/scripts/connect_mcp.js +119 -0
- package/dist/bundled-skills/tarsk-create-project/SKILL.md +25 -0
- package/dist/bundled-skills/tarsk-create-project/scripts/__tests__/create_project.test.js +94 -0
- package/dist/bundled-skills/tarsk-create-project/scripts/create_project.js +88 -0
- package/dist/bundled-skills/tarsk-edit/SKILL.md +18 -0
- package/dist/bundled-skills/tarsk-edit/scripts/edit.js +118 -0
- package/dist/bundled-skills/tarsk-execute-skill-script/SKILL.md +19 -0
- package/dist/bundled-skills/tarsk-execute-skill-script/scripts/execute_skill_script.js +77 -0
- package/dist/bundled-skills/tarsk-fetch/SKILL.md +18 -0
- package/dist/bundled-skills/tarsk-fetch/scripts/fetch.js +38 -0
- package/dist/bundled-skills/tarsk-find/SKILL.md +16 -0
- package/dist/bundled-skills/tarsk-find/scripts/find.js +78 -0
- package/dist/bundled-skills/tarsk-find-images/SKILL.md +18 -0
- package/dist/bundled-skills/tarsk-find-images/scripts/find_images.js +78 -0
- package/dist/bundled-skills/tarsk-generate-image/SKILL.md +18 -0
- package/dist/bundled-skills/tarsk-generate-image/scripts/generate_image.js +55 -0
- package/dist/bundled-skills/tarsk-get-observation/SKILL.md +19 -0
- package/dist/bundled-skills/tarsk-get-observation/scripts/get_observation.js +293 -0
- package/dist/bundled-skills/tarsk-grep/SKILL.md +16 -0
- package/dist/bundled-skills/tarsk-grep/scripts/grep.js +174 -0
- package/dist/bundled-skills/tarsk-history/SKILL.md +15 -0
- package/dist/bundled-skills/tarsk-history/scripts/history.js +68 -0
- package/dist/bundled-skills/tarsk-improve/SKILL.md +232 -0
- package/dist/bundled-skills/tarsk-improve/references/signals.md +16 -0
- package/dist/bundled-skills/tarsk-improve/scripts/durable-runs.ts +635 -0
- package/dist/bundled-skills/tarsk-improve/scripts/ensure-exported.ts +238 -0
- package/dist/bundled-skills/tarsk-improve/scripts/export-tool-skills-lib.ts +299 -0
- package/dist/bundled-skills/tarsk-improve/scripts/summarize-session.ts +126 -0
- package/dist/bundled-skills/tarsk-jobs/SKILL.md +18 -0
- package/dist/bundled-skills/tarsk-jobs/scripts/job_kill.js +45 -0
- package/dist/bundled-skills/tarsk-jobs/scripts/job_list.js +64 -0
- package/dist/bundled-skills/tarsk-jobs/scripts/job_output.js +66 -0
- package/dist/bundled-skills/tarsk-notes/SKILL.md +17 -0
- package/dist/bundled-skills/tarsk-notes/scripts/notes.js +86 -0
- package/dist/bundled-skills/tarsk-projects/SKILL.md +18 -0
- package/dist/bundled-skills/tarsk-projects/scripts/projects.js +54 -0
- package/dist/bundled-skills/tarsk-prompt-project/SKILL.md +18 -0
- package/dist/bundled-skills/tarsk-prompt-project/scripts/prompt_project.js +58 -0
- package/dist/bundled-skills/tarsk-propose-branch/SKILL.md +16 -0
- package/dist/bundled-skills/tarsk-propose-branch/scripts/propose_branch.js +45 -0
- package/dist/bundled-skills/tarsk-read/SKILL.md +17 -0
- package/dist/bundled-skills/tarsk-read/scripts/read.js +331 -0
- package/dist/bundled-skills/tarsk-read-skill/SKILL.md +16 -0
- package/dist/bundled-skills/tarsk-read-skill/scripts/read_skill.js +37 -0
- package/dist/bundled-skills/tarsk-read-skill-reference/SKILL.md +19 -0
- package/dist/bundled-skills/tarsk-read-skill-reference/scripts/read_skill_reference.js +60 -0
- package/dist/bundled-skills/tarsk-run-js/SKILL.md +18 -0
- package/dist/bundled-skills/tarsk-run-js/scripts/run_js.js +192 -0
- package/dist/bundled-skills/tarsk-tasks/SKILL.md +18 -0
- package/dist/bundled-skills/tarsk-tasks/scripts/tasks.js +96 -0
- package/dist/bundled-skills/tarsk-todo/SKILL.md +16 -0
- package/dist/bundled-skills/tarsk-todo/scripts/todo.js +165 -0
- package/dist/bundled-skills/tarsk-web-search/SKILL.md +15 -0
- package/dist/bundled-skills/tarsk-web-search/scripts/web_search.js +120 -0
- package/dist/bundled-skills/tarsk-write/SKILL.md +16 -0
- package/dist/bundled-skills/tarsk-write/scripts/write.js +57 -0
- package/dist/index.js +215804 -210026
- package/dist/node_modules/@libsql/darwin-arm64/README.md +3 -0
- package/dist/node_modules/@libsql/{darwin-x64 → darwin-arm64}/index.node +0 -0
- package/dist/node_modules/@libsql/{darwin-x64 → darwin-arm64}/package.json +6 -6
- package/dist/public/assets/account-view-DkuCOxkE.js +1 -0
- package/dist/public/assets/{alert-dialog-DVaEQlVa.js → alert-dialog-BcZULJsX.js} +1 -1
- package/dist/public/assets/api-B_GSyYGh.js +1 -0
- package/dist/public/assets/api-C4ukGdyH.js +2 -0
- package/dist/public/assets/{async-error-boundary-DH6Sqgmt.js → async-error-boundary-FT8_xvjy.js} +1 -1
- package/dist/public/assets/browser-tab-DCjHytQ8.js +12 -0
- package/dist/public/assets/button-DDaJhJP1.js +1 -0
- package/dist/public/assets/{card-BkOGFps5.js → card-DAc45J1v.js} +1 -1
- package/dist/public/assets/chat-dock-context-a2bV9cnz.js +1 -0
- package/dist/public/assets/chat-handlers-context-2xSKzkKa.js +9 -0
- package/dist/public/assets/commit-dialog-C1oUFznJ.js +1 -0
- package/dist/public/assets/{commit-error-dialog-D3S6kRVr.js → commit-error-dialog--NTHg7Aw.js} +1 -1
- package/dist/public/assets/{commit-method-fields-BEKfSRyW.js → commit-method-fields-Xt3vbwUg.js} +1 -1
- package/dist/public/assets/{conversation-history-view-CVMD8hUU.js → conversation-history-view-CdfE7JTD.js} +1 -1
- package/dist/public/assets/{create-project-dialog-nquqlloK.js → create-project-dialog-BdR6iQE9.js} +2 -2
- package/dist/public/assets/{create-project-workspace-C4tXAUWJ.js → create-project-workspace-DSTTGom_.js} +2 -2
- package/dist/public/assets/create-repo-dialog-gw-8Rpdm.js +1 -0
- package/dist/public/assets/{delete-confirm-dialog-SpYpU1AX.js → delete-confirm-dialog-D1N86piR.js} +1 -1
- package/dist/public/assets/dialog-D_12AsZd.js +1 -0
- package/dist/public/assets/diff-view-B6JJNyn1.js +4 -0
- package/dist/public/assets/{dist-NcyjV9Gu.js → dist-2xH_pFmV.js} +1 -1
- package/dist/public/assets/{dist-BTu7PDzc.js → dist-AbkJBHH5.js} +1 -1
- package/dist/public/assets/{dist-lFBinzor.js → dist-B-h6Wj39.js} +1 -1
- package/dist/public/assets/dist-CgbWuuq4.js +1 -0
- package/dist/public/assets/{dist-f54JuzFV.js → dist-DOz2WXwX.js} +1 -1
- package/dist/public/assets/{dist-CqrmQxmV.js → dist-DfnQ9YJh.js} +1 -1
- package/dist/public/assets/{dist-BOfRC57H.js → dist-JGbQ_EJY.js} +1 -1
- package/dist/public/assets/{dist-ButPmyjr.js → dist-pCVg1Jdl.js} +1 -1
- package/dist/public/assets/dist-v_MvKS2-.js +2 -0
- package/dist/public/assets/{es2015-CE7VcoOH.js → es2015-eNVkKfFF.js} +1 -1
- package/dist/public/assets/{explorer-file-drop-CEbBlDEp.js → explorer-file-drop-CzyAqZgf.js} +1 -1
- package/dist/public/assets/{explorer-monaco-editor-Bgo9Y1cP.js → explorer-monaco-editor-ChJZBFy5.js} +1 -1
- package/dist/public/assets/explorer-tab-view-CiUPh4uK.js +2 -0
- package/dist/public/assets/explorer-tree-BA12VLz_.js +1 -0
- package/dist/public/assets/{explorer-view-BuTa_0Uq.js → explorer-view-Daxl93oM.js} +3 -3
- package/dist/public/assets/git-history-dialog-Dqj1p35g.js +1 -0
- package/dist/public/assets/index-CoY8DilQ.js +97 -0
- package/dist/public/assets/index-D14wLW4o.css +1 -0
- package/dist/public/assets/{label-C31qF5zZ.js → label-BCs5CZEs.js} +1 -1
- package/dist/public/assets/markdown-renderer-D2VcKU4g.js +10 -0
- package/dist/public/assets/{mcp-manager-C3K_62H2.js → mcp-manager-D1HmLT3t.js} +1 -1
- package/dist/public/assets/{minus-l6BdrAEk.js → minus-CgQcbBQT.js} +1 -1
- package/dist/public/assets/{model-list-controls-DwW8S18v.js → model-list-controls-rXmaDp2r.js} +1 -1
- package/dist/public/assets/onboarding-dialog-DSqBJyBa.js +1 -0
- package/dist/public/assets/{pill-tabs-CmvvHdKG.js → pill-tabs-DtdTmrg7.js} +1 -1
- package/dist/public/assets/progress-indicator-hJ74ac5W.js +1 -0
- package/dist/public/assets/project-coding-view-DP4qKePE.js +1 -0
- package/dist/public/assets/{project-danger-zone-view-D18k4pUF.js → project-danger-zone-view-CGxIenpr.js} +1 -1
- package/dist/public/assets/{project-env-vars-view-BWFqoaFD.js → project-env-vars-view-DKyQkh7h.js} +1 -1
- package/dist/public/assets/project-model-aliases-view-BewwJZAx.js +1 -0
- package/dist/public/assets/project-settings-view-CE4nAz5B.js +1 -0
- package/dist/public/assets/{project-tools-view-DT87KPjE.js → project-tools-view-CbDfst02.js} +1 -1
- package/dist/public/assets/providers-list-view-BtwccvX2.js +1 -0
- package/dist/public/assets/pull-request-dialog-nKYATjbm.js +1 -0
- package/dist/public/assets/pull-with-changes-dialog-zzoFzCv4.js +1 -0
- package/dist/public/assets/push-before-pr-dialog-DH91JHEC.js +1 -0
- package/dist/public/assets/remote-media-url-CyuN31H_.js +1 -0
- package/dist/public/assets/{scroll-area-BWc4OPsj.js → scroll-area-CGEZ1gAL.js} +1 -1
- package/dist/public/assets/{select-B6RizwDW.js → select-BR2pG61R.js} +1 -1
- package/dist/public/assets/settings-general-tabs-view-BWR0UX2P.js +2 -0
- package/dist/public/assets/settings-general-view-BhtrDmJH.js +1 -0
- package/dist/public/assets/{settings-list-D35rpAof.js → settings-list-Dgip9HpD.js} +1 -1
- package/dist/public/assets/settings-logs-view-CS29x4VT.js +5 -0
- package/dist/public/assets/settings-mcp-servers-view-B5ithpfh.js +5 -0
- package/dist/public/assets/settings-models-view-DS7nm54P.js +1 -0
- package/dist/public/assets/settings-plugins-view-avaUE36r.js +2 -0
- package/dist/public/assets/settings-providers-view-B39k1iRQ.js +2 -0
- package/dist/public/assets/settings-remote-machines-view-BXondQG_.js +1 -0
- package/dist/public/assets/settings-setup-view-I5MGUi_D.js +2 -0
- package/dist/public/assets/settings-skills-view-BKrUABbi.js +2 -0
- package/dist/public/assets/{settings-slack-view-DkclyaBc.js → settings-slack-view-B0p-96GC.js} +1 -1
- package/dist/public/assets/settings-slash-commands-view-DA1scWv1.js +1 -0
- package/dist/public/assets/{settings-statistics-view-B03ZZjEy.js → settings-statistics-view-B3g6BD7p.js} +1 -1
- package/dist/public/assets/settings-storage-view-BJvjhI4f.js +1 -0
- package/dist/public/assets/settings-subagents-view-BziLwvNq.js +2 -0
- package/dist/public/assets/settings-system-prompt-view-BqAk56cD.js +1 -0
- package/dist/public/assets/{settings-tab-bar-ajzyt79U.js → settings-tab-bar-DYzU_lmi.js} +1 -1
- package/dist/public/assets/settings-view-zjMs7jNe.js +2 -0
- package/dist/public/assets/{slug-utils-D2jhPz-o.js → slug-utils-CO6nui1C.js} +1 -1
- package/dist/public/assets/square-CtxvwmM2.js +1 -0
- package/dist/public/assets/store-W78TGOIO.js +8 -0
- package/dist/public/assets/{table-C3Hc0Gwy.js → table-CQMqIW_-.js} +1 -1
- package/dist/public/assets/task-utils-BZPVmvY4.js +1 -0
- package/dist/public/assets/tasks-view-wFf77AQX.js +1 -0
- package/dist/public/assets/{terminal-panel-DCKqScJu.js → terminal-panel-Bm_ZelN-.js} +2 -2
- package/dist/public/assets/{toggle-group-DqSxGqvP.js → toggle-group-CPmseZfb.js} +1 -1
- package/dist/public/assets/{tooltip-CJKJfu0l.js → tooltip-CqwCZ7wt.js} +1 -1
- package/dist/public/assets/{use-account-settings-query-AUeOqKvo.js → use-account-settings-query-C-zOdREq.js} +1 -1
- package/dist/public/assets/{use-active-dock-panel-instance-BvAhUd_V.js → use-active-dock-panel-instance-4Ss8lB9K.js} +1 -1
- package/dist/public/assets/use-browser-overlay-block-CO1pUEAZ.js +1 -0
- package/dist/public/assets/use-git-check-CumqGAvN.js +1 -0
- package/dist/public/assets/{use-installed-ai-files-iy_AB0dN.js → use-installed-ai-files-DQey9Zm3.js} +1 -1
- package/dist/public/assets/use-open-chat-dock-panel-DqfWJ8e8.js +1 -0
- package/dist/public/assets/use-projects-CizIH2Fa.js +2 -0
- package/dist/public/assets/utils-CqsIXqSC.js +1 -0
- package/dist/public/assets/web-BNWoiS4w.js +1 -0
- package/dist/public/assets/web-CGP-jEpi.js +1 -0
- package/dist/public/assets/web-CKC9gpFi.js +1 -0
- package/dist/public/assets/web-Dlo3GwCf.js +1 -0
- package/dist/public/fonts/schibsted-grotesk-latin-ext-wght-normal.woff2 +0 -0
- package/dist/public/fonts/schibsted-grotesk-latin-wght-normal.woff2 +0 -0
- package/dist/public/index.html +45 -45
- package/package.json +6 -6
- package/dist/node_modules/@libsql/darwin-x64/README.md +0 -3
- package/dist/public/assets/account-view-5q3pHEHY.js +0 -1
- package/dist/public/assets/ai-spinner-DHwhlk4j.js +0 -1
- package/dist/public/assets/api-BdebJfuN.js +0 -1
- package/dist/public/assets/api-COO2LfdU.js +0 -2
- package/dist/public/assets/browser-overlay-block-CiDtkfup.js +0 -1
- package/dist/public/assets/browser-tab-CVdYLmW5.js +0 -12
- package/dist/public/assets/button-Dp5XDZNR.js +0 -1
- package/dist/public/assets/chat-dock-context-ymLoO90X.js +0 -1
- package/dist/public/assets/checkbox-D-BV8-Z_.js +0 -1
- package/dist/public/assets/commit-dialog-CEbCFh1x.js +0 -1
- package/dist/public/assets/create-repo-dialog-B5IE3pUJ.js +0 -1
- package/dist/public/assets/dialog-pHPeIGaB.js +0 -1
- package/dist/public/assets/diff-view-Cy6nPdX-.js +0 -4
- package/dist/public/assets/dist-D5vgS4RP.js +0 -2
- package/dist/public/assets/explorer-tab-view-C-8QZO9S.js +0 -2
- package/dist/public/assets/explorer-tree-HrLSFgcI.js +0 -1
- package/dist/public/assets/git-history-dialog-ClfF5IOn.js +0 -1
- package/dist/public/assets/index-BBLA5zVt.css +0 -1
- package/dist/public/assets/index-CalVAwXj.js +0 -104
- package/dist/public/assets/markdown-renderer-DXRBG7uP.js +0 -10
- package/dist/public/assets/onboarding-dialog-BtLy0wjC.js +0 -1
- package/dist/public/assets/progress-indicator-4zQXqOqP.js +0 -1
- package/dist/public/assets/project-coding-view-CyJwnJes.js +0 -1
- package/dist/public/assets/project-model-aliases-view-D3tYNkkM.js +0 -1
- package/dist/public/assets/project-settings-view-0oN9vFvD.js +0 -1
- package/dist/public/assets/providers-list-view-DCnh0W-5.js +0 -1
- package/dist/public/assets/pull-request-dialog-BdJxYQwu.js +0 -1
- package/dist/public/assets/pull-with-changes-dialog-Do9x9neW.js +0 -1
- package/dist/public/assets/push-before-pr-dialog-C-9z2O0-.js +0 -1
- package/dist/public/assets/remote-media-url-B8OFqxOM.js +0 -1
- package/dist/public/assets/settings-general-tabs-view-Dcek-ysB.js +0 -2
- package/dist/public/assets/settings-general-view-DhA2N6G5.js +0 -1
- package/dist/public/assets/settings-logs-view-eEUTIMeb.js +0 -5
- package/dist/public/assets/settings-mcp-servers-view-_oeuVkUe.js +0 -5
- package/dist/public/assets/settings-models-view-DW-ZmVup.js +0 -1
- package/dist/public/assets/settings-plugins-view-DTooco_c.js +0 -2
- package/dist/public/assets/settings-providers-view-CEeJkhg9.js +0 -2
- package/dist/public/assets/settings-remote-machines-view--UB8GlCK.js +0 -1
- package/dist/public/assets/settings-setup-view-DFL6DlYS.js +0 -2
- package/dist/public/assets/settings-skills-view-xS569-Kb.js +0 -2
- package/dist/public/assets/settings-slash-commands-view-DrCiayfq.js +0 -1
- package/dist/public/assets/settings-storage-view-CQnaVOt_.js +0 -1
- package/dist/public/assets/settings-subagents-view-DIctUJcE.js +0 -2
- package/dist/public/assets/settings-system-prompt-view-BMDbrFRR.js +0 -1
- package/dist/public/assets/settings-view-8M6sbGiX.js +0 -2
- package/dist/public/assets/store-CxUwqrZ5.js +0 -8
- package/dist/public/assets/task-utils-WAei2PDi.js +0 -1
- package/dist/public/assets/tasks-view-DKyqgGdE.js +0 -1
- package/dist/public/assets/use-browser-overlay-block-z9imTmiZ.js +0 -1
- package/dist/public/assets/use-git-check-B_5Jak2s.js +0 -1
- package/dist/public/assets/use-open-chat-dock-panel-w3hc5Vxn.js +0 -1
- package/dist/public/assets/use-projects-BmhAMgxB.js +0 -2
- package/dist/public/assets/utils-mYB1USG6.js +0 -1
- package/dist/public/assets/web-C6Gm4nQ0.js +0 -1
- package/dist/public/assets/web-DFlyNg8o.js +0 -1
- package/dist/public/assets/web-DlEPs8Xe.js +0 -1
- package/dist/public/assets/web-Gx3xReQH.js +0 -1
- package/dist/public/backgrounds/arctic-tundra.avif +0 -0
- package/dist/public/backgrounds/autumn-leaves.avif +0 -0
- package/dist/public/backgrounds/coastal-cliff.avif +0 -0
- package/dist/public/backgrounds/floating-waterfall.avif +0 -0
- package/dist/public/backgrounds/forest-path.avif +0 -0
- package/dist/public/backgrounds/garden-path.avif +0 -0
- package/dist/public/backgrounds/glow-marsh.avif +0 -0
- package/dist/public/backgrounds/golden-wheat.avif +0 -0
- package/dist/public/backgrounds/moon-desert.avif +0 -0
- package/dist/public/backgrounds/night-pond.avif +0 -0
- package/dist/public/backgrounds/prairie-grassland.avif +0 -0
- package/dist/public/backgrounds/river-winding.avif +0 -0
- package/dist/public/backgrounds/salt-flat.avif +0 -0
- package/dist/public/backgrounds/salt-marsh.avif +0 -0
- package/dist/public/backgrounds/sandy-beach.avif +0 -0
- package/dist/public/backgrounds/snow-river.avif +0 -0
- package/dist/public/backgrounds/sunset-pond.avif +0 -0
- package/dist/public/fonts/plus-jakarta-sans-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/public/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2 +0 -0
- package/dist/public/fonts/plus-jakarta-sans-latin-wght-normal.woff2 +0 -0
- package/dist/public/fonts/plus-jakarta-sans-vietnamese-wght-normal.woff2 +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e;(function(e){e.Unimplemented=`UNIMPLEMENTED`,e.Unavailable=`UNAVAILABLE`})(e||={});var t=class extends Error{constructor(e,t,n){super(e),this.message=e,this.code=t,this.data=n}},n=e=>e?.androidBridge?`android`:e?.webkit?.messageHandlers?.bridge?`ios`:`web`,r=r=>{let i=r.CapacitorCustomPlatform||null,a=r.Capacitor||{},o=a.Plugins=a.Plugins||{},s=()=>i===null?n(r):i.name,c=()=>s()!==`web`,l=e=>!!(f.get(e)?.platforms.has(s())||u(e)),u=e=>a.PluginHeaders?.find(t=>t.name===e),d=e=>r.console.error(e),f=new Map;return a.convertFileSrc||=e=>e,a.getPlatform=s,a.handleError=d,a.isNativePlatform=c,a.isPluginAvailable=l,a.registerPlugin=(n,r={})=>{let c=f.get(n);if(c)return console.warn(`Capacitor plugin "${n}" already registered. Cannot register plugins twice.`),c.proxy;let l=s(),d=u(n),p,m=async()=>(!p&&l in r?p=p=typeof r[l]==`function`?await r[l]():r[l]:i!==null&&!p&&`web`in r&&(p=p=typeof r.web==`function`?await r.web():r.web),p),h=(r,i)=>{if(d){let e=d?.methods.find(e=>i===e.name);if(e)return e.rtype===`promise`?e=>a.nativePromise(n,i.toString(),e):(e,t)=>a.nativeCallback(n,i.toString(),e,t);if(r)return r[i]?.bind(r)}else if(r)return r[i]?.bind(r);else throw new t(`"${n}" plugin is not implemented on ${l}`,e.Unimplemented)},g=r=>{let i,a=(...a)=>{let o=m().then(o=>{let s=h(o,r);if(s){let e=s(...a);return i=e?.remove,e}throw new t(`"${n}.${r}()" is not implemented on ${l}`,e.Unimplemented)});return r===`addListener`&&(o.remove=async()=>i()),o};return a.toString=()=>`${r.toString()}() { [capacitor code] }`,Object.defineProperty(a,"name",{value:r,writable:!1,configurable:!1}),a},_=g(`addListener`),v=g(`removeListener`),y=(e,t)=>{let n=_({eventName:e},t),r=async()=>{let r=await n;v({eventName:e,callbackId:r},t)},i=new Promise(e=>n.then(()=>e({remove:r})));return i.remove=async()=>{console.warn(`Using addListener() without 'await' is deprecated.`),await r()},i},b=new Proxy({},{get(e,t){switch(t){case`$$typeof`:return;case`toJSON`:return()=>({});case`addListener`:return d?y:_;case`removeListener`:return v;default:return g(t)}}});return o[n]=b,f.set(n,{name:n,proxy:b,platforms:new Set([...Object.keys(r),...d?[l]:[]])}),b},a.Exception=t,a.DEBUG=!!a.DEBUG,a.isLoggingEnabled=!!a.isLoggingEnabled,a},i=(e=>e.Capacitor=r(e))(typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}),a=i.registerPlugin,o=class{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(e,t){let n=!1;this.listeners[e]||(this.listeners[e]=[],n=!0),this.listeners[e].push(t);let r=this.windowListeners[e];return r&&!r.registered&&this.addWindowListener(r),n&&this.sendRetainedArgumentsForEvent(e),Promise.resolve({remove:async()=>this.removeListener(e,t)})}async removeAllListeners(){this.listeners={};for(let e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,t,n){let r=this.listeners[e];if(!r){if(n){let n=this.retainedEventArguments[e];n||=[],n.push(t),this.retainedEventArguments[e]=n}return}r.forEach(e=>e(t))}hasListeners(e){return!!this.listeners[e]?.length}registerWindowListener(e,t){this.windowListeners[t]={registered:!1,windowEventName:e,pluginEventName:t,handler:e=>{this.notifyListeners(t,e)}}}unimplemented(t=`not implemented`){return new i.Exception(t,e.Unimplemented)}unavailable(t=`not available`){return new i.Exception(t,e.Unavailable)}async removeListener(e,t){let n=this.listeners[e];if(!n)return;let r=n.indexOf(t);r!==-1&&this.listeners[e].splice(r,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}sendRetainedArgumentsForEvent(e){let t=this.retainedEventArguments[e];t&&(delete this.retainedEventArguments[e],t.forEach(t=>{this.notifyListeners(e,t)}))}},s=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),c=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent),l=class extends o{async getCookies(){let e=document.cookie,t={};return e.split(`;`).forEach(e=>{if(e.length<=0)return;let[n,r]=e.replace(/=/,`CAP_COOKIE`).split(`CAP_COOKIE`);n=c(n).trim(),r=c(r).trim(),t[n]=r}),t}async setCookie(e){try{let t=s(e.key),n=s(e.value),r=e.expires?`; expires=${e.expires.replace(`expires=`,``)}`:``,i=(e.path||`/`).replace(`path=`,``),a=e.url!=null&&e.url.length>0?`domain=${e.url}`:``;document.cookie=`${t}=${n||``}${r}; path=${i}; ${a};`}catch(e){return Promise.reject(e)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(e){return Promise.reject(e)}}async clearCookies(){try{let e=document.cookie.split(`;`)||[];for(let t of e)document.cookie=t.replace(/^ +/,``).replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}};a(`CapacitorCookies`,{web:()=>new l});var u=async e=>new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let e=r.result;t(e.indexOf(`,`)>=0?e.split(`,`)[1]:e)},r.onerror=e=>n(e),r.readAsDataURL(e)}),d=(e={})=>{let t=Object.keys(e);return Object.keys(e).map(e=>e.toLocaleLowerCase()).reduce((n,r,i)=>(n[r]=e[t[i]],n),{})},f=(e,t=!0)=>e?Object.entries(e).reduce((e,n)=>{let[r,i]=n,a,o;return Array.isArray(i)?(o=``,i.forEach(e=>{a=t?encodeURIComponent(e):e,o+=`${r}=${a}&`}),o.slice(0,-1)):(a=t?encodeURIComponent(i):i,o=`${r}=${a}`),`${e}&${o}`},``).substr(1):null,p=(e,t={})=>{let n=Object.assign({method:e.method||`GET`,headers:e.headers},t),r=d(e.headers)[`content-type`]||``;if(typeof e.data==`string`)n.body=e.data;else if(r.includes(`application/x-www-form-urlencoded`)){let t=new URLSearchParams;for(let[n,r]of Object.entries(e.data||{}))t.set(n,r);n.body=t.toString()}else if(r.includes(`multipart/form-data`)||e.data instanceof FormData){let t=new FormData;if(e.data instanceof FormData)e.data.forEach((e,n)=>{t.append(n,e)});else for(let n of Object.keys(e.data))t.append(n,e.data[n]);n.body=t;let r=new Headers(n.headers);r.delete(`content-type`),n.headers=r}else(r.includes(`application/json`)||typeof e.data==`object`)&&(n.body=JSON.stringify(e.data));return n},m=class extends o{async request(e){let t=p(e,e.webFetchExtra),n=f(e.params,e.shouldEncodeUrlParams),r=n?`${e.url}?${n}`:e.url,i=await fetch(r,t),a=i.headers.get(`content-type`)||``,{responseType:o=`text`}=i.ok?e:{};a.includes(`application/json`)&&(o=`json`);let s,c;switch(o){case`arraybuffer`:case`blob`:c=await i.blob(),s=await u(c);break;case`json`:s=await i.json();break;default:s=await i.text()}let l={};return i.headers.forEach((e,t)=>{l[t]=e}),{data:s,headers:l,status:i.status,url:i.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:`GET`}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:`POST`}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:`PUT`}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:`PATCH`}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:`DELETE`}))}};a(`CapacitorHttp`,{web:()=>new m});var h;(function(e){e.Dark=`DARK`,e.Light=`LIGHT`,e.Default=`DEFAULT`})(h||={});var g;(function(e){e.StatusBar=`StatusBar`,e.NavigationBar=`NavigationBar`})(g||={});var _=class extends o{async setStyle(){this.unavailable(`not available for web`)}async setAnimation(){this.unavailable(`not available for web`)}async show(){this.unavailable(`not available for web`)}async hide(){this.unavailable(`not available for web`)}};a(`SystemBars`,{web:()=>new _});export{a as n,o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{o as t,t as n}from"./react-vendor-D61Uve5n.js";import{
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{o as t,t as n}from"./react-vendor-D61Uve5n.js";import{c as r}from"./utils-CqsIXqSC.js";import{f as i,h as a}from"./dist-AbkJBHH5.js";var o=e(t(),1),s=n();function c(e){let t=e+`CollectionProvider`,[n,c]=a(t),[l,u]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,r=o.useRef(null),i=o.useRef(new Map).current;return(0,s.jsx)(l,{scope:t,itemMap:i,collectionRef:r,children:n})};d.displayName=t;let f=e+`CollectionSlot`,p=i(f),m=o.forwardRef((e,t)=>{let{scope:n,children:i}=e,a=u(f,n),o=r(t,a.collectionRef);return(0,s.jsx)(p,{ref:o,children:i})});m.displayName=f;let h=e+`CollectionItemSlot`,g=`data-radix-collection-item`,_=i(h),v=o.forwardRef((e,t)=>{let{scope:n,children:i,...a}=e,c=o.useRef(null),l=r(t,c),d=u(h,n);return o.useEffect(()=>(d.itemMap.set(c,{ref:c,...a}),()=>void d.itemMap.delete(c))),(0,s.jsx)(_,{[g]:``,ref:l,children:i})});v.displayName=h;function y(t){let n=u(e+`CollectionConsumer`,t);return o.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:d,Slot:m,ItemSlot:v},y,c]}export{c as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{o as t,t as n}from"./react-vendor-D61Uve5n.js";import{
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{o as t,t as n}from"./react-vendor-D61Uve5n.js";import{c as r}from"./utils-CqsIXqSC.js";import{f as i,g as a,h as o,i as s,m as c,n as l,r as u,s as d,t as f,u as p}from"./dist-AbkJBHH5.js";import{i as m,n as h,r as g,t as _}from"./es2015-eNVkKfFF.js";var v=e(t(),1),y=n(),b=`Dialog`,[x,S]=o(b),[C,w]=x(b),T=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,c=v.useRef(null),l=v.useRef(null),[u,d]=f({prop:r,defaultProp:i??!1,onChange:a,caller:b});return(0,y.jsx)(C,{scope:t,triggerRef:c,contentRef:l,contentId:s(),titleId:s(),descriptionId:s(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:o,children:n})};T.displayName=b;var E=`DialogTrigger`,D=v.forwardRef((e,t)=>{let{__scopeDialog:n,...i}=e,o=w(E,n),s=r(t,o.triggerRef);return(0,y.jsx)(p.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":o.open,"aria-controls":o.contentId,"data-state":K(o.open),...i,ref:s,onClick:a(e.onClick,o.onOpenToggle)})});D.displayName=E;var O=`DialogPortal`,[k,A]=x(O,{forceMount:void 0}),j=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=w(O,t);return(0,y.jsx)(k,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,y.jsx)(l,{present:n||a.open,children:(0,y.jsx)(u,{asChild:!0,container:i,children:e})}))})};j.displayName=O;var M=`DialogOverlay`,N=v.forwardRef((e,t)=>{let n=A(M,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(M,e.__scopeDialog);return a.modal?(0,y.jsx)(l,{present:r||a.open,children:(0,y.jsx)(F,{...i,ref:t})}):null});N.displayName=M;var P=i(`DialogOverlay.RemoveScroll`),F=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(M,n);return(0,y.jsx)(h,{as:P,allowPinchZoom:!0,shards:[i.contentRef],children:(0,y.jsx)(p.div,{"data-state":K(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),I=`DialogContent`,L=v.forwardRef((e,t)=>{let n=A(I,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=w(I,e.__scopeDialog);return(0,y.jsx)(l,{present:r||a.open,children:a.modal?(0,y.jsx)(R,{...i,ref:t}):(0,y.jsx)(ee,{...i,ref:t})})});L.displayName=I;var R=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),i=v.useRef(null),o=r(t,n.contentRef,i);return v.useEffect(()=>{let e=i.current;if(e)return _(e)},[]),(0,y.jsx)(z,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:a(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:a(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:a(e.onFocusOutside,e=>e.preventDefault())})}),ee=v.forwardRef((e,t)=>{let n=w(I,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,y.jsx)(z,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),z=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,...s}=e,c=w(I,n),l=v.useRef(null),u=r(t,l);return g(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(m,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,y.jsx)(d,{role:`dialog`,id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":K(c.open),...s,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(X,{titleId:c.titleId}),(0,y.jsx)(Q,{contentRef:l,descriptionId:c.descriptionId})]})]})}),B=`DialogTitle`,V=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(B,n);return(0,y.jsx)(p.h2,{id:i.titleId,...r,ref:t})});V.displayName=B;var H=`DialogDescription`,U=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(H,n);return(0,y.jsx)(p.p,{id:i.descriptionId,...r,ref:t})});U.displayName=H;var W=`DialogClose`,G=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=w(W,n);return(0,y.jsx)(p.button,{type:`button`,...r,ref:t,onClick:a(e.onClick,()=>i.onOpenChange(!1))})});G.displayName=W;function K(e){return e?`open`:`closed`}var q=`DialogTitleWarning`,[J,Y]=c(q,{contentName:I,titleName:B,docsSlug:`dialog`}),X=({titleId:e})=>{let t=Y(q),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2
2
|
|
|
3
3
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{o as t,t as n}from"./react-vendor-D61Uve5n.js";import{o as r,s as i}from"./utils-mYB1USG6.js";import{d as a,f as o,g as s,h as c,i as l,l as u,n as d,r as f,s as p,u as m}from"./dist-BTu7PDzc.js";import{a as h,i as g,n as _,r as ee,t as v}from"./dist-NcyjV9Gu.js";import{i as te,n as ne,r as re,t as y}from"./es2015-CE7VcoOH.js";import{t as b}from"./dist-f54JuzFV.js";import{t as ie}from"./dist-Dx8OsX8-.js";import{n as ae,r as x,t as S}from"./dist-ButPmyjr.js";var C=e(t(),1),w=n(),T=[`Enter`,` `],E=[`ArrowDown`,`PageUp`,`Home`],oe=[`ArrowUp`,`PageDown`,`End`],se=[...E,...oe],D={ltr:[...T,`ArrowRight`],rtl:[...T,`ArrowLeft`]},ce={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},O=`Menu`,[k,le,A]=b(O),[j,M]=c(O,[A,h,x]),N=h(),ue=x(),[P,F]=j(O),[I,L]=j(O),R=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=N(t),[c,l]=C.useState(null),d=C.useRef(!1),f=u(a),p=ie(i);return C.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,w.jsx)(g,{...s,children:(0,w.jsx)(P,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:l,children:(0,w.jsx)(I,{scope:t,onClose:C.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:o,children:r})})})};R.displayName=O;var de=`MenuAnchor`,z=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=N(n);return(0,w.jsx)(v,{...i,...r,ref:t})});z.displayName=de;var B=`MenuPortal`,[fe,pe]=j(B,{forceMount:void 0}),me=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=F(B,t);return(0,w.jsx)(fe,{scope:t,forceMount:n,children:(0,w.jsx)(d,{present:n||a.open,children:(0,w.jsx)(f,{asChild:!0,container:i,children:r})})})};me.displayName=B;var V=`MenuContent`,[he,H]=j(V),ge=C.forwardRef((e,t)=>{let n=pe(V,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=F(V,e.__scopeMenu),o=L(V,e.__scopeMenu);return(0,w.jsx)(k.Provider,{scope:e.__scopeMenu,children:(0,w.jsx)(d,{present:r||a.open,children:(0,w.jsx)(k.Slot,{scope:e.__scopeMenu,children:o.modal?(0,w.jsx)(_e,{...i,ref:t}):(0,w.jsx)(ve,{...i,ref:t})})})})}),_e=C.forwardRef((e,t)=>{let n=F(V,e.__scopeMenu),r=C.useRef(null),a=i(t,r);return C.useEffect(()=>{let e=r.current;if(e)return y(e)},[]),(0,w.jsx)(U,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:s(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ve=C.forwardRef((e,t)=>{let n=F(V,e.__scopeMenu);return(0,w.jsx)(U,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ye=o(`MenuContent.ScrollLock`),U=C.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:g,disableOutsideScroll:_,...v}=e,y=F(V,n),b=L(V,n),ie=N(n),x=ue(n),S=le(n),[T,E]=C.useState(null),D=C.useRef(null),ce=i(t,D,y.onContentChange),O=C.useRef(0),k=C.useRef(``),A=C.useRef(0),j=C.useRef(null),M=C.useRef(`right`),P=C.useRef(0),I=_?ne:C.Fragment,R=_?{as:ye,allowPinchZoom:!0}:void 0,de=e=>{let t=k.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Je(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){k.current=t,window.clearTimeout(O.current),t!==``&&(O.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};C.useEffect(()=>()=>window.clearTimeout(O.current),[]),re();let z=C.useCallback(e=>M.current===j.current?.side&&Xe(e,j.current?.area),[]);return(0,w.jsx)(he,{scope:n,searchRef:k,onItemEnter:C.useCallback(e=>{z(e)&&e.preventDefault()},[z]),onItemLeave:C.useCallback(e=>{z(e)||(D.current?.focus(),E(null))},[z]),onTriggerLeave:C.useCallback(e=>{z(e)&&e.preventDefault()},[z]),pointerGraceTimerRef:A,onPointerGraceIntentChange:C.useCallback(e=>{j.current=e},[]),children:(0,w.jsx)(I,{...R,children:(0,w.jsx)(te,{asChild:!0,trapped:a,onMountAutoFocus:s(o,e=>{e.preventDefault(),D.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:(0,w.jsx)(p,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:g,children:(0,w.jsx)(ae,{asChild:!0,...x,dir:b.dir,orientation:`vertical`,loop:r,currentTabStopId:T,onCurrentTabStopIdChange:E,onEntryFocus:s(u,e=>{b.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,w.jsx)(ee,{role:`menu`,"aria-orientation":`vertical`,"data-state":Ge(y.open),"data-radix-menu-content":``,dir:b.dir,...ie,...v,ref:ce,style:{outline:`none`,...v.style},onKeyDown:s(v.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&de(e.key));let i=D.current;if(e.target!==i||!se.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);oe.includes(e.key)&&a.reverse(),Ke(a)}),onBlur:s(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(O.current),k.current=``)}),onPointerMove:s(e.onPointerMove,$(e=>{let t=e.target,n=P.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>P.current?`right`:`left`;M.current=t,P.current=e.clientX}}))})})})})})})});ge.displayName=V;var be=`MenuGroup`,W=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,w.jsx)(m.div,{role:`group`,...r,ref:t})});W.displayName=be;var xe=`MenuLabel`,Se=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,w.jsx)(m.div,{...r,ref:t})});Se.displayName=xe;var G=`MenuItem`,Ce=`menu.itemSelect`,K=C.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...o}=e,c=C.useRef(null),l=L(G,e.__scopeMenu),u=H(G,e.__scopeMenu),d=i(t,c),f=C.useRef(!1),p=()=>{let e=c.current;if(!n&&e){let t=new CustomEvent(Ce,{bubbles:!0,cancelable:!0});e.addEventListener(Ce,e=>r?.(e),{once:!0}),a(e,t),t.defaultPrevented?f.current=!1:l.onClose()}};return(0,w.jsx)(we,{...o,ref:d,disabled:n,onClick:s(e.onClick,p),onPointerDown:t=>{e.onPointerDown?.(t),f.current=!0},onPointerUp:s(e.onPointerUp,e=>{f.current||e.currentTarget?.click()}),onKeyDown:s(e.onKeyDown,e=>{let t=u.searchRef.current!==``;n||t&&e.key===` `||T.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});K.displayName=G;var we=C.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,c=H(G,n),l=ue(n),u=C.useRef(null),d=i(t,u),[f,p]=C.useState(!1),[h,g]=C.useState(``);return C.useEffect(()=>{let e=u.current;e&&g((e.textContent??``).trim())},[o.children]),(0,w.jsx)(k.ItemSlot,{scope:n,disabled:r,textValue:a??h,children:(0,w.jsx)(S,{asChild:!0,...l,focusable:!r,children:(0,w.jsx)(m.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...o,ref:d,onPointerMove:s(e.onPointerMove,$(e=>{r?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:s(e.onPointerLeave,$(e=>c.onItemLeave(e))),onFocus:s(e.onFocus,()=>p(!0)),onBlur:s(e.onBlur,()=>p(!1))})})})}),Te=`MenuCheckboxItem`,Ee=C.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,w.jsx)(Ne,{scope:e.__scopeMenu,checked:n,children:(0,w.jsx)(K,{role:`menuitemcheckbox`,"aria-checked":Z(n)?`mixed`:n,...i,ref:t,"data-state":Q(n),onSelect:s(i.onSelect,()=>r?.(Z(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ee.displayName=Te;var De=`MenuRadioGroup`,[Oe,ke]=j(De,{value:void 0,onValueChange:()=>{}}),Ae=C.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=u(r);return(0,w.jsx)(Oe,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,w.jsx)(W,{...i,ref:t})})});Ae.displayName=De;var je=`MenuRadioItem`,Me=C.forwardRef((e,t)=>{let{value:n,...r}=e,i=ke(je,e.__scopeMenu),a=n===i.value;return(0,w.jsx)(Ne,{scope:e.__scopeMenu,checked:a,children:(0,w.jsx)(K,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Q(a),onSelect:s(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Me.displayName=je;var q=`MenuItemIndicator`,[Ne,Pe]=j(q,{checked:!1}),Fe=C.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Pe(q,n);return(0,w.jsx)(d,{present:r||Z(a.checked)||a.checked===!0,children:(0,w.jsx)(m.span,{...i,ref:t,"data-state":Q(a.checked)})})});Fe.displayName=q;var Ie=`MenuSeparator`,Le=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,w.jsx)(m.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Le.displayName=Ie;var Re=`MenuArrow`,ze=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=N(n);return(0,w.jsx)(_,{...i,...r,ref:t})});ze.displayName=Re;var J=`MenuSub`,[Be,Ve]=j(J),He=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=F(J,t),o=N(t),[s,c]=C.useState(null),[d,f]=C.useState(null),p=u(i);return C.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),(0,w.jsx)(g,{...o,children:(0,w.jsx)(P,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:f,children:(0,w.jsx)(Be,{scope:t,contentId:l(),triggerId:l(),trigger:s,onTriggerChange:c,children:n})})})};He.displayName=J;var Y=`MenuSubTrigger`,Ue=C.forwardRef((e,t)=>{let n=F(Y,e.__scopeMenu),i=L(Y,e.__scopeMenu),a=Ve(Y,e.__scopeMenu),o=H(Y,e.__scopeMenu),c=C.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=o,d={__scopeMenu:e.__scopeMenu},f=C.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return C.useEffect(()=>f,[f]),C.useEffect(()=>{let e=l.current;return()=>{window.clearTimeout(e),u(null)}},[l,u]),(0,w.jsx)(z,{asChild:!0,...d,children:(0,w.jsx)(we,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":a.contentId,"data-state":Ge(n.open),...e,ref:r(t,a.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:s(e.onPointerMove,$(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(o.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:s(e.onPointerLeave,$(e=>{f();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,a=i?-5:5,s=t[i?`left`:`right`],c=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:s(e.onKeyDown,t=>{let r=o.searchRef.current!==``;e.disabled||r&&t.key===` `||D[i.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Ue.displayName=Y;var We=`MenuSubContent`,X=C.forwardRef((e,t)=>{let n=pe(V,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=F(V,e.__scopeMenu),c=L(V,e.__scopeMenu),l=Ve(We,e.__scopeMenu),u=C.useRef(null),f=i(t,u);return(0,w.jsx)(k.Provider,{scope:e.__scopeMenu,children:(0,w.jsx)(d,{present:r||o.open,children:(0,w.jsx)(k.Slot,{scope:e.__scopeMenu,children:(0,w.jsx)(U,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:f,align:`start`,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:s(e.onFocusOutside,e=>{e.target!==l.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:s(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:s(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=ce[c.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});X.displayName=We;function Ge(e){return e?`open`:`closed`}function Z(e){return e===`indeterminate`}function Q(e){return Z(e)?`indeterminate`:e?`checked`:`unchecked`}function Ke(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function qe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Je(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=qe(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Ye(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Xe(e,t){return t?Ye({x:e.clientX,y:e.clientY},t):!1}function $(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Ze=R,Qe=z,$e=me,et=ge,tt=W,nt=Se,rt=K,it=Ee,at=Ae,ot=Me,st=Fe,ct=Le,lt=ze,ut=He,dt=Ue,ft=X;export{M as _,tt as a,nt as c,ot as d,Ze as f,dt as g,ft as h,et as i,$e as l,ut as m,lt as n,rt as o,ct as p,it as r,st as s,Qe as t,at as u};
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{o as t,t as n}from"./react-vendor-D61Uve5n.js";import{c as r,s as i}from"./utils-CqsIXqSC.js";import{d as a,f as o,g as s,h as c,i as l,l as u,n as d,r as f,s as p,u as m}from"./dist-AbkJBHH5.js";import{a as h,i as g,n as _,r as ee,t as v}from"./dist-2xH_pFmV.js";import{i as te,n as ne,r as re,t as y}from"./es2015-eNVkKfFF.js";import{t as b}from"./dist-DOz2WXwX.js";import{t as ie}from"./dist-Dx8OsX8-.js";import{n as ae,r as x,t as S}from"./dist-pCVg1Jdl.js";var C=e(t(),1),w=n(),T=[`Enter`,` `],E=[`ArrowDown`,`PageUp`,`Home`],oe=[`ArrowUp`,`PageDown`,`End`],se=[...E,...oe],D={ltr:[...T,`ArrowRight`],rtl:[...T,`ArrowLeft`]},ce={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},O=`Menu`,[k,le,A]=b(O),[j,M]=c(O,[A,h,x]),N=h(),ue=x(),[P,F]=j(O),[I,L]=j(O),R=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=N(t),[c,l]=C.useState(null),d=C.useRef(!1),f=u(a),p=ie(i);return C.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,w.jsx)(g,{...s,children:(0,w.jsx)(P,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:l,children:(0,w.jsx)(I,{scope:t,onClose:C.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:o,children:r})})})};R.displayName=O;var de=`MenuAnchor`,z=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=N(n);return(0,w.jsx)(v,{...i,...r,ref:t})});z.displayName=de;var B=`MenuPortal`,[fe,pe]=j(B,{forceMount:void 0}),me=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=F(B,t);return(0,w.jsx)(fe,{scope:t,forceMount:n,children:(0,w.jsx)(d,{present:n||a.open,children:(0,w.jsx)(f,{asChild:!0,container:i,children:r})})})};me.displayName=B;var V=`MenuContent`,[he,H]=j(V),ge=C.forwardRef((e,t)=>{let n=pe(V,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=F(V,e.__scopeMenu),o=L(V,e.__scopeMenu);return(0,w.jsx)(k.Provider,{scope:e.__scopeMenu,children:(0,w.jsx)(d,{present:r||a.open,children:(0,w.jsx)(k.Slot,{scope:e.__scopeMenu,children:o.modal?(0,w.jsx)(_e,{...i,ref:t}):(0,w.jsx)(ve,{...i,ref:t})})})})}),_e=C.forwardRef((e,t)=>{let n=F(V,e.__scopeMenu),i=C.useRef(null),a=r(t,i);return C.useEffect(()=>{let e=i.current;if(e)return y(e)},[]),(0,w.jsx)(U,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:s(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ve=C.forwardRef((e,t)=>{let n=F(V,e.__scopeMenu);return(0,w.jsx)(U,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ye=o(`MenuContent.ScrollLock`),U=C.forwardRef((e,t)=>{let{__scopeMenu:n,loop:i=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:c,disableOutsidePointerEvents:l,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:g,disableOutsideScroll:_,...v}=e,y=F(V,n),b=L(V,n),ie=N(n),x=ue(n),S=le(n),[T,E]=C.useState(null),D=C.useRef(null),ce=r(t,D,y.onContentChange),O=C.useRef(0),k=C.useRef(``),A=C.useRef(0),j=C.useRef(null),M=C.useRef(`right`),P=C.useRef(0),I=_?ne:C.Fragment,R=_?{as:ye,allowPinchZoom:!0}:void 0,de=e=>{let t=k.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Je(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){k.current=t,window.clearTimeout(O.current),t!==``&&(O.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};C.useEffect(()=>()=>window.clearTimeout(O.current),[]),re();let z=C.useCallback(e=>M.current===j.current?.side&&Xe(e,j.current?.area),[]);return(0,w.jsx)(he,{scope:n,searchRef:k,onItemEnter:C.useCallback(e=>{z(e)&&e.preventDefault()},[z]),onItemLeave:C.useCallback(e=>{z(e)||(D.current?.focus(),E(null))},[z]),onTriggerLeave:C.useCallback(e=>{z(e)&&e.preventDefault()},[z]),pointerGraceTimerRef:A,onPointerGraceIntentChange:C.useCallback(e=>{j.current=e},[]),children:(0,w.jsx)(I,{...R,children:(0,w.jsx)(te,{asChild:!0,trapped:a,onMountAutoFocus:s(o,e=>{e.preventDefault(),D.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:(0,w.jsx)(p,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:g,children:(0,w.jsx)(ae,{asChild:!0,...x,dir:b.dir,orientation:`vertical`,loop:i,currentTabStopId:T,onCurrentTabStopIdChange:E,onEntryFocus:s(u,e=>{b.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,w.jsx)(ee,{role:`menu`,"aria-orientation":`vertical`,"data-state":Ge(y.open),"data-radix-menu-content":``,dir:b.dir,...ie,...v,ref:ce,style:{outline:`none`,...v.style},onKeyDown:s(v.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&de(e.key));let i=D.current;if(e.target!==i||!se.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);oe.includes(e.key)&&a.reverse(),Ke(a)}),onBlur:s(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(O.current),k.current=``)}),onPointerMove:s(e.onPointerMove,$(e=>{let t=e.target,n=P.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>P.current?`right`:`left`;M.current=t,P.current=e.clientX}}))})})})})})})});ge.displayName=V;var be=`MenuGroup`,W=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,w.jsx)(m.div,{role:`group`,...r,ref:t})});W.displayName=be;var xe=`MenuLabel`,Se=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,w.jsx)(m.div,{...r,ref:t})});Se.displayName=xe;var G=`MenuItem`,Ce=`menu.itemSelect`,K=C.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:i,...o}=e,c=C.useRef(null),l=L(G,e.__scopeMenu),u=H(G,e.__scopeMenu),d=r(t,c),f=C.useRef(!1),p=()=>{let e=c.current;if(!n&&e){let t=new CustomEvent(Ce,{bubbles:!0,cancelable:!0});e.addEventListener(Ce,e=>i?.(e),{once:!0}),a(e,t),t.defaultPrevented?f.current=!1:l.onClose()}};return(0,w.jsx)(we,{...o,ref:d,disabled:n,onClick:s(e.onClick,p),onPointerDown:t=>{e.onPointerDown?.(t),f.current=!0},onPointerUp:s(e.onPointerUp,e=>{f.current||e.currentTarget?.click()}),onKeyDown:s(e.onKeyDown,e=>{let t=u.searchRef.current!==``;n||t&&e.key===` `||T.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});K.displayName=G;var we=C.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:i=!1,textValue:a,...o}=e,c=H(G,n),l=ue(n),u=C.useRef(null),d=r(t,u),[f,p]=C.useState(!1),[h,g]=C.useState(``);return C.useEffect(()=>{let e=u.current;e&&g((e.textContent??``).trim())},[o.children]),(0,w.jsx)(k.ItemSlot,{scope:n,disabled:i,textValue:a??h,children:(0,w.jsx)(S,{asChild:!0,...l,focusable:!i,children:(0,w.jsx)(m.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,...o,ref:d,onPointerMove:s(e.onPointerMove,$(e=>{i?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:s(e.onPointerLeave,$(e=>c.onItemLeave(e))),onFocus:s(e.onFocus,()=>p(!0)),onBlur:s(e.onBlur,()=>p(!1))})})})}),Te=`MenuCheckboxItem`,Ee=C.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,w.jsx)(Ne,{scope:e.__scopeMenu,checked:n,children:(0,w.jsx)(K,{role:`menuitemcheckbox`,"aria-checked":Z(n)?`mixed`:n,...i,ref:t,"data-state":Q(n),onSelect:s(i.onSelect,()=>r?.(Z(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ee.displayName=Te;var De=`MenuRadioGroup`,[Oe,ke]=j(De,{value:void 0,onValueChange:()=>{}}),Ae=C.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=u(r);return(0,w.jsx)(Oe,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,w.jsx)(W,{...i,ref:t})})});Ae.displayName=De;var je=`MenuRadioItem`,Me=C.forwardRef((e,t)=>{let{value:n,...r}=e,i=ke(je,e.__scopeMenu),a=n===i.value;return(0,w.jsx)(Ne,{scope:e.__scopeMenu,checked:a,children:(0,w.jsx)(K,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":Q(a),onSelect:s(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Me.displayName=je;var q=`MenuItemIndicator`,[Ne,Pe]=j(q,{checked:!1}),Fe=C.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Pe(q,n);return(0,w.jsx)(d,{present:r||Z(a.checked)||a.checked===!0,children:(0,w.jsx)(m.span,{...i,ref:t,"data-state":Q(a.checked)})})});Fe.displayName=q;var Ie=`MenuSeparator`,Le=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,w.jsx)(m.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Le.displayName=Ie;var Re=`MenuArrow`,ze=C.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=N(n);return(0,w.jsx)(_,{...i,...r,ref:t})});ze.displayName=Re;var J=`MenuSub`,[Be,Ve]=j(J),He=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=F(J,t),o=N(t),[s,c]=C.useState(null),[d,f]=C.useState(null),p=u(i);return C.useEffect(()=>(a.open===!1&&p(!1),()=>p(!1)),[a.open,p]),(0,w.jsx)(g,{...o,children:(0,w.jsx)(P,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:f,children:(0,w.jsx)(Be,{scope:t,contentId:l(),triggerId:l(),trigger:s,onTriggerChange:c,children:n})})})};He.displayName=J;var Y=`MenuSubTrigger`,Ue=C.forwardRef((e,t)=>{let n=F(Y,e.__scopeMenu),r=L(Y,e.__scopeMenu),a=Ve(Y,e.__scopeMenu),o=H(Y,e.__scopeMenu),c=C.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=o,d={__scopeMenu:e.__scopeMenu},f=C.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return C.useEffect(()=>f,[f]),C.useEffect(()=>{let e=l.current;return()=>{window.clearTimeout(e),u(null)}},[l,u]),(0,w.jsx)(z,{asChild:!0,...d,children:(0,w.jsx)(we,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":a.contentId,"data-state":Ge(n.open),...e,ref:i(t,a.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:s(e.onPointerMove,$(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(o.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:s(e.onPointerLeave,$(e=>{f();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,a=i?-5:5,s=t[i?`left`:`right`],c=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:s(e.onKeyDown,t=>{let i=o.searchRef.current!==``;e.disabled||i&&t.key===` `||D[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Ue.displayName=Y;var We=`MenuSubContent`,X=C.forwardRef((e,t)=>{let n=pe(V,e.__scopeMenu),{forceMount:i=n.forceMount,...a}=e,o=F(V,e.__scopeMenu),c=L(V,e.__scopeMenu),l=Ve(We,e.__scopeMenu),u=C.useRef(null),f=r(t,u);return(0,w.jsx)(k.Provider,{scope:e.__scopeMenu,children:(0,w.jsx)(d,{present:i||o.open,children:(0,w.jsx)(k.Slot,{scope:e.__scopeMenu,children:(0,w.jsx)(U,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:f,align:`start`,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&u.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:s(e.onFocusOutside,e=>{e.target!==l.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:s(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:s(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=ce[c.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())})})})})})});X.displayName=We;function Ge(e){return e?`open`:`closed`}function Z(e){return e===`indeterminate`}function Q(e){return Z(e)?`indeterminate`:e?`checked`:`unchecked`}function Ke(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function qe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Je(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=qe(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Ye(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Xe(e,t){return t?Ye({x:e.clientX,y:e.clientY},t):!1}function $(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Ze=R,Qe=z,$e=me,et=ge,tt=W,nt=Se,rt=K,it=Ee,at=Ae,ot=Me,st=Fe,ct=Le,lt=ze,ut=He,dt=Ue,ft=X;export{M as _,tt as a,nt as c,ot as d,Ze as f,dt as g,ft as h,et as i,$e as l,ut as m,lt as n,rt as o,ct as p,it as r,st as s,Qe as t,at as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{o as t,t as n}from"./react-vendor-D61Uve5n.js";import{
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{o as t,t as n}from"./react-vendor-D61Uve5n.js";import{c as r}from"./utils-CqsIXqSC.js";import{g as i,h as a,i as o,l as s,t as c,u as l}from"./dist-AbkJBHH5.js";import{t as u}from"./dist-DOz2WXwX.js";import{t as d}from"./dist-Dx8OsX8-.js";var f=e(t(),1),p=n(),m=`rovingFocusGroup.onEntryFocus`,h={bubbles:!1,cancelable:!0},g=`RovingFocusGroup`,[_,v,y]=u(g),[b,x]=a(g,[y]),[S,C]=b(g),w=f.forwardRef((e,t)=>(0,p.jsx)(_.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(_.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,p.jsx)(T,{...e,ref:t})})}));w.displayName=g;var T=f.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:a,loop:o=!1,dir:u,currentTabStopId:_,defaultCurrentTabStopId:y,onCurrentTabStopIdChange:b,onEntryFocus:x,preventScrollOnEntryFocus:C=!1,...w}=e,T=f.useRef(null),E=r(t,T),D=d(u),[O,k]=c({prop:_,defaultProp:y??null,onChange:b,caller:g}),[A,M]=f.useState(!1),N=s(x),P=v(n),F=f.useRef(!1),[I,L]=f.useState(0);return f.useEffect(()=>{let e=T.current;if(e)return e.addEventListener(m,N),()=>e.removeEventListener(m,N)},[N]),(0,p.jsx)(S,{scope:n,orientation:a,dir:D,loop:o,currentTabStopId:O,onItemFocus:f.useCallback(e=>k(e),[k]),onItemShiftTab:f.useCallback(()=>M(!0),[]),onFocusableItemAdd:f.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:f.useCallback(()=>L(e=>e-1),[]),children:(0,p.jsx)(l.div,{tabIndex:A||I===0?-1:0,"data-orientation":a,...w,ref:E,style:{outline:`none`,...e.style},onMouseDown:i(e.onMouseDown,()=>{F.current=!0}),onFocus:i(e.onFocus,e=>{let t=!F.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(m,h);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=P().filter(e=>e.focusable);j([e.find(e=>e.active),e.find(e=>e.id===O),...e].filter(Boolean).map(e=>e.ref.current),C)}}F.current=!1}),onBlur:i(e.onBlur,()=>M(!1))})})}),E=`RovingFocusGroupItem`,D=f.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:s,children:c,...u}=e,d=o(),m=s||d,h=C(E,n),g=h.currentTabStopId===m,y=v(n),{onFocusableItemAdd:b,onFocusableItemRemove:x,currentTabStopId:S}=h;return f.useEffect(()=>{if(r)return b(),()=>x()},[r,b,x]),(0,p.jsx)(_.ItemSlot,{scope:n,id:m,focusable:r,active:a,children:(0,p.jsx)(l.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...u,ref:t,onMouseDown:i(e.onMouseDown,e=>{r?h.onItemFocus(m):e.preventDefault()}),onFocus:i(e.onFocus,()=>h.onItemFocus(m)),onKeyDown:i(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){h.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=A(e,h.orientation,h.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=y().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=h.loop?M(n,r+1):n.slice(r+1)}setTimeout(()=>j(n))}}),children:typeof c==`function`?c({isCurrentTabStop:g,hasTabStop:S!=null}):c})})});D.displayName=E;var O={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function k(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function A(e,t,n){let r=k(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return O[r]}function j(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function M(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var N=w,P=D;export{N as n,x as r,P as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-Dd_uD5pT.js";var t={"VS Code":{name:`VS Code`,appName:[`Visual Studio Code`,`code`]},Cursor:{name:`Cursor`,appName:[`Cursor`,`cursor`]},Windsurf:{name:`Windsurf`,appName:[`Windsurf`,`windsurf`]},Xcode:{name:`Xcode`,appName:`Xcode`},"Android Studio":{name:`Android Studio`,appName:[`Android Studio`,`studio`]},Kiro:{name:`Kiro`,appName:[`Kiro`,`kiro`]},Terminal:{name:`Terminal`,appName:`Terminal`},"Devin Desktop":{name:`Devin Desktop`,appName:[`Devin`,`Devin Desktop`]},Antigravity:{name:`Antigravity`,appName:[`com.google.antigravity-ide`,`Antigravity IDE`]}};Object.keys(t),Object.entries(t).reduce((e,[t,n])=>(e[t]=n.appName,e),{});var n=new Set([`minimal`,`low`,`medium`,`high`,`xhigh`,`max`]);function r(e){return n.has(e)}function i(e){return e===`off`||r(e)}function a(e){return e?e.reasoningEffort===void 0?e.reasoning===void 0?{reasoningEffort:`off`}:{reasoningEffort:e.reasoning?`medium`:`off`}:{reasoningEffort:e.reasoningEffort}:{reasoningEffort:`off`}}function o(e){return e===`off`?`Off`:e===`xhigh`?`Extra high`:e===`max`?`Max`:e.charAt(0).toUpperCase()+e.slice(1)}function s(e,t){return e===`off`||t.length===0?`off`:t.includes(e)?e:t.includes(`medium`)?`medium`:t[0]??`off`}function c(e){return e?e.reasoningEffort!==void 0||e.reasoning!==void 0:!1}function l(e){return e.length===0?`off`:e.includes(`medium`)?`medium`:e[0]??`off`}function u(e,t){return!c(e)&&t.length>0?l(t):s(a(e).reasoningEffort??`off`,t)}var d=[`default`,`fast`,`local`,`cheap`,`smart`],f={default:`Default`,fast:`Fast`,local:`Local`,cheap:`Cheap`,smart:`Smart`},p={default:`Default model for new chats`,fast:`Quick responses for lightweight tasks`,local:`On-device or local inference`,cheap:`Lower-cost models for routine work`,smart:`Most capable models for complex tasks`},m=new Set(d);function ee(e){return m.has(e)}function h(e){return`${e.provider}::${e.model}`}function g(e){let t=e.indexOf(`::`);if(t<=0||t>=e.length-2)return null;let n=e.slice(0,t).trim(),r=e.slice(t+2).trim();return!n||!r?null:{provider:n,model:r}}function _(e){let t={};for(let n of d){let r=e?.[n];if(!r)continue;let i={provider:r.provider,model:r.model};r.reasoningEffort!==void 0&&(i.reasoningEffort=r.reasoningEffort),t[n]=i}return JSON.stringify(t)}function v(e,t){return _(e)===_(t)}function y(e,t){return ee(e)?t?.[e]??null:null}function b(e){return!e?.model?.trim()||!e.provider?.trim()?null:e}function te(e){return b(y(`default`,e))!==null}function ne(e){return b(y(`cheap`,e))!==null}function x(e){return b(y(`fast`,e))??b(y(`cheap`,e))}function re(e){return x(e)!==null}function ie(e){return y(`smart`,e)}function ae(e,t){let n=e.toLowerCase();return t[n]?t[n]:Object.entries(t).find(([e])=>e.toLowerCase()===n)?.[1]??[]}function oe(e,t){return ae(e.provider,t).includes(e.model)}function se(e,t){for(let n of d){let r=e[n];if(r&&!oe(r,t))throw Error(`Model alias '${n}' must reference an enabled model. '${r.provider}/${r.model}' is not enabled.`)}}var ce=[`build`,`plan`,`image`,`orchestrate`],le={build:`Agent`,plan:`Plan Agent`,image:`Image Agent`,orchestrate:`Orchestrator Agent`};function ue(e){return e.orchestrateMode?`orchestrate`:e.planMode?`plan`:e.imageMode?`image`:`build`}function de(e){return e?le[e]:le.build}var S=[`auto`,...ce],fe=`auto`,pe=new Set(S);function me(e){return typeof e==`string`&&pe.has(e)}function he(e){return e.autoMode?`auto`:ue(e)}function ge(e){return{autoMode:e===`auto`,planMode:e===`plan`,imageMode:e===`image`,ralphMode:!1,orchestrateMode:e===`orchestrate`}}var _e=[`cheap`,`smart`,`default`],ve=`Picking a model`,ye={cheap:`Cheap`,smart:`Smart`,default:`Default`};new Set(_e),RegExp(`\\b(${_e.join(`|`)})\\b`);var C;(function(e){e.PullRequest=`pull-request`,e.Direct=`direct`})(C||={}),C.PullRequest,C.PullRequest,C.Direct,C.Direct;var be=`obs_`,xe=2e3;RegExp(`${be}[a-f0-9]{64}`,`i`);function Se(e){return RegExp(`^${be}[a-f0-9]{64}$`).test(e)}function Ce(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.id==`string`&&Se(t.id)&&typeof t.byteLength==`number`&&typeof t.lineCount==`number`&&typeof t.previewByteLength==`number`}function we(e){return e!==void 0&&e<.05}var Te=`Compacting`,Ee=`Context compacted`,De={pageTitle:`text-3xl font-bold`,pageSubtitle:`text-base text-muted-foreground`,sectionTitle:`text-xl font-semibold`,subSectionTitle:`text-lg font-semibold`,sectionSubtitle:`text-base font-medium`,emptyStateTitle:`text-base font-semibold text-muted-foreground`,body:`text-base`,bodyMuted:`text-base text-muted-foreground`,conversationBody:`text-sm`,caption:`text-sm text-muted-foreground`,compact:`text-xs`,captionForeground:`text-sm`,dropdownGroupHeading:`text-xs font-semibold text-muted-foreground`,mono:`font-mono text-base`,error:`text-base text-destructive`,dialogTitle:`text-xl font-semibold leading-none tracking-tight`,dialogDescription:`text-base text-muted-foreground`,label:`text-base font-medium leading-none`,labelNormal:`text-base font-normal leading-none`,labelMuted:`text-base font-normal leading-none text-muted-foreground`,stat:`text-2xl font-bold`,infoBanner:`text-base text-muted-foreground bg-muted rounded-md px-3 py-2 mb-4`,hintBanner:`text-sm text-muted-foreground bg-muted rounded-md px-3 py-2 mb-4`},Oe={settingsPage:`@container/settings-page w-full px-6 pb-6`,accountPage:`max-w-2xl mx-auto px-6 pb-6 pt-6`,formPage:`max-w-2xl mx-auto px-6 pb-6 pt-6`,tableWrapper:`overflow-hidden rounded-md border border-table-border`,settingsFieldRow:`flex w-full flex-col gap-2 @md/settings-page:flex-row @md/settings-page:items-center @md/settings-page:gap-4`,settingsFieldLabel:`flex min-w-0 flex-col justify-center @md/settings-page:min-h-10 @md/settings-page:w-44 @md/settings-page:shrink-0 @min-[52rem]/settings-page:w-52`,settingsFieldControl:`flex min-w-0 w-full flex-1 flex-col items-stretch`,settingsFieldStack:`flex w-full flex-col gap-4`},ke=[{name:`agent`,enabled:!0,displayName:`Subagent`,activeDisplayName:`Subagent`},{name:`ask_user`,enabled:!0,displayName:`Ask`,activeDisplayName:`Asking`},{name:`propose_branch`,enabled:!0,displayName:`Propose Branch`,activeDisplayName:`Proposing Branch`},{name:`bash`,enabled:!0,displayName:`Run`,activeDisplayName:`Running`},{name:`browser`,enabled:!0,displayName:`Browser`,activeDisplayName:`Browsing`},{name:`chat_title`,enabled:!0,displayName:`Chat Title`,activeDisplayName:`Titling Chat`},{name:`create_project`,enabled:!0,displayName:`Create Project`,activeDisplayName:`Creating Project`},{name:`connect_mcp`,enabled:!0,displayName:`Connect MCP`,activeDisplayName:`Connecting MCP`},{name:`edit`,enabled:!0,displayName:`Edit`,activeDisplayName:`Editing`},{name:`email_me`,enabled:!0,displayName:`Email Me`,activeDisplayName:`Sending Email`},{name:`execute_skill_script`,enabled:!0,displayName:`Run Skill Script`,activeDisplayName:`Running Script`},{name:`fetch`,enabled:!0,displayName:`Fetch`,activeDisplayName:`Fetching`},{name:`find`,enabled:!0,displayName:`Find`,activeDisplayName:`Finding`},{name:`find_images`,enabled:!0,displayName:`Find Images`,activeDisplayName:`Finding Images`},{name:`generate_image`,enabled:!0,displayName:`Make Image`,activeDisplayName:`Making Image`},{name:`get_observation`,enabled:!0,displayName:`Observe`,activeDisplayName:`Observing`},{name:`grep`,enabled:!0,displayName:`Search`,activeDisplayName:`Searching`},{name:`history`,enabled:!0,displayName:`History`,activeDisplayName:`Searching History`},{name:`job_kill`,enabled:!0,displayName:`Kill Job`,activeDisplayName:`Killing Job`},{name:`job_list`,enabled:!0,displayName:`Jobs`,activeDisplayName:`Listing Jobs`},{name:`job_output`,enabled:!0,displayName:`Job Output`,activeDisplayName:`Reading Job Output`},{name:`ls`,enabled:!1,displayName:`List`,activeDisplayName:`Listing`},{name:`mcp`,enabled:!0,displayName:`MCP Tool`,activeDisplayName:`Tool`},{name:`notes`,enabled:!0,displayName:`Notes`,activeDisplayName:`Updating Notes`},{name:`projects`,enabled:!0,defaultEnabled:!1,displayName:`Projects`,activeDisplayName:`Getting Projects`},{name:`prompt_project`,enabled:!0,defaultEnabled:!1,displayName:`Prompt`,activeDisplayName:`Prompting`},{name:`read`,enabled:!0,displayName:`Read`,activeDisplayName:`Reading`},{name:`read_skill`,enabled:!0,displayName:`Read Skill`,activeDisplayName:`Reading Skill`},{name:`read_skill_reference`,enabled:!0,displayName:`Read Reference`,activeDisplayName:`Reading Reference`},{name:`run_js`,enabled:!0,displayName:`Run JS`,activeDisplayName:`Running JS`},{name:`todo`,enabled:!0,defaultEnabled:!1,displayName:`Todo`,activeDisplayName:`Updating`},{name:`tasks`,enabled:!0,displayName:`Tasks`,activeDisplayName:`Managing Tasks`},{name:`tool_search`,enabled:!0,displayName:`Find Tools`,activeDisplayName:`Finding Tools`},{name:`web_search`,enabled:!0,displayName:`Web Search`,activeDisplayName:`Searching Web`},{name:`write`,enabled:!0,displayName:`Write`,activeDisplayName:`Writing`}],w=new Map(ke.map(e=>[e.name,e]));function Ae(e){return e.charAt(0).toUpperCase()+e.slice(1)}var je=new Map([[`run_web_worker`,`run_js`],[`file_read`,`read`],[`ast_grep`,`grep`]]);function Me(e){if(e.includes(`bash`)||e.includes(`terminal`)||e.includes(`shell`))return w.get(`bash`);if(e.includes(`web_fetch`))return w.get(`fetch`);if(e.includes(`read`))return w.get(`read`)}function Ne(e){let t=e.toLowerCase(),n=w.get(t);if(n)return n;let r=je.get(t);return r?w.get(r):void 0}function Pe(e){return Ne(e)??Me(e.toLowerCase())}function Fe(e){return Pe(e)?.displayName??Ae(e)}function Ie(e){return Ne(e)?.displayName??e}function Le(e){let t=Pe(e);return t?t.activeDisplayName:Fe(e)}function T(e,t,n){return`${e} ${e===1?t:n}`}function Re(e,t){let n=e.toLowerCase();return n===`agent`||n.includes(`subagent`)?!0:!!(t&&typeof t==`object`&&`description`in t&&(`prompt`in t||`agentName`in t))}function ze(e){return`${T(e,`subagent`,`subagents`)} working`}function E(e,t,n){return{formatPhrase:r=>e===null?T(r,t,n):`${e} ${T(r,t,n)}`,formatNeutral:e=>T(e,t,n)}}var Be={id:`other`,toolNames:[],...E(null,`tool call`,`tool calls`)},D=[{id:`compaction`,toolNames:[],formatPhrase:()=>`compacted context`,formatNeutral:e=>T(e,`compaction`,`compactions`)},{id:`files`,toolNames:[`edit`,`write`],...E(`edited`,`file`,`files`)},{id:`commands`,toolNames:[`bash`,`execute_skill_script`,`run_js`],...E(`ran`,`command`,`commands`)},{id:`reads`,toolNames:[`read`,`get_observation`],...E(`read`,`file`,`files`)},{id:`notes`,toolNames:[`notes`],formatPhrase:e=>`${T(e,`note`,`notes`)} captured`,formatNeutral:e=>T(e,`note`,`notes`)},{id:`history`,toolNames:[`history`],formatPhrase:e=>`${T(e,`note`,`notes`)} recalled`,formatNeutral:e=>T(e,`note`,`notes`)},{id:`searches`,toolNames:[`grep`,`find`],...E(null,`search`,`searches`)},{id:`webSearches`,toolNames:[`web_search`],...E(null,`web search`,`web searches`)},{id:`pages`,toolNames:[`fetch`],...E(`fetched`,`page`,`pages`)},{id:`browserActions`,toolNames:[`browser`],...E(null,`browser action`,`browser actions`)},{id:`images`,toolNames:[`generate_image`],...E(`generated`,`image`,`images`)},{id:`subagents`,toolNames:[`agent`],...E(null,`subagent`,`subagents`)},{id:`projects`,toolNames:[`projects`],formatPhrase:()=>`got projects`,formatNeutral:e=>T(e,`project list`,`project lists`)},{id:`prompts`,toolNames:[`prompt_project`],formatPhrase:e=>`${T(e,`prompt`,`prompts`)} sent`,formatNeutral:e=>T(e,`prompt`,`prompts`)},{id:`chatTitle`,toolNames:[`chat_title`],formatPhrase:e=>`${T(e,`chat title`,`chat titles`)} set`,formatNeutral:e=>T(e,`chat title`,`chat titles`)},Be],Ve={file_read:`read`,run_web_worker:`run_js`,ast_grep:`grep`,get_projects:`projects`},O=new Map(D.flatMap(e=>e.toolNames.map(t=>[t,e])));function He(e){let t=e.toLowerCase(),n=Ve[t]??t;return O.get(n)??Be}function k(e){return D.find(t=>t.id===e)??Be}var Ue=new Set([`tool_search`]),We=ke.filter(e=>e.enabled&&!Ue.has(e.name)).map(e=>e.name),Ge=new Set(We);function Ke(e){if(!Array.isArray(e))return[];let t=new Set,n=[];for(let r of e){if(typeof r!=`string`)continue;let e=r.trim().toLowerCase();e&&Ge.has(e)&&!t.has(e)&&(t.add(e),n.push(e))}return n.sort()}function qe(){return We.map(e=>({name:e,displayName:Ie(e)})).sort((e,t)=>e.displayName.localeCompare(t.displayName))}var Je=new Set([`tool_search`]),A=ke.filter(e=>e.enabled&&!Je.has(e.name)).map(e=>e.name),Ye=`standard`,Xe=`Jelly`,Ze=[`ask_user`,`projects`,`prompt_project`,`read_skill`,`web_search`,`execute_skill_script`],Qe=[`projects`,`prompt_project`];function $e(e){return e===`bot`?`bot`:Ye}function et(e){return $e(e.type)===`bot`}function tt(e){return $e(e.type)===Ye}function nt(e){return e.builtIn===!0}function j(){let e=new Set(Ze);return A.filter(t=>!e.has(t)).sort()}function M(e){return et(e)?j():Ke([...e.disabledTools??[],...Qe])}var rt={"image/png":{mime:`image/png`,dataUrlPrefix:`data:image/png;base64,`},"image/webp":{mime:`image/webp`,dataUrlPrefix:`data:image/webp;base64,`}};function it(e){return e===`image/png`||e===`image/webp`?rt[e]:null}function N(e){return at(e,[137,80,78,71,13,10,26,10])?`image/png`:at(e,[82,73,70,70])&&at(e.subarray(8),[87,69,66,80])?`image/webp`:null}function at(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n+=1)if(e[n]!==t[n])return!1;return!0}new TextEncoder,new TextDecoder;var ot=[`run_js`,`ask_user`,`agent`,`tool_search`,`browser`];new Set(ot);var st={defaultMaxChars:16e3,stepMaxChars:4e3,minMaxChars:512,maxMaxChars:64e3,defaultLimit:40,maxDepth:50,maxCaptureBytes:67108864,maxStepIdChars:256},P=Object.freeze({maxSteps:100,maxCalls:500,maxConcurrency:8,defaultMaxChars:16e3,maxOutputChars:64e3,minOutputChars:128,minSmartOutputChars:st.minMaxChars,maxStepIdChars:st.maxStepIdChars,maxNesting:50,maxErrorChars:500,blockedTools:ot}),ct=[`steps`,`return`,`maxChars`],lt=[`id`,`tool`,`args`,`foreach`,`dependsOn`,`select`,`limit`,`maxChars`,`query`,`dedupe`];function ut(e){let t=new Set;function n(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function r(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&Number.isFinite(e)}function i(e){if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function a(e,t){if(Array.isArray(e)&&t.length!==e.length+1)throw Error(`Plan arrays must be dense without extra properties`)}function o(e,t){return typeof e==`string`&&t.enumerable===!0&&Object.prototype.hasOwnProperty.call(t,`value`)}function s(e){return e===`__proto__`||e===`prototype`||e===`constructor`}function c(e,t){return/^(0|[1-9]\d*)$/.test(e)&&Number(e)<t.length}function l(e,t,n,r){if(n&&t===`length`)return;let i=Object.getOwnPropertyDescriptor(e,t);if(!o(t,i))throw Error(`Plan must contain enumerable JSON data properties`);if(s(t))throw Error(`Unsafe plan property`);if(n&&!c(t,e))throw Error(`Plan arrays cannot have extra properties`);u(i.value,r+1)}function u(e,n){if(n>P.maxNesting)throw Error(`Plan nesting limit exceeded`);if(r(e))return;if(typeof e!=`object`||!e)throw Error(`Plan must contain only JSON data`);if(!i(e))throw Error(`Plan must contain plain JSON objects`);if(t.has(e))throw Error(`Cyclic plan`);t.add(e);let o=Reflect.ownKeys(e);a(e,o);let s=Array.isArray(e);for(let t of o)l(e,t,s,n);t.delete(e)}function d(e){if(!n(e)||!Array.isArray(e.steps)||!e.steps.length||e.steps.length>P.maxSteps)throw Error(`Plan must have a nonempty steps array within the step limit`);for(let t of Object.keys(e))if(!ct.includes(t))throw Error(`Unknown plan field: ${t}`);return{steps:e.steps,maxChars:e.maxChars}}function f(e){if(e!==void 0&&(typeof e!=`number`||!Number.isInteger(e)||e<P.minOutputChars||e>P.maxOutputChars))throw Error(`Invalid plan maxChars`)}function p(e){if(!n(e)||typeof e.id!=`string`||!e.id||typeof e.tool!=`string`||!e.tool.trim())throw Error(`Plan steps require id and tool`);return e}function m(e){for(let t of Object.keys(e))if(!lt.includes(t))throw Error(`Unknown step field: ${t}`)}function ee(e){if(e.args!==void 0&&!n(e.args))throw Error(`Step args must be an object`)}function h(e){return typeof e!=`string`}function g(e){if(e.dependsOn!==void 0&&(!Array.isArray(e.dependsOn)||e.dependsOn.some(h)))throw Error(`Step dependsOn must be an array of ids`)}function _(e){if(!Object.prototype.hasOwnProperty.call(e,`foreach`))return;let t=e.foreach;if(!Array.isArray(t)&&(typeof t!=`string`||!t.startsWith(`$`)||t.startsWith(`$$`)))throw Error(`Step foreach must be an array or reference`)}function v(e){for(let t of e){let e=p(t);m(e),ee(e),g(e),_(e)}}u(e,0);let y=d(e);return f(y.maxChars),v(y.steps),`return await runPlan(${JSON.stringify(e)});`}function dt(e){if(typeof e!=`object`||!e||Array.isArray(e))return null;let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return null;let n=Object.getOwnPropertyDescriptor(e,`code`),r=Object.getOwnPropertyDescriptor(e,`plan`);if(!!n==!!r||r&&Object.getOwnPropertyDescriptor(e,`patches`))return null;if(n)return typeof n.value==`string`&&n.value.trim()?n.value:null;try{return ut(r.value)}catch{return null}}P.defaultMaxChars;var ft=String.raw`(?:(['"])\\n\1|\`\\n\`|\/(?:\\r\?\\n|\\n)\/[dgimsuy]*)`;new RegExp(String.raw`(?:const|let|var)\s+lines\s*=\s*[^\n;]*?\.split\s*\(\s*${ft}\s*\)`),new RegExp(String.raw`\blines\s*\.slice\s*\(\s*(?<start>\d+)\s*(?:,\s*(?<end>\d+)\s*)?\)`,`g`),new RegExp(String.raw`\.split\s*\(\s*${ft}\s*\)\s*\.slice\s*\(\s*(?<start>\d+)\s*(?:,\s*(?<end>\d+)\s*)?\)`,`g`);function pt(e,t){return typeof e==`string`?{stack:e}:t?{stack:t}:{}}function mt(e,t){return typeof e==`string`?e:t}function ht(e){let t=e.toJSON;if(typeof t!=`function`)return null;let n=t.call(e);return typeof n==`object`&&n&&!Array.isArray(n)?n:null}function gt(e,t){return{...t,name:mt(t.name,e.name),message:mt(t.message,e.message),...pt(t.stack,e.stack)}}function F(e){return{name:e.name,message:e.message,...pt(void 0,e.stack)}}function I(e){let t=ht(e);return t?gt(e,t):F(e)}function _t(){let e=new WeakSet;return function(t,n){if(n instanceof Error)return I(n);if(typeof n==`object`&&n){if(e.has(n))return`[circular]`;e.add(n)}return n}}function vt(e,t=new WeakMap){if(e instanceof Error)return I(e);if(typeof e!=`object`||!e)return e;let n=t.get(e);if(n!==void 0)return n;if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(vt(r,t));return n}let r={};t.set(e,r);for(let[n,i]of Object.entries(e))r[n]=vt(i,t);return r}var L;(function(e){e[e.DEBUG=0]=`DEBUG`,e[e.INFO=1]=`INFO`,e[e.WARN=2]=`WARN`,e[e.ERROR=3]=`ERROR`,e[e.SILENT=4]=`SILENT`})(L||={});var yt=5e3,bt=L.INFO,xt={[L.DEBUG]:`DEBUG`,[L.INFO]:`INFO`,[L.WARN]:`WARN`,[L.ERROR]:`ERROR`};function St(e){return e===L.DEBUG||e===L.INFO||e===L.WARN||e===L.ERROR?xt[e]:`UNKNOWN`}var Ct=L.INFO,R=[],wt=1,z=[],Tt=new Set;function B(e){R.push(e)}function V(e){for(let t of Tt)try{t(e)}catch{}}function H(e){if(e.level<bt||e.level>=L.SILENT)return;let t={...e,id:wt++};z.push(t),z.length>5e3&&z.splice(0,z.length-yt),V({type:`entry`,entry:t})}function Et(e){try{return JSON.stringify(e,_t())}catch{return`[non-serializable]`}}var Dt={[L.DEBUG]:`debug`,[L.INFO]:`info`,[L.WARN]:`warn`,[L.ERROR]:`error`};function Ot(e){let t=Dt[e.level],n=`[${e.event}]`;e.data===void 0?console[t](n,e.message):console[t](n,e.message,typeof e.data==`string`?e.data:Et(e.data));for(let t of R)try{t(e)}catch{}}function U(e){return e instanceof Error?{error:I(e)}:vt(e)}function kt(e){function t(t,n,r){let i=t>=bt&&t<L.SILENT,a=t>=Ct;if(!i&&!a)return;let o={ts:new Date().toISOString(),level:t,event:e,message:n,...r===void 0?{}:{data:U(r)}};i&&H(o),a&&Ot(o)}return{debug:(e,n)=>t(L.DEBUG,e,n),info:(e,n)=>t(L.INFO,e,n),warn:(e,n)=>t(L.WARN,e,n),error:(e,n)=>t(L.ERROR,e,n)}}L.DEBUG,L.INFO,L.WARN,L.ERROR;var At=`TOOL_MARKUP_LEAK`,jt=`The model's output broke down (it leaked raw tool-call markup), so the run was stopped.`;Math.max(...[`<arg_key>`,`</arg_key>`,`<arg_value>`,`</arg_value>`,`<tool_call>`,`</tool_call>`,`<|tool▁calls▁begin|>`,`<|tool▁call▁begin|>`,`<|tool▁sep|>`,`<|tool_calls_section_begin|>`,`<|tool_call_begin|>`,`<|im_start|>`,`<|im_end|>`].map(e=>e.length));var Mt=Object.entries({stopped:`stopped before it replied.`,stream_repetition:`stopped because the model was stuck repeating.`,failed:`failed before it replied.`,empty:`finished with no reply.`}),Nt=/^(.+?) \(`([^`]+)`(?:, (.+))?\)$/;function Pt(e){return e.outcome===`answer`?`${e.projectName} returned a response`:e.outcome===`stopped`?`${e.projectName} stopped before it replied`:e.outcome===`stream_repetition`?`${e.projectName} stopped (stuck repeating)`:e.outcome===`failed`?`${e.projectName} failed before it replied`:`${e.projectName} finished with no reply`}function Ft(e){if(typeof e!=`string`)return null;let t=e.trim(),n=t.indexOf(`**:`);if(!t.startsWith(`From **`)||n===-1)return null;let r=t.slice(7,n),i=Nt.exec(r);if(!i)return null;let[,a,o,s]=i,c=t.slice(n+3).trim(),l={projectName:a,conversationId:o,label:s??null};if(!c)return{outcome:`empty`,...l,answerText:``};for(let[e,t]of Mt)if(c===t)return{outcome:e,...l,answerText:``};return{outcome:`answer`,...l,answerText:c}}var It=e((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),W=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronField=void 0,e.CronField=class e{#e=!1;#t=!1;#n=!1;#r=[];options={rawValue:``};static get min(){throw Error(`min must be overridden`)}static get max(){throw Error(`max must be overridden`)}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}constructor(t,n={rawValue:``}){if(!Array.isArray(t))throw Error(`${this.constructor.name} Validation error, values is not an array`);if(!(t.length>0))throw Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...n,rawValue:n.rawValue??``},this.#r=[...t].sort(e.sorter),this.#n=this.options.wildcard===void 0?this.#i():this.options.wildcard,this.#e=this.options.rawValue.includes(`L`)||t.includes(`L`),this.#t=this.options.rawValue.includes(`?`)||t.includes(`?`)}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return this.#e}get hasQuestionMarkChar(){return this.#t}get isWildcard(){return this.#n}get values(){return this.#r}static sorter(e,t){let n=typeof e==`number`,r=typeof t==`number`;return n&&r?e-t:!n&&!r?e.localeCompare(t):n?-1:1}static findNearestValueInList(e,t,n){if(n){for(let n=e.length-1;n>=0;n--)if(e[n]<t)return e[n];return null}for(let n=0;n<e.length;n++)if(e[n]>t)return e[n];return null}findNearestValue(e,t){return this.constructor.findNearestValueInList(this.values,e,t)}serialize(){return{wildcard:this.#n,values:this.#r}}validate(){let e,t=this.chars.length>0?` or chars ${this.chars.join(``)}`:``,n=e=>t=>RegExp(`^\\d{0,2}${t}$`).test(e);if(!this.#r.every(t=>(e=t,typeof t==`number`?t>=this.min&&t<=this.max:this.chars.some(n(t)))))throw Error(`${this.constructor.name} Validation error, got value ${e} expected range ${this.min}-${this.max}${t}`);let r=this.#r.find((e,t)=>this.#r.indexOf(e)!==t);if(r)throw Error(`${this.constructor.name} Validation error, duplicate values found: ${r}`)}#i(){return this.options.rawValue.length>0?[`*`,`?`].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(e,t)=>t+this.min).every(e=>this.#r.includes(e))}}})),Lt=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfMonth=void 0;var t=W(),n=1,r=31,i=Object.freeze([`L`]);e.CronDayOfMonth=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Rt=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDayOfWeek=void 0;var t=W(),n=0,r=7,i=Object.freeze([`L`]);e.CronDayOfWeek=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){if(super(e,t),this.validate(),this.values.some(e=>e===`L`))throw Error(`${this.constructor.name} Validation error, unexpected standalone L`)}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}}})),zt=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronHour=void 0;var t=W(),n=0,r=23,i=Object.freeze([]);e.CronHour=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Bt=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMinute=void 0;var t=W(),n=0,r=59,i=Object.freeze([]);e.CronMinute=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Vt=e((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=class extends Error{},n=class extends t{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},r=class extends t{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},i=class extends t{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},a=class extends t{},o=class extends t{constructor(e){super(`Invalid unit ${e}`)}},s=class extends t{},c=class extends t{constructor(){super(`Zone is an abstract class`)}},l=`numeric`,u=`short`,d=`long`,f={year:l,month:l,day:l},p={year:l,month:u,day:l},m={year:l,month:u,day:l,weekday:u},ee={year:l,month:d,day:l},h={year:l,month:d,day:l,weekday:d},g={hour:l,minute:l},_={hour:l,minute:l,second:l},v={hour:l,minute:l,second:l,timeZoneName:u},y={hour:l,minute:l,second:l,timeZoneName:d},b={hour:l,minute:l,hourCycle:`h23`},te={hour:l,minute:l,second:l,hourCycle:`h23`},ne={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:u},x={hour:l,minute:l,second:l,hourCycle:`h23`,timeZoneName:d},re={year:l,month:l,day:l,hour:l,minute:l},ie={year:l,month:l,day:l,hour:l,minute:l,second:l},ae={year:l,month:u,day:l,hour:l,minute:l},oe={year:l,month:u,day:l,hour:l,minute:l,second:l},se={year:l,month:u,day:l,weekday:u,hour:l,minute:l},ce={year:l,month:d,day:l,hour:l,minute:l,timeZoneName:u},le={year:l,month:d,day:l,hour:l,minute:l,second:l,timeZoneName:u},ue={year:l,month:d,day:l,weekday:d,hour:l,minute:l,timeZoneName:d},de={year:l,month:d,day:l,weekday:d,hour:l,minute:l,second:l,timeZoneName:d},S=class{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}},fe=null,pe=class e extends S{static get instance(){return fe===null&&(fe=new e),fe}get type(){return`system`}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Pt(e,t,n)}formatOffset(e,t){return Lt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type===`system`}get isValid(){return!0}},me=new Map;function he(e){let t=me.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(`en-US`,{hour12:!1,timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,era:`short`}),me.set(e,t)),t}var ge={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function _e(e,t){let n=e.format(t).replace(/\u200E/g,``),[,r,i,a,o,s,c,l]=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n);return[a,r,i,o,s,c,l]}function ve(e,t){let n=e.formatToParts(t),r=[];for(let e=0;e<n.length;e++){let{type:t,value:i}=n[e],a=ge[t];t===`era`?r[a]=i:F(a)||(r[a]=parseInt(i,10))}return r}var ye=new Map,C=class e extends S{static create(t){let n=ye.get(t);return n===void 0&&ye.set(t,n=new e(t)),n}static resetCache(){ye.clear(),me.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat(`en-US`,{timeZone:e}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=e.isValidZone(t)}get type(){return`iana`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Pt(e,t,n,this.name)}formatOffset(e,t){return Lt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=he(this.name),[r,i,a,o,s,c,l]=n.formatToParts?ve(n,t):_e(n,t);o===`BC`&&(r=-Math.abs(r)+1);let u=At({year:r,month:i,day:a,hour:s===24?0:s,minute:c,second:l,millisecond:0}),d=+t,f=d%1e3;return d-=f>=0?f:1e3+f,(u-d)/6e4}equals(e){return e.type===`iana`&&e.name===this.name}get isValid(){return this.valid}},be={};function xe(e,t={}){let n=JSON.stringify([e,t]),r=be[n];return r||(r=new Intl.ListFormat(e,t),be[n]=r),r}var Se=new Map;function Ce(e,t={}){let n=JSON.stringify([e,t]),r=Se.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(e,t),Se.set(n,r)),r}var we=new Map;function Te(e,t={}){let n=JSON.stringify([e,t]),r=we.get(n);return r===void 0&&(r=new Intl.NumberFormat(e,t),we.set(n,r)),r}var Ee=new Map;function De(e,t={}){let{base:n,...r}=t,i=JSON.stringify([e,r]),a=Ee.get(i);return a===void 0&&(a=new Intl.RelativeTimeFormat(e,t),Ee.set(i,a)),a}var Oe=null;function ke(){return Oe||(Oe=new Intl.DateTimeFormat().resolvedOptions().locale,Oe)}var w=new Map;function Ae(e){let t=w.get(e);return t===void 0&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),w.set(e,t)),t}var je=new Map;function Me(e){let t=je.get(e);if(!t){let n=new Intl.Locale(e);t=`getWeekInfo`in n?n.getWeekInfo():n.weekInfo,`minimalDays`in t||(t={...Be,...t}),je.set(e,t)}return t}function Ne(e){let t=e.indexOf(`-x-`);t!==-1&&(e=e.substring(0,t));let n=e.indexOf(`-u-`);if(n===-1)return[e];{let t,r;try{t=Ce(e).resolvedOptions(),r=e}catch{let i=e.substring(0,n);t=Ce(i).resolvedOptions(),r=i}let{numberingSystem:i,calendar:a}=t;return[r,i,a]}}function Pe(e,t,n){return n||t?(e.includes(`-u-`)||(e+=`-u`),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}function Fe(e){let t=[];for(let n=1;n<=12;n++){let r=$.utc(2009,n,1);t.push(e(r))}return t}function Ie(e){let t=[];for(let n=1;n<=7;n++){let r=$.utc(2016,11,13+n);t.push(e(r))}return t}function Le(e,t,n,r){let i=e.listingMode();return i===`error`?null:i===`en`?n(t):r(t)}function T(e){return e.numberingSystem&&e.numberingSystem!==`latn`?!1:e.numberingSystem===`latn`||!e.locale||e.locale.startsWith(`en`)||Ae(e.locale).numberingSystem===`latn`}var Re=class{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:r,floor:i,...a}=n;if(!t||Object.keys(a).length>0){let t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=Te(e,t)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}return B(this.floor?Math.floor(e):Dt(e,3),this.padTo)}},ze=class{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type===`fixed`){let t=-1*(e.offset/60),n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;e.offset!==0&&C.create(n).valid?(r=n,this.dt=e):(r=`UTC`,this.dt=e.offset===0?e:e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type===`system`?this.dt=e:e.zone.type===`iana`?(this.dt=e,r=e.zone.name):(r=`UTC`,this.dt=e.setZone(`UTC`).plus({minutes:e.offset}),this.originalZone=e.zone);let i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=Ce(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(``):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if(e.type===`timeZoneName`){let t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},E=class{constructor(e,t,n){this.opts={style:`long`,...n},!t&&yt()&&(this.rtf=De(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):nn(t,e,this.opts.numeric,this.opts.style!==`long`)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},Be={firstDay:1,minimalDays:4,weekend:[6,7]},D=class e{static fromOpts(t){return e.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,i,a=!1){let o=t||j.defaultLocale,s=o||(a?`en-US`:ke()),c=n||j.defaultNumberingSystem,l=r||j.defaultOutputCalendar,u=wt(i)||j.defaultWeekSettings;return new e(s,c,l,u,o)}static resetCache(){Oe=null,Se.clear(),we.clear(),Ee.clear(),w.clear(),je.clear()}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return e.create(t,n,r,i)}constructor(e,t,n,r,i){let[a,o,s]=Ne(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=n||s||null,this.weekSettings=r,this.intl=Pe(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached??=T(this),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem===`latn`)&&(this.outputCalendar===null||this.outputCalendar===`gregory`);return e&&t?`en`:`intl`}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:e.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,wt(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Le(this,e,Ht,()=>{let n=this.intl===`ja`||this.intl.startsWith(`ja-`);t&=!n;let r=t?{month:e,day:`numeric`}:{month:e},i=t?`format`:`standalone`;if(!this.monthsCache[i][e]){let t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,`month`);this.monthsCache[i][e]=Fe(t)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return Le(this,e,Kt,()=>{let n=t?{weekday:e,year:`numeric`,month:`long`,day:`numeric`}:{weekday:e},r=t?`format`:`standalone`;return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=Ie(e=>this.extract(e,n,`weekday`))),this.weekdaysCache[r][e]})}meridiems(){return Le(this,void 0,()=>qt,()=>{if(!this.meridiemCache){let e={hour:`numeric`,hourCycle:`h12`};this.meridiemCache=[$.utc(2016,11,13,9),$.utc(2016,11,13,19)].map(t=>this.extract(t,e,`dayperiod`))}return this.meridiemCache})}eras(e){return Le(this,e,Zt,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[$.utc(-40,1,1),$.utc(2017,1,1)].map(e=>this.extract(e,t,`era`))),this.eraCache[e]})}extract(e,t,n){let r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(e={}){return new Re(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new ze(e,this.intl,t)}relFormatter(e={}){return new E(this.intl,this.isEnglish(),e)}listFormatter(e={}){return xe(this.intl,e)}isEnglish(){return this.locale===`en`||this.locale.toLowerCase()===`en-us`||Ae(this.intl).locale.startsWith(`en-us`)}getWeekSettings(){return this.weekSettings?this.weekSettings:bt()?Me(this.locale):Be}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},Ve=null,O=class e extends S{static get utcInstance(){return Ve===null&&(Ve=new e(0)),Ve}static instance(t){return t===0?e.utcInstance:new e(t)}static parseSpecifier(t){if(t){let n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new e(Ft(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return`fixed`}get name(){return this.fixed===0?`UTC`:`UTC${Lt(this.fixed,`narrow`)}`}get ianaName(){return this.fixed===0?`Etc/UTC`:`Etc/GMT${Lt(-this.fixed,`narrow`)}`}offsetName(){return this.name}formatOffset(e,t){return Lt(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type===`fixed`&&e.fixed===this.fixed}get isValid(){return!0}},He=class extends S{constructor(e){super(),this.zoneName=e}get type(){return`invalid`}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return``}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function k(e,t){if(F(e)||e===null)return t;if(e instanceof S)return e;if(vt(e)){let n=e.toLowerCase();return n==="default"?t:n===`local`||n===`system`?pe.instance:n===`utc`||n===`gmt`?O.utcInstance:O.parseSpecifier(n)||C.create(e)}return I(e)?O.instance(e):typeof e==`object`&&`offset`in e&&typeof e.offset==`function`?e:new He(e)}var Ue={arab:`[٠-٩]`,arabext:`[۰-۹]`,bali:`[᭐-᭙]`,beng:`[০-৯]`,deva:`[०-९]`,fullwide:`[0-9]`,gujr:`[૦-૯]`,hanidec:`[〇|一|二|三|四|五|六|七|八|九]`,khmr:`[០-៩]`,knda:`[೦-೯]`,laoo:`[໐-໙]`,limb:`[᥆-᥏]`,mlym:`[൦-൯]`,mong:`[᠐-᠙]`,mymr:`[၀-၉]`,orya:`[୦-୯]`,tamldec:`[௦-௯]`,telu:`[౦-౯]`,thai:`[๐-๙]`,tibt:`[༠-༩]`,latn:`\\d`},We={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Ge=Ue.hanidec.replace(/[\[|\]]/g,``).split(``);function Ke(e){let t=parseInt(e,10);if(isNaN(t)){t=``;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);if(e[n].search(Ue.hanidec)!==-1)t+=Ge.indexOf(e[n]);else for(let e in We){let[n,i]=We[e];r>=n&&r<=i&&(t+=r-n)}}return parseInt(t,10)}return t}var qe=new Map;function Je(){qe.clear()}function A({numberingSystem:e},t=``){let n=e||`latn`,r=qe.get(n);r===void 0&&(r=new Map,qe.set(n,r));let i=r.get(t);return i===void 0&&(i=RegExp(`${Ue[n]}${t}`),r.set(t,i)),i}var Ye=()=>Date.now(),Xe=`system`,Ze=null,Qe=null,$e=null,et=60,tt,nt=null,j=class{static get now(){return Ye}static set now(e){Ye=e}static set defaultZone(e){Xe=e}static get defaultZone(){return k(Xe,pe.instance)}static get defaultLocale(){return Ze}static set defaultLocale(e){Ze=e}static get defaultNumberingSystem(){return Qe}static set defaultNumberingSystem(e){Qe=e}static get defaultOutputCalendar(){return $e}static set defaultOutputCalendar(e){$e=e}static get defaultWeekSettings(){return nt}static set defaultWeekSettings(e){nt=wt(e)}static get twoDigitCutoffYear(){return et}static set twoDigitCutoffYear(e){et=e%100}static get throwOnInvalid(){return tt}static set throwOnInvalid(e){tt=e}static resetCaches(){D.resetCache(),C.resetCache(),$.resetCache(),Je()}},M=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},rt=[0,31,59,90,120,151,181,212,243,273,304,334],it=[0,31,60,91,121,152,182,213,244,274,305,335];function N(e,t){return new M(`unit out of range`,`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function at(e,t,n){let r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let i=r.getUTCDay();return i===0?7:i}function ot(e,t,n){return n+(Ot(e)?it:rt)[t-1]}function st(e,t){let n=Ot(e)?it:rt,r=n.findIndex(e=>e<t),i=t-n[r];return{month:r+1,day:i}}function P(e,t){return(e-t+7)%7+1}function ct(e,t=4,n=1){let{year:r,month:i,day:a}=e,o=ot(r,i,a),s=P(at(r,i,a),n),c=Math.floor((o-s+14-t)/7),l;return c<1?(l=r-1,c=Mt(l,t,n)):c>Mt(r,t,n)?(l=r+1,c=1):l=r,{weekYear:l,weekNumber:c,weekday:s,...Rt(e)}}function lt(e,t=4,n=1){let{weekYear:r,weekNumber:i,weekday:a}=e,o=P(at(r,1,t),n),s=U(r),c=i*7+a-o-7+t,l;c<1?(l=r-1,c+=U(l)):c>s?(l=r+1,c-=U(r)):l=r;let{month:u,day:d}=st(l,c);return{year:l,month:u,day:d,...Rt(e)}}function ut(e){let{year:t,month:n,day:r}=e;return{year:t,ordinal:ot(t,n,r),...Rt(e)}}function dt(e){let{year:t,ordinal:n}=e,{month:r,day:i}=st(t,n);return{year:t,month:r,day:i,...Rt(e)}}function ft(e,t){if(!F(e.localWeekday)||!F(e.localWeekNumber)||!F(e.localWeekYear)){if(!F(e.weekday)||!F(e.weekNumber)||!F(e.weekYear))throw new a(`Cannot mix locale-based week fields with ISO-based week fields`);return F(e.localWeekday)||(e.weekday=e.localWeekday),F(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),F(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function pt(e,t=4,n=1){let r=_t(e.weekYear),i=z(e.weekNumber,1,Mt(e.weekYear,t,n)),a=z(e.weekday,1,7);return r?i?!a&&N(`weekday`,e.weekday):N(`week`,e.weekNumber):N(`weekYear`,e.weekYear)}function mt(e){let t=_t(e.year),n=z(e.ordinal,1,U(e.year));return t?!n&&N(`ordinal`,e.ordinal):N(`year`,e.year)}function ht(e){let t=_t(e.year),n=z(e.month,1,12),r=z(e.day,1,kt(e.year,e.month));return t?n?!r&&N(`day`,e.day):N(`month`,e.month):N(`year`,e.year)}function gt(e){let{hour:t,minute:n,second:r,millisecond:i}=e,a=z(t,0,23)||t===24&&n===0&&r===0&&i===0,o=z(n,0,59),s=z(r,0,59),c=z(i,0,999);return a?o?s?!c&&N(`millisecond`,i):N(`second`,r):N(`minute`,n):N(`hour`,t)}function F(e){return e===void 0}function I(e){return typeof e==`number`}function _t(e){return typeof e==`number`&&e%1==0}function vt(e){return typeof e==`string`}function L(e){return Object.prototype.toString.call(e)===`[object Date]`}function yt(){try{return typeof Intl<`u`&&!!Intl.RelativeTimeFormat}catch{return!1}}function bt(){try{return typeof Intl<`u`&&!!Intl.Locale&&(`weekInfo`in Intl.Locale.prototype||`getWeekInfo`in Intl.Locale.prototype)}catch{return!1}}function xt(e){return Array.isArray(e)?e:[e]}function St(e,t,n){if(e.length!==0)return e.reduce((e,r)=>{let i=[t(r),r];return e&&n(e[0],i[0])===e[0]?e:i},null)[1]}function Ct(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function wt(e){if(e==null)return null;if(typeof e!=`object`)throw new s(`Week settings must be an object`);if(!z(e.firstDay,1,7)||!z(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!z(e,1,7)))throw new s(`Invalid week settings`);return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function z(e,t,n){return _t(e)&&e>=t&&e<=n}function Tt(e,t){return e-t*Math.floor(e/t)}function B(e,t=2){let n=e<0,r;return r=n?`-`+(``+-e).padStart(t,`0`):(``+e).padStart(t,`0`),r}function V(e){if(!(F(e)||e===null||e===``))return parseInt(e,10)}function H(e){if(!(F(e)||e===null||e===``))return parseFloat(e)}function Et(e){if(!(F(e)||e===null||e===``)){let t=parseFloat(`0.`+e)*1e3;return Math.floor(t)}}function Dt(e,t,n=`round`){let r=10**t;switch(n){case`expand`:return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case`trunc`:return Math.trunc(e*r)/r;case`round`:return Math.round(e*r)/r;case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:throw RangeError(`Value rounding ${n} is out of range`)}}function Ot(e){return e%4==0&&(e%100!=0||e%400==0)}function U(e){return Ot(e)?366:365}function kt(e,t){let n=Tt(t-1,12)+1,r=e+(t-n)/12;return n===2?Ot(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function At(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function jt(e,t,n){return-P(at(e,1,t),n)+t-1}function Mt(e,t=4,n=1){let r=jt(e,t,n),i=jt(e+1,t,n);return(U(e)-r+i)/7}function Nt(e){return e>99?e:e>j.twoDigitCutoffYear?1900+e:2e3+e}function Pt(e,t,n,r=null){let i=new Date(e),a={hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`};r&&(a.timeZone=r);let o={timeZoneName:t,...a},s=new Intl.DateTimeFormat(n,o).formatToParts(i).find(e=>e.type.toLowerCase()===`timezonename`);return s?s.value:null}function Ft(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);let r=parseInt(t,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function It(e){let t=Number(e);if(typeof e==`boolean`||e===``||!Number.isFinite(t))throw new s(`Invalid unit value ${e}`);return t}function W(e,t){let n={};for(let r in e)if(R(e,r)){let i=e[r];if(i==null)continue;n[t(r)]=It(i)}return n}function Lt(e,t){let n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?`+`:`-`;switch(t){case`short`:return`${i}${B(n,2)}:${B(r,2)}`;case`narrow`:return`${i}${n}${r>0?`:${r}`:``}`;case`techie`:return`${i}${B(n,2)}${B(r,2)}`;default:throw RangeError(`Value format ${t} is out of range for property format`)}}function Rt(e){return Ct(e,[`hour`,`minute`,`second`,`millisecond`])}var zt=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],Bt=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],Vt=[`J`,`F`,`M`,`A`,`M`,`J`,`J`,`A`,`S`,`O`,`N`,`D`];function Ht(e){switch(e){case`narrow`:return[...Vt];case`short`:return[...Bt];case`long`:return[...zt];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`,`10`,`11`,`12`];case`2-digit`:return[`01`,`02`,`03`,`04`,`05`,`06`,`07`,`08`,`09`,`10`,`11`,`12`];default:return null}}var Ut=[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`],Wt=[`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`,`Sun`],Gt=[`M`,`T`,`W`,`T`,`F`,`S`,`S`];function Kt(e){switch(e){case`narrow`:return[...Gt];case`short`:return[...Wt];case`long`:return[...Ut];case`numeric`:return[`1`,`2`,`3`,`4`,`5`,`6`,`7`];default:return null}}var qt=[`AM`,`PM`],Jt=[`Before Christ`,`Anno Domini`],Yt=[`BC`,`AD`],Xt=[`B`,`A`];function Zt(e){switch(e){case`narrow`:return[...Xt];case`short`:return[...Yt];case`long`:return[...Jt];default:return null}}function Qt(e){return qt[e.hour<12?0:1]}function $t(e,t){return Kt(t)[e.weekday-1]}function en(e,t){return Ht(t)[e.month-1]}function tn(e,t){return Zt(t)[e.year<0?0:1]}function nn(e,t,n=`always`,r=!1){let i={years:[`year`,`yr.`],quarters:[`quarter`,`qtr.`],months:[`month`,`mo.`],weeks:[`week`,`wk.`],days:[`day`,`day`,`days`],hours:[`hour`,`hr.`],minutes:[`minute`,`min.`],seconds:[`second`,`sec.`]},a=[`hours`,`minutes`,`seconds`].indexOf(e)===-1;if(n===`auto`&&a){let n=e===`days`;switch(t){case 1:return n?`tomorrow`:`next ${i[e][0]}`;case-1:return n?`yesterday`:`last ${i[e][0]}`;case 0:return n?`today`:`this ${i[e][0]}`}}let o=Object.is(t,-0)||t<0,s=Math.abs(t),c=s===1,l=i[e],u=r?c?l[1]:l[2]||l[1]:c?i[e][0]:e;return o?`${s} ${u} ago`:`in ${s} ${u}`}function rn(e,t){let n=``;for(let r of e)r.literal?n+=r.val:n+=t(r.val);return n}var an={D:f,DD:p,DDD:ee,DDDD:h,t:g,tt:_,ttt:v,tttt:y,T:b,TT:te,TTT:ne,TTTT:x,f:re,ff:ae,fff:ce,ffff:ue,F:ie,FF:oe,FFF:le,FFFF:de},G=class e{static create(t,n={}){return new e(t,n)}static parseFormat(e){let t=null,n=``,r=!1,i=[];for(let a=0;a<e.length;a++){let o=e.charAt(a);o===`'`?((n.length>0||r)&&i.push({literal:r||/^\s+$/.test(n),val:n===``?`'`:n}),t=null,n=``,r=!r):r||o===t?n+=o:(n.length>0&&i.push({literal:/^\s+$/.test(n),val:n}),n=o,t=o)}return n.length>0&&i.push({literal:r||/^\s+$/.test(n),val:n}),i}static macroTokenToFormatOpts(e){return an[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return B(e,t);let r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(t,n){let r=this.loc.listingMode()===`en`,i=this.loc.outputCalendar&&this.loc.outputCalendar!==`gregory`,a=(e,n)=>this.loc.extract(t,e,n),o=e=>t.isOffsetFixed&&t.offset===0&&e.allowZ?`Z`:t.isValid?t.zone.formatOffset(t.ts,e.format):``,s=()=>r?Qt(t):a({hour:`numeric`,hourCycle:`h12`},`dayperiod`),c=(e,n)=>r?en(t,e):a(n?{month:e}:{month:e,day:`numeric`},`month`),l=(e,n)=>r?$t(t,e):a(n?{weekday:e}:{weekday:e,month:`long`,day:`numeric`},`weekday`),u=n=>{let r=e.macroTokenToFormatOpts(n);return r?this.formatWithSystemDefault(t,r):n},d=e=>r?tn(t,e):a({era:e},`era`);return rn(e.parseFormat(n),e=>{switch(e){case`S`:return this.num(t.millisecond);case`u`:case`SSS`:return this.num(t.millisecond,3);case`s`:return this.num(t.second);case`ss`:return this.num(t.second,2);case`uu`:return this.num(Math.floor(t.millisecond/10),2);case`uuu`:return this.num(Math.floor(t.millisecond/100));case`m`:return this.num(t.minute);case`mm`:return this.num(t.minute,2);case`h`:return this.num(t.hour%12==0?12:t.hour%12);case`hh`:return this.num(t.hour%12==0?12:t.hour%12,2);case`H`:return this.num(t.hour);case`HH`:return this.num(t.hour,2);case`Z`:return o({format:`narrow`,allowZ:this.opts.allowZ});case`ZZ`:return o({format:`short`,allowZ:this.opts.allowZ});case`ZZZ`:return o({format:`techie`,allowZ:this.opts.allowZ});case`ZZZZ`:return t.zone.offsetName(t.ts,{format:`short`,locale:this.loc.locale});case`ZZZZZ`:return t.zone.offsetName(t.ts,{format:`long`,locale:this.loc.locale});case`z`:return t.zoneName;case`a`:return s();case`d`:return i?a({day:`numeric`},`day`):this.num(t.day);case`dd`:return i?a({day:`2-digit`},`day`):this.num(t.day,2);case`c`:return this.num(t.weekday);case`ccc`:return l(`short`,!0);case`cccc`:return l(`long`,!0);case`ccccc`:return l(`narrow`,!0);case`E`:return this.num(t.weekday);case`EEE`:return l(`short`,!1);case`EEEE`:return l(`long`,!1);case`EEEEE`:return l(`narrow`,!1);case`L`:return i?a({month:`numeric`,day:`numeric`},`month`):this.num(t.month);case`LL`:return i?a({month:`2-digit`,day:`numeric`},`month`):this.num(t.month,2);case`LLL`:return c(`short`,!0);case`LLLL`:return c(`long`,!0);case`LLLLL`:return c(`narrow`,!0);case`M`:return i?a({month:`numeric`},`month`):this.num(t.month);case`MM`:return i?a({month:`2-digit`},`month`):this.num(t.month,2);case`MMM`:return c(`short`,!1);case`MMMM`:return c(`long`,!1);case`MMMMM`:return c(`narrow`,!1);case`y`:return i?a({year:`numeric`},`year`):this.num(t.year);case`yy`:return i?a({year:`2-digit`},`year`):this.num(t.year.toString().slice(-2),2);case`yyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,4);case`yyyyyy`:return i?a({year:`numeric`},`year`):this.num(t.year,6);case`G`:return d(`short`);case`GG`:return d(`long`);case`GGGGG`:return d(`narrow`);case`kk`:return this.num(t.weekYear.toString().slice(-2),2);case`kkkk`:return this.num(t.weekYear,4);case`W`:return this.num(t.weekNumber);case`WW`:return this.num(t.weekNumber,2);case`n`:return this.num(t.localWeekNumber);case`nn`:return this.num(t.localWeekNumber,2);case`ii`:return this.num(t.localWeekYear.toString().slice(-2),2);case`iiii`:return this.num(t.localWeekYear,4);case`o`:return this.num(t.ordinal);case`ooo`:return this.num(t.ordinal,3);case`q`:return this.num(t.quarter);case`qq`:return this.num(t.quarter,2);case`X`:return this.num(Math.floor(t.ts/1e3));case`x`:return this.num(t.ts);default:return u(e)}})}formatDurationFromString(t,n){let r=this.opts.signMode===`negativeLargestOnly`?-1:1,i=e=>{switch(e[0]){case`S`:return`milliseconds`;case`s`:return`seconds`;case`m`:return`minutes`;case`h`:return`hours`;case`d`:return`days`;case`w`:return`weeks`;case`M`:return`months`;case`y`:return`years`;default:return null}},a=(e,t)=>n=>{let a=i(n);if(a){let i=t.isNegativeDuration&&a!==t.largestUnit?r:1,o;return o=this.opts.signMode===`negativeLargestOnly`&&a!==t.largestUnit?`never`:this.opts.signMode===`all`?`always`:`auto`,this.num(e.get(a)*i,n.length,o)}return n},o=e.parseFormat(n),s=o.reduce((e,{literal:t,val:n})=>t?e:e.concat(n),[]),c=t.shiftTo(...s.map(i).filter(e=>e));return rn(o,a(c,{isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]}))}},on=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function K(...e){let t=e.reduce((e,t)=>e+t.source,``);return RegExp(`^${t}$`)}function sn(...e){return t=>e.reduce(([e,n,r],i)=>{let[a,o,s]=i(t,r);return[{...e,...a},o||n,s]},[{},null,1]).slice(0,2)}function cn(e,...t){if(e==null)return[null,null];for(let[n,r]of t){let t=n.exec(e);if(t)return r(t)}return[null,null]}function ln(...e){return(t,n)=>{let r={},i=0;for(;i<e.length;i++)r[e[i]]=V(t[n+i]);return[r,null,n+i]}}var un=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,dn=`(?:${un.source}?(?:\\[(${on.source})\\])?)?`,fn=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,pn=RegExp(`${fn.source}${dn}`),mn=RegExp(`(?:[Tt]${pn.source})?`),hn=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,gn=/(\d{4})-?W(\d\d)(?:-?(\d))?/,_n=/(\d{4})-?(\d{3})/,vn=ln(`weekYear`,`weekNumber`,`weekDay`),yn=ln(`year`,`ordinal`),q=/(\d{4})-(\d\d)-(\d\d)/,bn=RegExp(`${fn.source} ?(?:${un.source}|(${on.source}))?`),xn=RegExp(`(?: ${bn.source})?`);function Sn(e,t,n){let r=e[t];return F(r)?n:V(r)}function Cn(e,t){return[{year:Sn(e,t),month:Sn(e,t+1,1),day:Sn(e,t+2,1)},null,t+3]}function wn(e,t){return[{hours:Sn(e,t,0),minutes:Sn(e,t+1,0),seconds:Sn(e,t+2,0),milliseconds:Et(e[t+3])},null,t+4]}function Tn(e,t){let n=!e[t]&&!e[t+1],r=Ft(e[t+1],e[t+2]);return[{},n?null:O.instance(r),t+3]}function En(e,t){return[{},e[t]?C.create(e[t]):null,t+1]}var Dn=RegExp(`^T?${fn.source}$`),On=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function kn(e){let[t,n,r,i,a,o,s,c,l]=e,u=t[0]===`-`,d=c&&c[0]===`-`,f=(e,t=!1)=>e!==void 0&&(t||e&&u)?-e:e;return[{years:f(H(n)),months:f(H(r)),weeks:f(H(i)),days:f(H(a)),hours:f(H(o)),minutes:f(H(s)),seconds:f(H(c),c===`-0`),milliseconds:f(Et(l),d)}]}var An={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function jn(e,t,n,r,i,a,o){let s={year:t.length===2?Nt(V(t)):V(t),month:Bt.indexOf(n)+1,day:V(r),hour:V(i),minute:V(a)};return o&&(s.second=V(o)),e&&(s.weekday=e.length>3?Ut.indexOf(e)+1:Wt.indexOf(e)+1),s}var Mn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Nn(e){let[,t,n,r,i,a,o,s,c,l,u,d]=e,f=jn(t,i,r,n,a,o,s),p;return p=c?An[c]:l?0:Ft(u,d),[f,new O(p)]}function Pn(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).trim()}var Fn=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,In=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ln=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Rn(e){let[,t,n,r,i,a,o,s]=e;return[jn(t,i,r,n,a,o,s),O.utcInstance]}function zn(e){let[,t,n,r,i,a,o,s]=e;return[jn(t,s,n,r,i,a,o),O.utcInstance]}var Bn=K(hn,mn),Vn=K(gn,mn),Hn=K(_n,mn),Un=K(pn),Wn=sn(Cn,wn,Tn,En),Gn=sn(vn,wn,Tn,En),Kn=sn(yn,wn,Tn,En),qn=sn(wn,Tn,En);function Jn(e){return cn(e,[Bn,Wn],[Vn,Gn],[Hn,Kn],[Un,qn])}function Yn(e){return cn(Pn(e),[Mn,Nn])}function Xn(e){return cn(e,[Fn,Rn],[In,Rn],[Ln,zn])}function Zn(e){return cn(e,[On,kn])}var Qn=sn(wn);function $n(e){return cn(e,[Dn,Qn])}var er=K(q,xn),tr=K(bn),nr=sn(wn,Tn,En);function rr(e){return cn(e,[er,Wn],[tr,nr])}var ir=`Invalid Duration`,ar={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},or={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...ar},J=146097/400,sr=146097/4800,cr={years:{quarters:4,months:12,weeks:J/7,days:J,hours:J*24,minutes:J*24*60,seconds:J*24*60*60,milliseconds:J*24*60*60*1e3},quarters:{months:3,weeks:J/28,days:J/4,hours:J*24/4,minutes:J*24*60/4,seconds:J*24*60*60/4,milliseconds:J*24*60*60*1e3/4},months:{weeks:sr/7,days:sr,hours:sr*24,minutes:sr*24*60,seconds:sr*24*60*60,milliseconds:sr*24*60*60*1e3},...ar},lr=[`years`,`quarters`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`],ur=lr.slice(0).reverse();function Y(e,t,n=!1){return new X({values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix})}function dr(e,t){let n=t.milliseconds??0;for(let r of ur.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function fr(e,t){let n=dr(e,t)<0?-1:1;lr.reduceRight((r,i)=>{if(F(t[i]))return r;if(r){let a=t[r]*n,o=e[i][r],s=Math.floor(a/o);t[i]+=s*n,t[r]-=s*o*n}return i},null),lr.reduce((n,r)=>{if(F(t[r]))return n;if(n){let i=t[n]%1;t[n]-=i,t[r]+=i*e[n][r]}return r},null)}function pr(e){let t={};for(let[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}var X=class e{constructor(e){let t=e.conversionAccuracy===`longterm`||!1,n=t?cr:or;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||D.create(),this.conversionAccuracy=t?`longterm`:`casual`,this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(t,n){return e.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(typeof t!=`object`||!t)throw new s(`Duration.fromObject: argument expected to be an object, got ${t===null?`null`:typeof t}`);return new e({values:W(t,e.normalizeUnit),loc:D.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(I(t))return e.fromMillis(t);if(e.isDuration(t))return t;if(typeof t==`object`)return e.fromObject(t);throw new s(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){let[r]=Zn(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){let[r]=$n(t);return r?e.fromObject(r,n):e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Duration is invalid`);let r=t instanceof M?t:new M(t,n);if(j.throwOnInvalid)throw new i(r);return new e({invalid:r})}static normalizeUnit(e){let t={year:`years`,years:`years`,quarter:`quarters`,quarters:`quarters`,month:`months`,months:`months`,week:`weeks`,weeks:`weeks`,day:`days`,days:`days`,hour:`hours`,hours:`hours`,minute:`minutes`,minutes:`minutes`,second:`seconds`,seconds:`seconds`,millisecond:`milliseconds`,milliseconds:`milliseconds`}[e&&e.toLowerCase()];if(!t)throw new o(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){let n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?G.create(this.loc,n).formatDurationFromString(this,e):ir}toHuman(e={}){if(!this.isValid)return ir;let t=e.showZeros!==!1,n=lr.map(n=>{let r=this.values[n];return F(r)||r===0&&!t?null:this.loc.numberFormatter({style:`unit`,unitDisplay:`long`,...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:`conjunction`,style:e.listStyle||`narrow`,...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e=`P`;return this.years!==0&&(e+=this.years+`Y`),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+`M`),this.weeks!==0&&(e+=this.weeks+`W`),this.days!==0&&(e+=this.days+`D`),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+=`T`),this.hours!==0&&(e+=this.hours+`H`),this.minutes!==0&&(e+=this.minutes+`M`),(this.seconds!==0||this.milliseconds!==0)&&(e+=Dt(this.seconds+this.milliseconds/1e3,3)+`S`),e===`P`&&(e+=`T0S`),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:`extended`,...e,includeOffset:!1},$.fromMillis(t,{zone:`UTC`}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?dr(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t),r={};for(let e of lr)(R(n.values,e)||R(this.values,e))&&(r[e]=n.get(e)+this.get(e));return Y(this,{values:r},!0)}minus(t){if(!this.isValid)return this;let n=e.fromDurationLike(t);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=It(e(this.values[n],n));return Y(this,{values:t},!0)}get(t){return this[e.normalizeUnit(t)]}set(t){if(!this.isValid)return this;let n={...this.values,...W(t,e.normalizeUnit)};return Y(this,{values:n})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}={}){let i={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n};return Y(this,i)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return fr(this.matrix,e),Y(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=pr(this.normalize().shiftToAll().toObject());return Y(this,{values:e},!0)}shiftTo(...t){if(!this.isValid||t.length===0)return this;t=t.map(t=>e.normalizeUnit(t));let n={},r={},i=this.toObject(),a;for(let e of lr)if(t.indexOf(e)>=0){a=e;let t=0;for(let n in r)t+=this.matrix[n][e]*r[n],r[n]=0;I(i[e])&&(t+=i[e]);let o=Math.trunc(t);n[e]=o,r[e]=(t*1e3-o*1e3)/1e3}else I(i[e])&&(r[e]=i[e]);for(let e in r)r[e]!==0&&(n[a]+=e===a?r[e]:r[e]/this.matrix[a][e]);return fr(this.matrix,n),Y(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo(`years`,`months`,`weeks`,`days`,`hours`,`minutes`,`seconds`,`milliseconds`):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Y(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=pr(this.values);return Y(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(e,t){return e===void 0||e===0?t===void 0||t===0:e===t}for(let n of lr)if(!t(this.values[n],e.values[n]))return!1;return!0}},mr=`Invalid Interval`;function hr(e,t){return!e||!e.isValid?gr.invalid(`missing or invalid start`):!t||!t.isValid?gr.invalid(`missing or invalid end`):t<e?gr.invalid(`end before start`,`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}var gr=class e{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new s(`need to specify a reason the Interval is invalid`);let i=t instanceof M?t:new M(t,n);if(j.throwOnInvalid)throw new r(i);return new e({invalid:i})}static fromDateTimes(t,n){let r=_i(t),i=_i(n);return hr(r,i)??new e({start:r,end:i})}static after(t,n){let r=X.fromDurationLike(n),i=_i(t);return e.fromDateTimes(i,i.plus(r))}static before(t,n){let r=X.fromDurationLike(n),i=_i(t);return e.fromDateTimes(i.minus(r),i)}static fromISO(t,n){let[r,i]=(t||``).split(`/`,2);if(r&&i){let t,a;try{t=$.fromISO(r,n),a=t.isValid}catch{a=!1}let o,s;try{o=$.fromISO(i,n),s=o.isValid}catch{s=!1}if(a&&s)return e.fromDateTimes(t,o);if(a){let r=X.fromISO(i,n);if(r.isValid)return e.after(t,r)}else if(s){let t=X.fromISO(r,n);if(t.isValid)return e.before(o,t)}}return e.invalid(`unparsable`,`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e=`milliseconds`){return this.isValid?this.toDuration(e).get(e):NaN}count(e=`milliseconds`,t){if(!this.isValid)return NaN;let n=this.start.startOf(e,t),r;return r=t!=null&&t.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:t,end:n}={}){return this.isValid?e.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];let n=t.map(_i).filter(e=>this.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),r=[],{s:i}=this,a=0;for(;i<this.e;){let t=n[a]||this.e,o=+t>+this.e?this.e:t;r.push(e.fromDateTimes(i,o)),i=o,a+=1}return r}splitBy(t){let n=X.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as(`milliseconds`)===0)return[];let{s:r}=this,i=1,a,o=[];for(;r<this.e;){let t=this.start.plus(n.mapUnits(e=>e*i));a=+t>+this.e?this.e:t,o.push(e.fromDateTimes(r,a)),r=a,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(t){if(!this.isValid)return this;let n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:e.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;let n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return e.fromDateTimes(n,r)}static merge(e){let[t,n]=e.sort((e,t)=>e.s-t.s).reduce(([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n],[[],null]);return n&&t.push(n),t}static xor(t){let n=null,r=0,i=[],a=t.map(e=>[{time:e.s,type:`s`},{time:e.e,type:`e`}]),o=Array.prototype.concat(...a).sort((e,t)=>e.time-t.time);for(let t of o)r+=t.type===`s`?1:-1,r===1?n=t.time:(n&&+n!=+t.time&&i.push(e.fromDateTimes(n,t.time)),n=null);return e.merge(i)}difference(...t){return e.xor([this].concat(t)).map(e=>this.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:mr}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=f,t={}){return this.isValid?G.create(this.s.loc.clone(t),e).formatInterval(this):mr}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:mr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:mr}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:mr}toFormat(e,{separator:t=` – `}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:mr}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):X.invalid(this.invalidReason)}mapEndpoints(t){return e.fromDateTimes(t(this.s),t(this.e))}},_r=class{static hasDST(e=j.defaultZone){let t=$.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return C.isValidZone(e)}static normalizeZone(e){return k(e,j.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||D.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||D.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||D.create(e)).getWeekendDays().slice()}static months(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||D.create(t,n,i)).months(e)}static monthsFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:i=`gregory`}={}){return(r||D.create(t,n,i)).months(e,!0)}static weekdays(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||D.create(t,n,null)).weekdays(e)}static weekdaysFormat(e=`long`,{locale:t=null,numberingSystem:n=null,locObj:r=null}={}){return(r||D.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return D.create(e).meridiems()}static eras(e=`short`,{locale:t=null}={}){return D.create(t,null,`gregory`).eras(e)}static features(){return{relative:yt(),localeWeek:bt()}}};function vr(e,t){let n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf(`day`).valueOf(),r=n(t)-n(e);return Math.floor(X.fromMillis(r).as(`days`))}function yr(e,t,n){let r=[[`years`,(e,t)=>t.year-e.year],[`quarters`,(e,t)=>t.quarter-e.quarter+(t.year-e.year)*4],[`months`,(e,t)=>t.month-e.month+(t.year-e.year)*12],[`weeks`,(e,t)=>{let n=vr(e,t);return(n-n%7)/7}],[`days`,vr]],i={},a=e,o,s;for(let[c,l]of r)n.indexOf(c)>=0&&(o=c,i[c]=l(e,t),s=a.plus(i),s>t?(i[c]--,e=a.plus(i),e>t&&(s=e,i[c]--,e=a.plus(i))):e=s);return[e,i,s,o]}function br(e,t,n,r){let[i,a,o,s]=yr(e,t,n),c=t-i,l=n.filter(e=>[`hours`,`minutes`,`seconds`,`milliseconds`].indexOf(e)>=0);l.length===0&&(o<t&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+c/(o-i)));let u=X.fromObject(a,r);return l.length>0?X.fromMillis(c,r).shiftTo(...l).plus(u):u}var xr=`missing Intl.DateTimeFormat.formatToParts support`;function Z(e,t=e=>e){return{regex:e,deser:([e])=>t(Ke(e))}}var Sr=`[ \xA0]`,Cr=new RegExp(Sr,`g`);function wr(e){return e.replace(/\./g,`\\.?`).replace(Cr,Sr)}function Tr(e){return e.replace(/\./g,``).replace(Cr,` `).toLowerCase()}function Q(e,t){return e===null?null:{regex:RegExp(e.map(wr).join(`|`)),deser:([n])=>e.findIndex(e=>Tr(n)===Tr(e))+t}}function Er(e,t){return{regex:e,deser:([,e,t])=>Ft(e,t),groups:t}}function Dr(e){return{regex:e,deser:([e])=>e}}function Or(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,`\\$&`)}function kr(e,t){let n=A(t),r=A(t,`{2}`),i=A(t,`{3}`),a=A(t,`{4}`),o=A(t,`{6}`),s=A(t,`{1,2}`),c=A(t,`{1,3}`),l=A(t,`{1,6}`),u=A(t,`{1,9}`),d=A(t,`{2,4}`),f=A(t,`{4,6}`),p=e=>({regex:RegExp(Or(e.val)),deser:([e])=>e,literal:!0}),m=(m=>{if(e.literal)return p(m);switch(m.val){case`G`:return Q(t.eras(`short`),0);case`GG`:return Q(t.eras(`long`),0);case`y`:return Z(l);case`yy`:return Z(d,Nt);case`yyyy`:return Z(a);case`yyyyy`:return Z(f);case`yyyyyy`:return Z(o);case`M`:return Z(s);case`MM`:return Z(r);case`MMM`:return Q(t.months(`short`,!0),1);case`MMMM`:return Q(t.months(`long`,!0),1);case`L`:return Z(s);case`LL`:return Z(r);case`LLL`:return Q(t.months(`short`,!1),1);case`LLLL`:return Q(t.months(`long`,!1),1);case`d`:return Z(s);case`dd`:return Z(r);case`o`:return Z(c);case`ooo`:return Z(i);case`HH`:return Z(r);case`H`:return Z(s);case`hh`:return Z(r);case`h`:return Z(s);case`mm`:return Z(r);case`m`:return Z(s);case`q`:return Z(s);case`qq`:return Z(r);case`s`:return Z(s);case`ss`:return Z(r);case`S`:return Z(c);case`SSS`:return Z(i);case`u`:return Dr(u);case`uu`:return Dr(s);case`uuu`:return Z(n);case`a`:return Q(t.meridiems(),0);case`kkkk`:return Z(a);case`kk`:return Z(d,Nt);case`W`:return Z(s);case`WW`:return Z(r);case`E`:case`c`:return Z(n);case`EEE`:return Q(t.weekdays(`short`,!1),1);case`EEEE`:return Q(t.weekdays(`long`,!1),1);case`ccc`:return Q(t.weekdays(`short`,!0),1);case`cccc`:return Q(t.weekdays(`long`,!0),1);case`Z`:case`ZZ`:return Er(RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case`ZZZ`:return Er(RegExp(`([+-]${s.source})(${r.source})?`),2);case`z`:return Dr(/[a-z_+-/]{1,256}?/i);case` `:return Dr(/[^\S\n\r]/);default:return p(m)}})(e)||{invalidReason:xr};return m.token=e,m}var Ar={year:{"2-digit":`yy`,numeric:`yyyyy`},month:{numeric:`M`,"2-digit":`MM`,short:`MMM`,long:`MMMM`},day:{numeric:`d`,"2-digit":`dd`},weekday:{short:`EEE`,long:`EEEE`},dayperiod:`a`,dayPeriod:`a`,hour12:{numeric:`h`,"2-digit":`hh`},hour24:{numeric:`H`,"2-digit":`HH`},minute:{numeric:`m`,"2-digit":`mm`},second:{numeric:`s`,"2-digit":`ss`},timeZoneName:{long:`ZZZZZ`,short:`ZZZ`}};function jr(e,t,n){let{type:r,value:i}=e;if(r===`literal`){let e=/^\s+$/.test(i);return{literal:!e,val:e?` `:i}}let a=t[r],o=r;r===`hour`&&(o=t.hour12==null?t.hourCycle==null?n.hour12?`hour12`:`hour24`:t.hourCycle===`h11`||t.hourCycle===`h12`?`hour12`:`hour24`:t.hour12?`hour12`:`hour24`);let s=Ar[o];if(typeof s==`object`&&(s=s[a]),s)return{literal:!1,val:s}}function Mr(e){return[`^${e.map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,``)}$`,e]}function Nr(e,t,n){let r=e.match(t);if(r){let e={},t=1;for(let i in n)if(R(n,i)){let a=n[i],o=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(r.slice(t,t+o))),t+=o}return[r,e]}return[r,{}]}function Pr(e){let t=e=>{switch(e){case`S`:return`millisecond`;case`s`:return`second`;case`m`:return`minute`;case`h`:case`H`:return`hour`;case`d`:return`day`;case`o`:return`ordinal`;case`L`:case`M`:return`month`;case`y`:return`year`;case`E`:case`c`:return`weekday`;case`W`:return`weekNumber`;case`k`:return`weekYear`;case`q`:return`quarter`;default:return null}},n=null,r;return F(e.z)||(n=C.create(e.z)),F(e.Z)||(n||=new O(e.Z),r=e.Z),F(e.q)||(e.M=(e.q-1)*3+1),F(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),F(e.u)||(e.S=Et(e.u)),[Object.keys(e).reduce((n,r)=>{let i=t(r);return i&&(n[i]=e[r]),n},{}),n,r]}var Fr=null;function Ir(){return Fr||=$.fromMillis(1555555555555),Fr}function Lr(e,t){if(e.literal)return e;let n=Hr(G.macroTokenToFormatOpts(e.val),t);return n==null||n.includes(void 0)?e:n}function Rr(e,t){return Array.prototype.concat(...e.map(e=>Lr(e,t)))}var zr=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Rr(G.parseFormat(t),e),this.units=this.tokens.map(t=>kr(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){let[e,t]=Mr(this.units);this.regex=RegExp(e,`i`),this.handlers=t}}explainFromTokens(e){if(this.isValid){let[t,n]=Nr(e,this.regex,this.handlers),[r,i,o]=n?Pr(n):[null,null,void 0];if(R(n,`a`)&&R(n,`H`))throw new a(`Can't include meridiem when specifying 24-hour format`);return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:i,specificOffset:o}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function Br(e,t,n){return new zr(e,n).explainFromTokens(t)}function Vr(e,t,n){let{result:r,zone:i,specificOffset:a,invalidReason:o}=Br(e,t,n);return[r,i,a,o]}function Hr(e,t){if(!e)return null;let n=G.create(t,e).dtFormatter(Ir()),r=n.formatToParts(),i=n.resolvedOptions();return r.map(t=>jr(t,e,i))}var Ur=`Invalid DateTime`,Wr=864e13;function Gr(e){return new M(`unsupported zone`,`the zone "${e.name}" is not supported`)}function Kr(e){return e.weekData===null&&(e.weekData=ct(e.c)),e.weekData}function qr(e){return e.localWeekData===null&&(e.localWeekData=ct(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Jr(e,t){let n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new $({...n,...t,old:n})}function Yr(e,t,n){let r=e-t*60*1e3,i=n.offset(r);if(t===i)return[r,t];r-=(i-t)*60*1e3;let a=n.offset(r);return i===a?[r,i]:[e-Math.min(i,a)*60*1e3,Math.max(i,a)]}function Xr(e,t){e+=t*60*1e3;let n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Zr(e,t,n){return Yr(At(e),t,n)}function Qr(e,t){let n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,a={...e.c,year:r,month:i,day:Math.min(e.c.day,kt(r,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=X.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as(`milliseconds`),[s,c]=Yr(At(a),n,e.zone);return o!==0&&(s+=o,c=e.zone.offset(s)),{ts:s,o:c}}function $r(e,t,n,r,i,a){let{setZone:o,zone:s}=n;if(e&&Object.keys(e).length!==0||t){let r=t||s,i=$.fromObject(e,{...n,zone:r,specificOffset:a});return o?i:i.setZone(s)}return $.invalid(new M(`unparsable`,`the input "${i}" can't be parsed as ${r}`))}function ei(e,t,n=!0){return e.isValid?G.create(D.create(`en-US`),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function ti(e,t,n){let r=e.c.year>9999||e.c.year<0,i=``;if(r&&e.c.year>=0&&(i+=`+`),i+=B(e.c.year,r?6:4),n===`year`)return i;if(t){if(i+=`-`,i+=B(e.c.month),n===`month`)return i;i+=`-`}else if(i+=B(e.c.month),n===`month`)return i;return i+=B(e.c.day),i}function ni(e,t,n,r,i,a,o){let s=!n||e.c.millisecond!==0||e.c.second!==0,c=``;switch(o){case`day`:case`month`:case`year`:break;default:if(c+=B(e.c.hour),o===`hour`)break;if(t){if(c+=`:`,c+=B(e.c.minute),o===`minute`)break;s&&(c+=`:`,c+=B(e.c.second))}else{if(c+=B(e.c.minute),o===`minute`)break;s&&(c+=B(e.c.second))}if(o===`second`)break;s&&(!r||e.c.millisecond!==0)&&(c+=`.`,c+=B(e.c.millisecond,3))}return i&&(e.isOffsetFixed&&e.offset===0&&!a?c+=`Z`:e.o<0?(c+=`-`,c+=B(Math.trunc(-e.o/60)),c+=`:`,c+=B(Math.trunc(-e.o%60))):(c+=`+`,c+=B(Math.trunc(e.o/60)),c+=`:`,c+=B(Math.trunc(e.o%60)))),a&&(c+=`[`+e.zone.ianaName+`]`),c}var ri={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ii={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ai={ordinal:1,hour:0,minute:0,second:0,millisecond:0},oi=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],si=[`weekYear`,`weekNumber`,`weekday`,`hour`,`minute`,`second`,`millisecond`],ci=[`year`,`ordinal`,`hour`,`minute`,`second`,`millisecond`];function li(e){let t={year:`year`,years:`year`,month:`month`,months:`month`,day:`day`,days:`day`,hour:`hour`,hours:`hour`,minute:`minute`,minutes:`minute`,quarter:`quarter`,quarters:`quarter`,second:`second`,seconds:`second`,millisecond:`millisecond`,milliseconds:`millisecond`,weekday:`weekday`,weekdays:`weekday`,weeknumber:`weekNumber`,weeksnumber:`weekNumber`,weeknumbers:`weekNumber`,weekyear:`weekYear`,weekyears:`weekYear`,ordinal:`ordinal`}[e.toLowerCase()];if(!t)throw new o(e);return t}function ui(e){switch(e.toLowerCase()){case`localweekday`:case`localweekdays`:return`localWeekday`;case`localweeknumber`:case`localweeknumbers`:return`localWeekNumber`;case`localweekyear`:case`localweekyears`:return`localWeekYear`;default:return li(e)}}function di(e){if(hi===void 0&&(hi=j.now()),e.type!==`iana`)return e.offset(hi);let t=e.name,n=gi.get(t);return n===void 0&&(n=e.offset(hi),gi.set(t,n)),n}function fi(e,t){let n=k(t.zone,j.defaultZone);if(!n.isValid)return $.invalid(Gr(n));let r=D.fromObject(t),i,a;if(F(e.year))i=j.now();else{for(let t of oi)F(e[t])&&(e[t]=ri[t]);let t=ht(e)||gt(e);if(t)return $.invalid(t);let r=di(n);[i,a]=Zr(e,r,n)}return new $({ts:i,zone:n,loc:r,o:a})}function pi(e,t,n){let r=F(n.round)?!0:n.round,i=F(n.rounding)?`trunc`:n.rounding,a=(e,a)=>(e=Dt(e,r||n.calendary?0:2,n.calendary?`round`:i),t.loc.clone(n).relFormatter(n).format(e,a)),o=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return a(o(n.unit),n.unit);for(let e of n.units){let t=o(e);if(Math.abs(t)>=1)return a(t,e)}return a(e>t?-0:0,n.units[n.units.length-1])}function mi(e){let t={},n;return e.length>0&&typeof e[e.length-1]==`object`?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}var hi,gi=new Map,$=class e{constructor(e){let t=e.zone||j.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new M(`invalid input`):null)||(t.isValid?null:Gr(t));this.ts=F(e.ts)?j.now():e.ts;let r=null,i=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,i]=[e.old.c,e.old.o];else{let a=I(e.o)&&!e.old?e.o:t.offset(this.ts);r=Xr(this.ts,a),n=Number.isNaN(r.year)?new M(`invalid input`):null,r=n?null:r,i=n?null:a}}this._zone=t,this.loc=e.loc||D.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new e({})}static local(){let[e,t]=mi(arguments),[n,r,i,a,o,s,c]=t;return fi({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static utc(){let[e,t]=mi(arguments),[n,r,i,a,o,s,c]=t;return e.zone=O.utcInstance,fi({year:n,month:r,day:i,hour:a,minute:o,second:s,millisecond:c},e)}static fromJSDate(t,n={}){let r=L(t)?t.valueOf():NaN;if(Number.isNaN(r))return e.invalid(`invalid input`);let i=k(n.zone,j.defaultZone);return i.isValid?new e({ts:r,zone:i,loc:D.fromObject(n)}):e.invalid(Gr(i))}static fromMillis(t,n={}){if(!I(t))throw new s(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`);return t<-864e13||t>Wr?e.invalid(`Timestamp out of range`):new e({ts:t,zone:k(n.zone,j.defaultZone),loc:D.fromObject(n)})}static fromSeconds(t,n={}){if(I(t))return new e({ts:t*1e3,zone:k(n.zone,j.defaultZone),loc:D.fromObject(n)});throw new s(`fromSeconds requires a numerical input`)}static fromObject(t,n={}){t||={};let r=k(n.zone,j.defaultZone);if(!r.isValid)return e.invalid(Gr(r));let i=D.fromObject(n),o=W(t,ui),{minDaysInFirstWeek:s,startOfWeek:c}=ft(o,i),l=j.now(),u=F(n.specificOffset)?r.offset(l):n.specificOffset,d=!F(o.ordinal),f=!F(o.year),p=!F(o.month)||!F(o.day),m=f||p,ee=o.weekYear||o.weekNumber;if((m||d)&&ee)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(p&&d)throw new a(`Can't mix ordinal dates with month/day`);let h=ee||o.weekday&&!m,g,_,v=Xr(l,u);h?(g=si,_=ii,v=ct(v,s,c)):d?(g=ci,_=ai,v=ut(v)):(g=oi,_=ri);let y=!1;for(let e of g){let t=o[e];F(t)?o[e]=y?_[e]:v[e]:y=!0}let b=(h?pt(o,s,c):d?mt(o):ht(o))||gt(o);if(b)return e.invalid(b);let[te,ne]=Zr(h?lt(o,s,c):d?dt(o):o,u,r),x=new e({ts:te,zone:r,o:ne,loc:i});return o.weekday&&m&&t.weekday!==x.weekday?e.invalid(`mismatched weekday`,`you can't specify both a weekday of ${o.weekday} and a date of ${x.toISO()}`):x.isValid?x:e.invalid(x.invalid)}static fromISO(e,t={}){let[n,r]=Jn(e);return $r(n,r,t,`ISO 8601`,e)}static fromRFC2822(e,t={}){let[n,r]=Yn(e);return $r(n,r,t,`RFC 2822`,e)}static fromHTTP(e,t={}){let[n,r]=Xn(e);return $r(n,r,t,`HTTP`,t)}static fromFormat(t,n,r={}){if(F(t)||F(n))throw new s(`fromFormat requires an input string and a format`);let{locale:i=null,numberingSystem:a=null}=r,[o,c,l,u]=Vr(D.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),t,n);return u?e.invalid(u):$r(o,c,r,`format ${n}`,t,l)}static fromString(t,n,r={}){return e.fromFormat(t,n,r)}static fromSQL(e,t={}){let[n,r]=rr(e);return $r(n,r,t,`SQL`,e)}static invalid(t,r=null){if(!t)throw new s(`need to specify a reason the DateTime is invalid`);let i=t instanceof M?t:new M(t,r);if(j.throwOnInvalid)throw new n(i);return new e({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=Hr(e,D.fromObject(t));return n?n.map(e=>e?e.val:null).join(``):null}static expandFormat(e,t={}){return Rr(G.parseFormat(e),D.fromObject(t)).map(e=>e.val).join(``)}static resetCache(){hi=void 0,gi.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Kr(this).weekYear:NaN}get weekNumber(){return this.isValid?Kr(this).weekNumber:NaN}get weekday(){return this.isValid?Kr(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?qr(this).weekday:NaN}get localWeekNumber(){return this.isValid?qr(this).weekNumber:NaN}get localWeekYear(){return this.isValid?qr(this).weekYear:NaN}get ordinal(){return this.isValid?ut(this.c).ordinal:NaN}get monthShort(){return this.isValid?_r.months(`short`,{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?_r.months(`long`,{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?_r.weekdays(`short`,{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?_r.weekdays(`long`,{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:`short`,locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:`long`,locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,n=At(this.c),r=this.zone.offset(n-e),i=this.zone.offset(n+e),a=this.zone.offset(n-r*t),o=this.zone.offset(n-i*t);if(a===o)return[this];let s=n-a*t,c=n-o*t,l=Xr(s,a),u=Xr(c,o);return l.hour===u.hour&&l.minute===u.minute&&l.second===u.second&&l.millisecond===u.millisecond?[Jr(this,{ts:s}),Jr(this,{ts:c})]:[this]}get isInLeapYear(){return Ot(this.year)}get daysInMonth(){return kt(this.year,this.month)}get daysInYear(){return this.isValid?U(this.year):NaN}get weeksInWeekYear(){return this.isValid?Mt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Mt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:r}=G.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(e=0,t={}){return this.setZone(O.instance(e),t)}toLocal(){return this.setZone(j.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=k(t,j.defaultZone),t.equals(this.zone))return this;if(t.isValid){let e=this.ts;if(n||r){let n=t.offset(this.ts),r=this.toObject();[e]=Zr(r,n,t)}return Jr(this,{ts:e,zone:t})}return e.invalid(Gr(t))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let r=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return Jr(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=W(e,ui),{minDaysInFirstWeek:n,startOfWeek:r}=ft(t,this.loc),i=!F(t.weekYear)||!F(t.weekNumber)||!F(t.weekday),o=!F(t.ordinal),s=!F(t.year),c=!F(t.month)||!F(t.day),l=s||c,u=t.weekYear||t.weekNumber;if((l||o)&&u)throw new a(`Can't mix weekYear/weekNumber units with year/month/day or ordinals`);if(c&&o)throw new a(`Can't mix ordinal dates with month/day`);let d;i?d=lt({...ct(this.c,n,r),...t},n,r):F(t.ordinal)?(d={...this.toObject(),...t},F(t.day)&&(d.day=Math.min(kt(d.year,d.month),d.day))):d=dt({...ut(this.c),...t});let[f,p]=Zr(d,this.o,this.zone);return Jr(this,{ts:f,o:p})}plus(e){if(!this.isValid)return this;let t=X.fromDurationLike(e);return Jr(this,Qr(this,t))}minus(e){if(!this.isValid)return this;let t=X.fromDurationLike(e).negate();return Jr(this,Qr(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},r=X.normalizeUnit(e);switch(r){case`years`:n.month=1;case`quarters`:case`months`:n.day=1;case`weeks`:case`days`:n.hour=0;case`hours`:n.minute=0;case`minutes`:n.second=0;case`seconds`:n.millisecond=0}if(r===`weeks`){if(t){let e=this.loc.getStartOfWeek(),{weekday:t}=this;t<e&&(n.weekNumber=this.weekNumber-1),n.weekday=e}else n.weekday=1}return r===`quarters`&&(n.month=(Math.ceil(this.month/3)-1)*3+1),this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?G.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Ur}toLocaleString(e=f,t={}){return this.isValid?G.create(this.loc.clone(t),e).formatDateTime(this):Ur}toLocaleParts(e={}){return this.isValid?G.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e=`extended`,suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:i=!1,precision:a=`milliseconds`}={}){if(!this.isValid)return null;a=li(a);let o=e===`extended`,s=ti(this,o,a);return oi.indexOf(a)>=3&&(s+=`T`),s+=ni(this,o,t,n,r,i,a),s}toISODate({format:e=`extended`,precision:t=`day`}={}){return this.isValid?ti(this,e===`extended`,li(t)):null}toISOWeekDate(){return ei(this,`kkkk-'W'WW-c`)}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:i=!1,format:a=`extended`,precision:o=`milliseconds`}={}){return this.isValid?(o=li(o),(r&&oi.indexOf(o)>=3?`T`:``)+ni(this,a===`extended`,t,e,n,i,o)):null}toRFC2822(){return ei(this,`EEE, dd LLL yyyy HH:mm:ss ZZZ`,!1)}toHTTP(){return ei(this.toUTC(),`EEE, dd LLL yyyy HH:mm:ss 'GMT'`)}toSQLDate(){return this.isValid?ti(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let r=`HH:mm:ss.SSS`;return(t||e)&&(n&&(r+=` `),t?r+=`z`:e&&(r+=`ZZ`)),ei(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Ur}[Symbol.for(`nodejs.util.inspect.custom`)](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t=`milliseconds`,n={}){if(!this.isValid||!e.isValid)return X.invalid(`created by diffing an invalid DateTime`);let r={locale:this.locale,numberingSystem:this.numberingSystem,...n},i=xt(t).map(X.normalizeUnit),a=e.valueOf()>this.valueOf(),o=br(a?this:e,a?e:this,i,r);return a?o.negate():o}diffNow(t=`milliseconds`,n={}){return this.diff(e.now(),t,n)}until(e){return this.isValid?gr.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,n)<=r&&r<=i.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(t={}){if(!this.isValid)return null;let n=t.base||e.fromObject({},{zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0,i=[`years`,`months`,`days`,`hours`,`minutes`,`seconds`],a=t.unit;return Array.isArray(t.unit)&&(i=t.unit,a=void 0),pi(n,this.plus(r),{...t,numeric:`always`,units:i,unit:a})}toRelativeCalendar(t={}){return this.isValid?pi(t.base||e.fromObject({},{zone:this.zone}),this,{...t,numeric:`auto`,units:[`years`,`months`,`days`],calendary:!0}):null}static min(...t){if(!t.every(e.isDateTime))throw new s(`min requires all arguments be DateTimes`);return St(t,e=>e.valueOf(),Math.min)}static max(...t){if(!t.every(e.isDateTime))throw new s(`max requires all arguments be DateTimes`);return St(t,e=>e.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:r=null,numberingSystem:i=null}=n;return Br(D.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(t,n,r={}){return e.fromFormatExplain(t,n,r)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:r=null}=t;return new zr(D.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),e)}static fromFormatParser(t,n,r={}){if(F(t)||F(n))throw new s(`fromFormatParser requires an input string and a format parser`);let{locale:i=null,numberingSystem:a=null}=r,o=D.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(n.locale))throw new s(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);let{result:c,zone:l,specificOffset:u,invalidReason:d}=n.explainFromTokens(t);return d?e.invalid(d):$r(c,l,r,`format ${n.format}`,t,u)}static get DATE_SHORT(){return f}static get DATE_MED(){return p}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return ee}static get DATE_HUGE(){return h}static get TIME_SIMPLE(){return g}static get TIME_WITH_SECONDS(){return _}static get TIME_WITH_SHORT_OFFSET(){return v}static get TIME_WITH_LONG_OFFSET(){return y}static get TIME_24_SIMPLE(){return b}static get TIME_24_WITH_SECONDS(){return te}static get TIME_24_WITH_SHORT_OFFSET(){return ne}static get TIME_24_WITH_LONG_OFFSET(){return x}static get DATETIME_SHORT(){return re}static get DATETIME_SHORT_WITH_SECONDS(){return ie}static get DATETIME_MED(){return ae}static get DATETIME_MED_WITH_SECONDS(){return oe}static get DATETIME_MED_WITH_WEEKDAY(){return se}static get DATETIME_FULL(){return ce}static get DATETIME_FULL_WITH_SECONDS(){return le}static get DATETIME_HUGE(){return ue}static get DATETIME_HUGE_WITH_SECONDS(){return de}};function _i(e){if($.isDateTime(e))return e;if(e&&e.valueOf&&I(e.valueOf()))return $.fromJSDate(e);if(e&&typeof e==`object`)return $.fromObject(e);throw new s(`Unknown datetime argument: ${e}, of type ${typeof e}`)}e.DateTime=$,e.Duration=X,e.FixedOffsetZone=O,e.IANAZone=C,e.Info=_r,e.Interval=gr,e.InvalidZone=He,e.Settings=j,e.SystemZone=pe,e.VERSION=`3.7.2`,e.Zone=S})),Ht=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronDate=e.DAYS_IN_MONTH=e.DateMathOp=e.TimeUnit=void 0;var t=Vt(),n;(function(e){e.Second=`Second`,e.Minute=`Minute`,e.Hour=`Hour`,e.Day=`Day`,e.Month=`Month`,e.Year=`Year`})(n||(e.TimeUnit=n={}));var r;(function(e){e.Add=`Add`,e.Subtract=`Subtract`})(r||(e.DateMathOp=r={})),e.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var i=class i{#e;#t=null;#n=null;constructor(e,n){let r={zone:n};if(e?e instanceof i?(this.#e=e.#e,this.#t=e.#t,this.#n=e.#n):e instanceof Date?this.#e=t.DateTime.fromJSDate(e,r):typeof e==`number`?this.#e=t.DateTime.fromMillis(e,r):(this.#e=t.DateTime.fromISO(e,r),this.#e.isValid||(this.#e=t.DateTime.fromRFC2822(e,r)),this.#e.isValid||(this.#e=t.DateTime.fromSQL(e,r)),this.#e.isValid||(this.#e=t.DateTime.fromFormat(e,`EEE, d MMM yyyy HH:mm:ss`,r))):this.#e=t.DateTime.local(),!this.#e.isValid)throw Error(`CronDate: unhandled timestamp: ${e}`);n&&n!==this.#e.zoneName&&(this.#e=this.#e.setZone(n))}static#r(e){return e%4==0&&e%100!=0||e%400==0}get dstStart(){return this.#t}set dstStart(e){this.#t=e}get dstEnd(){return this.#n}set dstEnd(e){this.#n=e}addYear(){this.#e=this.#e.plus({years:1})}addMonth(){this.#e=this.#e.plus({months:1}).startOf(`month`)}addDay(){this.#e=this.#e.plus({days:1}).startOf(`day`)}addHour(){this.#e=this.#e.plus({hours:1}).startOf(`hour`)}addMinute(){this.#e=this.#e.plus({minutes:1}).startOf(`minute`)}addSecond(){this.#e=this.#e.plus({seconds:1})}subtractYear(){this.#e=this.#e.minus({years:1})}subtractMonth(){this.#e=this.#e.minus({months:1}).endOf(`month`).startOf(`second`)}subtractDay(){this.#e=this.#e.minus({days:1}).endOf(`day`).startOf(`second`)}subtractHour(){this.#e=this.#e.minus({hours:1}).endOf(`hour`).startOf(`second`)}subtractMinute(){this.#e=this.#e.minus({minutes:1}).endOf(`minute`).startOf(`second`)}subtractSecond(){this.#e=this.#e.minus({seconds:1})}addUnit(e){switch(e){case n.Year:return this.addYear();case n.Month:return this.addMonth();case n.Day:return this.addDay();case n.Hour:return this.addHour();case n.Minute:return this.addMinute();case n.Second:return this.addSecond()}}subtractUnit(e){switch(e){case n.Year:return this.subtractYear();case n.Month:return this.subtractMonth();case n.Day:return this.subtractDay();case n.Hour:return this.subtractHour();case n.Minute:return this.subtractMinute();case n.Second:return this.subtractSecond()}}invokeDateOperation(e,t){if(e===r.Add){this.addUnit(t);return}if(e===r.Subtract){this.subtractUnit(t);return}throw Error(`Invalid verb: ${e}`)}getDate(){return this.#e.day}getFullYear(){return this.#e.year}getDay(){let e=this.#e.weekday;return e===7?0:e}getMonth(){return this.#e.month-1}getHours(){return this.#e.hour}getMinutes(){return this.#e.minute}getSeconds(){return this.#e.second}getMilliseconds(){return this.#e.millisecond}getUTCOffset(){return this.#e.offset}setStartOfDay(){this.#e=this.#e.startOf(`day`)}setEndOfDay(){this.#e=this.#e.endOf(`day`)}getTime(){return this.#e.valueOf()}getUTCDate(){return this.#i().day}getUTCFullYear(){return this.#i().year}getUTCDay(){let e=this.#i().weekday;return e===7?0:e}getUTCMonth(){return this.#i().month-1}getUTCHours(){return this.#i().hour}getUTCMinutes(){return this.#i().minute}getUTCSeconds(){return this.#i().second}toISOString(){return this.#e.toUTC().toISO()}toJSON(){return this.#e.toJSON()}setDate(e){this.#e=this.#e.set({day:e})}setFullYear(e){this.#e=this.#e.set({year:e})}setDay(e){this.#e=this.#e.set({weekday:e})}setMonth(e){this.#e=this.#e.set({month:e+1})}setHours(e){this.#e=this.#e.set({hour:e})}setMinutes(e){this.#e=this.#e.set({minute:e})}setSeconds(e){this.#e=this.#e.set({second:e})}setMilliseconds(e){this.#e=this.#e.set({millisecond:e})}toString(){return this.toDate().toString()}toDate(){return this.#e.toJSDate()}isLastDayOfMonth(){let{day:t,month:n}=this.#e;if(n===2){let r=i.#r(this.#e.year);return t===e.DAYS_IN_MONTH[n-1]-+!r}return t===e.DAYS_IN_MONTH[n-1]}isLastWeekdayOfMonth(){let{day:t,month:n}=this.#e,r;return r=n===2?e.DAYS_IN_MONTH[n-1]-+!i.#r(this.#e.year):e.DAYS_IN_MONTH[n-1],t>r-7}applyDateOperation(e,t,r){if(t===n.Month||t===n.Day){this.invokeDateOperation(e,t);return}let i=this.getHours();this.invokeDateOperation(e,t);let a=this.getHours(),o=a-i;o===2?r!==24&&(this.dstStart=i+1):o===0&&this.getMinutes()===0&&this.getSeconds()===0&&r!==24&&(this.dstEnd=a)}#i(){return this.#e.toUTC()}};e.CronDate=i,e.default=i})),Ut=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronMonth=void 0;var t=Ht(),n=W(),r=1,i=12,a=Object.freeze([]);e.CronMonth=class extends n.CronField{static get min(){return r}static get max(){return i}static get chars(){return a}static get daysInMonth(){return t.DAYS_IN_MONTH}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Wt=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronSecond=void 0;var t=W(),n=0,r=59,i=Object.freeze([]);e.CronSecond=class extends t.CronField{static get min(){return n}static get max(){return r}static get chars(){return i}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}}})),Gt=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(It(),e),n(Lt(),e),n(Rt(),e),n(W(),e),n(zt(),e),n(Bt(),e),n(Ut(),e),n(Wt(),e)})),Kt=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronFieldCollection=void 0;var t=Gt();e.CronFieldCollection=class e{#e;#t;#n;#r;#i;#a;static from(n,r){return new e({second:this.resolveField(t.CronSecond,n.second,r.second),minute:this.resolveField(t.CronMinute,n.minute,r.minute),hour:this.resolveField(t.CronHour,n.hour,r.hour),dayOfMonth:this.resolveField(t.CronDayOfMonth,n.dayOfMonth,r.dayOfMonth),month:this.resolveField(t.CronMonth,n.month,r.month),dayOfWeek:this.resolveField(t.CronDayOfWeek,n.dayOfWeek,r.dayOfWeek)})}static resolveField(e,n,r){return r?r instanceof t.CronField?r:new e(r):n}constructor({second:e,minute:n,hour:r,dayOfMonth:i,month:a,dayOfWeek:o}){if(!e)throw Error(`Validation error, Field second is missing`);if(!n)throw Error(`Validation error, Field minute is missing`);if(!r)throw Error(`Validation error, Field hour is missing`);if(!i)throw Error(`Validation error, Field dayOfMonth is missing`);if(!a)throw Error(`Validation error, Field month is missing`);if(!o)throw Error(`Validation error, Field dayOfWeek is missing`);if(a.values.length===1&&!i.hasLastChar&&o.isWildcard&&!(parseInt(i.values[0],10)<=t.CronMonth.daysInMonth[a.values[0]-1]))throw Error(`Invalid explicit day of month definition`);this.#e=e,this.#t=n,this.#n=r,this.#i=a,this.#a=o,this.#r=i}get second(){return this.#e}get minute(){return this.#t}get hour(){return this.#n}get dayOfMonth(){return this.#r}get month(){return this.#i}get dayOfWeek(){return this.#a}static compactField(e){if(e.length===0)return[];let t=[],n;return e.forEach((e,r,i)=>{if(n===void 0){n={start:e,count:1};return}let a=i[r-1]||n.start,o=i[r+1];if(e===`L`||e===`W`){t.push(n),t.push({start:e,count:1}),n=void 0;return}if(n.step===void 0&&o!==void 0){let t=e-a;if(t<=o-e){n={...n,count:2,end:e,step:t};return}n.step=1}e-(n.end??0)===n.step?(n.count++,n.end=e):(n.count===1?t.push({start:n.start,count:1}):n.count===2?(t.push({start:n.start,count:1}),t.push({start:n.end??a,count:1})):t.push(n),n={start:e,count:1})}),n&&t.push(n),t}static#o(e,t,n){let r=t.step;return r?r===1&&t.start===e.min&&t.end&&t.end>=n?e.hasQuestionMarkChar?`?`:`*`:r!==1&&t.start===e.min&&t.end&&t.end>=n-r+1?`*/${r}`:null:null}static#s(e,t){let n=e.step;if(n===1)return`${e.start}-${e.end}`;let r=e.start===0?e.count-1:e.count;if(!n)throw Error(`Unexpected range step`);if(!e.end)throw Error(`Unexpected range end`);if(n*r>e.end){let t=(t,r)=>{if(typeof e.start!=`number`)throw Error(`Unexpected range start`);return r%n===0?e.start+r:null};if(typeof e.start!=`number`)throw Error(`Unexpected range start`);let r={length:e.end-e.start+1};return Array.from(r,t).filter(e=>e!==null).join(`,`)}return e.end===t-n+1?`${e.start}/${n}`:`${e.start}-${e.end}/${n}`}stringifyField(n){let r=n.max,i=n.values;if(n instanceof t.CronDayOfWeek){r=6;let e=this.#a.values;i=e[e.length-1]===7?e.slice(0,-1):e}n instanceof t.CronDayOfMonth&&(r=this.#i.values.length===1?t.CronMonth.daysInMonth[this.#i.values[0]-1]:n.max);let a=e.compactField(i);if(a.length===1){let t=e.#o(n,a[0],r);if(t)return t}return a.map(i=>{let a=i.count===1?i.start.toString():e.#s(i,r);return n instanceof t.CronDayOfWeek&&n.nthDay>0?`${a}#${n.nthDay}`:a}).join(`,`)}stringify(e=!1){let t=[];return e&&t.push(this.stringifyField(this.#e)),t.push(this.stringifyField(this.#t),this.stringifyField(this.#n),this.stringifyField(this.#r),this.stringifyField(this.#i),this.stringifyField(this.#a)),t.join(` `)}serialize(){return{second:this.#e.serialize(),minute:this.#t.serialize(),hour:this.#n.serialize(),dayOfMonth:this.#r.serialize(),month:this.#i.serialize(),dayOfWeek:this.#a.serialize()}}}})),qt=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpression=e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;var t=Ht();e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=`Out of the time span range`,e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=`Invalid expression, loop limit exceeded`;var n=1e4,r=class r{#e;#t;#n;#r;#i;#a;#o=null;#s=!1;constructor(e,n){this.#e=n,this.#t=n.tz,this.#r=n.startDate?new t.CronDate(n.startDate,this.#t):null,this.#i=n.endDate?new t.CronDate(n.endDate,this.#t):null;let r=n.currentDate??n.startDate;if(r){let e=new t.CronDate(r,this.#t);this.#r&&e.getTime()<this.#r.getTime()?r=this.#r:this.#i&&e.getTime()>this.#i.getTime()&&(r=this.#i)}this.#n=new t.CronDate(r,this.#t),this.#a=e}get fields(){return this.#a}static fieldsToExpression(e,t){return new r(e,t||{})}static#c(e,t){return t.some(t=>t===e)}#l(e,t){return e[t?e.length-1:0]}#u(e){let n=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`;if(this.#o===n)return this.#s;let r=new t.CronDate(e);r.setStartOfDay();let i=new t.CronDate(e);return i.setEndOfDay(),this.#o=n,this.#s=r.getUTCOffset()!==i.getUTCOffset(),this.#s}#d(e,n,r){let i=this.#a.second.values,a=e.getSeconds(),o=this.#a.second.findNearestValue(a,r);if(o!==null){e.setSeconds(o);return}e.applyDateOperation(n,t.TimeUnit.Minute,this.#a.hour.values.length),e.setSeconds(this.#l(i,r))}#f(e,n,r){let i=this.#a.minute.values,a=this.#a.second.values,o=e.getMinutes(),s=this.#a.minute.findNearestValue(o,r);if(s!==null){e.setMinutes(s),e.setSeconds(this.#l(a,r));return}e.applyDateOperation(n,t.TimeUnit.Hour,this.#a.hour.values.length),e.setMinutes(this.#l(i,r)),e.setSeconds(this.#l(a,r))}static#p(e,t){if(!t.isLastWeekdayOfMonth())return!1;let n=t.getDay();return e.some(e=>n===parseInt(e.toString().charAt(0),10)%7)}static#m(e,t){return e<=0||Math.ceil(t.getDate()/7)===e}next(){return this.#v()}prev(){return this.#v(!0)}hasNext(){let e=this.#n;try{return this.#v(),!0}catch{return!1}finally{this.#n=e}}hasPrev(){let e=this.#n;try{return this.#v(!0),!0}catch{return!1}finally{this.#n=e}}take(e){let t=[];if(e>=0)for(let n=0;n<e;n++)try{t.push(this.next())}catch{return t}else for(let n=0;n>e;n--)try{t.push(this.prev())}catch{return t}return t}reset(e){this.#n=new t.CronDate(e||this.#e.currentDate,this.#t)}stringify(e=!1){return this.#a.stringify(e)}includesDate(e){let{second:n,minute:r,hour:i,month:a}=this.#a,o=new t.CronDate(e,this.#t);return!(!n.values.includes(o.getSeconds())||!r.values.includes(o.getMinutes())||!i.values.includes(o.getHours())||!a.values.includes(o.getMonth()+1)||!this.#h(o))}toString(){return this.#e.expression||this.stringify(!0)}#h(e){let t=this.#a.dayOfMonth.isWildcard,n=!t,i=this.#a.dayOfWeek.isWildcard,a=!i,o=r.#c(e.getDate(),this.#a.dayOfMonth.values)||this.#a.dayOfMonth.hasLastChar&&e.isLastDayOfMonth(),s=this.#a.dayOfWeek.nthDay,c=r.#c(e.getDay(),this.#a.dayOfWeek.values)&&r.#m(s,e)||this.#a.dayOfWeek.hasLastChar&&r.#p(this.#a.dayOfWeek.values,e);return!!(n&&a&&(o||c)||o&&!a||t&&!i&&c)}#g(e,n,i){let a=this.#a.hour.values,o=a,s=e.getHours(),c=r.#c(s,a),l=e.dstEnd===s;if(e.dstStart!==null&&e.dstStart===s-1&&r.#c(e.dstStart,a))return!0;if(l&&!i)return e.dstEnd=null,e.applyDateOperation(t.DateMathOp.Add,t.TimeUnit.Hour,o.length),!1;if(c)return!0;e.dstStart=null;let u=this.#a.hour.findNearestValue(s,i);if(u===null)return e.applyDateOperation(n,t.TimeUnit.Day,o.length),!1;if(this.#u(e)){let r=i?s-u:u-s;for(let a=0;a<r&&(e.applyDateOperation(n,t.TimeUnit.Hour,o.length),!(!i&&e.getHours()>=u||i&&e.getHours()<=u));a++);}else e.setHours(u);return e.setMinutes(this.#l(this.#a.minute.values,i)),e.setSeconds(this.#l(this.#a.second.values,i)),!1}#_(t){if(!this.#r&&!this.#i)return;let n=t.getTime();if(this.#r&&n<this.#r.getTime()||this.#i&&n>this.#i.getTime())throw Error(e.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}#v(i=!1){let a=i?t.DateMathOp.Subtract:t.DateMathOp.Add,o=new t.CronDate(this.#n),s=o.getTime(),c=0;for(;++c<n;){if(this.#_(o),!this.#h(o)){o.applyDateOperation(a,t.TimeUnit.Day,this.#a.hour.values.length);continue}if(!r.#c(o.getMonth()+1,this.#a.month.values)){o.applyDateOperation(a,t.TimeUnit.Month,this.#a.hour.values.length);continue}if(this.#g(o,a,i)){if(!r.#c(o.getMinutes(),this.#a.minute.values)){this.#f(o,a,i);continue}if(!r.#c(o.getSeconds(),this.#a.second.values)){this.#d(o,a,i);continue}if(s===o.getTime()&&(a===`Add`||o.getMilliseconds()===0)){o.applyDateOperation(a,t.TimeUnit.Second,this.#a.hour.values.length);continue}break}}if(c>=n)throw Error(e.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return o.getMilliseconds()!==0&&o.setMilliseconds(0),this.#n=o,o}[Symbol.iterator](){return{next:()=>{try{return{value:this.#v(),done:!1}}catch{return{value:void 0,done:!0}}}}}};e.CronExpression=r,e.default=r})),Jt=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.seededRandom=r;function t(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return()=>t>>>0}function n(e){return()=>{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function r(e){return n(e?t(e)():Math.floor(Math.random()*1e10))}})),Yt=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronExpressionParser=e.DayOfWeek=e.Months=e.CronUnit=e.PredefinedExpressions=void 0;var t=Kt(),n=qt(),r=Jt(),i=Gt(),a;(function(e){e[`@yearly`]=`0 0 0 1 1 *`,e[`@annually`]=`0 0 0 1 1 *`,e[`@monthly`]=`0 0 0 1 * *`,e[`@weekly`]=`0 0 0 * * 0`,e[`@daily`]=`0 0 0 * * *`,e[`@hourly`]=`0 0 * * * *`,e[`@minutely`]=`0 * * * * *`,e[`@secondly`]=`* * * * * *`,e[`@weekdays`]=`0 0 0 * * 1-5`,e[`@weekends`]=`0 0 0 * * 0,6`})(a||(e.PredefinedExpressions=a={}));var o;(function(e){e.Second=`Second`,e.Minute=`Minute`,e.Hour=`Hour`,e.DayOfMonth=`DayOfMonth`,e.Month=`Month`,e.DayOfWeek=`DayOfWeek`})(o||(e.CronUnit=o={}));var s;(function(e){e[e.jan=1]=`jan`,e[e.feb=2]=`feb`,e[e.mar=3]=`mar`,e[e.apr=4]=`apr`,e[e.may=5]=`may`,e[e.jun=6]=`jun`,e[e.jul=7]=`jul`,e[e.aug=8]=`aug`,e[e.sep=9]=`sep`,e[e.oct=10]=`oct`,e[e.nov=11]=`nov`,e[e.dec=12]=`dec`})(s||(e.Months=s={}));var c;(function(e){e[e.sun=0]=`sun`,e[e.mon=1]=`mon`,e[e.tue=2]=`tue`,e[e.wed=3]=`wed`,e[e.thu=4]=`thu`,e[e.fri=5]=`fri`,e[e.sat=6]=`sat`})(c||(e.DayOfWeek=c={})),e.CronExpressionParser=class e{static parse(s,c={}){let{strict:l=!1,hashSeed:u}=c,d=(0,r.seededRandom)(u);s=a[s]||s;let f=e.#e(s,l);if(f.dayOfMonth!==`*`&&f.dayOfWeek!==`*`&&l)throw Error(`Cannot use both dayOfMonth and dayOfWeek together in strict mode!`);let p=e.#t(o.Second,f.second,i.CronSecond.constraints,d),m=e.#t(o.Minute,f.minute,i.CronMinute.constraints,d),ee=e.#t(o.Hour,f.hour,i.CronHour.constraints,d),h=e.#t(o.Month,f.month,i.CronMonth.constraints,d),g=e.#t(o.DayOfMonth,f.dayOfMonth,i.CronDayOfMonth.constraints,d),{dayOfWeek:_,nthDayOfWeek:v}=e.#u(f.dayOfWeek),y=e.#t(o.DayOfWeek,_,i.CronDayOfWeek.constraints,d),b=new t.CronFieldCollection({second:new i.CronSecond(p,{rawValue:f.second}),minute:new i.CronMinute(m,{rawValue:f.minute}),hour:new i.CronHour(ee,{rawValue:f.hour}),dayOfMonth:new i.CronDayOfMonth(g,{rawValue:f.dayOfMonth}),month:new i.CronMonth(h,{rawValue:f.month}),dayOfWeek:new i.CronDayOfWeek(y,{rawValue:f.dayOfWeek,nthDayOfWeek:v})});return new n.CronExpression(b,{...c,expression:s})}static#e(e,t){if(t&&!e.length)throw Error(`Invalid cron expression`);e||=`0 * * * * *`;let n=e.trim().split(/\s+/);if(t&&n.length<6)throw Error(`Invalid cron expression, expected 6 fields`);if(n.length>6)throw Error(`Invalid cron expression, too many fields`);let r=[`*`,`*`,`*`,`*`,`*`,`0`];n.length<r.length&&n.unshift(...r.slice(n.length));let[i,a,o,s,c,l]=n;return{second:i,minute:a,hour:o,dayOfMonth:s,month:c,dayOfWeek:l}}static#t(e,t,n,r){if((e===o.Month||e===o.DayOfWeek)&&(t=t.replace(/[a-z]{3}/gi,e=>{e=e.toLowerCase();let t=s[e]||c[e];if(t===void 0)throw Error(`Validation error, cannot resolve alias "${e}"`);return t.toString()})),!n.validChars.test(t))throw Error(`Invalid characters, got value: ${t}`);return t=this.#n(t,n),t=this.#r(t,n,r),this.#i(e,t,n)}static#n(e,t){return e.replace(/[*?]/g,t.min+`-`+t.max)}static#r(e,t,n){let r=n();return e.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(e,n,i,a)=>{if(n&&i&&a){let e=parseInt(n,10),o=parseInt(i,10),s=parseInt(a,10);if(e>o)throw Error(`Invalid range: ${e}-${o}, min > max`);if(s<=0)throw Error(`Invalid step: ${s}, must be positive`);let c=Math.max(e,t.min),l=Math.floor(r*s),u=[];for(let e=Math.floor(c/s)*s+l;e<=o;e+=s)e>=c&&u.push(e);return u.join(`,`)}if(n&&i){let e=parseInt(n,10),t=parseInt(i,10);if(e>t)throw Error(`Invalid range: ${e}-${t}, min > max`);return String(Math.floor(r*(t-e+1))+e)}if(a){let e=parseInt(a,10);if(e<=0)throw Error(`Invalid step: ${e}, must be positive`);let n=Math.floor(r*e),i=[];for(let r=Math.floor(t.min/e)*e+n;r<=t.max;r+=e)r>=t.min&&i.push(r);return i.join(`,`)}return String(Math.floor(r*(t.max-t.min+1)+t.min))})}static#i(t,n,r){let i=[];function a(n,r){if(Array.isArray(n))i.push(...n);else if(e.#d(r,n))i.push(n);else{let e=parseInt(n.toString(),10);if(!(e>=r.min&&e<=r.max))throw Error(`Constraint error, got value ${n} expected range ${r.min}-${r.max}`);i.push(t===o.DayOfWeek?e%7:n)}}return n.split(`,`).forEach(n=>{if(!(n.length>0))throw Error(`Invalid list value format`);a(e.#a(t,n,r),r)}),i}static#a(t,n,r){let i=n.split(`/`);if(i.length>2)throw Error(`Invalid repeat: ${n}`);return i.length===2?(i[0].includes(`-`)||(i[0]=`${i[0]}-${r.max}`),e.#l(t,i[0],parseInt(i[1],10),r)):e.#l(t,n,1,r)}static#o(e,t,n){if(!(!isNaN(e)&&!isNaN(t)&&e>=n.min&&t<=n.max))throw Error(`Constraint error, got range ${e}-${t} expected range ${n.min}-${n.max}`);if(e>t)throw Error(`Invalid range: ${e}-${t}, min(${e}) > max(${t})`)}static#s(e){if(!(!isNaN(e)&&e>0))throw Error(`Constraint error, cannot repeat at every ${e} time.`)}static#c(e,t,n,r){let i=[];e===o.DayOfWeek&&n%7==0&&i.push(0);for(let e=t;e<=n;e+=r)i.indexOf(e)===-1&&i.push(e);return i}static#l(e,t,n,r){let i=t.split(`-`);if(i.length<=1)return isNaN(+t)?t:+t;let[a,o]=i.map(e=>parseInt(e,10));return this.#o(a,o,r),this.#s(n),this.#c(e,a,o,n)}static#u(e){let t=e.split(`#`);if(t.length<=1)return{dayOfWeek:t[0]};let n=+t[t.length-1],r=e.match(/([,\-/])/);if(r!==null)throw Error(`Constraint error, invalid dayOfWeek \`#\` and \`${r?.[0]}\` special characters are incompatible`);if(!(t.length<=2&&!isNaN(n)&&n>=1&&n<=5))throw Error(`Constraint error, invalid dayOfWeek occurrence number (#)`);return{dayOfWeek:t[0],nthDayOfWeek:n}}static#d(e,t){return e.chars.some(e=>t.toString().includes(e))}}})),Xt=e(((e,t)=>{t.exports={}})),Zt=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=void 0;var t=Yt();e.CronFileParser=class e{static async parseFile(t){let{readFile:n}=Xt(),r=await n(t,`utf8`);return e.#e(r)}static parseFileSync(t){let{readFileSync:n}=Xt(),r=n(t,`utf8`);return e.#e(r)}static#e(t){let n=t.split(`
|
|
2
|
+
`),r={variables:{},expressions:[],errors:{}};for(let t of n){let n=t.trim();if(n.length===0||n.startsWith(`#`))continue;let i=n.match(/^(.*)=(.*)$/);if(i){let[,e,t]=i;r.variables[e]=t.replace(/["']/g,``);continue}try{let t=e.#t(n);r.expressions.push(t.interval)}catch(e){r.errors[n]=e}}return r}static#t(e){let n=e.split(` `);return{interval:t.CronExpressionParser.parse(n.slice(0,5).join(` `)),command:n.slice(5,n.length)}}}})),Qt=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=e.CronExpressionParser=e.CronExpression=e.CronFieldCollection=e.CronDate=void 0;var r=Yt(),i=Ht();Object.defineProperty(e,"CronDate",{enumerable:!0,get:function(){return i.CronDate}});var a=Kt();Object.defineProperty(e,"CronFieldCollection",{enumerable:!0,get:function(){return a.CronFieldCollection}});var o=qt();Object.defineProperty(e,"CronExpression",{enumerable:!0,get:function(){return o.CronExpression}});var s=Yt();Object.defineProperty(e,"CronExpressionParser",{enumerable:!0,get:function(){return s.CronExpressionParser}});var c=Zt();Object.defineProperty(e,"CronFileParser",{enumerable:!0,get:function(){return c.CronFileParser}}),n(Gt(),e),e.default=r.CronExpressionParser}))(),$t=/^([01]\d|2[0-3]):([0-5]\d)$/,en=1e3,tn=`@interval:`;function nn(e){return Number.isInteger(e)&&e>=0&&e<=59}function rn(e){return Number.isInteger(e)&&e>=1&&e<=1e3}function an(e){if(!rn(e))throw Error(`interval minutes must be an integer between 1 and ${en}`);return`${tn}${e}`}function G(e){let t=/^@interval:(\d+)$/.exec(e);if(!t)return null;let n=Number(t[1]);return rn(n)?n:null}function on(e){if(!nn(e))throw Error(`minute must be an integer between 0 and 59`);return`${e} * * * *`}function K(e){let t=e.trim();if(!t)return!1;try{return Intl.DateTimeFormat(void 0,{timeZone:t}),!0}catch{return!1}}function sn(){return Intl.DateTimeFormat().resolvedOptions().timeZone}function cn(e,t,n=new Date().getDay()){if(e===`interval`)throw Error(`interval presets must be compiled with compileIntervalCron`);if(e===`hourly`)return on(0);let r=t.trim().match($t);if(!r)throw Error(`time must be HH:mm`);let i=Number(r[1]),a=Number(r[2]);return e===`daily`?`${a} ${i} * * *`:e===`weekdays`?`${a} ${i} * * 1-5`:`${a} ${i} * * ${n}`}function ln(e){let t=e.trim(),n=G(t);if(n!==null)return{preset:`interval`,time:``,intervalMinutes:n};let r=t.match(/^(\d{1,2}) \* \* \* \*$/);if(r){let e=Number(r[1]);return nn(e)?{preset:`hourly`,time:``,minute:e}:null}let i=t.match(/^(\d{1,2}) (\d{1,2}) \* \* (\*|[0-6]|1-5)$/);if(!i)return null;let a=Number(i[1]),o=Number(i[2]),s=i[3],c=`${String(o).padStart(2,`0`)}:${String(a).padStart(2,`0`)}`;return s===`*`?{preset:`daily`,time:c}:s===`1-5`?{preset:`weekdays`,time:c}:{preset:`weekly`,time:c,dayOfWeek:Number(s)}}function un(e){let t=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],n=dn(e.time);if(e.preset===`interval`){let t=e.intervalMinutes??5;return t===1?`Every minute`:`Every ${t} minutes`}if(e.preset===`hourly`){let t=e.minute??0;return t>0?`Every hour at :${String(t).padStart(2,`0`)}`:`Every hour`}return e.preset===`daily`?`Every day at ${n}`:e.preset===`weekdays`?`Every weekday at ${n}`:`Every ${t[e.dayOfWeek??0]??`Sunday`} at ${n}`}function dn(e){let t=e.match($t);if(!t)return e;let n=Number(t[1]),r=t[2],i=n>=12?`PM`:`AM`;return`${n%12==0?12:n%12}:${r} ${i}`}function fn(e){return e*6e4}function pn(e,t){let n=fn(e);return(Math.floor(t.getTime()/n)+1)*n}function mn(e,t,n=new Date){if(!K(t))return null;let r=G(e);if(r!==null)return new Date(pn(r,n));try{return Qt.CronExpressionParser.parse(e,{tz:t,currentDate:n}).next().toDate()}catch{return null}}function hn(e,t=new Date){let n=e.getTime()-t.getTime();if(n<=0)return`Next run soon`;let r=Math.round(n/6e4);if(r<60)return`Next run in ${r} min`;let i=Math.round(r/60);return i<48?`Next run in ${i} hours`:`Next run in ${Math.round(i/24)} days`}var gn=`Set a Default model alias in Settings → Default Models before scheduling a task`,_n=/^[a-zA-Z0-9._:-]+$/,vn=[{key:`task.added`,label:`Task Added`},{key:`task.changed`,label:`Task Changed`}];function yn(e){let t=e.trim();return t?t.length>100?`eventKey must be 100 characters or fewer`:_n.test(t)?null:`eventKey may only contain letters, numbers, dots, colons, underscores, and hyphens`:`eventKey is required for event triggers`}function q(e){return e!=null&&e.trim()!==``}function bn(e){return q(e.scheduledAt)?`scheduledAt requires triggerType 'schedule'`:q(e.scheduleCron)?`scheduleCron requires triggerType 'schedule'`:q(e.timezone)?`timezone requires triggerType 'schedule'`:q(e.eventKey)?`eventKey requires triggerType 'event'`:null}function xn(e){let t=e.scheduledAt?.trim()??null,n=e.scheduleCron?.trim()??null,r=e.timezone?.trim()??null;return t&&n?`Provide either scheduledAt or scheduleCron, not both`:!t&&!n?`scheduledAt or scheduleCron is required for schedule triggers`:r?K(r)?t&&Number.isNaN(Date.parse(t))?`scheduledAt must be an ISO timestamp`:q(e.eventKey)?`eventKey is only allowed for event triggers`:null:`timezone must be a valid IANA timezone`:`timezone is required for schedule triggers`}function Sn(e){return yn(e.eventKey??``)||(q(e.scheduledAt)?`scheduledAt is only allowed for schedule triggers`:q(e.scheduleCron)?`scheduleCron is only allowed for schedule triggers`:q(e.timezone)?`timezone is only allowed for schedule triggers`:null)}function Cn(e,t){return e===`schedule`?te(t)?null:gn:null}function wn(e){let t=e.triggerType??null;return t===null?bn(e):t===`schedule`?xn(e):Sn(e)}new Map(Object.entries({"tool/before-execute":`decision`,"tool/authorize":`authorize`,"tool/after-execute":`transform`,"request/before":`transform`,"session/event":`observe`,"turn/end":`observe`}));export{de as $,nt as A,Fe as B,dt as C,Ye as D,Xe as E,He as F,Ee as G,Oe as H,k as I,Ce as J,we as K,Re as L,M,qe as N,Qe as O,ze as P,fe as Q,D as R,St as S,it as T,De as U,Ie as V,Te as W,ve as X,C as Y,ye as Z,jt as _,i as _t,on as a,f as at,B as b,un as c,h as ct,mn as d,v as dt,me as et,rn as f,x as ft,At as g,o as gt,Ft as h,se as ht,en as i,p as it,tt as j,et as k,hn as l,re as lt,Pt as m,ie as mt,Cn as n,he as nt,an as o,d as ot,ln as p,y as pt,xe as q,wn as r,ge as rt,cn as s,g as st,vn as t,ue as tt,sn as u,ne as ut,yt as v,u as vt,N as w,kt as x,L as y,Le as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{o as t,t as n}from"./react-vendor-D61Uve5n.js";import{
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{o as t,t as n}from"./react-vendor-D61Uve5n.js";import{c as r}from"./utils-CqsIXqSC.js";import{l as i,u as a}from"./dist-AbkJBHH5.js";var o=e(t(),1),s=n(),c=`focusScope.autoFocusOnMount`,l=`focusScope.autoFocusOnUnmount`,u={bubbles:!1,cancelable:!0},d=`FocusScope`,f=o.forwardRef((e,t)=>{let{loop:n=!1,trapped:d=!1,onMountAutoFocus:f,onUnmountAutoFocus:g,..._}=e,[v,x]=o.useState(null),S=i(f),w=i(g),T=o.useRef(null),E=r(t,e=>x(e)),D=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(d){let e=function(e){if(D.paused||!v)return;let t=e.target;v.contains(t)?T.current=t:y(T.current,{select:!0})},t=function(e){if(D.paused||!v)return;let t=e.relatedTarget;t!==null&&(v.contains(t)||y(T.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&y(v)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return v&&r.observe(v,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[d,v,D.paused]),o.useEffect(()=>{if(v){b.add(D);let e=document.activeElement;if(!v.contains(e)){let t=new CustomEvent(c,u);v.addEventListener(c,S),v.dispatchEvent(t),t.defaultPrevented||(p(C(h(v)),{select:!0}),document.activeElement===e&&y(v))}return()=>{v.removeEventListener(c,S),setTimeout(()=>{let t=new CustomEvent(l,u);v.addEventListener(l,w),v.dispatchEvent(t),t.defaultPrevented||y(e??document.body,{select:!0}),v.removeEventListener(l,w),b.remove(D)},0)}}},[v,S,w,D]);let O=o.useCallback(e=>{if(!n&&!d||D.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){let t=e.currentTarget,[i,a]=m(t);i&&a?!e.shiftKey&&r===a?(e.preventDefault(),n&&y(i,{select:!0})):e.shiftKey&&r===i&&(e.preventDefault(),n&&y(a,{select:!0})):r===t&&e.preventDefault()}},[n,d,D.paused]);return(0,s.jsx)(a.div,{tabIndex:-1,..._,ref:E,onKeyDown:O})});f.displayName=d;function p(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(y(r,{select:t}),document.activeElement!==n)return}function m(e){let t=h(e);return[g(t,e),g(t.reverse(),e)]}function h(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function g(e,t){for(let n of e)if(!_(n,{upTo:t}))return n}function _(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function v(e){return e instanceof HTMLInputElement&&`select`in e}function y(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&v(e)&&t&&e.select()}}var b=x();function x(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=S(e,t),e.unshift(t)},remove(t){e=S(e,t),e[0]?.resume()}}}function S(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function C(e){return e.filter(e=>e.tagName!==`A`)}var w=0;function T(){o.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??E()),document.body.insertAdjacentElement(`beforeend`,e[1]??E()),w++,()=>{w===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),w--}},[])}function E(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var D=function(){return D=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},D.apply(this,arguments)};function O(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ee(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var k=`right-scroll-bar-position`,A=`width-before-scroll-bar`,te=`with-scroll-bars-hidden`,ne=`--removed-body-scroll-bar-size`;function j(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function re(e,t){var n=(0,o.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ie=typeof window<`u`?o.useLayoutEffect:o.useEffect,ae=new WeakMap;function oe(e,t){var n=re(t||null,function(t){return e.forEach(function(e){return j(e,t)})});return ie(function(){var t=ae.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||j(e,null)}),i.forEach(function(e){r.has(e)||j(e,a)})}ae.set(n,e)},[e]),n}function se(e){return e}function ce(e,t){t===void 0&&(t=se);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function le(e){e===void 0&&(e={});var t=ce(null);return t.options=D({async:!0,ssr:!1},e),t}var ue=function(e){var t=e.sideCar,n=O(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return o.createElement(r,D({},n))};ue.isSideCarExport=!0;function de(e,t){return e.useMedium(t),ue}var fe=le(),M=function(){},N=o.forwardRef(function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:M,onWheelCapture:M,onTouchMoveCapture:M}),i=r[0],a=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=O(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=oe([n,t]),w=D(D({},x),i);return o.createElement(o.Fragment,null,d&&o.createElement(S,{sideCar:fe,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?o.cloneElement(o.Children.only(c),D(D({},w),{ref:C})):o.createElement(y,D({},w,{className:l,ref:C}),c))});N.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},N.classNames={fullWidth:A,zeroRight:k};var pe=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function me(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=pe();return t&&e.setAttribute(`nonce`,t),e}function he(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ge(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var _e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=me())&&(he(t,n),ge(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ve=function(){var e=_e();return function(t,n){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},P=function(){var e=ve();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ye={left:0,top:0,right:0,gap:0},F=function(e){return parseInt(e||``,10)||0},be=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[F(n),F(r),F(i)]},xe=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ye;var t=be(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Se=P(),I=`data-scroll-locked`,Ce=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
2
|
.${te} {
|
|
3
3
|
overflow: hidden ${r};
|
|
4
4
|
padding-right: ${s}px ${r};
|
package/dist/public/assets/{explorer-file-drop-CEbBlDEp.js → explorer-file-drop-CzyAqZgf.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,o as n,t as r}from"./react-vendor-D61Uve5n.js";import{
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t,o as n,t as r}from"./react-vendor-D61Uve5n.js";import{x as i}from"./dist-v_MvKS2-.js";import{r as a}from"./store-W78TGOIO.js";import{Vr as o,ni as s}from"./api-C4ukGdyH.js";import{n as c}from"./main-tab-context-Dsp4OYi9.js";import{f as l}from"./api-B_GSyYGh.js";var u=e(n(),1),d=t(),f=i(`gitops.timing`);function p(e){let t=[],n=performance.now();async function r(n,r){let i=performance.now();try{return await r()}finally{let r=Math.round(performance.now()-i);t.push({step:n,duration:r}),f.debug(`${e} step`,{step:n,duration:r})}}function i(n,r,i){t.push({step:n,duration:r}),f.debug(`${e} step`,{step:n,duration:r,...i?{detail:i}:{}})}function a(r){let i=Math.round(performance.now()-n),a=t.reduce((e,t)=>t.duration>=e.duration?t:e,{step:`none`,duration:0}),o=t.map(e=>`${e.step}:${e.duration}`).join(` `);f.debug(`${e} summary`,{duration:i,slowestStep:a.step,slowestDuration:a.duration,breakdown:o,...r?{detail:r}:{}})}return{step:r,record:i,summary:a}}var m=i(`gitops.unified-status`),h=3e4,g={hasChanges:!1,changedFilesCount:0,hasUnpushedCommits:!1,currentBranch:``,hasRemoteBranch:!1,isOnGitHub:!1,remoteUrl:``,canCreateRepo:!1,repoUrl:void 0,status:`Up to date`,defaultBranch:null,prExists:!1,prUrl:void 0,prState:void 0,commitsAheadOfDefault:!1,defaultBranchAhead:0,defaultBranchBehind:0},_=new Map,v=new Map;function y(e,t){let n=_.get(e);if(n)for(let e of n)e(t)}function b(e,t){let n=_.get(e);return n||(n=new Set,_.set(e,n)),n.add(t),()=>{n.delete(t),n.size===0&&_.delete(e)}}function x(e){return`unified-git-status-${e}`}async function S(){let e=[..._.keys()];await Promise.all(e.map(function(e){return C(e)}))}async function C(e){if(e){s.invalidate(x(e));try{y(e,await o(e,!1,!1))}catch(e){m.error(`Failed to refresh unified git status from control channel`,e)}}}function w(e){return s.getSync(x(e))}function T(e){let[t,n]=(0,u.useState)(g),[r,i]=(0,u.useState)(!1),a=(0,u.useRef)(void 0),c=(0,u.useRef)(0),l=(0,u.useCallback)(e=>{(0,u.startTransition)(()=>{n(e)})},[]),d=(0,u.useRef)(l);d.current=l;let f=(0,u.useCallback)(async(t=!1)=>{if(!e)return;let n=++c.current,r=p(`hook fetch thread=${e} force=${t}`),a=setTimeout(()=>{c.current===n&&i(!0)},100);try{let i=x(e),a=performance.now(),u=w(e);r.record(`local-cache-check`,Math.round(performance.now()-a),`result=${u?`hit`:`miss`}`),t&&(s.invalidate(i),r.record(`invalidate-local-cache`,0));let d=await r.step(`ttl-cache-get`,()=>s.get(i,()=>o(e,t,!1),h));if(c.current!==n){r.summary(`stale-request`);return}await r.step(`update-state`,async()=>{l(d),y(e,d)}),r.summary(`branch=${d.currentBranch} changes=${d.changedFilesCount} prExists=${d.prExists}`)}catch(e){if(c.current!==n)return;m.error(`Failed to fetch unified git status`,e),r.summary(`error`)}finally{clearTimeout(a),c.current===n&&i(!1)}},[e,l]),_=(0,u.useRef)(f);return _.current=f,(0,u.useEffect)(()=>{if(e)return b(e,e=>{d.current(e)})},[e]),(0,u.useEffect)(()=>{if(!e)return;let t=0;function n(){if(document.visibilityState!==`visible`)return;let e=Date.now();e-t<500||(t=e,_.current(!1))}return document.addEventListener(`visibilitychange`,n),window.addEventListener(`focus`,n),()=>{document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`focus`,n)}},[e]),(0,u.useEffect)(()=>{if(c.current+=1,i(!1),!e){a.current=void 0,(0,u.startTransition)(()=>{n(g)});return}let t=a.current!==e,r=w(e);t&&(m.debug(`Active thread changed`,{previousThreadId:a.current??`none`,threadId:e}),a.current=e),(0,u.startTransition)(()=>{n(r??g)}),m.debug(`Loaded unified git status from local cache`,{threadId:e,cache:r?`hit`:`miss`});let o=e,s=!1;function l(){if(s)return;let e=v.get(o);if(e){m.debug(`Initial unified git status fetch already in flight`,{threadId:o}),e.then(()=>{if(s)return;let e=w(o);e&&d.current(e)});return}m.debug(`Starting initial unified git status fetch`,{threadId:o});let t=_.current(!1).finally(()=>{m.debug(`Initial unified git status fetch settled`,{threadId:o}),v.delete(o)});v.set(o,t)}return l(),()=>{s=!0}},[e]),(0,u.useMemo)(()=>({hasChanges:t.hasChanges,changedFilesCount:t.changedFilesCount,hasUnpushedCommits:t.hasUnpushedCommits,hasRemoteBranch:t.hasRemoteBranch,currentBranch:t.currentBranch,isOnGitHub:t.isOnGitHub,remoteUrl:t.remoteUrl,canCreateRepo:t.canCreateRepo,repoUrl:t.repoUrl,status:t.status,defaultBranch:t.defaultBranch,prExists:t.prExists,prUrl:t.prUrl,prState:t.prState,commitsAheadOfDefault:t.commitsAheadOfDefault,defaultBranchAhead:t.defaultBranchAhead,defaultBranchBehind:t.defaultBranchBehind,isRefreshing:r,fetchUnifiedStatus:f}),[t,r,f])}var E=r(),D=(0,u.createContext)(void 0);function O(e){let t=(0,d.c)(8),{threadId:n,fetchUnifiedStatus:r}=e,i=a(j),o=a(A),s=a(k),{triggerReviewRefresh:l}=c(),f,p;return t[0]!==o||t[1]!==r||t[2]!==i||t[3]!==s||t[4]!==n||t[5]!==l?(f=()=>{if(n&&n===s&&!i&&o.includes(n)){let e=setTimeout(()=>{r(!0),l(n)},1e3);return()=>clearTimeout(e)}},p=[n,s,i,o,r,l],t[0]=o,t[1]=r,t[2]=i,t[3]=s,t[4]=n,t[5]=l,t[6]=f,t[7]=p):(f=t[6],p=t[7]),(0,u.useEffect)(f,p),null}function k(e){return e.selectedThreadId}function A(e){return e.completedThreadIds}function j(e){return e.isStreaming}function M(e){let t=(0,d.c)(7),{threadId:n,children:r}=e,i=T(n),a;t[0]!==n||t[1]!==i.fetchUnifiedStatus?(a=(0,E.jsx)(O,{threadId:n,fetchUnifiedStatus:i.fetchUnifiedStatus}),t[0]=n,t[1]=i.fetchUnifiedStatus,t[2]=a):a=t[2];let o;return t[3]!==r||t[4]!==a||t[5]!==i?(o=(0,E.jsxs)(D.Provider,{value:i,children:[a,r]}),t[3]=r,t[4]=a,t[5]=i,t[6]=o):o=t[6],o}function N(){let e=(0,u.useContext)(D);if(e===void 0)throw Error(`useGitStatus must be used within a GitStatusProvider`);return e}function P(e){return e?Array.from(e.types).includes(`Files`):!1}function F(e){let t=Array.from(e.items??[]);if(t.length===0)return{files:Array.from(e.files),skippedFolders:0};let n=[],r=0;for(let e of t){if(e.kind!==`file`)continue;if(e.webkitGetAsEntry?.()?.isDirectory){r+=1;continue}let t=e.getAsFile();t&&n.push(t)}return{files:n,skippedFolders:r}}function I(e){return e?`the "${e}/" folder`:`the repository root`}function L(e){let t=e.slice(0,3).map(e=>`"${e.name}"`),n=e.length>3?` and ${e.length-3} more`:``;return`${t.join(`, `)}${n}`}async function R(e,t,n){let r=await Promise.allSettled(n.map(n=>l(e,t,n))),i=[],a=[];for(let e=0;e<r.length;e+=1){let t=r[e];t.status===`fulfilled`?i.push(n[e]):a.push(t.reason)}return{copied:i,failures:a}}function z(e,t,n){if(n.length===0)return{title:t===1?`File copied`:`Files copied`,description:`Copied ${L(e.files)} into ${I(e.dirPath)}.`};let r=n[0];return{title:t>0?`Some files were not copied`:`Copy failed`,description:r instanceof Error?r.message:`Failed to copy the dropped file.`,variant:`destructive`}}export{F as a,N as c,T as d,L as i,S as l,R as n,P as o,I as r,M as s,z as t,C as u};
|
package/dist/public/assets/{explorer-monaco-editor-Bgo9Y1cP.js → explorer-monaco-editor-ChJZBFy5.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{o as t,t as n}from"./react-vendor-D61Uve5n.js";import"./dist-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{o as t,t as n}from"./react-vendor-D61Uve5n.js";import"./dist-v_MvKS2-.js";import{t as r}from"./monaco-setup-B4buJsSY.js";var i=e(t(),1),a=n();function o(e){e?.getModel()?.dispose(),e?.dispose()}function s(e,t,n){t&&e&&(e.focus(),n?.())}function c({language:e,value:t,theme:n,autoFocus:c=!1,onChange:l,onReady:u}){let d=(0,i.useRef)(null),f=(0,i.useRef)(u);f.current=u,(0,i.useEffect)(()=>()=>{o(d.current),d.current=null},[]),(0,i.useEffect)(()=>{s(d.current,c,f.current)},[c]);function p(e){d.current=e,s(e,c,f.current)}return(0,a.jsx)(r,{height:`100%`,language:e,value:t,onChange:function(e){l(e??``)},onMount:p,theme:n,options:{minimap:{enabled:!1},scrollBeyondLastLine:!1,wordWrap:`on`,automaticLayout:!0,fontSize:14,lineNumbers:`on`,renderLineHighlight:`line`,scrollbar:{vertical:`auto`,horizontal:`auto`}}})}export{c as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/explorer-tree-BA12VLz_.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/react-vendor-D61Uve5n.js","assets/dist-v_MvKS2-.js","assets/utils-CqsIXqSC.js","assets/chevron-down-Bpo4ncEN.js","assets/createLucideIcon-2A3hmV_e.js","assets/chevron-right-Dga3q1bZ.js","assets/dialog-D_12AsZd.js","assets/x-ByOPrz5I.js","assets/dist-DfnQ9YJh.js","assets/dist-AbkJBHH5.js","assets/es2015-eNVkKfFF.js","assets/use-browser-overlay-block-CO1pUEAZ.js","assets/button-DDaJhJP1.js","assets/dist-B-h6Wj39.js","assets/scroll-area-CGEZ1gAL.js","assets/dist-Dx8OsX8-.js","assets/use-toast-CKgZ8YeP.js","assets/chat-dock-context-a2bV9cnz.js","assets/store-W78TGOIO.js","assets/api-C4ukGdyH.js","assets/random-uuid-Dc3UrwVo.js","assets/explorer-tab-context-BwR8CM8l.js","assets/alert-dialog-BcZULJsX.js","assets/explorer-file-drop-CzyAqZgf.js","assets/main-tab-context-Dsp4OYi9.js","assets/terminal-output-activity-D_FxlE-L.js","assets/api-B_GSyYGh.js","assets/index-CoY8DilQ.js","assets/chunk-QFMPRPBF-Cy-_pFSM.js","assets/useBaseQuery-yghQO052.js","assets/QueryClientProvider-CYXTUmYo.js","assets/useInfiniteQuery-BpKy1sCq.js","assets/use-account-settings-query-C-zOdREq.js","assets/useQuery-DWt09r77.js","assets/query-keys-BwswkbMn.js","assets/chat-handlers-context-2xSKzkKa.js","assets/create-project-workspace-DSTTGom_.js","assets/task-utils-BZPVmvY4.js","assets/suspense-resource-DzlMlIgR.js","assets/remote-media-url-CyuN31H_.js","assets/use-open-chat-dock-panel-DqfWJ8e8.js","assets/dist-CgbWuuq4.js","assets/markdown-renderer-D2VcKU4g.js","assets/explorer-media-CRzhs0NW.js","assets/check-skFQ1X72.js","assets/copy-bi9iX3xn.js","assets/download-CWhQNGlF.js","assets/external-link-Dcikmdm_.js","assets/minus-CgQcbBQT.js","assets/play-Dn1mbRpD.js","assets/plus-DoMzejDu.js","assets/rotate-ccw-Dthg8Pv6.js","assets/tooltip-CqwCZ7wt.js","assets/dist-2xH_pFmV.js","assets/chevron-up-BxgjX7B3.js","assets/circle-alert-CC2eO3yt.js","assets/circle-DQwOli2u.js","assets/grip-vertical-_jCIw8Mw.js","assets/loader-circle-CrqRIqdA.js","assets/square-CtxvwmM2.js","assets/label-BCs5CZEs.js","assets/dist-pCVg1Jdl.js","assets/dist-DOz2WXwX.js","assets/dist-JGbQ_EJY.js","assets/progress-indicator-hJ74ac5W.js","assets/use-projects-CizIH2Fa.js","assets/use-suspense-resource-uCX26gOk.js","assets/dist-CkGJjZXY.js","assets/select-BR2pG61R.js","assets/mcp-manager-D1HmLT3t.js","assets/index-D14wLW4o.css","assets/explorer-view-Daxl93oM.js","assets/async-error-boundary-FT8_xvjy.js","assets/card-DAc45J1v.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{o as t,r as n,t as r}from"./react-vendor-D61Uve5n.js";import{U as i}from"./dist-v_MvKS2-.js";import{r as a}from"./store-W78TGOIO.js";import{t as o}from"./utils-CqsIXqSC.js";import{t as s}from"./use-toast-CKgZ8YeP.js";import{n as ee}from"./explorer-tab-context-BwR8CM8l.js";import{t as te}from"./progress-indicator-hJ74ac5W.js";import{a as ne,n as c,o as l,s as u,t as d}from"./explorer-file-drop-CzyAqZgf.js";import{At as f,E as p,Lt as m,V as h,jt as g,kt as _,xn as v}from"./index-CoY8DilQ.js";import{t as y}from"./async-error-boundary-FT8_xvjy.js";var b=e(t(),1),x=r(),S=(0,b.lazy)(()=>n(()=>import(`./explorer-tree-BA12VLz_.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72]))),C=(0,b.lazy)(()=>n(()=>import(`./explorer-view-Daxl93oM.js`),__vite__mapDeps([73,1,2,3,20,4,21,44,35,31,32,45,46,6,47,48,49,50,8,9,10,11,12,13,51,52,53,14,54,55,18,23,42,30,19,22,26,27,36,41,60,66,40,68,28,29,33,34,37,38,39,43,5,7,56,57,58,59,61,15,62,17,63,64,65,16,24,67,25,69,70,71,72,74,75])));function w({instanceId:e}){let t=a(e=>e.selectedThreadId),n=m(),[r,w]=(0,b.useState)(null),[T,E]=(0,b.useState)(!0),[D,O]=(0,b.useState)(null),[k,A]=(0,b.useState)(!1),[j,M]=(0,b.useState)(!1),N=(0,b.useRef)(0),{pendingExplorerPath:P,setPendingExplorerPath:F,explorerClearPath:I,setExplorerClearPath:L,triggerExplorerRefresh:R}=ee();(0,b.useEffect)(()=>{function e(e){l(e.dataTransfer)&&e.preventDefault()}return window.addEventListener(`dragover`,e),window.addEventListener(`drop`,e),()=>{window.removeEventListener(`dragover`,e),window.removeEventListener(`drop`,e)}},[]),(0,b.useEffect)(()=>{E(!0)},[t]);let z=(0,b.useCallback)(e=>{w(e),n&&E(!1)},[n]),B=(0,b.useCallback)(()=>{E(!0)},[]),V=(0,b.useCallback)(e=>{w(e),n&&E(!1)},[n]);(0,b.useEffect)(()=>{if(!P)return;let e=P.split(`/`).pop()??P;w({name:e,path:P,type:`file`}),n&&E(!1),F(null)},[n,P,F]),(0,b.useEffect)(()=>{I&&(r&&(r.path===I||r.path.startsWith(I+`/`))&&(w(null),n&&E(!0)),L(null))},[I,n,r,L]);function H(){N.current=0,M(!1)}function U(e){l(e.dataTransfer)&&(N.current+=1,M(!0))}function W(e){l(e.dataTransfer)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`)}function G(e){l(e.dataTransfer)&&(N.current=Math.max(0,N.current-1),N.current===0&&M(!1))}function K(e){if(!l(e.dataTransfer))return;e.preventDefault(),H();let{files:t,skippedFolders:n}=ne(e.dataTransfer);n>0&&s({title:`Folders skipped`,description:`Only files can be copied. Drop individual files instead of folders.`}),t.length!==0&&O({files:t,dirPath:``})}let q=(0,b.useCallback)((e,t)=>{N.current=0,M(!1),O({files:e,dirPath:t})},[]);async function J(){if(D&&t&&!k){A(!0);try{let{copied:e,failures:n}=await c(t,D.dirPath,D.files);e.length>0&&R(),s(d(D,e.length,n))}finally{A(!1),O(null)}}}let Y={onDragEnter:U,onDragOver:W,onDragLeave:G,onDrop:K},X=j?(0,x.jsx)(`div`,{className:`pointer-events-none absolute inset-0 z-50 flex items-center justify-center bg-background/70`,children:(0,x.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border-2 border-dashed border-primary bg-background px-6 py-4`,children:[(0,x.jsx)(v,{className:`h-4 w-4 text-primary`}),(0,x.jsx)(`span`,{className:i.label,children:`Drop files to copy them into the repository`})]})}):null,Z=(0,x.jsx)(`div`,{className:`h-full min-h-0`,children:t?(0,x.jsx)(u,{threadId:t,children:(0,x.jsx)(y,{fallbackTitle:`Failed to load files`,children:(0,x.jsx)(b.Suspense,{fallback:(0,x.jsx)(p,{}),children:(0,x.jsx)(S,{instanceId:e,threadId:t,selectedPath:r?.path??null,onNodeSelect:z,onFilesDrop:q})})})}):(0,x.jsx)(`p`,{className:o(i.caption,`px-3 py-4 text-center`),children:`No thread selected.`})}),Q=(0,x.jsx)(b.Suspense,{fallback:(0,x.jsx)(te,{centered:!0,label:`Loading file viewer...`}),children:(0,x.jsx)(C,{selectedFile:r,showTreeBackButton:n&&!T,onShowTree:B,onFileCreated:V})}),$=(0,x.jsx)(h,{pendingDrop:D,dropCopying:k,onConfirm:()=>{J()},onDismiss:()=>{O(null)}});return n?(0,x.jsxs)(`div`,{className:`relative flex h-full flex-col overflow-hidden`,...Y,children:[X,$,(0,x.jsx)(`div`,{className:o(`flex-1 min-h-0 overflow-hidden`,!T&&`hidden`),children:Z}),(0,x.jsx)(`div`,{className:o(`flex-1 min-h-0 overflow-hidden`,T&&`hidden`),children:Q})]}):(0,x.jsxs)(`div`,{className:`relative flex h-full flex-col overflow-hidden`,...Y,children:[X,$,(0,x.jsxs)(g,{direction:`horizontal`,className:`flex-1 overflow-hidden`,children:[(0,x.jsx)(f,{defaultSize:25,minSize:15,maxSize:50,className:`overflow-hidden border-r border-border`,children:Z}),(0,x.jsx)(_,{withHandle:!0}),(0,x.jsx)(f,{className:`overflow-hidden`,children:Q})]})]})}export{w as default};
|