claude-code-best 2.4.4 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/AddWorkspaceDirectory-Cj5bvJgD.js +1 -0
- package/dist/chunks/App-2tgSv9lb.js +1 -0
- package/dist/chunks/ApproveApiKey-DWa-XTLb.js +1 -0
- package/dist/chunks/ApproveApiKey-SIUwkD8j.js +1 -0
- package/dist/chunks/AssistantSessionChooser-DF9eeJZS.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-DXJdube9.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-BOSW4Zdy.js +1 -0
- package/dist/chunks/ClaudeInChromeOnboarding-BW4XHmkw.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-B8oAAHSI.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-Bz0JyaOG.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-DYhmGSkx.js +1 -0
- package/dist/chunks/DesktopHandoff-CcsM_OAS.js +1 -0
- package/dist/chunks/DevChannelsDialog-DXRgY00D.js +1 -0
- package/dist/chunks/Dialog-DYFGqyDs.js +1 -0
- package/dist/chunks/DiffDialog-PvNZfZby.js +3 -0
- package/dist/chunks/Doctor--B1HUENo.js +1 -0
- package/dist/chunks/Doctor-CE_jL9jC.js +3 -0
- package/dist/chunks/ExitFlow-C4ybxKPn.js +2 -0
- package/dist/chunks/Feedback-B5rPGl_C.js +2 -0
- package/dist/chunks/Grove-C2YjB3zL.js +1 -0
- package/dist/chunks/Grove-CKVpREDU.js +11 -0
- package/dist/chunks/HybridTransport-Byjvz-DL.js +4 -0
- package/dist/chunks/ITermBackend-Co9XpeS4.js +1 -0
- package/dist/chunks/InProcessTransport-DB52dh4f.js +1 -0
- package/dist/chunks/InvalidConfigDialog-CNsqbNU3.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-ClnZaN6b.js +1 -0
- package/dist/chunks/ListItem-OFARanN7.js +1 -0
- package/dist/chunks/MCPConnectionManager-CDsa79pu.js +1 -0
- package/dist/chunks/McpParsingWarnings-DZkzoeZf.js +1 -0
- package/dist/chunks/MessageSelector-CkeGQPNM.js +3 -0
- package/dist/chunks/Messages-PfbzLYOU.js +11 -0
- package/dist/chunks/Onboarding-BwoGQB4g.js +1 -0
- package/dist/chunks/OverageCreditUpsell-Q5g2YjQw.js +1 -0
- package/dist/chunks/PermissionDialog-5MlJf7ew.js +1 -0
- package/dist/chunks/PluginSettings-B2ASJ0Rx.js +17 -0
- package/dist/chunks/PressEnterToContinue-BdA9zDGs.js +1 -0
- package/dist/chunks/PromptInputFooterSuggestions-D4lMVCqj.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-BvLtS6an.js +1 -0
- package/dist/chunks/QueryEngine-Av0G5fze.js +1 -0
- package/dist/chunks/REPL-DCwqua0C.js +1 -0
- package/dist/chunks/REPL-Dh8vzGmF.js +97 -0
- package/dist/chunks/RemoteCallout-BV_hoz98.js +1 -0
- package/dist/chunks/RemoteSessionManager-Cxoy1ud2.js +2 -0
- package/dist/chunks/ResumeConversation-B3WuB8rs.js +1 -0
- package/dist/chunks/SSETransport-pIm26VJq.js +4 -0
- package/dist/chunks/SearchBox-DfOmUoaI.js +1 -0
- package/dist/chunks/SearchExtraToolsTool-D70C-cmA.js +1 -0
- package/dist/chunks/SentryErrorBoundary-B6EWoJml.js +2 -0
- package/dist/chunks/SentryErrorBoundary-oJUBarGg.js +1 -0
- package/dist/chunks/Settings-CreAhCsb.js +2 -0
- package/dist/chunks/TeleportProgress-DPzGpyyM.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-DqWQX6j8.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-DPSO0S49.js +1 -0
- package/dist/chunks/ThemePicker-DueihHcy.js +1 -0
- package/dist/chunks/TmuxBackend-BNaZNAeP.js +9 -0
- package/dist/chunks/TrustDialog-CIzAlGn9.js +1 -0
- package/dist/chunks/TungstenTool-C5IqKVr0.js +1 -0
- package/dist/chunks/TungstenTool-V-Bwqlx3.js +1 -0
- package/dist/chunks/ValidationErrorsList-1k1qbsRo.js +2 -0
- package/dist/chunks/WelcomeV2-CR6TtXXM.js +1 -0
- package/dist/chunks/WindowsTerminalBackend-C5SeTXqC.js +2 -0
- package/dist/chunks/add-dir-DAMizKzF.js +1 -0
- package/dist/chunks/agentDisplay-B9z7i8b_.js +1 -0
- package/dist/chunks/agents-D5u0p1UC.js +103 -0
- package/dist/chunks/agents-DCh_gEvJ.js +2 -0
- package/dist/chunks/ajv-B_OpU_Uh.js +8 -0
- package/dist/chunks/analytics-DqMQntaB.js +1 -0
- package/dist/chunks/ant-DRJq-cEg.js +1 -0
- package/dist/chunks/api-B6URs6nc.js +1 -0
- package/dist/chunks/api-Dz_3z1kl.js +1 -0
- package/dist/chunks/asciicast-aoKFhc7C.js +1 -0
- package/dist/chunks/asciicast-o5Zg4dJt.js +4 -0
- package/dist/chunks/assistant-BRGDWkKB.js +1 -0
- package/dist/chunks/assistant-tPxOUa-Z.js +1 -0
- package/dist/chunks/assistant-zVegFdAO.js +1 -0
- package/dist/chunks/attributionHooks-PygdohOh.js +1 -0
- package/dist/chunks/attributionTrailer-BpvhXgRP.js +1 -0
- package/dist/chunks/auth-CqURlg4d.js +1 -0
- package/dist/chunks/auth-D4isgfuK.js +1 -0
- package/dist/chunks/autoMode-DVt4K4I2.js +45 -0
- package/dist/chunks/autoModeDenials-Cp6VFdsm.js +1 -0
- package/dist/chunks/autonomy-BZzW8QJZ.js +1 -0
- package/dist/chunks/autonomy-Ffv0QIyl.js +19 -0
- package/dist/chunks/autonomyPanel-MwuzDvv_.js +1 -0
- package/dist/chunks/axios-DLnc2dVy.js +1 -0
- package/dist/chunks/axios-DhfaybwJ.js +12 -0
- package/dist/chunks/backgroundHousekeeping-CYnAG60-.js +17 -0
- package/dist/chunks/backgroundHousekeeping-DUmxC6h0.js +1 -0
- package/dist/chunks/banner-CVXH2xts.js +2 -0
- package/dist/chunks/base64-js-DIVSFswY.js +1 -0
- package/dist/chunks/bedrockClient-qi1-JCOK.js +15 -0
- package/dist/chunks/bg-DK0E4ZtW.js +9 -0
- package/dist/chunks/bg-Dbh5z3Y8.js +1 -0
- package/dist/chunks/branch-DXefFdDE.js +3 -0
- package/dist/chunks/break-cache-ByJ7U2Ts.js +8 -0
- package/dist/chunks/bridge-qr4GQW_c.js +2 -0
- package/dist/chunks/bridgeConfig-CJ-KznTS.js +1 -0
- package/dist/chunks/bridgeConfig-CNbOKpAg.js +1 -0
- package/dist/chunks/bridgeEnabled-5vsPrjuq.js +1 -0
- package/dist/chunks/bridgeEnabled-BUJTCUHY.js +1 -0
- package/dist/chunks/bridgeMain-BimZwc2P.js +68 -0
- package/dist/chunks/bridgeMain-DYL4fl6A.js +1 -0
- package/dist/chunks/bridgeMessaging-BiE0CTqq.js +1 -0
- package/dist/chunks/bridgePointer-FvAMj3re.js +1 -0
- package/dist/chunks/browser-fLRXxIsQ.js +1 -0
- package/dist/chunks/btw-FpimqEqk.js +1 -0
- package/dist/chunks/buddy-BA3Cr067.js +3 -0
- package/dist/chunks/bundledMode-kSQejuY4.js +1 -0
- package/dist/chunks/bypassPermissionsKillswitch-CSC9p8mO.js +1 -0
- package/dist/chunks/caches-BUBkfP2Q.js +3 -0
- package/dist/chunks/caches-CTfNpKhW.js +1 -0
- package/dist/chunks/capacityWake-BXlUpptF.js +1 -0
- package/dist/chunks/ccrClient-BOxUn9EJ.js +1 -0
- package/dist/chunks/ccshareResume-DWLjTF22.js +1 -0
- package/dist/chunks/changeDetector-Y9KV5LgG.js +1 -0
- package/dist/chunks/channelNotification-CC7Xb06W.js +1 -0
- package/dist/chunks/channelNotification-l3EXKDNB.js +1 -0
- package/dist/chunks/chokidar-BcI3rIKm.js +1 -0
- package/dist/chunks/chokidar-SzksMqYp.js +1 -0
- package/dist/chunks/chrome-BnKyWWQL.js +1 -0
- package/dist/chunks/chromeNativeHost-4U39yLtd.js +1 -0
- package/dist/chunks/chunk-DR8-3Aex.js +1 -0
- package/dist/chunks/classPrivateFieldSet2-EAQNhHs8.js +1 -0
- package/dist/chunks/claudeDesktop-D0S1eq1F.js +1 -0
- package/dist/chunks/cleanup-Bg_gFgcj.js +1 -0
- package/dist/chunks/clear-OUVFUt8Z.js +1 -0
- package/dist/chunks/cliLaunch-BQa48gsr.js +1 -0
- package/dist/chunks/client-B47ZvTMo.js +1 -0
- package/dist/chunks/client-CPn1wQyc.js +7 -0
- package/dist/chunks/client-_sjL0I7A.js +35 -0
- package/dist/chunks/color-D5MCzz9h.js +1 -0
- package/dist/chunks/color-convert-ULbeSgNC.js +1 -0
- package/dist/chunks/commands-FJGWgQsa.js +1 -0
- package/dist/chunks/commitAttribution-BFshsh2H.js +2 -0
- package/dist/chunks/commitAttribution-DSv9FggK.js +1 -0
- package/dist/chunks/common-B379wT22.js +1 -0
- package/dist/chunks/common-B_BC3eMY.js +1 -0
- package/dist/chunks/common-CMCv4N_v.js +1 -0
- package/dist/chunks/compact-DWNaf1wR.js +3 -0
- package/dist/chunks/companion-CyK_Dr1U.js +1 -0
- package/dist/chunks/completionCache-DHfUBBMH.js +1 -0
- package/dist/chunks/completionCache-DORrtxkS.js +4 -0
- package/dist/chunks/computerUseLock-BjoDJH2h.js +1 -0
- package/dist/chunks/config-BdCuh6eA.js +1 -0
- package/dist/chunks/config-DNz6Eitr.js +1 -0
- package/dist/chunks/connectHeadless-CwsFt-Mh.js +1 -0
- package/dist/chunks/constants-41VpZw2G.js +1 -0
- package/dist/chunks/context-BOjdTj0i.js +1 -0
- package/dist/chunks/context-noninteractive-Bd2HO-vU.js +1 -0
- package/dist/chunks/context-noninteractive-k2ibficU.js +54 -0
- package/dist/chunks/controlMessageCompat-BJhFiS7u.js +1 -0
- package/dist/chunks/conversation-BP0phkOY.js +1 -0
- package/dist/chunks/conversation-Ci8O_eZ-.js +1 -0
- package/dist/chunks/copy-B0VUJ2rH.js +7 -0
- package/dist/chunks/createSSHSession-DqmkCS_k.js +6 -0
- package/dist/chunks/createSession-B9MhWusY.js +1 -0
- package/dist/chunks/createSession-CJEsHz58.js +1 -0
- package/dist/chunks/cron-DiW7eIPP.js +1 -0
- package/dist/chunks/cronJitterConfig-BzPaa52I.js +6 -0
- package/dist/chunks/crossProjectResume-tWsqBUHc.js +40 -0
- package/dist/chunks/cwd--iizewsn.js +1 -0
- package/dist/chunks/cwd-BgpSJxd7.js +1 -0
- package/dist/chunks/daemon-VYRit6Aq.js +2 -0
- package/dist/chunks/dangerousBackend-BU_PHGR2.js +1 -0
- package/dist/chunks/datadog-Bd1s_VFj.js +1 -0
- package/dist/chunks/datadog-DJowkWhh.js +1 -0
- package/dist/chunks/debug-DM5ezCBS.js +1 -0
- package/dist/chunks/debug-UI3T040K.js +5 -0
- package/dist/chunks/debugUtils-BBMFODKH.js +1 -0
- package/dist/chunks/defineProperty-80gRi2ZW.js +1 -0
- package/dist/chunks/desktop-BDowrzvG.js +1 -0
- package/dist/chunks/detached-D300jlhj.js +5 -0
- package/dist/chunks/detect-libc-DNuQfUvI.js +1 -0
- package/dist/chunks/detectRepository-CBk3S2zv.js +1 -0
- package/dist/chunks/detectRepository-DCTvg4p0.js +1 -0
- package/dist/chunks/detection-CQsNad64.js +1 -0
- package/dist/chunks/detection-DJ-vTbBf.js +1 -0
- package/dist/chunks/diff-auU5sUOw.js +1 -0
- package/dist/chunks/directoryCompletion-DP_4B1GL.js +1 -0
- package/dist/chunks/dist-CanSxOZ1.js +5 -0
- package/dist/chunks/dist-Cg1a1Exw.js +29 -0
- package/dist/chunks/dist-Q7YNoZ0H.js +20 -0
- package/dist/chunks/dist-es-4z5T3Jzm.js +1 -0
- package/dist/chunks/dist-es-B2jg52tM2.js +1 -0
- package/dist/chunks/dist-es-B6OXHQ1S.js +1 -0
- package/dist/chunks/dist-es-B8NEy5hc.js +1 -0
- package/dist/chunks/dist-es-BVGppqE4.js +1 -0
- package/dist/chunks/dist-es-Bcw5GZko.js +1 -0
- package/dist/chunks/dist-es-BoIJpncb.js +9 -0
- package/dist/chunks/dist-es-Bu_Fshi1.js +1 -0
- package/dist/chunks/dist-es-C-1vn4OP2.js +1 -0
- package/dist/chunks/dist-es-C41b_0B5.js +1 -0
- package/dist/chunks/dist-es-CCZYybbG2.js +1 -0
- package/dist/chunks/dist-es-CLK1mey-.js +1 -0
- package/dist/chunks/dist-es-CQz2aNf72.js +1 -0
- package/dist/chunks/dist-es-CSfI8B8l.js +1 -0
- package/dist/chunks/dist-es-CUZBYppo.js +1 -0
- package/dist/chunks/dist-es-CZkzHpjF.js +1 -0
- package/dist/chunks/dist-es-Cbf0_D8d.js +5 -0
- package/dist/chunks/dist-es-ChHe-SVL.js +1 -0
- package/dist/chunks/dist-es-ClYOf0My.js +1 -0
- package/dist/chunks/dist-es-D-kJbj4A2.js +1 -0
- package/dist/chunks/dist-es-D1LN6CJd.js +1 -0
- package/dist/chunks/dist-es-DC1sC3ph.js +1 -0
- package/dist/chunks/dist-es-DGn8uOwQ2.js +1 -0
- package/dist/chunks/dist-es-DK5fTeKM2.js +1 -0
- package/dist/chunks/dist-es-DN7otr6F.js +1 -0
- package/dist/chunks/dist-es-DPM0mPK5.js +1 -0
- package/dist/chunks/dist-es-DqZAh3nG.js +1 -0
- package/dist/chunks/dist-es-DuAZyxJ02.js +5 -0
- package/dist/chunks/dist-es-HVQrM0oE.js +1 -0
- package/dist/chunks/dist-es-OVleIB54.js +1 -0
- package/dist/chunks/dist-es-UAs0rdXg.js +1 -0
- package/dist/chunks/dist-es-WvMMuHmx2.js +1 -0
- package/dist/chunks/dist-es-fjXft-jH.js +1 -0
- package/dist/chunks/dist-es-hdN_ShpZ.js +3 -0
- package/dist/chunks/dist-es-neiUvMJb.js +1 -0
- package/dist/chunks/dist-es-yMYpDtui2.js +1 -0
- package/dist/chunks/dist-es-zjcbuB72.js +1 -0
- package/dist/chunks/distRoot-CcxmnzqQ.js +1 -0
- package/dist/chunks/doctor-bKPp6AeL.js +1 -0
- package/dist/chunks/earlyInput-JGJo1zcC.js +1 -0
- package/dist/chunks/earlyInput-tRkbxFv2.js +2 -0
- package/dist/chunks/effort-BQj2QnnA.js +9 -0
- package/dist/chunks/entry-CUu6-QhT.js +14 -0
- package/dist/chunks/env-chR0gV31.js +1 -0
- package/dist/chunks/envLessBridgeConfig-CixkwbRF.js +1 -0
- package/dist/chunks/envLessBridgeConfig-Ju4W58xf.js +1 -0
- package/dist/chunks/envUtils-BWeoiL4Y.js +1 -0
- package/dist/chunks/escHotkey-Cyz0yyh1.js +259 -0
- package/dist/chunks/esm--xjzB1hI.js +1 -0
- package/dist/chunks/esm-B2HIF0XY.js +1 -0
- package/dist/chunks/esm-BGQPWnJy.js +1 -0
- package/dist/chunks/esm-C-1qL9Mn.js +1 -0
- package/dist/chunks/esm-C3jcs1DH.js +1 -0
- package/dist/chunks/esm-C97WL9nC.js +1 -0
- package/dist/chunks/esm-CIL-SKM8.js +1 -0
- package/dist/chunks/esm-CJlBxjtx.js +1 -0
- package/dist/chunks/esm-CsGLyWmS.js +56 -0
- package/dist/chunks/esm-DQHmDm-H.js +1 -0
- package/dist/chunks/esm-DcdOXSzi.js +1 -0
- package/dist/chunks/esm-DhNYgGTV.js +1 -0
- package/dist/chunks/esm-DxPW7qPs.js +1 -0
- package/dist/chunks/esm-FBUWr3vI.js +1 -0
- package/dist/chunks/esm-QgL6y---.js +10 -0
- package/dist/chunks/esm-v0kPjgVS.js +1 -0
- package/dist/chunks/esm-vIn-YV_h.js +1 -0
- package/dist/chunks/event-streams-BV7ngMXu.js +1 -0
- package/dist/chunks/eventLoopStallDetector-Dnh1fc31.js +1 -0
- package/dist/chunks/execAsync-BkA6ogic.js +1 -0
- package/dist/chunks/execFileNoThrow-CuQN1sz8.js +1 -0
- package/dist/chunks/execSyncWrapper-C2XQnFVo.js +1 -0
- package/dist/chunks/execa-CGue6Z3n.js +34 -0
- package/dist/chunks/executor-4EeD8GNm.js +1561 -0
- package/dist/chunks/executor-BHEuNh5F.js +1 -0
- package/dist/chunks/exit-DijkO8eo.js +1 -0
- package/dist/chunks/exit-_obETqBv.js +2 -0
- package/dist/chunks/export-DA-bBZkX.js +2 -0
- package/dist/chunks/exportRenderer-3y4tGdSB.js +1 -0
- package/dist/chunks/extra-usage-CS6VwKJt.js +1 -0
- package/dist/chunks/extra-usage-DGHEQOrY.js +1 -0
- package/dist/chunks/extra-usage-core-DOgT4u4i.js +1 -0
- package/dist/chunks/extra-usage-noninteractive-DYnfiRlV.js +1 -0
- package/dist/chunks/extraUsage-CfxgfpX_.js +1 -0
- package/dist/chunks/extractMemories-jvjCvtpC.js +1 -0
- package/dist/chunks/fast-Bbtx_Bs1.js +1 -0
- package/dist/chunks/fast-CzRUJBTK.js +1 -0
- package/dist/chunks/featureCheck-Cm0YNDXO.js +1 -0
- package/dist/chunks/featureCheck-p7OeCYzj.js +1 -0
- package/dist/chunks/feedback-FoXtdHAV.js +1 -0
- package/dist/chunks/figures-gfT9mM8P.js +1 -0
- package/dist/chunks/fileStateCache-C7-TxF8G.js +1 -0
- package/dist/chunks/files-DYvAZGxp.js +2 -0
- package/dist/chunks/firstPartyEventLogger-KIwaBY-E.js +1 -0
- package/dist/chunks/flushGate-C2Icy43G.js +1 -0
- package/dist/chunks/foundry-sdk-BFN5VDFQ.js +1 -0
- package/dist/chunks/fpsMetrics-DeezdcwV.js +1 -0
- package/dist/chunks/fuse-Ch_OAlm3.js +1 -0
- package/dist/chunks/gates-CbQLZHtm.js +1 -0
- package/dist/chunks/gates-DSI3vpwO.js +1 -0
- package/dist/chunks/gemini-BrNJGX4k.js +1 -0
- package/dist/chunks/generateRecap-B0fvSCjo.js +1 -0
- package/dist/chunks/generateSessionName-DvRYa39O.js +1 -0
- package/dist/chunks/genericProcessUtils-BGvcwuPt.js +23 -0
- package/dist/chunks/getMachineId-bsd-BMtYGBUL.js +1 -0
- package/dist/chunks/getMachineId-darwin-CiLdFH7z.js +2 -0
- package/dist/chunks/getMachineId-linux-Cr27rIeY.js +1 -0
- package/dist/chunks/getMachineId-unsupported-ceiBLwAN.js +1 -0
- package/dist/chunks/getMachineId-win-DFTmsQHq.js +1 -0
- package/dist/chunks/git-CN3qtTb_.js +6 -0
- package/dist/chunks/git-D23Mzu_K.js +1 -0
- package/dist/chunks/githubRepoPathMapping-Dut3d6nn.js +1 -0
- package/dist/chunks/graceful-fs-Cgc0rjGF.js +2 -0
- package/dist/chunks/grok-Ftoheab3.js +1 -0
- package/dist/chunks/growthbook-BynnuVTn.js +1 -0
- package/dist/chunks/hash-BRmOQc3c.js +1 -0
- package/dist/chunks/heapdump-hQ_w0LPC.js +5 -0
- package/dist/chunks/help-DQsHHv6r.js +1 -0
- package/dist/chunks/hooks-BLLL4iPv.js +1 -0
- package/dist/chunks/hooks-BhVDc8yb.js +79 -0
- package/dist/chunks/hostAdapter-D1eWmmhu.js +1 -0
- package/dist/chunks/hostGuard-zim_4F9V.js +1 -0
- package/dist/chunks/httpAuthSchemes-Wq4XWeLL.js +13 -0
- package/dist/chunks/ide-CPmMXLL-.js +2 -0
- package/dist/chunks/inboundAttachments-Bmf6vYsE.js +1 -0
- package/dist/chunks/inboundAttachments-D-p91z3w.js +1 -0
- package/dist/chunks/index.min-BJnb9GQI.js +1 -0
- package/dist/chunks/initReplBridge-BiHXpDEY.js +1 -0
- package/dist/chunks/insights-CTlTyvjj.js +822 -0
- package/dist/chunks/install-IPuD3Lq8.js +1 -0
- package/dist/chunks/install-github-app-Bmu_sA9e.js +147 -0
- package/dist/chunks/install-slack-app-Rfl81Jqo.js +1 -0
- package/dist/chunks/instinctParser-DHMa8xa0.js +1 -0
- package/dist/chunks/instrumentation-DWwmOmr0.js +12 -0
- package/dist/chunks/intl-Pse97ORk.js +1 -0
- package/dist/chunks/isObject-DaxDnPKm.js +1 -0
- package/dist/chunks/isSymbol-Dp3irZaY.js +1 -0
- package/dist/chunks/job-BXEt0izn.js +2 -0
- package/dist/chunks/json-bigint-OxRwRvup.js +8 -0
- package/dist/chunks/jsx-runtime-D-D469L8.js +1 -0
- package/dist/chunks/jws-2vqRyZtR.js +3 -0
- package/dist/chunks/jwtUtils-CpXwh_du.js +1 -0
- package/dist/chunks/keybindings-DRDgVvqz.js +2 -0
- package/dist/chunks/lang-D3ZHlfT6.js +1 -0
- package/dist/chunks/language-B_-BfBT4.js +1 -0
- package/dist/chunks/language-DcSjogBx.js +1 -0
- package/dist/chunks/launchAgentsPlatform-BPm_VMln.js +1 -0
- package/dist/chunks/launchAutofixPr-D2qac07g.js +2 -0
- package/dist/chunks/launchCommand-Du91jxMC.js +1 -0
- package/dist/chunks/launchLocalMemory-D_hBbXKE.js +3 -0
- package/dist/chunks/launchLocalVault-CPzNWvQ9.js +3 -0
- package/dist/chunks/launchMemoryStores-Djq2KhKb.js +1 -0
- package/dist/chunks/launchOnboarding-Bh6E7vdc.js +8 -0
- package/dist/chunks/launchSchedule-C988bQ-5.js +1 -0
- package/dist/chunks/launchSkillStore-DqrP6Gme.js +1 -0
- package/dist/chunks/launchTeleport-DFhybaq_.js +3 -0
- package/dist/chunks/launchVault-p_CSK4ZQ.js +1 -0
- package/dist/chunks/lazySchema-2sOku3cX.js +1 -0
- package/dist/chunks/lib-B4Q0Nrpb.js +14 -0
- package/dist/chunks/lib-Ca3QWJjN.js +2 -0
- package/dist/chunks/lib-inCisXen.js +8 -0
- package/dist/chunks/loadAgentsDir-Ci5mr0vm.js +4601 -0
- package/dist/chunks/loadAgentsDir-vB1QEZ7H.js +1 -0
- package/dist/chunks/loadPluginHooks-xYCEZ6t5.js +1 -0
- package/dist/chunks/loadSso-sDs471GC.js +1 -0
- package/dist/chunks/localSearch-DtVqtfvk.js +1 -0
- package/dist/chunks/localSearch-Vpn6W5aY.js +1 -0
- package/dist/chunks/lockfile-DBwdlC3K.js +1 -0
- package/dist/chunks/log-CzsijfHZ.js +1 -0
- package/dist/chunks/login-D-N78G6r.js +1 -0
- package/dist/chunks/login-D9IWjvza.js +1 -0
- package/dist/chunks/logoV2Utils-SAulcC5x.js +1 -0
- package/dist/chunks/logout-CFggVS-9.js +1 -0
- package/dist/chunks/magicDocs-BfoeYhin.js +57 -0
- package/dist/chunks/main-C6be1KFk.js +31 -0
- package/dist/chunks/main-DhMlhVj3.js +1108 -0
- package/dist/chunks/mappers-uIrAj-Wd.js +1 -0
- package/dist/chunks/mcp-CAYGNxCb.js +1 -0
- package/dist/chunks/mcp-COQap0SM.js +6 -0
- package/dist/chunks/mcp-DlM0OC6R.js +2 -0
- package/dist/chunks/mcpServer-1SnOWb8_.js +1 -0
- package/dist/chunks/mcpServer-DXvS3v4x.js +1 -0
- package/dist/chunks/memoize-DNnuA2aU.js +1 -0
- package/dist/chunks/memoize-DxwLawI2.js +1 -0
- package/dist/chunks/memory-XccPLQLt.js +1 -0
- package/dist/chunks/mobile-umu5P0cM.js +2 -0
- package/dist/chunks/modalContext-CmSKRyea.js +1 -0
- package/dist/chunks/model-CbiDGGJU.js +1 -0
- package/dist/chunks/model-DdbcxKub.js +1 -0
- package/dist/chunks/normalization-Cox8C0dP.js +1 -0
- package/dist/chunks/oauth-CdZEzMww.js +1 -0
- package/dist/chunks/oauth-CmensepG.js +1 -0
- package/dist/chunks/observationStore-tvkldXUo.js +4 -0
- package/dist/chunks/onChangeAppState-Dp0JIXd8.js +1 -0
- package/dist/chunks/open-CDditBQ-.js +1 -0
- package/dist/chunks/openai-6KcHd4Hw.js +10 -0
- package/dist/chunks/openaiShared-D5lOejS1.js +16 -0
- package/dist/chunks/output-style-XDb9-2Kk.js +1 -0
- package/dist/chunks/overageCreditGrant-DYiB4sr-.js +1 -0
- package/dist/chunks/p-map-9Ud1LOrJ.js +1 -0
- package/dist/chunks/p-map-D7WEmnBE.js +1 -0
- package/dist/chunks/package-BhL7chzt.js +1 -0
- package/dist/chunks/panel-ByW1omJn.js +1 -0
- package/dist/chunks/panel-Bz_8td5D.js +1 -0
- package/dist/chunks/parseConnectUrl-BS6i9JPo.js +1 -0
- package/dist/chunks/parser-CmngCwjB.js +1 -0
- package/dist/chunks/parser-SWIZo39J.js +1 -0
- package/dist/chunks/passes-Cbc6T_Tj.js +1 -0
- package/dist/chunks/path-C4kbwvSH.js +1 -0
- package/dist/chunks/paths-Q2255dD7.js +39 -0
- package/dist/chunks/permissions-BLzPHh_3.js +3 -0
- package/dist/chunks/permissions-DXLfdE7b.js +1 -0
- package/dist/chunks/permissions-Ps_D01ZB.js +1 -0
- package/dist/chunks/pipeTransport-D7NIp3aA.js +1 -0
- package/dist/chunks/plan-DloFVJK7.js +1 -0
- package/dist/chunks/platform-CuyedWpe.js +2 -0
- package/dist/chunks/plist-BO4ZqMZc.js +6 -0
- package/dist/chunks/plugin-XR9IBPMM.js +1 -0
- package/dist/chunks/pluginAutoupdate-Cr9hP0zG.js +1 -0
- package/dist/chunks/pluginBlocklist-CM9uP8CY.js +1 -0
- package/dist/chunks/pluginCliCommands-BQkrvES5.js +1 -0
- package/dist/chunks/pluginFlagging-CJ1--2Kw.js +1 -0
- package/dist/chunks/pluginOperations-B0rLuSvo.js +2 -0
- package/dist/chunks/pluginStartupCheck-Bjdc8zhz.js +1 -0
- package/dist/chunks/pluginStartupCheck-Cu2ezD51.js +1 -0
- package/dist/chunks/plugins-BgOP_8TX.js +4 -0
- package/dist/chunks/policyLimits-CKy_gTEt.js +1 -0
- package/dist/chunks/pollConfig-DhptuhFw.js +1 -0
- package/dist/chunks/poller-Ds0Y6Cir.js +1 -0
- package/dist/chunks/poor-DF0aqXDx.js +1 -0
- package/dist/chunks/poorMode-C5Frra4j.js +1 -0
- package/dist/chunks/poorMode-DJvjO2nW.js +1 -0
- package/dist/chunks/postCommitAttribution-Ehmwzzuq.js +1 -0
- package/dist/chunks/print-CPtR0KTa.js +39 -0
- package/dist/chunks/privacy-settings-e-7lc7Un.js +1 -0
- package/dist/chunks/process-CWupreF6.js +1 -0
- package/dist/chunks/process-DMKLUQIO.js +1 -0
- package/dist/chunks/processBashCommand-D5dC6Mya.js +1 -0
- package/dist/chunks/processSlashCommand-DHRUtZ-C.js +6 -0
- package/dist/chunks/projectContext-0fpRKUeH.js +1 -0
- package/dist/chunks/projectContext-eXMSfgdZ.js +1 -0
- package/dist/chunks/prompt-4tea6NJQ.js +54 -0
- package/dist/chunks/prompt-CQC-mh6u.js +1 -0
- package/dist/chunks/prompt-DEPUnJdB.js +222 -0
- package/dist/chunks/prompt-DawxLANl.js +1 -0
- package/dist/chunks/promptEditor-Ci-h04-5.js +4 -0
- package/dist/chunks/protocolHandler-DhqM32qE.js +13 -0
- package/dist/chunks/protocols-CAyQOlkr.js +7 -0
- package/dist/chunks/proxy-CfZp-wce.js +99 -0
- package/dist/chunks/rate-limit-options-B0l29Zx8.js +1 -0
- package/dist/chunks/rcDebugLog-BbPkkigY.js +11 -0
- package/dist/chunks/referral-ByevBJrE.js +1 -0
- package/dist/chunks/refresh-B_CwwIRX.js +1 -0
- package/dist/chunks/registerProtocol-DzhaQH02.js +36 -0
- package/dist/chunks/registry-DkHA4cRu.js +1 -0
- package/dist/chunks/release-notes-CZthYkei.js +4 -0
- package/dist/chunks/releaseNotes-CwKpIsyd.js +2 -0
- package/dist/chunks/reload-plugins-DxWfXvrN.js +1 -0
- package/dist/chunks/remote-env-BiRLWIrh.js +1 -0
- package/dist/chunks/remoteBridgeCore-nz1fPY1U.js +1 -0
- package/dist/chunks/remoteControlServer-FzLUxh2B.js +3 -0
- package/dist/chunks/rename-DmGuyncE.js +1 -0
- package/dist/chunks/renderOptions-BiyC2rj1.js +1 -0
- package/dist/chunks/resume-7GeU7RMS.js +2 -0
- package/dist/chunks/rewind-CXplHgh_.js +1 -0
- package/dist/chunks/rollback-DbSpxmJE.js +11 -0
- package/dist/chunks/runtimeObserver-Duod-ign.js +10 -0
- package/dist/chunks/runtimeObserver-OgM9ZYxZ.js +1 -0
- package/dist/chunks/sandbox-adapter-CxkhKgaa.js +1 -0
- package/dist/chunks/sandbox-toggle-Cc96R6Ox.js +1 -0
- package/dist/chunks/sanitization-CYp-9DbE.js +1 -0
- package/dist/chunks/satisfies-BaHgd_ie.js +1 -0
- package/dist/chunks/schemas-BGAvj1T4.js +40 -0
- package/dist/chunks/sdk-DEtgRZvI.js +1 -0
- package/dist/chunks/sdkHeapDumpMonitor--fevrC5z.js +1 -0
- package/dist/chunks/searchExtraTools-DQ6e601b.js +1 -0
- package/dist/chunks/semver-Cq33BYay.js +1 -0
- package/dist/chunks/semver-Tw0AFar5.js +1 -0
- package/dist/chunks/sentry-BUHYuYGj.js +13 -0
- package/dist/chunks/server-C5XZSlto.js +1 -0
- package/dist/chunks/server-DzOdtq8A.js +1 -0
- package/dist/chunks/serverBanner-WlSYP-f8.js +1 -0
- package/dist/chunks/serverLog-DtsUvDiY.js +1 -0
- package/dist/chunks/session-DgLqm7ZI.js +2 -0
- package/dist/chunks/sessionDataUploader-Ctjo1bgR.js +1 -0
- package/dist/chunks/sessionDiscovery-DgNea6qa.js +1 -0
- package/dist/chunks/sessionFileAccessHooks-7Svz-7S-.js +1 -0
- package/dist/chunks/sessionManager-Dw72ZUTg.js +1 -0
- package/dist/chunks/sessionMemory-DIrR3zvb.js +1 -0
- package/dist/chunks/sessionMemory-_dmj8lcH.js +1 -0
- package/dist/chunks/sessionMemoryUtils-BdQtSkRx.js +1 -0
- package/dist/chunks/sessionObserver-CuWMVPlT.js +20 -0
- package/dist/chunks/sessionObserver-_adufOGQ.js +1 -0
- package/dist/chunks/sessionStorage-W7okgAlQ.js +1 -0
- package/dist/chunks/sessionStoragePortable-BI9q2WcJ.js +3 -0
- package/dist/chunks/sessionTitle-DzkMzHer.js +14 -0
- package/dist/chunks/sessionTracing-DTjmc0EF.js +11 -0
- package/dist/chunks/settingsSync-CfYDkakY.js +1 -0
- package/dist/chunks/setup-BKUG46jQ.js +9 -0
- package/dist/chunks/setup-CmLngvpJ.js +1 -0
- package/dist/chunks/setup-TqJ7-Nxh.js +2 -0
- package/dist/chunks/shadowedRuleDetection-DesT0yKM.js +1 -0
- package/dist/chunks/shellQuote-DgjT8KBA.js +1 -0
- package/dist/chunks/sideQuestion-BAq0YyKY.js +20 -0
- package/dist/chunks/signin-QEeYpJZw.js +1 -0
- package/dist/chunks/sink-B3uP8Cf8.js +1 -0
- package/dist/chunks/sink-CaWMZBw_.js +1 -0
- package/dist/chunks/sinks-COcy5GnB.js +2 -0
- package/dist/chunks/sinks-oFfsKySL.js +1 -0
- package/dist/chunks/skill-learning-DOIMPtWE.js +5 -0
- package/dist/chunks/skillChangeDetector-CA_Tdx8N.js +1 -0
- package/dist/chunks/skillGapStore-CWuw1dYh.js +1 -0
- package/dist/chunks/skillGapStore-DpEoKhn-.js +5 -0
- package/dist/chunks/skillGenerator-9y3Q4YoO.js +8 -0
- package/dist/chunks/skillLearning-BhM09bQD.js +1 -0
- package/dist/chunks/skillLearning-_o2D06yM.js +1 -0
- package/dist/chunks/skillPanel-Dt24mZTZ.js +28 -0
- package/dist/chunks/skillSearchPanel-gaXN64Fu.js +21 -0
- package/dist/chunks/skills-Dx3dMHYk.js +1 -0
- package/dist/chunks/slashCommandParsing-Cari0pNg.js +1 -0
- package/dist/chunks/sleep-8Eb9j_Ly.js +1 -0
- package/dist/chunks/sprites-5OAB-Ui2.js +1 -0
- package/dist/chunks/src-BIPP3_mo.js +26 -0
- package/dist/chunks/src-BJz1KAd_.js +6 -0
- package/dist/chunks/src-BRAdBA8A.js +1 -0
- package/dist/chunks/src-BRC_BuUP.js +1 -0
- package/dist/chunks/src-BaB-bpCj.js +5 -0
- package/dist/chunks/src-BlLavFUS.js +7 -0
- package/dist/chunks/src-C5yhFG0C.js +19 -0
- package/dist/chunks/src-CI_jaaBj.js +2 -0
- package/dist/chunks/src-CRsA-Z4y.js +1 -0
- package/dist/chunks/src-CYLfL70h.js +1 -0
- package/dist/chunks/src-DJXCzwyJ.js +1 -0
- package/dist/chunks/src-DJXKJavk.js +1 -0
- package/dist/chunks/src-Di342QoJ.js +53 -0
- package/dist/chunks/src-DsMd9Q9e.js +2 -0
- package/dist/chunks/src-DzH9IdOo.js +1 -0
- package/dist/chunks/src-hdbPEvzO.js +9 -0
- package/dist/chunks/src-poaoYkuc.js +1 -0
- package/dist/chunks/src-x7u_sB6m.js +1 -0
- package/dist/chunks/sso-oidc-BX1MlBX0.js +1 -0
- package/dist/chunks/startupProfiler-DnXZaX4A.js +3 -0
- package/dist/chunks/startupProfiler-SOE--nM9.js +1 -0
- package/dist/chunks/state-B2GIOsTB.js +1 -0
- package/dist/chunks/state-Ce1HlR-H.js +1 -0
- package/dist/chunks/state-sIHsFpDu.js +1 -0
- package/dist/chunks/staticRender-Br64h1E1.js +1 -0
- package/dist/chunks/stats-TUExo9iU.js +1 -0
- package/dist/chunks/status-Dghaz1my.js +1 -0
- package/dist/chunks/statusNoticeHelpers-DVZSSXeK.js +1 -0
- package/dist/chunks/stdio-BEEzuxaZ.js +1 -0
- package/dist/chunks/stdio-D4cT86R0.js +3 -0
- package/dist/chunks/stickers-2K05wjSp.js +1 -0
- package/dist/chunks/store-DhI7Lcan.js +1 -0
- package/dist/chunks/sts-BDFJ-6QE.js +1 -0
- package/dist/chunks/subprocessEnv-CggQWZCx.js +1 -0
- package/dist/chunks/subprocessEnv-DV6q6o6w.js +1 -0
- package/dist/chunks/supports-color-lkzOMQ6u.js +1 -0
- package/dist/chunks/systemPromptSections-BcN_XBTx.js +1 -0
- package/dist/chunks/systemPromptSections-DB93ZNWP.js +1 -0
- package/dist/chunks/systemTheme-dDbitcxB.js +1 -0
- package/dist/chunks/tag-ZcVkzFjz.js +11 -0
- package/dist/chunks/tasks-DbB33ekt.js +1 -0
- package/dist/chunks/teamHelpers-BmN9nKz-.js +1 -0
- package/dist/chunks/teamHelpers-yeTNtZbb.js +1 -0
- package/dist/chunks/teammate-DMYOtLTK.js +1 -0
- package/dist/chunks/teammateModeSnapshot-CPjJJDL1.js +1 -0
- package/dist/chunks/teammateModeSnapshot-CsNIJTKi.js +1 -0
- package/dist/chunks/teleport-JHgpwZIh.js +1 -0
- package/dist/chunks/templateJobs-Db630FZD.js +12 -0
- package/dist/chunks/terminalSetup-DJqWE8fc.js +33 -0
- package/dist/chunks/terminalSetup-ygKHrVKR.js +1 -0
- package/dist/chunks/theme-MmfFhdTD.js +1 -0
- package/dist/chunks/thinkback-CrNirB0V.js +1 -0
- package/dist/chunks/thinkback-Quc7KPmi.js +1 -0
- package/dist/chunks/thinkback-play-CQ1s7oqg.js +1 -0
- package/dist/chunks/tmux-CvbhsfwG.js +1 -0
- package/dist/chunks/toolEventObserver-BqMplcIk.js +1 -0
- package/dist/chunks/toolEventObserver-DBq2XBYY.js +1 -0
- package/dist/chunks/toolPool-BkCtTKXz.js +1 -0
- package/dist/chunks/toolPool-C7bOwJfR.js +1 -0
- package/dist/chunks/trustedDevice-C9Zevohz.js +1 -0
- package/dist/chunks/trustedDevice-DEuQUTbz.js +1 -0
- package/dist/chunks/tui-BVc2q4Xv.js +6 -0
- package/dist/chunks/turndown.es-Bv06VjMb.js +69 -0
- package/dist/chunks/types-CQ1wrnQ0.js +1 -0
- package/dist/chunks/types-Csi32ZXh.js +17 -0
- package/dist/chunks/types-RJTEOuIt.js +3 -0
- package/dist/chunks/udsClient-BvG_Jip0.js +1 -0
- package/dist/chunks/ultrareviewCommand-DrlfRrXq.js +3 -0
- package/dist/chunks/undercover-CBeHiWUd.js +1 -0
- package/dist/chunks/undercover-DKn95mh9.js +31 -0
- package/dist/chunks/up-D-U4wUCe.js +12 -0
- package/dist/chunks/updateCCB-CJ7dCUan.js +11 -0
- package/dist/chunks/upgrade-Degqbu8S.js +1 -0
- package/dist/chunks/upgrade-ucJ-lnlY.js +1 -0
- package/dist/chunks/upload-pTZQCPLt.js +1 -0
- package/dist/chunks/upstreamproxy-DcLeL2XX.js +11 -0
- package/dist/chunks/usage-D96a7Cke.js +1 -0
- package/dist/chunks/usage-DVQMUMcC.js +1 -0
- package/dist/chunks/useKeybinding-FsOnjW6T.js +1 -0
- package/dist/chunks/useMainLoopModel-B7ch2o9K.js +1 -0
- package/dist/chunks/useManagePlugins-BfGzHMvO.js +1 -0
- package/dist/chunks/useMergedTools-TemEvCrX.js +1 -0
- package/dist/chunks/useSearchInput-B-V4kIa-.js +1 -0
- package/dist/chunks/useSettingsErrors-B2JGz1s8.js +1 -0
- package/dist/chunks/useVoice-BuwYDm2U.js +1 -0
- package/dist/chunks/util-CeIKZmj9.js +1 -0
- package/dist/chunks/utils-CwhszpkT.js +1 -0
- package/dist/chunks/v4-f1i_CNUT.js +1 -0
- package/dist/chunks/validatePlugin-BlVho93x.js +1 -0
- package/dist/chunks/vertex-sdk-CSGw3fvU.js +9 -0
- package/dist/chunks/vim-DUZQCWUP.js +1 -0
- package/dist/chunks/voice-BkRIHZiM.js +2 -0
- package/dist/chunks/voice-DXiiy8HX.js +8 -0
- package/dist/chunks/voiceModeEnabled-CPQUE3PU.js +1 -0
- package/dist/chunks/voiceModeEnabled-DB8GCzAF.js +1 -0
- package/dist/chunks/voiceStreamSTT-DgoDscHn.js +1 -0
- package/dist/chunks/voiceStreamSTT-Dr_wH1Kh.js +1 -0
- package/dist/chunks/which-DqSAIvp2.js +1 -0
- package/dist/chunks/windowsPaths-C9CigqoF.js +1 -0
- package/dist/chunks/windowsPaths-swxCp7bX.js +2 -0
- package/dist/chunks/workSecret-mS2OrpxF.js +1 -0
- package/dist/chunks/workerRegistry-CT7_kjvY.js +1 -0
- package/dist/chunks/worktree-DU3xtwKW.js +1 -0
- package/dist/chunks/worktreeModeEnabled-Db6b_Iy_.js +1 -0
- package/dist/chunks/worktreeModeEnabled-THQb19xR.js +1 -0
- package/dist/chunks/wrapper-BSK0MCQH.js +1 -0
- package/dist/chunks/wrapper-D5qL1aQL.js +6 -0
- package/dist/chunks/xdg-CBxMmQux.js +1 -0
- package/dist/chunks/xml-DD_ldd3X.js +1 -0
- package/dist/chunks/zod-DT6hytkp.js +1 -0
- package/dist/cli.js +1 -10934
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Ac as t,Pc as n,Sc as r}from"./paths-Q2255dD7.js";import{n as i,r as a}from"./analytics-DqMQntaB.js";var o;e((()=>{i(),t(),o=async()=>{let e=r().editorMode||`normal`;e===`emacs`&&(e=`normal`);let t=e===`normal`?`vim`:`normal`;return n(e=>({...e,editorMode:t})),a(`tengu_editor_mode_changed`,{mode:t,source:`command`}),{type:`text`,value:`Editor mode set to ${t}. ${t===`vim`?`Use Escape key to toggle between INSERT and NORMAL modes.`:`Using standard (readline) keyboard bindings.`}`}}}))();export{o as call};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Ac as t,Ka as n,Pc as r,Sc as i,lo as a,oo as o}from"./paths-Q2255dD7.js";import{n as s,r as c}from"./analytics-DqMQntaB.js";import{$w as l,eT as u,fA as d,gA as f}from"./loadAgentsDir-Ci5mr0vm.js";import{n as p,r as m}from"./voiceModeEnabled-CPQUE3PU.js";import{n as h,t as g}from"./useVoice-BuwYDm2U.js";var _,v;e((()=>{g(),u(),s(),t(),d(),o(),p(),_=2,v=async e=>{if(!m())return{type:`text`,value:`Voice mode is not available.`};let t=n(),o=t.voiceEnabled===!0,s=e?.trim().toLowerCase();if(o&&s===`doubao`)return a(`userSettings`,{voiceProvider:`doubao`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(f.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Doubao ASR. Hold ${l(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(o&&s===`anthropic`)return a(`userSettings`,{voiceProvider:`anthropic`}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(f.notifyChange(`userSettings`),{type:`text`,value:`Voice mode switched to Anthropic STT. Hold ${l(`voice:pushToTalk`,`Chat`,`Space`)} to record.`});if(o)return a(`userSettings`,{voiceEnabled:!1}).error?{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`}:(f.notifyChange(`userSettings`),c(`tengu_voice_toggled`,{enabled:!1}),{type:`text`,value:`Voice mode disabled.`});let u=s===`doubao`?`doubao`:`anthropic`,{isVoiceStreamAvailable:d}=await import(`./voiceStreamSTT-DgoDscHn.js`),{checkRecordingAvailability:p}=await import(`./voice-DXiiy8HX.js`),g=await p();if(!g.available)return{type:`text`,value:g.reason??`Voice mode is not available in this environment.`};if(u!==`doubao`&&!d())return{type:`text`,value:`Voice mode requires a Claude.ai account. Please run /login to sign in.`};let{checkVoiceDependencies:v,requestMicrophonePermission:y}=await import(`./voice-DXiiy8HX.js`),b=await v();if(!b.available)return{type:`text`,value:`No audio recording tool found.${b.installCommand?`\nInstall audio recording tools? Run: ${b.installCommand}`:`
|
|
2
|
+
Install SoX manually for audio recording.`}`};if(!await y()){let e;return e=process.platform===`win32`?`Settings → Privacy → Microphone`:process.platform===`linux`?`your system's audio settings`:`System Settings → Privacy & Security → Microphone`,{type:`text`,value:`Microphone access is denied. To enable it, go to ${e}, then run /voice again.`}}if(a(`userSettings`,{voiceEnabled:!0,...u===`doubao`?{voiceProvider:`doubao`}:{}}).error)return{type:`text`,value:`Failed to update settings. Check your settings file for syntax errors.`};f.notifyChange(`userSettings`),c(`tengu_voice_toggled`,{enabled:!0});let x=l(`voice:pushToTalk`,`Chat`,`Space`),S=``,C=u===`doubao`?`Doubao ASR`:`Anthropic`;if(u!==`doubao`){let e=h(t.language),n=i(),a=n.voiceLangHintLastLanguage!==e.code,o=a?0:n.voiceLangHintShownCount??0,s=!e.fellBackFrom&&o<_;e.fellBackFrom?S=` Note: "${e.fellBackFrom}" is not a supported dictation language; using English. Change it via /config.`:s&&(S=` Dictation language: ${e.code} (/config to change).`),(a||s)&&r(t=>({...t,voiceLangHintShownCount:o+ +!!s,voiceLangHintLastLanguage:e.code}))}return{type:`text`,value:`Voice mode enabled (${C}). Hold ${x} to record.${S}`}}}))();export{v as call};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{f as t,s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{d as i,s as a}from"./debug-UI3T040K.js";import{o,s}from"./log-CzsijfHZ.js";import{i as c,o as l}from"./platform-CuyedWpe.js";import{readFile as u}from"fs/promises";import{spawn as d,spawnSync as f}from"child_process";function p(){return O??(O=(async()=>{let e=Date.now(),t=await import(`./src-DzH9IdOo.js`);return t.isNativeAudioAvailable(),D=t,i(`[voice] audio-capture-napi loaded in ${Date.now()-e}ms`),t})()),O}function m(e){return f(e,[`--version`],{stdio:`ignore`,timeout:3e3}).error===void 0}function h(){return N??(N=new Promise(e=>{let t=d(`arecord`,[`-f`,`S16_LE`,`-r`,String(k),`-c`,String(A),`-t`,`raw`,`/dev/null`],{stdio:[`ignore`,`ignore`,`pipe`]}),n=``;t.stderr?.on(`data`,e=>{n+=e.toString()});let r=setTimeout((e,t)=>{e.kill(`SIGTERM`),t({ok:!0,stderr:``})},150,t,e);t.once(`close`,t=>{clearTimeout(r),e({ok:t===0,stderr:n.trim()})}),t.once(`error`,()=>{clearTimeout(r),e({ok:!1,stderr:`arecord: command not found`})})})),N}function g(){N=null}function _(){return P??(P=u(`/proc/asound/cards`,`utf8`).then(e=>{let t=e.trim();return t!==``&&!t.includes(`no soundcards`)},()=>!1)),P}function v(){P=null}function y(){if(process.platform===`darwin`)return m(`brew`)?{cmd:`brew`,args:[`install`,`sox`],displayCommand:`brew install sox`}:null;if(process.platform===`linux`){if(m(`apt-get`))return{cmd:`sudo`,args:[`apt-get`,`install`,`-y`,`sox`],displayCommand:`sudo apt-get install sox`};if(m(`dnf`))return{cmd:`sudo`,args:[`dnf`,`install`,`-y`,`sox`],displayCommand:`sudo dnf install sox`};if(m(`pacman`))return{cmd:`sudo`,args:[`pacman`,`-S`,`--noconfirm`,`sox`],displayCommand:`sudo pacman -S sox`}}return null}async function b(){if((await p()).isNativeAudioAvailable())return{available:!0,missing:[],installCommand:null};if(process.platform===`win32`)return{available:!1,missing:[`Voice mode requires the native audio module (not loaded)`],installCommand:null};if(process.platform===`linux`&&m(`arecord`))return{available:!0,missing:[],installCommand:null};let e=[];m(`rec`)||e.push(`sox (rec command)`);let t=e.length>0?y():null;return{available:e.length===0,missing:e,installCommand:t?.displayCommand??null}}async function x(){return(await p()).isNativeAudioAvailable()?await C(e=>{},()=>{},{silenceDetection:!1})?(E(),!0):!1:!0}async function S(){if(t()||r(process.env.CLAUDE_CODE_REMOTE))return{available:!1,reason:`Voice mode requires microphone access, but no audio device is available in this environment.
|
|
2
|
+
|
|
3
|
+
To use voice mode, run Claude Code locally instead.`};if((await p()).isNativeAudioAvailable())return{available:!0,reason:null};if(process.platform===`win32`)return{available:!1,reason:`Voice recording requires the native audio module, which could not be loaded.`};let e=`Voice mode could not access an audio device in WSL.
|
|
4
|
+
|
|
5
|
+
WSL2 with WSLg (Windows 11) provides audio via PulseAudio — if you are on Windows 10 or WSL1, run Claude Code in native Windows instead.`;if(process.platform===`linux`&&m(`arecord`)){let t=await h();if(t.ok)return{available:!0,reason:null};if(c()===`wsl`)return{available:!1,reason:e};i(`[voice] arecord probe failed: ${t.stderr}`)}if(!m(`rec`)){if(c()===`wsl`)return{available:!1,reason:e};let t=y();return{available:!1,reason:t?`Voice mode requires SoX for audio recording. Install it with: ${t.displayCommand}`:`Voice mode requires SoX for audio recording. Install SoX manually:
|
|
6
|
+
macOS: brew install sox
|
|
7
|
+
Ubuntu/Debian: sudo apt-get install sox
|
|
8
|
+
Fedora: sudo dnf install sox`}}return{available:!0,reason:null}}async function C(e,t,n){i(`[voice] startRecording called, platform=${process.platform}`);let r=await p(),a=r.isNativeAudioAvailable()&&(process.platform!==`linux`||await _()),o=n?.silenceDetection!==!1;return a&&((I||r.isNativeRecordingActive())&&(r.stopNativeRecording(),I=!1),r.startNativeRecording(t=>{e(t)},()=>{o&&(I=!1,t())}))?(I=!0,!0):process.platform===`win32`?(i(`[voice] Windows native recording unavailable, no fallback`),!1):process.platform===`linux`&&m(`arecord`)&&(await h()).ok?T(e,t):w(e,t,n)}function w(e,t,n){let r=n?.silenceDetection!==!1,i=[`-q`,`--buffer`,`1024`,`-t`,`raw`,`-r`,String(k),`-e`,`signed`,`-b`,`16`,`-c`,String(A),`-`];r&&i.push(`silence`,`1`,`0.1`,M,`1`,j,M);let a=d(`rec`,i,{stdio:[`pipe`,`pipe`,`pipe`]});return F=a,a.stdout?.on(`data`,t=>{e(t)}),a.stderr?.on(`data`,()=>{}),a.on(`close`,()=>{F=null,t()}),a.on(`error`,e=>{s(e),F=null,t()}),!0}function T(e,t){let n=d(`arecord`,[`-f`,`S16_LE`,`-r`,String(k),`-c`,String(A),`-t`,`raw`,`-q`,`-`],{stdio:[`pipe`,`pipe`,`pipe`]});return F=n,n.stdout?.on(`data`,t=>{e(t)}),n.stderr?.on(`data`,()=>{}),n.on(`close`,()=>{F=null,t()}),n.on(`error`,e=>{s(e),F=null,t()}),!0}function E(){if(I&&D){D.stopNativeRecording(),I=!1;return}F&&(F.kill(`SIGTERM`),F=null)}var D,O,k,A,j,M,N,P,F,I;e((()=>{a(),n(),o(),l(),D=null,O=null,k=16e3,A=1,j=`2.0`,M=`3%`,N=null,P=null,F=null,I=!1}))();export{v as _resetAlsaCardsForTesting,g as _resetArecordProbeForTesting,S as checkRecordingAvailability,b as checkVoiceDependencies,x as requestMicrophonePermission,C as startRecording,E as stopRecording};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{Jt as t,S as n,_ as r,cn as i,on as a}from"./paths-Q2255dD7.js";function o(){return!r(`tengu_amber_quartz_disabled`,!1)}function s(){return i()?!!t()?.accessToken:!1}function c(){return s()&&o()}function l(){return o()}var u=e((()=>{n(),a()}));export{c as a,o as i,u as n,l as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t,n}from"./voiceModeEnabled-CPQUE3PU.js";n();export{t as isVoiceGrowthBookEnabled,e as isVoiceModeEnabled};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t}from"./voiceStreamSTT-Dr_wH1Kh.js";t();export{e as isVoiceStreamAvailable};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,r as n}from"./wrapper-D5qL1aQL.js";import{Jt as r,Pt as i,S as a,St as o,_ as s,cn as c,on as l,wt as u}from"./paths-Q2255dD7.js";import{E as d,T as f,d as p,s as m,w as h}from"./debug-UI3T040K.js";import{l as g,u as _}from"./oauth-CdZEzMww.js";import{o as v,s as y}from"./log-CzsijfHZ.js";import{c as b,g as x,h as S,l as C,u as w}from"./proxy-CfZp-wce.js";function T(){if(!c())return!1;let e=r();return e!==null&&e.accessToken!==null}async function E(e,t){await i();let a=r();if(!a?.accessToken)return p(`[voice_stream] No OAuth token available`),null;let c=process.env.VOICE_STREAM_BASE_URL||g().BASE_API_URL.replace(`https://`,`wss://`).replace(`http://`,`ws://`);process.env.VOICE_STREAM_BASE_URL&&p(`[voice_stream] Using VOICE_STREAM_BASE_URL override: ${process.env.VOICE_STREAM_BASE_URL}`);let l=new URLSearchParams({encoding:`linear16`,sample_rate:`16000`,channels:`1`,endpointing_ms:`300`,utterance_end_ms:`1000`,language:t?.language??`en`}),u=s(`tengu_cobalt_frost`,!1);if(u&&(l.set(`use_conversation_engine`,`true`),l.set(`stt_provider`,`deepgram-nova3`),p(`[voice_stream] Nova 3 gate enabled (tengu_cobalt_frost)`)),t?.keyterms?.length)for(let e of t.keyterms)l.append(`keyterms`,e);let m=`${c}${k}?${l.toString()}`;p(`[voice_stream] Connecting to ${m}`);let h={Authorization:`Bearer ${a.accessToken}`,"User-Agent":o(),"x-app":`cli`},_=S(),v=new n(m,typeof Bun<`u`?{headers:h,proxy:C(m),tls:_||void 0}:{headers:h,agent:b(m),..._}),x=null,w=!1,T=!1,E=!1,M=!1,N=null,P=null,F={send(e){if(v.readyState===n.OPEN){if(T){p(`[voice_stream] Dropping audio chunk after CloseStream: ${String(e.length)} bytes`);return}p(`[voice_stream] Sending audio chunk: ${String(e.length)} bytes`),v.send(Buffer.from(e))}},finalize(){return E||T?Promise.resolve(`ws_already_closed`):(E=!0,new Promise(t=>{let r=setTimeout(()=>N?.(`safety_timeout`),j.safety),i=setTimeout(()=>N?.(`no_data_timeout`),j.noData);if(P=()=>{clearTimeout(i),P=null},N=n=>{if(clearTimeout(r),clearTimeout(i),N=null,P=null,I){p(`[voice_stream] Promoting unreported interim before ${n} resolve`);let t=I;I=``,e.onTranscript(t,!0)}p(`[voice_stream] Finalize resolved via ${n}`),t(n)},v.readyState===n.CLOSED||v.readyState===n.CLOSING){N(`ws_already_closed`);return}setTimeout(()=>{T=!0,v.readyState===n.OPEN&&(p(`[voice_stream] Sending CloseStream (finalize)`),v.send(O))},0)}))},close(){T=!0,x&&(clearInterval(x),x=null),w=!1,v.readyState===n.OPEN&&v.close()},isConnected(){return w&&v.readyState===n.OPEN}};v.on(`open`,()=>{p(`[voice_stream] WebSocket connected`),w=!0,p(`[voice_stream] Sending initial KeepAlive`),v.send(D),x=setInterval(e=>{e.readyState===n.OPEN&&(p(`[voice_stream] Sending periodic KeepAlive`),e.send(D))},A,v),e.onReady(F)});let I=``;return v.on(`message`,t=>{let n=t.toString();p(`[voice_stream] Message received (${String(n.length)} chars): ${n.slice(0,200)}`);let r;try{r=f(n)}catch{return}switch(r.type){case`TranscriptText`:{let t=r.data;if(p(`[voice_stream] TranscriptText: "${t??``}"`),T&&P?.(),t){if(!u&&I){let n=I.trimStart(),r=t.trimStart();n&&r&&!r.startsWith(n)&&!n.startsWith(r)&&(p(`[voice_stream] Auto-finalizing previous segment (new segment detected): "${I}"`),e.onTranscript(I,!0))}I=t,e.onTranscript(t,!1)}break}case`TranscriptEndpoint`:{p(`[voice_stream] TranscriptEndpoint received, lastTranscriptText="${I}"`);let t=I;I=``,t&&e.onTranscript(t,!0),T&&N?.(`post_closestream_endpoint`);break}case`TranscriptError`:{let t=r.description??r.error_code??`unknown transcription error`;p(`[voice_stream] TranscriptError: ${t}`),E||e.onError(t);break}case`error`:{let t=r.message??d(r);p(`[voice_stream] Server error: ${t}`),E||e.onError(t);break}default:break}}),v.on(`close`,(t,n)=>{let r=n?.toString()??``;if(p(`[voice_stream] WebSocket closed: code=${String(t)} reason="${r}"`),w=!1,x&&(clearInterval(x),x=null),I){p(`[voice_stream] Promoting unreported interim transcript to final on close`);let t=I;I=``,e.onTranscript(t,!0)}N?.(`ws_close`),!E&&!M&&t!==1e3&&t!==1005&&e.onError(`Connection closed: code ${String(t)}${r?` — ${r}`:``}`),e.onClose()}),v.on(`unexpected-response`,(t,n)=>{let r=n.statusCode??0;if(r===101){p(`[voice_stream] unexpected-response fired with 101; ignoring`);return}p(`[voice_stream] Upgrade rejected: status=${String(r)} cf-mitigated=${String(n.headers[`cf-mitigated`])} cf-ray=${String(n.headers[`cf-ray`])}`),M=!0,n.resume(),t.destroy(),!E&&e.onError(`WebSocket upgrade rejected with HTTP ${String(r)}`,{fatal:r>=400&&r<500})}),v.on(`error`,t=>{y(t),p(`[voice_stream] WebSocket error: ${t.message}`),E||e.onError(`Voice stream connection error: ${t.message}`)}),F}var D,O,k,A,j,M=e((()=>{t(),_(),l(),m(),u(),v(),x(),w(),h(),a(),D=`{"type":"KeepAlive"}`,O=`{"type":"CloseStream"}`,k=`/api/ws/speech_to_text/voice_stream`,A=8e3,j={safety:5e3,noData:1500}}));export{T as i,E as n,M as r,j as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{r as t,t as n}from"./execa-CGue6Z3n.js";import{n as r,t as i}from"./execSyncWrapper-C2XQnFVo.js";async function a(e){if(process.platform===`win32`){let t=await n(`where.exe ${e}`,{shell:!0,stderr:`ignore`,reject:!1});return t.exitCode!==0||!t.stdout?null:t.stdout.trim().split(/\r?\n/)[0]||null}let t=await n(`which ${e}`,{shell:!0,stderr:`ignore`,reject:!1});return t.exitCode!==0||!t.stdout?null:t.stdout.trim()}function o(e){if(process.platform===`win32`)try{return i(`where.exe ${e}`,{encoding:`utf-8`,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim().split(/\r?\n/)[0]||null}catch{return null}try{return i(`which ${e}`,{encoding:`utf-8`,stdio:[`ignore`,`pipe`,`ignore`]}).toString().trim()||null}catch{return null}}var s,c,l,u=e((()=>{t(),r(),s=typeof Bun<`u`&&typeof Bun.which==`function`?Bun.which:null,c=s?async e=>s(e):a,l=s??o}));export{c as n,l as r,u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,n as t}from"./windowsPaths-swxCp7bX.js";t();export{e as setShellIfWindows};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./memoize-DNnuA2aU.js";import{d as r,s as i}from"./debug-UI3T040K.js";import{n as a,t as o}from"./cwd--iizewsn.js";import{n as s,t as c}from"./execSyncWrapper-C2XQnFVo.js";import{i as l,o as u}from"./platform-CuyedWpe.js";import{n as d,t as f}from"./memoize-DxwLawI2.js";import*as p from"path";import{existsSync as m}from"fs";import*as h from"path/win32";function g(e){return m(e)}function _(e){if(e===`git`){for(let e of[`C:\\Program Files\\Git\\cmd\\git.exe`,`C:\\Program Files (x86)\\Git\\cmd\\git.exe`])if(g(e))return e}try{let t=c(`where.exe ${e}`,{stdio:`pipe`,encoding:`utf8`}).trim().split(`\r
|
|
2
|
+
`).filter(Boolean),n=o().toLowerCase();for(let e of t){let t=p.resolve(e).toLowerCase();if(p.dirname(t).toLowerCase()===n||t.startsWith(n+p.sep)){r(`Skipping potentially malicious executable in current directory: ${e}`);continue}return e}return null}catch{return null}}function v(){if(l()===`windows`){let e=y();process.env.SHELL=e,process.env.CLAUDE_CODE_GIT_BASH_PATH=e,r(`Using bash path: "${e}"`)}}var y,b,x,S=e((()=>{n(),a(),i(),s(),f(),u(),y=t(()=>{if(process.env.CLAUDE_CODE_GIT_BASH_PATH){if(g(process.env.CLAUDE_CODE_GIT_BASH_PATH))return process.env.CLAUDE_CODE_GIT_BASH_PATH;console.error(`Claude Code was unable to find CLAUDE_CODE_GIT_BASH_PATH path "${process.env.CLAUDE_CODE_GIT_BASH_PATH}"`),process.exit(1)}let e=_(`git`);if(e){let t=h.join(e,`..`,`..`,`bin`,`bash.exe`);if(g(t))return t}console.error(`Claude Code on Windows requires git-bash (https://git-scm.com/downloads/win). If installed but not in PATH, set environment variable pointing to your bash.exe, similar to: CLAUDE_CODE_GIT_BASH_PATH=C:\\Program Files\\Git\\bin\\bash.exe`),process.exit(1)}),b=d(e=>{if(e.startsWith(`\\\\`))return e.replace(/\\/g,`/`);let t=e.match(/^([A-Za-z]):[/\\]/);return t?`/`+t[1].toLowerCase()+e.slice(2).replace(/\\/g,`/`):e.replace(/\\/g,`/`)},e=>e,500),x=d(e=>{if(e.startsWith(`//`))return e.replace(/\//g,`\\`);let t=e.match(/^\/cygdrive\/([A-Za-z])(\/|$)/);if(t){let n=t[1].toUpperCase(),r=e.slice((`/cygdrive/`+t[1]).length);return n+`:`+(r||`\\`).replace(/\//g,`\\`)}let n=e.match(/^\/([A-Za-z])(\/|$)/);if(n){let t=n[1].toUpperCase(),r=e.slice(2);return t+`:`+(r||`\\`).replace(/\//g,`\\`)}return e.replace(/\//g,`\\`)},e=>e,500)}));export{b as a,v as i,S as n,x as r,y as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./axios-DhfaybwJ.js";import{E as n,T as r,w as i}from"./debug-UI3T040K.js";t(),i();function a(e){let t=r(Buffer.from(e,`base64url`).toString(`utf-8`));if(!t||typeof t!=`object`||!(`version`in t)||t.version!==1)throw Error(`Unsupported work secret version: ${t&&typeof t==`object`&&`version`in t?t.version:`unknown`}`);let n=t;if(typeof n.session_ingress_token!=`string`||n.session_ingress_token.length===0)throw Error(`Invalid work secret: missing or empty session_ingress_token`);if(typeof n.api_base_url!=`string`)throw Error(`Invalid work secret: missing api_base_url`);return t}function o(e,t){let n=e.includes(`localhost`)||e.includes(`127.0.0.1`),r=e.startsWith(`https`)?`wss`:`ws`,i=n?`v2`:`v1`;return`${r}://${e.replace(/^https?:\/\//,``).replace(/\/+$/,``)}/${i}/session_ingress/ws/${t}`}function s(e,t){if(e===t)return!0;let n=e.slice(e.lastIndexOf(`_`)+1),r=t.slice(t.lastIndexOf(`_`)+1);return n.length>=4&&n===r}function c(e,t){return`${e.replace(/\/+$/,``)}/v1/code/sessions/${t}`}async function l(t,r){let i=await e.post(`${t}/worker/register`,{},{headers:{Authorization:`Bearer ${r}`,"Content-Type":`application/json`,"anthropic-version":`2023-06-01`},timeout:1e4}),a=i.data?.worker_epoch,o=typeof a==`string`?Number(a):a;if(typeof o!=`number`||!Number.isFinite(o)||!Number.isSafeInteger(o))throw Error(`registerWorker: invalid worker_epoch in response: ${n(i.data)}`);return o}export{s as a,l as i,o as n,a as r,c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Jt as e,on as t}from"./paths-Q2255dD7.js";import{L as n,V as r}from"./debug-UI3T040K.js";import{o as i,t as a}from"./bridgeMain-BimZwc2P.js";import{resolve as o}from"path";t(),r();var s=78,c=1;async function l(e){if(!e){console.error(`Error: --daemon-worker requires a worker kind`),process.exitCode=s;return}switch(e){case`remoteControl`:await u();break;default:console.error(`Error: unknown daemon worker kind '${e}'`),process.exitCode=s}}async function u(){let t=process.env.DAEMON_WORKER_DIR||o(`.`),r=process.env.DAEMON_WORKER_NAME||void 0,l=process.env.DAEMON_WORKER_SPAWN_MODE||`same-dir`,u=parseInt(process.env.DAEMON_WORKER_CAPACITY||`4`,10),d=process.env.DAEMON_WORKER_PERMISSION||void 0,f=process.env.DAEMON_WORKER_SANDBOX===`1`,p=process.env.DAEMON_WORKER_TIMEOUT_MS?parseInt(process.env.DAEMON_WORKER_TIMEOUT_MS,10):void 0,m=process.env.DAEMON_WORKER_CREATE_SESSION!==`0`,h=new AbortController,g=()=>h.abort();process.on(`SIGTERM`,g),process.on(`SIGINT`,g);let _={dir:t,name:r,spawnMode:l,capacity:u,permissionMode:d,sandbox:f,sessionTimeoutMs:p,createSessionOnStart:m,getAccessToken:()=>e()?.accessToken,onAuth401:async t=>!!e()?.accessToken,log:e=>{console.log(`[remoteControl] ${e}`)}};try{await i(_,h.signal)}catch(e){e instanceof a?(console.error(`[remoteControl] permanent error: ${e.message}`),process.exitCode=s):(console.error(`[remoteControl] transient error: ${n(e)}`),process.exitCode=c)}finally{process.off(`SIGTERM`,g),process.off(`SIGINT`,g)}}export{l as runDaemonWorker};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{wt as e,yt as t}from"./loadAgentsDir-Ci5mr0vm.js";e();export{t as execIntoTmuxWorktree};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";function t(){return!0}var n=e((()=>{}));export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./worktreeModeEnabled-Db6b_Iy_.js";t();export{e as isWorktreeModeEnabled};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t}from"./wrapper-D5qL1aQL.js";e();export{t as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as e,i as t,n,o as r,r as i,t as a}from"./chunk-DR8-3Aex.js";var o=a(((e,t)=>{var n=[`nodebuffer`,`arraybuffer`,`fragments`],r=typeof Blob<`u`;r&&n.push(`blob`),t.exports={BINARY_TYPES:n,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:`258EAFA5-E914-47DA-95CA-C5AB0DC85B11`,hasBlob:r,kForOnEventAttribute:Symbol(`kIsForOnEventAttribute`),kListener:Symbol(`kListener`),kStatusCode:Symbol(`status-code`),kWebSocket:Symbol(`websocket`),NOOP:()=>{}}})),s=i({default:()=>c}),c,l=n((()=>{throw c={},Error(`Could not resolve "bufferutil" imported by "ws". Is it installed?`)})),u=a(((t,n)=>{var{EMPTY_BUFFER:r}=o(),i=Buffer[Symbol.species];function a(e,t){if(e.length===0)return r;if(e.length===1)return e[0];let n=Buffer.allocUnsafe(t),a=0;for(let t=0;t<e.length;t++){let r=e[t];n.set(r,a),a+=r.length}return a<t?new i(n.buffer,n.byteOffset,a):n}function c(e,t,n,r,i){for(let a=0;a<i;a++)n[r+a]=e[a]^t[a&3]}function u(e,t){for(let n=0;n<e.length;n++)e[n]^=t[n&3]}function d(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function f(e){if(f.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new i(e):ArrayBuffer.isView(e)?t=new i(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),f.readOnly=!1),t}if(n.exports={concat:a,mask:c,toArrayBuffer:d,toBuffer:f,unmask:u},!process.env.WS_NO_BUFFER_UTIL)try{let t=(l(),e(s));n.exports.mask=function(e,n,r,i,a){a<48?c(e,n,r,i,a):t.mask(e,n,r,i,a)},n.exports.unmask=function(e,n){e.length<32?u(e,n):t.unmask(e,n)}}catch{}})),d=a(((e,t)=>{var n=Symbol(`kDone`),r=Symbol(`kRun`);t.exports=class{constructor(e){this[n]=()=>{this.pending--,this[r]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[r]()}[r](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[n])}}}})),f=a(((e,n)=>{var r=t(`zlib`),i=u(),a=d(),{kStatusCode:s}=o(),c=Buffer[Symbol.species],l=Buffer.from([0,0,255,255]),f=Symbol(`permessage-deflate`),p=Symbol(`total-length`),m=Symbol(`callback`),h=Symbol(`buffers`),g=Symbol(`error`),_;n.exports=class{constructor(e){this._options=e||{},this._threshold=this._options.threshold===void 0?1024:this._options.threshold,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,_||(_=new a(this._options.concurrencyLimit===void 0?10:this._options.concurrencyLimit))}static get extensionName(){return`permessage-deflate`}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits??(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[m];this._deflate.close(),this._deflate=null,e&&e(Error(`The deflate stream was closed while data was being processed`))}}acceptAsServer(e){let t=this._options,n=e.find(e=>!(t.serverNoContextTakeover===!1&&e.server_no_context_takeover||e.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits==`number`&&t.serverMaxWindowBits>e.server_max_window_bits)||typeof t.clientMaxWindowBits==`number`&&!e.client_max_window_bits));if(!n)throw Error(`None of the extension offers can be accepted`);return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),typeof t.serverMaxWindowBits==`number`&&(n.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits==`number`?n.client_max_window_bits=t.clientMaxWindowBits:(n.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete n.client_max_window_bits,n}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw Error(`Unexpected parameter "client_no_context_takeover"`);if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits==`number`&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits==`number`&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error(`Unexpected or invalid parameter "client_max_window_bits"`);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let n=e[t];if(n.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(n=n[0],t===`client_max_window_bits`){if(n!==!0){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else if(t===`server_max_window_bits`){let e=+n;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(t===`client_no_context_takeover`||t===`server_no_context_takeover`){if(n!==!0)throw TypeError(`Invalid value for parameter "${t}": ${n}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=n})}),e}decompress(e,t,n){_.add(r=>{this._decompress(e,t,(e,t)=>{r(),n(e,t)})})}compress(e,t,n){_.add(r=>{this._compress(e,t,(e,t)=>{r(),n(e,t)})})}_decompress(e,t,n){let a=this._isServer?`client`:`server`;if(!this._inflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:r.Z_DEFAULT_WINDOWBITS;this._inflate=r.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[f]=this,this._inflate[p]=0,this._inflate[h]=[],this._inflate.on(`error`,b),this._inflate.on(`data`,y)}this._inflate[m]=n,this._inflate.write(e),t&&this._inflate.write(l),this._inflate.flush(()=>{let e=this._inflate[g];if(e){this._inflate.close(),this._inflate=null,n(e);return}let r=i.concat(this._inflate[h],this._inflate[p]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[p]=0,this._inflate[h]=[],t&&this.params[`${a}_no_context_takeover`]&&this._inflate.reset()),n(null,r)})}_compress(e,t,n){let a=this._isServer?`server`:`client`;if(!this._deflate){let e=`${a}_max_window_bits`,t=typeof this.params[e]==`number`?this.params[e]:r.Z_DEFAULT_WINDOWBITS;this._deflate=r.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[p]=0,this._deflate[h]=[],this._deflate.on(`data`,v)}this._deflate[m]=n,this._deflate.write(e),this._deflate.flush(r.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=i.concat(this._deflate[h],this._deflate[p]);t&&(e=new c(e.buffer,e.byteOffset,e.length-4)),this._deflate[m]=null,this._deflate[p]=0,this._deflate[h]=[],t&&this.params[`${a}_no_context_takeover`]&&this._deflate.reset(),n(null,e)})}};function v(e){this[h].push(e),this[p]+=e.length}function y(e){if(this[p]+=e.length,this[f]._maxPayload<1||this[p]<=this[f]._maxPayload){this[h].push(e);return}this[g]=RangeError(`Max payload size exceeded`),this[g].code=`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`,this[g][s]=1009,this.removeListener(`data`,y),this.reset()}function b(e){if(this[f]._inflate=null,this[g]){this[m](this[g]);return}e[s]=1007,this[m](e)}})),p=i({default:()=>m}),m,h=n((()=>{throw m={},Error(`Could not resolve "utf-8-validate" imported by "ws". Is it installed?`)})),g=a(((n,r)=>{var{isUtf8:i}=t(`buffer`),{hasBlob:a}=o(),s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function c(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function l(e){let t=e.length,n=0;for(;n<t;)if(!(e[n]&128))n++;else if((e[n]&224)==192){if(n+1===t||(e[n+1]&192)!=128||(e[n]&254)==192)return!1;n+=2}else if((e[n]&240)==224){if(n+2>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||e[n]===224&&(e[n+1]&224)==128||e[n]===237&&(e[n+1]&224)==160)return!1;n+=3}else if((e[n]&248)==240){if(n+3>=t||(e[n+1]&192)!=128||(e[n+2]&192)!=128||(e[n+3]&192)!=128||e[n]===240&&(e[n+1]&240)==128||e[n]===244&&e[n+1]>143||e[n]>244)return!1;n+=4}else return!1;return!0}function u(e){return a&&typeof e==`object`&&typeof e.arrayBuffer==`function`&&typeof e.type==`string`&&typeof e.stream==`function`&&(e[Symbol.toStringTag]===`Blob`||e[Symbol.toStringTag]===`File`)}if(r.exports={isBlob:u,isValidStatusCode:c,isValidUTF8:l,tokenChars:s},i)r.exports.isValidUTF8=function(e){return e.length<24?l(e):i(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=(h(),e(p));r.exports.isValidUTF8=function(e){return e.length<32?l(e):t(e)}}catch{}})),_=a(((e,n)=>{var{Writable:r}=t(`stream`),i=f(),{BINARY_TYPES:a,EMPTY_BUFFER:s,kStatusCode:c,kWebSocket:l}=o(),{concat:d,toArrayBuffer:p,unmask:m}=u(),{isValidStatusCode:h,isValidUTF8:_}=g(),v=Buffer[Symbol.species],y=0,b=1,x=2,S=3,C=4,w=5,T=6;n.exports=class extends r{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents===void 0?!0:e.allowSynchronousEvents,this._binaryType=e.binaryType||a[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[l]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=y}_write(e,t,n){if(this._opcode===8&&this._state==y)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new v(t.buffer,t.byteOffset+e,t.length-e),new v(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new v(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case y:this.getInfo(e);break;case b:this.getPayloadLength16(e);break;case x:this.getPayloadLength64(e);break;case S:this.getMask();break;case C:this.getData(e);break;case w:case T:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if(t[0]&48){e(this.createError(RangeError,`RSV2 and RSV3 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_2_3`));return}let n=(t[0]&64)==64;if(n&&!this._extensions[i.extensionName]){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._fin=(t[0]&128)==128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(!this._fragmented){e(this.createError(RangeError,`invalid opcode 0`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}this._compressed=n}else if(this._opcode>7&&this._opcode<11){if(!this._fin){e(this.createError(RangeError,`FIN must be set`,!0,1002,`WS_ERR_EXPECTED_FIN`));return}if(n){e(this.createError(RangeError,`RSV1 must be clear`,!0,1002,`WS_ERR_UNEXPECTED_RSV_1`));return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,`WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH`));return}}else{e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,`WS_ERR_INVALID_OPCODE`));return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)==128,this._isServer){if(!this._masked){e(this.createError(RangeError,`MASK must be set`,!0,1002,`WS_ERR_EXPECTED_MASK`));return}}else if(this._masked){e(this.createError(RangeError,`MASK must be clear`,!0,1002,`WS_ERR_UNEXPECTED_MASK`));return}this._payloadLength===126?this._state=b:this._payloadLength===127?this._state=x:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),n=t.readUInt32BE(0);if(n>2**21-1){e(this.createError(RangeError,`Unsupported WebSocket frame: payload length > 2^53 - 1`,!1,1009,`WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH`));return}this._payloadLength=n*2**32+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){e(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}this._masked?this._state=S:this._state=C}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=C}getData(e){let t=s;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&m(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=w,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,(e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){t(this.createError(RangeError,`Max payload size exceeded`,!1,1009,`WS_ERR_UNSUPPORTED_MESSAGE_LENGTH`));return}this._fragments.push(n)}this.dataMessage(t),this._state===y&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=y;return}let t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let r;r=this._binaryType===`nodebuffer`?d(n,t):this._binaryType===`arraybuffer`?p(d(n,t)):this._binaryType===`blob`?new Blob(n):n,this._allowSynchronousEvents?(this.emit(`message`,r,!0),this._state=y):(this._state=T,setImmediate(()=>{this.emit(`message`,r,!0),this._state=y,this.startLoop(e)}))}else{let r=d(n,t);if(!this._skipUTF8Validation&&!_(r)){e(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._state===w||this._allowSynchronousEvents?(this.emit(`message`,r,!1),this._state=y):(this._state=T,setImmediate(()=>{this.emit(`message`,r,!1),this._state=y,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit(`conclude`,1005,s),this.end();else{let n=e.readUInt16BE(0);if(!h(n)){t(this.createError(RangeError,`invalid status code ${n}`,!0,1002,`WS_ERR_INVALID_CLOSE_CODE`));return}let r=new v(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!_(r)){t(this.createError(Error,`invalid UTF-8 sequence`,!0,1007,`WS_ERR_INVALID_UTF8`));return}this._loop=!1,this.emit(`conclude`,n,r),this.end()}this._state=y;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?`ping`:`pong`,e),this._state=y):(this._state=T,setImmediate(()=>{this.emit(this._opcode===9?`ping`:`pong`,e),this._state=y,this.startLoop(t)}))}createError(e,t,n,r,i){this._loop=!1,this._errored=!0;let a=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=i,a[c]=r,a}}})),v=a(((e,n)=>{var{Duplex:r}=t(`stream`),{randomFillSync:i}=t(`crypto`),a=f(),{EMPTY_BUFFER:s,kWebSocket:c,NOOP:l}=o(),{isBlob:d,isValidStatusCode:p}=g(),{mask:m,toBuffer:h}=u(),_=Symbol(`kByteLength`),v=Buffer.alloc(4),y=8*1024,b,x=y,S=0,C=1,w=2;n.exports=class e{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=S,this.onerror=l,this[c]=void 0}static frame(e,t){let n,r=!1,a=2,o=!1;t.mask&&(n=t.maskBuffer||v,t.generateMask?t.generateMask(n):(x===y&&(b===void 0&&(b=Buffer.alloc(y)),i(b,0,y),x=0),n[0]=b[x++],n[1]=b[x++],n[2]=b[x++],n[3]=b[x++]),o=(n[0]|n[1]|n[2]|n[3])===0,a=6);let s;typeof e==`string`?(!t.mask||o)&&t[_]!==void 0?s=t[_]:(e=Buffer.from(e),s=e.length):(s=e.length,r=t.mask&&t.readOnly&&!o);let c=s;s>=65536?(a+=8,c=127):s>125&&(a+=2,c=126);let l=Buffer.allocUnsafe(r?s+a:a);return l[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(l[0]|=64),l[1]=c,c===126?l.writeUInt16BE(s,2):c===127&&(l[2]=l[3]=0,l.writeUIntBE(s,4,6)),!t.mask||(l[1]|=128,l[a-4]=n[0],l[a-3]=n[1],l[a-2]=n[2],l[a-1]=n[3],o)?[l,e]:r?(m(e,n,l,a,s),[l]):(m(e,n,e,0,s),[l,e])}close(t,n,r,i){let a;if(t===void 0)a=s;else if(typeof t!=`number`||!p(t))throw TypeError(`First argument must be a valid error code number`);else if(n===void 0||!n.length)a=Buffer.allocUnsafe(2),a.writeUInt16BE(t,0);else{let e=Buffer.byteLength(n);if(e>123)throw RangeError(`The message must not be greater than 123 bytes`);a=Buffer.allocUnsafe(2+e),a.writeUInt16BE(t,0),typeof n==`string`?a.write(n,2):a.set(n,2)}let o={[_]:a.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state===S?this.sendFrame(e.frame(a,o),i):this.enqueue([this.dispatch,a,!1,o,i])}ping(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):d(t)?(i=t.size,a=!1):(t=h(t),i=t.length,a=h.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[_]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};d(t)?this._state===S?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===S?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}pong(t,n,r){let i,a;if(typeof t==`string`?(i=Buffer.byteLength(t),a=!1):d(t)?(i=t.size,a=!1):(t=h(t),i=t.length,a=h.readOnly),i>125)throw RangeError(`The data size must not be greater than 125 bytes`);let o={[_]:i,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};d(t)?this._state===S?this.getBlobData(t,!1,o,r):this.enqueue([this.getBlobData,t,!1,o,r]):this._state===S?this.sendFrame(e.frame(t,o),r):this.enqueue([this.dispatch,t,!1,o,r])}send(e,t,n){let r=this._extensions[a.extensionName],i=t.binary?2:1,o=t.compress,s,c;typeof e==`string`?(s=Buffer.byteLength(e),c=!1):d(e)?(s=e.size,c=!1):(e=h(e),s=e.length,c=h.readOnly),this._firstFragment?(this._firstFragment=!1,o&&r&&r.params[r._isServer?`server_no_context_takeover`:`client_no_context_takeover`]&&(o=s>=r._threshold),this._compress=o):(o=!1,i=0),t.fin&&(this._firstFragment=!0);let l={[_]:s,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:i,readOnly:c,rsv1:o};d(e)?this._state===S?this.getBlobData(e,this._compress,l,n):this.enqueue([this.getBlobData,e,this._compress,l,n]):this._state===S?this.dispatch(e,this._compress,l,n):this.enqueue([this.dispatch,e,this._compress,l,n])}getBlobData(t,n,r,i){this._bufferedBytes+=r[_],this._state=w,t.arrayBuffer().then(t=>{if(this._socket.destroyed){let e=Error(`The socket was closed while the blob was being read`);process.nextTick(T,this,e,i);return}this._bufferedBytes-=r[_];let a=h(t);n?this.dispatch(a,n,r,i):(this._state=S,this.sendFrame(e.frame(a,r),i),this.dequeue())}).catch(e=>{process.nextTick(E,this,e,i)})}dispatch(t,n,r,i){if(!n){this.sendFrame(e.frame(t,r),i);return}let o=this._extensions[a.extensionName];this._bufferedBytes+=r[_],this._state=C,o.compress(t,r.fin,(t,n)=>{if(this._socket.destroyed){T(this,Error(`The socket was closed while data was being compressed`),i);return}this._bufferedBytes-=r[_],this._state=S,r.readOnly=!1,this.sendFrame(e.frame(n,r),i),this.dequeue()})}dequeue(){for(;this._state===S&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][_],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][_],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};function T(e,t,n){typeof n==`function`&&n(t);for(let n=0;n<e._queue.length;n++){let r=e._queue[n],i=r[r.length-1];typeof i==`function`&&i(t)}}function E(e,t,n){T(e,t,n),e.onerror(t)}})),y=a(((e,t)=>{var{kForOnEventAttribute:n,kListener:r}=o(),i=Symbol(`kCode`),a=Symbol(`kData`),s=Symbol(`kError`),c=Symbol(`kMessage`),l=Symbol(`kReason`),u=Symbol(`kTarget`),d=Symbol(`kType`),f=Symbol(`kWasClean`),p=class{constructor(e){this[u]=null,this[d]=e}get target(){return this[u]}get type(){return this[d]}};Object.defineProperty(p.prototype,`target`,{enumerable:!0}),Object.defineProperty(p.prototype,`type`,{enumerable:!0});var m=class extends p{constructor(e,t={}){super(e),this[i]=t.code===void 0?0:t.code,this[l]=t.reason===void 0?``:t.reason,this[f]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[i]}get reason(){return this[l]}get wasClean(){return this[f]}};Object.defineProperty(m.prototype,`code`,{enumerable:!0}),Object.defineProperty(m.prototype,`reason`,{enumerable:!0}),Object.defineProperty(m.prototype,`wasClean`,{enumerable:!0});var h=class extends p{constructor(e,t={}){super(e),this[s]=t.error===void 0?null:t.error,this[c]=t.message===void 0?``:t.message}get error(){return this[s]}get message(){return this[c]}};Object.defineProperty(h.prototype,`error`,{enumerable:!0}),Object.defineProperty(h.prototype,`message`,{enumerable:!0});var g=class extends p{constructor(e,t={}){super(e),this[a]=t.data===void 0?null:t.data}get data(){return this[a]}};Object.defineProperty(g.prototype,`data`,{enumerable:!0}),t.exports={CloseEvent:m,ErrorEvent:h,Event:p,EventTarget:{addEventListener(e,t,i={}){for(let a of this.listeners(e))if(!i[n]&&a[r]===t&&!a[n])return;let a;if(e===`message`)a=function(e,n){let r=new g(`message`,{data:n?e:e.toString()});r[u]=this,_(t,this,r)};else if(e===`close`)a=function(e,n){let r=new m(`close`,{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[u]=this,_(t,this,r)};else if(e===`error`)a=function(e){let n=new h(`error`,{error:e,message:e.message});n[u]=this,_(t,this,n)};else if(e===`open`)a=function(){let e=new p(`open`);e[u]=this,_(t,this,e)};else return;a[n]=!!i[n],a[r]=t,i.once?this.once(e,a):this.on(e,a)},removeEventListener(e,t){for(let i of this.listeners(e))if(i[r]===t&&!i[n]){this.removeListener(e,i);break}}},MessageEvent:g};function _(e,t,n){typeof e==`object`&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}})),b=a(((e,t)=>{var{tokenChars:n}=g();function r(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}function i(e){let t=Object.create(null),i=Object.create(null),a=!1,o=!1,s=!1,c,l,u=-1,d=-1,f=-1,p=0;for(;p<e.length;p++)if(d=e.charCodeAt(p),c===void 0)if(f===-1&&n[d]===1)u===-1&&(u=p);else if(p!==0&&(d===32||d===9))f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);d===44?(r(t,n,i),i=Object.create(null)):c=n,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`);else if(l===void 0)if(f===-1&&n[d]===1)u===-1&&(u=p);else if(d===32||d===9)f===-1&&u!==-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p),r(i,e.slice(u,f),!0),d===44&&(r(t,c,i),i=Object.create(null),c=void 0),u=f=-1}else if(d===61&&u!==-1&&f===-1)l=e.slice(u,p),u=f=-1;else throw SyntaxError(`Unexpected character at index ${p}`);else if(o){if(n[d]!==1)throw SyntaxError(`Unexpected character at index ${p}`);u===-1?u=p:a||(a=!0),o=!1}else if(s)if(n[d]===1)u===-1&&(u=p);else if(d===34&&u!==-1)s=!1,f=p;else if(d===92)o=!0;else throw SyntaxError(`Unexpected character at index ${p}`);else if(d===34&&e.charCodeAt(p-1)===61)s=!0;else if(f===-1&&n[d]===1)u===-1&&(u=p);else if(u!==-1&&(d===32||d===9))f===-1&&(f=p);else if(d===59||d===44){if(u===-1)throw SyntaxError(`Unexpected character at index ${p}`);f===-1&&(f=p);let n=e.slice(u,f);a&&(n=n.replace(/\\/g,``),a=!1),r(i,l,n),d===44&&(r(t,c,i),i=Object.create(null),c=void 0),l=void 0,u=f=-1}else throw SyntaxError(`Unexpected character at index ${p}`);if(u===-1||s||d===32||d===9)throw SyntaxError(`Unexpected end of input`);f===-1&&(f=p);let m=e.slice(u,f);return c===void 0?r(t,m,i):(l===void 0?r(i,m,!0):a?r(i,l,m.replace(/\\/g,``)):r(i,l,m),r(t,c,i)),t}function a(e){return Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>[t].concat(Object.keys(e).map(t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map(e=>e===!0?t:`${t}=${e}`).join(`; `)})).join(`; `)).join(`, `)}).join(`, `)}t.exports={format:a,parse:i}})),x=a(((e,n)=>{var r=t(`events`),i=t(`https`),a=t(`http`),s=t(`net`),c=t(`tls`),{randomBytes:l,createHash:d}=t(`crypto`),{Duplex:p,Readable:m}=t(`stream`),{URL:h}=t(`url`),x=f(),S=_(),C=v(),{isBlob:w}=g(),{BINARY_TYPES:T,CLOSE_TIMEOUT:E,EMPTY_BUFFER:D,GUID:O,kForOnEventAttribute:k,kListener:A,kStatusCode:j,kWebSocket:M,NOOP:N}=o(),{EventTarget:{addEventListener:P,removeEventListener:ee}}=y(),{format:te,parse:ne}=b(),{toBuffer:F}=u(),I=Symbol(`kAborted`),L=[8,13],R=[`CONNECTING`,`OPEN`,`CLOSING`,`CLOSED`],z=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,B=class e extends r{constructor(t,n,r){super(),this._binaryType=T[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=D,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol=``,this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t===null?(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0):(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,n===void 0?n=[]:Array.isArray(n)||(typeof n==`object`&&n?(r=n,n=[]):n=[n]),V(this,t,n,r))}get binaryType(){return this._binaryType}set binaryType(e){T.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,n,r){let i=new S({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),a=new C(t,this._extensions,r.generateMask);this._receiver=i,this._sender=a,this._socket=t,i[M]=this,a[M]=this,t[M]=this,i.on(`conclude`,re),i.on(`drain`,ie),i.on(`error`,ae),i.on(`message`,oe),i.on(`ping`,se),i.on(`pong`,ce),a.onerror=le,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),n.length>0&&t.unshift(n),t.on(`close`,X),t.on(`data`,Z),t.on(`end`,Q),t.on(`error`,$),this._readyState=e.OPEN,this.emit(`open`)}emitClose(){if(!this._socket){this._readyState=e.CLOSED,this.emit(`close`,this._closeCode,this._closeMessage);return}this._extensions[x.extensionName]&&this._extensions[x.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit(`close`,this._closeCode,this._closeMessage)}close(t,n){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){G(this,this._req,`WebSocket was closed before the connection was established`);return}if(this.readyState===e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=e.CLOSING,this._sender.close(t,n,!this._isServer,e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Y(this)}}pause(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof t==`function`?(r=t,t=n=void 0):typeof n==`function`&&(r=n,n=void 0),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){K(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.ping(t||D,n,r)}pong(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof t==`function`?(r=t,t=n=void 0):typeof n==`function`&&(r=n,n=void 0),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){K(this,t,r);return}n===void 0&&(n=!this._isServer),this._sender.pong(t||D,n,r)}resume(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,n,r){if(this.readyState===e.CONNECTING)throw Error(`WebSocket is not open: readyState 0 (CONNECTING)`);if(typeof n==`function`&&(r=n,n={}),typeof t==`number`&&(t=t.toString()),this.readyState!==e.OPEN){K(this,t,r);return}let i={binary:typeof t!=`string`,mask:!this._isServer,compress:!0,fin:!0,...n};this._extensions[x.extensionName]||(i.compress=!1),this._sender.send(t||D,i,r)}terminate(){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){G(this,this._req,`WebSocket was closed before the connection was established`);return}this._socket&&(this._readyState=e.CLOSING,this._socket.destroy())}}};Object.defineProperty(B,`CONNECTING`,{enumerable:!0,value:R.indexOf(`CONNECTING`)}),Object.defineProperty(B.prototype,`CONNECTING`,{enumerable:!0,value:R.indexOf(`CONNECTING`)}),Object.defineProperty(B,`OPEN`,{enumerable:!0,value:R.indexOf(`OPEN`)}),Object.defineProperty(B.prototype,`OPEN`,{enumerable:!0,value:R.indexOf(`OPEN`)}),Object.defineProperty(B,`CLOSING`,{enumerable:!0,value:R.indexOf(`CLOSING`)}),Object.defineProperty(B.prototype,`CLOSING`,{enumerable:!0,value:R.indexOf(`CLOSING`)}),Object.defineProperty(B,`CLOSED`,{enumerable:!0,value:R.indexOf(`CLOSED`)}),Object.defineProperty(B.prototype,`CLOSED`,{enumerable:!0,value:R.indexOf(`CLOSED`)}),[`binaryType`,`bufferedAmount`,`extensions`,`isPaused`,`protocol`,`readyState`,`url`].forEach(e=>{Object.defineProperty(B.prototype,e,{enumerable:!0})}),[`open`,`error`,`close`,`message`].forEach(e=>{Object.defineProperty(B.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[k])return t[A];return null},set(t){for(let t of this.listeners(e))if(t[k]){this.removeListener(e,t);break}typeof t==`function`&&this.addEventListener(e,t,{[k]:!0})}})}),B.prototype.addEventListener=P,B.prototype.removeEventListener=ee,n.exports=B;function V(e,t,n,r){let o={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:E,protocolVersion:L[1],maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:`GET`,host:void 0,path:void 0,port:void 0};if(e._autoPong=o.autoPong,e._closeTimeout=o.closeTimeout,!L.includes(o.protocolVersion))throw RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${L.join(`, `)})`);let s;if(t instanceof h)s=t;else try{s=new h(t)}catch{throw SyntaxError(`Invalid URL: ${t}`)}s.protocol===`http:`?s.protocol=`ws:`:s.protocol===`https:`&&(s.protocol=`wss:`),e._url=s.href;let c=s.protocol===`wss:`,u=s.protocol===`ws+unix:`,f;if(s.protocol!==`ws:`&&!c&&!u?f=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:u&&!s.pathname?f=`The URL's pathname is empty`:s.hash&&(f=`The URL contains a fragment identifier`),f){let t=SyntaxError(f);if(e._redirects===0)throw t;H(e,t);return}let p=c?443:80,m=l(16).toString(`base64`),g=c?i.request:a.request,_=new Set,v;if(o.createConnection=o.createConnection||(c?W:U),o.defaultPort=o.defaultPort||p,o.port=s.port||p,o.host=s.hostname.startsWith(`[`)?s.hostname.slice(1,-1):s.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":m,Connection:`Upgrade`,Upgrade:`websocket`},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(v=new x({...o.perMessageDeflate,isServer:!1,maxPayload:o.maxPayload}),o.headers[`Sec-WebSocket-Extensions`]=te({[x.extensionName]:v.offer()})),n.length){for(let e of n){if(typeof e!=`string`||!z.test(e)||_.has(e))throw SyntaxError(`An invalid or duplicated subprotocol was specified`);_.add(e)}o.headers[`Sec-WebSocket-Protocol`]=n.join(`,`)}if(o.origin&&(o.protocolVersion<13?o.headers[`Sec-WebSocket-Origin`]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),u){let e=o.path.split(`:`);o.socketPath=e[0],o.path=e[1]}let y;if(o.followRedirects){if(e._redirects===0){e._originalIpc=u,e._originalSecure=c,e._originalHostOrSocketPath=u?o.socketPath:s.host;let t=r&&r.headers;if(r={...r,headers:{}},t)for(let[e,n]of Object.entries(t))r.headers[e.toLowerCase()]=n}else if(e.listenerCount(`redirect`)===0){let t=u?e._originalIpc?o.socketPath===e._originalHostOrSocketPath:!1:e._originalIpc?!1:s.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!c)&&(delete o.headers.authorization,delete o.headers.cookie,t||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization=`Basic `+Buffer.from(o.auth).toString(`base64`)),y=e._req=g(o),e._redirects&&e.emit(`redirect`,e.url,y)}else y=e._req=g(o);o.timeout&&y.on(`timeout`,()=>{G(e,y,`Opening handshake has timed out`)}),y.on(`error`,t=>{y===null||y[I]||(y=e._req=null,H(e,t))}),y.on(`response`,i=>{let a=i.headers.location,s=i.statusCode;if(a&&o.followRedirects&&s>=300&&s<400){if(++e._redirects>o.maxRedirects){G(e,y,`Maximum redirects exceeded`);return}y.abort();let i;try{i=new h(a,t)}catch{H(e,SyntaxError(`Invalid URL: ${a}`));return}V(e,i,n,r)}else e.emit(`unexpected-response`,y,i)||G(e,y,`Unexpected server response: ${i.statusCode}`)}),y.on(`upgrade`,(t,n,r)=>{if(e.emit(`upgrade`,t),e.readyState!==B.CONNECTING)return;y=e._req=null;let i=t.headers.upgrade;if(i===void 0||i.toLowerCase()!==`websocket`){G(e,n,`Invalid Upgrade header`);return}let a=d(`sha1`).update(m+O).digest(`base64`);if(t.headers[`sec-websocket-accept`]!==a){G(e,n,`Invalid Sec-WebSocket-Accept header`);return}let s=t.headers[`sec-websocket-protocol`],c;if(s===void 0?_.size&&(c=`Server sent no subprotocol`):_.size?_.has(s)||(c=`Server sent an invalid subprotocol`):c=`Server sent a subprotocol but none was requested`,c){G(e,n,c);return}s&&(e._protocol=s);let l=t.headers[`sec-websocket-extensions`];if(l!==void 0){if(!v){G(e,n,`Server sent a Sec-WebSocket-Extensions header but no extension was requested`);return}let t;try{t=ne(l)}catch{G(e,n,`Invalid Sec-WebSocket-Extensions header`);return}let r=Object.keys(t);if(r.length!==1||r[0]!==x.extensionName){G(e,n,`Server indicated an extension that was not requested`);return}try{v.accept(t[x.extensionName])}catch{G(e,n,`Invalid Sec-WebSocket-Extensions header`);return}e._extensions[x.extensionName]=v}e.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})}),o.finishRequest?o.finishRequest(y,e):y.end()}function H(e,t){e._readyState=B.CLOSING,e._errorEmitted=!0,e.emit(`error`,t),e.emitClose()}function U(e){return e.path=e.socketPath,s.connect(e)}function W(e){return e.path=void 0,!e.servername&&e.servername!==``&&(e.servername=s.isIP(e.host)?``:e.host),c.connect(e)}function G(e,t,n){e._readyState=B.CLOSING;let r=Error(n);Error.captureStackTrace(r,G),t.setHeader?(t[I]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(H,e,r)):(t.destroy(r),t.once(`error`,e.emit.bind(e,`error`)),t.once(`close`,e.emitClose.bind(e)))}function K(e,t,n){if(t){let n=w(t)?t.size:F(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){let t=Error(`WebSocket is not open: readyState ${e.readyState} (${R[e.readyState]})`);process.nextTick(n,t)}}function re(e,t){let n=this[M];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,n._socket[M]!==void 0&&(n._socket.removeListener(`data`,Z),process.nextTick(J,n._socket),e===1005?n.close():n.close(e,t))}function ie(){let e=this[M];e.isPaused||e._socket.resume()}function ae(e){let t=this[M];t._socket[M]!==void 0&&(t._socket.removeListener(`data`,Z),process.nextTick(J,t._socket),t.close(e[j])),t._errorEmitted||(t._errorEmitted=!0,t.emit(`error`,e))}function q(){this[M].emitClose()}function oe(e,t){this[M].emit(`message`,e,t)}function se(e){let t=this[M];t._autoPong&&t.pong(e,!this._isServer,N),t.emit(`ping`,e)}function ce(e){this[M].emit(`pong`,e)}function J(e){e.resume()}function le(e){let t=this[M];t.readyState!==B.CLOSED&&(t.readyState===B.OPEN&&(t._readyState=B.CLOSING,Y(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit(`error`,e)))}function Y(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),e._closeTimeout)}function X(){let e=this[M];if(this.removeListener(`close`,X),this.removeListener(`data`,Z),this.removeListener(`end`,Q),e._readyState=B.CLOSING,!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&this._readableState.length!==0){let t=this.read(this._readableState.length);e._receiver.write(t)}e._receiver.end(),this[M]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on(`error`,q),e._receiver.on(`finish`,q))}function Z(e){this[M]._receiver.write(e)||this.pause()}function Q(){let e=this[M];e._readyState=B.CLOSING,e._receiver.end(),this.end()}function $(){let e=this[M];this.removeListener(`error`,$),this.on(`error`,N),e&&(e._readyState=B.CLOSING,this.destroy())}})),S=a(((e,n)=>{x();var{Duplex:r}=t(`stream`);function i(e){e.emit(`close`)}function a(){!this.destroyed&&this._writableState.finished&&this.destroy()}function o(e){this.removeListener(`error`,o),this.destroy(),this.listenerCount(`error`)===0&&this.emit(`error`,e)}function s(e,t){let n=!0,s=new r({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on(`message`,function(t,n){let r=!n&&s._readableState.objectMode?t.toString():t;s.push(r)||e.pause()}),e.once(`error`,function(e){s.destroyed||(n=!1,s.destroy(e))}),e.once(`close`,function(){s.destroyed||s.push(null)}),s._destroy=function(t,r){if(e.readyState===e.CLOSED){r(t),process.nextTick(i,s);return}let a=!1;e.once(`error`,function(e){a=!0,r(e)}),e.once(`close`,function(){a||r(t),process.nextTick(i,s)}),n&&e.terminate()},s._final=function(t){if(e.readyState===e.CONNECTING){e.once(`open`,function(){s._final(t)});return}e._socket!==null&&(e._socket._writableState.finished?(t(),s._readableState.endEmitted&&s.destroy()):(e._socket.once(`finish`,function(){t()}),e.close()))},s._read=function(){e.isPaused&&e.resume()},s._write=function(t,n,r){if(e.readyState===e.CONNECTING){e.once(`open`,function(){s._write(t,n,r)});return}e.send(t,r)},s.on(`end`,a),s.on(`error`,o),s}n.exports=s})),C=a(((e,t)=>{var{tokenChars:n}=g();function r(e){let t=new Set,r=-1,i=-1,a=0;for(;a<e.length;a++){let o=e.charCodeAt(a);if(i===-1&&n[o]===1)r===-1&&(r=a);else if(a!==0&&(o===32||o===9))i===-1&&r!==-1&&(i=a);else if(o===44){if(r===-1)throw SyntaxError(`Unexpected character at index ${a}`);i===-1&&(i=a);let n=e.slice(r,i);if(t.has(n))throw SyntaxError(`The "${n}" subprotocol is duplicated`);t.add(n),r=i=-1}else throw SyntaxError(`Unexpected character at index ${a}`)}if(r===-1||i!==-1)throw SyntaxError(`Unexpected end of input`);let o=e.slice(r,a);if(t.has(o))throw SyntaxError(`The "${o}" subprotocol is duplicated`);return t.add(o),t}t.exports={parse:r}})),w=a(((e,n)=>{var r=t(`events`),i=t(`http`),{Duplex:a}=t(`stream`),{createHash:s}=t(`crypto`),c=b(),l=f(),u=C(),d=x(),{CLOSE_TIMEOUT:p,GUID:m,kWebSocket:h}=o(),g=/^[+/0-9A-Za-z]{22}==$/,_=0,v=1,y=2;n.exports=class extends r{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:p,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:d,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw TypeError(`One and only one of the "port", "server", or "noServer" options must be specified`);if(e.port==null?e.server&&(this._server=e.server):(this._server=i.createServer((e,t)=>{let n=i.STATUS_CODES[426];t.writeHead(426,{"Content-Length":n.length,"Content-Type":`text/plain`}),t.end(n)}),this._server.listen(e.port,e.host,e.backlog,t)),this._server){let e=this.emit.bind(this,`connection`);this._removeListeners=S(this._server,{listening:this.emit.bind(this,`listening`),error:this.emit.bind(this,`error`),upgrade:(t,n,r)=>{this.handleUpgrade(t,n,r,e)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=_}address(){if(this.options.noServer)throw Error(`The server is operating in "noServer" mode`);return this._server?this._server.address():null}close(e){if(this._state===y){e&&this.once(`close`,()=>{e(Error(`The server is not running`))}),process.nextTick(w,this);return}if(e&&this.once(`close`,e),this._state!==v)if(this._state=v,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(w,this);else{let e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close(()=>{w(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf(`?`);if((t===-1?e.url:e.url.slice(0,t))!==this.options.path)return!1}return!0}handleUpgrade(e,t,n,r){t.on(`error`,T);let i=e.headers[`sec-websocket-key`],a=e.headers.upgrade,o=+e.headers[`sec-websocket-version`];if(e.method!==`GET`){D(this,e,t,405,`Invalid HTTP method`);return}if(a===void 0||a.toLowerCase()!==`websocket`){D(this,e,t,400,`Invalid Upgrade header`);return}if(i===void 0||!g.test(i)){D(this,e,t,400,`Missing or invalid Sec-WebSocket-Key header`);return}if(o!==13&&o!==8){D(this,e,t,400,`Missing or invalid Sec-WebSocket-Version header`,{"Sec-WebSocket-Version":`13, 8`});return}if(!this.shouldHandle(e)){E(t,400);return}let s=e.headers[`sec-websocket-protocol`],d=new Set;if(s!==void 0)try{d=u.parse(s)}catch{D(this,e,t,400,`Invalid Sec-WebSocket-Protocol header`);return}let f=e.headers[`sec-websocket-extensions`],p={};if(this.options.perMessageDeflate&&f!==void 0){let n=new l({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let e=c.parse(f);e[l.extensionName]&&(n.accept(e[l.extensionName]),p[l.extensionName]=n)}catch{D(this,e,t,400,`Invalid or unacceptable Sec-WebSocket-Extensions header`);return}}if(this.options.verifyClient){let a={origin:e.headers[`${o===8?`sec-websocket-origin`:`origin`}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(a,(a,o,s,c)=>{if(!a)return E(t,o||401,s,c);this.completeUpgrade(p,i,d,e,t,n,r)});return}if(!this.options.verifyClient(a))return E(t,401)}this.completeUpgrade(p,i,d,e,t,n,r)}completeUpgrade(e,t,n,r,i,a,o){if(!i.readable||!i.writable)return i.destroy();if(i[h])throw Error(`server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration`);if(this._state>_)return E(i,503);let u=[`HTTP/1.1 101 Switching Protocols`,`Upgrade: websocket`,`Connection: Upgrade`,`Sec-WebSocket-Accept: ${s(`sha1`).update(t+m).digest(`base64`)}`],d=new this.options.WebSocket(null,void 0,this.options);if(n.size){let e=this.options.handleProtocols?this.options.handleProtocols(n,r):n.values().next().value;e&&(u.push(`Sec-WebSocket-Protocol: ${e}`),d._protocol=e)}if(e[l.extensionName]){let t=e[l.extensionName].params,n=c.format({[l.extensionName]:[t]});u.push(`Sec-WebSocket-Extensions: ${n}`),d._extensions=e}this.emit(`headers`,u,r),i.write(u.concat(`\r
|
|
2
|
+
`).join(`\r
|
|
3
|
+
`)),i.removeListener(`error`,T),d.setSocket(i,a,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(d),d.on(`close`,()=>{this.clients.delete(d),this._shouldEmitClose&&!this.clients.size&&process.nextTick(w,this)})),o(d,r)}};function S(e,t){for(let n of Object.keys(t))e.on(n,t[n]);return function(){for(let n of Object.keys(t))e.removeListener(n,t[n])}}function w(e){e._state=y,e.emit(`close`)}function T(){this.destroy()}function E(e,t,n,r){n=n||i.STATUS_CODES[t],r={Connection:`close`,"Content-Type":`text/html`,"Content-Length":Buffer.byteLength(n),...r},e.once(`finish`,e.destroy),e.end(`HTTP/1.1 ${t} ${i.STATUS_CODES[t]}\r\n`+Object.keys(r).map(e=>`${e}: ${r[e]}`).join(`\r
|
|
4
|
+
`)+`\r
|
|
5
|
+
\r
|
|
6
|
+
`+n)}function D(e,t,n,r,i,a){if(e.listenerCount(`wsClientError`)){let r=Error(i);Error.captureStackTrace(r,D),e.emit(`wsClientError`,r,n,t)}else E(n,r,i,a)}})),T,E,D=n((()=>{S(),b(),f(),_(),v(),C(),T=r(x(),1),w(),E=T.default}));export{D as n,E as r,T as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{homedir as t}from"os";import{join as n,posix as r}from"path";function i(e){return{env:e?.env??process.env,home:e?.homedir??process.env.HOME??t()}}function a(e,...t){return e.includes(`/`)&&!e.includes(`\\`)&&!/^[A-Za-z]:/.test(e)?r.join(e,...t):n(e,...t)}function o(e){let{env:t,home:n}=i(e);return t.XDG_STATE_HOME??a(n,`.local`,`state`)}function s(e){let{env:t,home:n}=i(e);return t.XDG_CACHE_HOME??a(n,`.cache`)}function c(e){let{env:t,home:n}=i(e);return t.XDG_DATA_HOME??a(n,`.local`,`share`)}function l(e){let{home:t}=i(e);return a(t,`.local`,`bin`)}var u=e((()=>{}));export{u as a,o as i,s as n,c as r,l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-DR8-3Aex.js";import{ds as t,no as n,oo as r,xs as i}from"./paths-Q2255dD7.js";function a(e){d.set(e.name,e)}function o(e){return e.endsWith(`@${f}`)}function s(e){return d.get(e)}function c(){let e=n(),t=[],r=[];for(let[n,i]of d){if(i.isAvailable&&!i.isAvailable())continue;let a=`${n}@${f}`,o=e?.enabledPlugins?.[a],s=o===void 0?i.defaultEnabled??!0:o===!0,c={name:n,manifest:{name:n,description:i.description,version:i.version},path:f,source:a,repository:a,enabled:s,isBuiltin:!0,hooksConfig:i.hooks,mcpServers:i.mcpServers};s?t.push(c):r.push(c)}return{enabled:t,disabled:r}}function l(){let{enabled:e}=c(),t=[];for(let n of e){let e=d.get(n.name);if(e?.skills)for(let n of e.skills)t.push(u(n))}return t}function u(e){return{type:`prompt`,name:e.name,description:e.description,hasUserSpecifiedDescription:!0,allowedTools:e.allowedTools??[],argumentHint:e.argumentHint,whenToUse:e.whenToUse,model:e.model,disableModelInvocation:e.disableModelInvocation??!1,userInvocable:e.userInvocable??!0,contentLength:0,source:`bundled`,loadedFrom:`bundled`,hooks:e.hooks,context:e.context,agent:e.agent,isEnabled:e.isEnabled??(()=>!0),isHidden:!(e.userInvocable??!0),progressMessage:`running`,getPromptForCommand:e.getPromptForCommand}}var d,f,p=e((()=>{r(),d=new Map,f=`builtin`}));function m(e){if(e.includes(`@`)){let t=e.split(`@`);return{name:t[0]||``,marketplace:t[1]}}return{name:e}}function h(e){return e!==void 0&&t.has(e.toLowerCase())}function g(e){if(e===`managed`)throw Error(`Cannot install plugins to managed scope`);return y[e]}function _(e){return v[e]}var v,y,b=e((()=>{i(),v={policySettings:`managed`,userSettings:`user`,projectSettings:`project`,localSettings:`local`,flagSettings:`flag`},y={user:`userSettings`,project:`projectSettings`,local:`localSettings`}}));function x(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function S(e){return x(e).replace(/"/g,`"`).replace(/'/g,`'`)}var C=e((()=>{}));export{h as a,_ as c,l as d,c as f,a as h,b as i,f as l,o as m,S as n,m as o,p,C as r,g as s,x as t,s as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./chunk-DR8-3Aex.js";var n=t(((e,t)=>{function n(e){return Array.isArray(e)?e:[e]}var r=void 0,i=``,a=` `,o=`\\`,s=/^\s+$/,c=/(?:[^\\]|^)\\$/,l=/^\\!/,ee=/^\\#/,u=/\r?\n/g,te=/^\.{0,2}\/|^\.{1,2}$/,ne=/\/$/,d=`/`,f=`node-ignore`;typeof Symbol<`u`&&(f=Symbol.for(`node-ignore`));var p=f,m=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),h=/([0-z])-([0-z])/g,g=()=>!1,_=e=>e.replace(h,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:i),v=e=>{let{length:t}=e;return e.slice(0,t-t%2)},re=[[/^\uFEFF/,()=>i],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(n.indexOf(`\\`)===0?a:i)],[/(\\+?)\s/g,(e,t)=>{let{length:n}=t;return t.slice(0,n-n%2)+a}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>`[^/]`],[/^\//,()=>`^`],[/\//g,()=>`\\/`],[/^\^*\\\*\\\*\\\//,()=>`^(?:.*\\/)?`],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?`^`:`(?:^|\\/)`}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?`(?:\\/[^\\/]+)*`:`\\/.+`],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,`[^\\/]*`)],[/\\\\\\(?=[$.|*+(){^])/g,()=>o],[/\\\\/g,()=>o],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>t===o?`\\[${n}${v(r)}${i}`:i===`]`&&r.length%2==0?`[${_(n)}${r}]`:`[]`],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`]],ie=/(^|\\\/)?\\\*$/,y=`regex`,b=`checkRegex`,ae=`_`,oe={[y](e,t){return`${t?`${t}[^/]+`:`[^/]*`}(?=$|\\/$)`},[b](e,t){return`${t?`${t}[^/]*`:`[^/]*`}(?=$|\\/$)`}},x=e=>re.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e),S=e=>typeof e==`string`,C=e=>e&&S(e)&&!s.test(e)&&!c.test(e)&&e.indexOf(`#`)!==0,se=e=>e.split(u).filter(Boolean),ce=class{constructor(e,t,n,r,i,a){this.pattern=e,this.mark=t,this.negative=i,m(this,`body`,n),m(this,`ignoreCase`,r),m(this,`regexPrefix`,a)}get regex(){let e=ae+y;return this[e]?this[e]:this._make(y,e)}get checkRegex(){let e=ae+b;return this[e]?this[e]:this._make(b,e)}_make(e,t){let n=this.regexPrefix.replace(ie,oe[e]),r=this.ignoreCase?new RegExp(n,`i`):new RegExp(n);return m(this,t,r)}},le=({pattern:e,mark:t},n)=>{let r=!1,i=e;i.indexOf(`!`)===0&&(r=!0,i=i.substr(1)),i=i.replace(l,`!`).replace(ee,`#`);let a=x(i);return new ce(e,t,i,n,r,a)},ue=class{constructor(e){this._ignoreCase=e,this._rules=[]}_add(e){if(e&&e[p]){this._rules=this._rules.concat(e._rules._rules),this._added=!0;return}if(S(e)&&(e={pattern:e}),C(e.pattern)){let t=le(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,n(S(e)?se(e):e).forEach(this._add,this),this._added}test(e,t,n){let i=!1,a=!1,o;this._rules.forEach(s=>{let{negative:c}=s;a===c&&i!==a||c&&!i&&!a&&!t||s[n].test(e)&&(i=!c,a=c,o=c?r:s)});let s={ignored:i,unignored:a};return o&&(s.rule=o),s}},de=(e,t)=>{throw new t(e)},w=(e,t,n)=>S(e)?e?w.isNotRelative(e)?n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:n(`path must not be empty`,TypeError):n(`path must be a string, but got \`${t}\``,TypeError),fe=e=>te.test(e);w.isNotRelative=fe,w.convert=e=>e;var T=class{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){m(this,p,!0),this._rules=new ue(t),this._strictPathCheck=!n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(e){return this._rules.add(e)&&this._initCache(),this}addPattern(e){return this.add(e)}_test(e,t,n,r){let i=e&&w.convert(e);return w(i,e,this._strictPathCheck?de:g),this._t(i,t,n,r)}checkIgnore(e){if(!ne.test(e))return this.test(e);let t=e.split(d).filter(Boolean);if(t.pop(),t.length){let e=this._t(t.join(d)+d,this._testCache,!0,t);if(e.ignored)return e}return this._rules.test(e,!1,b)}_t(e,t,n,r){if(e in t)return t[e];if(r||(r=e.split(d).filter(Boolean)),r.pop(),!r.length)return t[e]=this._rules.test(e,n,y);let i=this._t(r.join(d)+d,t,n,r);return t[e]=i.ignored?i:this._rules.test(e,n,y)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return n(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},E=e=>new T(e),pe=e=>w(e&&w.convert(e),e,g),D=()=>{w.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,`/`);let e=/^[a-z]:\//i;w.isNotRelative=t=>e.test(t)||fe(t)};typeof process<`u`&&process.platform===`win32`&&D(),t.exports=E,E.default=E,t.exports.isPathValid=pe,m(t.exports,Symbol.for(`setupWindows`),D)})),r,i,a,o,s=e((()=>{(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(r||(r={})),(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(i||(i={})),a=r.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),o=e=>{switch(typeof e){case`undefined`:return a.undefined;case`string`:return a.string;case`number`:return Number.isNaN(e)?a.nan:a.number;case`boolean`:return a.boolean;case`function`:return a.function;case`bigint`:return a.bigint;case`symbol`:return a.symbol;case`object`:return Array.isArray(e)?a.array:e===null?a.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?a.promise:typeof Map<`u`&&e instanceof Map?a.map:typeof Set<`u`&&e instanceof Set?a.set:typeof Date<`u`&&e instanceof Date?a.date:a.object;default:return a.unknown}}})),c,l,ee=e((()=>{s(),c=r.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),l=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,r.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}},l.create=e=>new l(e)})),u,te=e((()=>{ee(),s(),u=(e,t)=>{let n;switch(e.code){case c.invalid_type:n=e.received===a.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case c.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,r.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:n=`Unrecognized key(s) in object: ${r.joinValues(e.keys,`, `)}`;break;case c.invalid_union:n=`Invalid input`;break;case c.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${r.joinValues(e.options)}`;break;case c.invalid_enum_value:n=`Invalid enum value. Expected ${r.joinValues(e.options)}, received '${e.received}'`;break;case c.invalid_arguments:n=`Invalid function arguments`;break;case c.invalid_return_type:n=`Invalid function return type`;break;case c.invalid_date:n=`Invalid date`;break;case c.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:r.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case c.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case c.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case c.custom:n=`Invalid input`;break;case c.invalid_intersection_types:n=`Intersection results could not be merged`;break;case c.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case c.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,r.assertNever(e)}return{message:n}}}));function ne(){return d}var d,f=e((()=>{te(),d=u}));function p(e,t){let n=ne(),r=m({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===u?void 0:u].filter(e=>!!e)});e.common.issues.push(r)}var m,h,g,_,v,re,ie,y,b,ae=e((()=>{f(),te(),m=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},h=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return g;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return g;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},g=Object.freeze({status:`aborted`}),_=e=>({status:`dirty`,value:e}),v=e=>({status:`valid`,value:e}),re=e=>e.status===`aborted`,ie=e=>e.status===`dirty`,y=e=>e.status===`valid`,b=e=>typeof Promise<`u`&&e instanceof Promise})),oe=e((()=>{})),x,S=e((()=>{(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(x||(x={}))}));function C(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}function se(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function ce(e){return RegExp(`^${se(e)}$`)}function le(e){let t=`${je}T${se(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function ue(e,t){return!!((t===`v4`||!t)&&Te.test(e)||(t===`v6`||!t)&&De.test(e))}function de(e,t){if(!be.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function w(e,t){return!!((t===`v4`||!t)&&Ee.test(e)||(t===`v6`||!t)&&Oe.test(e))}function fe(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}function T(e){if(e instanceof L){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=J.create(T(r))}return new L({...e._def,shape:()=>t})}else if(e instanceof I)return new I({...e._def,type:T(e.element)});else if(e instanceof J)return J.create(T(e.unwrap()));else if(e instanceof Y)return Y.create(T(e.unwrap()));else if(e instanceof V)return V.create(e.items.map(e=>T(e)));else return e}function E(e,t){let n=o(e),i=o(t);if(e===t)return{valid:!0,data:e};if(n===a.object&&i===a.object){let n=r.objectKeys(t),i=r.objectKeys(e).filter(e=>n.indexOf(e)!==-1),a={...e,...t};for(let n of i){let r=E(e[n],t[n]);if(!r.valid)return{valid:!1};a[n]=r.data}return{valid:!0,data:a}}else if(n===a.array&&i===a.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=E(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===a.date&&i===a.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}function pe(e,t){return new W({values:e,typeName:$.ZodEnum,...C(t)})}var D,me,O,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,k,Ne,Pe,Fe,A,j,M,N,Ie,P,F,Le,I,L,R,z,Re,B,V,ze,Be,Ve,He,H,U,W,G,K,q,J,Y,X,Z,Ue,We,Ge,Q,$,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt=e((()=>{ee(),f(),S(),ae(),s(),D=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},me=(e,t)=>{if(y(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){return this._error||(this._error=new l(e.common.issues)),this._error}}},O=class{get description(){return this._def.description}_getType(e){return o(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:o(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new h,ctx:{common:e.parent.common,data:e.data,parsedType:o(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(b(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:o(e)};return me(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:o(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return y(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>y(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:o(e)},r=this._parse({data:e,path:n.path,parent:n});return me(n,await(b(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:c.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new q({schema:this,typeName:$.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return J.create(this,this._def)}nullable(){return Y.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return I.create(this)}promise(){return K.create(this,this._def)}or(e){return R.create([this,e],this._def)}and(e){return B.create(this,e,this._def)}transform(e){return new q({...C(this._def),schema:this,typeName:$.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new X({...C(this._def),innerType:this,defaultValue:t,typeName:$.ZodDefault})}brand(){return new We({typeName:$.ZodBranded,type:this,...C(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new Z({...C(this._def),innerType:this,catchValue:t,typeName:$.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Ge.create(this,e)}readonly(){return Q.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},he=/^c[^\s-]{8,}$/i,ge=/^[0-9a-z]+$/,_e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ve=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ye=/^[a-z0-9_-]{21}$/i,be=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,xe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Se=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ce=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,Te=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ee=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,De=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Oe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ke=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ae=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,je=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,Me=RegExp(`^${je}$`),k=class e extends O{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==a.string){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.string,received:t.parsedType}),g}let t=new h,n;for(let i of this._def.checks)if(i.kind===`min`)e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_small,minimum:i.value,type:`string`,inclusive:!0,exact:!1,message:i.message}),t.dirty());else if(i.kind===`max`)e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_big,maximum:i.value,type:`string`,inclusive:!0,exact:!1,message:i.message}),t.dirty());else if(i.kind===`length`){let r=e.data.length>i.value,a=e.data.length<i.value;(r||a)&&(n=this._getOrReturnCtx(e,n),r?p(n,{code:c.too_big,maximum:i.value,type:`string`,inclusive:!0,exact:!0,message:i.message}):a&&p(n,{code:c.too_small,minimum:i.value,type:`string`,inclusive:!0,exact:!0,message:i.message}),t.dirty())}else if(i.kind===`email`)Se.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`email`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`emoji`)we||(we=new RegExp(Ce,`u`)),we.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`emoji`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`uuid`)ve.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`uuid`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`nanoid`)ye.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`nanoid`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`cuid`)he.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`cuid`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`cuid2`)ge.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`cuid2`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`ulid`)_e.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`ulid`,code:c.invalid_string,message:i.message}),t.dirty());else if(i.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),p(n,{validation:`url`,code:c.invalid_string,message:i.message}),t.dirty()}else i.kind===`regex`?(i.regex.lastIndex=0,i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`regex`,code:c.invalid_string,message:i.message}),t.dirty())):i.kind===`trim`?e.data=e.data.trim():i.kind===`includes`?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),t.dirty()):i.kind===`toLowerCase`?e.data=e.data.toLowerCase():i.kind===`toUpperCase`?e.data=e.data.toUpperCase():i.kind===`startsWith`?e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:{startsWith:i.value},message:i.message}),t.dirty()):i.kind===`endsWith`?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:{endsWith:i.value},message:i.message}),t.dirty()):i.kind===`datetime`?le(i).test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:`datetime`,message:i.message}),t.dirty()):i.kind===`date`?Me.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:`date`,message:i.message}),t.dirty()):i.kind===`time`?ce(i).test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{code:c.invalid_string,validation:`time`,message:i.message}),t.dirty()):i.kind===`duration`?xe.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`duration`,code:c.invalid_string,message:i.message}),t.dirty()):i.kind===`ip`?ue(e.data,i.version)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`ip`,code:c.invalid_string,message:i.message}),t.dirty()):i.kind===`jwt`?de(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`jwt`,code:c.invalid_string,message:i.message}),t.dirty()):i.kind===`cidr`?w(e.data,i.version)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`cidr`,code:c.invalid_string,message:i.message}),t.dirty()):i.kind===`base64`?ke.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`base64`,code:c.invalid_string,message:i.message}),t.dirty()):i.kind===`base64url`?Ae.test(e.data)||(n=this._getOrReturnCtx(e,n),p(n,{validation:`base64url`,code:c.invalid_string,message:i.message}),t.dirty()):r.assertNever(i);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:c.invalid_string,...x.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...x.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...x.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...x.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...x.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...x.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...x.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...x.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...x.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...x.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...x.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...x.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...x.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...x.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...x.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...x.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...x.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...x.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...x.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...x.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...x.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...x.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...x.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...x.errToObj(t)})}nonempty(e){return this.min(1,x.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}},k.create=e=>new k({checks:[],typeName:$.ZodString,coerce:e?.coerce??!1,...C(e)}),Ne=class e extends O{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==a.number){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.number,received:t.parsedType}),g}let t,n=new h;for(let i of this._def.checks)i.kind===`int`?r.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:c.invalid_type,expected:`integer`,received:`float`,message:i.message}),n.dirty()):i.kind===`min`?(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.too_small,minimum:i.value,type:`number`,inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind===`max`?(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.too_big,maximum:i.value,type:`number`,inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind===`multipleOf`?fe(e.data,i.value)!==0&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),p(t,{code:c.not_finite,message:i.message}),n.dirty()):r.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,x.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,x.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,x.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,x.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:x.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:x.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:x.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:x.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:x.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:x.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&r.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}},Ne.create=e=>new Ne({checks:[],typeName:$.ZodNumber,coerce:e?.coerce||!1,...C(e)}),Pe=class e extends O{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==a.bigint)return this._getInvalidInput(e);let t,n=new h;for(let i of this._def.checks)i.kind===`min`?(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.too_small,type:`bigint`,minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind===`max`?(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.too_big,type:`bigint`,maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind===`multipleOf`?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),p(t,{code:c.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):r.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.bigint,received:t.parsedType}),g}gte(e,t){return this.setLimit(`min`,e,!0,x.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,x.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,x.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,x.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:x.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:x.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:x.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:x.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:x.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:x.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}},Pe.create=e=>new Pe({checks:[],typeName:$.ZodBigInt,coerce:e?.coerce??!1,...C(e)}),Fe=class extends O{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==a.boolean){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.boolean,received:t.parsedType}),g}return v(e.data)}},Fe.create=e=>new Fe({typeName:$.ZodBoolean,coerce:e?.coerce||!1,...C(e)}),A=class e extends O{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==a.date){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.date,received:t.parsedType}),g}if(Number.isNaN(e.data.getTime()))return p(this._getOrReturnCtx(e),{code:c.invalid_date}),g;let t=new h,n;for(let i of this._def.checks)i.kind===`min`?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:`date`}),t.dirty()):i.kind===`max`?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),p(n,{code:c.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:`date`}),t.dirty()):r.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:x.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:x.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}},A.create=e=>new A({checks:[],coerce:e?.coerce||!1,typeName:$.ZodDate,...C(e)}),j=class extends O{_parse(e){if(this._getType(e)!==a.symbol){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.symbol,received:t.parsedType}),g}return v(e.data)}},j.create=e=>new j({typeName:$.ZodSymbol,...C(e)}),M=class extends O{_parse(e){if(this._getType(e)!==a.undefined){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.undefined,received:t.parsedType}),g}return v(e.data)}},M.create=e=>new M({typeName:$.ZodUndefined,...C(e)}),N=class extends O{_parse(e){if(this._getType(e)!==a.null){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.null,received:t.parsedType}),g}return v(e.data)}},N.create=e=>new N({typeName:$.ZodNull,...C(e)}),Ie=class extends O{constructor(){super(...arguments),this._any=!0}_parse(e){return v(e.data)}},Ie.create=e=>new Ie({typeName:$.ZodAny,...C(e)}),P=class extends O{constructor(){super(...arguments),this._unknown=!0}_parse(e){return v(e.data)}},P.create=e=>new P({typeName:$.ZodUnknown,...C(e)}),F=class extends O{_parse(e){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.never,received:t.parsedType}),g}},F.create=e=>new F({typeName:$.ZodNever,...C(e)}),Le=class extends O{_parse(e){if(this._getType(e)!==a.undefined){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.void,received:t.parsedType}),g}return v(e.data)}},Le.create=e=>new Le({typeName:$.ZodVoid,...C(e)}),I=class e extends O{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==a.array)return p(t,{code:c.invalid_type,expected:a.array,received:t.parsedType}),g;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(p(t,{code:e?c.too_big:c.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(p(t,{code:c.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(p(t,{code:c.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new D(t,e,t.path,n)))).then(e=>h.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new D(t,e,t.path,n)));return h.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:x.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:x.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:x.toString(n)}})}nonempty(e){return this.min(1,e)}},I.create=(e,t)=>new I({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...C(t)}),L=class e extends O{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape();return this._cached={shape:e,keys:r.objectKeys(e)},this._cached}_parse(e){if(this._getType(e)!==a.object){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.object,received:t.parsedType}),g}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof F&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||o.push(e);let s=[];for(let e of i){let t=r[e],i=n.data[e];s.push({key:{status:`valid`,value:e},value:t._parse(new D(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof F){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of o)s.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)o.length>0&&(p(n,{code:c.unrecognized_keys,keys:o}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of o){let r=n.data[t];s.push({key:{status:`valid`,value:t},value:e._parse(new D(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>h.mergeObjectSync(t,e)):h.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(t){return x.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:x.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of r.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of r.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return T(this)}partial(t){let n={};for(let e of r.objectKeys(this.shape)){let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of r.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof J;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return pe(r.objectKeys(this.shape))}},L.create=(e,t)=>new L({shape:()=>e,unknownKeys:`strip`,catchall:F.create(),typeName:$.ZodObject,...C(t)}),L.strictCreate=(e,t)=>new L({shape:()=>e,unknownKeys:`strict`,catchall:F.create(),typeName:$.ZodObject,...C(t)}),L.lazycreate=(e,t)=>new L({shape:e,unknownKeys:`strip`,catchall:F.create(),typeName:$.ZodObject,...C(t)}),R=class extends O{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new l(e.ctx.common.issues));return p(t,{code:c.invalid_union,unionErrors:n}),g}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new l(e));return p(t,{code:c.invalid_union,unionErrors:i}),g}}get options(){return this._def.options}},R.create=(e,t)=>new R({options:e,typeName:$.ZodUnion,...C(t)}),z=e=>e instanceof H?z(e.schema):e instanceof q?z(e.innerType()):e instanceof U?[e.value]:e instanceof W?e.options:e instanceof G?r.objectValues(e.enum):e instanceof X?z(e._def.innerType):e instanceof M?[void 0]:e instanceof N?[null]:e instanceof J?[void 0,...z(e.unwrap())]:e instanceof Y?[null,...z(e.unwrap())]:e instanceof We||e instanceof Q?z(e.unwrap()):e instanceof Z?z(e._def.innerType):[],Re=class e extends O{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==a.object)return p(t,{code:c.invalid_type,expected:a.object,received:t.parsedType}),g;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(p(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),g)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=z(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...C(r)})}},B=class extends O{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(re(e)||re(r))return g;let i=E(e.value,r.value);return i.valid?((ie(e)||ie(r))&&t.dirty(),{status:t.value,value:i.data}):(p(n,{code:c.invalid_intersection_types}),g)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}},B.create=(e,t,n)=>new B({left:e,right:t,typeName:$.ZodIntersection,...C(n)}),V=class e extends O{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==a.array)return p(n,{code:c.invalid_type,expected:a.array,received:n.parsedType}),g;if(n.data.length<this._def.items.length)return p(n,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),g;!this._def.rest&&n.data.length>this._def.items.length&&(p(n,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new D(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>h.mergeArray(t,e)):h.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}},V.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new V({items:e,typeName:$.ZodTuple,rest:null,...C(t)})},ze=class e extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==a.object)return p(n,{code:c.invalid_type,expected:a.object,received:n.parsedType}),g;let r=[],i=this._def.keyType,o=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new D(n,e,n.path,e)),value:o._parse(new D(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?h.mergeObjectAsync(t,r):h.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof O?new e({keyType:t,valueType:n,typeName:$.ZodRecord,...C(r)}):new e({keyType:k.create(),valueType:t,typeName:$.ZodRecord,...C(n)})}},Be=class extends O{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==a.map)return p(n,{code:c.invalid_type,expected:a.map,received:n.parsedType}),g;let r=this._def.keyType,i=this._def.valueType,o=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new D(n,e,n.path,[a,`key`])),value:i._parse(new D(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of o){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return g;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}else{let e=new Map;for(let n of o){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return g;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}},Be.create=(e,t,n)=>new Be({valueType:t,keyType:e,typeName:$.ZodMap,...C(n)}),Ve=class e extends O{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==a.set)return p(n,{code:c.invalid_type,expected:a.set,received:n.parsedType}),g;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(p(n,{code:c.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(p(n,{code:c.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function o(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return g;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let s=[...n.data.values()].map((e,t)=>i._parse(new D(n,e,n.path,t)));return n.common.async?Promise.all(s).then(e=>o(e)):o(s)}min(t,n){return new e({...this._def,minSize:{value:t,message:x.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:x.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}},Ve.create=(e,t)=>new Ve({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet,...C(t)}),He=class e extends O{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==a.function)return p(t,{code:c.invalid_type,expected:a.function,received:t.parsedType}),g;function n(e,n){return m({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ne(),u].filter(e=>!!e),issueData:{code:c.invalid_arguments,argumentsError:n}})}function r(e,n){return m({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ne(),u].filter(e=>!!e),issueData:{code:c.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof K){let e=this;return v(async function(...t){let a=new l([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw a.addIssue(n(t,e)),a}),c=await Reflect.apply(o,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw a.addIssue(r(c,e)),a})})}else{let e=this;return v(function(...t){let a=e._def.args.safeParse(t,i);if(!a.success)throw new l([n(t,a.error)]);let s=Reflect.apply(o,this,a.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new l([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:V.create(t).rest(P.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||V.create([]).rest(P.create()),returns:n||P.create(),typeName:$.ZodFunction,...C(r)})}},H=class extends O{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}},H.create=(e,t)=>new H({getter:e,typeName:$.ZodLazy,...C(t)}),U=class extends O{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return p(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),g}return{status:`valid`,value:e.data}}get value(){return this._def.value}},U.create=(e,t)=>new U({value:e,typeName:$.ZodLiteral,...C(t)}),W=class e extends O{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return p(t,{expected:r.joinValues(n),received:t.parsedType,code:c.invalid_type}),g}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return p(t,{received:t.data,code:c.invalid_enum_value,options:n}),g}return v(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}},W.create=pe,G=class extends O{_parse(e){let t=r.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==a.string&&n.parsedType!==a.number){let e=r.objectValues(t);return p(n,{expected:r.joinValues(e),received:n.parsedType,code:c.invalid_type}),g}if(this._cache||(this._cache=new Set(r.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=r.objectValues(t);return p(n,{received:n.data,code:c.invalid_enum_value,options:e}),g}return v(e.data)}get enum(){return this._def.values}},G.create=(e,t)=>new G({values:e,typeName:$.ZodNativeEnum,...C(t)}),K=class extends O{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==a.promise&&t.common.async===!1?(p(t,{code:c.invalid_type,expected:a.promise,received:t.parsedType}),g):v((t.parsedType===a.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}},K.create=(e,t)=>new K({type:e,typeName:$.ZodPromise,...C(t)}),q=class extends O{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,a={addIssue:e=>{p(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type===`preprocess`){let e=i.transform(n.data,a);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return g;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?g:r.status===`dirty`||t.value===`dirty`?_(r.value):r});{if(t.value===`aborted`)return g;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?g:r.status===`dirty`||t.value===`dirty`?_(r.value):r}}if(i.type===`refinement`){let e=e=>{let t=i.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?g:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?g:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(i.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!y(e))return g;let r=i.transform(e.value,a);if(r instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:r}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>y(e)?Promise.resolve(i.transform(e.value,a)).then(e=>({status:t.value,value:e})):g);r.assertNever(i)}},q.create=(e,t,n)=>new q({schema:e,typeName:$.ZodEffects,effect:t,...C(n)}),q.createWithPreprocess=(e,t,n)=>new q({schema:t,effect:{type:`preprocess`,transform:e},typeName:$.ZodEffects,...C(n)}),J=class extends O{_parse(e){return this._getType(e)===a.undefined?v(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},J.create=(e,t)=>new J({innerType:e,typeName:$.ZodOptional,...C(t)}),Y=class extends O{_parse(e){return this._getType(e)===a.null?v(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}},Y.create=(e,t)=>new Y({innerType:e,typeName:$.ZodNullable,...C(t)}),X=class extends O{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===a.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}},X.create=(e,t)=>new X({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...C(t)}),Z=class extends O{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return b(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new l(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new l(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}},Z.create=(e,t)=>new Z({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...C(t)}),Ue=class extends O{_parse(e){if(this._getType(e)!==a.nan){let t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:a.nan,received:t.parsedType}),g}return{status:`valid`,value:e.data}}},Ue.create=e=>new Ue({typeName:$.ZodNaN,...C(e)}),We=class extends O{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},Ge=class e extends O{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?g:e.status===`dirty`?(t.dirty(),_(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?g:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:$.ZodPipeline})}},Q=class extends O{_parse(e){let t=this._def.innerType._parse(e),n=e=>(y(e)&&(e.value=Object.freeze(e.value)),e);return b(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}},Q.create=(e,t)=>new Q({innerType:e,typeName:$.ZodReadonly,...C(t)}),L.lazycreate,(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})($||($={})),Ke=k.create,qe=Ne.create,Ue.create,Pe.create,Je=Fe.create,A.create,j.create,M.create,N.create,Ye=Ie.create,P.create,F.create,Le.create,Xe=I.create,Ze=L.create,Qe=L.strictCreate,$e=R.create,Re.create,B.create,V.create,et=ze.create,Be.create,Ve.create,He.create,H.create,tt=U.create,nt=W.create,G.create,K.create,q.create,J.create,Y.create,q.createWithPreprocess,Ge.create})),it=e((()=>{f(),ae(),oe(),s(),rt(),ee()})),at=e((()=>{it(),it()}));export{nt as a,Ze as c,Ke as d,$e as f,Je as i,et as l,Ye as n,tt as o,n as p,Xe as r,qe as s,at as t,Qe as u};
|