@readmagic/workmate 0.0.7 → 0.0.9
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-qFZy3FOD.js +1 -0
- package/dist/chunks/App-DW4elk6E.js +1 -0
- package/dist/chunks/ApproveApiKey-D05WywHU.js +1 -0
- package/dist/chunks/ApproveApiKey-DHAbdwkC.js +1 -0
- package/dist/chunks/BackgroundTasksDialog-QgFwoaaC.js +2 -0
- package/dist/chunks/BypassPermissionsModeDialog-BuRFF1fQ.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-CDrArsSX.js +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-DpecRCAt.js +1 -0
- package/dist/chunks/ConsoleOAuthFlow-D1MYL1dJ.js +1 -0
- package/dist/chunks/DiffDialog-BIcwpgSr.js +6 -0
- package/dist/chunks/Doctor-D160J8Ad.js +3 -0
- package/dist/chunks/Doctor-VhJi2cmL.js +1 -0
- package/dist/chunks/ExitFlow-CoWHhKHJ.js +2 -0
- package/dist/chunks/Grove-BmirUB6V.js +11 -0
- package/dist/chunks/{HybridTransport-rK83Qijz.js → HybridTransport-BVmSUHf0.js} +3 -3
- package/dist/chunks/InvalidConfigDialog-WRywkKeS.js +1 -0
- package/dist/chunks/InvalidSettingsDialog-C4n3A72C.js +1 -0
- package/dist/chunks/MCPConnectionManager-DPFe4hPh.js +1 -0
- package/dist/chunks/MCPToolListView-BPmE0C2o.js +1 -0
- package/dist/chunks/McpParsingWarnings-CH4yyMAL.js +1 -0
- package/dist/chunks/MessageSelector-kOn2GaU-.js +3 -0
- package/dist/chunks/Messages-4EnHFeh1.js +11 -0
- package/dist/chunks/Onboarding-BboWs1pp.js +1 -0
- package/dist/chunks/{PermissionDialog-0ya1CU5k.js → PermissionDialog-Cb3z8OUP.js} +1 -1
- package/dist/chunks/{PressEnterToContinue-Dl9Hg9Mf.js → PressEnterToContinue-Dq0Imo9c.js} +1 -1
- package/dist/chunks/PromptInputFooterSuggestions-BpC9COmh.js +1 -0
- package/dist/chunks/PromptInputHelpMenu-BvcAzbSi.js +1 -0
- package/dist/chunks/QueryEngine-J6ElcO16.js +1 -0
- package/dist/chunks/REPL-DBjbAJsm.js +133 -0
- package/dist/chunks/REPL-oBemMXvp.js +1 -0
- package/dist/chunks/RemoteSessionManager-CoIyFKKa.js +2 -0
- package/dist/chunks/ResumeConversation-wBG8OD9P.js +1 -0
- package/dist/chunks/{SSETransport-5VK5okFv.js → SSETransport-1KBBUikF.js} +3 -3
- package/dist/chunks/{Dialog-vfLXEPed.js → SearchBox-C9vUA4IM.js} +1 -1
- package/dist/chunks/SearchExtraToolsTool-BugrzImr.js +1 -0
- package/dist/chunks/Settings-DptKuJE7.js +2 -0
- package/dist/chunks/TeleportProgress-BmgPAZAi.js +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-sgxNOeM_.js +1 -0
- package/dist/chunks/TeleportResumeWrapper-GptvrUdv.js +1 -0
- package/dist/chunks/ThemePicker-gAMqqD1P.js +1 -0
- package/dist/chunks/TrustDialog-CWt-4Evl.js +1 -0
- package/dist/chunks/{ValidationErrorsList-BYsDtAvX.js → ValidationErrorsList-De3kzHtz.js} +1 -1
- package/dist/chunks/{WelcomeV2-C1BfrqC5.js → WelcomeV2-BWF-cJOu.js} +1 -1
- package/dist/chunks/add-dir-DBVT1cEK.js +1 -0
- package/dist/chunks/{agentDisplay-CMmHIl86.js → agentDisplay-5gnCQwUY.js} +1 -1
- package/dist/chunks/{agents-DE_4mAHG.js → agents-Bz1MLp4A.js} +1 -1
- package/dist/chunks/agents-CnwTOlqO.js +103 -0
- package/dist/chunks/allErrors-DYw_q14e.js +1 -0
- package/dist/chunks/analytics-DJobLaWP.js +1 -0
- package/dist/chunks/api-DXDXTFGa.js +1 -0
- package/dist/chunks/api-DzccRM_z.js +1 -0
- package/dist/chunks/auth-Cjnyy10u.js +15 -0
- package/dist/chunks/auth-CnLb6RWc.js +1 -0
- package/dist/chunks/auth-D-SGHS0K.js +1 -0
- package/dist/chunks/{autoMode-ZW70mpr0.js → autoMode-CQ5nqP9c.js} +5 -5
- package/dist/chunks/{autonomy-CwbWsCnv.js → autonomy-CPUCe-YU.js} +1 -1
- package/dist/chunks/autonomy-dSJl0hN1.js +15 -0
- package/dist/chunks/{autonomyPanel-Mq50H7iM.js → autonomyPanel-Ccr9ilei.js} +1 -1
- package/dist/chunks/backgroundHousekeeping--cs5crp7.js +17 -0
- package/dist/chunks/backgroundHousekeeping-CcbHitKC.js +1 -0
- package/dist/chunks/{banner-CWkrK10u.js → banner-BJZNMppT.js} +2 -2
- package/dist/chunks/bg-DWloqGwk.js +1 -0
- package/dist/chunks/{bg-WnYN5ifx.js → bg-w3Vlsm3Y.js} +2 -2
- package/dist/chunks/branch-CG0AKS1J.js +3 -0
- package/dist/chunks/{break-cache-C_p7Kmx2.js → break-cache-DXV0brco.js} +2 -2
- package/dist/chunks/bridgeConfig-Dmc1ZDev.js +1 -0
- package/dist/chunks/{bridgeConfig-CE6dMsiJ.js → bridgeConfig-vORehbGG.js} +1 -1
- package/dist/chunks/bridgeMessaging-DlczTV9X.js +1 -0
- package/dist/chunks/bridgePointer-D4W9GpWw.js +1 -0
- package/dist/chunks/btw-DDUC_t0w.js +1 -0
- package/dist/chunks/caches-1IFb6_M_.js +1 -0
- package/dist/chunks/caches-CB8MHqy2.js +1 -0
- package/dist/chunks/capacityWake-L7b1mMft.js +3 -0
- package/dist/chunks/ccrClient-CG6HTv_n.js +1 -0
- package/dist/chunks/{claudeDesktop-Fe-QL-sN.js → claudeDesktop-CAmnheYx.js} +1 -1
- package/dist/chunks/{clear-D8m2utXW.js → clear-DdWexxbM.js} +1 -1
- package/dist/chunks/{cliLaunch-BkPAatcs.js → cliLaunch-BWWOgBFh.js} +1 -1
- package/dist/chunks/{client-C6MbjvOB.js → client-CoXtVRzi.js} +1 -1
- package/dist/chunks/client-Crrwkw7g.js +1 -0
- package/dist/chunks/client-D8hKghba.js +1 -0
- package/dist/chunks/color-Cuq0c6xy.js +1 -0
- package/dist/chunks/commands-D3sESsTp.js +1 -0
- package/dist/chunks/compact-DIpwuBDq.js +2 -0
- package/dist/chunks/config-CVvUNkj2.js +1 -0
- package/dist/chunks/config-D4G8_MqJ.js +3 -0
- package/dist/chunks/config-q9D4hFiK.js +1 -0
- package/dist/chunks/context-BWcfhhDj.js +1 -0
- package/dist/chunks/context-noninteractive-Bwt9A3XD.js +1 -0
- package/dist/chunks/context-noninteractive-c7jGVWHQ.js +29 -0
- package/dist/chunks/conversation-Bjo_8kia.js +1 -0
- package/dist/chunks/conversation-DrHZIQX2.js +1 -0
- package/dist/chunks/{createSSHSession-BOdTAX3N.js → createSSHSession-DP7B8yvb.js} +1 -1
- package/dist/chunks/createSession-CPo6GBSb.js +1 -0
- package/dist/chunks/createSession-DnykRoia.js +1 -0
- package/dist/chunks/crossProjectResume-D2A-qjgP.js +40 -0
- package/dist/chunks/cwd--q1ONL7P.js +1 -0
- package/dist/chunks/cwd-L4wygFqJ.js +1 -0
- package/dist/chunks/{daemon-YtZbMQtn.js → daemon-D2vFIVOz.js} +1 -1
- package/dist/chunks/datadog-DrmHyl3_.js +1 -0
- package/dist/chunks/{debug-BrXObCdR.js → debug-BdqxZ7rV.js} +4 -4
- package/dist/chunks/debugUtils-CezNYZ-4.js +1 -0
- package/dist/chunks/{detached-TYk4hMFj.js → detached-CkPpYMJj.js} +1 -1
- package/dist/chunks/detectRepository-DA1Q_Skc.js +1 -0
- package/dist/chunks/{detectRepository-BPr0VWNO.js → detectRepository-DvxoaPlk.js} +1 -1
- package/dist/chunks/{diff-CJEKvOA5.js → diff-DHzz9WAp.js} +1 -1
- package/dist/chunks/directoryCompletion-D5AvL7TF.js +1 -0
- package/dist/chunks/doctor-PWqB46xd.js +1 -0
- package/dist/chunks/entry-4JtoJONR.js +14 -0
- package/dist/chunks/envUtils-BDhHQY0-.js +1 -0
- package/dist/chunks/esm-DcIr7tVd.js +1 -0
- package/dist/chunks/{execFileNoThrow-D244NytW.js → execFileNoThrow-5SylUnAI.js} +1 -1
- package/dist/chunks/{execSyncWrapper-CCMQShK-.js → execSyncWrapper-DKuxVTaf.js} +1 -1
- package/dist/chunks/exit-OW9g7b9A.js +1 -0
- package/dist/chunks/{lazySchema-DULtBUCI.js → external-CEp-aPkt.js} +1 -1
- package/dist/chunks/extraUsage-Dt5mw35U.js +1 -0
- package/dist/chunks/extractMemories-1VlmCGwa.js +1 -0
- package/dist/chunks/fast-ClYQcEv5.js +1 -0
- package/dist/chunks/fast-CrvLdpy3.js +1 -0
- package/dist/chunks/fileSuggestions-fNxREjpe.js +3 -0
- package/dist/chunks/firstPartyEventLogger-BBXEQUf0.js +1 -0
- package/dist/chunks/firstPartyEventLogger-DhEPWcit.js +5 -0
- package/dist/chunks/flushGate-ch-Tvwjj.js +1 -0
- package/dist/chunks/{fpsMetrics-Cf_hdtiJ.js → fpsMetrics-DffAomdg.js} +1 -1
- package/dist/chunks/gemini-fZ0VPU2A.js +1 -0
- package/dist/chunks/generateRecap-BIBVlB__.js +1 -0
- package/dist/chunks/generateSessionName-nZj_VvKZ.js +1 -0
- package/dist/chunks/{genericProcessUtils-CdQTApYX.js → genericProcessUtils-BmDSLcMf.js} +1 -1
- package/dist/chunks/git-B9uvt96d.js +6 -0
- package/dist/chunks/git-BfS5Hk4S.js +1 -0
- package/dist/chunks/githubRepoPathMapping-Cqx3pSfc.js +1 -0
- package/dist/chunks/goal-IasZVqKh.js +3 -0
- package/dist/chunks/grok-Dk3LyzMa.js +1 -0
- package/dist/chunks/grove-BE4fQ6tG.js +7 -0
- package/dist/chunks/help-D2-v9Ug9.js +1 -0
- package/dist/chunks/{hooks-CkA9bhHl.js → hooks-BrKy5XWQ.js} +2 -2
- package/dist/chunks/hooks-DGd02IKF.js +1 -0
- package/dist/chunks/initReplBridge-RhCAlmHE.js +1 -0
- package/dist/chunks/{install-Dzlm4u58.js → install-CVGZ55wV.js} +1 -1
- package/dist/chunks/{instrumentation-Yt31gxWN.js → instrumentation-BmWotlxR.js} +4 -4
- package/dist/chunks/{job-BXujwZNa.js → job-DEXxW_Zo.js} +1 -1
- package/dist/chunks/{jwtUtils-DE2GPUcx.js → jwtUtils-C9sdGhvT.js} +1 -1
- package/dist/chunks/keybindings-BRdSOSUD.js +2 -0
- package/dist/chunks/language-C0cIpKE2.js +1 -0
- package/dist/chunks/{language-Ca4B018X.js → language-CxThoWRC.js} +1 -1
- package/dist/chunks/launchLocalMemory-CLSSVFoj.js +3 -0
- package/dist/chunks/launchOnboarding-BkJfKviO.js +8 -0
- package/dist/chunks/lazySchema-B4D4qJVE.js +1 -0
- package/dist/chunks/loadAgentsDir-8UprzS4w.js +1 -0
- package/dist/chunks/{loadAgentsDir-x3rlgED4.js → loadAgentsDir-CKSb56Gp.js} +1651 -2004
- package/dist/chunks/loadPluginHooks-LbaURHVH.js +1 -0
- package/dist/chunks/{localSearch-DtplGF-l.js → localSearch-CPOnyi8I.js} +1 -1
- package/dist/chunks/localSearch-DNjbr4S9.js +1 -0
- package/dist/chunks/log-CTFl4qpD.js +1 -0
- package/dist/chunks/logoV2Utils-we1sfJvf.js +1 -0
- package/dist/chunks/{magicDocs-qdDB_mKb.js → magicDocs-DmKlTQvK.js} +3 -3
- package/dist/chunks/main-BIiwW4mM.js +605 -0
- package/dist/chunks/{main-D862LI_d.js → main-ClXu1ilx.js} +2 -2
- package/dist/chunks/{managedEnv-Aq5BXfY7.js → managedEnv-Cl7YbYzf.js} +1 -1
- package/dist/chunks/managedEnv-CpiiQx_v.js +1 -0
- package/dist/chunks/{mappers-04gNXJ3w.js → mappers-xQC-Z4-h.js} +1 -1
- package/dist/chunks/mcp-B_m1XBDt.js +6 -0
- package/dist/chunks/mcp-BiyfH9Sd.js +1 -0
- package/dist/chunks/mcp-BjlaPUWX.js +2 -0
- package/dist/chunks/memoize-FJv2HV1u.js +1 -0
- package/dist/chunks/memory-LN8f_p2b.js +1 -0
- package/dist/chunks/{modalContext-DFjKLCB6.js → modalContext-CUThy6Ph.js} +1 -1
- package/dist/chunks/mode-lYTs0XHs.js +2 -0
- package/dist/chunks/model-C2e73CJD.js +1 -0
- package/dist/chunks/model-CvmS-Esk.js +1 -0
- package/dist/chunks/model-DJ8mFfuR.js +1 -0
- package/dist/chunks/modelOptions-efCGKnXT.js +1 -0
- package/dist/chunks/nativeInstaller-DQIFwdat.js +1 -0
- package/dist/chunks/oauth-BN2I0_jl.js +1 -0
- package/dist/chunks/oauth-C9VBDB0Y.js +1 -0
- package/dist/chunks/observationStore-BpjlK0pG.js +3 -0
- package/dist/chunks/omit-CLPZGevl.js +1 -0
- package/dist/chunks/onChangeAppState-DhBO34OK.js +1 -0
- package/dist/chunks/{openai-EYRnUsco.js → openai-DJLYqiRl.js} +3 -3
- package/dist/chunks/{panel-BSZGX6jN.js → panel-q0_iT9cg.js} +1 -1
- package/dist/chunks/panelCall-sum-3zvi.js +1 -0
- package/dist/chunks/parser-BcdhBGx0.js +1 -0
- package/dist/chunks/{parser-DFwaTGf7.js → parser-BdCj2GrE.js} +1 -1
- package/dist/chunks/partition-CpfoVrg1.js +1 -0
- package/dist/chunks/permissions-DTb9wkAP.js +3 -0
- package/dist/chunks/pidLock-BR5M6RQw.js +3 -0
- package/dist/chunks/{pipeTransport-CqCnc-Ys.js → pipeTransport-B3TIkTAp.js} +1 -1
- package/dist/chunks/plan-BeoIjNPv.js +1 -0
- package/dist/chunks/{platform-BrYefG_2.js → platform-D6IMiyqT.js} +1 -1
- package/dist/chunks/plugin-D_dHjTud.js +17 -0
- package/dist/chunks/pluginAutoupdate-BHKlOOXI.js +1 -0
- package/dist/chunks/pluginBlocklist-D93Hd1GF.js +1 -0
- package/dist/chunks/pluginCliCommands-vv0wNt4O.js +1 -0
- package/dist/chunks/pluginFlagging-CxuRF2Vc.js +1 -0
- package/dist/chunks/pluginOperations-BTq4AjYB.js +2 -0
- package/dist/chunks/pluginStartupCheck-B6leNWq9.js +1 -0
- package/dist/chunks/pluginStartupCheck-DBOCHUHQ.js +1 -0
- package/dist/chunks/plugins-pmipe7kE.js +4 -0
- package/dist/chunks/pollConfig-BgpfHQPJ.js +1 -0
- package/dist/chunks/{poorMode-CBOtooa0.js → poorMode-BxsyllUK.js} +1 -1
- package/dist/chunks/poorMode-iV1NwC5L.js +1 -0
- package/dist/chunks/print-CAUvczBM.js +23 -0
- package/dist/chunks/processBashCommand-CdeQg_c6.js +1 -0
- package/dist/chunks/processSlashCommand-CbkshIC6.js +5 -0
- package/dist/chunks/{projectContext-D9MDwJUF.js → projectContext-CIxul6vA.js} +1 -1
- package/dist/chunks/{projectContext-BaDZBAoK.js → projectContext-RUMJB798.js} +1 -1
- package/dist/chunks/prompt-CybUvG8G.js +139 -0
- package/dist/chunks/prompt-RBn4JdEg.js +1 -0
- package/dist/chunks/prompt-Rb8zXlDo.js +1 -0
- package/dist/chunks/promptEditor-0Ug93P2I.js +4 -0
- package/dist/chunks/{protocolHandler-JR8pASdH.js → protocolHandler-ClfbHTjI.js} +1 -1
- package/dist/chunks/{proxy-CRN7jYIi.js → proxy-Blq4W6Ox.js} +1 -1
- package/dist/chunks/rcDebugLog-CARUIORE.js +1 -0
- package/dist/chunks/reconciler-Drq3HSkj.js +4 -0
- package/dist/chunks/refresh-D8TLHO_T.js +1 -0
- package/dist/chunks/registerProtocol-3_ozAuDK.js +36 -0
- package/dist/chunks/reload-plugins-Dn1ibOiI.js +1 -0
- package/dist/chunks/remoteBridgeCore-Dpg6Se9C.js +1 -0
- package/dist/chunks/remoteManagedSettings-CCrq-qL-.js +1 -0
- package/dist/chunks/rename-CKsSc7Z3.js +1 -0
- package/dist/chunks/{renderOptions-BUJB9nAm.js → renderOptions-CLcco6fc.js} +1 -1
- package/dist/chunks/replBridgeHandle-DNC797_T.js +1 -0
- package/dist/chunks/resume-B1a5gLVR.js +2 -0
- package/dist/chunks/ripgrep-BisRODQ2.js +1 -0
- package/dist/chunks/{ripgrep-BXmXjAzA.js → ripgrep-DkL2S7-I.js} +1 -1
- package/dist/chunks/{runtimeObserver-CiwnPFjK.js → runtimeObserver-B0xfyLiA.js} +1 -1
- package/dist/chunks/runtimeObserver-DonWCJOx.js +10 -0
- package/dist/chunks/sandbox-adapter-BnBOSkKJ.js +1 -0
- package/dist/chunks/sandbox-toggle-CSdnHWp-.js +1 -0
- package/dist/chunks/searchExtraTools-DbgfnQkH.js +1 -0
- package/dist/chunks/session-BbQlh2S5.js +2 -0
- package/dist/chunks/sessionFileAccessHooks-Xfr1NiXG.js +1 -0
- package/dist/chunks/sessionIdCompat-DMayYBrf.js +1 -0
- package/dist/chunks/sessionMemory-7UOFdp29.js +1 -0
- package/dist/chunks/sessionMemory-fAzgAS7Q.js +1 -0
- package/dist/chunks/sessionMemoryUtils-DVjFw5Bd.js +1 -0
- package/dist/chunks/sessionObserver-Cl26OdaW.js +1 -0
- package/dist/chunks/sessionObserver-XV6N0XER.js +20 -0
- package/dist/chunks/sessionState-BvECKycx.js +11 -0
- package/dist/chunks/sessionStorage-DSj9yZkl.js +1 -0
- package/dist/chunks/{sessionStoragePortable-Cx6JQ5Ye.js → sessionStoragePortable-JZnGwqUM.js} +1 -1
- package/dist/chunks/sessionTitle-E1FvsKM9.js +14 -0
- package/dist/chunks/sessionTracing-ClGQ08jM.js +11 -0
- package/dist/chunks/settings-B-R9ZJNY.js +1 -0
- package/dist/chunks/settings-Xbq6AaD-.js +20 -0
- package/dist/chunks/settingsSync-NCN0a4sc.js +1 -0
- package/dist/chunks/setup-uZ0dSekt.js +3 -0
- package/dist/chunks/shadowedRuleDetection-B9iSx6mB.js +1 -0
- package/dist/chunks/{shellQuote-DkSy9MYE.js → shellQuote-Bth6IZgX.js} +1 -1
- package/dist/chunks/{sideQuestion-hUhxls9r.js → sideQuestion-D2dPToW8.js} +3 -3
- package/dist/chunks/sinks-C7q46rvE.js +2 -0
- package/dist/chunks/sinks-D3bXeHlQ.js +1 -0
- package/dist/chunks/skillChangeDetector-C1EJ7rUL.js +1 -0
- package/dist/chunks/skillGapStore-DylpOKJ6.js +5 -0
- package/dist/chunks/skillLifecycle-GK-8eyyn.js +8 -0
- package/dist/chunks/{skillSearchPanel-Cll9ccA5.js → skillSearchPanel-mpaC62y4.js} +4 -4
- package/dist/chunks/skills-t6krW8GZ.js +1 -0
- package/dist/chunks/{src-D06Xyj4g.js → src-BN7QRYLl.js} +1 -1
- package/dist/chunks/{src-CDCSSo0U2.js → src-P_wYS_NJ2.js} +1 -1
- package/dist/chunks/{src-CST_jFnT.js → src-r6ZFgWPx2.js} +1 -1
- package/dist/chunks/startupProfiler-BaiXZ9tr.js +1 -0
- package/dist/chunks/startupProfiler-jeId9f2i.js +3 -0
- package/dist/chunks/state-B4HwLt8i.js +1 -0
- package/dist/chunks/{state-Cn_m2NOf.js → state-BAGmpVBn.js} +1 -1
- package/dist/chunks/state-Bs5xweDL.js +1 -0
- package/dist/chunks/{staticRender-BIxpgNUq.js → staticRender-DrU6eWoq.js} +1 -1
- package/dist/chunks/{stats-CqfF4Axp.js → stats-BJBhl-Lc.js} +1 -1
- package/dist/chunks/{status-CC9Q-2Yn.js → status-BtsnKNVY.js} +1 -1
- package/dist/chunks/status-nZQEar7T.js +2 -0
- package/dist/chunks/statusNoticeHelpers-DMqRGFOh.js +1 -0
- package/dist/chunks/{stringUtils-DGLPkqJ4.js → stringUtils-CbS6OkmE.js} +1 -1
- package/dist/chunks/subprocessEnv-CZkA9Cdp.js +1 -0
- package/dist/chunks/{subprocessEnv-vrwzMgKn.js → subprocessEnv-Ci8VV_bi.js} +1 -1
- package/dist/chunks/switcher-77h2J5HC.js +1 -0
- package/dist/chunks/switcher-B2CYzCC_.js +1 -0
- package/dist/chunks/syncCache-By_-buUC.js +1 -0
- package/dist/chunks/tasks-BNrdmF9p.js +1 -0
- package/dist/chunks/teleport-mdnhIZBj.js +1 -0
- package/dist/chunks/{templateJobs-D1BdhZsv.js → templateJobs-Dkv4I9c1.js} +1 -1
- package/dist/chunks/{terminalSetup-Cn6jeYw1.js → terminalSetup-DQopnSPR.js} +1 -1
- package/dist/chunks/terminalSetup-DTGm1Eo2.js +33 -0
- package/dist/chunks/{theme-Cg4GNOoQ.js → theme-BjpBVRf5.js} +1 -1
- package/dist/chunks/{tmux-BY7IdQ1f.js → tmux-CMRiI6CD.js} +1 -1
- package/dist/chunks/{toolEventObserver-SFwURL5F.js → toolEventObserver-D-sNBvOe.js} +1 -1
- package/dist/chunks/toolPool-Di30gn_Y.js +1 -0
- package/dist/chunks/trustedDevice-CupLMpO8.js +1 -0
- package/dist/chunks/{trustedDevice-CKedohmT.js → trustedDevice-j1u2TG5U.js} +1 -1
- package/dist/chunks/{types-Dut4311z.js → types-DWRxAH0E.js} +2 -2
- package/dist/chunks/{udsClient-BuCtv7dN.js → udsClient-Cm3HqYUu.js} +1 -1
- package/dist/chunks/{updateCCB-C2G-U-qA.js → updateCCB-BlUAU2Vp.js} +8 -8
- package/dist/chunks/{upstreamproxy-DyR_eXO8.js → upstreamproxy-DDVMwoRi.js} +1 -1
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-D2FvHieH.js +1 -0
- package/dist/chunks/useMainLoopModel-ylPQNj7Z.js +1 -0
- package/dist/chunks/useManagePlugins-BbWJNLe8.js +1 -0
- package/dist/chunks/useMergedTools-B-Z9XQ6U.js +1 -0
- package/dist/chunks/useSearchInput-C6d6nt9S.js +1 -0
- package/dist/chunks/useSettingsErrors-DKh4rkGi.js +1 -0
- package/dist/chunks/userAgent-Ng_TTjWr.js +1 -0
- package/dist/chunks/util-D-X8i5Z2.js +1 -0
- package/dist/chunks/validatePlugin-DSw08u76.js +1 -0
- package/dist/chunks/vim-3mUqsEJm.js +1 -0
- package/dist/chunks/{which-CKQnSouy.js → which-DznMOwny.js} +1 -1
- package/dist/chunks/windowsPaths-1mgenSWa.js +1 -0
- package/dist/chunks/{windowsPaths-DtapVxOo.js → windowsPaths-BVztIhXM.js} +1 -1
- package/dist/chunks/{workSecret-CNWiR2uQ.js → workSecret-DtiFreRl.js} +1 -1
- package/dist/chunks/workerRegistry-DdOYjLm3.js +6 -0
- package/dist/chunks/worktree-BX1ULzrw.js +1 -0
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/AddWorkspaceDirectory-CFrrXnt9.js +0 -1
- package/dist/chunks/App-Buad9Llp.js +0 -1
- package/dist/chunks/ApproveApiKey-B2HJUD7h.js +0 -1
- package/dist/chunks/ApproveApiKey-BQbHdvc3.js +0 -1
- package/dist/chunks/AssistantSessionChooser-4lm4eXQ8.js +0 -1
- package/dist/chunks/BackgroundTasksDialog-D4qA0M5O.js +0 -2
- package/dist/chunks/BypassPermissionsModeDialog-DllL8dxU.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog--ywODh81.js +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-BZSyRqeq.js +0 -1
- package/dist/chunks/ConsoleOAuthFlow-Wkfw7Ts-.js +0 -1
- package/dist/chunks/DesktopHandoff-DaP4Riar.js +0 -1
- package/dist/chunks/DiffDialog-B7hx8i_Y.js +0 -6
- package/dist/chunks/Doctor-89OgoAUA.js +0 -1
- package/dist/chunks/Doctor-CuKJ-nGt.js +0 -3
- package/dist/chunks/ExitFlow-DnPydE17.js +0 -2
- package/dist/chunks/Feedback-SmGiR3mf.js +0 -2
- package/dist/chunks/Grove-CjN9DO47.js +0 -11
- package/dist/chunks/Grove-Cq88VBmM.js +0 -1
- package/dist/chunks/InvalidConfigDialog-DdO0AxyF.js +0 -1
- package/dist/chunks/InvalidSettingsDialog-s1G0DwXF.js +0 -1
- package/dist/chunks/ListItem-vfLXEPed.js +0 -1
- package/dist/chunks/MCPConnectionManager-NRfIjdlj.js +0 -1
- package/dist/chunks/McpParsingWarnings-Du5IxZos.js +0 -1
- package/dist/chunks/MessageSelector-iIroHvXo.js +0 -3
- package/dist/chunks/Messages-D4Hm4gaY.js +0 -11
- package/dist/chunks/Onboarding-BiZByBK-.js +0 -1
- package/dist/chunks/OverageCreditUpsell-BM7szLgm.js +0 -1
- package/dist/chunks/PluginSettings-uY5KTCtK.js +0 -17
- package/dist/chunks/PromptInputFooterSuggestions-BmsFdOu9.js +0 -1
- package/dist/chunks/PromptInputHelpMenu-DX-0wEDo.js +0 -1
- package/dist/chunks/QueryEngine-CGYaShXD.js +0 -1
- package/dist/chunks/REPL-CRJB2t2z.js +0 -142
- package/dist/chunks/REPL-u4Yq29Du.js +0 -1
- package/dist/chunks/RemoteCallout-B-tyvQOe.js +0 -1
- package/dist/chunks/RemoteSessionManager-DCd0O5_l.js +0 -2
- package/dist/chunks/ResumeConversation-DAAXlOCd.js +0 -1
- package/dist/chunks/SearchBox-vfLXEPed.js +0 -1
- package/dist/chunks/SearchExtraToolsTool-B-7Bworf.js +0 -1
- package/dist/chunks/Settings-CUjWlncb.js +0 -2
- package/dist/chunks/TeleportProgress-DxN0bQL2.js +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-A5Ss0kuk.js +0 -1
- package/dist/chunks/TeleportResumeWrapper-Bz14mUqR.js +0 -1
- package/dist/chunks/ThemePicker-CVSRqTzW.js +0 -1
- package/dist/chunks/TrustDialog-CY8an_Tg.js +0 -1
- package/dist/chunks/TungstenTool-Cb7gJvq4.js +0 -1
- package/dist/chunks/TungstenTool-CxMQVCuF.js +0 -1
- package/dist/chunks/add-dir-DfLYgwox.js +0 -1
- package/dist/chunks/agents-DJtPfvnL.js +0 -103
- package/dist/chunks/allErrors-CQE2k0zO.js +0 -1
- package/dist/chunks/analytics-BotDBGh0.js +0 -1
- package/dist/chunks/ant-ClQkuQjZ.js +0 -1
- package/dist/chunks/api-2cdIPaeq.js +0 -1
- package/dist/chunks/api-CG-lhKe-.js +0 -1
- package/dist/chunks/asciicast-BsWpcxrc.js +0 -1
- package/dist/chunks/asciicast-CbAjUHT_.js +0 -4
- package/dist/chunks/assistant-Bje16tQx.js +0 -1
- package/dist/chunks/assistant-C83quuNj.js +0 -1
- package/dist/chunks/assistant-z2o4-UJe.js +0 -1
- package/dist/chunks/auth-DMfEiQrC.js +0 -1
- package/dist/chunks/auth-D_cGl8WD.js +0 -1
- package/dist/chunks/auth-DqcKPbw8.js +0 -15
- package/dist/chunks/autonomy-Oui8yK8G.js +0 -15
- package/dist/chunks/backgroundHousekeeping-BpLtI45r.js +0 -1
- package/dist/chunks/backgroundHousekeeping-DtJNx4Ja.js +0 -17
- package/dist/chunks/bg-B0iMGM9C.js +0 -1
- package/dist/chunks/branch-DU5O9KZ0.js +0 -3
- package/dist/chunks/bridge-DNNxtPlz.js +0 -2
- package/dist/chunks/bridgeConfig-DP9dD1Cv.js +0 -1
- package/dist/chunks/bridgeEnabled-Cc0mGlTb.js +0 -1
- package/dist/chunks/bridgeEnabled-D8wP3DWQ.js +0 -1
- package/dist/chunks/bridgeMain-CwxMa_pd.js +0 -1
- package/dist/chunks/bridgeMain-D11t1BYQ.js +0 -68
- package/dist/chunks/bridgeMessaging-DdvApEqW.js +0 -1
- package/dist/chunks/bridgePointer-DqHMHa2B.js +0 -1
- package/dist/chunks/browser-BmZuQom6.js +0 -1
- package/dist/chunks/btw-CejSEdNl.js +0 -1
- package/dist/chunks/caches-5HVQSevy.js +0 -3
- package/dist/chunks/caches-B-nJoHLM.js +0 -1
- package/dist/chunks/capacityWake-CV_x9H8j.js +0 -1
- package/dist/chunks/ccrClient-BFyfO67b.js +0 -1
- package/dist/chunks/client-DKXCfdde.js +0 -1
- package/dist/chunks/client-xxikkAoZ.js +0 -1
- package/dist/chunks/color-DWhgZH7A.js +0 -1
- package/dist/chunks/commands-CxJpmEKF.js +0 -1
- package/dist/chunks/commitAttribution-DM6SBMwl.js +0 -1
- package/dist/chunks/commitAttribution-DPnHHKSA.js +0 -2
- package/dist/chunks/compact-CblM7306.js +0 -2
- package/dist/chunks/completionCache-MN3_MqK8.js +0 -4
- package/dist/chunks/completionCache-c4aiyZ_f.js +0 -1
- package/dist/chunks/config-BLVBFi5v.js +0 -1
- package/dist/chunks/config-CMnqm6Se.js +0 -1
- package/dist/chunks/config-DRDuVyzE.js +0 -3
- package/dist/chunks/context-CdSMMM-0.js +0 -1
- package/dist/chunks/context-noninteractive-CPkf2vB9.js +0 -1
- package/dist/chunks/context-noninteractive-DNury4JI.js +0 -54
- package/dist/chunks/conversation-DCMw_rsE.js +0 -1
- package/dist/chunks/conversation-pUtvc-cE.js +0 -1
- package/dist/chunks/createSession-8Ei-Lj7V.js +0 -1
- package/dist/chunks/createSession-CjqxVh_Q.js +0 -1
- package/dist/chunks/cron-3LntnnhJ.js +0 -1
- package/dist/chunks/crossProjectResume-Bj_Pe8oe.js +0 -40
- package/dist/chunks/cwd--nvsx73T.js +0 -1
- package/dist/chunks/cwd-CYmmnQVS.js +0 -1
- package/dist/chunks/datadog-DqHxqiwY.js +0 -1
- package/dist/chunks/debugUtils-NO5KtXqi.js +0 -1
- package/dist/chunks/desktop-Z5FAfunZ.js +0 -1
- package/dist/chunks/detectRepository-BTPgN89l.js +0 -1
- package/dist/chunks/directoryCompletion-CW2ckkQg.js +0 -1
- package/dist/chunks/doctor-BA2ZLDTl.js +0 -1
- package/dist/chunks/entry-DE0uMIf0.js +0 -14
- package/dist/chunks/envLessBridgeConfig-B-LKYNvv.js +0 -1
- package/dist/chunks/envLessBridgeConfig-DyD9XCda.js +0 -1
- package/dist/chunks/envUtils-DSxRz_kt.js +0 -1
- package/dist/chunks/esm-5w3xFBnt.js +0 -1
- package/dist/chunks/eventLoopStallDetector-Cg_RXU1q.js +0 -1
- package/dist/chunks/exit-Dt9kHtJO.js +0 -1
- package/dist/chunks/extra-usage-C7E2Z1p1.js +0 -1
- package/dist/chunks/extra-usage-D0Kkjp-2.js +0 -1
- package/dist/chunks/extra-usage-core-DjdaD1qO.js +0 -1
- package/dist/chunks/extra-usage-noninteractive-BnD1RhKK.js +0 -1
- package/dist/chunks/extraUsage-CpgRTcMk.js +0 -1
- package/dist/chunks/extractMemories-DhUprYa7.js +0 -1
- package/dist/chunks/fast-C4ZevUNL.js +0 -1
- package/dist/chunks/fast-CChxlAAF.js +0 -1
- package/dist/chunks/feedback-BIhBhV6n.js +0 -1
- package/dist/chunks/file-DcZWPH2V.js +0 -12
- package/dist/chunks/fileStateCache-DDW5toIs.js +0 -1
- package/dist/chunks/files-Cz1-PK3r.js +0 -2
- package/dist/chunks/firstPartyEventLogger-BXY1IJ2D.js +0 -5
- package/dist/chunks/firstPartyEventLogger-CnkGSojw.js +0 -1
- package/dist/chunks/flushGate-CgHq81Gw.js +0 -1
- package/dist/chunks/gemini-C1J-x1g7.js +0 -1
- package/dist/chunks/generateRecap-C0jjCg0Z.js +0 -1
- package/dist/chunks/generateSessionName-w0BMtwS7.js +0 -1
- package/dist/chunks/git-CbcnOf0E.js +0 -1
- package/dist/chunks/git-Do0wJvux.js +0 -6
- package/dist/chunks/githubRepoPathMapping-8D0kpsif.js +0 -1
- package/dist/chunks/goal-B4GsR54_.js +0 -3
- package/dist/chunks/grok-ffNyU3Lt.js +0 -1
- package/dist/chunks/grove-BQisE2JM.js +0 -7
- package/dist/chunks/heapdump-DiCjAPR3.js +0 -5
- package/dist/chunks/help-2hn8VK2-.js +0 -1
- package/dist/chunks/hooks-CBmrBO-J.js +0 -1
- package/dist/chunks/hostGuard-BHI6Q8Mt.js +0 -1
- package/dist/chunks/inboundAttachments-C5K3XPTC.js +0 -1
- package/dist/chunks/inboundAttachments-IH-g95jo.js +0 -1
- package/dist/chunks/index.min-D75yiGLN.js +0 -1
- package/dist/chunks/initReplBridge-C-P4dgAG.js +0 -1
- package/dist/chunks/keybindings-D8FXoO89.js +0 -2
- package/dist/chunks/language-Baosud0X.js +0 -1
- package/dist/chunks/launchAgentsPlatform-D6DmNuDt.js +0 -1
- package/dist/chunks/launchCommand-1qkTCKpf.js +0 -1
- package/dist/chunks/launchLocalMemory-C0FzUq7x.js +0 -3
- package/dist/chunks/launchLocalVault-DkYAre4O.js +0 -3
- package/dist/chunks/launchMemoryStores-D2rKWAPs.js +0 -1
- package/dist/chunks/launchOnboarding-gOVAFEFp.js +0 -8
- package/dist/chunks/launchSchedule-IZdFstT_.js +0 -1
- package/dist/chunks/launchSkillStore-B7LamM1d.js +0 -1
- package/dist/chunks/launchTeleport-C2BQMfYP.js +0 -3
- package/dist/chunks/launchVault-C60WUcCI.js +0 -1
- package/dist/chunks/lib-rQZENxQg.js +0 -8
- package/dist/chunks/loadAgentsDir-B9c3Emvg.js +0 -1
- package/dist/chunks/loadPluginHooks-BhNdAjeY.js +0 -1
- package/dist/chunks/localSearch-BLCGsdyM.js +0 -1
- package/dist/chunks/log-BMCygSzM.js +0 -1
- package/dist/chunks/logoV2Utils-gGK9gErT.js +0 -1
- package/dist/chunks/main-OWFSddRx.js +0 -859
- package/dist/chunks/managedEnv-BHoeDjpS.js +0 -1
- package/dist/chunks/mcp-BSNdwbxR.js +0 -1
- package/dist/chunks/mcp-CMnDNI-4.js +0 -6
- package/dist/chunks/mcp-D1yA9E56.js +0 -2
- package/dist/chunks/memoize-B0zhbT8Z.js +0 -1
- package/dist/chunks/memory-D1zbyjxN.js +0 -1
- package/dist/chunks/mode-DY087x_x.js +0 -2
- package/dist/chunks/model-CZViyZnE.js +0 -1
- package/dist/chunks/model-D0EfJBuw.js +0 -1
- package/dist/chunks/model-DLLkVV6S.js +0 -1
- package/dist/chunks/nativeInstaller-yj81F75v.js +0 -1
- package/dist/chunks/oauth-BqJqV-2M.js +0 -1
- package/dist/chunks/oauth-C8X_p8Gc.js +0 -1
- package/dist/chunks/observationStore-DzCdXq8U.js +0 -4
- package/dist/chunks/onChangeAppState-DhGKPG9g.js +0 -1
- package/dist/chunks/output-style-BM3qAHLA.js +0 -1
- package/dist/chunks/overageCreditGrant-Du3dOYVu.js +0 -1
- package/dist/chunks/p-map-B1EeBuI8.js +0 -1
- package/dist/chunks/p-map-HKDr3iDo.js +0 -1
- package/dist/chunks/panel-Be-OxtqL.js +0 -1
- package/dist/chunks/panelCall-dMvRPAGE.js +0 -1
- package/dist/chunks/parser-Bf6iasPV.js +0 -1
- package/dist/chunks/partition-C4FWzYVm.js +0 -1
- package/dist/chunks/passes-Daz-ARWD.js +0 -1
- package/dist/chunks/path-D5U-tm91.js +0 -1
- package/dist/chunks/permissions-CeYKbtSC.js +0 -1
- package/dist/chunks/permissions-Cn_6f8CB.js +0 -1
- package/dist/chunks/permissions-DF8tAmDF.js +0 -3
- package/dist/chunks/pidLock-CbC_il6r.js +0 -3
- package/dist/chunks/plan-rsb_83Fo.js +0 -1
- package/dist/chunks/plugin-Cm31-nej.js +0 -1
- package/dist/chunks/pluginAutoupdate-0k03PVff.js +0 -1
- package/dist/chunks/pluginBlocklist-wPFCUPdm.js +0 -1
- package/dist/chunks/pluginCliCommands-DhL9LbH0.js +0 -1
- package/dist/chunks/pluginFlagging-CAdaFV_D.js +0 -1
- package/dist/chunks/pluginOperations-Cs_Z4C6O.js +0 -2
- package/dist/chunks/pluginStartupCheck-BRXGKGjG.js +0 -1
- package/dist/chunks/pluginStartupCheck-KeU0efTj.js +0 -1
- package/dist/chunks/plugins-CQNKZmjP.js +0 -4
- package/dist/chunks/policyLimits-D2s8M8P2.js +0 -1
- package/dist/chunks/pollConfig-2nFzv6Hy.js +0 -1
- package/dist/chunks/poor-DXumVTR4.js +0 -1
- package/dist/chunks/poorMode-yNZL5uYf.js +0 -1
- package/dist/chunks/print-uxCF5ka5.js +0 -23
- package/dist/chunks/privacy-settings-BncbJCV0.js +0 -1
- package/dist/chunks/processBashCommand-CGdwvPmD.js +0 -1
- package/dist/chunks/processSlashCommand-DQarepEb.js +0 -5
- package/dist/chunks/prompt-BgOdcHkd.js +0 -1
- package/dist/chunks/prompt-CE3sFmZV.js +0 -139
- package/dist/chunks/prompt-CLJKFebn.js +0 -1
- package/dist/chunks/promptEditor-CyTzyjwG.js +0 -4
- package/dist/chunks/rate-limit-options-C-EqWjeI.js +0 -1
- package/dist/chunks/rcDebugLog-DBB9r8aw.js +0 -11
- package/dist/chunks/reconciler-CYD_XpG4.js +0 -4
- package/dist/chunks/referral-CKmHHxj_.js +0 -1
- package/dist/chunks/refresh-ZqZdmLK5.js +0 -1
- package/dist/chunks/registerProtocol-wZv2uiW_.js +0 -36
- package/dist/chunks/release-notes-B5K7wVqZ.js +0 -4
- package/dist/chunks/releaseNotes-B8gbyFFJ.js +0 -2
- package/dist/chunks/reload-plugins-B9ApSp2m.js +0 -1
- package/dist/chunks/remote-env-CAt1dHIS.js +0 -1
- package/dist/chunks/remoteBridgeCore-Bk3UdSLJ.js +0 -1
- package/dist/chunks/remoteManagedSettings-bswzAB6W.js +0 -1
- package/dist/chunks/rename-CE_U6KE6.js +0 -1
- package/dist/chunks/resume-BicEjsPd.js +0 -2
- package/dist/chunks/ripgrep-BfIpz5uC.js +0 -1
- package/dist/chunks/rollback-BPWRKlIZ.js +0 -11
- package/dist/chunks/runtimeObserver-BrGF5QWX.js +0 -10
- package/dist/chunks/sandbox-adapter-BtMiHImm.js +0 -1
- package/dist/chunks/sandbox-toggle-D8eebdyI.js +0 -1
- package/dist/chunks/sanitization-DV-94a9Z.js +0 -1
- package/dist/chunks/sdkHeapDumpMonitor-WdXUV7DV.js +0 -1
- package/dist/chunks/searchExtraTools-hLLPuh7c.js +0 -1
- package/dist/chunks/semver-BMRJYn3q.js +0 -1
- package/dist/chunks/session-BZIlR9Gc.js +0 -2
- package/dist/chunks/sessionDataUploader-CaCjwsA2.js +0 -1
- package/dist/chunks/sessionDiscovery-DfDqTrF1.js +0 -1
- package/dist/chunks/sessionFileAccessHooks-Bm8wiqwe.js +0 -1
- package/dist/chunks/sessionMemory-D37S0-jX.js +0 -1
- package/dist/chunks/sessionMemory-DmlAG3jq.js +0 -1
- package/dist/chunks/sessionMemoryUtils-6EWDHSGU.js +0 -1
- package/dist/chunks/sessionObserver-BUw2rzKl.js +0 -1
- package/dist/chunks/sessionObserver-KgquhGWw.js +0 -20
- package/dist/chunks/sessionStorage-CucBSK5Q.js +0 -1
- package/dist/chunks/sessionTitle-DAnM73S0.js +0 -14
- package/dist/chunks/sessionTracing-_Hh5VXxt.js +0 -11
- package/dist/chunks/settings-BeLFUeie.js +0 -19
- package/dist/chunks/settings-Cl16Haug.js +0 -1
- package/dist/chunks/settingsSync-BNvFYH3c.js +0 -1
- package/dist/chunks/setup-D8kXv3ts.js +0 -3
- package/dist/chunks/shadowedRuleDetection-C6R5zOUe.js +0 -1
- package/dist/chunks/sinks-BuE17DeZ.js +0 -2
- package/dist/chunks/sinks-FevoYQqP.js +0 -1
- package/dist/chunks/skill-learning-CMdxGtxr.js +0 -5
- package/dist/chunks/skillChangeDetector-C65ZLSYV.js +0 -1
- package/dist/chunks/skillGapStore-D18LRJAM.js +0 -5
- package/dist/chunks/skillGapStore-Ep62R-2_.js +0 -1
- package/dist/chunks/skillGenerator-Bc7WwNT8.js +0 -8
- package/dist/chunks/skillLearning-Cs9fJgkV.js +0 -1
- package/dist/chunks/skillLearning-duPZl69A.js +0 -1
- package/dist/chunks/skillPanel-Cyzby746.js +0 -28
- package/dist/chunks/skills-BPPeYBy7.js +0 -1
- package/dist/chunks/slashCommandParsing-RQb_7Xzt.js +0 -1
- package/dist/chunks/startupProfiler-DIWVcO4e.js +0 -1
- package/dist/chunks/startupProfiler-xa3NmN7Z.js +0 -3
- package/dist/chunks/state-BOa-3Av3.js +0 -1
- package/dist/chunks/state-ix0xIunV.js +0 -1
- package/dist/chunks/status-D4IQpsNK.js +0 -2
- package/dist/chunks/statusNoticeHelpers-CEGvdm5d.js +0 -1
- package/dist/chunks/stickers-D5teCKMN.js +0 -1
- package/dist/chunks/subprocessEnv-BSQSomcK.js +0 -1
- package/dist/chunks/syncCache-CANQZ9mQ.js +0 -1
- package/dist/chunks/systemPromptSections-CR_AoPIX.js +0 -1
- package/dist/chunks/systemPromptSections-DN0HGVye.js +0 -1
- package/dist/chunks/tag-DDbNqBMu.js +0 -11
- package/dist/chunks/tasks-CZvWJYGr.js +0 -1
- package/dist/chunks/teleport-Dk5j03Ix.js +0 -1
- package/dist/chunks/terminalSetup-3JNy6i_J.js +0 -33
- package/dist/chunks/thinkback-p-vKIRW_.js +0 -1
- package/dist/chunks/thinkback-play-DnPTDE8B.js +0 -1
- package/dist/chunks/thinkback-rFA1do6F.js +0 -1
- package/dist/chunks/toolEventObserver-CzsCuUMc.js +0 -1
- package/dist/chunks/toolPool-BR27AMJO.js +0 -1
- package/dist/chunks/trustedDevice-BYt39fui.js +0 -1
- package/dist/chunks/tui-C2yuCuOU.js +0 -6
- package/dist/chunks/types-Bh9S_JG5.js +0 -3
- package/dist/chunks/types-DHkZVzJe.js +0 -1
- package/dist/chunks/ultrareviewCommand-C_4OSBTW.js +0 -3
- package/dist/chunks/undercover-D30rKimg.js +0 -31
- package/dist/chunks/undercover-DRSwLozU.js +0 -1
- package/dist/chunks/up-BHkC97_C.js +0 -12
- package/dist/chunks/upgrade-Bi-bIz7R.js +0 -1
- package/dist/chunks/upgrade-Chs-OQFd.js +0 -1
- package/dist/chunks/upload-D8FWMSQx.js +0 -1
- package/dist/chunks/usage-BxVeUt60.js +0 -1
- package/dist/chunks/usage-DUO7Yy1f.js +0 -1
- package/dist/chunks/useExitOnCtrlCDWithKeybindings-BwsZ5f0s.js +0 -1
- package/dist/chunks/useMainLoopModel-Gy1Vv4Qr.js +0 -1
- package/dist/chunks/useManagePlugins-B11_87VN.js +0 -1
- package/dist/chunks/useMergedTools-CR56my9t.js +0 -1
- package/dist/chunks/useSearchInput-C5OzQnX6.js +0 -1
- package/dist/chunks/useSettingsErrors-B9vOZL41.js +0 -1
- package/dist/chunks/util-8EHwfg4A.js +0 -1
- package/dist/chunks/validatePlugin-6q1qmnAC.js +0 -1
- package/dist/chunks/vim-CNDzwoTd.js +0 -1
- package/dist/chunks/windowsPaths-9pEkw0oV.js +0 -1
- package/dist/chunks/workerRegistry-CvyHvwx-.js +0 -1
- package/dist/chunks/worktree-ogmNCIpz.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./defineProperty-C-QyHrDq.js";import{n as i,t as a}from"./axios-DaWTGg7G.js";import{I as o,P as s,fi as c,t as l}from"./src-CDCSSo0U2.js";import{t as u}from"./jsx-runtime-Bb4Xn-E0.js";import{n as d,r as f}from"./analytics-BotDBGh0.js";import{l as p,u as m}from"./oauth-BqJqV-2M.js";import{a as h,l as g,o as _}from"./api-2cdIPaeq.js";import{n as v,r as y,t as b}from"./cron-3LntnnhJ.js";import{r as x,t as S}from"./hostGuard-BHI6Q8Mt.js";function C(e){return new Promise(t=>setTimeout(t,e))}async function w(){let e,t;try{let n=await g();e=n.accessToken,t=n.orgUUID}catch(e){let t=e instanceof Error?e.message:String(e);throw new L(`Not authenticated: ${t}.`,401)}return S(T()),{...h(e),"anthropic-beta":F,"x-organization-uuid":t}}function T(){return`${p().BASE_API_URL}/v1/code/triggers`}function E(e){if(i.isAxiosError(e)){let t=e.response?.status??0;if(t===401)return new L(`Authentication failed.`,401);if(t===403)return new L(`Subscription required. Scheduled triggers require a Claude Pro/Max/Team subscription.`,403);if(t===404)return new L(`Trigger not found.`,404);if(t===429){let t=e.response?.headers?.[`retry-after`]??``,n=t?` Retry after ${t}s.`:``;return new L(`Rate limit exceeded.${n}`,429)}let n=(e.response?.data)?.error?.message??e.message;return new L(n,t)}return e instanceof L?e:new L(e instanceof Error?e.message:String(e),0)}function D(e){if(!e)return null;let t=Number(e);if(!Number.isNaN(t)&&t>=0)return t*1e3;let n=Date.parse(e);return Number.isNaN(n)?null:Math.max(0,n-Date.now())}async function O(e){let t;for(let n=0;n<I;n++)try{return await e()}catch(e){let r=E(e);if(r.statusCode>=500){t=r,n<I-1&&await C(D(i.isAxiosError(e)?e.response?.headers?.[`retry-after`]:void 0)??500*2**n);continue}throw r}throw t??new L(`Request failed after retries`,0)}async function k(){return O(async()=>{let e=await w();return(await i.get(T(),{headers:e})).data.data??[]})}async function A(e){return O(async()=>{let t=await w();return(await i.get(`${T()}/${e}`,{headers:t})).data})}async function j(e){return O(async()=>{let t=await w();return(await i.post(T(),e,{headers:t})).data})}async function M(e,t){return O(async()=>{let n=await w();return(await i.post(`${T()}/${e}`,t,{headers:n})).data})}async function N(e){return O(async()=>{let t=await w();await i.delete(`${T()}/${e}`,{headers:t})})}async function P(e){return O(async()=>{let t=await w();return(await i.post(`${T()}/${e}/run`,{},{headers:t})).data})}var F,I,L,R=e((()=>{a(),m(),x(),_(),n(),F=`ccr-triggers-2026-01-30`,I=3,L=class extends Error{constructor(e,t){super(e),r(this,`statusCode`,void 0),this.statusCode=t,this.name=`TriggersApiError`}}}));function z({trigger:e}){let t=b(e.cron_expression,{utc:!0}),n=e.next_run?new Date(e.next_run).toLocaleString():`—`,r=e.enabled?`enabled`:`disabled`;return(0,V.jsxs)(o,{flexDirection:`column`,marginBottom:1,children:[(0,V.jsxs)(o,{children:[(0,V.jsx)(s,{bold:!0,children:e.trigger_id}),(0,V.jsx)(s,{dimColor:!0,children:` · `}),(0,V.jsx)(s,{color:e.enabled?`success`:`warning`,children:r}),e.agent_id?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(s,{dimColor:!0,children:` · agent: `}),(0,V.jsx)(s,{children:e.agent_id})]}):null]}),(0,V.jsxs)(s,{children:[`Schedule: `,t]}),(0,V.jsxs)(s,{dimColor:!0,children:[`Prompt: `,e.prompt]}),(0,V.jsxs)(s,{dimColor:!0,children:[`Next run: `,n]})]})}function B(e){if(e.mode===`list`)return e.triggers.length===0?(0,V.jsx)(o,{children:(0,V.jsx)(s,{dimColor:!0,children:`No scheduled triggers. Use /schedule create <cron> <prompt> to create one.`})}):(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{marginBottom:1,children:(0,V.jsxs)(s,{bold:!0,children:[`Scheduled Triggers (`,e.triggers.length,`)`]})}),e.triggers.map(e=>(0,V.jsx)(z,{trigger:e},e.trigger_id))]});if(e.mode===`detail`){let{trigger:t}=e,n=b(t.cron_expression,{utc:!0}),r=t.next_run?new Date(t.next_run).toLocaleString():`—`,i=t.last_run?new Date(t.last_run).toLocaleString():`—`;return(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{marginBottom:1,children:(0,V.jsxs)(s,{bold:!0,children:[`Trigger: `,t.trigger_id]})}),(0,V.jsxs)(s,{children:[`Status:`,` `,(0,V.jsx)(s,{color:t.enabled?`success`:`warning`,children:t.enabled?`enabled`:`disabled`})]}),(0,V.jsxs)(s,{children:[`Schedule: `,n]}),t.agent_id?(0,V.jsxs)(s,{children:[`Agent: `,t.agent_id]}):null,(0,V.jsxs)(s,{children:[`Next run: `,r]}),(0,V.jsxs)(s,{dimColor:!0,children:[`Last run: `,i]}),(0,V.jsxs)(s,{dimColor:!0,children:[`Prompt: `,t.prompt]}),t.created_at?(0,V.jsxs)(s,{dimColor:!0,children:[`Created: `,new Date(t.created_at).toLocaleString()]}):null]})}if(e.mode===`created`){let{trigger:t}=e,n=b(t.cron_expression,{utc:!0});return(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{children:(0,V.jsx)(s,{bold:!0,color:`success`,children:`Trigger created`})}),(0,V.jsxs)(s,{children:[`ID: `,t.trigger_id]}),(0,V.jsxs)(s,{children:[`Schedule: `,n]}),(0,V.jsxs)(s,{children:[`Prompt: `,t.prompt]}),t.agent_id?(0,V.jsxs)(s,{children:[`Agent: `,t.agent_id]}):null,(0,V.jsxs)(s,{dimColor:!0,children:[`Status: `,t.enabled?`enabled`:`disabled`]})]})}if(e.mode===`updated`){let{trigger:t}=e;return(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{children:(0,V.jsx)(s,{bold:!0,color:`success`,children:`Trigger updated`})}),(0,V.jsxs)(s,{children:[`ID: `,t.trigger_id]}),(0,V.jsxs)(s,{dimColor:!0,children:[`Status: `,t.enabled?`enabled`:`disabled`]})]})}return e.mode===`deleted`?(0,V.jsx)(o,{children:(0,V.jsxs)(s,{color:`success`,children:[`Trigger `,e.id,` deleted.`]})}):e.mode===`ran`?(0,V.jsxs)(o,{flexDirection:`column`,children:[(0,V.jsx)(o,{children:(0,V.jsxs)(s,{color:`success`,children:[`Trigger `,e.id,` fired.`]})}),(0,V.jsxs)(s,{dimColor:!0,children:[`Run ID: `,e.runId]})]}):e.mode===`enabled`?(0,V.jsx)(o,{children:(0,V.jsxs)(s,{color:`success`,children:[`Trigger `,e.id,` enabled.`]})}):e.mode===`disabled`?(0,V.jsx)(o,{children:(0,V.jsxs)(s,{color:`warning`,children:[`Trigger `,e.id,` disabled.`]})}):(0,V.jsx)(o,{children:(0,V.jsx)(s,{color:`error`,children:e.message})})}var V,H=e((()=>{c(),l(),v(),V=u()}));function U(e){let t=e.trim().split(/\s+/);return t.length<6?null:{cron:t.slice(0,5).join(` `),prompt:t.slice(5).join(` `)}}function W(e){return e.trim().split(/\s+/).length===5}function G(e){let t=e.trim();if(t===``||t===`list`)return{action:`list`};let n=t.indexOf(` `),r=n===-1?t:t.slice(0,n),i=n===-1?``:t.slice(n+1).trim();if(r===`get`){if(!i)return{action:`invalid`,reason:`get requires a trigger id`};let e=i.split(/\s+/)[0];return e?{action:`get`,id:e}:{action:`invalid`,reason:`get requires a trigger id`}}if(r===`create`){if(!i)return{action:`invalid`,reason:`create requires a cron expression and prompt, e.g. create "0 9 * * 1" Run weekly standup`};let e=U(i);if(!e)return{action:`invalid`,reason:`create requires 5 cron fields followed by a prompt, e.g. create "0 9 * * 1" Run weekly standup`};let{cron:t,prompt:n}=e;return W(t)?n.trim()?{action:`create`,cron:t,prompt:n.trim()}:{action:`invalid`,reason:`prompt cannot be empty`}:{action:`invalid`,reason:`Invalid cron expression: "${t}". Expected 5 fields (minute hour day month weekday).`}}if(r===`update`){let e=i.split(/\s+/);if(e.length<3||!e[0])return{action:`invalid`,reason:`update requires an id, field, and value, e.g. update trg_123 enabled false`};let t=e[0],n=e[1]??``,r=e.slice(2).join(` `);return n?r?{action:`update`,id:t,field:n,value:r}:{action:`invalid`,reason:`update requires a value`}:{action:`invalid`,reason:`update requires a field name`}}if(r===`delete`){if(!i)return{action:`invalid`,reason:`delete requires a trigger id`};let e=i.split(/\s+/)[0];return e?{action:`delete`,id:e}:{action:`invalid`,reason:`delete requires a trigger id`}}if(r===`run`){if(!i)return{action:`invalid`,reason:`run requires a trigger id`};let e=i.split(/\s+/)[0];return e?{action:`run`,id:e}:{action:`invalid`,reason:`run requires a trigger id`}}if(r===`enable`||r===`disable`){if(!i)return{action:`invalid`,reason:`${r} requires a trigger id`};let e=i.split(/\s+/)[0];return e?{action:r,id:e}:{action:`invalid`,reason:`${r} requires a trigger id`}}return{action:`invalid`,reason:`Unknown sub-command "${r}". ${K}`}}var K,q=e((()=>{K=`Usage: /schedule list | get ID | create CRON PROMPT | update ID FIELD VALUE | delete ID | run ID | enable ID | disable ID`})),J,Y;e((()=>{J=t(c(),1),d(),v(),R(),H(),q(),Y=async(e,t,n)=>{f(`tengu_schedule_started`,{args:n??``});let r=G(n??``);if(r.action===`invalid`)return f(`tengu_schedule_failed`,{reason:r.reason}),e(`Usage: /schedule list | get ID | create CRON PROMPT | update ID FIELD VALUE | delete ID | run ID | enable ID | disable ID\n${r.reason}`,{display:`system`}),null;if(r.action===`list`){f(`tengu_schedule_list`,{});try{let t=await k();return e(t.length===0?`No scheduled triggers found.`:`${t.length} scheduled trigger(s).`,{display:`system`}),J.createElement(B,{mode:`list`,triggers:t})}catch(t){let n=t instanceof Error?t.message:String(t);return f(`tengu_schedule_failed`,{reason:n}),e(`Failed to list triggers: ${n}`,{display:`system`}),J.createElement(B,{mode:`error`,message:n})}}if(r.action===`get`){let{id:t}=r;f(`tengu_schedule_get`,{id:t});try{let n=await A(t);return e(`Trigger ${t} fetched.`,{display:`system`}),J.createElement(B,{mode:`detail`,trigger:n})}catch(n){let r=n instanceof Error?n.message:String(n);return f(`tengu_schedule_failed`,{reason:r}),e(`Failed to get trigger ${t}: ${r}`,{display:`system`}),J.createElement(B,{mode:`error`,message:r})}}if(r.action===`create`){let{cron:t,prompt:n}=r;if(!y(t)){let n=`Invalid cron expression: "${t}". Expected 5 fields (minute hour day month weekday).`;return f(`tengu_schedule_failed`,{reason:n}),e(n,{display:`system`}),null}f(`tengu_schedule_create`,{cron:t});try{let r=await j({cron_expression:t,prompt:n});return e(`Trigger created: ${r.trigger_id}`,{display:`system`}),J.createElement(B,{mode:`created`,trigger:r})}catch(t){let n=t instanceof Error?t.message:String(t);return f(`tengu_schedule_failed`,{reason:n}),e(`Failed to create trigger: ${n}`,{display:`system`}),J.createElement(B,{mode:`error`,message:n})}}if(r.action===`update`){let{id:t,field:n,value:i}=r;f(`tengu_schedule_update`,{id:t,field:n});let a={};if(n===`enabled`)a={enabled:i===`true`||i===`1`};else if(n===`cron_expression`||n===`cron`)a={cron_expression:i};else if(n===`prompt`)a={prompt:i};else if(n===`agent_id`)a={agent_id:i};else{let t=`Unknown field "${n}". Valid fields: enabled, cron_expression, prompt, agent_id`;return f(`tengu_schedule_failed`,{reason:t}),e(t,{display:`system`}),J.createElement(B,{mode:`error`,message:t})}try{let n=await M(t,a);return e(`Trigger ${t} updated.`,{display:`system`}),J.createElement(B,{mode:`updated`,trigger:n})}catch(n){let r=n instanceof Error?n.message:String(n);return f(`tengu_schedule_failed`,{reason:r}),e(`Failed to update trigger ${t}: ${r}`,{display:`system`}),J.createElement(B,{mode:`error`,message:r})}}if(r.action===`delete`){let{id:t}=r;f(`tengu_schedule_delete`,{id:t});try{return await N(t),e(`Trigger ${t} deleted.`,{display:`system`}),J.createElement(B,{mode:`deleted`,id:t})}catch(n){let r=n instanceof Error?n.message:String(n);return f(`tengu_schedule_failed`,{reason:r}),e(`Failed to delete trigger ${t}: ${r}`,{display:`system`}),J.createElement(B,{mode:`error`,message:r})}}if(r.action===`run`){let{id:t}=r;f(`tengu_schedule_run`,{id:t});try{let n=await P(t);return e(`Trigger ${t} fired. Run ID: ${n.run_id}`,{display:`system`}),J.createElement(B,{mode:`ran`,id:t,runId:n.run_id})}catch(n){let r=n instanceof Error?n.message:String(n);return f(`tengu_schedule_failed`,{reason:r}),e(`Failed to run trigger ${t}: ${r}`,{display:`system`}),J.createElement(B,{mode:`error`,message:r})}}if(r.action===`enable`){let{id:t}=r;f(`tengu_schedule_enable`,{id:t});try{return await M(t,{enabled:!0}),e(`Trigger ${t} enabled.`,{display:`system`}),J.createElement(B,{mode:`enabled`,id:t})}catch(n){let r=n instanceof Error?n.message:String(n);return f(`tengu_schedule_failed`,{reason:r}),e(`Failed to enable trigger ${t}: ${r}`,{display:`system`}),J.createElement(B,{mode:`error`,message:r})}}let{id:i}=r;f(`tengu_schedule_disable`,{id:i});try{return await M(i,{enabled:!1}),e(`Trigger ${i} disabled.`,{display:`system`}),J.createElement(B,{mode:`disabled`,id:i})}catch(t){let n=t instanceof Error?t.message:String(t);return f(`tengu_schedule_failed`,{reason:n}),e(`Failed to disable trigger ${i}: ${n}`,{display:`system`}),J.createElement(B,{mode:`error`,message:n})}}}))();export{Y as callSchedule};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,o as r}from"./envUtils-DSxRz_kt.js";import{n as i,t as a}from"./defineProperty-C-QyHrDq.js";import{n as o,t as s}from"./axios-DaWTGg7G.js";import{I as c,P as l,fi as u,t as d}from"./src-CDCSSo0U2.js";import{t as f}from"./jsx-runtime-Bb4Xn-E0.js";import{n as p,r as m}from"./analytics-BotDBGh0.js";import{l as h,u as g}from"./oauth-BqJqV-2M.js";import{o as _,u as v}from"./api-2cdIPaeq.js";import{n as y,r as b}from"./hostGuard-BHI6Q8Mt.js";import{join as x}from"node:path";import{mkdir as S,writeFile as C}from"node:fs/promises";function w(e){return new Promise(t=>setTimeout(t,e))}async function T(){let e;try{e=(await v()).apiKey}catch(e){let t=e instanceof Error?e.message:String(e);throw new B(t,501)}return y(E()),{"x-api-key":e,"anthropic-version":`2023-06-01`,"content-type":`application/json`}}function E(){return`${h().BASE_API_URL}/v1/skills?beta=true`}function D(e){return`${h().BASE_API_URL}/v1/skills/${e}?beta=true`}function O(e){return`${h().BASE_API_URL}/v1/skills/${e}/versions?beta=true`}function k(e,t){return`${h().BASE_API_URL}/v1/skills/${e}/versions/${t}?beta=true`}function A(e){if(o.isAxiosError(e)){let t=e.response?.status??0;if(t===401)return new B(`Authentication failed.`,401);if(t===403)return new B(`Subscription required. Skill store requires a Claude Pro/Max/Team subscription.`,403);if(t===404)return new B(`Skill or version not found.`,404);if(t===429){let t=e.response?.headers?.[`retry-after`]??``,n=t?` Retry after ${t}s.`:``;return new B(`Rate limit exceeded.${n}`,429)}let n=(e.response?.data)?.error?.message??e.message;return new B(n,t)}return e instanceof B?e:new B(e instanceof Error?e.message:String(e),0)}function j(e){if(!e)return null;let t=Number(e);if(!Number.isNaN(t)&&t>=0)return t*1e3;let n=Date.parse(e);return Number.isNaN(n)?null:Math.max(0,n-Date.now())}async function M(e){let t;for(let n=0;n<z;n++)try{return await e()}catch(e){let r=A(e);if(r.statusCode>=500){t=r,n<z-1&&await w(j(o.isAxiosError(e)?e.response?.headers?.[`retry-after`]:void 0)??500*2**n);continue}throw r}throw t??new B(`Request failed after retries`,0)}async function N(){return M(async()=>{let e=await T();return(await o.get(E(),{headers:e})).data.data??[]})}async function P(e){return M(async()=>{let t=await T();return(await o.get(D(e),{headers:t})).data})}async function F(e){return M(async()=>{let t=await T();return(await o.get(O(e),{headers:t})).data.data??[]})}async function I(e,t){return M(async()=>{let n=await T();return(await o.get(k(e,t),{headers:n})).data})}async function L(e,t){return M(async()=>{let n=await T(),r={name:e,body:t};return(await o.post(E(),r,{headers:n})).data})}async function R(e){return M(async()=>{let t=await T();await o.delete(D(e),{headers:t})})}var z,B,V=e((()=>{s(),g(),b(),_(),i(),z=3,B=class extends Error{constructor(e,t){super(e),a(this,`statusCode`,void 0),this.statusCode=t,this.name=`SkillsApiError`}}}));function H({skill:e}){let t=e.created_at?new Date(e.created_at).toLocaleString():`—`;return(0,W.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[(0,W.jsxs)(c,{children:[(0,W.jsx)(l,{bold:!0,children:e.skill_id}),(0,W.jsx)(l,{dimColor:!0,children:` · `}),(0,W.jsx)(l,{children:e.name}),e.deprecated?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(l,{dimColor:!0,children:` · `}),(0,W.jsx)(l,{color:`warning`,children:`deprecated`})]}):null]}),(0,W.jsxs)(l,{dimColor:!0,children:[`Owner: `,e.owner,e.owner_symbol?` (${e.owner_symbol})`:``]}),(0,W.jsxs)(l,{dimColor:!0,children:[`Created: `,t]})]})}function U(e){if(e.mode===`list`)return e.skills.length===0?(0,W.jsx)(c,{children:(0,W.jsx)(l,{dimColor:!0,children:`No skills found. Use /skill-store create <name> <markdown> to publish one.`})}):(0,W.jsxs)(c,{flexDirection:`column`,children:[(0,W.jsx)(c,{marginBottom:1,children:(0,W.jsxs)(l,{bold:!0,children:[`Skills (`,e.skills.length,`)`]})}),e.skills.map(e=>(0,W.jsx)(H,{skill:e},e.skill_id))]});if(e.mode===`detail`){let{skill:t}=e,n=t.created_at?new Date(t.created_at).toLocaleString():`—`;return(0,W.jsxs)(c,{flexDirection:`column`,children:[(0,W.jsx)(c,{marginBottom:1,children:(0,W.jsxs)(l,{bold:!0,children:[`Skill: `,t.skill_id]})}),(0,W.jsxs)(l,{children:[`Name: `,t.name]}),(0,W.jsxs)(l,{children:[`Owner: `,t.owner,t.owner_symbol?` (${t.owner_symbol})`:``]}),(0,W.jsxs)(l,{children:[`Status:`,` `,(0,W.jsx)(l,{color:t.deprecated?`warning`:`success`,children:t.deprecated?`deprecated`:`active`})]}),t.allowed_tools&&t.allowed_tools.length>0?(0,W.jsxs)(l,{children:[`Allowed tools: `,t.allowed_tools.join(`, `)]}):null,(0,W.jsxs)(l,{dimColor:!0,children:[`Created: `,n]})]})}if(e.mode===`versions`){let{id:t,versions:n}=e;return n.length===0?(0,W.jsx)(c,{children:(0,W.jsxs)(l,{dimColor:!0,children:[`No versions found for skill `,t,`.`]})}):(0,W.jsxs)(c,{flexDirection:`column`,children:[(0,W.jsx)(c,{marginBottom:1,children:(0,W.jsxs)(l,{bold:!0,children:[`Versions for `,t,` (`,n.length,`)`]})}),n.map(e=>{let t=e.created_at?new Date(e.created_at).toLocaleString():`—`;return(0,W.jsxs)(c,{flexDirection:`column`,marginBottom:1,children:[(0,W.jsx)(l,{bold:!0,children:e.version}),(0,W.jsxs)(l,{dimColor:!0,children:[`Created: `,t]}),(0,W.jsx)(l,{dimColor:!0,children:e.body.length>80?`${e.body.slice(0,80)}…`:e.body})]},e.version)})]})}if(e.mode===`version-detail`){let{version:t}=e,n=t.created_at?new Date(t.created_at).toLocaleString():`—`;return(0,W.jsxs)(c,{flexDirection:`column`,children:[(0,W.jsx)(c,{marginBottom:1,children:(0,W.jsxs)(l,{bold:!0,children:[`Version: `,t.version,` (skill: `,t.skill_id,`)`]})}),(0,W.jsxs)(l,{dimColor:!0,children:[`Created: `,n]}),(0,W.jsx)(c,{marginTop:1,children:(0,W.jsx)(l,{children:t.body})})]})}if(e.mode===`created`){let{skill:t}=e;return(0,W.jsxs)(c,{flexDirection:`column`,children:[(0,W.jsx)(c,{children:(0,W.jsx)(l,{bold:!0,color:`success`,children:`Skill created`})}),(0,W.jsxs)(l,{children:[`ID: `,t.skill_id]}),(0,W.jsxs)(l,{children:[`Name: `,t.name]})]})}return e.mode===`deleted`?(0,W.jsx)(c,{children:(0,W.jsxs)(l,{color:`success`,children:[`Skill `,e.id,` deleted.`]})}):e.mode===`installed`?(0,W.jsxs)(c,{flexDirection:`column`,children:[(0,W.jsx)(c,{children:(0,W.jsx)(l,{bold:!0,color:`success`,children:`Skill installed`})}),(0,W.jsxs)(l,{children:[`Name: `,e.skillName]}),(0,W.jsxs)(l,{dimColor:!0,children:[`Path: `,e.path]}),(0,W.jsxs)(l,{dimColor:!0,children:[`Load with: /skills (bundled skills are not auto-loaded; place in `,e.path,`)`]})]}):(0,W.jsx)(c,{children:(0,W.jsx)(l,{color:`error`,children:e.message})})}var W,G=e((()=>{u(),d(),W=f()}));function K(e){let t=e.trim();if(t===``||t===`list`)return{action:`list`};let n=t.indexOf(` `),r=n===-1?t:t.slice(0,n),i=n===-1?``:t.slice(n+1).trim();if(r===`get`){if(!i)return{action:`invalid`,reason:`get requires a skill id`};let e=i.split(/\s+/)[0];return e?{action:`get`,id:e}:{action:`invalid`,reason:`get requires a skill id`}}if(r===`versions`){if(!i)return{action:`invalid`,reason:`versions requires a skill id`};let e=i.split(/\s+/)[0];return e?{action:`versions`,id:e}:{action:`invalid`,reason:`versions requires a skill id`}}if(r===`version`){let e=i.split(/\s+/);return e.length<2||!e[0]||!e[1]?{action:`invalid`,reason:`version requires a skill id and version, e.g. version sk_123 v1`}:{action:`version`,id:e[0],version:e[1]}}if(r===`create`){let e=i.indexOf(` `);if(!i||e===-1)return{action:`invalid`,reason:`create requires a skill name and markdown body, e.g. create my-skill "# My Skill\\nContent"`};let t=i.slice(0,e).trim(),n=i.slice(e+1).trim();return t?n?{action:`create`,name:t,markdown:n}:{action:`invalid`,reason:`create requires a non-empty markdown body`}:{action:`invalid`,reason:`create requires a non-empty skill name`}}if(r===`delete`){if(!i)return{action:`invalid`,reason:`delete requires a skill id`};let e=i.split(/\s+/)[0];return e?{action:`delete`,id:e}:{action:`invalid`,reason:`delete requires a skill id`}}if(r===`install`){if(!i)return{action:`invalid`,reason:`install requires a skill id (optionally with @version), e.g. install sk_123 or install sk_123@v2`};let e=i.split(/\s+/)[0];if(!e)return{action:`invalid`,reason:`install requires a skill id`};let t=e.indexOf(`@`);if(t===-1)return{action:`install`,id:e,version:void 0};let n=e.slice(0,t),r=e.slice(t+1);return n?r?{action:`install`,id:n,version:r}:{action:`invalid`,reason:`install requires a non-empty version after @`}:{action:`invalid`,reason:`install requires a non-empty skill id before @`}}return{action:`invalid`,reason:`Unknown sub-command "${r}". ${q}`}}var q,J=e((()=>{q=`Usage: /skill-store list | get ID | versions ID | version ID VER | create NAME MARKDOWN | delete ID | install ID[@VERSION]`})),Y,X,Z;e((()=>{Y=t(u(),1),p(),r(),V(),G(),J(),X=`Usage: /skill-store list | get ID | versions ID | version ID VER | create NAME MARKDOWN | delete ID | install ID[@VERSION]`,Z=async(e,t,r)=>{m(`tengu_skill_store_started`,{args:r??``});let i=K(r??``);if(i.action===`invalid`)return m(`tengu_skill_store_failed`,{reason:i.reason}),e(`${X}\n${i.reason}`,{display:`system`}),null;if(i.action===`list`){m(`tengu_skill_store_list`,{});try{let t=await N();return e(t.length===0?`No skills found in the marketplace.`:`${t.length} skill(s) available.`,{display:`system`}),Y.createElement(U,{mode:`list`,skills:t})}catch(t){let n=t instanceof Error?t.message:String(t);return m(`tengu_skill_store_failed`,{reason:n}),e(`Failed to list skills: ${n}`,{display:`system`}),Y.createElement(U,{mode:`error`,message:n})}}if(i.action===`get`){let{id:t}=i;m(`tengu_skill_store_get`,{id:t});try{let n=await P(t);return e(`Skill ${t} fetched.`,{display:`system`}),Y.createElement(U,{mode:`detail`,skill:n})}catch(n){let r=n instanceof Error?n.message:String(n);return m(`tengu_skill_store_failed`,{reason:r}),e(`Failed to get skill ${t}: ${r}`,{display:`system`}),Y.createElement(U,{mode:`error`,message:r})}}if(i.action===`versions`){let{id:t}=i;m(`tengu_skill_store_versions`,{id:t});try{let n=await F(t);return e(n.length===0?`No versions found for skill ${t}.`:`${n.length} version(s) for skill ${t}.`,{display:`system`}),Y.createElement(U,{mode:`versions`,id:t,versions:n})}catch(n){let r=n instanceof Error?n.message:String(n);return m(`tengu_skill_store_failed`,{reason:r}),e(`Failed to list versions for skill ${t}: ${r}`,{display:`system`}),Y.createElement(U,{mode:`error`,message:r})}}if(i.action===`version`){let{id:t,version:n}=i;m(`tengu_skill_store_version`,{id:t});try{let r=await I(t,n);return e(`Skill ${t}@${n} fetched.`,{display:`system`}),Y.createElement(U,{mode:`version-detail`,version:r})}catch(r){let i=r instanceof Error?r.message:String(r);return m(`tengu_skill_store_failed`,{reason:i}),e(`Failed to get version ${n} for skill ${t}: ${i}`,{display:`system`}),Y.createElement(U,{mode:`error`,message:i})}}if(i.action===`create`){let{name:t,markdown:n}=i;m(`tengu_skill_store_create`,{name:t});try{let r=await L(t,n);return e(`Skill created: ${r.skill_id}`,{display:`system`}),Y.createElement(U,{mode:`created`,skill:r})}catch(t){let n=t instanceof Error?t.message:String(t);return m(`tengu_skill_store_failed`,{reason:n}),e(`Failed to create skill: ${n}`,{display:`system`}),Y.createElement(U,{mode:`error`,message:n})}}if(i.action===`delete`){let{id:t}=i;m(`tengu_skill_store_delete`,{id:t});try{return await R(t),e(`Skill ${t} deleted.`,{display:`system`}),Y.createElement(U,{mode:`deleted`,id:t})}catch(n){let r=n instanceof Error?n.message:String(n);return m(`tengu_skill_store_failed`,{reason:r}),e(`Failed to delete skill ${t}: ${r}`,{display:`system`}),Y.createElement(U,{mode:`error`,message:r})}}let{id:a,version:o}=i;m(`tengu_skill_store_install`,{id:a});try{let t,r;if(o!==void 0){let e=await I(a,o);r=e.body,t=e.skill_id}else{let n=await P(a),i=await F(a);if(i.length===0)return e(`Skill ${a} has no published versions to install.`,{display:`system`}),Y.createElement(U,{mode:`error`,message:`Skill ${a} has no published versions to install.`});let o=[...i].sort((e,t)=>{let n=e.created_at?new Date(e.created_at).getTime():0;return(t.created_at?new Date(t.created_at).getTime():0)-n})[0];if(!o)return e(`Skill ${a} has no published versions to install.`,{display:`system`}),Y.createElement(U,{mode:`error`,message:`Skill ${a} has no published versions to install.`});r=o.body,t=n.name}let i=t.replace(/[^a-zA-Z0-9_-]/g,`-`).replace(/^-+|-+$/g,``)||a,s=x(n(),`skills`,i),c=x(s,`SKILL.md`);return await S(s,{recursive:!0}),await C(c,r,`utf-8`),e(`Skill installed to ${c}`,{display:`system`}),Y.createElement(U,{mode:`installed`,skillName:i,path:c})}catch(t){let n=t instanceof Error?t.message:String(t);return m(`tengu_skill_store_failed`,{reason:n}),e(`Failed to install skill ${a}: ${n}`,{display:`system`}),Y.createElement(U,{mode:`error`,message:n})}}}))();export{Z as callSkillStore};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Sy as t,Ty as n,gr as r,jr as i,vy as a}from"./loadAgentsDir-x3rlgED4.js";import{n as o,r as s}from"./analytics-BotDBGh0.js";import{n as c,o as l}from"./api-2cdIPaeq.js";function u(e){return e}function d(e){return[`## Available sessions (most recent first)`,``,...e.slice(0,p).map((e,t)=>` ${String(t+1).padStart(2)}. ${e.title.slice(0,50).padEnd(50)} ${e.status.padEnd(14)} ${e.created_at.slice(0,10)} id=${e.id}`),``,"Run `/teleport <session-id>` to resume a session."].join(`
|
|
2
|
-
`)}var f,p,m;e((()=>{o(),i(),a(),l(),f=8,p=20,m=async(e,i,a)=>{let o=a.trim(),l=o===`--print`||o.startsWith(`--print `),m=l?o.replace(/^--print\s*/,``).trim():o;if(s(`tengu_teleport_started`,{has_session_id:u(m?`true`:`false`)}),!m){s(`tengu_teleport_source_decision`,{source:u(`sessions_api`)});let t;try{t=(await c()).map(e=>({id:e.id,title:e.title??`Untitled`,status:e.status??`unknown`,created_at:e.created_at??``}))}catch(t){let n=t instanceof Error?t.message:String(t);return/forbidden|401|403/i.test(n)?(s(`tengu_teleport_events_fetch_forbidden`,{error:u(n.slice(0,200))}),e("Teleport: permission denied fetching sessions. Check your OAuth token (`claude auth status`).",{display:`system`}),null):/not found|404/i.test(n)?(s(`tengu_teleport_events_fetch_not_found`,{error:u(n.slice(0,200))}),e(`Teleport: sessions endpoint returned 404. The Sessions API may not be available for your account.`,{display:`system`}),null):/token|unauthorized/i.test(n)?(s(`tengu_teleport_error_bad_token`,{error:u(n.slice(0,200))}),e(`Teleport: authentication error — ${n}.`,{display:`system`}),null):(s(`tengu_teleport_events_fetch_fail`,{error:u(n.slice(0,200))}),e(`Teleport: failed to fetch sessions — ${n}.\nUsage: /teleport SESSION_ID`,{display:`system`}),null)}return t.length===0?(s(`tengu_teleport_null`,{}),e(`No active sessions found on claude.ai/code.
|
|
3
|
-
Start a new session at https://claude.ai/code`,{display:`system`}),null):(t.length>=p&&s(`tengu_teleport_page_cap`,{count:u(String(t.length))}),e(d(t),{display:`system`}),null)}if(m.length<f||!/^[0-9a-f-]{8,}$/i.test(m))return s(`tengu_teleport_error_bad_status`,{error:u(`invalid_session_id: ${m.slice(0,40)}`)}),e(`Invalid session id "${m}". Expected a UUID-like string (e.g. 12345678-abcd-...).`,{display:`system`}),null;s(`tengu_teleport_source_decision`,{source:u(`explicit_id`)});let h=[],g=e=>{h.push(e)};g(`validate`);try{await n()}catch(t){let n=t instanceof Error?t.message:String(t);return s(`tengu_teleport_errors_detected`,{error:u(n.slice(0,200))}),e(`Cannot teleport: ${n}`,{display:`system`}),null}g(`resume`);try{let n=``;if(await t(m,e=>{n=String(e)}),s(`tengu_teleport_resume_session`,{stage:u(n)}),g(`ready`),!i.resume)return s(`tengu_teleport_null`,{}),l?(e(`Session ${m} fetched successfully.`,{display:`system`}),null):(e(`Teleport resume succeeded for ${m}, but the REPL did not provide a resume callback.`,{display:`system`}),null);g(`fetch`);let a=await r(m);return a?(s(`tengu_teleport_errors_resolved`,{}),await i.resume(m,a,`slash_command_session_id`),s(`tengu_teleport_first_message_success`,{}),null):(s(`tengu_teleport_errors_detected`,{error:u(`log_not_found_after_resume`)}),e(`Teleport fetched session ${m} but the local log was not found. Try /resume ${m} manually.`,{display:`system`}),null)}catch(t){let n=t instanceof Error?t.message:String(t),r=`tengu_teleport_failed`;return/not found/i.test(n)?r=`tengu_teleport_error_session_not_found_`:/repo.*mismatch/i.test(n)?r=`tengu_teleport_error_repo_mismatch_sessions_api`:/not in.*git|git.*dir/i.test(n)?r=`tengu_teleport_error_repo_not_in_git_dir_sessions_api`:/cancelled|aborted/i.test(n)?r=`tengu_teleport_cancelled`:/token|unauthorized|401/i.test(n)?r=`tengu_teleport_error_bad_token`:/status|4\d\d|5\d\d/i.test(n)&&(r=`tengu_teleport_error_bad_status`),s(r,{error:u(n.slice(0,200))}),s(`tengu_teleport_first_message_error`,{error:u(n.slice(0,200))}),e(`Teleport failed: ${n}`,{display:`system`}),null}}}))();export{m as callTeleport};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t}from"./rolldown-runtime-DaDcL9Zw.js";import{n,t as r}from"./defineProperty-C-QyHrDq.js";import{n as i,t as a}from"./axios-DaWTGg7G.js";import{I as o,P as s,fi as c,t as l}from"./src-CDCSSo0U2.js";import{t as u}from"./jsx-runtime-Bb4Xn-E0.js";import{l as d,u as f}from"./oauth-BqJqV-2M.js";import{o as p,u as m}from"./api-2cdIPaeq.js";import{n as h,r as g}from"./hostGuard-BHI6Q8Mt.js";import{n as _,t as v}from"./launchCommand-1qkTCKpf.js";function y(e){return e.length<=8?e:`${e.slice(0,8)}…`}var b=e((()=>{}));function x(e){return new Promise(t=>setTimeout(t,e))}async function S(){let e;try{e=(await m()).apiKey}catch(e){let t=e instanceof Error?e.message:String(e);throw new F(t,501)}return h(C()),{"x-api-key":e,"anthropic-version":`2023-06-01`,"anthropic-beta":N,"content-type":`application/json`}}function C(){return`${d().BASE_API_URL}/v1/vaults`}function w(e,t){let n=t?` (${y(t)})`:``;if(i.isAxiosError(e)){let t=e.response?.status??0;if(t===401)return new F(`Authentication failed.`,401);if(t===403)return new F(`Subscription required. Vault management requires a Claude Pro/Max/Team subscription.`,403);if(t===404)return new F(`Vault or credential not found${n}.`,404);if(t===429){let t=e.response?.headers?.[`retry-after`]??``,n=t?` Retry after ${t}s.`:``;return new F(`Rate limit exceeded.${n}`,429)}let r=(e.response?.data)?.error?.message??e.message;return new F(r,t)}return e instanceof F?e:new F(e instanceof Error?e.message:String(e),0)}function T(e){if(!e)return null;let t=Number(e);if(!Number.isNaN(t)&&t>=0)return t*1e3;let n=Date.parse(e);return Number.isNaN(n)?null:Math.max(0,n-Date.now())}async function E(e,t){let n;for(let r=0;r<P;r++)try{return await e()}catch(e){let a=w(e,t);if(a.statusCode>=500){n=a,r<P-1&&await x(T(i.isAxiosError(e)?e.response?.headers?.[`retry-after`]:void 0)??500*2**r);continue}throw a}throw n??new F(`Request failed after retries`,0)}async function D(){return E(async()=>{let e=await S();return(await i.get(C(),{headers:e})).data.data??[]})}async function O(e){return E(async()=>{let t=await S(),n={name:e};return(await i.post(C(),n,{headers:t})).data})}async function k(e){return E(async()=>{let t=await S();return(await i.get(`${C()}/${e}`,{headers:t})).data},e)}async function A(e){return E(async()=>{let t=await S();return(await i.post(`${C()}/${e}/archive`,{},{headers:t})).data},e)}async function j(e,t,n){return E(async()=>{let r=await S(),a={key:t,secret:n};return(await i.post(`${C()}/${e}/credentials`,a,{headers:r})).data},e)}async function M(e,t){return E(async()=>{let n=await S();return(await i.post(`${C()}/${e}/credentials/${t}/archive`,{},{headers:n})).data},e)}var N,P,F,I=e((()=>{a(),f(),g(),p(),b(),n(),N=`managed-agents-2026-04-01`,P=3,F=class extends Error{constructor(e,t){super(e),r(this,`statusCode`,void 0),this.statusCode=t,this.name=`VaultsApiError`}}}));function L({vault:e}){let t=!!e.archived_at,n=e.created_at?new Date(e.created_at).toLocaleString():`—`;return(0,z.jsxs)(o,{flexDirection:`column`,marginBottom:1,children:[(0,z.jsxs)(o,{children:[(0,z.jsx)(s,{bold:!0,children:e.vault_id}),(0,z.jsx)(s,{dimColor:!0,children:` · `}),(0,z.jsx)(s,{color:t?`warning`:`success`,children:t?`archived`:`active`})]}),(0,z.jsxs)(s,{children:[`Name: `,e.name]}),(0,z.jsxs)(s,{dimColor:!0,children:[`Created: `,n]})]})}function R(e){if(e.mode===`list`)return e.vaults.length===0?(0,z.jsx)(o,{children:(0,z.jsx)(s,{dimColor:!0,children:`No vaults found. Use /vault create <name> to create one.`})}):(0,z.jsxs)(o,{flexDirection:`column`,children:[(0,z.jsx)(o,{marginBottom:1,children:(0,z.jsxs)(s,{bold:!0,children:[`Vaults (`,e.vaults.length,`)`]})}),e.vaults.map(e=>(0,z.jsx)(L,{vault:e},e.vault_id))]});if(e.mode===`detail`){let{vault:t}=e,n=!!t.archived_at,r=t.created_at?new Date(t.created_at).toLocaleString():`—`,i=t.archived_at?new Date(t.archived_at).toLocaleString():null;return(0,z.jsxs)(o,{flexDirection:`column`,children:[(0,z.jsx)(o,{marginBottom:1,children:(0,z.jsxs)(s,{bold:!0,children:[`Vault: `,t.vault_id]})}),(0,z.jsxs)(s,{children:[`Name: `,t.name]}),(0,z.jsxs)(s,{children:[`Status:`,` `,(0,z.jsx)(s,{color:n?`warning`:`success`,children:n?`archived`:`active`})]}),(0,z.jsxs)(s,{dimColor:!0,children:[`Created: `,r]}),i?(0,z.jsxs)(s,{dimColor:!0,children:[`Archived: `,i]}):null]})}if(e.mode===`created`){let{vault:t}=e;return(0,z.jsxs)(o,{flexDirection:`column`,children:[(0,z.jsx)(o,{children:(0,z.jsx)(s,{bold:!0,color:`success`,children:`Vault created`})}),(0,z.jsxs)(s,{children:[`ID: `,t.vault_id]}),(0,z.jsxs)(s,{children:[`Name: `,t.name]})]})}if(e.mode===`archived`){let{vault:t}=e,n=t.archived_at?new Date(t.archived_at).toLocaleString():`—`;return(0,z.jsxs)(o,{flexDirection:`column`,children:[(0,z.jsx)(o,{children:(0,z.jsx)(s,{bold:!0,color:`warning`,children:`Vault archived`})}),(0,z.jsxs)(s,{children:[`ID: `,t.vault_id]}),(0,z.jsxs)(s,{dimColor:!0,children:[`Archived at: `,n]})]})}if(e.mode===`credential-list`){let{vaultId:t,credentials:n}=e;return n.length===0?(0,z.jsx)(o,{children:(0,z.jsxs)(s,{dimColor:!0,children:[`No credentials in vault `,t,`. Use /vault add-credential `,t,` <key> <value> to add one.`]})}):(0,z.jsxs)(o,{flexDirection:`column`,children:[(0,z.jsx)(o,{marginBottom:1,children:(0,z.jsxs)(s,{bold:!0,children:[`Credentials in `,t,` (`,n.length,`)`]})}),n.map(e=>{let t=!!e.archived_at;return(0,z.jsxs)(o,{flexDirection:`column`,marginBottom:1,children:[(0,z.jsxs)(o,{children:[(0,z.jsx)(s,{bold:!0,children:e.credential_id}),(0,z.jsx)(s,{dimColor:!0,children:` · `}),e.kind?(0,z.jsx)(s,{dimColor:!0,children:e.kind}):null,t?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(s,{dimColor:!0,children:` · `}),(0,z.jsx)(s,{color:`warning`,children:`archived`})]}):null]}),(0,z.jsx)(s,{dimColor:!0,children:`Value: ***mask***`})]},e.credential_id)})]})}if(e.mode===`credential-added`){let{vaultId:t,credentialId:n}=e;return(0,z.jsxs)(o,{flexDirection:`column`,children:[(0,z.jsx)(o,{children:(0,z.jsx)(s,{bold:!0,color:`success`,children:`Credential added`})}),(0,z.jsxs)(s,{children:[`ID: `,n]}),(0,z.jsxs)(s,{children:[`Vault: `,t]}),(0,z.jsx)(s,{dimColor:!0,children:`Value: ***mask***`})]})}if(e.mode===`credential-archived`){let{vaultId:t,credentialId:n}=e;return(0,z.jsxs)(o,{flexDirection:`column`,children:[(0,z.jsx)(o,{children:(0,z.jsx)(s,{bold:!0,color:`warning`,children:`Credential archived`})}),(0,z.jsxs)(s,{children:[`ID: `,n]}),(0,z.jsxs)(s,{children:[`Vault: `,t]})]})}return(0,z.jsx)(o,{children:(0,z.jsx)(s,{color:`error`,children:e.message})})}var z,B=e((()=>{c(),l(),z=u()}));function V(e){let t=e.trim();if(t===``||t===`list`)return{action:`list`};let n=t.indexOf(` `),r=n===-1?t:t.slice(0,n),i=n===-1?``:t.slice(n+1).trim();if(r===`create`)return i?{action:`create`,name:i}:{action:`invalid`,reason:`create requires a vault name, e.g. create "My Work Vault"`};if(r===`get`){if(!i)return{action:`invalid`,reason:`get requires a vault id`};let e=i.split(/\s+/)[0];return e?{action:`get`,id:e}:{action:`invalid`,reason:`get requires a vault id`}}if(r===`archive`){if(!i)return{action:`invalid`,reason:`archive requires a vault id`};let e=i.split(/\s+/)[0];return e?{action:`archive`,id:e}:{action:`invalid`,reason:`archive requires a vault id`}}if(r===`add-credential`){let e=i.split(/\s+/);if(e.length<2||!e[0]||!e[1])return{action:`invalid`,reason:`add-credential requires vault_id, key, and value, e.g. add-credential vault_123 MY_API_KEY <value>`};let t=e[0],n=e[1],r=e.slice(2).join(` `);return r.trim()?{action:`add-credential`,vaultId:t,key:n,secret:r.trim()}:{action:`invalid`,reason:`add-credential requires a non-empty credential value`}}if(r===`archive-credential`){let e=i.split(/\s+/);return e.length<2||!e[0]||!e[1]?{action:`invalid`,reason:`archive-credential requires vault_id and credential_id, e.g. archive-credential vault_123 cred_456`}:{action:`archive-credential`,vaultId:e[0],credentialId:e[1]}}return{action:`invalid`,reason:`Unknown sub-command "${r}". ${H}`}}var H,U=e((()=>{H=`Usage: /vault list | create NAME | get ID | archive ID | add-credential VAULT_ID KEY VALUE | archive-credential VAULT_ID CRED_ID`}));async function W(e,t){if(e.action===`list`){let e=await D();return t(e.length===0?`No vaults found.`:`${e.length} vault(s).`,{display:`system`}),{mode:`list`,vaults:e}}if(e.action===`create`){let{name:n}=e,r=await O(n);return t(`Vault created: ${r.vault_id}`,{display:`system`}),{mode:`created`,vault:r}}if(e.action===`get`){let{id:n}=e,r=await k(n);return t(`Vault fetched.`,{display:`system`}),{mode:`detail`,vault:r}}if(e.action===`archive`){let{id:n}=e,r=await A(n);return t(`Vault archived.`,{display:`system`}),{mode:`archived`,vault:r}}if(e.action===`add-credential`){let{vaultId:n,key:r,secret:i}=e,a=await j(n,r,i);return t(`Credential added: ${a.credential_id}`,{display:`system`}),{mode:`credential-added`,vaultId:n,credentialId:a.credential_id}}if(e.action===`archive-credential`){let{vaultId:n,credentialId:r}=e;return await M(n,r),t(`Credential ${r} archived.`,{display:`system`}),{mode:`credential-archived`,vaultId:n,credentialId:r}}let n=await D();return t(n.length===0?`No vaults found.`:`${n.length} vault(s).`,{display:`system`}),{mode:`list`,vaults:n}}var G,K,q;e((()=>{G=t(c(),1),I(),B(),U(),v(),K=`Usage: /vault list | create NAME | get ID | archive ID | add-credential VAULT_ID KEY VALUE | archive-credential VAULT_ID CRED_ID`,q=_({commandName:`vault`,parseArgs:e=>{let t=V(e);return t.action===`invalid`?{action:`invalid`,reason:`${K}\n${t.reason}`}:t},dispatch:W,View:R,errorView:e=>G.createElement(R,{mode:`error`,message:e})})}))();export{q as callVault};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,n,r,t as i}from"./rolldown-runtime-DaDcL9Zw.js";import{n as a,t as o}from"./defineProperty-C-QyHrDq.js";import{a as s,c,i as l,n as u,o as d,r as f,s as p,t as m}from"./classPrivateFieldSet2-D4U5K-I3.js";import{n as h,t as g}from"./classPrivateMethodInitSpec-BXQD0Vh4.js";import{t as _}from"./semver-DQo45qGo.js";var v=i((e=>{a();var n,r,i=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;var s=typeof process==`object`&&process?process:{stdout:null,stderr:null},c=t(`node:events`),l=i(t(`node:stream`)),u=t(`node:string_decoder`);e.isStream=t=>!!t&&typeof t==`object`&&(t instanceof re||t instanceof l.default||(0,e.isReadable)(t)||(0,e.isWritable)(t)),e.isReadable=e=>!!e&&typeof e==`object`&&e instanceof c.EventEmitter&&typeof e.pipe==`function`&&e.pipe!==l.default.Writable.prototype.pipe,e.isWritable=e=>!!e&&typeof e==`object`&&e instanceof c.EventEmitter&&typeof e.write==`function`&&typeof e.end==`function`;var d=Symbol(`EOF`),f=Symbol(`maybeEmitEnd`),p=Symbol(`emittedEnd`),m=Symbol(`emittingEnd`),h=Symbol(`emittedError`),g=Symbol(`closed`),_=Symbol(`read`),v=Symbol(`flush`),y=Symbol(`flushChunk`),b=Symbol(`encoding`),x=Symbol(`decoder`),S=Symbol(`flowing`),C=Symbol(`paused`),w=Symbol(`resume`),T=Symbol(`buffer`),E=Symbol(`pipes`),D=Symbol(`bufferLength`),O=Symbol(`bufferPush`),k=Symbol(`bufferShift`),A=Symbol(`objectMode`),j=Symbol(`destroyed`),M=Symbol(`error`),N=Symbol(`emitData`),P=Symbol(`emitEnd`),F=Symbol(`emitEnd2`),I=Symbol(`async`),L=Symbol(`abort`),R=Symbol(`aborted`),z=Symbol(`signal`),B=Symbol(`dataListeners`),V=Symbol(`discarded`),H=e=>Promise.resolve().then(e),U=e=>e(),W=e=>e===`end`||e===`finish`||e===`prefinish`,G=e=>e instanceof ArrayBuffer||!!e&&typeof e==`object`&&e.constructor&&e.constructor.name===`ArrayBuffer`&&e.byteLength>=0,ee=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),K=class{constructor(e,t,n){o(this,`src`,void 0),o(this,`dest`,void 0),o(this,`opts`,void 0),o(this,`ondrain`,void 0),this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[w](),this.dest.on(`drain`,this.ondrain)}unpipe(){this.dest.removeListener(`drain`,this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},q=class extends K{unpipe(){this.src.removeListener(`error`,this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>this.dest.emit(`error`,e),e.on(`error`,this.proxyErrors)}},te=e=>!!e.objectMode,ne=e=>!e.objectMode&&!!e.encoding&&e.encoding!==`buffer`;n=Symbol.asyncIterator,r=Symbol.iterator;var re=class extends c.EventEmitter{constructor(...e){let t=e[0]||{};if(super(),o(this,S,!1),o(this,C,!1),o(this,E,[]),o(this,T,[]),o(this,A,void 0),o(this,b,void 0),o(this,I,void 0),o(this,x,void 0),o(this,d,!1),o(this,p,!1),o(this,m,!1),o(this,g,!1),o(this,h,null),o(this,D,0),o(this,j,!1),o(this,z,void 0),o(this,R,!1),o(this,B,0),o(this,V,!1),o(this,`writable`,!0),o(this,`readable`,!0),t.objectMode&&typeof t.encoding==`string`)throw TypeError(`Encoding and objectMode may not be used together`);te(t)?(this[A]=!0,this[b]=null):ne(t)?(this[b]=t.encoding,this[A]=!1):(this[A]=!1,this[b]=null),this[I]=!!t.async,this[x]=this[b]?new u.StringDecoder(this[b]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[T]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[E]});let{signal:n}=t;n&&(this[z]=n,n.aborted?this[L]():n.addEventListener(`abort`,()=>this[L]()))}get bufferLength(){return this[D]}get encoding(){return this[b]}set encoding(e){throw Error(`Encoding must be set at instantiation time`)}setEncoding(e){throw Error(`Encoding must be set at instantiation time`)}get objectMode(){return this[A]}set objectMode(e){throw Error(`objectMode must be set at instantiation time`)}get async(){return this[I]}set async(e){this[I]=this[I]||!!e}[L](){this[R]=!0,this.emit(`abort`,this[z]?.reason),this.destroy(this[z]?.reason)}get aborted(){return this[R]}set aborted(e){}write(e,t,n){if(this[R])return!1;if(this[d])throw Error(`write after end`);if(this[j])return this.emit(`error`,Object.assign(Error(`Cannot call write after a stream was destroyed`),{code:`ERR_STREAM_DESTROYED`})),!0;typeof t==`function`&&(n=t,t=`utf8`),t||(t=`utf8`);let r=this[I]?H:U;if(!this[A]&&!Buffer.isBuffer(e)){if(ee(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(G(e))e=Buffer.from(e);else if(typeof e!=`string`)throw Error(`Non-contiguous data written to non-objectMode stream`)}return this[A]?(this[S]&&this[D]!==0&&this[v](!0),this[S]?this.emit(`data`,e):this[O](e),this[D]!==0&&this.emit(`readable`),n&&r(n),this[S]):e.length?(typeof e==`string`&&!(t===this[b]&&!this[x]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[b]&&(e=this[x].write(e)),this[S]&&this[D]!==0&&this[v](!0),this[S]?this.emit(`data`,e):this[O](e),this[D]!==0&&this.emit(`readable`),n&&r(n),this[S]):(this[D]!==0&&this.emit(`readable`),n&&r(n),this[S])}read(e){if(this[j])return null;if(this[V]=!1,this[D]===0||e===0||e&&e>this[D])return this[f](),null;this[A]&&(e=null),this[T].length>1&&!this[A]&&(this[T]=[this[b]?this[T].join(``):Buffer.concat(this[T],this[D])]);let t=this[_](e||null,this[T][0]);return this[f](),t}[_](e,t){if(this[A])this[k]();else{let n=t;e===n.length||e===null?this[k]():typeof n==`string`?(this[T][0]=n.slice(e),t=n.slice(0,e),this[D]-=e):(this[T][0]=n.subarray(e),t=n.subarray(0,e),this[D]-=e)}return this.emit(`data`,t),!this[T].length&&!this[d]&&this.emit(`drain`),t}end(e,t,n){return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=`utf8`),e!==void 0&&this.write(e,t),n&&this.once(`end`,n),this[d]=!0,this.writable=!1,(this[S]||!this[C])&&this[f](),this}[w](){this[j]||(!this[B]&&!this[E].length&&(this[V]=!0),this[C]=!1,this[S]=!0,this.emit(`resume`),this[T].length?this[v]():this[d]?this[f]():this.emit(`drain`))}resume(){return this[w]()}pause(){this[S]=!1,this[C]=!0,this[V]=!1}get destroyed(){return this[j]}get flowing(){return this[S]}get paused(){return this[C]}[O](e){this[A]?this[D]+=1:this[D]+=e.length,this[T].push(e)}[k](){return this[A]?--this[D]:this[D]-=this[T][0].length,this[T].shift()}[v](e=!1){do;while(this[y](this[k]())&&this[T].length);!e&&!this[T].length&&!this[d]&&this.emit(`drain`)}[y](e){return this.emit(`data`,e),this[S]}pipe(e,t){if(this[j])return e;this[V]=!1;let n=this[p];return t=t||{},e===s.stdout||e===s.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[E].push(t.proxyErrors?new q(this,e,t):new K(this,e,t)),this[I]?H(()=>this[w]()):this[w]()),e}unpipe(e){let t=this[E].find(t=>t.dest===e);t&&(this[E].length===1?(this[S]&&this[B]===0&&(this[S]=!1),this[E]=[]):this[E].splice(this[E].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e===`data`)this[V]=!1,this[B]++,!this[E].length&&!this[S]&&this[w]();else if(e===`readable`&&this[D]!==0)super.emit(`readable`);else if(W(e)&&this[p])super.emit(e),this.removeAllListeners(e);else if(e===`error`&&this[h]){let e=t;this[I]?H(()=>e.call(this,this[h])):e.call(this,this[h])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e===`data`&&(this[B]=this.listeners(`data`).length,this[B]===0&&!this[V]&&!this[E].length&&(this[S]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e===`data`||e===void 0)&&(this[B]=0,!this[V]&&!this[E].length&&(this[S]=!1)),t}get emittedEnd(){return this[p]}[f](){!this[m]&&!this[p]&&!this[j]&&this[T].length===0&&this[d]&&(this[m]=!0,this.emit(`end`),this.emit(`prefinish`),this.emit(`finish`),this[g]&&this.emit(`close`),this[m]=!1)}emit(e,...t){let n=t[0];if(e!==`error`&&e!==`close`&&e!==j&&this[j])return!1;if(e===`data`)return!this[A]&&!n?!1:this[I]?(H(()=>this[N](n)),!0):this[N](n);if(e===`end`)return this[P]();if(e===`close`){if(this[g]=!0,!this[p]&&!this[j])return!1;let e=super.emit(`close`);return this.removeAllListeners(`close`),e}else if(e===`error`){this[h]=n,super.emit(M,n);let e=!this[z]||this.listeners(`error`).length?super.emit(`error`,n):!1;return this[f](),e}else if(e===`resume`){let e=super.emit(`resume`);return this[f](),e}else if(e===`finish`||e===`prefinish`){let t=super.emit(e);return this.removeAllListeners(e),t}let r=super.emit(e,...t);return this[f](),r}[N](e){for(let t of this[E])t.dest.write(e)===!1&&this.pause();let t=!this[V]&&super.emit(`data`,e);return this[f](),t}[P](){return this[p]?!1:(this[p]=!0,this.readable=!1,this[I]?(H(()=>this[F]()),!0):this[F]())}[F](){if(this[x]){let e=this[x].end();if(e){for(let t of this[E])t.dest.write(e);this[V]||super.emit(`data`,e)}}for(let e of this[E])e.end();let e=super.emit(`end`);return this.removeAllListeners(`end`),e}async collect(){let e=Object.assign([],{dataLength:0});this[A]||(e.dataLength=0);let t=this.promise();return this.on(`data`,t=>{e.push(t),this[A]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[A])throw Error(`cannot concat in objectMode`);let e=await this.collect();return this[b]?e.join(``):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(j,()=>t(Error(`stream destroyed`))),this.on(`error`,e=>t(e)),this.on(`end`,()=>e())})}[n](){this[V]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[d])return t();let r,i,a=e=>{this.off(`data`,o),this.off(`end`,s),this.off(j,c),t(),i(e)},o=e=>{this.off(`error`,a),this.off(`end`,s),this.off(j,c),this.pause(),r({value:e,done:!!this[d]})},s=()=>{this.off(`error`,a),this.off(`data`,o),this.off(j,c),t(),r({done:!0,value:void 0})},c=()=>a(Error(`stream destroyed`));return new Promise((e,t)=>{i=t,r=e,this.once(j,c),this.once(`error`,a),this.once(`end`,s),this.once(`data`,o)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[r](){this[V]=!1;let e=!1,t=()=>(this.pause(),this.off(M,t),this.off(j,t),this.off(`end`,t),e=!0,{done:!0,value:void 0});return this.once(`end`,t),this.once(M,t),this.once(j,t),{next:()=>{if(e)return t();let n=this.read();return n===null?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[j])return e?this.emit(`error`,e):this.emit(j),this;this[j]=!0,this[V]=!0,this[T].length=0,this[D]=0;let t=this;return typeof t.close==`function`&&!this[g]&&t.close(),e?this.emit(`error`,e):this.emit(j),this}static get isStream(){return e.isStream}};e.Minipass=re})),y=i(((e,t)=>{var{Minipass:n}=v(),r=Symbol(`_data`),i=Symbol(`_length`);t.exports=class extends n{constructor(e){super(e),this[r]=[],this[i]=0}write(e,t,n){typeof t==`function`&&(n=t,t=`utf8`),t||(t=`utf8`);let a=Buffer.isBuffer(e)?e:Buffer.from(e,t);return this[r].push(a),this[i]+=a.length,n&&n(),!0}end(e,t,n){typeof e==`function`&&(n=e,e=null),typeof t==`function`&&(n=t,t=`utf8`),e&&this.write(e,t);let a=Buffer.concat(this[r],this[i]);return super.write(a),super.end(n)}};var a=class extends n{constructor(e){super(e),this[r]=[],this[i]=0}write(e,t,n){typeof t==`function`&&(n=t,t=`utf8`),t||(t=`utf8`);let a=Buffer.isBuffer(e)?e:Buffer.from(e,t);return this[r].push(a),this[i]+=a.length,super.write(e,t,n)}end(e,t,n){typeof e==`function`&&(n=e,e=null),typeof t==`function`&&(n=t,t=`utf8`),e&&this.write(e,t);let a=Buffer.concat(this[r],this[i]);return this.emit(`collect`,a),super.end(n)}};t.exports.PassThrough=a})),b=i(((e,n)=>{var r=typeof process==`object`&&process?process:{stdout:null,stderr:null},i=t(`events`),a=t(`stream`),o=t(`string_decoder`).StringDecoder,s=Symbol(`EOF`),c=Symbol(`maybeEmitEnd`),l=Symbol(`emittedEnd`),u=Symbol(`emittingEnd`),d=Symbol(`emittedError`),f=Symbol(`closed`),p=Symbol(`read`),m=Symbol(`flush`),h=Symbol(`flushChunk`),g=Symbol(`encoding`),_=Symbol(`decoder`),v=Symbol(`flowing`),y=Symbol(`paused`),b=Symbol(`resume`),x=Symbol(`bufferLength`),S=Symbol(`bufferPush`),C=Symbol(`bufferShift`),w=Symbol(`objectMode`),T=Symbol(`destroyed`),E=Symbol(`emitData`),D=Symbol(`emitEnd`),O=Symbol(`emitEnd2`),k=Symbol(`async`),A=e=>Promise.resolve().then(e),j=global._MP_NO_ITERATOR_SYMBOLS_!==`1`,M=j&&Symbol.asyncIterator||Symbol(`asyncIterator not implemented`),N=j&&Symbol.iterator||Symbol(`iterator not implemented`),P=e=>e===`end`||e===`finish`||e===`prefinish`,F=e=>e instanceof ArrayBuffer||typeof e==`object`&&e.constructor&&e.constructor.name===`ArrayBuffer`&&e.byteLength>=0,I=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),L=class{constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[b](),t.on(`drain`,this.ondrain)}unpipe(){this.dest.removeListener(`drain`,this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},R=class extends L{unpipe(){this.src.removeListener(`error`,this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>t.emit(`error`,e),e.on(`error`,this.proxyErrors)}};n.exports=class e extends a{constructor(e){super(),this[v]=!1,this[y]=!1,this.pipes=[],this.buffer=[],this[w]=e&&e.objectMode||!1,this[w]?this[g]=null:this[g]=e&&e.encoding||null,this[g]===`buffer`&&(this[g]=null),this[k]=e&&!!e.async||!1,this[_]=this[g]?new o(this[g]):null,this[s]=!1,this[l]=!1,this[u]=!1,this[f]=!1,this[d]=null,this.writable=!0,this.readable=!0,this[x]=0,this[T]=!1}get bufferLength(){return this[x]}get encoding(){return this[g]}set encoding(e){if(this[w])throw Error(`cannot set encoding in objectMode`);if(this[g]&&e!==this[g]&&(this[_]&&this[_].lastNeed||this[x]))throw Error(`cannot change encoding`);this[g]!==e&&(this[_]=e?new o(e):null,this.buffer.length&&(this.buffer=this.buffer.map(e=>this[_].write(e)))),this[g]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[w]}set objectMode(e){this[w]=this[w]||!!e}get async(){return this[k]}set async(e){this[k]=this[k]||!!e}write(e,t,n){if(this[s])throw Error(`write after end`);if(this[T])return this.emit(`error`,Object.assign(Error(`Cannot call write after a stream was destroyed`),{code:`ERR_STREAM_DESTROYED`})),!0;typeof t==`function`&&(n=t,t=`utf8`),t||(t=`utf8`);let r=this[k]?A:e=>e();return!this[w]&&!Buffer.isBuffer(e)&&(I(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):F(e)?e=Buffer.from(e):typeof e!=`string`&&(this.objectMode=!0)),this[w]?(this.flowing&&this[x]!==0&&this[m](!0),this.flowing?this.emit(`data`,e):this[S](e),this[x]!==0&&this.emit(`readable`),n&&r(n),this.flowing):e.length?(typeof e==`string`&&!(t===this[g]&&!this[_].lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[g]&&(e=this[_].write(e)),this.flowing&&this[x]!==0&&this[m](!0),this.flowing?this.emit(`data`,e):this[S](e),this[x]!==0&&this.emit(`readable`),n&&r(n),this.flowing):(this[x]!==0&&this.emit(`readable`),n&&r(n),this.flowing)}read(e){if(this[T])return null;if(this[x]===0||e===0||e>this[x])return this[c](),null;this[w]&&(e=null),this.buffer.length>1&&!this[w]&&(this.encoding?this.buffer=[this.buffer.join(``)]:this.buffer=[Buffer.concat(this.buffer,this[x])]);let t=this[p](e||null,this.buffer[0]);return this[c](),t}[p](e,t){return e===t.length||e===null?this[C]():(this.buffer[0]=t.slice(e),t=t.slice(0,e),this[x]-=e),this.emit(`data`,t),!this.buffer.length&&!this[s]&&this.emit(`drain`),t}end(e,t,n){return typeof e==`function`&&(n=e,e=null),typeof t==`function`&&(n=t,t=`utf8`),e&&this.write(e,t),n&&this.once(`end`,n),this[s]=!0,this.writable=!1,(this.flowing||!this[y])&&this[c](),this}[b](){this[T]||(this[y]=!1,this[v]=!0,this.emit(`resume`),this.buffer.length?this[m]():this[s]?this[c]():this.emit(`drain`))}resume(){return this[b]()}pause(){this[v]=!1,this[y]=!0}get destroyed(){return this[T]}get flowing(){return this[v]}get paused(){return this[y]}[S](e){this[w]?this[x]+=1:this[x]+=e.length,this.buffer.push(e)}[C](){return this.buffer.length&&(this[w]?--this[x]:this[x]-=this.buffer[0].length),this.buffer.shift()}[m](e){do;while(this[h](this[C]()));!e&&!this.buffer.length&&!this[s]&&this.emit(`drain`)}[h](e){return e?(this.emit(`data`,e),this.flowing):!1}pipe(e,t){if(this[T])return;let n=this[l];return t=t||{},e===r.stdout||e===r.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this.pipes.push(t.proxyErrors?new R(this,e,t):new L(this,e,t)),this[k]?A(()=>this[b]()):this[b]()),e}unpipe(e){let t=this.pipes.find(t=>t.dest===e);t&&(this.pipes.splice(this.pipes.indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);return e===`data`&&!this.pipes.length&&!this.flowing?this[b]():e===`readable`&&this[x]!==0?super.emit(`readable`):P(e)&&this[l]?(super.emit(e),this.removeAllListeners(e)):e===`error`&&this[d]&&(this[k]?A(()=>t.call(this,this[d])):t.call(this,this[d])),n}get emittedEnd(){return this[l]}[c](){!this[u]&&!this[l]&&!this[T]&&this.buffer.length===0&&this[s]&&(this[u]=!0,this.emit(`end`),this.emit(`prefinish`),this.emit(`finish`),this[f]&&this.emit(`close`),this[u]=!1)}emit(e,t,...n){if(e!==`error`&&e!==`close`&&e!==T&&this[T])return;if(e===`data`)return t?this[k]?A(()=>this[E](t)):this[E](t):!1;if(e===`end`)return this[D]();if(e===`close`){if(this[f]=!0,!this[l]&&!this[T])return;let e=super.emit(`close`);return this.removeAllListeners(`close`),e}else if(e===`error`){this[d]=t;let e=super.emit(`error`,t);return this[c](),e}else if(e===`resume`){let e=super.emit(`resume`);return this[c](),e}else if(e===`finish`||e===`prefinish`){let t=super.emit(e);return this.removeAllListeners(e),t}let r=super.emit(e,t,...n);return this[c](),r}[E](e){for(let t of this.pipes)t.dest.write(e)===!1&&this.pause();let t=super.emit(`data`,e);return this[c](),t}[D](){this[l]||(this[l]=!0,this.readable=!1,this[k]?A(()=>this[O]()):this[O]())}[O](){if(this[_]){let e=this[_].end();if(e){for(let t of this.pipes)t.dest.write(e);super.emit(`data`,e)}}for(let e of this.pipes)e.end();let e=super.emit(`end`);return this.removeAllListeners(`end`),e}collect(){let e=[];this[w]||(e.dataLength=0);let t=this.promise();return this.on(`data`,t=>{e.push(t),this[w]||(e.dataLength+=t.length)}),t.then(()=>e)}concat(){return this[w]?Promise.reject(Error(`cannot concat in objectMode`)):this.collect().then(e=>this[w]?Promise.reject(Error(`cannot concat in objectMode`)):this[g]?e.join(``):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,t)=>{this.on(T,()=>t(Error(`stream destroyed`))),this.on(`error`,e=>t(e)),this.on(`end`,()=>e())})}[M](){return{next:()=>{let e=this.read();if(e!==null)return Promise.resolve({done:!1,value:e});if(this[s])return Promise.resolve({done:!0});let t=null,n=null,r=e=>{this.removeListener(`data`,i),this.removeListener(`end`,a),n(e)},i=e=>{this.removeListener(`error`,r),this.removeListener(`end`,a),this.pause(),t({value:e,done:!!this[s]})},a=()=>{this.removeListener(`error`,r),this.removeListener(`data`,i),t({done:!0})},o=()=>r(Error(`stream destroyed`));return new Promise((e,s)=>{n=s,t=e,this.once(T,o),this.once(`error`,r),this.once(`end`,a),this.once(`data`,i)})}}}[N](){return{next:()=>{let e=this.read();return{value:e,done:e===null}}}}destroy(e){return this[T]?(e?this.emit(`error`,e):this.emit(T),this):(this[T]=!0,this.buffer.length=0,this[x]=0,typeof this.close==`function`&&!this[f]&&this.close(),e?this.emit(`error`,e):this.emit(T),this)}static isStream(t){return!!t&&(t instanceof e||t instanceof a||t instanceof i&&(typeof t.pipe==`function`||typeof t.write==`function`&&typeof t.end==`function`))}}})),x=i(((e,n)=>{var r=b(),i=t(`events`),a=e=>e&&e instanceof i&&(typeof e.pipe==`function`||typeof e.write==`function`&&typeof e.end==`function`),o=Symbol(`_head`),s=Symbol(`_tail`),c=Symbol(`_linkStreams`),l=Symbol(`_setHead`),u=Symbol(`_setTail`),d=Symbol(`_onError`),f=Symbol(`_onData`),p=Symbol(`_onEnd`),m=Symbol(`_onDrain`),h=Symbol(`_streams`);n.exports=class extends r{constructor(e,...t){a(e)&&(t.unshift(e),e={}),super(e),this[h]=[],t.length&&this.push(...t)}[c](e){return e.reduce((e,t)=>(e.on(`error`,e=>t.emit(`error`,e)),e.pipe(t),t))}push(...e){this[h].push(...e),this[s]&&e.unshift(this[s]);let t=this[c](e);this[u](t),this[o]||this[l](e[0])}unshift(...e){this[h].unshift(...e),this[o]&&e.push(this[o]);let t=this[c](e);this[l](e[0]),this[s]||this[u](t)}destroy(e){return this[h].forEach(e=>typeof e.destroy==`function`&&e.destroy()),super.destroy(e)}[u](e){this[s]=e,e.on(`error`,t=>this[d](e,t)),e.on(`data`,t=>this[f](e,t)),e.on(`end`,()=>this[p](e)),e.on(`finish`,()=>this[p](e))}[d](e,t){e===this[s]&&this.emit(`error`,t)}[f](e,t){e===this[s]&&super.write(t)}[p](e){e===this[s]&&super.end()}pause(){return super.pause(),this[s]&&this[s].pause&&this[s].pause()}emit(e,...t){return e===`resume`&&this[s]&&this[s].resume&&this[s].resume(),super.emit(e,...t)}[l](e){this[o]=e,e.on(`drain`,()=>this[m](e))}[m](e){e===this[o]&&this.emit(`drain`)}write(e,t,n){return this[o].write(e,t,n)&&(this.flowing||this.buffer.length===0)}end(e,t,n){return this[o].end(e,t,n),this}}})),S=i(((e,n)=>{h(),c(),d(),l(),u();var r=t(`crypto`),{Minipass:i}=v(),a=[`sha512`,`sha384`,`sha256`],o=[`sha512`],_=r.getHashes(),y=/^[a-z0-9+/]+(?:=?=?)$/i,b=/^([a-z0-9]+)-([^?]+)(\?[?\S*]*)?$/,x=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/,S=/^[\x21-\x7E]+$/,C=[`md5`,`whirlpool`,`sha1`,`sha224`,`sha256`,`sha384`,`sha512`,`sha3`,`sha3-256`,`sha3-384`,`sha3-512`,`sha3_256`,`sha3_384`,`sha3_512`].filter(e=>_.includes(e)),w=e=>e?.length?`?${e.join(`?`)}`:``,T=new WeakMap,E=new WeakMap,D=new WeakMap,O=new WeakSet,k=class extends i{constructor(e){super(),g(this,O),p(this,T,void 0),p(this,E,void 0),p(this,D,void 0),this.size=0,this.opts=e,s(O,this,A).call(this),e?.algorithms?this.algorithms=[...e.algorithms]:this.algorithms=[...o],this.algorithm!==null&&!this.algorithms.includes(this.algorithm)&&this.algorithms.push(this.algorithm),this.hashes=this.algorithms.map(r.createHash)}on(e,t){return e===`size`&&f(E,this)?t(f(E,this)):e===`integrity`&&f(T,this)?t(f(T,this)):e===`verified`&&f(D,this)?t(f(D,this)):super.on(e,t)}emit(e,t){return e===`end`&&s(O,this,j).call(this),super.emit(e,t)}write(e){return this.size+=e.length,this.hashes.forEach(t=>t.update(e)),super.write(e)}};function A(){this.sri=this.opts?.integrity?F(this.opts?.integrity,this.opts):null,this.expectedSize=this.opts?.size,this.sri?this.sri.isHash?(this.goodSri=!0,this.algorithm=this.sri.algorithm):(this.goodSri=!this.sri.isEmpty(),this.algorithm=this.sri.pickAlgorithm(this.opts)):this.algorithm=null,this.digests=this.goodSri?this.sri[this.algorithm]:null,this.optString=w(this.opts?.options)}function j(){this.goodSri||s(O,this,A).call(this);let e=F(this.hashes.map((e,t)=>`${this.algorithms[t]}-${e.digest(`base64`)}${this.optString}`).join(` `),this.opts),t=this.goodSri&&e.match(this.sri,this.opts);if(typeof this.expectedSize==`number`&&this.size!==this.expectedSize){let e=Error(`stream size mismatch when checking ${this.sri}.\n Wanted: ${this.expectedSize}\n Found: ${this.size}`);e.code=`EBADSIZE`,e.found=this.size,e.expected=this.expectedSize,e.sri=this.sri,this.emit(`error`,e)}else if(this.sri&&!t){let t=Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);t.code=`EINTEGRITY`,t.found=e,t.expected=this.digests,t.algorithm=this.algorithm,t.sri=this.sri,this.emit(`error`,t)}else m(E,this,this.size),this.emit(`size`,this.size),m(T,this,e),this.emit(`integrity`,e),t&&(m(D,this,t),this.emit(`verified`,t))}var M=class{get isHash(){return!0}constructor(e,t){let n=t?.strict;this.source=e.trim(),this.digest=``,this.algorithm=``,this.options=[];let r=this.source.match(n?x:b);if(!r||n&&!a.includes(r[1])||!_.includes(r[1]))return;this.algorithm=r[1],this.digest=r[2];let i=r[3];i&&(this.options=i.slice(1).split(`?`))}hexDigest(){return this.digest&&Buffer.from(this.digest,`base64`).toString(`hex`)}toJSON(){return this.toString()}match(e,t){let n=F(e,t);if(!n)return!1;if(n.isIntegrity){let e=n.pickAlgorithm(t,[this.algorithm]);return e&&n[e].find(e=>e.digest===this.digest)||!1}return n.digest===this.digest&&n}toString(e){return e?.strict&&!(a.includes(this.algorithm)&&this.digest.match(y)&&this.options.every(e=>e.match(S)))?``:`${this.algorithm}-${this.digest}${w(this.options)}`}};function N(e,t,n,r){let i=e!==``,a=!1,o=``,s=r.length-1;for(let e=0;e<s;e++){let i=M.prototype.toString.call(r[e],n);i&&(a=!0,o+=i,o+=t)}let c=M.prototype.toString.call(r[s],n);return c&&(a=!0,o+=c),i&&a?e+t+o:e+o}var P=class{get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(e){let t=e?.sep||` `,n=``;if(e?.strict){t=t.replace(/\S+/g,` `);for(let r of a)this[r]&&(n=N(n,t,e,this[r]))}else for(let r of Object.keys(this))n=N(n,t,e,this[r]);return n}concat(e,t){let n=typeof e==`string`?e:L(e,t);return F(`${this.toString(t)} ${n}`,t)}hexDigest(){return F(this,{single:!0}).hexDigest()}merge(e,t){let n=F(e,t);for(let e in n)if(this[e]){if(!this[e].find(t=>n[e].find(e=>t.digest===e.digest)))throw Error(`hashes do not match, cannot update integrity`)}else this[e]=n[e]}match(e,t){let n=F(e,t);if(!n)return!1;let r=n.pickAlgorithm(t,Object.keys(this));return!!r&&this[r].find(e=>n[r].find(t=>e.digest===t.digest))||!1}pickAlgorithm(e,t){let n=e?.pickAlgorithm||G,r=Object.keys(this);return t?.length&&(r=r.filter(e=>t.includes(e))),r.length?r.reduce((e,t)=>n(e,t)||e):null}};n.exports.parse=F;function F(e,t){if(!e)return null;if(typeof e==`string`)return I(e,t);if(e.algorithm&&e.digest){let n=new P;return n[e.algorithm]=[e],I(L(n,t),t)}else return I(L(e,t),t)}function I(e,t){if(t?.single)return new M(e,t);let n=e.trim().split(/\s+/).reduce((e,n)=>{let r=new M(n,t);if(r.algorithm&&r.digest){let t=r.algorithm;Object.keys(e).includes(t)||(e[t]=[]),e[t].push(r)}return e},new P);return n.isEmpty()?null:n}n.exports.stringify=L;function L(e,t){return e.algorithm&&e.digest?M.prototype.toString.call(e,t):typeof e==`string`?L(F(e,t),t):P.prototype.toString.call(e,t)}n.exports.fromHex=R;function R(e,t,n){let r=w(n?.options);return F(`${t}-${Buffer.from(e,`hex`).toString(`base64`)}${r}`,n)}n.exports.fromData=z;function z(e,t){let n=t?.algorithms||[...o],i=w(t?.options);return n.reduce((n,a)=>{let o=new M(`${a}-${r.createHash(a).update(e).digest(`base64`)}${i}`,t);if(o.algorithm&&o.digest){let e=o.algorithm;n[e]||(n[e]=[]),n[e].push(o)}return n},new P)}n.exports.fromStream=B;function B(e,t){let n=U(t);return new Promise((t,r)=>{e.pipe(n),e.on(`error`,r),n.on(`error`,r);let i;n.on(`integrity`,e=>{i=e}),n.on(`end`,()=>t(i)),n.resume()})}n.exports.checkData=V;function V(e,t,n){if(t=F(t,n),!t||!Object.keys(t).length){if(n?.error)throw Object.assign(Error(`No valid integrity hashes to check against`),{code:`EINTEGRITY`});return!1}let i=t.pickAlgorithm(n),a=F({algorithm:i,digest:r.createHash(i).update(e).digest(`base64`)}),o=a.match(t,n);if(n=n||{},o||!n.error)return o;if(typeof n.size==`number`&&e.length!==n.size){let r=Error(`data size mismatch when checking ${t}.\n Wanted: ${n.size}\n Found: ${e.length}`);throw r.code=`EBADSIZE`,r.found=e.length,r.expected=n.size,r.sri=t,r}else{let n=Error(`Integrity checksum failed when using ${i}: Wanted ${t}, but got ${a}. (${e.length} bytes)`);throw n.code=`EINTEGRITY`,n.found=a,n.expected=t,n.algorithm=i,n.sri=t,n}}n.exports.checkStream=H;function H(e,t,n){if(n=n||Object.create(null),n.integrity=t,t=F(t,n),!t||!Object.keys(t).length)return Promise.reject(Object.assign(Error(`No valid integrity hashes to check against`),{code:`EINTEGRITY`}));let r=U(n);return new Promise((t,n)=>{e.pipe(r),e.on(`error`,n),r.on(`error`,n);let i;r.on(`verified`,e=>{i=e}),r.on(`end`,()=>t(i)),r.resume()})}n.exports.integrityStream=U;function U(e=Object.create(null)){return new k(e)}n.exports.create=W;function W(e){let t=e?.algorithms||[...o],n=w(e?.options),i=t.map(r.createHash);return{update:function(e,t){return i.forEach(n=>n.update(e,t)),this},digest:function(){return t.reduce((t,r)=>{let a=new M(`${r}-${i.shift().digest(`base64`)}${n}`,e);return t[a.algorithm]||(t[a.algorithm]=[]),t[a.algorithm].push(a),t},new P)}}}function G(e,t){return C.indexOf(e.toLowerCase())>=C.indexOf(t.toLowerCase())?e:t}})),C=i(((e,t)=>{t.exports=(e,{copy:t,wrap:n})=>{let r={};if(e&&typeof e==`object`)for(let n of t)e[n]!==void 0&&(r[n]=e[n]);else r[n]=e;return r}})),w=i(((e,t)=>{var n=_();t.exports={satisfies:e=>n.satisfies(process.version,e,{includePrerelease:!0})}})),T=i(((e,n)=>{var{inspect:r}=t(`util`),i=class{constructor(e,t,n){let r=`${t}: ${n.syscall} returned ${n.code} (${n.message})`;n.path!==void 0&&(r+=` ${n.path}`),n.dest!==void 0&&(r+=` => ${n.dest}`),this.code=e,Object.defineProperties(this,{name:{value:`SystemError`,enumerable:!1,writable:!0,configurable:!0},message:{value:r,enumerable:!1,writable:!0,configurable:!0},info:{value:n,enumerable:!0,configurable:!0,writable:!1},errno:{get(){return n.errno},set(e){n.errno=e},enumerable:!0,configurable:!0},syscall:{get(){return n.syscall},set(e){n.syscall=e},enumerable:!0,configurable:!0}}),n.path!==void 0&&Object.defineProperty(this,"path",{get(){return n.path},set(e){n.path=e},enumerable:!0,configurable:!0}),n.dest!==void 0&&Object.defineProperty(this,"dest",{get(){return n.dest},set(e){n.dest=e},enumerable:!0,configurable:!0})}toString(){return`${this.name} [${this.code}]: ${this.message}`}[Symbol.for(`nodejs.util.inspect.custom`)](e,t){return r(this,{...t,getters:!0,customInspect:!1})}};function a(e,t){n.exports[e]=class extends i{constructor(n){super(e,t,n)}}}a(`ERR_FS_CP_DIR_TO_NON_DIR`,`Cannot overwrite directory with non-directory`),a(`ERR_FS_CP_EEXIST`,`Target already exists`),a(`ERR_FS_CP_EINVAL`,`Invalid src or dest`),a(`ERR_FS_CP_FIFO_PIPE`,`Cannot copy a FIFO pipe`),a(`ERR_FS_CP_NON_DIR_TO_DIR`,`Cannot overwrite non-directory with directory`),a(`ERR_FS_CP_SOCKET`,`Cannot copy a socket file`),a(`ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY`,`Cannot overwrite symlink in subdirectory of self`),a(`ERR_FS_CP_UNKNOWN`,`Cannot copy an unknown file type`),a(`ERR_FS_EISDIR`,`Path is a directory`),n.exports.ERR_INVALID_ARG_TYPE=class extends Error{constructor(e,t,n){super(),this.code=`ERR_INVALID_ARG_TYPE`,this.message=`The ${e} argument must be ${t}. Received ${typeof n}`}}})),E=i(((e,n)=>{var{ERR_FS_CP_DIR_TO_NON_DIR:r,ERR_FS_CP_EEXIST:i,ERR_FS_CP_EINVAL:a,ERR_FS_CP_FIFO_PIPE:o,ERR_FS_CP_NON_DIR_TO_DIR:s,ERR_FS_CP_SOCKET:c,ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY:l,ERR_FS_CP_UNKNOWN:u,ERR_FS_EISDIR:d,ERR_INVALID_ARG_TYPE:f}=T(),{constants:{errno:{EEXIST:p,EISDIR:m,EINVAL:h,ENOTDIR:g}}}=t(`os`),{chmod:_,copyFile:v,lstat:y,mkdir:b,readdir:x,readlink:S,stat:C,symlink:w,unlink:E,utimes:D}=t(`fs/promises`),{dirname:O,isAbsolute:k,join:A,parse:j,resolve:M,sep:N,toNamespacedPath:P}=t(`path`),{fileURLToPath:F}=t(`url`),I={dereference:!1,errorOnExist:!1,filter:void 0,force:!0,preserveTimestamps:!1,recursive:!1};async function L(e,t,n){if(n!=null&&typeof n!=`object`)throw new f(`options`,[`Object`],n);return z(P(R(e)),P(R(t)),{...I,...n})}function R(e){return e!=null&&e.href&&e.origin?F(e):e}async function z(e,t,n){n.preserveTimestamps&&process.arch===`ia32`&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended`,`TimestampPrecisionWarning`);let{srcStat:r,destStat:i}=await B(e,t,n);return await G(e,r,t),n.filter?q(U,i,e,t,n):U(i,e,t,n)}async function B(e,t,n){let{0:i,1:o}=await H(e,t,n);if(o){if(V(i,o))throw new a({message:`src and dest cannot be the same`,path:t,syscall:`cp`,errno:h});if(i.isDirectory()&&!o.isDirectory())throw new r({message:`cannot overwrite directory ${e} with non-directory ${t}`,path:t,syscall:`cp`,errno:m});if(!i.isDirectory()&&o.isDirectory())throw new s({message:`cannot overwrite non-directory ${e} with directory ${t}`,path:t,syscall:`cp`,errno:g})}if(i.isDirectory()&&K(e,t))throw new a({message:`cannot copy ${e} to a subdirectory of self ${t}`,path:t,syscall:`cp`,errno:h});return{srcStat:i,destStat:o}}function V(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function H(e,t,n){let r=n.dereference?e=>C(e,{bigint:!0}):e=>y(e,{bigint:!0});return Promise.all([r(e),r(t).catch(e=>{if(e.code===`ENOENT`)return null;throw e})])}async function U(e,t,n,r){let i=O(n);return await W(i)||await b(i,{recursive:!0}),ne(e,t,n,r)}function W(e){return C(e).then(()=>!0,e=>e.code!==`ENOENT`&&Promise.reject(e))}async function G(e,t,n){let r=M(O(e)),i=M(O(n));if(i===r||i===j(i).root)return;let o;try{o=await C(i,{bigint:!0})}catch(e){if(e.code===`ENOENT`)return;throw e}if(V(t,o))throw new a({message:`cannot copy ${e} to a subdirectory of self ${n}`,path:n,syscall:`cp`,errno:h});return G(e,t,i)}var ee=e=>M(e).split(N).filter(Boolean);function K(e,t){let n=ee(e),r=ee(t);return n.every((e,t)=>r[t]===e)}async function q(e,t,n,r,i,a){if(await i.filter(n,r))return e(t,n,r,i,a)}function te(e,t,n,r){return r.filter?q(ne,e,t,n,r):ne(e,t,n,r)}async function ne(e,t,n,r){let i=await(r.dereference?C:y)(t);if(i.isDirectory()&&r.recursive)return Y(i,e,t,n,r);if(i.isDirectory())throw new d({message:`${t} is a directory (not copied)`,path:t,syscall:`cp`,errno:h});if(i.isFile()||i.isCharacterDevice()||i.isBlockDevice())return re(i,e,t,n,r);if(i.isSymbolicLink())return pe(e,t,n);throw i.isSocket()?new c({message:`cannot copy a socket file: ${n}`,path:n,syscall:`cp`,errno:h}):i.isFIFO()?new o({message:`cannot copy a FIFO pipe: ${n}`,path:n,syscall:`cp`,errno:h}):new u({message:`cannot copy an unknown file type: ${n}`,path:n,syscall:`cp`,errno:h})}function re(e,t,n,r,i){return t?ie(e,n,r,i):ae(e,n,r,i)}async function ie(e,t,n,r){if(r.force)return await E(n),ae(e,t,n,r);if(r.errorOnExist)throw new i({message:`${n} already exists`,path:n,syscall:`cp`,errno:p})}async function ae(e,t,n,r){return await v(t,n),r.preserveTimestamps?oe(e.mode,t,n):le(n,e.mode)}async function oe(e,t,n){return se(e)&&await J(n,e),ce(e,t,n)}function se(e){return(e&128)==0}function J(e,t){return le(e,t|128)}async function ce(e,t,n){return await ue(t,n),le(n,e)}function le(e,t){return _(e,t)}async function ue(e,t){let n=await C(e);return D(t,n.atime,n.mtime)}function Y(e,t,n,r,i){return t?fe(n,r,i):de(e.mode,n,r,i)}async function de(e,t,n,r){return await b(n),await fe(t,n,r),le(n,e)}async function fe(e,t,n){let r=await x(e);for(let i=0;i<r.length;i++){let a=r[i],o=A(e,a),s=A(t,a),{destStat:c}=await B(o,s,n);await te(c,o,s,n)}}async function pe(e,t,n){let r=await S(t);if(k(r)||(r=M(O(t),r)),!e)return w(r,n);let i;try{i=await S(n)}catch(e){if(e.code===`EINVAL`||e.code===`UNKNOWN`)return w(r,n);throw e}if(k(i)||(i=M(O(n),i)),K(r,i))throw new a({message:`cannot copy ${r} to a subdirectory of self ${i}`,path:n,syscall:`cp`,errno:h});if((await C(t)).isDirectory()&&K(i,r))throw new l({message:`cannot overwrite ${i} with ${r}`,path:n,syscall:`cp`,errno:h});return me(r,n)}async function me(e,t){return await E(t),w(e,t)}n.exports=L})),D=i(((e,n)=>{var r=t(`fs/promises`),i=C(),a=w(),o=E(),s=a.satisfies(`>=16.7.0`);n.exports=async(e,t,n)=>{let a=i(n,{copy:[`dereference`,`errorOnExist`,`filter`,`force`,`preserveTimestamps`,`recursive`]});return s?r.cp(e,t,a):o(e,t,a)}})),O=i(((e,n)=>{var{join:r,sep:i}=t(`path`),a=C(),{mkdir:o,mkdtemp:s,rm:c}=t(`fs/promises`);n.exports=async(e,t,n)=>{let l=a(n,{copy:[`tmpPrefix`]});await o(e,{recursive:!0});let u=await s(r(`${e}${i}`,l.tmpPrefix||``)),d,f;try{f=await t(u)}catch(e){d=e}try{await c(u,{force:!0,recursive:!0})}catch{}if(d)throw d;return f}})),k=i(((e,n)=>{var{readdir:r}=t(`fs/promises`),{join:i}=t(`path`);n.exports=async e=>{let t=[];for(let n of await r(e))if(n.startsWith(`@`))for(let a of await r(i(e,n)))t.push(i(n,a));else t.push(n);return t}})),A=i(((e,n)=>{var{dirname:r,join:i,resolve:a,relative:o,isAbsolute:s}=t(`path`),c=t(`fs/promises`),l=async e=>{try{return await c.access(e),!0}catch(e){return e.code!==`ENOENT`}},u=async(e,t,n={},d=!0,f=[])=>{if(!e||!t)throw TypeError("`source` and `destination` file required");if(n={overwrite:!0,...n},!n.overwrite&&await l(t))throw Error(`The destination file exists: ${t}`);await c.mkdir(r(t),{recursive:!0});try{await c.rename(e,t)}catch(r){if(r.code===`EXDEV`||r.code===`EPERM`){let r=await c.lstat(e);if(r.isDirectory()){let r=await c.readdir(e);await Promise.all(r.map(r=>u(i(e,r),i(t,r),n,!1,f)))}else r.isSymbolicLink()?f.push({source:e,destination:t}):await c.copyFile(e,t)}else throw r}d&&(await Promise.all(f.map(async({source:e,destination:t})=>{let n=await c.readlink(e);s(n)&&(n=a(t,o(e,n)));let i=`file`;try{i=await c.stat(a(r(e),n)),i.isDirectory()&&(i=`junction`)}catch{}await c.symlink(n,t,i)})),await c.rm(e,{recursive:!0,force:!0}))};n.exports=u})),j=i(((e,t)=>{t.exports={cp:D(),withTempDir:O(),readdirScoped:k(),moveFile:A()}})),M=i(((e,n)=>{var r=t(`crypto`),{withTempDir:i}=j(),a=t(`fs/promises`),o=t(`path`);n.exports.mkdir=s,n.exports.tmpName=function(e,t){let n=r.randomUUID();return o.join(e,`tmp`,t?`${t}-${n}`:n)};async function s(e,t={}){let{tmpPrefix:n}=t,r=o.join(e,`tmp`);await a.mkdir(r,{recursive:!0,owner:`inherit`});let i=`${r}${o.sep}${n||``}`;return a.mkdtemp(i,{owner:`inherit`})}n.exports.withTmp=c;function c(e,t,n){return n||(n=t,t={}),i(o.join(e,`tmp`),n,t)}})),N=r({author:()=>ee,default:()=>q,dependencies:()=>H,description:()=>I,devDependencies:()=>U,engines:()=>W,files:()=>R,keywords:()=>V,license:()=>`ISC`,main:()=>L,name:()=>P,repository:()=>B,scripts:()=>z,tap:()=>K,templateOSS:()=>G,version:()=>F}),P,F,I,L,R,z,B,V,H,U,W,G,ee,K,q,te=n((()=>{P=`cacache`,F=`20.0.4`,I=`Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.`,L=`lib/index.js`,R=[`bin/`,`lib/`],z={test:`tap`,snap:`tap`,coverage:`tap`,"test-docker":`docker run -it --rm --name pacotest -v "$PWD":/tmp -w /tmp node:latest npm test`,lint:`npm run eslint`,npmclilint:`npmcli-lint`,lintfix:`npm run eslint -- --fix`,postsnap:`npm run lintfix --`,postlint:`template-oss-check`,posttest:`npm run lint`,"template-oss-apply":`template-oss-apply --force`,eslint:`eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"`},B={type:`git`,url:`git+https://github.com/npm/cacache.git`},V=[`cache`,`caching`,`content-addressable`,`sri`,`sri hash`,`subresource integrity`,`cache`,`storage`,`store`,`file store`,`filesystem`,`disk cache`,`disk storage`],H={"@npmcli/fs":`^5.0.0`,"fs-minipass":`^3.0.0`,glob:`^13.0.0`,"lru-cache":`^11.1.0`,minipass:`^7.0.3`,"minipass-collect":`^2.0.1`,"minipass-flush":`^1.0.5`,"minipass-pipeline":`^1.2.4`,"p-map":`^7.0.2`,ssri:`^13.0.0`},U={"@npmcli/eslint-config":`^6.0.1`,"@npmcli/template-oss":`4.29.0`,tap:`^16.0.0`},W={node:`^20.17.0 || >=22.9.0`},G={"//@npmcli/template-oss":`This file is partially managed by @npmcli/template-oss. Edits may be overwritten.`,windowsCI:!1,version:`4.29.0`,publish:`true`},ee=`GitHub Inc.`,K={"nyc-arg":[`--exclude`,`tap-snapshots/**`]},q={name:P,version:F,"cache-version":{content:`2`,index:`5`},description:I,main:L,files:R,scripts:z,repository:B,keywords:V,license:`ISC`,dependencies:H,devDependencies:U,engines:W,templateOSS:G,author:ee,tap:K}})),ne=i(((e,t)=>{t.exports=n;function n(e){return[e.slice(0,2),e.slice(2,4),e.slice(4)]}})),re=i(((n,r)=>{var i=(te(),e(N).default)[`cache-version`].content,a=ne(),o=t(`path`),s=S();r.exports=c;function c(e,t){let n=s.parse(t,{single:!0});return o.join(l(e),n.algorithm,...a(n.hexDigest()))}r.exports.contentDir=l;function l(e){return o.join(e,`content-v${i}`)}})),ie=i(((n,r)=>{var i=t(`crypto`),{appendFile:a,mkdir:o,readFile:s,readdir:c,rm:l,writeFile:u}=t(`fs/promises`),{Minipass:d}=v(),f=t(`path`),p=S(),{tmpName:m}=M(),h=re(),g=ne(),_=(te(),e(N).default)[`cache-version`].index,{moveFile:y}=j(),b=5;r.exports.NotFoundError=class extends Error{constructor(e,t){super(`No cache entry for ${t} found in ${e}`),this.code=`ENOENT`,this.cache=e,this.key=t}},r.exports.compact=x;async function x(e,t,n,r={}){let i=P(e,t),a=await O(i),s=[];for(let e=a.length-1;e>=0;--e){let t=a[e];if(t.integrity===null&&!r.validateEntry)break;(!r.validateEntry||r.validateEntry(t)===!0)&&(s.length===0||!s.find(e=>n(e,t)))&&s.unshift(t)}let c=`
|
|
2
|
-
`+s.map(e=>{let t=JSON.stringify(e);return`${I(t)}\t${t}`}).join(`
|
|
3
|
-
`),d=async()=>{let t=m(e,r.tmpPrefix);return await o(f.dirname(t),{recursive:!0}),{target:t,moved:!1}},p=async e=>{if(!e.moved)return l(e.target,{recursive:!0,force:!0})},h=async e=>{await u(e.target,c,{flag:`wx`}),await o(f.dirname(i),{recursive:!0}),await y(e.target,i),e.moved=!0},g=await d();try{await h(g)}finally{await p(g)}return s.reverse().map(t=>R(e,t,!0))}r.exports.insert=C;async function C(e,t,n,r={}){let{metadata:i,size:s,time:c}=r,l=P(e,t),u={key:t,integrity:n&&p.stringify(n),time:c||Date.now(),size:s,metadata:i};try{await o(f.dirname(l),{recursive:!0});let e=JSON.stringify(u);await a(l,`\n${I(e)}\t${e}`)}catch(e){if(e.code===`ENOENT`)return;throw e}return R(e,u)}r.exports.find=w;async function w(e,t){let n=P(e,t);try{return(await O(n)).reduce((n,r)=>r&&r.key===t?R(e,r):n,null)}catch(e){if(e.code===`ENOENT`)return null;throw e}}r.exports.delete=T;function T(e,t,n={}){return n.removeFully?l(P(e,t),{recursive:!0,force:!0}):C(e,t,null,n)}r.exports.lsStream=E;function E(e){let t=A(e),n=new d({objectMode:!0});return Promise.resolve().then(async()=>{let{default:r}=await import(`./p-map-B1EeBuI8.js`);return await r(await z(t),async i=>{let a=f.join(t,i),o=await z(a);await r(o,async t=>{let i=f.join(a,t),o=await z(i);await r(o,async t=>{let r=f.join(i,t);try{let t=(await O(r)).reduce((e,t)=>(e.set(t.key,t),e),new Map);for(let r of t.values()){let t=R(e,r);t&&n.write(t)}}catch(e){if(e.code===`ENOENT`)return;throw e}},{concurrency:b})},{concurrency:b})},{concurrency:b}),n.end(),n}).catch(e=>n.emit(`error`,e)),n}r.exports.ls=D;async function D(e){return(await E(e).collect()).reduce((e,t)=>(e[t.key]=t,e),{})}r.exports.bucketEntries=O;async function O(e,t){return k(await s(e,`utf8`),t)}function k(e){let t=[];return e.split(`
|
|
4
|
-
`).forEach(e=>{if(!e)return;let n=e.split(` `);if(!n[1]||I(n[1])!==n[0])return;let r;try{r=JSON.parse(n[1])}catch{}r&&t.push(r)}),t}r.exports.bucketDir=A;function A(e){return f.join(e,`index-v${_}`)}r.exports.bucketPath=P;function P(e,t){let n=F(t);return f.join.apply(f,[A(e)].concat(g(n)))}r.exports.hashKey=F;function F(e){return L(e,`sha256`)}r.exports.hashEntry=I;function I(e){return L(e,`sha1`)}function L(e,t){return i.createHash(t).update(e).digest(`hex`)}function R(e,t,n){return!t.integrity&&!n?null:{key:t.key,integrity:t.integrity,path:t.integrity?h(e,t.integrity):void 0,size:t.size,time:t.time,metadata:t.metadata}}function z(e){return c(e).catch(e=>{if(e.code===`ENOENT`||e.code===`ENOTDIR`)return[];throw e})}})),ae=i((e=>{a(),d(),h(),c(),l(),u();var n,r,i,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,ee,K,q,te,ne,re,ie,ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oe=ae(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tracing=e.metrics=void 0;var n=t(`node:diagnostics_channel`);e.metrics=(0,n.channel)(`lru-cache:metrics`),e.tracing=(0,n.tracingChannel)(`lru-cache`)}),se=ae(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultPerf=void 0,e.defaultPerf=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date});Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var J=oe(),ce=se(),le=()=>J.metrics.hasSubscribers||J.tracing.hasSubscribers,ue=new Set,Y=typeof process==`object`&&process?process:{},de=(e,t,n,r)=>{typeof Y.emitWarning==`function`?Y.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)},fe=e=>!ue.has(e),pe=e=>!!e&&e===Math.floor(e)&&e>0&&isFinite(e),me=e=>pe(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?X:null:null,X=class extends Array{constructor(e){super(e),this.fill(0)}},he=(n=class e{static create(t){let i=me(t);if(!i)return[];r._=s(n,e,!0);let a=new e(t,i);return r._=s(n,e,!1),a}constructor(t,i){if(o(this,`heap`,void 0),o(this,`length`,void 0),!s(n,e,r)._)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new i(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},r={_:!1},n),ge=(i=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,S=new WeakMap,C=new WeakMap,w=new WeakMap,T=new WeakMap,E=new WeakMap,D=new WeakMap,O=new WeakMap,k=new WeakMap,A=new WeakMap,j=new WeakMap,M=new WeakMap,N=new WeakMap,P=new WeakMap,F=new WeakMap,I=new WeakMap,L=new WeakMap,R=new WeakMap,z=new WeakMap,B=new WeakMap,V=new WeakMap,H=new WeakMap,U=new WeakSet,W=new WeakMap,G=new WeakMap,ee=new WeakMap,K=new WeakMap,q=new WeakMap,te=new WeakMap,ne=new WeakMap,ie=Symbol.iterator,re=Symbol.toStringTag,class e{get perf(){return f(C,this)}static unsafeExposeInternals(e){return{starts:f(I,e),ttls:f(L,e),autopurgeTimers:f(R,e),sizes:f(F,e),keyMap:f(E,e),keyList:f(D,e),valList:f(O,e),next:f(k,e),prev:f(A,e),get head(){return f(j,e)},get tail(){return f(M,e)},free:f(N,e),isBackgroundFetch:t=>s(U,e,$).call(e,t),backgroundFetch:(t,n,r,i)=>s(U,e,we).call(e,t,n,r,i),moveToTail:t=>s(U,e,Ae).call(e,t),indexes:t=>s(U,e,ve).call(e,t),rindexes:t=>s(U,e,ye).call(e,t),isStale:t=>f(K,e).call(e,t)}}get max(){return f(i,this)}get maxSize(){return f(_,this)}get calculatedSize(){return f(T,this)}get size(){return f(w,this)}get fetchMethod(){return f(x,this)}get memoMethod(){return f(S,this)}get dispose(){return f(v,this)}get onInsert(){return f(y,this)}get disposeAfter(){return f(b,this)}constructor(t){g(this,U),p(this,i,void 0),p(this,_,void 0),p(this,v,void 0),p(this,y,void 0),p(this,b,void 0),p(this,x,void 0),p(this,S,void 0),p(this,C,void 0),o(this,`ttl`,void 0),o(this,`ttlResolution`,void 0),o(this,`ttlAutopurge`,void 0),o(this,`updateAgeOnGet`,void 0),o(this,`updateAgeOnHas`,void 0),o(this,`allowStale`,void 0),o(this,`noDisposeOnSet`,void 0),o(this,`noUpdateTTL`,void 0),o(this,`maxEntrySize`,void 0),o(this,`sizeCalculation`,void 0),o(this,`noDeleteOnFetchRejection`,void 0),o(this,`noDeleteOnStaleGet`,void 0),o(this,`allowStaleOnFetchAbort`,void 0),o(this,`allowStaleOnFetchRejection`,void 0),o(this,`ignoreFetchAbort`,void 0),o(this,`backgroundFetchSize`,void 0),p(this,w,void 0),p(this,T,void 0),p(this,E,void 0),p(this,D,void 0),p(this,O,void 0),p(this,k,void 0),p(this,A,void 0),p(this,j,void 0),p(this,M,void 0),p(this,N,void 0),p(this,P,void 0),p(this,F,void 0),p(this,I,void 0),p(this,L,void 0),p(this,R,void 0),p(this,z,void 0),p(this,B,void 0),p(this,V,void 0),p(this,H,void 0),p(this,W,()=>{}),p(this,G,()=>{}),p(this,ee,()=>{}),p(this,K,()=>!1),p(this,q,e=>{}),p(this,te,(e,t,n)=>{}),p(this,ne,(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0}),o(this,re,`LRUCache`);let{max:n=0,ttl:r,ttlResolution:a=1,ttlAutopurge:c,updateAgeOnGet:l,updateAgeOnHas:u,allowStale:d,dispose:h,onInsert:ie,disposeAfter:ae,noDisposeOnSet:oe,noUpdateTTL:se,maxSize:J=0,maxEntrySize:le=0,sizeCalculation:Y,fetchMethod:X,memoMethod:ge,noDeleteOnFetchRejection:ve,noDeleteOnStaleGet:ye,allowStaleOnFetchRejection:be,allowStaleOnFetchAbort:Q,ignoreFetchAbort:xe,backgroundFetchSize:Se=1,perf:Ce}=t;if(this.backgroundFetchSize=Se,Ce!==void 0&&typeof Ce?.now!=`function`)throw TypeError(`perf option must have a now() method if specified`);if(m(C,this,Ce??ce.defaultPerf),n!==0&&!pe(n))throw TypeError(`max option must be a nonnegative integer`);let we=n?me(n):Array;if(!we)throw Error(`invalid max value: `+n);if(m(i,this,n),m(_,this,J),this.maxEntrySize=le||f(_,this),this.sizeCalculation=Y,this.sizeCalculation){if(!f(_,this)&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(ge!==void 0&&typeof ge!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(m(S,this,ge),X!==void 0&&typeof X!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(m(x,this,X),m(B,this,!!X),m(E,this,new Map),m(D,this,Array.from({length:n}).fill(void 0)),m(O,this,Array.from({length:n}).fill(void 0)),m(k,this,new we(n)),m(A,this,new we(n)),m(j,this,0),m(M,this,0),m(N,this,he.create(n)),m(w,this,0),m(T,this,0),typeof h==`function`&&m(v,this,h),typeof ie==`function`&&m(y,this,ie),typeof ae==`function`?(m(b,this,ae),m(P,this,[])):(m(b,this,void 0),m(P,this,void 0)),m(z,this,!!f(v,this)),m(H,this,!!f(y,this)),m(V,this,!!f(b,this)),this.noDisposeOnSet=!!oe,this.noUpdateTTL=!!se,this.noDeleteOnFetchRejection=!!ve,this.allowStaleOnFetchRejection=!!be,this.allowStaleOnFetchAbort=!!Q,this.ignoreFetchAbort=!!xe,this.maxEntrySize!==0){if(f(_,this)!==0&&!pe(f(_,this)))throw TypeError(`maxSize must be a positive integer if specified`);if(!pe(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);s(U,this,_e).call(this)}if(this.allowStale=!!d,this.noDeleteOnStaleGet=!!ye,this.updateAgeOnGet=!!l,this.updateAgeOnHas=!!u,this.ttlResolution=pe(a)||a===0?a:1,this.ttlAutopurge=!!c,this.ttl=r||0,this.ttl){if(!pe(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);s(U,this,Z).call(this)}if(f(i,this)===0&&this.ttl===0&&f(_,this)===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!f(i,this)&&!f(_,this)){let t=`LRU_CACHE_UNBOUNDED`;fe(t)&&(ue.add(t),de(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}}getRemainingTTL(e){return f(E,this).has(e)?1/0:0}*entries(){for(let e of s(U,this,ve).call(this))f(O,this)[e]!==void 0&&f(D,this)[e]!==void 0&&!s(U,this,$).call(this,f(O,this)[e])&&(yield[f(D,this)[e],f(O,this)[e]])}*rentries(){for(let e of s(U,this,ye).call(this))f(O,this)[e]!==void 0&&f(D,this)[e]!==void 0&&!s(U,this,$).call(this,f(O,this)[e])&&(yield[f(D,this)[e],f(O,this)[e]])}*keys(){for(let e of s(U,this,ve).call(this)){let t=f(D,this)[e];t!==void 0&&!s(U,this,$).call(this,f(O,this)[e])&&(yield t)}}*rkeys(){for(let e of s(U,this,ye).call(this)){let t=f(D,this)[e];t!==void 0&&!s(U,this,$).call(this,f(O,this)[e])&&(yield t)}}*values(){for(let e of s(U,this,ve).call(this))f(O,this)[e]!==void 0&&!s(U,this,$).call(this,f(O,this)[e])&&(yield f(O,this)[e])}*rvalues(){for(let e of s(U,this,ye).call(this))f(O,this)[e]!==void 0&&!s(U,this,$).call(this,f(O,this)[e])&&(yield f(O,this)[e])}[ie](){return this.entries()}find(e,t={}){for(let n of s(U,this,ve).call(this)){let r=f(O,this)[n],i=s(U,this,$).call(this,r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,f(D,this)[n],this))return s(U,this,Oe).call(this,f(D,this)[n],t)}}forEach(e,t=this){for(let n of s(U,this,ve).call(this)){let r=f(O,this)[n],i=s(U,this,$).call(this,r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,f(D,this)[n],this)}}rforEach(e,t=this){for(let n of s(U,this,ye).call(this)){let r=f(O,this)[n],i=s(U,this,$).call(this,r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,f(D,this)[n],this)}}purgeStale(){let e=!1;for(let t of s(U,this,ye).call(this,{allowStale:!0}))f(K,this).call(this,t)&&(s(U,this,je).call(this,f(D,this)[t],`expire`),e=!0);return e}info(e){let t=f(E,this).get(e);if(t===void 0)return;let n=f(O,this)[t],r=s(U,this,$).call(this,n)?n.__staleWhileFetching:n;if(r===void 0)return;let i={value:r};if(f(L,this)&&f(I,this)){let e=f(L,this)[t],n=f(I,this)[t];e&&n&&(i.ttl=e-(f(C,this).now()-n),i.start=Date.now())}return f(F,this)&&(i.size=f(F,this)[t]),i}dump(){let e=[];for(let t of s(U,this,ve).call(this,{allowStale:!0})){let n=f(D,this)[t],r=f(O,this)[t],i=s(U,this,$).call(this,r)?r.__staleWhileFetching:r;if(i===void 0||n===void 0)continue;let a={value:i};if(f(L,this)&&f(I,this)){a.ttl=f(L,this)[t];let e=f(C,this).now()-f(I,this)[t];a.start=Math.floor(Date.now()-e)}f(F,this)&&(a.size=f(F,this)[t]),e.unshift([n,a])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let e=Date.now()-n.start;n.start=f(C,this).now()-e}s(U,this,Q).call(this,t,n.value,n)}}set(e,t,n={}){let{status:r=J.metrics.hasSubscribers?{}:void 0}=n;n.status=r,r&&(r.op=`set`,r.key=e,t!==void 0&&(r.value=t),r.cache=this);let i=s(U,this,Q).call(this,e,t,n);return r&&J.metrics.hasSubscribers&&J.metrics.publish(r),i}pop(){try{for(;f(w,this);){let e=f(O,this)[f(j,this)];if(s(U,this,xe).call(this,!0),s(U,this,$).call(this,e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(f(V,this)&&f(P,this)){let e=f(P,this),t;for(;t=e?.shift();)f(b,this)?.call(this,...t)}}}has(e,t={}){let{status:n=J.metrics.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op=`has`,n.key=e,n.cache=this);let r=s(U,this,Se).call(this,e,t);return J.metrics.hasSubscribers&&J.metrics.publish(n),r}peek(e,t={}){let{status:n=le()?{}:void 0}=t;n&&(n.op=`peek`,n.key=e,n.cache=this),t.status=n;let r=s(U,this,Ce).call(this,e,t);return J.metrics.hasSubscribers&&J.metrics.publish(n),r}fetch(e,t={}){let n=J.tracing.hasSubscribers,{status:r=le()?{}:void 0}=t;t.status=r,r&&t.context&&(r.context=t.context);let i=s(U,this,Te).call(this,e,t);return r&&n&&(r.trace=!0,J.tracing.tracePromise(()=>i,r).catch(()=>{})),i}forceFetch(e,t={}){let n=J.tracing.hasSubscribers,{status:r=le()?{}:void 0}=t;t.status=r,r&&t.context&&(r.context=t.context);let i=s(U,this,Ee).call(this,e,t);return r&&n&&(r.trace=!0,J.tracing.tracePromise(()=>i,r).catch(()=>{})),i}memo(e,t={}){let{status:n=J.metrics.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op=`memo`,n.key=e,t.context&&(n.context=t.context),n.cache=this);let r=s(U,this,De).call(this,e,t);return n&&(n.value=r),J.metrics.hasSubscribers&&J.metrics.publish(n),r}get(e,t={}){let{status:n=J.metrics.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op=`get`,n.key=e,n.cache=this);let r=s(U,this,Oe).call(this,e,t);return n&&(r!==void 0&&(n.value=r),J.metrics.hasSubscribers&&J.metrics.publish(n)),r}delete(e){return s(U,this,je).call(this,e,`delete`)}clear(){return s(U,this,Me).call(this,`delete`)}});function Z(){let e=new X(f(i,this)),t=new X(f(i,this));m(L,this,e),m(I,this,t);let n=this.ttlAutopurge?Array.from({length:f(i,this)}):void 0;m(R,this,n),m(ee,this,(n,i,a=f(C,this).now())=>{t[n]=i===0?0:a,e[n]=i,r(n,i)}),m(W,this,n=>{t[n]=e[n]===0?0:f(C,this).now(),r(n,e[n])});let r=this.ttlAutopurge?(e,t)=>{if(n?.[e]&&(clearTimeout(n[e]),n[e]=void 0),t&&t!==0&&n){let i=setTimeout(()=>{f(K,this).call(this,e)?(s(U,this,je).call(this,f(D,this)[e],`expire`),n[e]=void 0):r(e,c(e))},t+1);i.unref&&i.unref(),n[e]=i}}:()=>{};m(G,this,(n,r)=>{if(e[r]){let i=e[r],s=t[r];if(!i||!s)return;n.ttl=i,n.start=s,n.now=a||o(),n.remainingTTL=i-(n.now-s)}});let a=0,o=()=>{let e=f(C,this).now();if(this.ttlResolution>0){a=e;let t=setTimeout(()=>a=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=e=>{let t=f(E,this).get(e);return t===void 0?0:c(t)};let c=n=>{let r=e[n],i=t[n];return!r||!i?1/0:r-((a||o())-i)};m(K,this,n=>{let r=t[n],i=e[n];return!!i&&!!r&&(a||o())-r>i})}function _e(){let e=new X(f(i,this));m(T,this,0),m(F,this,e),m(q,this,t=>{m(T,this,f(T,this)-e[t]),e[t]=0}),m(ne,this,(e,t,n,r)=>{if(!pe(n)){if(s(U,this,$).call(this,t))return this.backgroundFetchSize;if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!pe(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`)}return n}),m(te,this,(t,n,r)=>{if(e[t]=n,f(_,this)){let n=f(_,this)-e[t];for(;f(T,this)>n;)s(U,this,xe).call(this,!0)}m(T,this,f(T,this)+e[t]),r&&(r.entrySize=n,r.totalCalculatedSize=f(T,this))})}function*ve({allowStale:e=this.allowStale}={}){if(f(w,this))for(let t=f(M,this);s(U,this,be).call(this,t)&&((e||!f(K,this).call(this,t))&&(yield t),t!==f(j,this));)t=f(A,this)[t]}function*ye({allowStale:e=this.allowStale}={}){if(f(w,this))for(let t=f(j,this);s(U,this,be).call(this,t)&&((e||!f(K,this).call(this,t))&&(yield t),t!==f(M,this));)t=f(k,this)[t]}function be(e){return e!==void 0&&f(E,this).get(f(D,this)[e])===e}function Q(e,t,n,r){var a;let{ttl:o=this.ttl,start:c,noDisposeOnSet:l=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:d}=n,p=s(U,this,$).call(this,t);if(t===void 0)return d&&(d.set=`deleted`),this.delete(e),this;let{noUpdateTTL:h=this.noUpdateTTL}=n;d&&!p&&(d.value=t);let g=f(ne,this).call(this,e,t,n.size||0,u,d);if(this.maxEntrySize&&g>this.maxEntrySize)return s(U,this,je).call(this,e,`set`),d&&(d.set=`miss`,d.maxEntrySizeExceeded=!0),this;let _=f(w,this)===0?void 0:f(E,this).get(e);if(_===void 0)_=f(w,this)===0?f(M,this):f(N,this).length===0?f(w,this)===f(i,this)?s(U,this,xe).call(this,!1):f(w,this):f(N,this).pop(),f(D,this)[_]=e,f(O,this)[_]=t,f(E,this).set(e,_),f(k,this)[f(M,this)]=_,f(A,this)[_]=f(M,this),m(M,this,_),m(w,this,(a=f(w,this),a++,a)),f(te,this).call(this,_,g,d),d&&(d.set=`add`),h=!1,f(H,this)&&!p&&f(y,this)?.call(this,t,e,`add`);else{s(U,this,Ae).call(this,_);let n=f(O,this)[_];if(t!==n){if(!l)if(s(U,this,$).call(this,n)){n!==r&&n.__abortController.abort(Error(`replaced`));let{__staleWhileFetching:i}=n;i!==void 0&&i!==t&&(f(z,this)&&f(v,this)?.call(this,i,e,`set`),f(V,this)&&f(P,this)?.push([i,e,`set`]))}else f(z,this)&&f(v,this)?.call(this,n,e,`set`),f(V,this)&&f(P,this)?.push([n,e,`set`]);if(f(q,this).call(this,_),f(te,this).call(this,_,g,d),f(O,this)[_]=t,!p){let r=n&&s(U,this,$).call(this,n)?n.__staleWhileFetching:n,i=r===void 0?`add`:t===r?`update`:`replace`;d&&(d.set=i,r!==void 0&&(d.oldValue=r)),f(H,this)&&this.onInsert?.(t,e,i)}}else p||(d&&(d.set=`update`),f(H,this)&&this.onInsert?.(t,e,`update`))}if(o!==0&&!f(L,this)&&s(U,this,Z).call(this),f(L,this)&&(h||f(ee,this).call(this,_,o,c),d&&f(G,this).call(this,d,_)),!l&&f(V,this)&&f(P,this)){let e=f(P,this),t;for(;t=e?.shift();)f(b,this)?.call(this,...t)}return this}function xe(e){var t;let n=f(j,this),r=f(D,this)[n],i=f(O,this)[n],a=s(U,this,$).call(this,i);a&&i.__abortController.abort(Error(`evicted`));let o=a?i.__staleWhileFetching:i;return(f(z,this)||f(V,this))&&o!==void 0&&(f(z,this)&&f(v,this)?.call(this,o,r,`evict`),f(V,this)&&f(P,this)?.push([o,r,`evict`])),f(q,this).call(this,n),f(R,this)?.[n]&&(clearTimeout(f(R,this)[n]),f(R,this)[n]=void 0),e&&(f(D,this)[n]=void 0,f(O,this)[n]=void 0,f(N,this).push(n)),f(w,this)===1?(m(j,this,m(M,this,0)),f(N,this).length=0):m(j,this,f(k,this)[n]),f(E,this).delete(r),m(w,this,(t=f(w,this),t--,t)),n}function Se(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=f(E,this).get(e);if(i!==void 0){let e=f(O,this)[i];if(s(U,this,$).call(this,e)&&e.__staleWhileFetching===void 0)return!1;if(f(K,this).call(this,i))r&&(r.has=`stale`,f(G,this).call(this,r,i));else return n&&f(W,this).call(this,i),r&&(r.has=`hit`,f(G,this).call(this,r,i)),!0}else r&&(r.has=`miss`);return!1}function Ce(e,t){let{status:n,allowStale:r=this.allowStale}=t,i=f(E,this).get(e);if(i===void 0||!r&&f(K,this).call(this,i)){n&&(n.peek=i===void 0?`miss`:`stale`);return}let a=f(O,this)[i],o=s(U,this,$).call(this,a)?a.__staleWhileFetching:a;return n&&(o===void 0?n.peek=`miss`:(n.peek=`hit`,n.value=o)),o}function we(e,t,n,r){let i=t===void 0?void 0:f(O,this)[t];if(s(U,this,$).call(this,i))return i;let a=new AbortController,{signal:o}=n;o?.addEventListener(`abort`,()=>a.abort(o.reason),{signal:a.signal});let c={signal:a.signal,options:n,context:r},l=(r,i=!1)=>{let{aborted:o}=a.signal,l=n.ignoreFetchAbort&&r!==void 0,u=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&r!==void 0);if(n.status&&(o&&!i?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,l&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),o&&!l&&!i)return d(a.signal.reason,u);let p=m,h=f(O,this)[t];return(h===m||h===void 0&&l&&i)&&(r===void 0?p.__staleWhileFetching===void 0?s(U,this,je).call(this,e,`fetch`):f(O,this)[t]=p.__staleWhileFetching:(n.status&&(n.status.fetchUpdated=!0),s(U,this,Q).call(this,e,r,c.options,p))),r},u=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),d(e,!1)),d=(r,i)=>{let{aborted:o}=a.signal,c=o&&n.allowStaleOnFetchAbort,l=c||n.allowStaleOnFetchRejection,u=l||n.noDeleteOnFetchRejection,d=m;if(f(O,this)[t]===m&&(!u||!i&&d.__staleWhileFetching===void 0?s(U,this,je).call(this,e,`fetch`):c||(f(O,this)[t]=d.__staleWhileFetching)),l)return n.status&&d.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),d.__staleWhileFetching;if(d.__returned===d)throw r},p=(t,r)=>{let o=f(x,this)?.call(this,e,i,c);a.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))}),o&&o instanceof Promise?o.then(e=>t(e===void 0?void 0:e),r):o!==void 0&&t(o)};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(p).then(l,u),h=Object.assign(m,{__abortController:a,__staleWhileFetching:i,__returned:void 0});return t===void 0?(s(U,this,Q).call(this,e,h,{...c.options,status:void 0}),t=f(E,this).get(e)):f(O,this)[t]=h,h}function $(e){if(!f(B,this))return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof AbortController}async function Te(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:h=this.allowStaleOnFetchAbort,context:g,forceRefresh:_=!1,status:v,signal:y}=t;if(v&&(v.op=`fetch`,v.key=e,_&&(v.forceRefresh=!0),v.cache=this),!f(B,this))return v&&(v.fetch=`get`),s(U,this,Oe).call(this,e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:v});let b={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:c,sizeCalculation:l,noUpdateTTL:u,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:h,ignoreFetchAbort:m,status:v,signal:y},x=f(E,this).get(e);if(x===void 0){v&&(v.fetch=`miss`);let t=s(U,this,we).call(this,e,x,b,g);return t.__returned=t}else{let t=f(O,this)[x];if(s(U,this,$).call(this,t)){let e=n&&t.__staleWhileFetching!==void 0;return v&&(v.fetch=`inflight`,e&&(v.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=f(K,this).call(this,x);if(!_&&!i)return v&&(v.fetch=`hit`),s(U,this,Ae).call(this,x),r&&f(W,this).call(this,x),v&&f(G,this).call(this,v,x),t;let a=s(U,this,we).call(this,e,x,b,g),o=a.__staleWhileFetching!==void 0&&n;return v&&(v.fetch=i?`stale`:`refresh`,o&&i&&(v.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}async function Ee(e,t={}){let n=await s(U,this,Te).call(this,e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}function De(e,t={}){let n=f(S,this);if(!n)throw Error(`no memoMethod provided to constructor`);let{context:r,status:i,forceRefresh:a,...o}=t;i&&a&&(i.forceRefresh=!0);let c=s(U,this,Oe).call(this,e,o),l=a||c===void 0;if(i&&(i.memo=l?`miss`:`hit`,l||(i.value=c)),!l)return c;let u=n(e,c,{options:o,context:r});return i&&(i.value=u),s(U,this,Q).call(this,e,u,o),u}function Oe(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=f(E,this).get(e);if(o===void 0){a&&(a.get=`miss`);return}let c=f(O,this)[o],l=s(U,this,$).call(this,c);return a&&f(G,this).call(this,a,o),f(K,this).call(this,o)?l?(a&&(a.get=`stale-fetching`),n&&c.__staleWhileFetching!==void 0?(a&&(a.returnedStale=!0),c.__staleWhileFetching):void 0):(i||s(U,this,je).call(this,e,`expire`),a&&(a.get=`stale`),n?(a&&(a.returnedStale=!0),c):void 0):(a&&(a.get=l?`fetching`:`hit`),s(U,this,Ae).call(this,o),r&&f(W,this).call(this,o),l?c.__staleWhileFetching:c)}function ke(e,t){f(A,this)[t]=e,f(k,this)[e]=t}function Ae(e){e!==f(M,this)&&(e===f(j,this)?m(j,this,f(k,this)[e]):s(U,this,ke).call(this,f(A,this)[e],f(k,this)[e]),s(U,this,ke).call(this,f(M,this),e),m(M,this,e))}function je(e,t){J.metrics.hasSubscribers&&J.metrics.publish({op:`delete`,delete:t,key:e,cache:this});let n=!1;if(f(w,this)!==0){let i=f(E,this).get(e);if(i!==void 0)if(f(R,this)?.[i]&&(clearTimeout(f(R,this)[i]),f(R,this)[i]=void 0),n=!0,f(w,this)===1)s(U,this,Me).call(this,t);else{var r;f(q,this).call(this,i);let n=f(O,this)[i];if(s(U,this,$).call(this,n)?n.__abortController.abort(Error(`deleted`)):(f(z,this)||f(V,this))&&(f(z,this)&&f(v,this)?.call(this,n,e,t),f(V,this)&&f(P,this)?.push([n,e,t])),f(E,this).delete(e),f(D,this)[i]=void 0,f(O,this)[i]=void 0,i===f(M,this))m(M,this,f(A,this)[i]);else if(i===f(j,this))m(j,this,f(k,this)[i]);else{let e=f(A,this)[i];f(k,this)[e]=f(k,this)[i];let t=f(k,this)[i];f(A,this)[t]=f(A,this)[i]}m(w,this,(r=f(w,this),r--,r)),f(N,this).push(i)}}if(f(V,this)&&f(P,this)?.length){let e=f(P,this),t;for(;t=e?.shift();)f(b,this)?.call(this,...t)}return n}function Me(e){for(let t of s(U,this,ye).call(this,{allowStale:!0})){let n=f(O,this)[t];if(s(U,this,$).call(this,n))n.__abortController.abort(Error(`deleted`));else{let r=f(D,this)[t];f(z,this)&&f(v,this)?.call(this,n,r,e),f(V,this)&&f(P,this)?.push([n,r,e])}}if(f(E,this).clear(),f(O,this).fill(void 0),f(D,this).fill(void 0),f(L,this)&&f(I,this)){f(L,this).fill(0),f(I,this).fill(0);for(let e of f(R,this)??[])e!==void 0&&clearTimeout(e);f(R,this)?.fill(void 0)}if(f(F,this)&&f(F,this).fill(0),m(j,this,0),m(M,this,0),f(N,this).length=0,m(T,this,0),m(w,this,0),f(V,this)&&f(P,this)){let e=f(P,this),t;for(;t=e?.shift();)f(b,this)?.call(this,...t)}}e.LRUCache=ge})),oe=i(((e,t)=>{var{LRUCache:n}=ae(),r=new n({max:500,maxSize:50*1024*1024,ttl:180*1e3,sizeCalculation:(e,t)=>t.startsWith(`key:`)?e.data.length:e.length});t.exports.clearMemoized=i;function i(){let e={};return r.forEach((t,n)=>{e[n]=t}),r.clear(),e}t.exports.put=a;function a(e,t,n,r){u(r).set(`key:${e}:${t.key}`,{entry:t,data:n}),o(e,t.integrity,n,r)}t.exports.put.byDigest=o;function o(e,t,n,r){u(r).set(`digest:${e}:${t}`,n)}t.exports.get=s;function s(e,t,n){return u(n).get(`key:${e}:${t}`)}t.exports.get.byDigest=c;function c(e,t,n){return u(n).get(`digest:${e}:${t}`)}var l=class{constructor(e){this.obj=e}get(e){return this.obj[e]}set(e,t){this.obj[e]=t}};function u(e){return!e||!e.memoize?r:e.memoize.get&&e.memoize.set?e.memoize:typeof e.memoize==`object`?new l(e.memoize):r}})),se=i((e=>{var{Minipass:n}=v(),r=t(`events`).EventEmitter,i=t(`fs`),a=i.writev,o=Symbol(`_autoClose`),s=Symbol(`_close`),c=Symbol(`_ended`),l=Symbol(`_fd`),u=Symbol(`_finished`),d=Symbol(`_flags`),f=Symbol(`_flush`),p=Symbol(`_handleChunk`),m=Symbol(`_makeBuf`),h=Symbol(`_mode`),g=Symbol(`_needDrain`),_=Symbol(`_onerror`),y=Symbol(`_onopen`),b=Symbol(`_onread`),x=Symbol(`_onwrite`),S=Symbol(`_open`),C=Symbol(`_path`),w=Symbol(`_pos`),T=Symbol(`_queue`),E=Symbol(`_read`),D=Symbol(`_readSize`),O=Symbol(`_reading`),k=Symbol(`_remain`),A=Symbol(`_size`),j=Symbol(`_write`),M=Symbol(`_writing`),N=Symbol(`_defaultFlag`),P=Symbol(`_errored`),F=class extends n{constructor(e,t){if(t=t||{},super(t),this.readable=!0,this.writable=!1,typeof e!=`string`)throw TypeError(`path must be a string`);this[P]=!1,this[l]=typeof t.fd==`number`?t.fd:null,this[C]=e,this[D]=t.readSize||16*1024*1024,this[O]=!1,this[A]=typeof t.size==`number`?t.size:1/0,this[k]=this[A],this[o]=typeof t.autoClose!=`boolean`||t.autoClose,typeof this[l]==`number`?this[E]():this[S]()}get fd(){return this[l]}get path(){return this[C]}write(){throw TypeError(`this is a readable stream`)}end(){throw TypeError(`this is a readable stream`)}[S](){i.open(this[C],`r`,(e,t)=>this[y](e,t))}[y](e,t){e?this[_](e):(this[l]=t,this.emit(`open`,t),this[E]())}[m](){return Buffer.allocUnsafe(Math.min(this[D],this[k]))}[E](){if(!this[O]){this[O]=!0;let e=this[m]();if(e.length===0)return process.nextTick(()=>this[b](null,0,e));i.read(this[l],e,0,e.length,null,(e,t,n)=>this[b](e,t,n))}}[b](e,t,n){this[O]=!1,e?this[_](e):this[p](t,n)&&this[E]()}[s](){if(this[o]&&typeof this[l]==`number`){let e=this[l];this[l]=null,i.close(e,e=>e?this.emit(`error`,e):this.emit(`close`))}}[_](e){this[O]=!0,this[s](),this.emit(`error`,e)}[p](e,t){let n=!1;return this[k]-=e,e>0&&(n=super.write(e<t.length?t.slice(0,e):t)),(e===0||this[k]<=0)&&(n=!1,this[s](),super.end()),n}emit(e,t){switch(e){case`prefinish`:case`finish`:break;case`drain`:typeof this[l]==`number`&&this[E]();break;case`error`:return this[P]?void 0:(this[P]=!0,super.emit(e,t));default:return super.emit(e,t)}}},I=class extends F{[S](){let e=!0;try{this[y](null,i.openSync(this[C],`r`)),e=!1}finally{e&&this[s]()}}[E](){let e=!0;try{if(!this[O]){this[O]=!0;do{let e=this[m](),t=e.length===0?0:i.readSync(this[l],e,0,e.length,null);if(!this[p](t,e))break}while(!0);this[O]=!1}e=!1}finally{e&&this[s]()}}[s](){if(this[o]&&typeof this[l]==`number`){let e=this[l];this[l]=null,i.closeSync(e),this.emit(`close`)}}},L=class extends r{constructor(e,t){t=t||{},super(t),this.readable=!1,this.writable=!0,this[P]=!1,this[M]=!1,this[c]=!1,this[g]=!1,this[T]=[],this[C]=e,this[l]=typeof t.fd==`number`?t.fd:null,this[h]=t.mode===void 0?438:t.mode,this[w]=typeof t.start==`number`?t.start:null,this[o]=typeof t.autoClose!=`boolean`||t.autoClose;let n=this[w]===null?`w`:`r+`;this[N]=t.flags===void 0,this[d]=this[N]?n:t.flags,this[l]===null&&this[S]()}emit(e,t){if(e===`error`){if(this[P])return;this[P]=!0}return super.emit(e,t)}get fd(){return this[l]}get path(){return this[C]}[_](e){this[s](),this[M]=!0,this.emit(`error`,e)}[S](){i.open(this[C],this[d],this[h],(e,t)=>this[y](e,t))}[y](e,t){this[N]&&this[d]===`r+`&&e&&e.code===`ENOENT`?(this[d]=`w`,this[S]()):e?this[_](e):(this[l]=t,this.emit(`open`,t),this[M]||this[f]())}end(e,t){return e&&this.write(e,t),this[c]=!0,!this[M]&&!this[T].length&&typeof this[l]==`number`&&this[x](null,0),this}write(e,t){return typeof e==`string`&&(e=Buffer.from(e,t)),this[c]?(this.emit(`error`,Error(`write() after end()`)),!1):this[l]===null||this[M]||this[T].length?(this[T].push(e),this[g]=!0,!1):(this[M]=!0,this[j](e),!0)}[j](e){i.write(this[l],e,0,e.length,this[w],(e,t)=>this[x](e,t))}[x](e,t){e?this[_](e):(this[w]!==null&&(this[w]+=t),this[T].length?this[f]():(this[M]=!1,this[c]&&!this[u]?(this[u]=!0,this[s](),this.emit(`finish`)):this[g]&&(this[g]=!1,this.emit(`drain`))))}[f](){if(this[T].length===0)this[c]&&this[x](null,0);else if(this[T].length===1)this[j](this[T].pop());else{let e=this[T];this[T]=[],a(this[l],e,this[w],(e,t)=>this[x](e,t))}}[s](){if(this[o]&&typeof this[l]==`number`){let e=this[l];this[l]=null,i.close(e,e=>e?this.emit(`error`,e):this.emit(`close`))}}},R=class extends L{[S](){let e;if(this[N]&&this[d]===`r+`)try{e=i.openSync(this[C],this[d],this[h])}catch(e){if(e.code===`ENOENT`)return this[d]=`w`,this[S]();throw e}else e=i.openSync(this[C],this[d],this[h]);this[y](null,e)}[s](){if(this[o]&&typeof this[l]==`number`){let e=this[l];this[l]=null,i.closeSync(e),this.emit(`close`)}}[j](e){let t=!0;try{this[x](null,i.writeSync(this[l],e,0,e.length,this[w])),t=!1}finally{if(t)try{this[s]()}catch{}}}};e.ReadStream=F,e.ReadStreamSync=I,e.WriteStream=L,e.WriteStreamSync=R})),J=i(((e,n)=>{var r=t(`fs/promises`),i=se(),a=S(),o=re(),s=x();n.exports=l;var c=64*1024*1024;async function l(e,t,n={}){let{size:i}=n,{stat:o,cpath:l,sri:d}=await m(e,t,async(e,t)=>({stat:i?{size:i}:await r.stat(e),cpath:e,sri:t}));if(o.size>c)return u(l,o.size,d,new s).concat();let f=await r.readFile(l,{encoding:null});if(o.size!==f.length)throw h(o.size,f.length);if(!a.checkData(f,d))throw g(d,l);return f}var u=(e,t,n,r)=>(r.push(new i.ReadStream(e,{size:t,readSize:c}),a.integrityStream({integrity:n,size:t})),r);n.exports.stream=d,n.exports.readStream=d;function d(e,t,n={}){let{size:i}=n,a=new s;return Promise.resolve().then(async()=>{let{stat:n,cpath:o,sri:s}=await m(e,t,async(e,t)=>({stat:i?{size:i}:await r.stat(e),cpath:e,sri:t}));return u(o,n.size,s,a)}).catch(e=>a.emit(`error`,e)),a}n.exports.copy=f;function f(e,t,n){return m(e,t,e=>r.copyFile(e,n))}n.exports.hasContent=p;async function p(e,t){if(!t)return!1;try{return await m(e,t,async(e,t)=>{let n=await r.stat(e);return{size:n.size,sri:t,stat:n}})}catch(e){if(e.code===`ENOENT`)return!1;if(e.code===`EPERM`){if(process.platform!==`win32`)throw e;return!1}}}async function m(e,t,n){let r=a.parse(t),i=r[r.pickAlgorithm()];if(i.length<=1)return n(o(e,i[0]),i[0]);{let t=await Promise.all(i.map(async t=>{try{return await m(e,t,n)}catch(e){return e.code===`ENOENT`?Object.assign(Error(`No matching content found for `+r.toString()),{code:`ENOENT`}):e}})),a=t.find(e=>!(e instanceof Error));if(a)return a;throw t.find(e=>e.code===`ENOENT`)||t.find(e=>e instanceof Error)}}function h(e,t){let n=Error(`Bad data size: expected inserted data to be ${e} bytes, but got ${t} instead`);return n.expected=e,n.found=t,n.code=`EBADSIZE`,n}function g(e,t){let n=Error(`Integrity verification failed for ${e} (${t})`);return n.code=`EINTEGRITY`,n.sri=e,n.path=t,n}})),ce=i(((e,t)=>{var n=y(),{Minipass:r}=v(),i=x(),a=ie(),o=oe(),s=J();async function c(e,t,n={}){let{integrity:r,memoize:i,size:c}=n,l=o.get(e,t,n);if(l&&i!==!1)return{metadata:l.entry.metadata,data:l.data,integrity:l.entry.integrity,size:l.entry.size};let u=await a.find(e,t,n);if(!u)throw new a.NotFoundError(e,t);let d=await s(e,u.integrity,{integrity:r,size:c});return i&&o.put(e,u,d,n),{data:d,metadata:u.metadata,size:u.size,integrity:u.integrity}}t.exports=c;async function l(e,t,n={}){let{integrity:r,memoize:i,size:a}=n,c=o.get.byDigest(e,t,n);if(c&&i!==!1)return c;let l=await s(e,t,{integrity:r,size:a});return i&&o.put.byDigest(e,t,l,n),l}t.exports.byDigest=l;var u=e=>{let t=new r;return t.on(`newListener`,function(t,n){t===`metadata`&&n(e.entry.metadata),t===`integrity`&&n(e.entry.integrity),t===`size`&&n(e.entry.size)}),t.end(e.data),t};function d(e,t,r={}){let{memoize:c,size:l}=r,d=o.get(e,t,r);if(d&&c!==!1)return u(d);let f=new i;return Promise.resolve().then(async()=>{let i=await a.find(e,t);if(!i)throw new a.NotFoundError(e,t);f.emit(`metadata`,i.metadata),f.emit(`integrity`,i.integrity),f.emit(`size`,i.size),f.on(`newListener`,function(e,t){e===`metadata`&&t(i.metadata),e===`integrity`&&t(i.integrity),e===`size`&&t(i.size)});let u=s.readStream(e,i.integrity,{...r,size:typeof l==`number`?l:i.size});if(c){let t=new n.PassThrough;t.on(`collect`,t=>o.put(e,i,t,r)),f.unshift(t)}return f.unshift(u),f}).catch(e=>f.emit(`error`,e)),f}t.exports.stream=d;function f(e,t,a={}){let{memoize:c}=a,l=o.get.byDigest(e,t,a);if(l&&c!==!1){let e=new r;return e.end(l),e}else{let r=s.readStream(e,t,a);if(!c)return r;let l=new n.PassThrough;return l.on(`collect`,n=>o.put.byDigest(e,t,n,a)),new i(r,l)}}t.exports.stream.byDigest=f;function p(e,t,n={}){let{memoize:r}=n,i=o.get(e,t,n);return i&&r!==!1?Promise.resolve(i.entry):a.find(e,t)}t.exports.info=p;async function m(e,t,n,r={}){let i=await a.find(e,t,r);if(!i)throw new a.NotFoundError(e,t);return await s.copy(e,i.integrity,n,r),{metadata:i.metadata,size:i.size,integrity:i.integrity}}t.exports.copy=m;async function h(e,t,n,r={}){return await s.copy(e,t,n,r),t}t.exports.copy.byDigest=h,t.exports.hasContent=s.hasContent})),le=i(((e,t)=>{var n=b(),r=Symbol(`_flush`),i=Symbol(`_flushed`),a=Symbol(`_flushing`);t.exports=class extends n{constructor(e={}){if(typeof e==`function`&&(e={flush:e}),super(e),typeof e.flush!=`function`&&typeof this.flush!=`function`)throw TypeError(`must provide flush function in options`);this[r]=e.flush||this.flush}emit(e,...t){if(e!==`end`&&e!==`finish`||this[i])return super.emit(e,...t);if(this[a])return;this[a]=!0;let n=e=>{this[i]=!0,e?super.emit(`error`,e):super.emit(`end`)},o=this[r](n);o&&o.then&&o.then(()=>n(),e=>n(e))}}})),ue=i(((e,n)=>{var r=t(`events`),i=re(),a=t(`fs/promises`),{moveFile:o}=j(),{Minipass:s}=v(),c=x(),l=le(),u=t(`path`),d=S(),{tmpName:f}=M(),p=se();n.exports=h;var m=new Map;async function h(e,t,n={}){let{algorithms:r,size:i,integrity:o}=n;if(typeof i==`number`&&t.length!==i)throw T(i,t.length);let s=d.fromData(t,r?{algorithms:r}:{});if(o&&!d.checkData(t,o,n))throw E(o,s);for(let r in s){let i=await C(e,n),o=s[r].toString();try{await a.writeFile(i.target,t,{flag:`wx`}),await w(i,e,o,n)}finally{i.moved||await a.rm(i.target,{recursive:!0,force:!0})}}return{integrity:s,size:t.length}}n.exports.stream=_;var g=class extends l{constructor(e,t){super(),this.opts=t,this.cache=e,this.inputStream=new s,this.inputStream.on(`error`,e=>this.emit(`error`,e)),this.inputStream.on(`drain`,()=>this.emit(`drain`)),this.handleContentP=null}write(e,t,n){return this.handleContentP||(this.handleContentP=y(this.inputStream,this.cache,this.opts),this.handleContentP.catch(e=>this.emit(`error`,e))),this.inputStream.write(e,t,n)}flush(e){this.inputStream.end(()=>{if(!this.handleContentP){let t=Error(`Cache input stream was empty`);return t.code=`ENODATA`,Promise.reject(t).catch(e)}this.handleContentP.then(t=>{t.integrity&&this.emit(`integrity`,t.integrity),t.size!==null&&this.emit(`size`,t.size),e()},t=>e(t))})}};function _(e,t={}){return new g(e,t)}async function y(e,t,n){let r=await C(t,n);try{let i=await b(e,t,r.target,n);return await w(r,t,i.integrity,n),i}finally{r.moved||await a.rm(r.target,{recursive:!0,force:!0})}}async function b(e,t,n,i){let a=new p.WriteStream(n,{flags:`wx`});if(i.integrityEmitter){let[t,n]=await Promise.all([r.once(i.integrityEmitter,`integrity`).then(e=>e[0]),r.once(i.integrityEmitter,`size`).then(e=>e[0]),new c(e,a).promise()]);return{integrity:t,size:n}}let o,s,l=d.integrityStream({integrity:i.integrity,algorithms:i.algorithms,size:i.size});return l.on(`integrity`,e=>{o=e}),l.on(`size`,e=>{s=e}),await new c(e,l,a).promise(),{integrity:o,size:s}}async function C(e,t){let n=f(e,t.tmpPrefix);return await a.mkdir(u.dirname(n),{recursive:!0}),{target:n,moved:!1}}async function w(e,t,n){let r=i(t,n),s=u.dirname(r);return m.has(r)||m.set(r,a.mkdir(s,{recursive:!0}).then(async()=>(await o(e.target,r,{overwrite:!1}),e.moved=!0,e.moved)).catch(e=>{if(!e.message.startsWith(`The destination file exists`))throw Object.assign(e,{code:`EEXIST`})}).finally(()=>{m.delete(r)})),m.get(r)}function T(e,t){let n=Error(`Bad data size: expected inserted data to be ${e} bytes, but got ${t} instead`);return n.expected=e,n.found=t,n.code=`EBADSIZE`,n}function E(e,t){let n=Error(`Integrity check failed:
|
|
5
|
-
Wanted: ${e}
|
|
6
|
-
Found: ${t}`);return n.code=`EINTEGRITY`,n.expected=e,n.found=t,n}})),Y=i(((e,t)=>{var n=ie(),r=oe(),i=ue(),a=le(),{PassThrough:o}=y(),s=x(),c=e=>({algorithms:[`sha512`],...e});t.exports=l;async function l(e,t,a,o={}){let{memoize:s}=o;o=c(o);let l=await i(e,a,o),u=await n.insert(e,t,l.integrity,{...o,size:l.size});return s&&r.put(e,u,a,o),l.integrity}t.exports.stream=u;function u(e,t,l={}){let{memoize:u}=l;l=c(l);let d,f,p,m,h=new s;if(u){let e=new o().on(`collect`,e=>{m=e});h.push(e)}let g=i.stream(e,l).on(`integrity`,e=>{d=e}).on(`size`,e=>{f=e}).on(`error`,e=>{p=e});return h.push(g),h.push(new a({async flush(){if(!p){let i=await n.insert(e,t,d,{...l,size:f});u&&m&&r.put(e,i,m,l),h.emit(`integrity`,d),h.emit(`size`,f)}}})),h}})),de=i((e=>{h(),a(),c(),u(),l(),d();var n=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),r=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.range=e.balanced=void 0,e.balanced=(n,r,i)=>{let a=n instanceof RegExp?t(n,i):n,o=r instanceof RegExp?t(r,i):r,s=a!==null&&o!=null&&(0,e.range)(a,o,i);return s&&{start:s[0],end:s[1],pre:i.slice(0,s[0]),body:i.slice(s[0]+a.length,s[1]),post:i.slice(s[1]+o.length)}};var t=(e,t)=>{let n=t.match(e);return n?n[0]:null};e.range=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s}}),i=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.EXPANSION_MAX=void 0,e.expand=S;var t=r(),n=`\0SLASH`+Math.random()+`\0`,i=`\0OPEN`+Math.random()+`\0`,a=`\0CLOSE`+Math.random()+`\0`,o=`\0COMMA`+Math.random()+`\0`,s=`\0PERIOD`+Math.random()+`\0`,c=new RegExp(n,`g`),l=new RegExp(i,`g`),u=new RegExp(a,`g`),d=new RegExp(o,`g`),f=new RegExp(s,`g`),p=/\\\\/g,m=/\\{/g,h=/\\}/g,g=/\\,/g,_=/\\./g;e.EXPANSION_MAX=1e5;function v(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function y(e){return e.replace(p,n).replace(m,i).replace(h,a).replace(g,o).replace(_,s)}function b(e){return e.replace(c,`\\`).replace(l,`{`).replace(u,`}`).replace(d,`,`).replace(f,`.`)}function x(e){if(!e)return[``];let n=[],r=(0,t.balanced)(`{`,`}`,e);if(!r)return e.split(`,`);let{pre:i,body:a,post:o}=r,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;let c=x(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),n.push.apply(n,s),n}function S(t,n={}){if(!t)return[];let{max:r=e.EXPANSION_MAX}=n;return t.slice(0,2)===`{}`&&(t=`\\{\\}`+t.slice(2)),D(y(t),r,!0).map(b)}function C(e){return`{`+e+`}`}function w(e){return/^-?0\d/.test(e)}function T(e,t){return e<=t}function E(e,t){return e>=t}function D(e,n,r){let i=[],o=(0,t.balanced)(`{`,`}`,e);if(!o)return[e];let s=o.pre,c=o.post.length?D(o.post,n,!1):[``];if(/\$$/.test(o.pre))for(let e=0;e<c.length&&e<n;e++){let t=s+`{`+o.body+`}`+c[e];i.push(t)}else{let t=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),u=t||l,d=o.body.indexOf(`,`)>=0;if(!u&&!d)return o.post.match(/,(?!,).*\}/)?(e=o.pre+`{`+o.body+a+o.post,D(e,n,!0)):[e];let f;if(u)f=o.body.split(/\.\./);else if(f=x(o.body),f.length===1&&f[0]!==void 0&&(f=D(f[0],n,!1).map(C),f.length===1))return c.map(e=>o.pre+f[0]+e);let p;if(u&&f[0]!==void 0&&f[1]!==void 0){let e=v(f[0]),t=v(f[1]),n=Math.max(f[0].length,f[1].length),r=f.length===3&&f[2]!==void 0?Math.abs(v(f[2])):1,i=T;t<e&&(r*=-1,i=E);let a=f.some(w);p=[];for(let o=e;i(o,t);o+=r){let e;if(l)e=String.fromCharCode(o),e===`\\`&&(e=``);else if(e=String(o),a){let t=n-e.length;if(t>0){let n=Array(t+1).join(`0`);e=o<0?`-`+n+e.slice(1):n+e}}p.push(e)}}else{p=[];for(let e=0;e<f.length;e++)p.push.apply(p,D(f[e],n,!1))}for(let e=0;e<p.length;e++)for(let t=0;t<c.length&&i.length<n;t++){let n=s+p[e]+c[t];(!r||u||n)&&i.push(n)}}return i}}),_=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assertValidPattern=void 0;var t=1024*64;e.assertValidPattern=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>t)throw TypeError(`pattern is too long`)}}),v=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.parseClass=void 0;var t={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},n=e=>e.replace(/[[\]\\-]/g,`\\$&`),r=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),i=e=>e.join(``);e.parseClass=(e,a)=>{let o=a;if(e.charAt(o)!==`[`)throw Error(`not in a brace expression`);let s=[],c=[],l=o+1,u=!1,d=!1,f=!1,p=!1,m=o,h=``;t:for(;l<e.length;){let r=e.charAt(l);if((r===`!`||r===`^`)&&l===o+1){p=!0,l++;continue}if(r===`]`&&u&&!f){m=l+1;break}if(u=!0,r===`\\`&&!f){f=!0,l++;continue}if(r===`[`&&!f){for(let[n,[r,i,a]]of Object.entries(t))if(e.startsWith(n,l)){if(h)return[`$.`,!1,e.length-o,!0];l+=n.length,a?c.push(r):s.push(r),d=d||i;continue t}}if(f=!1,h){r>h?s.push(n(h)+`-`+n(r)):r===h&&s.push(n(r)),h=``,l++;continue}if(e.startsWith(`-]`,l+1)){s.push(n(r+`-`)),l+=2;continue}if(e.startsWith(`-`,l+1)){h=r,l+=2;continue}s.push(n(r)),l++}if(m<l)return[``,!1,0,!1];if(!s.length&&!c.length)return[`$.`,!1,e.length-o,!0];if(c.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!p)return[r(s[0].length===2?s[0].slice(-1):s[0]),!1,m-o,!1];let g=`[`+(p?`^`:``)+i(s)+`]`,_=`[`+(p?``:`^`)+i(c)+`]`;return[s.length&&c.length?`(`+g+`|`+_+`)`:s.length?g:_,d,m-o,!0]}}),y=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=void 0,e.unescape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^\/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,`$1$2`).replace(/\\([^\/])/g,`$1`):t?e.replace(/\[([^\/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,`$1$2`).replace(/\\([^\/{}])/g,`$1`)}),b=n(e=>{var t,n,r,i,a,c,l,u,d,h,_,b,x;Object.defineProperty(e,"__esModule",{value:!0}),e.AST=void 0;var S=v(),C=y(),w=new Set([`!`,`?`,`+`,`*`,`@`]),T=e=>w.has(e),E=`(?!(?:^|/)\\.\\.?(?:$|/))`,D=`(?!\\.)`,O=new Set([`[`,`.`]),k=new Set([`..`,`.`]),A=new Set(`().*{}+?[]^$\\!`),j=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),M=`[^/]`,N=M+`*?`,P=M+`+?`,F=(t=new WeakMap,n=new WeakMap,r=new WeakMap,i=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,h=new WeakMap,_=new WeakMap,b=new WeakSet,x=class e{constructor(e,s,v={}){g(this,b),o(this,`type`,void 0),p(this,t,void 0),p(this,n,void 0),p(this,r,!1),p(this,i,[]),p(this,a,void 0),p(this,c,void 0),p(this,l,void 0),p(this,u,!1),p(this,d,void 0),p(this,h,void 0),p(this,_,!1),this.type=e,e&&m(n,this,!0),m(a,this,s),m(t,this,f(a,this)?f(t,f(a,this)):this),m(d,this,f(t,this)===this?v:f(d,f(t,this))),m(l,this,f(t,this)===this?[]:f(l,f(t,this))),e===`!`&&!f(u,f(t,this))&&f(l,this).push(this),m(c,this,f(a,this)?f(i,f(a,this)).length:0)}get hasMagic(){if(f(n,this)!==void 0)return f(n,this);for(let e of f(i,this))if(typeof e!=`string`&&(e.type||e.hasMagic))return m(n,this,!0);return f(n,this)}toString(){return f(h,this)===void 0?this.type?m(h,this,this.type+`(`+f(i,this).map(e=>String(e)).join(`|`)+`)`):m(h,this,f(i,this).map(e=>String(e)).join(``)):f(h,this)}push(...t){for(let n of t)if(n!==``){if(typeof n!=`string`&&!(n instanceof e&&f(a,n)===this))throw Error(`invalid part: `+n);f(i,this).push(n)}}toJSON(){let e=this.type===null?f(i,this).slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...f(i,this).map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===f(t,this)||f(u,f(t,this))&&f(a,this)?.type===`!`)&&e.push({}),e}isStart(){if(f(t,this)===this)return!0;if(!f(a,this)?.isStart())return!1;if(f(c,this)===0)return!0;let n=f(a,this);for(let t=0;t<f(c,this);t++){let r=f(i,n)[t];if(!(r instanceof e&&r.type===`!`))return!1}return!0}isEnd(){if(f(t,this)===this||f(a,this)?.type===`!`)return!0;if(!f(a,this)?.isEnd())return!1;if(!this.type)return f(a,this)?.isEnd();let e=f(a,this)?f(i,f(a,this)).length:0;return f(c,this)===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(t){let n=new e(this.type,t);for(let e of f(i,this))n.copyIn(e);return n}static fromGlob(t,n={}){let r=new e(null,void 0,n);return s(x,e,L).call(e,t,r,0,n),r}toMMPattern(){if(this!==f(t,this))return f(t,this).toMMPattern();let e=this.toString(),[r,i,a,o]=this.toRegExpSource();if(!(a||f(n,this)||f(d,this).nocase&&!f(d,this).nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let s=(f(d,this).nocase?`i`:``)+(o?`u`:``);return Object.assign(RegExp(`^${r}$`,s),{_src:r,_glob:e})}get options(){return f(d,this)}toRegExpSource(o){let c=o??!!f(d,this).dot;if(f(t,this)===this&&s(b,this,I).call(this),!this.type){let l=this.isStart()&&this.isEnd()&&!f(i,this).some(e=>typeof e!=`string`),d=f(i,this).map(t=>{let[i,a,c,u]=typeof t==`string`?s(x,e,z).call(e,t,f(n,this),l):t.toRegExpSource(o);return m(n,this,f(n,this)||c),m(r,this,f(r,this)||u),i}).join(``),p=``;if(this.isStart()&&typeof f(i,this)[0]==`string`&&!(f(i,this).length===1&&k.has(f(i,this)[0]))){let e=O,t=c&&e.has(d.charAt(0))||d.startsWith(`\\.`)&&e.has(d.charAt(2))||d.startsWith(`\\.\\.`)&&e.has(d.charAt(4)),n=!c&&!o&&e.has(d.charAt(0));p=t?E:n?D:``}let h=``;return this.isEnd()&&f(u,f(t,this))&&f(a,this)?.type===`!`&&(h=`(?:$|\\/)`),[p+d+h,(0,C.unescape)(d),m(n,this,!!f(n,this)),f(r,this)]}let l=this.type===`*`||this.type===`+`,p=this.type===`!`?`(?:(?!(?:`:`(?:`,h=s(b,this,R).call(this,c);if(this.isStart()&&this.isEnd()&&!h&&this.type!==`!`){let e=this.toString();return m(i,this,[e]),this.type=null,m(n,this,void 0),[e,(0,C.unescape)(this.toString()),!1,!1]}let g=!l||o||c||!D?``:s(b,this,R).call(this,!0);g===h&&(g=``),g&&(h=`(?:${h})(?:${g})*?`);let v=``;if(this.type===`!`&&f(_,this))v=(this.isStart()&&!c?D:``)+P;else{let e=this.type===`!`?`))`+(this.isStart()&&!c&&!o?D:``)+N+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&g?`)`:this.type===`*`&&g?`)?`:`)${this.type}`;v=p+h+e}return[v,(0,C.unescape)(h),m(n,this,!!f(n,this)),f(r,this)]}},x);function I(){if(this!==f(t,this))throw Error(`should only call on root`);if(f(u,this))return this;this.toString(),m(u,this,!0);let e;for(;e=f(l,this).pop();){if(e.type!==`!`)continue;let t=e,n=f(a,t);for(;n;){for(let r=f(c,t)+1;!n.type&&r<f(i,n).length;r++)for(let t of f(i,e)){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(f(i,n)[r])}t=n,n=f(a,t)}}return this}function L(e,t,r,a){let o=!1,c=!1,l=-1,u=!1;if(t.type===null){let n=r,i=``;for(;n<e.length;){let r=e.charAt(n++);if(o||r===`\\`){o=!o,i+=r;continue}if(c){n===l+1?(r===`^`||r===`!`)&&(u=!0):r===`]`&&!(n===l+2&&u)&&(c=!1),i+=r;continue}else if(r===`[`){c=!0,l=n,u=!1,i+=r;continue}if(!a.noext&&T(r)&&e.charAt(n)===`(`){t.push(i),i=``;let o=new x(r,t);n=s(x,x,L).call(x,e,o,n,a),t.push(o);continue}i+=r}return t.push(i),n}let d=r+1,p=new x(null,t),h=[],g=``;for(;d<e.length;){let n=e.charAt(d++);if(o||n===`\\`){o=!o,g+=n;continue}if(c){d===l+1?(n===`^`||n===`!`)&&(u=!0):n===`]`&&!(d===l+2&&u)&&(c=!1),g+=n;continue}else if(n===`[`){c=!0,l=d,u=!1,g+=n;continue}if(T(n)&&e.charAt(d)===`(`){p.push(g),g=``;let t=new x(n,p);p.push(t),d=s(x,x,L).call(x,e,t,d,a);continue}if(n===`|`){p.push(g),g=``,h.push(p),p=new x(null,t);continue}if(n===`)`)return g===``&&f(i,t).length===0&&m(_,t,!0),p.push(g),g=``,t.push(...h,p),d;g+=n}return t.type=null,m(n,t,void 0),m(i,t,[e.substring(r-1)]),d}function R(e){return f(i,this).map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,i,a,o]=t.toRegExpSource(e);return m(r,this,f(r,this)||o),n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}function z(e,t,n=!1){let r=!1,i=``,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e.charAt(s);if(r){r=!1,i+=(A.has(c)?`\\`:``)+c;continue}if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?P:N,t=!0;continue}else o=!1;if(c===`\\`){s===e.length-1?i+=`\\\\`:r=!0;continue}if(c===`[`){let[n,r,o,c]=(0,S.parseClass)(e,s);if(o){i+=n,a=a||r,s+=o-1,t=t||c;continue}}if(c===`?`){i+=M,t=!0;continue}i+=j(c)}return[i,(0,C.unescape)(e),!!t,a]}e.AST=F}),x=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.escape=void 0,e.escape=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`)}),S=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;var t=i(),n=_(),r=b(),a=x(),s=y();e.minimatch=(e,t,r={})=>((0,n.assertValidPattern)(t),!r.nocomment&&t.charAt(0)===`#`?!1:new B(t,r).match(e));var c=/^\*+([^+@!?\*\[\(]*)$/,l=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),u=e=>t=>t.endsWith(e),d=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),f=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),p=/^\*+\.\*+$/,m=e=>!e.startsWith(`.`)&&e.includes(`.`),h=e=>e!==`.`&&e!==`..`&&e.includes(`.`),g=/^\.\*+$/,v=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),S=/^\*+$/,C=e=>e.length!==0&&!e.startsWith(`.`),w=e=>e.length!==0&&e!==`.`&&e!==`..`,T=/^\?+([^+@!?\*\[\(]*)?$/,E=([e,t=``])=>{let n=A([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},D=([e,t=``])=>{let n=j([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},O=([e,t=``])=>{let n=j([e]);return t?e=>n(e)&&e.endsWith(t):n},k=([e,t=``])=>{let n=A([e]);return t?e=>n(e)&&e.endsWith(t):n},A=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},j=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},M=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,N={win32:{sep:`\\`},posix:{sep:`/`}};e.sep=M===`win32`?N.win32.sep:N.posix.sep,e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol(`globstar **`),e.minimatch.GLOBSTAR=e.GLOBSTAR;var P=`[^/]*?`,F=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,I=`(?:(?!(?:\\/|^)\\.).)*?`;e.filter=(t,n={})=>r=>(0,e.minimatch)(r,t,n),e.minimatch.filter=e.filter;var L=(e,t={})=>Object.assign({},e,t);e.defaults=t=>{if(!t||typeof t!=`object`||!Object.keys(t).length)return e.minimatch;let n=e.minimatch;return Object.assign((e,r,i={})=>n(e,r,L(t,i)),{Minimatch:class extends n.Minimatch{constructor(e,n={}){super(e,L(t,n))}static defaults(e){return n.defaults(L(t,e)).Minimatch}},AST:class extends n.AST{constructor(e,n,r={}){super(e,n,L(t,r))}static fromGlob(e,r={}){return n.AST.fromGlob(e,L(t,r))}},unescape:(e,r={})=>n.unescape(e,L(t,r)),escape:(e,r={})=>n.escape(e,L(t,r)),filter:(e,r={})=>n.filter(e,L(t,r)),defaults:e=>n.defaults(L(t,e)),makeRe:(e,r={})=>n.makeRe(e,L(t,r)),braceExpand:(e,r={})=>n.braceExpand(e,L(t,r)),match:(e,r,i={})=>n.match(e,r,L(t,i)),sep:n.sep,GLOBSTAR:e.GLOBSTAR})},e.minimatch.defaults=e.defaults,e.braceExpand=(e,r={})=>((0,n.assertValidPattern)(e),r.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,t.expand)(e,{max:r.braceExpandMax})),e.minimatch.braceExpand=e.braceExpand,e.makeRe=(e,t={})=>new B(e,t).makeRe(),e.minimatch.makeRe=e.makeRe,e.match=(e,t,n={})=>{let r=new B(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e},e.minimatch.match=e.match;var R=/[?*]|[+@!]\(.*?\)|\[|\]/,z=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),B=class{constructor(e,t={}){o(this,`options`,void 0),o(this,`set`,void 0),o(this,`pattern`,void 0),o(this,`windowsPathsNoEscape`,void 0),o(this,`nonegate`,void 0),o(this,`negate`,void 0),o(this,`comment`,void 0),o(this,`empty`,void 0),o(this,`preserveMultipleSlashes`,void 0),o(this,`partial`,void 0),o(this,`globSet`,void 0),o(this,`globParts`,void 0),o(this,`nocase`,void 0),o(this,`isWindows`,void 0),o(this,`platform`,void 0),o(this,`windowsNoMagicRoot`,void 0),o(this,`regexp`,void 0),(0,n.assertValidPattern)(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||M,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!R.test(e[2]))&&!R.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)e[t][n]===`**`&&(e[t][n]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];n===1&&r===``&&e[0]===``||(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];e===1&&r===``&&n[0]===``||(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(t,n,r=!1){let i=this.options;if(this.isWindows){let e=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),r=!e&&t[0]===``&&t[1]===``&&t[2]===`?`&&/^[a-z]:$/i.test(t[3]),i=typeof n[0]==`string`&&/^[a-z]:$/i.test(n[0]),a=!i&&n[0]===``&&n[1]===``&&n[2]===`?`&&typeof n[3]==`string`&&/^[a-z]:$/i.test(n[3]),o=r?3:e?0:void 0,s=a?3:i?0:void 0;if(typeof o==`number`&&typeof s==`number`){let[e,r]=[t[o],n[s]];e.toLowerCase()===r.toLowerCase()&&(n[s]=e,s>o?n=n.slice(s):o>s&&(t=t.slice(o)))}}let{optimizationLevel:a=1}=this.options;a>=2&&(t=this.levelTwoFileOptimize(t)),this.debug(`matchOne`,this,{file:t,pattern:n}),this.debug(`matchOne`,t.length,n.length);for(var o=0,s=0,c=t.length,l=n.length;o<c&&s<l;o++,s++){this.debug(`matchOne loop`);var u=n[s],d=t[o];if(this.debug(n,u,d),u===!1)return!1;if(u===e.GLOBSTAR){this.debug(`GLOBSTAR`,[n,u,d]);var f=o,p=s+1;if(p===l){for(this.debug(`** at the end`);o<c;o++)if(t[o]===`.`||t[o]===`..`||!i.dot&&t[o].charAt(0)===`.`)return!1;return!0}for(;f<c;){var m=t[f];if(this.debug(`
|
|
7
|
-
globstar while`,t,f,n,p,m),this.matchOne(t.slice(f),n.slice(p),r))return this.debug(`globstar found match!`,f,c,m),!0;if(m===`.`||m===`..`||!i.dot&&m.charAt(0)===`.`){this.debug(`dot detected!`,t,f,n,p);break}this.debug(`globstar swallow a segment, and continue`),f++}return!!(r&&(this.debug(`
|
|
8
|
-
>>> no match, partial?`,t,f,n,p),f===c))}let a;if(typeof u==`string`?(a=d===u,this.debug(`string match`,u,d,a)):(a=u.test(d),this.debug(`pattern match`,u,d,a)),!a)return!1}if(o===c&&s===l)return!0;if(o===c)return r;if(s===l)return o===c-1&&t[o]===``;throw Error(`wtf?`)}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(t){(0,n.assertValidPattern)(t);let i=this.options;if(t===`**`)return e.GLOBSTAR;if(t===``)return``;let a,o=null;(a=t.match(S))?o=i.dot?w:C:(a=t.match(c))?o=(i.nocase?i.dot?f:d:i.dot?u:l)(a[1]):(a=t.match(T))?o=(i.nocase?i.dot?D:E:i.dot?O:k)(a):(a=t.match(p))?o=i.dot?h:m:(a=t.match(g))&&(o=v);let s=r.AST.fromGlob(t,this.options).toMMPattern();return o&&typeof s==`object`&&Reflect.defineProperty(s,"test",{value:o}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?P:n.dot?F:I,i=new Set(n.nocase?[`i`]:[]),a=t.map(t=>{let n=t.map(t=>{if(t instanceof RegExp)for(let e of t.flags.split(``))i.add(e);return typeof t==`string`?z(t):t===e.GLOBSTAR?e.GLOBSTAR:t._src});n.forEach((t,i)=>{let a=n[i+1],o=n[i-1];t!==e.GLOBSTAR||o===e.GLOBSTAR||(o===void 0?a!==void 0&&a!==e.GLOBSTAR?n[i+1]=`(?:\\/|`+r+`\\/)?`+a:n[i]=r:a===void 0?n[i-1]=o+`(?:\\/|\\/`+r+`)?`:a!==e.GLOBSTAR&&(n[i-1]=o+`(?:\\/|\\/`+r+`\\/)`+a,n[i+1]=e.GLOBSTAR))});let a=n.filter(t=>t!==e.GLOBSTAR);if(this.partial&&a.length>=1){let e=[];for(let t=1;t<=a.length;t++)e.push(a.slice(0,t).join(`/`));return`(?:`+e.join(`|`)+`)`}return a.join(`/`)}).join(`|`),[o,s]=t.length>1?[`(?:`,`)`]:[``,``];a=`^`+o+a+s+`$`,this.partial&&(a=`^(?:\\/|`+o+a.slice(1,-1)+s+`)$`),this.negate&&(a=`^(?!`+a+`).+$`);try{this.regexp=new RegExp(a,[...i].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^\/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e=0;e<i.length;e++){let o=i[e],s=r;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return n.flipNegate?!0:!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return e.minimatch.defaults(t).Minimatch}};e.Minimatch=B;var V=b();Object.defineProperty(e,"AST",{enumerable:!0,get:function(){return V.AST}});var H=x();Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return H.escape}});var U=y();Object.defineProperty(e,"unescape",{enumerable:!0,get:function(){return U.unescape}}),e.minimatch.AST=r.AST,e.minimatch.Minimatch=B,e.minimatch.escape=a.escape,e.minimatch.unescape=s.unescape}),C=n(e=>{var t,n,r,i,a,c,l,u,d,h,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U;let W,G;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var ee=typeof performance==`object`&&performance&&typeof performance.now==`function`?performance:Date,K=new Set,q=typeof process==`object`&&process?process:{},te=(e,t,n,r)=>{typeof q.emitWarning==`function`?q.emitWarning(e,t,n,r):console.error(`[${n}] ${t}: ${e}`)},ne=globalThis.AbortController,re=globalThis.AbortSignal;if(typeof ne>`u`){re=class{constructor(){o(this,`onabort`,void 0),o(this,`_onabort`,[]),o(this,`reason`,void 0),o(this,`aborted`,!1)}addEventListener(e,t){this._onabort.push(t)}},ne=class{constructor(){o(this,`signal`,new re),t()}abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(let t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e=q.env?.LRU_CACHE_IGNORE_AC_WARNING!==`1`,t=()=>{e&&(e=!1,te("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.",`NO_ABORT_CONTROLLER`,`ENOTSUP`,t))}}var ie=e=>!K.has(e),ae=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),oe=e=>ae(e)?e<=2**8?Uint8Array:e<=2**16?Uint16Array:e<=2**32?Uint32Array:e<=2**53-1?se:null:null,se=class extends Array{constructor(e){super(e),this.fill(0)}},J=(t=class e{static create(r){let i=oe(r);if(!i)return[];n._=s(t,e,!0);let a=new e(r,i);return n._=s(t,e,!1),a}constructor(r,i){if(o(this,`heap`,void 0),o(this,`length`,void 0),!s(t,e,n)._)throw TypeError(`instantiate Stack using Stack.create(n)`);this.heap=new i(r),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},n={_:!1},t),ce=(r=new WeakMap,i=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,h=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,S=new WeakMap,C=new WeakMap,w=new WeakMap,T=new WeakMap,E=new WeakMap,D=new WeakMap,O=new WeakMap,k=new WeakMap,A=new WeakMap,j=new WeakMap,M=new WeakMap,N=new WeakMap,P=new WeakMap,F=new WeakMap,I=new WeakSet,L=new WeakMap,R=new WeakMap,z=new WeakMap,B=new WeakMap,V=new WeakMap,H=new WeakMap,U=new WeakMap,G=Symbol.iterator,W=Symbol.toStringTag,class e{get perf(){return f(h,this)}static unsafeExposeInternals(e){return{starts:f(k,e),ttls:f(A,e),autopurgeTimers:f(j,e),sizes:f(O,e),keyMap:f(y,e),keyList:f(b,e),valList:f(x,e),next:f(S,e),prev:f(C,e),get head(){return f(w,e)},get tail(){return f(T,e)},free:f(E,e),isBackgroundFetch:t=>s(I,e,X).call(e,t),backgroundFetch:(t,n,r,i)=>s(I,e,me).call(e,t,n,r,i),moveToTail:t=>s(I,e,ge).call(e,t),indexes:t=>s(I,e,Y).call(e,t),rindexes:t=>s(I,e,de).call(e,t),isStale:t=>f(B,e).call(e,t)}}get max(){return f(r,this)}get maxSize(){return f(i,this)}get calculatedSize(){return f(v,this)}get size(){return f(_,this)}get fetchMethod(){return f(u,this)}get memoMethod(){return f(d,this)}get dispose(){return f(a,this)}get onInsert(){return f(c,this)}get disposeAfter(){return f(l,this)}constructor(t){g(this,I),p(this,r,void 0),p(this,i,void 0),p(this,a,void 0),p(this,c,void 0),p(this,l,void 0),p(this,u,void 0),p(this,d,void 0),p(this,h,void 0),o(this,`ttl`,void 0),o(this,`ttlResolution`,void 0),o(this,`ttlAutopurge`,void 0),o(this,`updateAgeOnGet`,void 0),o(this,`updateAgeOnHas`,void 0),o(this,`allowStale`,void 0),o(this,`noDisposeOnSet`,void 0),o(this,`noUpdateTTL`,void 0),o(this,`maxEntrySize`,void 0),o(this,`sizeCalculation`,void 0),o(this,`noDeleteOnFetchRejection`,void 0),o(this,`noDeleteOnStaleGet`,void 0),o(this,`allowStaleOnFetchAbort`,void 0),o(this,`allowStaleOnFetchRejection`,void 0),o(this,`ignoreFetchAbort`,void 0),p(this,_,void 0),p(this,v,void 0),p(this,y,void 0),p(this,b,void 0),p(this,x,void 0),p(this,S,void 0),p(this,C,void 0),p(this,w,void 0),p(this,T,void 0),p(this,E,void 0),p(this,D,void 0),p(this,O,void 0),p(this,k,void 0),p(this,A,void 0),p(this,j,void 0),p(this,M,void 0),p(this,N,void 0),p(this,P,void 0),p(this,F,void 0),p(this,L,()=>{}),p(this,R,()=>{}),p(this,z,()=>{}),p(this,B,()=>!1),p(this,V,e=>{}),p(this,H,(e,t,n)=>{}),p(this,U,(e,t,n,r)=>{if(n||r)throw TypeError(`cannot set size without setting maxSize or maxEntrySize on cache`);return 0}),o(this,W,`LRUCache`);let{max:n=0,ttl:G,ttlResolution:q=1,ttlAutopurge:ne,updateAgeOnGet:re,updateAgeOnHas:se,allowStale:ce,dispose:Y,onInsert:de,disposeAfter:fe,noDisposeOnSet:pe,noUpdateTTL:me,maxSize:X=0,maxEntrySize:he=0,sizeCalculation:ge,fetchMethod:Z,memoMethod:_e,noDeleteOnFetchRejection:ve,noDeleteOnStaleGet:ye,allowStaleOnFetchRejection:be,allowStaleOnFetchAbort:Q,ignoreFetchAbort:xe,perf:Se}=t;if(Se!==void 0&&typeof Se?.now!=`function`)throw TypeError(`perf option must have a now() method if specified`);if(m(h,this,Se??ee),n!==0&&!ae(n))throw TypeError(`max option must be a nonnegative integer`);let Ce=n?oe(n):Array;if(!Ce)throw Error(`invalid max value: `+n);if(m(r,this,n),m(i,this,X),this.maxEntrySize=he||f(i,this),this.sizeCalculation=ge,this.sizeCalculation){if(!f(i,this)&&!this.maxEntrySize)throw TypeError(`cannot set sizeCalculation without setting maxSize or maxEntrySize`);if(typeof this.sizeCalculation!=`function`)throw TypeError(`sizeCalculation set to non-function`)}if(_e!==void 0&&typeof _e!=`function`)throw TypeError(`memoMethod must be a function if defined`);if(m(d,this,_e),Z!==void 0&&typeof Z!=`function`)throw TypeError(`fetchMethod must be a function if specified`);if(m(u,this,Z),m(N,this,!!Z),m(y,this,new Map),m(b,this,Array(n).fill(void 0)),m(x,this,Array(n).fill(void 0)),m(S,this,new Ce(n)),m(C,this,new Ce(n)),m(w,this,0),m(T,this,0),m(E,this,J.create(n)),m(_,this,0),m(v,this,0),typeof Y==`function`&&m(a,this,Y),typeof de==`function`&&m(c,this,de),typeof fe==`function`?(m(l,this,fe),m(D,this,[])):(m(l,this,void 0),m(D,this,void 0)),m(M,this,!!f(a,this)),m(F,this,!!f(c,this)),m(P,this,!!f(l,this)),this.noDisposeOnSet=!!pe,this.noUpdateTTL=!!me,this.noDeleteOnFetchRejection=!!ve,this.allowStaleOnFetchRejection=!!be,this.allowStaleOnFetchAbort=!!Q,this.ignoreFetchAbort=!!xe,this.maxEntrySize!==0){if(f(i,this)!==0&&!ae(f(i,this)))throw TypeError(`maxSize must be a positive integer if specified`);if(!ae(this.maxEntrySize))throw TypeError(`maxEntrySize must be a positive integer if specified`);s(I,this,ue).call(this)}if(this.allowStale=!!ce,this.noDeleteOnStaleGet=!!ye,this.updateAgeOnGet=!!re,this.updateAgeOnHas=!!se,this.ttlResolution=ae(q)||q===0?q:1,this.ttlAutopurge=!!ne,this.ttl=G||0,this.ttl){if(!ae(this.ttl))throw TypeError(`ttl must be a positive integer if specified`);s(I,this,le).call(this)}if(f(r,this)===0&&this.ttl===0&&f(i,this)===0)throw TypeError(`At least one of max, maxSize, or ttl is required`);if(!this.ttlAutopurge&&!f(r,this)&&!f(i,this)){let t=`LRU_CACHE_UNBOUNDED`;ie(t)&&(K.add(t),te(`TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.`,`UnboundedCacheWarning`,t,e))}}getRemainingTTL(e){return f(y,this).has(e)?1/0:0}*entries(){for(let e of s(I,this,Y).call(this))f(x,this)[e]!==void 0&&f(b,this)[e]!==void 0&&!s(I,this,X).call(this,f(x,this)[e])&&(yield[f(b,this)[e],f(x,this)[e]])}*rentries(){for(let e of s(I,this,de).call(this))f(x,this)[e]!==void 0&&f(b,this)[e]!==void 0&&!s(I,this,X).call(this,f(x,this)[e])&&(yield[f(b,this)[e],f(x,this)[e]])}*keys(){for(let e of s(I,this,Y).call(this)){let t=f(b,this)[e];t!==void 0&&!s(I,this,X).call(this,f(x,this)[e])&&(yield t)}}*rkeys(){for(let e of s(I,this,de).call(this)){let t=f(b,this)[e];t!==void 0&&!s(I,this,X).call(this,f(x,this)[e])&&(yield t)}}*values(){for(let e of s(I,this,Y).call(this))f(x,this)[e]!==void 0&&!s(I,this,X).call(this,f(x,this)[e])&&(yield f(x,this)[e])}*rvalues(){for(let e of s(I,this,de).call(this))f(x,this)[e]!==void 0&&!s(I,this,X).call(this,f(x,this)[e])&&(yield f(x,this)[e])}[G](){return this.entries()}find(e,t={}){for(let n of s(I,this,Y).call(this)){let r=f(x,this)[n],i=s(I,this,X).call(this,r)?r.__staleWhileFetching:r;if(i!==void 0&&e(i,f(b,this)[n],this))return this.get(f(b,this)[n],t)}}forEach(e,t=this){for(let n of s(I,this,Y).call(this)){let r=f(x,this)[n],i=s(I,this,X).call(this,r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,f(b,this)[n],this)}}rforEach(e,t=this){for(let n of s(I,this,de).call(this)){let r=f(x,this)[n],i=s(I,this,X).call(this,r)?r.__staleWhileFetching:r;i!==void 0&&e.call(t,i,f(b,this)[n],this)}}purgeStale(){let e=!1;for(let t of s(I,this,de).call(this,{allowStale:!0}))f(B,this).call(this,t)&&(s(I,this,Z).call(this,f(b,this)[t],`expire`),e=!0);return e}info(e){let t=f(y,this).get(e);if(t===void 0)return;let n=f(x,this)[t],r=s(I,this,X).call(this,n)?n.__staleWhileFetching:n;if(r===void 0)return;let i={value:r};if(f(A,this)&&f(k,this)){let e=f(A,this)[t],n=f(k,this)[t];e&&n&&(i.ttl=e-(f(h,this).now()-n),i.start=Date.now())}return f(O,this)&&(i.size=f(O,this)[t]),i}dump(){let e=[];for(let t of s(I,this,Y).call(this,{allowStale:!0})){let n=f(b,this)[t],r=f(x,this)[t],i=s(I,this,X).call(this,r)?r.__staleWhileFetching:r;if(i===void 0||n===void 0)continue;let a={value:i};if(f(A,this)&&f(k,this)){a.ttl=f(A,this)[t];let e=f(h,this).now()-f(k,this)[t];a.start=Math.floor(Date.now()-e)}f(O,this)&&(a.size=f(O,this)[t]),e.unshift([n,a])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let e=Date.now()-n.start;n.start=f(h,this).now()-e}this.set(t,n.value,n)}}set(e,t,n={}){var i;if(t===void 0)return this.delete(e),this;let{ttl:o=this.ttl,start:u,noDisposeOnSet:d=this.noDisposeOnSet,sizeCalculation:p=this.sizeCalculation,status:h}=n,{noUpdateTTL:g=this.noUpdateTTL}=n,v=f(U,this).call(this,e,t,n.size||0,p);if(this.maxEntrySize&&v>this.maxEntrySize)return h&&(h.set=`miss`,h.maxEntrySizeExceeded=!0),s(I,this,Z).call(this,e,`set`),this;let w=f(_,this)===0?void 0:f(y,this).get(e);if(w===void 0)w=f(_,this)===0?f(T,this):f(E,this).length===0?f(_,this)===f(r,this)?s(I,this,pe).call(this,!1):f(_,this):f(E,this).pop(),f(b,this)[w]=e,f(x,this)[w]=t,f(y,this).set(e,w),f(S,this)[f(T,this)]=w,f(C,this)[w]=f(T,this),m(T,this,w),m(_,this,(i=f(_,this),i++,i)),f(H,this).call(this,w,v,h),h&&(h.set=`add`),g=!1,f(F,this)&&f(c,this)?.call(this,t,e,`add`);else{s(I,this,ge).call(this,w);let n=f(x,this)[w];if(t!==n){if(f(N,this)&&s(I,this,X).call(this,n)){n.__abortController.abort(Error(`replaced`));let{__staleWhileFetching:t}=n;t!==void 0&&!d&&(f(M,this)&&f(a,this)?.call(this,t,e,`set`),f(P,this)&&f(D,this)?.push([t,e,`set`]))}else d||(f(M,this)&&f(a,this)?.call(this,n,e,`set`),f(P,this)&&f(D,this)?.push([n,e,`set`]));if(f(V,this).call(this,w),f(H,this).call(this,w,v,h),f(x,this)[w]=t,h){h.set=`replace`;let e=n&&s(I,this,X).call(this,n)?n.__staleWhileFetching:n;e!==void 0&&(h.oldValue=e)}}else h&&(h.set=`update`);f(F,this)&&this.onInsert?.(t,e,t===n?`update`:`replace`)}if(o!==0&&!f(A,this)&&s(I,this,le).call(this),f(A,this)&&(g||f(z,this).call(this,w,o,u),h&&f(R,this).call(this,h,w)),!d&&f(P,this)&&f(D,this)){let e=f(D,this),t;for(;t=e?.shift();)f(l,this)?.call(this,...t)}return this}pop(){try{for(;f(_,this);){let e=f(x,this)[f(w,this)];if(s(I,this,pe).call(this,!0),s(I,this,X).call(this,e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(f(P,this)&&f(D,this)){let e=f(D,this),t;for(;t=e?.shift();)f(l,this)?.call(this,...t)}}}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,i=f(y,this).get(e);if(i!==void 0){let e=f(x,this)[i];if(s(I,this,X).call(this,e)&&e.__staleWhileFetching===void 0)return!1;if(f(B,this).call(this,i))r&&(r.has=`stale`,f(R,this).call(this,r,i));else return n&&f(L,this).call(this,i),r&&(r.has=`hit`,f(R,this).call(this,r,i)),!0}else r&&(r.has=`miss`);return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,r=f(y,this).get(e);if(r===void 0||!n&&f(B,this).call(this,r))return;let i=f(x,this)[r];return s(I,this,X).call(this,i)?i.__staleWhileFetching:i}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:h=this.allowStaleOnFetchAbort,context:g,forceRefresh:_=!1,status:v,signal:b}=t;if(!f(N,this))return v&&(v.fetch=`get`),this.get(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,status:v});let S={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:c,sizeCalculation:l,noUpdateTTL:u,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:h,ignoreFetchAbort:m,status:v,signal:b},C=f(y,this).get(e);if(C===void 0){v&&(v.fetch=`miss`);let t=s(I,this,me).call(this,e,C,S,g);return t.__returned=t}else{let t=f(x,this)[C];if(s(I,this,X).call(this,t)){let e=n&&t.__staleWhileFetching!==void 0;return v&&(v.fetch=`inflight`,e&&(v.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let i=f(B,this).call(this,C);if(!_&&!i)return v&&(v.fetch=`hit`),s(I,this,ge).call(this,C),r&&f(L,this).call(this,C),v&&f(R,this).call(this,v,C),t;let a=s(I,this,me).call(this,e,C,S,g),o=a.__staleWhileFetching!==void 0&&n;return v&&(v.fetch=i?`stale`:`refresh`,o&&i&&(v.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(n===void 0)throw Error(`fetch() returned undefined`);return n}memo(e,t={}){let n=f(d,this);if(!n)throw Error(`no memoMethod provided to constructor`);let{context:r,forceRefresh:i,...a}=t,o=this.get(e,a);if(!i&&o!==void 0)return o;let s=n(e,o,{options:a,context:r});return this.set(e,s,a),s}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=f(y,this).get(e);if(o!==void 0){let t=f(x,this)[o],c=s(I,this,X).call(this,t);return a&&f(R,this).call(this,a,o),f(B,this).call(this,o)?(a&&(a.get=`stale`),c?(a&&n&&t.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?t.__staleWhileFetching:void 0):(i||s(I,this,Z).call(this,e,`expire`),a&&n&&(a.returnedStale=!0),n?t:void 0)):(a&&(a.get=`hit`),c?t.__staleWhileFetching:(s(I,this,ge).call(this,o),r&&f(L,this).call(this,o),t))}else a&&(a.get=`miss`)}delete(e){return s(I,this,Z).call(this,e,`delete`)}clear(){return s(I,this,_e).call(this,`delete`)}});function le(){let e=new se(f(r,this)),t=new se(f(r,this));m(A,this,e),m(k,this,t);let n=this.ttlAutopurge?Array(f(r,this)):void 0;m(j,this,n),m(z,this,(r,i,a=f(h,this).now())=>{if(t[r]=i===0?0:a,e[r]=i,n?.[r]&&(clearTimeout(n[r]),n[r]=void 0),i!==0&&n){let e=setTimeout(()=>{f(B,this).call(this,r)&&s(I,this,Z).call(this,f(b,this)[r],`expire`)},i+1);e.unref&&e.unref(),n[r]=e}}),m(L,this,n=>{t[n]=e[n]===0?0:f(h,this).now()}),m(R,this,(n,r)=>{if(e[r]){let o=e[r],s=t[r];if(!o||!s)return;n.ttl=o,n.start=s,n.now=i||a(),n.remainingTTL=o-(n.now-s)}});let i=0,a=()=>{let e=f(h,this).now();if(this.ttlResolution>0){i=e;let t=setTimeout(()=>i=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=n=>{let r=f(y,this).get(n);if(r===void 0)return 0;let o=e[r],s=t[r];return!o||!s?1/0:o-((i||a())-s)},m(B,this,n=>{let r=t[n],o=e[n];return!!o&&!!r&&(i||a())-r>o})}function ue(){let e=new se(f(r,this));m(v,this,0),m(O,this,e),m(V,this,t=>{m(v,this,f(v,this)-e[t]),e[t]=0}),m(U,this,(e,t,n,r)=>{if(s(I,this,X).call(this,t))return 0;if(!ae(n))if(r){if(typeof r!=`function`)throw TypeError(`sizeCalculation must be a function`);if(n=r(t,e),!ae(n))throw TypeError(`sizeCalculation return invalid (expect positive integer)`)}else throw TypeError(`invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.`);return n}),m(H,this,(t,n,r)=>{if(e[t]=n,f(i,this)){let n=f(i,this)-e[t];for(;f(v,this)>n;)s(I,this,pe).call(this,!0)}m(v,this,f(v,this)+e[t]),r&&(r.entrySize=n,r.totalCalculatedSize=f(v,this))})}function*Y({allowStale:e=this.allowStale}={}){if(f(_,this))for(let t=f(T,this);!(!s(I,this,fe).call(this,t)||((e||!f(B,this).call(this,t))&&(yield t),t===f(w,this)));)t=f(C,this)[t]}function*de({allowStale:e=this.allowStale}={}){if(f(_,this))for(let t=f(w,this);!(!s(I,this,fe).call(this,t)||((e||!f(B,this).call(this,t))&&(yield t),t===f(T,this)));)t=f(S,this)[t]}function fe(e){return e!==void 0&&f(y,this).get(f(b,this)[e])===e}function pe(e){var t;let n=f(w,this),r=f(b,this)[n],i=f(x,this)[n];return f(N,this)&&s(I,this,X).call(this,i)?i.__abortController.abort(Error(`evicted`)):(f(M,this)||f(P,this))&&(f(M,this)&&f(a,this)?.call(this,i,r,`evict`),f(P,this)&&f(D,this)?.push([i,r,`evict`])),f(V,this).call(this,n),f(j,this)?.[n]&&(clearTimeout(f(j,this)[n]),f(j,this)[n]=void 0),e&&(f(b,this)[n]=void 0,f(x,this)[n]=void 0,f(E,this).push(n)),f(_,this)===1?(m(w,this,m(T,this,0)),f(E,this).length=0):m(w,this,f(S,this)[n]),f(y,this).delete(r),m(_,this,(t=f(_,this),t--,t)),n}function me(e,t,n,r){let i=t===void 0?void 0:f(x,this)[t];if(s(I,this,X).call(this,i))return i;let a=new ne,{signal:o}=n;o?.addEventListener(`abort`,()=>a.abort(o.reason),{signal:a.signal});let c={signal:a.signal,options:n,context:r},l=(r,i=!1)=>{let{aborted:o}=a.signal,l=n.ignoreFetchAbort&&r!==void 0,u=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&r!==void 0);if(n.status&&(o&&!i?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,l&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),o&&!l&&!i)return p(a.signal.reason,u);let d=h,m=f(x,this)[t];return(m===h||l&&i&&m===void 0)&&(r===void 0?d.__staleWhileFetching===void 0?s(I,this,Z).call(this,e,`fetch`):f(x,this)[t]=d.__staleWhileFetching:(n.status&&(n.status.fetchUpdated=!0),this.set(e,r,c.options))),r},d=e=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=e),p(e,!1)),p=(r,i)=>{let{aborted:o}=a.signal,c=o&&n.allowStaleOnFetchAbort,l=c||n.allowStaleOnFetchRejection,u=l||n.noDeleteOnFetchRejection,d=h;if(f(x,this)[t]===h&&(!u||!i&&d.__staleWhileFetching===void 0?s(I,this,Z).call(this,e,`fetch`):c||(f(x,this)[t]=d.__staleWhileFetching)),l)return n.status&&d.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),d.__staleWhileFetching;if(d.__returned===d)throw r},m=(t,r)=>{let o=f(u,this)?.call(this,e,i,c);o&&o instanceof Promise&&o.then(e=>t(e===void 0?void 0:e),r),a.signal.addEventListener(`abort`,()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(t(void 0),n.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))})};n.status&&(n.status.fetchDispatched=!0);let h=new Promise(m).then(l,d),g=Object.assign(h,{__abortController:a,__staleWhileFetching:i,__returned:void 0});return t===void 0?(this.set(e,g,{...c.options,status:void 0}),t=f(y,this).get(e)):f(x,this)[t]=g,g}function X(e){if(!f(N,this))return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty(`__staleWhileFetching`)&&t.__abortController instanceof ne}function he(e,t){f(C,this)[t]=e,f(S,this)[e]=t}function ge(e){e!==f(T,this)&&(e===f(w,this)?m(w,this,f(S,this)[e]):s(I,this,he).call(this,f(C,this)[e],f(S,this)[e]),s(I,this,he).call(this,f(T,this),e),m(T,this,e))}function Z(e,t){let n=!1;if(f(_,this)!==0){let i=f(y,this).get(e);if(i!==void 0)if(f(j,this)?.[i]&&(clearTimeout(f(j,this)?.[i]),f(j,this)[i]=void 0),n=!0,f(_,this)===1)s(I,this,_e).call(this,t);else{var r;f(V,this).call(this,i);let n=f(x,this)[i];if(s(I,this,X).call(this,n)?n.__abortController.abort(Error(`deleted`)):(f(M,this)||f(P,this))&&(f(M,this)&&f(a,this)?.call(this,n,e,t),f(P,this)&&f(D,this)?.push([n,e,t])),f(y,this).delete(e),f(b,this)[i]=void 0,f(x,this)[i]=void 0,i===f(T,this))m(T,this,f(C,this)[i]);else if(i===f(w,this))m(w,this,f(S,this)[i]);else{let e=f(C,this)[i];f(S,this)[e]=f(S,this)[i];let t=f(S,this)[i];f(C,this)[t]=f(C,this)[i]}m(_,this,(r=f(_,this),r--,r)),f(E,this).push(i)}}if(f(P,this)&&f(D,this)?.length){let e=f(D,this),t;for(;t=e?.shift();)f(l,this)?.call(this,...t)}return n}function _e(e){for(let t of s(I,this,de).call(this,{allowStale:!0})){let n=f(x,this)[t];if(s(I,this,X).call(this,n))n.__abortController.abort(Error(`deleted`));else{let r=f(b,this)[t];f(M,this)&&f(a,this)?.call(this,n,r,e),f(P,this)&&f(D,this)?.push([n,r,e])}}if(f(y,this).clear(),f(x,this).fill(void 0),f(b,this).fill(void 0),f(A,this)&&f(k,this)){f(A,this).fill(0),f(k,this).fill(0);for(let e of f(j,this)??[])e!==void 0&&clearTimeout(e);f(j,this)?.fill(void 0)}if(f(O,this)&&f(O,this).fill(0),m(w,this,0),m(T,this,0),f(E,this).length=0,m(v,this,0),m(_,this,0),f(P,this)&&f(D,this)){let e=f(D,this),t;for(;t=e?.shift();)f(l,this)?.call(this,...t)}}e.LRUCache=ce}),w=n(e=>{let n,r;var i=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;var a=typeof process==`object`&&process?process:{stdout:null,stderr:null},s=t(`node:events`),c=i(t(`node:stream`)),l=t(`node:string_decoder`);e.isStream=t=>!!t&&typeof t==`object`&&(t instanceof ne||t instanceof c.default||(0,e.isReadable)(t)||(0,e.isWritable)(t)),e.isReadable=e=>!!e&&typeof e==`object`&&e instanceof s.EventEmitter&&typeof e.pipe==`function`&&e.pipe!==c.default.Writable.prototype.pipe,e.isWritable=e=>!!e&&typeof e==`object`&&e instanceof s.EventEmitter&&typeof e.write==`function`&&typeof e.end==`function`;var u=Symbol(`EOF`),d=Symbol(`maybeEmitEnd`),f=Symbol(`emittedEnd`),p=Symbol(`emittingEnd`),m=Symbol(`emittedError`),h=Symbol(`closed`),g=Symbol(`read`),_=Symbol(`flush`),v=Symbol(`flushChunk`),y=Symbol(`encoding`),b=Symbol(`decoder`),x=Symbol(`flowing`),S=Symbol(`paused`),C=Symbol(`resume`),w=Symbol(`buffer`),T=Symbol(`pipes`),E=Symbol(`bufferLength`),D=Symbol(`bufferPush`),O=Symbol(`bufferShift`),k=Symbol(`objectMode`),A=Symbol(`destroyed`),j=Symbol(`error`),M=Symbol(`emitData`),N=Symbol(`emitEnd`),P=Symbol(`emitEnd2`),F=Symbol(`async`),I=Symbol(`abort`),L=Symbol(`aborted`),R=Symbol(`signal`),z=Symbol(`dataListeners`),B=Symbol(`discarded`),V=e=>Promise.resolve().then(e),H=e=>e(),U=e=>e===`end`||e===`finish`||e===`prefinish`,W=e=>e instanceof ArrayBuffer||!!e&&typeof e==`object`&&e.constructor&&e.constructor.name===`ArrayBuffer`&&e.byteLength>=0,G=e=>!Buffer.isBuffer(e)&&ArrayBuffer.isView(e),ee=class{constructor(e,t,n){o(this,`src`,void 0),o(this,`dest`,void 0),o(this,`opts`,void 0),o(this,`ondrain`,void 0),this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[C](),this.dest.on(`drain`,this.ondrain)}unpipe(){this.dest.removeListener(`drain`,this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},K=class extends ee{unpipe(){this.src.removeListener(`error`,this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>this.dest.emit(`error`,e),e.on(`error`,this.proxyErrors)}},q=e=>!!e.objectMode,te=e=>!e.objectMode&&!!e.encoding&&e.encoding!==`buffer`,ne=(n=Symbol.asyncIterator,r=Symbol.iterator,class extends s.EventEmitter{constructor(...e){var t=(...e)=>(super(...e),o(this,x,!1),o(this,S,!1),o(this,T,[]),o(this,w,[]),o(this,k,void 0),o(this,y,void 0),o(this,F,void 0),o(this,b,void 0),o(this,u,!1),o(this,f,!1),o(this,p,!1),o(this,h,!1),o(this,m,null),o(this,E,0),o(this,A,!1),o(this,R,void 0),o(this,L,!1),o(this,z,0),o(this,B,!1),o(this,`writable`,!0),o(this,`readable`,!0),this);let n=e[0]||{};if(t(),n.objectMode&&typeof n.encoding==`string`)throw TypeError(`Encoding and objectMode may not be used together`);q(n)?(this[k]=!0,this[y]=null):te(n)?(this[y]=n.encoding,this[k]=!1):(this[k]=!1,this[y]=null),this[F]=!!n.async,this[b]=this[y]?new l.StringDecoder(this[y]):null,n&&n.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[w]}),n&&n.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[T]});let{signal:r}=n;r&&(this[R]=r,r.aborted?this[I]():r.addEventListener(`abort`,()=>this[I]()))}get bufferLength(){return this[E]}get encoding(){return this[y]}set encoding(e){throw Error(`Encoding must be set at instantiation time`)}setEncoding(e){throw Error(`Encoding must be set at instantiation time`)}get objectMode(){return this[k]}set objectMode(e){throw Error(`objectMode must be set at instantiation time`)}get async(){return this[F]}set async(e){this[F]=this[F]||!!e}[I](){this[L]=!0,this.emit(`abort`,this[R]?.reason),this.destroy(this[R]?.reason)}get aborted(){return this[L]}set aborted(e){}write(e,t,n){if(this[L])return!1;if(this[u])throw Error(`write after end`);if(this[A])return this.emit(`error`,Object.assign(Error(`Cannot call write after a stream was destroyed`),{code:`ERR_STREAM_DESTROYED`})),!0;typeof t==`function`&&(n=t,t=`utf8`),t||(t=`utf8`);let r=this[F]?V:H;if(!this[k]&&!Buffer.isBuffer(e)){if(G(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(W(e))e=Buffer.from(e);else if(typeof e!=`string`)throw Error(`Non-contiguous data written to non-objectMode stream`)}return this[k]?(this[x]&&this[E]!==0&&this[_](!0),this[x]?this.emit(`data`,e):this[D](e),this[E]!==0&&this.emit(`readable`),n&&r(n),this[x]):e.length?(typeof e==`string`&&!(t===this[y]&&!this[b]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[y]&&(e=this[b].write(e)),this[x]&&this[E]!==0&&this[_](!0),this[x]?this.emit(`data`,e):this[D](e),this[E]!==0&&this.emit(`readable`),n&&r(n),this[x]):(this[E]!==0&&this.emit(`readable`),n&&r(n),this[x])}read(e){if(this[A])return null;if(this[B]=!1,this[E]===0||e===0||e&&e>this[E])return this[d](),null;this[k]&&(e=null),this[w].length>1&&!this[k]&&(this[w]=[this[y]?this[w].join(``):Buffer.concat(this[w],this[E])]);let t=this[g](e||null,this[w][0]);return this[d](),t}[g](e,t){if(this[k])this[O]();else{let n=t;e===n.length||e===null?this[O]():typeof n==`string`?(this[w][0]=n.slice(e),t=n.slice(0,e),this[E]-=e):(this[w][0]=n.subarray(e),t=n.subarray(0,e),this[E]-=e)}return this.emit(`data`,t),!this[w].length&&!this[u]&&this.emit(`drain`),t}end(e,t,n){return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=`utf8`),e!==void 0&&this.write(e,t),n&&this.once(`end`,n),this[u]=!0,this.writable=!1,(this[x]||!this[S])&&this[d](),this}[C](){this[A]||(!this[z]&&!this[T].length&&(this[B]=!0),this[S]=!1,this[x]=!0,this.emit(`resume`),this[w].length?this[_]():this[u]?this[d]():this.emit(`drain`))}resume(){return this[C]()}pause(){this[x]=!1,this[S]=!0,this[B]=!1}get destroyed(){return this[A]}get flowing(){return this[x]}get paused(){return this[S]}[D](e){this[k]?this[E]+=1:this[E]+=e.length,this[w].push(e)}[O](){return this[k]?--this[E]:this[E]-=this[w][0].length,this[w].shift()}[_](e=!1){do;while(this[v](this[O]())&&this[w].length);!e&&!this[w].length&&!this[u]&&this.emit(`drain`)}[v](e){return this.emit(`data`,e),this[x]}pipe(e,t){if(this[A])return e;this[B]=!1;let n=this[f];return t=t||{},e===a.stdout||e===a.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[T].push(t.proxyErrors?new K(this,e,t):new ee(this,e,t)),this[F]?V(()=>this[C]()):this[C]()),e}unpipe(e){let t=this[T].find(t=>t.dest===e);t&&(this[T].length===1?(this[x]&&this[z]===0&&(this[x]=!1),this[T]=[]):this[T].splice(this[T].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e===`data`)this[B]=!1,this[z]++,!this[T].length&&!this[x]&&this[C]();else if(e===`readable`&&this[E]!==0)super.emit(`readable`);else if(U(e)&&this[f])super.emit(e),this.removeAllListeners(e);else if(e===`error`&&this[m]){let e=t;this[F]?V(()=>e.call(this,this[m])):e.call(this,this[m])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e===`data`&&(this[z]=this.listeners(`data`).length,this[z]===0&&!this[B]&&!this[T].length&&(this[x]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e===`data`||e===void 0)&&(this[z]=0,!this[B]&&!this[T].length&&(this[x]=!1)),t}get emittedEnd(){return this[f]}[d](){!this[p]&&!this[f]&&!this[A]&&this[w].length===0&&this[u]&&(this[p]=!0,this.emit(`end`),this.emit(`prefinish`),this.emit(`finish`),this[h]&&this.emit(`close`),this[p]=!1)}emit(e,...t){let n=t[0];if(e!==`error`&&e!==`close`&&e!==A&&this[A])return!1;if(e===`data`)return!this[k]&&!n?!1:this[F]?(V(()=>this[M](n)),!0):this[M](n);if(e===`end`)return this[N]();if(e===`close`){if(this[h]=!0,!this[f]&&!this[A])return!1;let e=super.emit(`close`);return this.removeAllListeners(`close`),e}else if(e===`error`){this[m]=n,super.emit(j,n);let e=!this[R]||this.listeners(`error`).length?super.emit(`error`,n):!1;return this[d](),e}else if(e===`resume`){let e=super.emit(`resume`);return this[d](),e}else if(e===`finish`||e===`prefinish`){let t=super.emit(e);return this.removeAllListeners(e),t}let r=super.emit(e,...t);return this[d](),r}[M](e){for(let t of this[T])t.dest.write(e)===!1&&this.pause();let t=!this[B]&&super.emit(`data`,e);return this[d](),t}[N](){return this[f]?!1:(this[f]=!0,this.readable=!1,this[F]?(V(()=>this[P]()),!0):this[P]())}[P](){if(this[b]){let e=this[b].end();if(e){for(let t of this[T])t.dest.write(e);this[B]||super.emit(`data`,e)}}for(let e of this[T])e.end();let e=super.emit(`end`);return this.removeAllListeners(`end`),e}async collect(){let e=Object.assign([],{dataLength:0});this[k]||(e.dataLength=0);let t=this.promise();return this.on(`data`,t=>{e.push(t),this[k]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[k])throw Error(`cannot concat in objectMode`);let e=await this.collect();return this[y]?e.join(``):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(A,()=>t(Error(`stream destroyed`))),this.on(`error`,e=>t(e)),this.on(`end`,()=>e())})}[n](){this[B]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let n=this.read();if(n!==null)return Promise.resolve({done:!1,value:n});if(this[u])return t();let r,i,a=e=>{this.off(`data`,o),this.off(`end`,s),this.off(A,c),t(),i(e)},o=e=>{this.off(`error`,a),this.off(`end`,s),this.off(A,c),this.pause(),r({value:e,done:!!this[u]})},s=()=>{this.off(`error`,a),this.off(`data`,o),this.off(A,c),t(),r({done:!0,value:void 0})},c=()=>a(Error(`stream destroyed`));return new Promise((e,t)=>{i=t,r=e,this.once(A,c),this.once(`error`,a),this.once(`end`,s),this.once(`data`,o)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[r](){this[B]=!1;let e=!1,t=()=>(this.pause(),this.off(j,t),this.off(A,t),this.off(`end`,t),e=!0,{done:!0,value:void 0});return this.once(`end`,t),this.once(j,t),this.once(A,t),{next:()=>{if(e)return t();let n=this.read();return n===null?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[A])return e?this.emit(`error`,e):this.emit(A),this;this[A]=!0,this[B]=!0,this[w].length=0,this[E]=0;let t=this;return typeof t.close==`function`&&!this[h]&&t.close(),e?this.emit(`error`,e):this.emit(A),this}static get isStream(){return e.isStream}});e.Minipass=ne}),T=n(e=>{var n,r,i,a,c,l,u,d,h,_,v,y,b,x,S,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,ee;let K,q;var te=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),ne=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),re=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&te(t,e,n);return ne(t,e),t};Object.defineProperty(e,"__esModule",{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;var ie=C(),ae=t(`node:path`),oe=t(`node:url`),se=t(`fs`),J=re(t(`node:fs`)),ce=se.realpathSync.native,le=t(`node:fs/promises`),ue=w(),Y={lstatSync:se.lstatSync,readdir:se.readdir,readdirSync:se.readdirSync,readlinkSync:se.readlinkSync,realpathSync:ce,promises:{lstat:le.lstat,readdir:le.readdir,readlink:le.readlink,realpath:le.realpath}},de=e=>!e||e===Y||e===J?Y:{...Y,...e,promises:{...Y.promises,...e.promises||{}}},fe=/^\\\\\?\\([a-z]:)\\?$/i,pe=e=>e.replace(/\//g,`\\`).replace(fe,`$1\\`),me=/[\\\/]/,X=0,he=1,ge=2,Z=4,_e=6,ve=8,ye=10,be=12,Q=15,xe=~Q,Se=16,Ce=32,we=64,$=128,Te=256,Ee=512,De=we|$|Ee,Oe=1023,ke=e=>e.isFile()?ve:e.isDirectory()?Z:e.isSymbolicLink()?ye:e.isCharacterDevice()?ge:e.isBlockDevice()?_e:e.isSocket()?be:e.isFIFO()?he:X,Ae=new ie.LRUCache({max:2**12}),je=e=>{let t=Ae.get(e);if(t)return t;let n=e.normalize(`NFKD`);return Ae.set(e,n),n},Me=new ie.LRUCache({max:2**12}),Ne=e=>{let t=Me.get(e);if(t)return t;let n=je(e.toLowerCase());return Me.set(e,n),n},Pe=class extends ie.LRUCache{constructor(){super({max:256})}};e.ResolveCache=Pe;var Fe=class extends ie.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:e=>e.length+1})}};e.ChildrenCache=Fe;var Ie=Symbol(`PathScurry setAsCwd`),Le=(n=new WeakMap,r=new WeakMap,i=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,h=new WeakMap,_=new WeakMap,v=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,S=new WeakMap,T=new WeakMap,E=new WeakMap,D=new WeakMap,O=new WeakMap,k=new WeakMap,A=new WeakMap,j=new WeakMap,M=new WeakMap,N=new WeakMap,P=new WeakMap,F=new WeakMap,I=new WeakMap,L=new WeakMap,R=new WeakMap,z=new WeakSet,B=new WeakMap,V=new WeakMap,H=new WeakMap,class{get dev(){return f(r,this)}get mode(){return f(i,this)}get nlink(){return f(a,this)}get uid(){return f(c,this)}get gid(){return f(l,this)}get rdev(){return f(u,this)}get blksize(){return f(d,this)}get ino(){return f(h,this)}get size(){return f(_,this)}get blocks(){return f(v,this)}get atimeMs(){return f(y,this)}get mtimeMs(){return f(b,this)}get ctimeMs(){return f(x,this)}get birthtimeMs(){return f(S,this)}get atime(){return f(T,this)}get mtime(){return f(E,this)}get ctime(){return f(D,this)}get birthtime(){return f(O,this)}get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=X,s,C,w,U,W){g(this,z),o(this,`name`,void 0),o(this,`root`,void 0),o(this,`roots`,void 0),o(this,`parent`,void 0),o(this,`nocase`,void 0),o(this,`isCWD`,!1),p(this,n,void 0),p(this,r,void 0),p(this,i,void 0),p(this,a,void 0),p(this,c,void 0),p(this,l,void 0),p(this,u,void 0),p(this,d,void 0),p(this,h,void 0),p(this,_,void 0),p(this,v,void 0),p(this,y,void 0),p(this,b,void 0),p(this,x,void 0),p(this,S,void 0),p(this,T,void 0),p(this,E,void 0),p(this,D,void 0),p(this,O,void 0),p(this,k,void 0),p(this,A,void 0),p(this,j,void 0),p(this,M,void 0),p(this,N,void 0),p(this,P,void 0),p(this,F,void 0),p(this,I,void 0),p(this,L,void 0),p(this,R,void 0),p(this,B,[]),p(this,V,!1),p(this,H,void 0),this.name=e,m(k,this,w?Ne(e):je(e)),m(F,this,t&Oe),this.nocase=w,this.roots=C,this.root=s||this,m(I,this,U),m(j,this,W.fullpath),m(N,this,W.relative),m(P,this,W.relativePosix),this.parent=W.parent,this.parent?m(n,this,f(n,this.parent)):m(n,this,de(W.fs))}depth(){return f(A,this)===void 0?this.parent?m(A,this,this.parent.depth()+1):m(A,this,0):f(A,this)}childrenCache(){return f(I,this)}resolve(e){var t;if(!e)return this;let n=this.getRootString(e),r=e.substring(n.length).split(this.splitSep);return n?s(z,t=this.getRoot(n),Re).call(t,r):s(z,this,Re).call(this,r)}children(){let e=f(I,this).get(this);if(e)return e;let t=Object.assign([],{provisional:0});return f(I,this).set(this,t),m(F,this,f(F,this)&~Se),t}child(e,t){if(e===``||e===`.`)return this;if(e===`..`)return this.parent||this;let n=this.children(),r=this.nocase?Ne(e):je(e);for(let e of n)if(f(k,e)===r)return e;let i=this.parent?this.sep:``,a=f(j,this)?f(j,this)+i+e:void 0,o=this.newChild(e,X,{...t,parent:this,fullpath:a});return this.canReaddir()||m(F,o,f(F,o)|$),n.push(o),o}relative(){if(this.isCWD)return``;if(f(N,this)!==void 0)return f(N,this);let e=this.name,t=this.parent;if(!t)return m(N,this,this.name);let n=t.relative();return n+(!n||!t.parent?``:this.sep)+e}relativePosix(){if(this.sep===`/`)return this.relative();if(this.isCWD)return``;if(f(P,this)!==void 0)return f(P,this);let e=this.name,t=this.parent;if(!t)return m(P,this,this.fullpathPosix());let n=t.relativePosix();return n+(!n||!t.parent?``:`/`)+e}fullpath(){if(f(j,this)!==void 0)return f(j,this);let e=this.name,t=this.parent;if(!t)return m(j,this,this.name);let n=t.fullpath()+(t.parent?this.sep:``)+e;return m(j,this,n)}fullpathPosix(){if(f(M,this)!==void 0)return f(M,this);if(this.sep===`/`)return m(M,this,this.fullpath());if(!this.parent){let e=this.fullpath().replace(/\\/g,`/`);return/^[a-z]:\//i.test(e)?m(M,this,`//?/${e}`):m(M,this,e)}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?``:`/`)+this.name;return m(M,this,n)}isUnknown(){return(f(F,this)&Q)===X}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?`Unknown`:this.isDirectory()?`Directory`:this.isFile()?`File`:this.isSymbolicLink()?`SymbolicLink`:this.isFIFO()?`FIFO`:this.isCharacterDevice()?`CharacterDevice`:this.isBlockDevice()?`BlockDevice`:this.isSocket()?`Socket`:`Unknown`}isFile(){return(f(F,this)&Q)===ve}isDirectory(){return(f(F,this)&Q)===Z}isCharacterDevice(){return(f(F,this)&Q)===ge}isBlockDevice(){return(f(F,this)&Q)===_e}isFIFO(){return(f(F,this)&Q)===he}isSocket(){return(f(F,this)&Q)===be}isSymbolicLink(){return(f(F,this)&ye)===ye}lstatCached(){return f(F,this)&Ce?this:void 0}readlinkCached(){return f(L,this)}realpathCached(){return f(R,this)}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(f(L,this))return!0;if(!this.parent)return!1;let e=f(F,this)&Q;return!(e!==X&&e!==ye||f(F,this)&Te||f(F,this)&$)}calledReaddir(){return!!(f(F,this)&Se)}isENOENT(){return!!(f(F,this)&$)}isNamed(e){return this.nocase?f(k,this)===Ne(e):f(k,this)===je(e)}async readlink(){let e=f(L,this);if(e)return e;if(this.canReadlink()&&this.parent)try{let e=await f(n,this).promises.readlink(this.fullpath()),t=(await this.parent.realpath())?.resolve(e);if(t)return m(L,this,t)}catch(e){s(z,this,Ke).call(this,e.code);return}}readlinkSync(){let e=f(L,this);if(e)return e;if(this.canReadlink()&&this.parent)try{let e=f(n,this).readlinkSync(this.fullpath()),t=this.parent.realpathSync()?.resolve(e);if(t)return m(L,this,t)}catch(e){s(z,this,Ke).call(this,e.code);return}}async lstat(){if((f(F,this)&$)===0)try{return s(z,this,Ze).call(this,await f(n,this).promises.lstat(this.fullpath())),this}catch(e){s(z,this,Ge).call(this,e.code)}}lstatSync(){if((f(F,this)&$)===0)try{return s(z,this,Ze).call(this,f(n,this).lstatSync(this.fullpath())),this}catch(e){s(z,this,Ge).call(this,e.code)}}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let r=this.children();if(this.calledReaddir()){let n=r.slice(0,r.provisional);t?e(null,n):queueMicrotask(()=>e(null,n));return}if(f(B,this).push(e),f(V,this))return;m(V,this,!0);let i=this.fullpath();f(n,this).readdir(i,{withFileTypes:!0},(e,t)=>{if(e)s(z,this,We).call(this,e.code),r.provisional=0;else{for(let e of t)s(z,this,qe).call(this,e,r);s(z,this,ze).call(this,r)}s(z,this,Qe).call(this,r.slice(0,r.provisional))})}async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(f(H,this))await f(H,this);else{let r=()=>{};m(H,this,new Promise(e=>r=e));try{for(let r of await f(n,this).promises.readdir(t,{withFileTypes:!0}))s(z,this,qe).call(this,r,e);s(z,this,ze).call(this,e)}catch(t){s(z,this,We).call(this,t.code),e.provisional=0}m(H,this,void 0),r()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let r of f(n,this).readdirSync(t,{withFileTypes:!0}))s(z,this,qe).call(this,r,e);s(z,this,ze).call(this,e)}catch(t){s(z,this,We).call(this,t.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(f(F,this)&De)return!1;let e=Q&f(F,this);return e===X||e===Z||e===ye}shouldWalk(e,t){return(f(F,this)&Z)===Z&&!(f(F,this)&De)&&!e.has(this)&&(!t||t(this))}async realpath(){if(f(R,this))return f(R,this);if(!((Ee|Te|$)&f(F,this)))try{let e=await f(n,this).promises.realpath(this.fullpath());return m(R,this,this.resolve(e))}catch{s(z,this,He).call(this)}}realpathSync(){if(f(R,this))return f(R,this);if(!((Ee|Te|$)&f(F,this)))try{let e=f(n,this).realpathSync(this.fullpath());return m(R,this,this.resolve(e))}catch{s(z,this,He).call(this)}}[Ie](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),m(N,r,n.join(this.sep)),m(P,r,n.join(`/`)),r=r.parent,n.push(`..`);for(r=e;r&&r.parent&&!t.has(r);)m(N,r,void 0),m(P,r,void 0),r=r.parent}});function Re(e){let t=this;for(let n of e)t=t.child(n);return t}function ze(e){m(F,this,f(F,this)|Se);for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&s(z,n,Be).call(n)}}function Be(){f(F,this)&$||(m(F,this,(f(F,this)|$)&xe),s(z,this,Ve).call(this))}function Ve(){let e=this.children();e.provisional=0;for(let t of e)s(z,t,Be).call(t)}function He(){m(F,this,f(F,this)|Ee),s(z,this,Ue).call(this)}function Ue(){if(f(F,this)&we)return;let e=f(F,this);(e&Q)===Z&&(e&=xe),m(F,this,e|we),s(z,this,Ve).call(this)}function We(e=``){e===`ENOTDIR`||e===`EPERM`?s(z,this,Ue).call(this):e===`ENOENT`?s(z,this,Be).call(this):this.children().provisional=0}function Ge(e=``){var t;e===`ENOTDIR`?s(z,t=this.parent,Ue).call(t):e===`ENOENT`&&s(z,this,Be).call(this)}function Ke(e=``){var t;let n=f(F,this);n|=Te,e===`ENOENT`&&(n|=$),(e===`EINVAL`||e===`UNKNOWN`)&&(n&=xe),m(F,this,n),e===`ENOTDIR`&&this.parent&&s(z,t=this.parent,Ue).call(t)}function qe(e,t){return s(z,this,Ye).call(this,e,t)||s(z,this,Je).call(this,e,t)}function Je(e,t){let n=ke(e),r=this.newChild(e.name,n,{parent:this}),i=f(F,r)&Q;return i!==Z&&i!==ye&&i!==X&&m(F,r,f(F,r)|we),t.unshift(r),t.provisional++,r}function Ye(e,t){for(let n=t.provisional;n<t.length;n++){let r=t[n];if((this.nocase?Ne(e.name):je(e.name))===f(k,r))return s(z,this,Xe).call(this,e,r,n,t)}}function Xe(e,t,n,r){let i=t.name;return m(F,t,f(F,t)&xe|ke(e)),i!==e.name&&(t.name=e.name),n!==r.provisional&&(n===r.length-1?r.pop():r.splice(n,1),r.unshift(t)),r.provisional++,t}function Ze(e){let{atime:t,atimeMs:n,birthtime:o,birthtimeMs:s,blksize:p,blocks:g,ctime:C,ctimeMs:w,dev:k,gid:A,ino:j,mode:M,mtime:N,mtimeMs:P,nlink:I,rdev:L,size:R,uid:z}=e;m(T,this,t),m(y,this,n),m(O,this,o),m(S,this,s),m(d,this,p),m(v,this,g),m(D,this,C),m(x,this,w),m(r,this,k),m(l,this,A),m(h,this,j),m(i,this,M),m(E,this,N),m(b,this,P),m(a,this,I),m(u,this,L),m(_,this,R),m(c,this,z);let B=ke(e);m(F,this,f(F,this)&xe|B|Ce),B!==X&&B!==Z&&B!==ye&&m(F,this,f(F,this)|we)}function Qe(e){m(V,this,!1);let t=f(B,this).slice();f(B,this).length=0,t.forEach(t=>t(null,e))}e.PathBase=Le;var $e=class e extends Le{constructor(e,t=X,n,r,i,a,s){super(e,t,n,r,i,a,s),o(this,`sep`,`\\`),o(this,`splitSep`,me)}newChild(t,n=X,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}getRootString(e){return ae.win32.parse(e).root}getRoot(e){if(e=pe(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new nt(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,`\\`).replace(fe,`$1\\`),e===t}};e.PathWin32=$e;var et=class e extends Le{constructor(e,t=X,n,r,i,a,s){super(e,t,n,r,i,a,s),o(this,`splitSep`,`/`),o(this,`sep`,`/`)}getRootString(e){return e.startsWith(`/`)?`/`:``}getRoot(e){return this.root}newChild(t,n=X,r={}){return new e(t,n,this.root,this.roots,this.nocase,this.childrenCache(),r)}};e.PathPosix=et;var tt=(U=new WeakMap,W=new WeakMap,G=new WeakMap,ee=new WeakMap,K=Symbol.asyncIterator,q=Symbol.iterator,class{constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:i=16*1024,fs:a=Y}={}){o(this,`root`,void 0),o(this,`rootPath`,void 0),o(this,`roots`,void 0),o(this,`cwd`,void 0),p(this,U,void 0),p(this,W,void 0),p(this,G,void 0),o(this,`nocase`,void 0),p(this,ee,void 0),m(ee,this,de(a)),(e instanceof URL||e.startsWith(`file://`))&&(e=(0,oe.fileURLToPath)(e));let s=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(s),m(U,this,new Pe),m(W,this,new Pe),m(G,this,new Fe(i));let c=s.substring(this.rootPath.length).split(n);if(c.length===1&&!c[0]&&c.pop(),r===void 0)throw TypeError(`must provide nocase setting to PathScurryBase ctor`);this.nocase=r,this.root=this.newRoot(f(ee,this)),this.roots[this.rootPath]=this.root;let l=this.root,u=c.length-1,d=t.sep,h=this.rootPath,g=!1;for(let e of c){let t=u--;l=l.child(e,{relative:Array(t).fill(`..`).join(d),relativePosix:Array(t).fill(`..`).join(`/`),fullpath:h+=(g?``:d)+e}),g=!0}this.cwd=l}depth(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return f(G,this)}resolve(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=f(U,this).get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return f(U,this).set(t,r),r}resolvePosix(...e){let t=``;for(let n=e.length-1;n>=0;n--){let r=e[n];if(!(!r||r===`.`)&&(t=t?`${r}/${t}`:r,this.isAbsolute(r)))break}let n=f(W,this).get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return f(W,this).set(t,r),r}relative(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof Le||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let t=await e.readdir();return n?t:t.map(e=>e.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof Le||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(e=>e.name):[]}async lstat(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e==`string`&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof Le||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof Le||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof Le||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof Le||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof Le||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set,c=(e,t)=>{s.add(e),e.readdirCB((e,l)=>{if(e)return t(e);let u=l.length;if(!u)return t();let d=()=>{--u===0&&t()};for(let e of l)(!i||i(e))&&o.push(n?e:e.fullpath()),r&&e.isSymbolicLink()?e.realpath().then(e=>e?.isUnknown()?e.lstat():e).then(e=>e?.shouldWalk(s,a)?c(e,d):d()):e.shouldWalk(s,a)?c(e,d):d()},!0)},l=e;return new Promise((e,t)=>{c(l,n=>{if(n)return t(n);e(o)})})}walkSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof Le||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=[];(!i||i(e))&&o.push(n?e:e.fullpath());let s=new Set([e]);for(let e of s){let t=e.readdirSync();for(let e of t){(!i||i(e))&&o.push(n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&s.add(t)}}return o}[K](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e==`string`?e=this.cwd.resolve(e):e instanceof Le||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[q](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof Le||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t;(!i||i(e))&&(yield n?e:e.fullpath());let o=new Set([e]);for(let e of o){let t=e.readdirSync();for(let e of t){(!i||i(e))&&(yield n?e:e.fullpath());let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(o,a)&&o.add(t)}}}stream(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof Le||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new ue.Minipass({objectMode:!0});(!i||i(e))&&o.write(n?e:e.fullpath());let s=new Set,c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let d=(t,p,m=!1)=>{if(t)return o.emit(`error`,t);if(r&&!m){let e=[];for(let t of p)t.isSymbolicLink()&&e.push(t.realpath().then(e=>e?.isUnknown()?e.lstat():e));if(e.length){Promise.all(e).then(()=>d(null,p,!0));return}}for(let t of p)t&&(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of p){let t=e.realpathCached()||e;t.shouldWalk(s,a)&&c.push(t)}e&&!o.flowing?o.once(`drain`,u):f||u()},f=!0;t.readdirCB(d,!0),f=!1}};return u(),o}streamSync(e=this.cwd,t={}){typeof e==`string`?e=this.cwd.resolve(e):e instanceof Le||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:i,walkFilter:a}=t,o=new ue.Minipass({objectMode:!0}),s=new Set;(!i||i(e))&&o.write(n?e:e.fullpath());let c=[e],l=0,u=()=>{let e=!1;for(;!e;){let t=c.shift();if(!t){l===0&&o.end();return}l++,s.add(t);let u=t.readdirSync();for(let t of u)(!i||i(t))&&(o.write(n?t:t.fullpath())||(e=!0));l--;for(let e of u){let t=e;if(e.isSymbolicLink()){if(!(r&&(t=e.realpathSync())))continue;t.isUnknown()&&t.lstatSync()}t.shouldWalk(s,a)&&c.push(t)}}e&&!o.flowing&&o.once(`drain`,u)};return u(),o}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e==`string`?this.cwd.resolve(e):e,this.cwd[Ie](t)}});e.PathScurryBase=tt;var nt=class extends tt{constructor(e=process.cwd(),t={}){var n=(...e)=>(super(...e),o(this,`sep`,`\\`),this);let{nocase:r=!0}=t;n(e,ae.win32,`\\`,{...t,nocase:r}),this.nocase=r;for(let e=this.cwd;e;e=e.parent)e.nocase=this.nocase}parseRootPath(e){return ae.win32.parse(e).root.toUpperCase()}newRoot(e){return new $e(this.rootPath,Z,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)||e.startsWith(`\\`)||/^[a-z]:(\/|\\)/i.test(e)}};e.PathScurryWin32=nt;var rt=class extends tt{constructor(e=process.cwd(),t={}){var n=(...e)=>(super(...e),o(this,`sep`,`/`),this);let{nocase:r=!1}=t;n(e,ae.posix,`/`,{...t,nocase:r}),this.nocase=r}parseRootPath(e){return`/`}newRoot(e){return new et(this.rootPath,Z,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith(`/`)}};e.PathScurryPosix=rt;var it=class extends rt{constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}};e.PathScurryDarwin=it,e.Path=process.platform===`win32`?$e:et,e.PathScurry=process.platform===`win32`?nt:process.platform===`darwin`?it:rt}),E=n(e=>{var t,n,r,i,a,s,c,l,u,d;Object.defineProperty(e,"__esModule",{value:!0}),e.Pattern=void 0;var h=S(),g=e=>e.length>=1,_=e=>e.length>=1,v=Symbol.for(`nodejs.util.inspect.custom`);e.Pattern=(t=new WeakMap,n=new WeakMap,r=new WeakMap,i=new WeakMap,a=new WeakMap,s=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,class e{constructor(e,h,v,y){if(p(this,t,void 0),p(this,n,void 0),p(this,r,void 0),o(this,`length`,void 0),p(this,i,void 0),p(this,a,void 0),p(this,s,void 0),p(this,c,void 0),p(this,l,void 0),p(this,u,void 0),p(this,d,!0),!g(e))throw TypeError(`empty pattern list`);if(!_(h))throw TypeError(`empty glob list`);if(h.length!==e.length)throw TypeError(`mismatched pattern list and glob list lengths`);if(this.length=e.length,v<0||v>=this.length)throw TypeError(`index out of range`);if(m(t,this,e),m(n,this,h),m(r,this,v),m(i,this,y),f(r,this)===0){if(this.isUNC()){let[e,r,i,a,...o]=f(t,this),[s,c,l,u,...d]=f(n,this);o[0]===``&&(o.shift(),d.shift());let p=[e,r,i,a,``].join(`/`),h=[s,c,l,u,``].join(`/`);m(t,this,[p,...o]),m(n,this,[h,...d]),this.length=f(t,this).length}else if(this.isDrive()||this.isAbsolute()){let[e,...r]=f(t,this),[i,...a]=f(n,this);r[0]===``&&(r.shift(),a.shift());let o=e+`/`,s=i+`/`;m(t,this,[o,...r]),m(n,this,[s,...a]),this.length=f(t,this).length}}}[v](){return`Pattern <`+f(n,this).slice(f(r,this)).join(`/`)+`>`}pattern(){return f(t,this)[f(r,this)]}isString(){return typeof f(t,this)[f(r,this)]==`string`}isGlobstar(){return f(t,this)[f(r,this)]===h.GLOBSTAR}isRegExp(){return f(t,this)[f(r,this)]instanceof RegExp}globString(){return m(s,this,f(s,this)||(f(r,this)===0?this.isAbsolute()?f(n,this)[0]+f(n,this).slice(1).join(`/`):f(n,this).join(`/`):f(n,this).slice(f(r,this)).join(`/`)))}hasMore(){return this.length>f(r,this)+1}rest(){return f(a,this)===void 0?this.hasMore()?(m(a,this,new e(f(t,this),f(n,this),f(r,this)+1,f(i,this))),m(u,f(a,this),f(u,this)),m(l,f(a,this),f(l,this)),m(c,f(a,this),f(c,this)),f(a,this)):m(a,this,null):f(a,this)}isUNC(){let e=f(t,this);return f(l,this)===void 0?m(l,this,f(i,this)===`win32`&&f(r,this)===0&&e[0]===``&&e[1]===``&&typeof e[2]==`string`&&!!e[2]&&typeof e[3]==`string`&&!!e[3]):f(l,this)}isDrive(){let e=f(t,this);return f(c,this)===void 0?m(c,this,f(i,this)===`win32`&&f(r,this)===0&&this.length>1&&typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0])):f(c,this)}isAbsolute(){let e=f(t,this);return f(u,this)===void 0?m(u,this,e[0]===``&&e.length>1||this.isDrive()||this.isUNC()):f(u,this)}root(){let e=f(t,this)[0];return typeof e==`string`&&this.isAbsolute()&&f(r,this)===0?e:``}checkFollowGlobstar(){return!(f(r,this)===0||!this.isGlobstar()||!f(d,this))}markFollowGlobstar(){return f(r,this)===0||!this.isGlobstar()||!f(d,this)?!1:(m(d,this,!1),!0)}})}),D=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Ignore=void 0;var t=S(),n=E(),r=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Ignore=class{constructor(e,{nobrace:t,nocase:n,noext:i,noglobstar:a,platform:s=r}){o(this,`relative`,void 0),o(this,`relativeChildren`,void 0),o(this,`absolute`,void 0),o(this,`absoluteChildren`,void 0),o(this,`platform`,void 0),o(this,`mmopts`,void 0),this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=s,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:i,noglobstar:a,optimizationLevel:2,platform:s,nocomment:!0,nonegate:!0};for(let t of e)this.add(t)}add(e){let r=new t.Minimatch(e,this.mmopts);for(let e=0;e<r.set.length;e++){let i=r.set[e],a=r.globParts[e];if(!i||!a)throw Error(`invalid pattern object`);for(;i[0]===`.`&&a[0]===`.`;)i.shift(),a.shift();let o=new n.Pattern(i,a,0,this.platform),s=new t.Minimatch(o.globString(),this.mmopts),c=a[a.length-1]===`**`,l=o.isAbsolute();l?this.absolute.push(s):this.relative.push(s),c&&(l?this.absoluteChildren.push(s):this.relativeChildren.push(s))}}ignored(e){let t=e.fullpath(),n=`${t}/`,r=e.relative()||`.`,i=`${r}/`;for(let e of this.relative)if(e.match(r)||e.match(i))return!0;for(let e of this.absolute)if(e.match(t)||e.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+`/`,n=(e.relative()||`.`)+`/`;for(let e of this.relativeChildren)if(e.match(n))return!0;for(let e of this.absoluteChildren)if(e.match(t))return!0;return!1}}}),O=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;var t=S(),n=class e{constructor(e=new Map){o(this,`store`,void 0),this.store=e}copy(){return new e(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,new Set([t.globString()]))}};e.HasWalkedCache=n;var r=class{constructor(){o(this,`store`,new Map)}add(e,t,n){let r=(t?2:0)|!!n,i=this.store.get(e);this.store.set(e,i===void 0?r:r&i)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}};e.MatchRecord=r;var i=class{constructor(){o(this,`store`,new Map)}add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(e=>e.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw Error(`attempting to walk unknown path`);return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};e.SubWalks=i,e.Processor=class e{constructor(e,t){o(this,`hasWalkedCache`,void 0),o(this,`matches`,new r),o(this,`subwalks`,new i),o(this,`patterns`,void 0),o(this,`follow`,void 0),o(this,`dot`,void 0),o(this,`opts`,void 0),this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new n}processPatterns(e,n){this.patterns=n;let r=n.map(t=>[e,t]);for(let[e,n]of r){this.hasWalkedCache.storeWalked(e,n);let r=n.root(),i=n.isAbsolute()&&this.opts.absolute!==!1;if(r){e=e.resolve(r===`/`&&this.opts.root!==void 0?this.opts.root:r);let t=n.rest();if(t)n=t;else{this.matches.add(e,!0,!1);continue}}if(e.isENOENT())continue;let a,o,s=!1;for(;typeof(a=n.pattern())==`string`&&(o=n.rest());)e=e.resolve(a),n=o,s=!0;if(a=n.pattern(),o=n.rest(),s){if(this.hasWalkedCache.hasWalked(e,n))continue;this.hasWalkedCache.storeWalked(e,n)}if(typeof a==`string`){let t=a===`..`||a===``||a===`.`;this.matches.add(e.resolve(a),i,t);continue}else if(a===t.GLOBSTAR){(!e.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(e,n);let t=o?.pattern(),r=o?.rest();if(!o||(t===``||t===`.`)&&!r)this.matches.add(e,i,t===``||t===`.`);else if(t===`..`){let t=e.parent||e;r?this.hasWalkedCache.hasWalked(t,r)||this.subwalks.add(t,r):this.matches.add(t,i,!0)}}else a instanceof RegExp&&this.subwalks.add(e,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new e(this.opts,this.hasWalkedCache)}filterEntries(e,n){let r=this.subwalks.get(e),i=this.child();for(let e of n)for(let n of r){let r=n.isAbsolute(),a=n.pattern(),o=n.rest();a===t.GLOBSTAR?i.testGlobstar(e,n,o,r):a instanceof RegExp?i.testRegExp(e,a,o,r):i.testString(e,a,o,r)}return i}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith(`.`))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let t=n.pattern();if(typeof t==`string`&&t!==`..`&&t!==``&&t!==`.`)this.testString(e,t,n.rest(),r);else if(t===`..`){let t=e.parent||e;this.subwalks.add(t,n)}else t instanceof RegExp&&this.testRegExp(e,t,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}}}),k=n(e=>{var t,n,r,i;Object.defineProperty(e,"__esModule",{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;var a=w(),c=D(),l=O(),u=(e,t)=>typeof e==`string`?new c.Ignore([e],t):Array.isArray(e)?new c.Ignore(e,t):e,d=(t=new WeakMap,n=new WeakMap,r=new WeakMap,i=new WeakSet,class{constructor(e,a,s){if(g(this,i),o(this,`path`,void 0),o(this,`patterns`,void 0),o(this,`opts`,void 0),o(this,`seen`,new Set),o(this,`paused`,!1),o(this,`aborted`,!1),p(this,t,[]),p(this,n,void 0),p(this,r,void 0),o(this,`signal`,void 0),o(this,`maxDepth`,void 0),o(this,`includeChildMatches`,void 0),this.patterns=e,this.path=a,this.opts=s,m(r,this,!s.posix&&s.platform===`win32`?`\\`:`/`),this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(m(n,this,u(s.ignore??[],s)),!this.includeChildMatches&&typeof f(n,this).add!=`function`))throw Error(`cannot ignore child matches, ignore lacks add() method.`);this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener(`abort`,()=>{f(t,this).length=0}))}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=f(t,this).shift());)e()}onResume(e){this.signal?.aborted||(this.paused?f(t,this).push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=await r.realpath();e&&(e.isUnknown()||this.opts.stat)&&await e.lstat()}return this.matchCheckTest(r,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!s(i,this,h).call(this,e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let r=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let e=r.realpathSync();e&&(e?.isUnknown()||this.opts.stat)&&e.lstatSync()}return this.matchCheckTest(r,t)}matchFinish(e,t){if(s(i,this,h).call(this,e))return;if(!this.includeChildMatches&&f(n,this)?.add){let t=`${e.relativePosix()}/**`;f(n,this).add(t)}let a=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let o=this.opts.mark&&e.isDirectory()?f(r,this):``;if(this.opts.withFileTypes)this.matchEmit(e);else if(a){let t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+o)}else{let t=this.opts.posix?e.relativePosix():e.relative(),n=this.opts.dotRelative&&!t.startsWith(`..`+f(r,this))?`.`+f(r,this):``;this.matchEmit(t?n+t+o:`.`+o)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new l.Processor(this.opts),n)}walkCB2(e,t,n,r){if(s(i,this,_).call(this,e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let a=1,o=()=>{--a===0&&r()};for(let[e,t,r]of n.matches.entries())s(i,this,h).call(this,e)||(a++,this.match(e,t,r).then(()=>o()));for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;a++;let t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,n,o):e.readdirCB((t,r)=>this.walkCB3(e,r,n,o),!0)}o()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let a=1,o=()=>{--a===0&&r()};for(let[e,t,r]of n.matches.entries())s(i,this,h).call(this,e)||(a++,this.match(e,t,r).then(()=>o()));for(let[e,t]of n.subwalks.entries())a++,this.walkCB2(e,t,n.child(),o);o()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new l.Processor(this.opts),n)}walkCB2Sync(e,t,n,r){if(s(i,this,_).call(this,e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let a=1,o=()=>{--a===0&&r()};for(let[e,t,r]of n.matches.entries())s(i,this,h).call(this,e)||this.matchSync(e,t,r);for(let e of n.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;a++;let t=e.readdirSync();this.walkCB3Sync(e,t,n,o)}o()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let a=1,o=()=>{--a===0&&r()};for(let[e,t,r]of n.matches.entries())s(i,this,h).call(this,e)||this.matchSync(e,t,r);for(let[e,t]of n.subwalks.entries())a++,this.walkCB2Sync(e,t,n.child(),o);o()}});function h(e){return this.seen.has(e)||!!f(n,this)?.ignored?.(e)}function _(e){return!!f(n,this)?.childrenIgnored?.(e)}e.GlobUtil=d,e.GlobWalker=class extends d{constructor(e,t,n){super(e,t,n),o(this,`matches`,new Set)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},e.GlobStream=class extends d{constructor(e,t,n){((...e)=>(super(...e),o(this,`results`,void 0),this))(e,t,n),this.results=new a.Minipass({signal:this.signal,objectMode:!0}),this.results.on(`drain`,()=>this.resume()),this.results.on(`resume`,()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}}),A=n(e=>{let n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.Glob=void 0;var i=S(),a=t(`node:url`),s=T(),c=E(),l=k(),u=typeof process==`object`&&process&&typeof process.platform==`string`?process.platform:`linux`;e.Glob=(n=Symbol.iterator,r=Symbol.asyncIterator,class{constructor(e,t){if(o(this,`absolute`,void 0),o(this,`cwd`,void 0),o(this,`root`,void 0),o(this,`dot`,void 0),o(this,`dotRelative`,void 0),o(this,`follow`,void 0),o(this,`ignore`,void 0),o(this,`magicalBraces`,void 0),o(this,`mark`,void 0),o(this,`matchBase`,void 0),o(this,`maxDepth`,void 0),o(this,`nobrace`,void 0),o(this,`nocase`,void 0),o(this,`nodir`,void 0),o(this,`noext`,void 0),o(this,`noglobstar`,void 0),o(this,`pattern`,void 0),o(this,`platform`,void 0),o(this,`realpath`,void 0),o(this,`scurry`,void 0),o(this,`stat`,void 0),o(this,`signal`,void 0),o(this,`windowsPathsNoEscape`,void 0),o(this,`withFileTypes`,void 0),o(this,`includeChildMatches`,void 0),o(this,`opts`,void 0),o(this,`patterns`,void 0),!t)throw TypeError(`glob options required`);if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith(`file://`))&&(t.cwd=(0,a.fileURLToPath)(t.cwd)):this.cwd=``,this.cwd=t.cwd||``,this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth==`number`?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw Error(`cannot set absolute and withFileTypes:true`);if(typeof e==`string`&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(e=>e.replace(/\\/g,`/`))),this.matchBase){if(t.noglobstar)throw TypeError(`base matching requires globstar`);e=e.map(e=>e.includes(`/`)?e:`./**/${e}`)}if(this.pattern=e,this.platform=t.platform||u,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw Error(`nocase option contradicts provided scurry option`)}else{let e=t.platform===`win32`?s.PathScurryWin32:t.platform===`darwin`?s.PathScurryDarwin:t.platform?s.PathScurryPosix:s.PathScurry;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let n=this.platform===`darwin`||this.platform===`win32`,r={braceExpandMax:1e4,...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},[l,d]=this.pattern.map(e=>new i.Minimatch(e,r)).reduce((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e),[[],[]]);this.patterns=l.map((e,t)=>{let n=d[t];if(!n)throw Error(`invalid pattern object`);return new c.Pattern(e,n,0,this.platform)})}async walk(){return[...await new l.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new l.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new l.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new l.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth===1/0?1/0:this.maxDepth+this.scurry.cwd.depth(),platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[n](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[r](){return this.iterate()}})}),j=n(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.hasMagic=void 0;var t=S();e.hasMagic=(e,n={})=>{Array.isArray(e)||(e=[e]);for(let r of e)if(new t.Minimatch(r,n).hasMagic())return!0;return!1}});Object.defineProperty(e,"__esModule",{value:!0}),e.glob=e.sync=e.iterate=e.iterateSync=e.stream=e.streamSync=e.Ignore=e.hasMagic=e.Glob=e.unescape=e.escape=void 0,e.globStreamSync=z,e.globStream=B,e.globSync=V,e.globIterateSync=U,e.globIterate=W;var M=S(),N=A(),P=j(),F=S();Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return F.escape}}),Object.defineProperty(e,"unescape",{enumerable:!0,get:function(){return F.unescape}});var I=A();Object.defineProperty(e,"Glob",{enumerable:!0,get:function(){return I.Glob}});var L=j();Object.defineProperty(e,"hasMagic",{enumerable:!0,get:function(){return L.hasMagic}});var R=D();Object.defineProperty(e,"Ignore",{enumerable:!0,get:function(){return R.Ignore}});function z(e,t={}){return new N.Glob(e,t).streamSync()}function B(e,t={}){return new N.Glob(e,t).stream()}function V(e,t={}){return new N.Glob(e,t).walkSync()}async function H(e,t={}){return new N.Glob(e,t).walk()}function U(e,t={}){return new N.Glob(e,t).iterateSync()}function W(e,t={}){return new N.Glob(e,t).iterate()}e.streamSync=z,e.stream=Object.assign(B,{sync:z}),e.iterateSync=U,e.iterate=Object.assign(W,{sync:U}),e.sync=Object.assign(V,{stream:z,iterate:U}),e.glob=Object.assign(H,{glob:H,globSync:V,sync:e.sync,globStream:B,stream:e.stream,globStreamSync:z,streamSync:e.streamSync,globIterate:W,iterate:e.iterate,globIterateSync:U,iterateSync:e.iterateSync,Glob:N.Glob,hasMagic:P.hasMagic,escape:M.escape,unescape:M.unescape}),e.glob.glob=e.glob})),fe=i(((e,n)=>{var{glob:r}=de(),i=t(`path`),a=e=>e.split(i.win32.sep).join(i.posix.sep);n.exports=(e,t)=>r(a(e),t)})),pe=i(((e,n)=>{var r=t(`fs/promises`),i=re(),{hasContent:a}=J();n.exports=o;async function o(e,t){let n=await a(e,t);return n&&n.sri?(await r.rm(i(e,n.sri),{recursive:!0,force:!0}),!0):!1}})),me=i(((e,n)=>{var{rm:r}=t(`fs/promises`),i=fe(),a=ie(),o=oe(),s=t(`path`),c=pe();n.exports=l,n.exports.entry=l;function l(e,t,n){return o.clearMemoized(),a.delete(e,t,n)}n.exports.content=u;function u(e,t){return o.clearMemoized(),c(e,t)}n.exports.all=d;async function d(e){o.clearMemoized();let t=await i(s.join(e,`*(content-*|index-*)`),{silent:!0,nosort:!0});return Promise.all(t.map(e=>r(e,{recursive:!0,force:!0})))}})),X=i(((e,n)=>{var{mkdir:r,readFile:i,rm:a,stat:o,truncate:s,writeFile:c}=t(`fs/promises`),l=re(),u=se(),d=fe(),f=ie(),p=t(`path`),m=S(),h=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),g=e=>({concurrency:20,log:{silly(){}},...e});n.exports=_;async function _(e,t){t=g(t),t.log.silly(`verify`,`verifying cache at`,e);let n=[v,b,x,w,E,D,y],r={};for(let i of n){let n=i.name,a=new Date,o=await i(e,t);o&&Object.keys(o).forEach(e=>{r[e]=o[e]});let s=new Date;r.runTime||(r.runTime={}),r.runTime[n]=s-a}return r.runTime.total=r.endTime-r.startTime,t.log.silly(`verify`,`verification finished for`,e,`in`,`${r.runTime.total}ms`),r}async function v(){return{startTime:new Date}}async function y(){return{endTime:new Date}}async function b(e,t){return t.log.silly(`verify`,`fixing cache permissions`),await r(e,{recursive:!0}),null}async function x(e,t){t.log.silly(`verify`,`garbage collecting content`);let{default:n}=await import(`./p-map-B1EeBuI8.js`),r=f.lsStream(e),i=new Set;r.on(`data`,e=>{if(t.filter&&!t.filter(e))return;let n=m.parse(e.integrity);for(let e in n)i.add(n[e].toString())}),await new Promise((e,t)=>{r.on(`end`,e).on(`error`,t)});let s=l.contentDir(e),c=await d(p.join(s,`**`),{follow:!1,nodir:!0,nosort:!0}),u={verifiedContent:0,reclaimedCount:0,reclaimedSize:0,badContentCount:0,keptSize:0};return await n(c,async e=>{let t=e.split(/[/\\]/),n=t.slice(t.length-3).join(``),r=t[t.length-4],s=m.fromHex(n,r);if(i.has(s.toString())){let t=await C(e,s);t.valid?(u.verifiedContent++,u.keptSize+=t.size):(u.reclaimedCount++,u.badContentCount++,u.reclaimedSize+=t.size)}else{u.reclaimedCount++;let t=await o(e);await a(e,{recursive:!0,force:!0}),u.reclaimedSize+=t.size}return u},{concurrency:t.concurrency}),u}async function C(e,t){let n={};try{let{size:r}=await o(e);n.size=r,n.valid=!0,await m.checkStream(new u.ReadStream(e),t)}catch(t){if(t.code===`ENOENT`)return{size:0,valid:!1};if(t.code!==`EINTEGRITY`)throw t;await a(e,{recursive:!0,force:!0}),n.valid=!1}return n}async function w(e,t){t.log.silly(`verify`,`rebuilding index`);let{default:n}=await import(`./p-map-B1EeBuI8.js`),r=await f.ls(e),i={missingContent:0,rejectedEntries:0,totalEntries:0},a={};for(let n in r)if(h(r,n)){let o=f.hashKey(n),s=r[n],c=t.filter&&!t.filter(s);c&&i.rejectedEntries++,a[o]&&!c?a[o].push(s):a[o]&&c||(c?(a[o]=[],a[o]._path=f.bucketPath(e,n)):(a[o]=[s],a[o]._path=f.bucketPath(e,n)))}return await n(Object.keys(a),n=>T(e,a[n],i,t),{concurrency:t.concurrency}),i}async function T(e,t,n){await s(t._path);for(let r of t){let t=l(e,r.integrity);try{await o(t),await f.insert(e,r.key,r.integrity,{metadata:r.metadata,size:r.size,time:r.time}),n.totalEntries++}catch(e){if(e.code===`ENOENT`)n.rejectedEntries++,n.missingContent++;else throw e}}}function E(e,t){return t.log.silly(`verify`,`cleaning tmp directory`),a(p.join(e,`tmp`),{recursive:!0,force:!0})}async function D(e,t){let n=p.join(e,`_lastverified`);return t.log.silly(`verify`,`writing verifile to `+n),c(n,`${Date.now()}`)}n.exports.lastRun=O;async function O(e){let t=await i(p.join(e,`_lastverified`),{encoding:`utf8`});return new Date(+t)}})),he=i(((e,t)=>{var n=ce(),r=Y(),i=me(),a=X(),{clearMemoized:o}=oe(),s=M(),c=ie();t.exports.index={},t.exports.index.compact=c.compact,t.exports.index.insert=c.insert,t.exports.ls=c.ls,t.exports.ls.stream=c.lsStream,t.exports.get=n,t.exports.get.byDigest=n.byDigest,t.exports.get.stream=n.stream,t.exports.get.stream.byDigest=n.stream.byDigest,t.exports.get.copy=n.copy,t.exports.get.copy.byDigest=n.copy.byDigest,t.exports.get.info=n.info,t.exports.get.hasContent=n.hasContent,t.exports.put=r,t.exports.put.stream=r.stream,t.exports.rm=i.entry,t.exports.rm.all=i.all,t.exports.rm.entry=t.exports.rm,t.exports.rm.content=i.content,t.exports.clearMemoized=o,t.exports.tmp={},t.exports.tmp.mkdir=s.mkdir,t.exports.tmp.withTmp=s.withTmp,t.exports.verify=a,t.exports.verify.lastRun=a.lastRun}));export default he();export{};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e,t}from"./loadAgentsDir-x3rlgED4.js";e();export{t as clearAgentDefinitionsCache};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ky as e,Uy as t,Wy as n}from"./loadAgentsDir-x3rlgED4.js";t();export{n as loadPluginHooks,e as setupPluginHookHotReload};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,c as t,o as n,t as r}from"./localSearch-DtplGF-l.js";n();export{r as clearSkillIndexCache,e as getSkillIndex,t as searchSkills};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{n as t,t as n}from"./memoize-BK3gG5ob.js";import{l as r,o as i}from"./envUtils-DSxRz_kt.js";import{Fn as ee,In as te,en as ne}from"./state-ix0xIunV.js";import{S as re,U as ie,W as ae,d as a,p as oe,z as se}from"./debug-BrXObCdR.js";import{i as ce,t as le}from"./hash-Tu-My5Vp.js";import{join as o}from"path";import s from"node:process";import c from"node:path";import l from"node:os";import"fs/promises";var u,d,ue,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,de,P,F,I,L=e((()=>{u=`command-name`,d=`command-message`,ue=`command-args`,f=`bash-input`,p=`bash-stdout`,m=`bash-stderr`,h=`local-command-stdout`,g=`local-command-stderr`,_=`local-command-caveat`,v=[f,p,m,h,g,_],y=`tick`,b=`task-notification`,x=`task-id`,S=`tool-use-id`,C=`task-type`,w=`output-file`,T=`status`,E=`summary`,D=`worktree`,O=`worktreePath`,k=`worktreeBranch`,A=`ultraplan`,j=`remote-review`,M=`remote-review-progress`,N=`cross-session-message`,de=`fork-boilerplate`,P=`Your directive: `,F=[`help`,`-h`,`--help`],I=[`list`,`show`,`display`,`current`,`view`,`get`,`check`,`describe`,`print`,`version`,`about`,`status`,`?`]}));function fe(e){if(typeof e!=`string`)return!1;let t=e.trim();return t!==``&&t!==`.`&&t!==`..`&&!e.includes(`/`)&&!e.includes(`\\`)&&!e.includes(`\0`)}function R(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);if(!fe(e))throw Error(`Unsafe filename: ${JSON.stringify(e)}`)}var pe=e((()=>{Object.freeze([``,` `,`.`,`..`,` .`,`. `,` ..`,`.. `,`../`,`../foo`,`foo/../bar`,`foo/bar`,`foo\\bar`,`foo\0bar`])}));function me(e,{suffix:t=`nodejs`}={}){return R(e),t&&(e+=`-${t}`),R(e),s.platform===`darwin`?H(e):s.platform===`win32`?U(e):W(e)}var z,B,V,H,U,W,he=e((()=>{pe(),z=l.homedir(),B=l.tmpdir(),{env:V}=s,H=e=>{let t=c.join(z,`Library`);return{data:c.join(t,`Application Support`,e),config:c.join(t,`Preferences`,e),cache:c.join(t,`Caches`,e),log:c.join(t,`Logs`,e),temp:c.join(B,e)}},U=e=>{let t=V.APPDATA||c.join(z,`AppData`,`Roaming`),n=V.LOCALAPPDATA||c.join(z,`AppData`,`Local`);return{data:c.join(n,e,`Data`),config:c.join(t,e,`Config`),cache:c.join(n,e,`Cache`),log:c.join(n,e,`Log`),temp:c.join(B,e)}},W=e=>{let t=c.basename(z);return{data:c.join(V.XDG_DATA_HOME||c.join(z,`.local`,`share`),e),config:c.join(V.XDG_CONFIG_HOME||c.join(z,`.config`),e),cache:c.join(V.XDG_CACHE_HOME||c.join(z,`.cache`),e),log:c.join(V.XDG_STATE_HOME||c.join(z,`.local`,`state`),e),temp:c.join(B,t,e)}}}));function G(e){let t=e.replace(/[^a-zA-Z0-9]/g,`-`);return t.length<=J?t:`${t.slice(0,J)}-${Math.abs(le(e)).toString(36)}`}function K(e){return G(e)}var q,J,ge,_e=e((()=>{he(),oe(),ce(),q=me(`claude-cli`),J=200,ge={baseLogs:()=>o(q.cache,K(a().cwd())),errors:()=>o(q.cache,K(a().cwd()),`errors`),messages:()=>o(q.cache,K(a().cwd()),`messages`),mcpLogs:e=>o(q.cache,K(a().cwd()),`mcp-logs-${G(e)}`)}}));function ve(e){return e.replace(Y,``).trim()||e}function ye(e){return e.replace(Y,``).trim()}function be(e){return e.replace(xe,``).trim()}var Y,xe,Se=e((()=>{Y=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g,xe=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g}));function Ce(){return process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC?`essential-traffic`:process.env.DISABLE_TELEMETRY?`no-telemetry`:`default`}function we(){return Ce()===`essential-traffic`}function Te(){return Ce()!=="default"}function Ee(){return process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC?`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`:null}var De=e((()=>{}));function Oe(e,t){let n=e.firstPrompt?.startsWith(`<${y}>`),r=e.firstPrompt?ye(e.firstPrompt):``,i=r&&!n;return ve(e.agentName||e.customTitle||e.summary||(i?r:void 0)||t||(n?`Autonomous session`:void 0)||(e.sessionId?e.sessionId.slice(0,8):``)||``).trim()}function ke(e){return e.toISOString().replace(/[:.]/g,`-`)}function Ae(e){Z.length>=X&&Z.shift(),Z.push(e)}function je(e){if($===null&&($=e,Q.length>0)){let e=[...Q];Q.length=0;for(let t of e)switch(t.type){case`error`:$.logError(t.error);break;case`mcpError`:$.logMCPError(t.serverName,t.error);break;case`mcpDebug`:$.logMCPDebug(t.serverName,t.message);break}}}function Me(e){let t=ae(e);try{if(r(process.env.CLAUDE_CODE_USE_BEDROCK)||r(process.env.CLAUDE_CODE_USE_VERTEX)||r(process.env.CLAUDE_CODE_USE_FOUNDRY)||process.env.DISABLE_ERROR_REPORTING||we())return;if(Ae({error:ie(t),timestamp:new Date().toISOString()}),$===null){Q.push({type:`error`,error:t});return}$.logError(t)}catch{}}function Ne(){return[...Z]}function Pe(e,t){try{if($===null){Q.push({type:`mcpError`,serverName:e,error:t});return}$.logMCPError(e,t)}catch{}}function Fe(e,t){try{if($===null){Q.push({type:`mcpDebug`,serverName:e,message:t});return}$.logMCPDebug(e,t)}catch{}}function Ie(e,t){if(!t||!t.startsWith(`repl_main_thread`))return;let{messages:n,...r}=e;ee(r),te(process.env.USER_TYPE===`ant`?n:null)}var X,Z,Q,$,Le=e((()=>{n(),ne(),L(),_e(),Se(),i(),se(),De(),re(),X=100,Z=[],Q=[],$=null,t(()=>process.argv.includes(`--hard-fail`))}));export{P as A,b as B,ue as C,I as D,F as E,M as F,A as G,v as H,j as I,D as J,k as K,T as L,g as M,h as N,N as O,w as P,E as R,p as S,u as T,y as U,C as V,S as W,L as Y,be as _,Oe as a,f as b,Fe as c,De as d,we as f,ye as g,ve as h,Ne as i,_ as j,de as k,Pe as l,Se as m,Ie as n,Le as o,Te as p,O as q,ke as r,Me as s,je as t,Ee as u,ge as v,d as w,m as x,_e as y,x as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./rolldown-runtime-DaDcL9Zw.js";import{Gr as t,t as n}from"./src-CDCSSo0U2.js";import{en as r,ht as i,k as a}from"./state-ix0xIunV.js";import{Gr as o,jr as s}from"./loadAgentsDir-x3rlgED4.js";import{n as c,t as l}from"./cwd-CYmmnQVS.js";import{g as u,n as d}from"./settings-BeLFUeie.js";import{f,l as p}from"./file-DcZWPH2V.js";import{E as m,S as h,T as g,b as _}from"./startupProfiler-xa3NmN7Z.js";import{Bt as v,Gt as y,Pt as b}from"./model-CZViyZnE.js";import{r as x,t as S}from"./semver-BMRJYn3q.js";import{c as C,s as w,u as T}from"./releaseNotes-B8gbyFFJ.js";function E(e){return e>=70?`horizontal`:`compact`}function D(e,t,n){if(t===`horizontal`){let t=n,r=e-(7+t),i=Math.max(30,r),a=Math.min(t+i+z+B,e-R);return a<t+i+z+B&&(i=a-t-z-B),{leftWidth:t,rightWidth:i,totalWidth:a}}let r=Math.min(e-R,70);return{leftWidth:r,rightWidth:r,totalWidth:r}}function O(e,n,r){let i=Math.max(t(e),t(n),t(r),20);return Math.min(i+4,I)}function k(e){return!e||e.length>L?`Welcome back!`:`Welcome back ${e}!`}function A(e,n){if(t(e)<=n)return e;let r=e.split(`/`),i=r[0]||``,a=r[r.length-1]||``,o=t(i),s=t(a);if(r.length===1)return g(e,n);if(i===``&&2+s>=n)return`/${g(a,Math.max(1,n-1))}`;if(i!==``&&3+s>=n)return`…/${g(a,Math.max(1,n-1-1))}`;if(r.length===2)return`${m(i,n-1-1-s)}…/${a}`;let c=n-o-s-1-2;if(c<=0)return`${m(i,Math.max(0,n-s-1-2))}/…/${a}`;let l=[];for(let e=r.length-2;e>0;e--){let n=r[e];if(n&&t(n)+1<=c)l.unshift(n),c-=t(n)+1;else break}return l.length===0?`${i}/…/${a}`:`${i}/…/${l.join(`/`)}/${a}`}async function j(){if(H)return H;let e=i();return H=o(10).then(t=>(V=t.filter(t=>{if(t.isSidechain||t.sessionId===e||t.summary?.includes(`I apologize`))return!1;let n=t.summary&&t.summary!==`No prompt`,r=t.firstPrompt&&t.firstPrompt!==`No prompt`;return n||r}).slice(0,3),V)).catch(()=>(V=[],V)),H}function M(){return V}function N(){let e=process.env.DEMO_VERSION??`0.0.7`,t=a(),n=process.env.DEMO_VERSION?`/code/claude`:p(l());return{version:e,cwd:t?`${n} in ${t.replace(/^https?:\/\//,``)}`:n,billingType:y()?b():`API Usage Billing`,agentName:d().agent}}function P(e,n,r){return t(e)+3+t(n)>r?{shouldSplit:!0,truncatedModel:h(e,r),truncatedBilling:h(n,r)}:{shouldSplit:!1,truncatedModel:h(e,Math.max(r-t(n)-3,10)),truncatedBilling:n}}function F(e){if(process.env.USER_TYPE===`ant`)return[];let t=w();if(!t)return[];let n;try{n=T(t)}catch{return[]}let r=[],i=Object.keys(n).sort((e,t)=>S(e,t)?-1:1).slice(0,3);for(let e of i){let t=n[e];t&&r.push(...t)}return r.slice(0,e)}var I,L,R,z,B,V,H,U=e((()=>{r(),n(),v(),c(),f(),_(),C(),x(),s(),u(),I=50,L=20,R=4,z=1,B=2,V=[],H=null}));export{E as a,M as c,A as d,k as i,F as l,O as n,N as o,P as r,j as s,D as t,U as u};
|