@inkeep/open-knowledge 0.34.1-beta.0 → 0.35.0-beta.1
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/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/cli.mjs +61 -61
- package/dist/constants-DZx62n7t.mjs +2 -0
- package/dist/index.d.mts +47 -18
- package/dist/index.mjs +1 -1
- package/dist/init-CVLKb3oz.mjs +643 -0
- package/dist/init-CzoKldU1.mjs +1 -0
- package/dist/{launch-json-removal-qQEDGjLt.mjs → launch-json-removal-AdTwk3eT.mjs} +2 -2
- package/dist/{loader-D4oknGbJ.mjs → loader-CJD5H4rj.mjs} +2 -2
- package/dist/loader-CU424QQ7.mjs +1 -0
- package/dist/{open-browser-BgoSoXxW.mjs → open-browser-nDAvg8ub.mjs} +2 -2
- package/dist/preview-CM4FOiPe.mjs +1 -0
- package/dist/{preview-CR6Q94oC.mjs → preview-Dq8FTDPe.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-BS9Inl2p.js → ActivityModeContent-DBgWJhkx.js} +1 -1
- package/dist/public/assets/CodeMirrorPropInput-DKUgIQit.js +3 -0
- package/dist/public/assets/{DocumentContext-_YdjpU4z.js → DocumentContext-CWJ7hfZT.js} +19 -19
- package/dist/public/assets/{EnableSyncConfirmDialog-Bi0Sy7lr.js → EnableSyncConfirmDialog-BFsmDIV-.js} +1 -1
- package/dist/public/assets/{GraphPanel-b-saR1id.js → GraphPanel-C5V7tN6C.js} +2 -2
- package/dist/public/assets/{ManagedArtifactProperties-B_Yv-q_s.js → ManagedArtifactProperties-_V5aR-6k.js} +1 -1
- package/dist/public/assets/{McpConsentDialogBody-Cz64ech9.js → McpConsentDialogBody-BwgO2quE.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-VbdC-S5H.js → MermaidDocEditor-dbbj76iW.js} +1 -1
- package/dist/public/assets/PropertyPanel-hMoN4Hda.js +2 -0
- package/dist/public/assets/{ReportBugDialogBody-BJe4Bl9v.js → ReportBugDialogBody-memFSmPS.js} +1 -1
- package/dist/public/assets/{SettingsDialogBody-iVFEfPD7.js → SettingsDialogBody-SwVDm-ay.js} +2 -2
- package/dist/public/assets/{ShareBranchSwitchDialog-Bsz1K5c9.js → ShareBranchSwitchDialog-DI52ZkaG.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-sVGsg1_r.js → ShareReceiveDialog-C8u6PgdG.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-D8ePHs5G.js → ShareReceiveMissDialog-PR-XSxN1.js} +1 -1
- package/dist/public/assets/{SkillEditorActions-CktMr9Fe.js → SkillEditorActions-DG7dmv6Z.js} +1 -1
- package/dist/public/assets/{SourceEditor-DuWP30Wg.js → SourceEditor-FX3akQbF.js} +1 -1
- package/dist/public/assets/{TerminalPanel-CkiN9kJX.js → TerminalPanel-N3nlUpP9.js} +3 -3
- package/dist/public/assets/{agent-presence-B9lJS9gr.js → agent-presence-CTUYlsSf.js} +1 -1
- package/dist/public/assets/auth-state-cache-ByjLRYDx.js +11 -0
- package/dist/public/assets/{config-provider-eG9dInMX.js → config-provider-CBrCc3Qp.js} +4 -4
- package/dist/public/assets/{dist-CYtyTA7F.js → dist-Cub6hBx7.js} +1 -1
- package/dist/public/assets/{dist-DXyZc_kW.js → dist-GfBYAWEU.js} +116 -115
- package/dist/public/assets/doc-hash-BMXWNo_I.js +1 -0
- package/dist/public/assets/{documents-events-U_LCCcuP.js → documents-events-DJ1GG23v.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-CBvYR3nC.js → file-tree-adapter-DDhSPjxf.js} +1 -1
- package/dist/public/assets/index-D2oet0wG.js +2007 -0
- package/dist/public/assets/index-Zwl7lo8a.css +1 -0
- package/dist/public/assets/lint-config-client-BGM5HIsf.js +1 -0
- package/dist/public/assets/{navigation-targets-dSa8_04l.js → navigation-targets-CW61_XIz.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-BfLYfa7d.js → open-managed-artifact-tab-BGW4m9f4.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-Dnkk-mHa.js → pending-receive-nav-store-9viWJ9VV.js} +1 -1
- package/dist/public/assets/{prop-types-DyrPDiUq.js → prop-types-BvMtVAeG.js} +1 -1
- package/dist/public/assets/{receive-store-iiSp9ERl.js → receive-store-B3-FInQ9.js} +1 -1
- package/dist/public/assets/{selection-context-DEOXYfsZ.js → selection-context-C_A_tH6W.js} +1 -1
- package/dist/public/assets/skill-actions-6AAhO9zY.js +1 -0
- package/dist/public/assets/{skills-api-C5hIkm-I.js → skills-api-BhEjmNIn.js} +1 -1
- package/dist/public/assets/{src-CO_mDEk3.js → src-G334Yrxd.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-DUenOsCZ.js → target-navigation-intent-oLHFF9_D.js} +1 -1
- package/dist/public/assets/typing-burst-detector-CwIqbcfm.js +6 -0
- package/dist/public/assets/{use-apply-config-color-theme-fna_wp8B.js → use-apply-config-color-theme-JH4tQfHA.js} +1 -1
- package/dist/public/assets/{workspace-paths-S9yd7u2Z.js → workspace-paths-DtvYoBMA.js} +1 -1
- package/dist/public/index.html +27 -27
- package/dist/{repair-launch-json-5HmcdZdE.mjs → repair-launch-json-CxNjlqij.mjs} +2 -2
- package/dist/{repair-mcp-configs-CWZ4TNZL.mjs → repair-mcp-configs-Dtnsor_m.mjs} +2 -2
- package/dist/repair-skills-Drky8zkq.mjs +1 -0
- package/dist/{repair-skills-CFabpG6D.mjs → repair-skills-tJI8shk3.mjs} +2 -2
- package/dist/{src-ddPUyd9u.mjs → src-BI8S8yWC.mjs} +301 -301
- package/dist/{src-CsJd4hD1.mjs → src-Z2z9ztGi.mjs} +1 -1
- package/dist/{src-DhhmCwL9.mjs → src-nG3ysTNI.mjs} +2 -2
- package/dist/{start-Dspbwbj4.mjs → start-DLha1qnz.mjs} +2 -2
- package/dist/start-vpVar-h6.mjs +1 -0
- package/dist/{write-project-skill-D59YsAqA.mjs → write-project-skill-Bg3yDMEj.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-B9Y7OjyE.mjs +0 -2
- package/dist/init-CmQ4m4iP.mjs +0 -638
- package/dist/init-DmP2JIBO.mjs +0 -1
- package/dist/loader-C1m6gRpq.mjs +0 -1
- package/dist/preview-Ttf6bU0t.mjs +0 -1
- package/dist/public/assets/CodeMirrorPropInput-CgDBcDCj.js +0 -3
- package/dist/public/assets/PropertyPanel-CptmpM73.js +0 -2
- package/dist/public/assets/auth-state-cache-DwZqt_xI.js +0 -11
- package/dist/public/assets/doc-hash-BALtx6hR.js +0 -1
- package/dist/public/assets/index-B8pIQBJH.js +0 -2006
- package/dist/public/assets/index-F5i20SPk.css +0 -1
- package/dist/public/assets/lint-config-client-DbxK9eCK.js +0 -1
- package/dist/public/assets/skill-actions-CBCRhQ-8.js +0 -1
- package/dist/public/assets/typing-burst-detector-t2o529xJ.js +0 -6
- package/dist/repair-skills-BuztBrD_.mjs +0 -1
- package/dist/start-DmiJEfsU.mjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{u as i}from"./createLucideIcon-Wgamzz8_.js";import{X as a,Z as o,xi as s}from"./dist-DXyZc_kW.js";var c={general:{id:`Weq9zb`},workspace:{id:`pmUArF`},search:{id:`A1taO8`},wysiwyg:{id:`ur2XSb`},source:{id:`tiWX6q`},navigation:{id:`LXfNU-`}},l=Object.keys(c),u=[{id:`command-palette`,category:`general`,title:{id:`ZjtgI-`},description:{id:`OFBmkg`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`settings`,category:`general`,title:{id:`Tz0i8g`},description:{id:`6m_7We`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ ,`,windowsLinux:`Ctrl ,`,match:{key:`,`,anyMod:!0}}]},{id:`new-item`,category:`general`,title:{id:`HdkSiO`},description:{id:`KkEAud`},scope:{id:`zL0LPh`},bindings:[{mac:`⌘ N`,windowsLinux:`Ctrl N`,match:{key:`n`,mod:!0}},{mac:`⌥⌘ N`,windowsLinux:`Ctrl Alt N`,match:{key:`n`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`new-folder`,category:`general`,title:{id:`96G6Re`},description:{id:`3cOo2C`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ N`,windowsLinux:`Ctrl Shift N`}]},{id:`toggle-files-sidebar`,category:`general`,title:{id:`rtdR4v`},description:{id:`EbZT7P`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ S`,windowsLinux:`Ctrl Alt S`,match:{code:`KeyS`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-document-panel`,category:`general`,title:{id:`lkYioO`},description:{id:`It9ARY`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌥⌘ B`,windowsLinux:`Ctrl Alt B`,match:{code:`KeyB`,anyMod:!0,altKey:!0,allowExtraModifiers:!0}}]},{id:`toggle-terminal-panel`,category:`general`,title:{id:`dPOFid`},description:{id:`oCNLN8`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ J`,windowsLinux:`Ctrl J`,match:{key:`j`,mod:!0}}]},{id:`open-ask-ai`,category:`general`,title:{id:`xWEvuo`},description:{id:`5OTgC7`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ L`,windowsLinux:`Ctrl L`,match:{key:`l`,mod:!0}}]},{id:`new-terminal-tab`,category:`general`,title:{id:`k0vc0N`},description:{id:`si3L24`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ J`,windowsLinux:`Ctrl Shift J`,match:{key:`j`,mod:!0,shiftKey:!0}}]},{id:`tab-new`,category:`navigation`,title:{id:`3YvS-c`},description:{id:`t6w1cq`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ T`,windowsLinux:`Ctrl T`,match:{key:`t`,mod:!0}}]},{id:`tab-next`,category:`navigation`,title:{id:`l46MqT`},description:{id:`thnPBX`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃ Tab`,windowsLinux:`Ctrl Tab`,match:{key:`Tab`,ctrlKey:!0}}]},{id:`tab-previous`,category:`navigation`,title:{id:`Mh_4hd`},description:{id:`DJd000`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌃⇧ Tab`,windowsLinux:`Ctrl Shift Tab`,match:{key:`Tab`,ctrlKey:!0,shiftKey:!0}}]},{id:`tab-jump`,category:`navigation`,title:{id:`_6FVBz`},description:{id:`wGSHzy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 1-8`,windowsLinux:`Ctrl 1-8`}]},{id:`tab-jump-last`,category:`navigation`,title:{id:`N1KkEO`},description:{id:`ZQJ1IV`},scope:{id:`2GT3Hf`},bindings:[{mac:`⌘ 9`,windowsLinux:`Ctrl 9`}]},{id:`tab-reopen-closed`,category:`navigation`,title:{id:`hpzRlK`},description:{id:`E5WeIy`},scope:{id:`2GT3Hf`},bindings:[{mac:`⇧⌘ T`,windowsLinux:`Ctrl Shift T`,match:{key:`t`,mod:!0,shiftKey:!0}}]},{id:`open-folder`,category:`workspace`,title:{id:`PVUn_c`},description:{id:`VYd_YA`},scope:{id:`cZI5AL`},bindings:[{mac:`⌘ O`,windowsLinux:`Ctrl O`}]},{id:`switch-project`,category:`workspace`,title:{id:`xaDWAI`},description:{id:`oS1YpJ`},scope:{id:`cZI5AL`},bindings:[{mac:`⇧⌘ P`,windowsLinux:`Ctrl Shift P`}]},{id:`file-tree-copy`,category:`workspace`,title:{id:`eGUbmF`},description:{id:`7uBlRT`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ C`,windowsLinux:`Ctrl C`}]},{id:`file-tree-paste`,category:`workspace`,title:{id:`_tjopj`},description:{id:`e4PbgC`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ V`,windowsLinux:`Ctrl V`}]},{id:`file-tree-duplicate`,category:`workspace`,title:{id:`ot5BRK`},description:{id:`mxY24F`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`file-tree-delete`,category:`workspace`,title:{id:`VxO6wR`},description:{id:`osRqlv`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ Backspace`,windowsLinux:`Delete`}]},{id:`file-tree-select-all`,category:`workspace`,title:{id:`1d1F11`},description:{id:`4v2Yyz`},scope:{id:`vbK_ZG`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`find`,category:`search`,title:{id:`KujtjC`},description:{id:`8OGgNM`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`,match:{key:`f`,mod:!0,allowShiftKey:!0}}]},{id:`replace`,category:`search`,title:{id:`fqSfXY`},description:{id:`wT4iQr`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ F`,windowsLinux:`Ctrl H`,match:{mac:{key:`f`,mod:!0,altKey:!0},windowsLinux:{key:`h`,mod:!0}}}]},{id:`find-next`,category:`search`,title:{id:`v7lbnC`},description:{id:`PR9FSv`},scope:{id:`EqtBXb`},bindings:[{mac:`⌘ G`,windowsLinux:`Ctrl G`,match:{key:`g`,mod:!0}},{mac:`F3`,windowsLinux:`F3`,match:{key:`F3`}}]},{id:`find-previous`,category:`search`,title:{id:`PB4upl`},description:{id:`PgzIpb`},scope:{id:`EqtBXb`},bindings:[{mac:`⇧⌘ G`,windowsLinux:`Ctrl Shift G`,match:{key:`g`,mod:!0,shiftKey:!0}},{mac:`Shift F3`,windowsLinux:`Shift F3`,match:{key:`F3`,shiftKey:!0}}]},{id:`find-field-navigation`,category:`search`,title:{id:`yMgL_E`},description:{id:`5ALjdr`},scope:{id:`BgV29F`},bindings:[{mac:`Enter / Shift Enter`,windowsLinux:`Enter / Shift Enter`}]},{id:`replace-current-from-field`,category:`search`,title:{id:`LDuM35`},description:{id:`EZVxVz`},scope:{id:`rZVMkf`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`format-bold`,category:`wysiwyg`,title:{id:`KmydK6`},description:{id:`fbdLmk`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ B`,windowsLinux:`Ctrl B`}]},{id:`format-italic`,category:`wysiwyg`,title:{id:`pzutoc`},description:{id:`TLIO3j`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ I`,windowsLinux:`Ctrl I`}]},{id:`format-underline`,category:`wysiwyg`,title:{id:`YyXtnN`},description:{id:`Okd2Xv`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ U`,windowsLinux:`Ctrl U`}]},{id:`format-strike`,category:`wysiwyg`,title:{id:`WhOsNE`},description:{id:`HCn0Ay`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ X`,windowsLinux:`Ctrl Shift X`}]},{id:`format-inline-code`,category:`wysiwyg`,title:{id:`OX2Neh`},description:{id:`mo22UP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ E`,windowsLinux:`Ctrl E`}]},{id:`format-highlight`,category:`wysiwyg`,title:{id:`gtEbeW`},description:{id:`Eji13z`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ H`,windowsLinux:`Ctrl Shift H`}]},{id:`add-link`,category:`wysiwyg`,title:{id:`VzGJRl`},description:{id:`u7U_Ij`},scope:{id:`v77jrg`},bindings:[{mac:`⌘ K`,windowsLinux:`Ctrl K`,match:{key:`k`,mod:!0}}]},{id:`edit-with-ai`,category:`general`,title:{id:`G4-bgo`},description:{id:`a3H_MR`},scope:{id:`C62P6b`},bindings:[{mac:`⇧⌘ I`,windowsLinux:`Ctrl Shift I`,match:{key:`i`,mod:!0,shiftKey:!0}}]},{id:`history-undo-redo`,category:`wysiwyg`,title:{id:`i9OyGp`},description:{id:`lbkOif`},scope:{id:`ur2XSb`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z / ⌘ Y`,windowsLinux:`Ctrl Shift Z / Ctrl Y`}]},{id:`heading-paragraph`,category:`wysiwyg`,title:{id:`bkQRMh`},description:{id:`rgPqOw`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 0`,windowsLinux:`Ctrl Alt 0`}]},{id:`heading-levels`,category:`wysiwyg`,title:{id:`q_z77Z`},description:{id:`8Jm2EP`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ 1-6`,windowsLinux:`Ctrl Alt 1-6`}]},{id:`list-bullet`,category:`wysiwyg`,title:{id:`ijLc3m`},description:{id:`By-7Pn`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 8`,windowsLinux:`Ctrl Shift 8`}]},{id:`list-ordered`,category:`wysiwyg`,title:{id:`iSQTsg`},description:{id:`ou1hFW`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 7`,windowsLinux:`Ctrl Shift 7`}]},{id:`list-task`,category:`wysiwyg`,title:{id:`E1_c72`},description:{id:`-slrNR`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ 9`,windowsLinux:`Ctrl Shift 9`}]},{id:`code-block`,category:`wysiwyg`,title:{id:`4A3Yzu`},description:{id:`pTPqMK`},scope:{id:`ur2XSb`},bindings:[{mac:`⌥⌘ C`,windowsLinux:`Ctrl Alt C`}]},{id:`hard-break`,category:`wysiwyg`,title:{id:`-3ois8`},description:{id:`vDXqVv`},scope:{id:`ur2XSb`},bindings:[{mac:`Shift Enter`,windowsLinux:`Shift Enter`},{mac:`⌘ Enter`,windowsLinux:`Ctrl Enter`}]},{id:`move-block`,category:`wysiwyg`,title:{id:`f1XQyZ`},description:{id:`zQBg2C`},scope:{id:`ur2XSb`},bindings:[{mac:`⇧⌘ ↑`,windowsLinux:`Ctrl Shift ↑`},{mac:`⇧⌘ ↓`,windowsLinux:`Ctrl Shift ↓`}]},{id:`list-indent`,category:`wysiwyg`,title:{id:`G0YZ-I`},description:{id:`5GKMSz`},scope:{id:`ynIa4S`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`list-split-item`,category:`wysiwyg`,title:{id:`neRy3o`},description:{id:`NpC29w`},scope:{id:`ynIa4S`},bindings:[{mac:`Enter`,windowsLinux:`Enter`}]},{id:`table-cell-navigation`,category:`wysiwyg`,title:{id:`K8-WWn`},description:{id:`4NC2Ym`},scope:{id:`l1aQKz`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`table-delete-selection`,category:`wysiwyg`,title:{id:`881Uwh`},description:{id:`YEP3X2`},scope:{id:`99eR72`},bindings:[{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌘ Backspace / ⌘ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`}]},{id:`delete-atom`,category:`wysiwyg`,title:{id:`636K3K`},description:{id:`oXKEsy`},scope:{id:`ur2XSb`},bindings:[{mac:`Backspace`,windowsLinux:`Backspace`},{mac:`Delete`,windowsLinux:`Delete`}]},{id:`slash-menu`,category:`navigation`,title:{id:`shNd9t`},description:{id:`8PmoQF`},scope:{id:`ur2XSb`},bindings:[{mac:`/`,windowsLinux:`/`}]},{id:`suggestion-navigation`,category:`navigation`,title:{id:`riqekz`},description:{id:`OiHJdA`},scope:{id:`y5FUYi`},bindings:[{mac:`↑ / ↓`,windowsLinux:`↑ / ↓`},{mac:`Enter / Tab`,windowsLinux:`Enter / Tab`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`component-navigation`,category:`navigation`,title:{id:`rwrPbS`},description:{id:`0s8-e8`},scope:{id:`ur2XSb`},bindings:[{mac:`↑ / ↓ / ← / →`,windowsLinux:`↑ / ↓ / ← / →`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-indent`,category:`source`,title:{id:`fwhX-N`},description:{id:`skf5Ix`},scope:{id:`tiWX6q`},bindings:[{mac:`Tab`,windowsLinux:`Tab`},{mac:`Shift Tab`,windowsLinux:`Shift Tab`}]},{id:`source-navigation`,category:`source`,title:{id:`qSKu2v`},description:{id:`gITz7o`},scope:{id:`tiWX6q`},bindings:[{mac:`Arrow keys / Option Arrow / Command Arrow`,windowsLinux:`Arrow keys / Ctrl Arrow / Home / End`},{mac:`Page Up / Page Down`,windowsLinux:`Page Up / Page Down`},{mac:`Shift with movement keys`,windowsLinux:`Shift with movement keys`}]},{id:`source-editing`,category:`source`,title:{id:`pFagOn`},description:{id:`MGb89P`},scope:{id:`tiWX6q`},bindings:[{mac:`Enter / Shift Enter / ⌘ Enter`,windowsLinux:`Enter / Shift Enter / Ctrl Enter`},{mac:`Backspace / Delete`,windowsLinux:`Backspace / Delete`},{mac:`⌥ Backspace / ⌥ Delete`,windowsLinux:`Ctrl Backspace / Ctrl Delete`},{mac:`⌥ ↑ / ⌥ ↓`,windowsLinux:`Alt ↑ / Alt ↓`},{mac:`⇧⌥ ↑ / ⇧⌥ ↓`,windowsLinux:`Shift Alt ↑ / Shift Alt ↓`},{mac:`⇧⌘ K`,windowsLinux:`Ctrl Shift K`}]},{id:`source-history`,category:`source`,title:{id:`4Sxexw`},description:{id:`r2huLx`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ Z`,windowsLinux:`Ctrl Z`},{mac:`⇧⌘ Z`,windowsLinux:`Ctrl Y / Ctrl Shift Z`},{mac:`⌘ U / ⇧⌘ U`,windowsLinux:`Ctrl U / Alt U`}]},{id:`source-select-all`,category:`source`,title:{id:`a-cKXz`},description:{id:`UTNVyS`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ A`,windowsLinux:`Ctrl A`}]},{id:`source-multi-cursor`,category:`source`,title:{id:`mg0YGL`},description:{id:`lWNpNB`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ ↑ / ⌥⌘ ↓`,windowsLinux:`Ctrl Alt ↑ / Ctrl Alt ↓`},{mac:`⇧⌘ L`,windowsLinux:`Ctrl Shift L`}]},{id:`source-search`,category:`source`,title:{id:`7OhaRy`},description:{id:`mwMF9u`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ F`,windowsLinux:`Ctrl F`}]},{id:`source-toggle-comment`,category:`source`,title:{id:`RfaEio`},description:{id:`MrwYIK`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ /`,windowsLinux:`Ctrl /`},{mac:`Shift Alt A`,windowsLinux:`Shift Alt A`}]},{id:`source-select-next-occurrence`,category:`source`,title:{id:`hY8pka`},description:{id:`XnlF3W`},scope:{id:`tiWX6q`},bindings:[{mac:`⌘ D`,windowsLinux:`Ctrl D`}]},{id:`source-goto-line`,category:`source`,title:{id:`7FamGZ`},description:{id:`yHikCO`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ G`,windowsLinux:`Ctrl Alt G`}]},{id:`source-find-results`,category:`source`,title:{id:`rJVoVX`},description:{id:`TwYboS`},scope:{id:`qyLmWw`},bindings:[{mac:`⌘ G / ⇧⌘ G`,windowsLinux:`Ctrl G / Ctrl Shift G`},{mac:`F3 / Shift F3`,windowsLinux:`F3 / Shift F3`},{mac:`Esc`,windowsLinux:`Esc`}]},{id:`source-folding`,category:`source`,title:{id:`bcjYUA`},description:{id:`VZGh8G`},scope:{id:`tiWX6q`},bindings:[{mac:`⌥⌘ [ / ⌥⌘ ]`,windowsLinux:`Ctrl Shift [ / Ctrl Shift ]`},{mac:`Ctrl Alt [ / Ctrl Alt ]`,windowsLinux:`Ctrl Alt [ / Ctrl Alt ]`}]},{id:`source-completion`,category:`source`,title:{id:`VuxVSP`},description:{id:`Ehkru0`},scope:{id:`tiWX6q`},bindings:[{mac:`Ctrl Space`,windowsLinux:`Ctrl Space`},{mac:"⌥ ` / ⌥ I",windowsLinux:`Ctrl Space`},{mac:`↑ / ↓ / Page Up / Page Down`,windowsLinux:`↑ / ↓ / Page Up / Page Down`},{mac:`Enter / Esc`,windowsLinux:`Enter / Esc`}]},{id:`source-tab-focus-mode`,category:`source`,title:{id:`eG8Jsg`},description:{id:`qRZh7J`},scope:{id:`tiWX6q`},bindings:[{mac:`Shift Alt M`,windowsLinux:`Ctrl M`}]},{id:`source-lint-panel`,category:`source`,title:{id:`yvG-l1`},description:{id:`kCqCyf`},scope:{id:`tiWX6q`},bindings:[{mac:`⇧⌘ M`,windowsLinux:`Ctrl Shift M`}]},{id:`source-next-diagnostic`,category:`source`,title:{id:`M1OfV9`},description:{id:`ExPiRQ`},scope:{id:`tiWX6q`},bindings:[{mac:`F8`,windowsLinux:`F8`}]}],d=u,f=new Map(u.map(e=>[e.id,e]));function p(e){let t=f.get(e);if(!t)throw Error(`Unknown keyboard shortcut: ${e}`);return t}function m(){return s()?`mac`:`windowsLinux`}var h=[[/⌘/g,` Command `],[/⌥/g,` Option `],[/⇧/g,` Shift `],[/⌃/g,` Control `],[/↑/g,` Up Arrow `],[/↓/g,` Down Arrow `],[/←/g,` Left Arrow `],[/→/g,` Right Arrow `],[/\[/g,` Left Bracket `],[/\]/g,` Right Bracket `],[/,/g,` Comma `],[/\bCtrl\b/g,` Control `]];function g(e){return e.split(` / `).map(e=>h.reduce((e,[t,n])=>e.replace(t,n),e).replaceAll(/\s+/g,` `).trim()).join(` or `)}function _(e,t=m()){return t===`mac`?e.mac:e.windowsLinux}function v(e,t=m()){return g(_(e,t))}function y(e,t=m()){return _(p(e).bindings[0],t)}function b(e,t=m()){return v(p(e).bindings[0],t)}function x(e){if(!e||typeof e!=`object`)return!1;if(`isContentEditable`in e&&e.isContentEditable===!0)return!0;if(!(`tagName`in e))return!1;let t=String(e.tagName).toUpperCase();return t===`INPUT`||t===`TEXTAREA`}function S(e,t,n=m()){return p(t).bindings.some(t=>{let r=C(t.match,n);return r?T(e,r,n):!1})}function C(e,t){return e?w(e)?e:e[t]??null:null}function w(e){return`key`in e||`code`in e}function T(e,t,n){if(t.key&&e.key.toLowerCase()!==t.key.toLowerCase()||t.code&&e.code!==t.code)return!1;let r=t.metaKey??(t.mod?n===`mac`:!1),i=t.ctrlKey??(t.mod?n===`windowsLinux`:!1),a=t.altKey??!1,o=t.shiftKey??!1;return t.allowExtraModifiers?!(t.anyMod&&!e.metaKey&&!e.ctrlKey||r&&!e.metaKey||i&&!e.ctrlKey||a&&!e.altKey||o&&!e.shiftKey):(t.anyMod?e.metaKey||e.ctrlKey:e.metaKey===r&&e.ctrlKey===i)&&e.altKey===a&&(t.allowShiftKey||!!e.shiftKey===o)}var E=r(),D=n();function O(e){let t=(0,E.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`animate-pulse rounded-md bg-muted`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,D.jsx)(`div`,{"data-slot":`skeleton`,className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}var k=e(t(),1),A=`open-knowledge:lint-config-changed`;function j(){window.dispatchEvent(new CustomEvent(A))}function M(e){let t=()=>e();return window.addEventListener(A,t),()=>window.removeEventListener(A,t)}async function N(e){try{let t=e===void 0?``:`?doc=${encodeURIComponent(e)}`,n=await fetch(`/api/lint/config${t}`);if(!n.ok)return null;let r=await n.json().catch(()=>null),i=o.safeParse(r);return i.success?i.data:(console.warn(`[lint] lint-config response failed schema validation`,i.error.issues),null)}catch{return null}}async function P(e){return(await N(e))?.effective??null}async function F(e){try{let t=e?`?path=${encodeURIComponent(e)}`:``,n=await fetch(`/api/lint/audit${t}`);if(!n.ok)return null;let r=await n.json().catch(()=>null),i=a.safeParse(r);return i.success?i.data:(console.warn(`[lint] audit response failed schema validation`,i.error.issues),null)}catch{return null}}async function I(e,t){try{let n=await fetch(`/api/lint/markdownlint-config`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({ruleId:e,value:t})});if(!n.ok){let e=await n.json().catch(()=>null);return{ok:!1,errorDetail:typeof e?.title==`string`?e.title:null}}let r=await n.json().catch(()=>null),i=o.safeParse(r);return i.success?{ok:!0,response:i.data}:{ok:!1,errorDetail:null}}catch{return{ok:!1,errorDetail:null}}}function L(e){let t=(0,E.c)(5),[n,r]=(0,k.useState)(null),i,a;t[0]===e?(i=t[1],a=t[2]):(i=()=>{if(!e){r(null);return}let t=!1,n=()=>{N(e).then(e=>{t||r(e)})};n();let i=M(n);return()=>{t=!0,i()}},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,k.useEffect)(i,a);let o;return t[3]===n?o=t[4]:(o={data:n},t[3]=n,t[4]=o),o}function R(){let e=(0,E.c)(4),[t,n]=(0,k.useState)(null),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{let e=!1,t=()=>{N().then(t=>{e||n(t)})};t();let r=M(t);return()=>{e=!0,r()}},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,k.useEffect)(r,i);let a;return e[2]===t?a=e[3]:(a={data:t},e[2]=t,e[3]=a),a}export{S as _,L as a,O as c,l as d,y as f,x as g,g as h,M as i,d as l,b as m,P as n,R as o,_ as p,F as r,I as s,j as t,c as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{n as i,r as a}from"./dist-CSDjUb5q.js";import{n as o}from"./dist-DGbq0bSp.js";import{n as s,t as c,u as l}from"./createLucideIcon-Wgamzz8_.js";import{a as u,c as d,i as f,n as p,o as m,r as h,s as g,t as _}from"./dialog-D9fMUB3u.js";import{C as v,S as y,T as b,_ as x,a as S,d as C,f as w,g as T,n as E,s as D,t as O,v as k,w as A}from"./skills-api-C5hIkm-I.js";import{t as j}from"./label-CveCqKNR.js";import{Ht as M,N,Nt as P,Pt as F,St as I,Vt as L,Wr as R,Xt as z,Yt as B,cn as V,dn as H,fn as U,jt as W,ln as G,mn as K,n as ee,pn as te,qt as q,rt as ne,sn as re,t as ie,un as ae}from"./dist-DXyZc_kW.js";import{a as J,d as oe,l as se,n as Y,r as ce,t as le,u as ue}from"./workspace-paths-S9yd7u2Z.js";import{t as de}from"./copy-CfDOH9N1.js";import{t as fe}from"./folder-open-ygPcz1xa.js";import{t as pe}from"./loader-circle-BrJhrTc7.js";import{t as me}from"./refresh-cw-FMnveNBD.js";import{t as he}from"./trash-2-Cgf308yS.js";import{n as X}from"./dist-Qabe7wDM.js";import{t as ge}from"./input-BX4UDDMJ.js";import{t as _e}from"./parse-api-error-BcfaIWfX.js";import{t as ve}from"./dist-o9cVHl8Q.js";import{o as ye,s as be}from"./documents-events-U_LCCcuP.js";import{n as xe}from"./config-context-BbS_JaHs.js";import{a as Se,n as Ce,r as we,t as Te}from"./cursor-Rw-XIAht.js";import{n as Ee}from"./clipboard-adapter-BHfhAZ-n.js";var De=c(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),Oe=c(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),ke=c(`pencil-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),Ae=c(`power-off`,[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`,key:`dxknvb`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`,key:`1x7qb5`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Z=e(t(),1),Q=r(),je=[{id:`claude-cowork`,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`},{id:`claude-code`,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`},{id:`codex`,displayName:`Codex`,appBrandName:`Codex Desktop`,schemes:[`codex:`],installUrl:`https://openai.com/codex`,tagline:`OpenAI's coding agent, terminal-native.`},{id:`cursor`,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`},{id:`copilot`,displayName:`GitHub Copilot`,schemes:[],installUrl:`https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started`,tagline:`GitHub's terminal-native coding agent.`},{id:`opencode`,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`},{id:`pi`,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`},{id:`antigravity`,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."}],Me=je.filter(e=>e.id!==`claude-cowork`&&e.id!==`copilot`&&e.id!==`opencode`&&e.id!==`pi`&&e.id!==`antigravity`),$=n();function Ne(){let e=(0,Q.c)(3),[t,n]=(0,Z.useState)(Ie),r,i;return e[0]===t?(r=e[1],i=e[2]):(r=()=>{if(t!==null||window.okDesktop)return;let e=!0;return fetch(`/api/workspace`).then(async t=>{let r=await t.json().catch(Fe);if(!e||!t.ok)return;let i=L.safeParse(r);i.success&&n({contentDir:i.data.contentDir,pathSeparator:i.data.pathSeparator})}).catch(Pe),()=>{e=!1}},i=[t],e[0]=t,e[1]=r,e[2]=i),(0,Z.useEffect)(r,i),t}function Pe(e){console.warn(`[useWorkspace] /api/workspace fetch failed:`,e)}function Fe(){return null}function Ie(){return Le()}function Le(e=typeof window>`u`?void 0:window){if(!e)return null;let t=e.okDesktop;return t?{contentDir:t.config.projectPath,pathSeparator:t.platform===`win32`?`\\`:`/`}:null}function Re(e){return{async install(t){let n;try{n=await e.buildAndOpen(t?.force?{force:!0}:void 0)}catch(e){return{ok:!1,reason:`bridge-error`,message:e instanceof Error?e.message:String(e)}}return n.ok?{ok:!0,path:n.path}:{ok:!1,reason:n.reason,message:n.message}}}}function ze(e={}){let t=e.fetch??globalThis.fetch,n=`${e.apiOrigin??``}/api/install-skill`;return{async install(e){let r;try{r=await t(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?.force?{force:!0}:{})})}catch(e){return{ok:!1,reason:`network-error`,message:e instanceof Error?e.message:String(e)}}if(!r.ok){let e=`HTTP ${r.status}`;try{let t=_e(await r.json());t&&(e=t)}catch{}return{ok:!1,reason:`http-error`,message:e}}let i;try{i=await r.json()}catch(e){return{ok:!1,reason:`parse-error`,message:e instanceof Error?e.message:`Invalid server response`}}return!i||typeof i.status!=`string`?{ok:!1,reason:`parse-error`,message:`Invalid server response shape`}:i.status===`failed`?{ok:!1,reason:`build-failed`,message:i.buildError??`unknown build failure`}:{ok:!0,path:i.outputPath,handoffWarning:i.handoffError?.message}}}}function Be(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?Re(e):ze()}var Ve=`ok:skill:cowork:installed`,He=`1`,Ue=250,We=`/api/skill/install-state`;function Ge(e){return`${Ve}:v${e}`}var Ke=new Map;async function qe(e={},t={}){let n=t.force?`__force__`:`__default__`,r=Ke.get(n);if(r)return r;let i=Je(e,t);return Ke.set(n,i),i.finally(()=>{Ke.get(n)===i&&Ke.delete(n)}),i}async function Je(e,t){let n=e.installer===void 0?Be():e.installer,r=Ye(e.storage),i=e.fetchSnapshot??Ze,a=e.serverTimeoutMs??Ue,o=null;if(!t.force){try{o=await Qe(i(),a)}catch(e){console.warn(`[cowork-skill] server install-state check failed; falling through:`,e)}if(o){let e=o.targets[`claude-cowork`]??null;if(e&&e.version===o.currentVersion)return{kind:`already-installed`,source:`server`}}}let s=Ge(o?.currentVersion??e.fallbackSkillVersion??Xe());if(!t.force&&r?.getItem(s)===He)return{kind:`already-installed`,source:`local`};if(!n)return{kind:`host-unsupported`};let c=await n.install({force:t.force??!1});if(!c.ok)return{kind:`install-failed`,reason:c.reason,message:c.message};try{r?.setItem(s,He)}catch(e){console.warn(`[cowork-skill] storage.setItem failed (guard will not persist):`,e)}return{kind:`installed-now`,path:c.path,handoffWarning:c.handoffWarning}}function Ye(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Xe(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function Ze(){let e;try{e=await fetch(We,{method:`GET`,cache:`no-store`})}catch{return null}if(!e.ok)return null;try{let t=await e.json();return typeof t?.currentVersion==`string`?t:null}catch{return null}}async function Qe(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function $e(e){return qe({},e)}function et(){return qe({},{force:!0})}async function tt(e,t){let n;try{n=await t(`/api/handoff`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){return{ok:!1,reason:`dispatch-error`,detail:e instanceof Error?e.message:String(e)}}return n.status===200?{ok:!0}:n.status===404?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned 404`}:n.status===422?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned ${n.status}`}:{ok:!1,reason:`dispatch-error`,detail:`POST /api/handoff returned ${n.status}`}}async function nt(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return tt({target:`claude-cowork`,url:q({mode:`cowork`},e)},n);case`claude-code`:return tt({target:`claude-code`,url:q({mode:`code`},e)},n);case`codex`:return tt({target:`codex`,url:B(e)},n);case`cursor`:return tt({target:`cursor`,url:z(e),workspacePath:e.projectDir},n);case`copilot`:return{ok:!1,reason:`invalid-payload`,detail:`copilot is terminal-only; launch via requestTerminalLaunch`};case`opencode`:return{ok:!1,reason:`invalid-payload`,detail:`opencode is terminal-only; launch via requestTerminalLaunch`};case`pi`:return{ok:!1,reason:`invalid-payload`,detail:`pi is terminal-only; launch via requestTerminalLaunch`};case`antigravity`:return{ok:!1,reason:`invalid-payload`,detail:`antigravity is terminal-only; launch via requestTerminalLaunch`};default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function rt(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.openExternal)try{return await n.shell.openExternal(e),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:it(e)}}let r=t.doc??(typeof document<`u`?document:void 0);if(!r)return{ok:!1,reason:`dispatch-error`,detail:`no DOM available`};try{let t=r.createElement(`a`);return t.href=e,t.rel=`noopener noreferrer`,/^https?:/i.test(e)&&(t.target=`_blank`),r.body.appendChild(t),t.click(),t.remove(),{ok:!0}}catch(e){return{ok:!1,reason:`dispatch-error`,detail:it(e)}}}function it(e){if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}async function at(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}function ot(e){if(!e.docName||!e.workspace)return null;let t=le(e.docName),{contentDir:n,pathSeparator:r}=e.workspace;return{docContext:{relativePath:t},projectDir:n,docPath:Y(n,t,r)}}function st(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function ct(e){return e.workspace?.contentDir?{docContext:null,createDescription:e.description,createScenario:e.scenario,createMentions:e.mentions,projectDir:e.workspace.contentDir,docPath:``}:null}function lt(e){return rt(e.installUrl).then(()=>void 0)}function ut(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function dt(e){return!e.workspace?.contentDir||!e.skillName?null:{docContext:null,skill:{name:e.skillName,scope:e.scope},projectDir:e.workspace.contentDir,docPath:``}}function ft(e){if(!e.workspace?.contentDir)return null;let{contentDir:t,pathSeparator:n}=e.workspace;if(e.docName){let r=e.docRelativePath??le(e.docName),i={scope:`doc`,docRelativePath:r,instruction:e.instruction,mentions:e.mentions};return{docContext:null,compose:e.selection===void 0?i:{...i,selection:e.selection},projectDir:t,docPath:Y(t,r,n)}}return e.folderRelativePath?{docContext:null,compose:{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}:{docContext:null,compose:{scope:`project`,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}}function pt(e){return`Opened in ${e}.`}function mt(e,t=1){return t>=3?`Couldn't reach ${e} — please try again later.`:t===2?`Still couldn't reach ${e} — try one more time?`:`Couldn't reach ${e} — try again?`}function ht(e){return e>=3?null:e===2?`Try one more time`:`Retry`}function gt(e,t,n,r,i){let a=i===void 0?{}:{scope:i};return t.ok?{target:e,host:n,outcome:`ok`,ts:r,...a}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason,...a}}function _t(e,t,n,r){if(e.scope===`doc`){let i={scope:`doc`,docRelativePath:e.docRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r};return e.selection===void 0?i:{...i,selection:e.selection}}return e.scope===`folder`?{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}:{scope:`project`,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}}function vt(e,t,n,r){return e.compose?M(_t(e.compose,t,n,r)):e.selection?U({...e.selection,target:t,transport:r}):e.skill?te(e.skill.name,e.skill.scope,n):e.ask?re(e.ask.relativePath,e.ask.instruction,n,t,r):R(e.docContext===null?e.folderRelativePath?H(e.folderRelativePath,n,e.instruction,r):e.createDescription===void 0?G(n,e.instruction,r):V(e.createDescription,n,e.createScenario??`new-project`,e.createMentions??[],r):ae(e.docContext.relativePath,n,e.instruction,r))}function yt(e,t){let n=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||n?`${ne} ${vt(e,P[t].handoffTarget,!1,`terminal`)}`:K(e.docContext?.relativePath??null)}async function bt(e,t,n,r=1){if(e===`claude-cowork`&&r===1){let e;try{e=await n.ensureCoworkSkillInstalled()}catch(e){let t=e instanceof Error?e.message:String(e);return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(`OpenKnowledge skill saved. Upload it in Claude Desktop, then click Cowork again.`),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:vt(t,e,n.autoOpen,`url`)},a=await n.dispatchHandoff(i),o=n.isElectronHost()?`electron`:`web`,s=n.now().toISOString(),c=t.compose,l=gt(e,a,o,s,t.selection!=null||c?.scope===`doc`&&c.selection!==void 0?`selection`:void 0);await n.recordHandoff(l);let u=n.getDisplayName(e);if(a.ok)n.toast.success(pt(u));else{let i=ht(r),a=mt(u,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{bt(e,t,n,r+1)}}})}return a}function xt(e){return je.find(t=>t.id===e)?.displayName??e}function St(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function Ct(){return{dispatchHandoff:nt,recordHandoff:at,toast:{success:e=>{X.success(e)},error:(e,t)=>{X.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>St(),getDisplayName:xt,ensureCoworkSkillInstalled:$e,autoOpen:!0}}function wt(){let e=(0,Q.c)(2),{merged:t}=xe(),n=t?.appearance?.preview?.autoOpen??!0,r;return e[0]===n?r=e[1]:(r={dispatch:(e,t)=>bt(e,t,{...Ct(),autoOpen:n}),reinstallCoworkSkill:et},e[0]=n,e[1]=r),r}var Tt=[...new Set(je.flatMap(e=>e.schemes))];function Et(e,t){let n=t.now?.()??Date.now(),r={};for(let t of je){let i=t.schemes[0],a=i===void 0?void 0:e[i];if(!a){r[t.id]={installed:null};continue}r[t.id]={installed:a.installed,...a.displayName===void 0?{}:{displayName:a.displayName},lastChecked:n}}return r}function Dt(e){return Et({},e)}async function Ot(e){let t=e.schemes??Tt,n=await Promise.all(t.map(async t=>{let n=t.replace(/:$/,``);try{return[t,await e.detectProtocol(n)]}catch{return[t,{installed:!1}]}}));return Object.fromEntries(n)}var kt=Object.fromEntries(Tt.map(e=>[e,{installed:!1}]));async function At(e){let t;try{t=await e.fetch(`/api/installed-agents`,{signal:e.signal,headers:{Accept:`application/json`}})}catch(e){if(e.name===`AbortError`)throw e;return kt}if(!t.ok)return kt;let n;try{n=await t.json()}catch{return kt}if(typeof n!=`object`||!n||Array.isArray(n))return kt;let r=n,i={};for(let e of Tt)i[e]={installed:r[e.replace(/:$/,``)]===!0};return i}function jt(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n){let n=e[r],i=t[r];if(!n||!i||n.installed!==i.installed||n.displayName!==i.displayName)return!1}return!0}function Mt(e){let t=e.throttleMs??1e4,n=!1,r=null,i=null,a={},o=Dt({isElectronHost:e.isElectronHost(),now:e.now}),s=new Set,c=()=>{if(!n)for(let e of s)e(o)},l=()=>{o=Et(a,{isElectronHost:e.isElectronHost(),now:e.now})};return{probe:async()=>{if(n)return;if(i)return i;if(r!==null&&e.now()-r<t)return;let o=(async()=>{try{let t=await e.probe();if(n)return;let i=!jt(a,t);a=t,i&&(l(),c()),r=e.now()}catch{}finally{i=null}})();return i=o,o},getTargetStates:()=>o,subscribe:e=>(s.add(e),()=>{s.delete(e)}),cancel:()=>{n=!0,s.clear()}}}function Nt(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function Pt(){let e=typeof window<`u`?window.okDesktop:void 0;if(e){let t=t=>e.shell.detectProtocol(t);return{probe:()=>Ot({detectProtocol:t}),isElectronHost:()=>!0,now:Date.now}}let t=globalThis.fetch.bind(globalThis);return{probe:()=>At({fetch:t}),isElectronHost:()=>!1,now:Date.now}}function Ft(){let e=(0,Q.c)(5),[t,n]=(0,Z.useState)(It),r=(0,Z.useRef)(null),i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>{let e=Mt(Pt());r.current=e;let t=e.subscribe(n);e.probe();let i=()=>{e.probe()};return window.addEventListener(`focus`,i),()=>{window.removeEventListener(`focus`,i),t(),e.cancel(),r.current=null}},a=[],e[0]=i,e[1]=a):(i=e[0],a=e[1]),(0,Z.useEffect)(i,a);let o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=()=>r.current?.probe()??Promise.resolve(),e[2]=o):o=e[2];let s;return e[3]===t?s=e[4]:(s={states:t,refresh:o},e[3]=t,e[4]=s),s}function It(){return Dt({isElectronHost:Nt(),now:Date.now})}function Lt(e){let t=(0,Q.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(`title`,{children:`Antigravity icon`}),r=(0,$.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 2.5a1.5 1.5 0 0 1 1.28.72l8.5 14A1.5 1.5 0 0 1 20.5 19.5h-17a1.5 1.5 0 0 1-1.28-2.28l8.5-14A1.5 1.5 0 0 1 12 2.5Zm0 4.42L5.83 17h12.34L12 6.92Z`}),i=(0,$.jsx)(`path`,{fill:`currentColor`,d:`M12 9.6 15.6 17h-7.2L12 9.6Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,$.jsxs)(`svg`,{role:`img`,"aria-label":`Antigravity icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 24 24`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function Rt(e){let t=(0,Q.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(`title`,{children:`OpenCode icon`}),r=(0,$.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M384 416H128V96H384V416ZM320 160H192V352H320V160Z`}),i=(0,$.jsx)(`path`,{fill:`currentColor`,fillOpacity:.55,d:`M320 224V352H192V224H320Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,$.jsxs)(`svg`,{role:`img`,"aria-label":`OpenCode icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 512 512`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}function zt(e){let t=(0,Q.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(`title`,{children:`Pi icon`}),r=(0,$.jsx)(`path`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,d:`M165.29 165.29H517.36V400H400V517.36H282.65V634.72H165.29ZM282.65 282.65V400H400V282.65Z`}),i=(0,$.jsx)(`path`,{fill:`currentColor`,d:`M517.36 400H634.72V634.72H517.36Z`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,$.jsxs)(`svg`,{role:`img`,"aria-label":`Pi icon`,xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,fill:`none`,viewBox:`0 0 800 800`,...e,children:[n,r,i]}),t[3]=e,t[4]=a),a}var Bt={"claude-cowork":`claude`,"claude-code":`claude`,codex:`openai`,cursor:`cursor`,copilot:`github`,opencode:`opencode`,pi:`pi`,antigravity:`antigravity`};function Vt(e){let t=(0,Q.c)(39),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({id:r,style:a,className:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let{resolvedTheme:s}=o(),c=Bt[r],u=c?(s===`dark`?ee[c]:void 0)??ie[c]:void 0,d;t[5]!==u||t[6]!==a?(d=u?{...a,"--ok-brand-color":u}:a,t[5]=u,t[6]=a,t[7]=d):d=t[7];let f=d,p=u&&`[&_*]:![color:var(--ok-brand-color)]`,m;t[8]!==n||t[9]!==p?(m=l(p,n),t[8]=n,t[9]=p,t[10]=m):m=t[10];let h=m;if(r===`claude-cowork`||r===`claude-code`){let e;return t[11]!==h||t[12]!==f||t[13]!==i?(e=(0,$.jsx)(Se,{style:f,className:h,...i}),t[11]=h,t[12]=f,t[13]=i,t[14]=e):e=t[14],e}if(r===`codex`){let e;return t[15]!==h||t[16]!==f||t[17]!==i?(e=(0,$.jsx)(we,{style:f,className:h,...i}),t[15]=h,t[16]=f,t[17]=i,t[18]=e):e=t[18],e}if(r===`cursor`){let e;return t[19]!==h||t[20]!==f||t[21]!==i?(e=(0,$.jsx)(Te,{style:f,className:h,...i}),t[19]=h,t[20]=f,t[21]=i,t[22]=e):e=t[22],e}if(r===`copilot`){let e;return t[23]!==h||t[24]!==f||t[25]!==i?(e=(0,$.jsx)(Ce,{style:f,className:h,...i}),t[23]=h,t[24]=f,t[25]=i,t[26]=e):e=t[26],e}if(r===`opencode`){let e;return t[27]!==h||t[28]!==f||t[29]!==i?(e=(0,$.jsx)(Rt,{style:f,className:h,...i}),t[27]=h,t[28]=f,t[29]=i,t[30]=e):e=t[30],e}if(r===`pi`){let e;return t[31]!==h||t[32]!==f||t[33]!==i?(e=(0,$.jsx)(zt,{style:f,className:h,...i}),t[31]=h,t[32]=f,t[33]=i,t[34]=e):e=t[34],e}if(r===`antigravity`){let e;return t[35]!==h||t[36]!==f||t[37]!==i?(e=(0,$.jsx)(Lt,{style:f,className:h,...i}),t[35]=h,t[36]=f,t[37]=i,t[38]=e):e=t[38],e}return null}var Ht=(0,Z.createContext)(null);function Ut(e){let t=(0,Q.c)(3),{value:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,$.jsx)(Ht,{value:n,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function Wt(){return(0,Z.use)(Ht)}var Gt=F,Kt=new Set([`claude`]);function qt(e,t){return F.filter(n=>Kt.has(n)||n===t||e[n]!==!1)}function Jt(e){return P[e].handoffTarget}function Yt(e){let t=(0,Q.c)(48),{itemName:n,isSubmitting:r,onDelete:o,customTitle:c,customDescription:l,customDetail:_,customConfirmLabel:v,customConfirmLabelBusy:y,children:b}=e,{_:x}=a(),S;t[0]!==x||t[1]!==n?(S=n??x({id:`L3CEC1`}),t[0]=x,t[1]=n,t[2]=S):S=t[2];let C=S,w;t[3]!==x||t[4]!==v?(w=v??x({id:`cnGeoo`}),t[3]=x,t[4]=v,t[5]=w):w=t[5];let T=w,E;t[6]!==x||t[7]!==v||t[8]!==y?(E=y??v??x({id:`s3caR3`}),t[6]=x,t[7]=v,t[8]=y,t[9]=E):E=t[9];let D=E,O;t[10]!==x||t[11]!==c||t[12]!==C?(O=c??x({id:`77SdEP`,values:{itemName:C}}),t[10]=x,t[11]=c,t[12]=C,t[13]=O):O=t[13];let k;t[14]===O?k=t[15]:(k=(0,$.jsx)(d,{children:O}),t[14]=O,t[15]=k);let A;t[16]!==x||t[17]!==l||t[18]!==C?(A=l??x({id:`16D5Zj`,values:{itemName:C}}),t[16]=x,t[17]=l,t[18]=C,t[19]=A):A=t[19];let j;t[20]===A?j=t[21]:(j=(0,$.jsx)(u,{className:`whitespace-pre-wrap`,children:A}),t[20]=A,t[21]=j);let M;t[22]===_?M=t[23]:(M=_?(0,$.jsx)(`p`,{className:`text-muted-foreground text-sm`,"data-testid":`delete-confirmation-detail`,children:_}):null,t[22]=_,t[23]=M);let N;t[24]!==k||t[25]!==j||t[26]!==M?(N=(0,$.jsxs)(g,{children:[k,j,M]}),t[24]=k,t[25]=j,t[26]=M,t[27]=N):N=t[27];let P;t[28]===b?P=t[29]:(P=b?(0,$.jsx)(p,{children:b}):null,t[28]=b,t[29]=P);let F;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(i,{id:`dEgA5A`}),t[30]=F):F=t[30];let I;t[31]===r?I=t[32]:(I=(0,$.jsx)(h,{asChild:!0,children:(0,$.jsx)(s,{variant:`outline`,disabled:r,children:F})}),t[31]=r,t[32]=I);let L;t[33]!==T||t[34]!==D||t[35]!==r?(L=r?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(pe,{className:`size-4 animate-spin`}),` `,D]}):T,t[33]=T,t[34]=D,t[35]=r,t[36]=L):L=t[36];let R;t[37]!==r||t[38]!==o||t[39]!==L?(R=(0,$.jsx)(s,{variant:`destructive`,onClick:o,disabled:r,children:L}),t[37]=r,t[38]=o,t[39]=L,t[40]=R):R=t[40];let z;t[41]!==I||t[42]!==R?(z=(0,$.jsxs)(m,{children:[I,R]}),t[41]=I,t[42]=R,t[43]=z):z=t[43];let B;return t[44]!==P||t[45]!==z||t[46]!==N?(B=(0,$.jsxs)(f,{children:[N,P,z]}),t[44]=P,t[45]=z,t[46]=N,t[47]=B):B=t[47],B}function Xt(e){return e?ve._({id:`wTcjov`}):null}function Zt(e){let t=(0,Q.c)(30),{_:n}=a(),r=ce(),o=Wt();if(r)return null;let{input:s,installStates:c,dispatch:l}=e,u=s===null,d,f,p,m,h,g,_;if(t[0]!==n||t[1]!==l||t[2]!==s||t[3]!==u||t[4]!==c||t[5]!==o){let e=Xt(u),r;t[13]===c?r=t[14]:(r=e=>c[e.id]?.installed===!0,t[13]=c,t[14]=r);let a=Me.filter(r),S;t[15]===c?S=t[16]:(S=Me.some(e=>c[e.id]?.installed==null),t[15]=c,t[16]=S),p=S;let C=a.length>0,w=o!==null;m=!C&&!w;let E=o?qt(o.installedClis):[];f=v,t[17]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsxs)(b,{children:[(0,$.jsx)(se,{"aria-hidden":`true`}),(0,$.jsx)(i,{id:`O7_W_a`})]}),t[17]=_):_=t[17],d=A,h=w?(0,$.jsxs)(T,{"aria-label":n({id:`ALhMYW`}),children:[(0,$.jsx)(k,{children:(0,$.jsx)(i,{id:`ALhMYW`})}),E.map(t=>{let{displayName:r}=P[t];return(0,$.jsxs)(x,{onSelect:()=>{s!==null&&o.launchInTerminal(s,t)},disabled:u,"data-testid":`file-tree-open-in-terminal-${t}`,"aria-label":n(e?{id:`AIn2Yv`,values:{displayName:r,hint:e}}:{id:`QYfQdv`,values:{displayName:r}}),children:[(0,$.jsx)(Vt,{id:Jt(t),"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`flex-1`,children:r}),e?(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,g=C?(0,$.jsxs)($.Fragment,{children:[w?(0,$.jsx)(y,{}):null,(0,$.jsxs)(T,{"aria-label":n({id:`BBqGS9`}),children:[(0,$.jsx)(k,{children:(0,$.jsx)(i,{id:`BBqGS9`})}),a.map(t=>{let r=!u,{displayName:i}=t,a=n(e?{id:`1ZpfyB`,values:{displayName:i,hint:e}}:{id:`WqLq6M`,values:{displayName:i}});return(0,$.jsxs)(x,{disabled:!r,onSelect:()=>{s&&l(t.id,s)},"data-testid":`file-tree-open-in-${t.id}`,"aria-label":a,children:[(0,$.jsx)(Vt,{id:t.id,"aria-hidden":`true`}),(0,$.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,$.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null,t[0]=n,t[1]=l,t[2]=s,t[3]=u,t[4]=c,t[5]=o,t[6]=d,t[7]=f,t[8]=p,t[9]=m,t[10]=h,t[11]=g,t[12]=_}else d=t[6],f=t[7],p=t[8],m=t[9],h=t[10],g=t[11],_=t[12];let S;t[18]!==p||t[19]!==m?(S=m?(0,$.jsx)(x,{disabled:!0,"data-testid":`file-tree-open-in-empty`,children:p?(0,$.jsx)(i,{id:`EcR0fl`}):(0,$.jsx)(i,{id:`l6OXqI`})}):null,t[18]=p,t[19]=m,t[20]=S):S=t[20];let C;t[21]!==d||t[22]!==h||t[23]!==g||t[24]!==S?(C=(0,$.jsxs)(d,{children:[h,g,S]}),t[21]=d,t[22]=h,t[23]=g,t[24]=S,t[25]=C):C=t[25];let w;return t[26]!==f||t[27]!==_||t[28]!==C?(w=(0,$.jsxs)(f,{children:[_,C]}),t[26]=f,t[27]=_,t[28]=C,t[29]=w):w=t[29],w}function Qt(e){let t=(0,Q.c)(8),n=e?.enabled??!0,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={status:`idle`},t[0]=r):r=t[0];let[i,a]=(0,Z.useState)(r),[o,s]=(0,Z.useState)(0),c,l;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{let e=()=>s(nn),t=be(e),n=ye(t=>{t.includes(`files`)&&e()});return()=>{t(),n()}},l=[],t[1]=c,t[2]=l):(c=t[1],l=t[2]),(0,Z.useEffect)(c,l);let u;t[3]===n?u=t[4]:(u=()=>{if(!n)return;let e=!1;return a(tn),fetch(`/api/skills`).then($t).then(t=>{if(e)return;let n=W.safeParse(t);if(!n.success){console.error(`[ok-skills] /api/skills response failed schema validation:`,n.error.issues),a({status:`error`,message:`Server returned an incomplete skills response.`});return}a({status:`ready`,data:n.data.skills})}).catch(t=>{e||a({status:`error`,message:t instanceof Error?t.message:String(t)})}),()=>{e=!0}},t[3]=n,t[4]=u);let d;return t[5]!==n||t[6]!==o?(d=[o,n],t[5]=n,t[6]=o,t[7]=d):d=t[7],(0,Z.useEffect)(u,d),i}async function $t(e){if(!e.ok){let t=await e.json().catch(en);throw Error(_e(t)??`HTTP ${e.status}`)}return e.json()}function en(){return null}function tn(e){return e.status===`ready`?e:{status:`loading`}}function nn(e){return e+1}function rn(e){let t=(0,Q.c)(16),{skill:n,onOpenChange:r,onDeleted:i}=e,{_:o}=a(),[s,c]=(0,Z.useState)(!1),l;t[0]!==o||t[1]!==i||t[2]!==r?(l=async function(e){c(!0);let t=await O(e.scope,e.name);if(c(!1),!t.ok){let{error:e}=t;X.error(o({id:`AtBdnD`,values:{error:e}}));return}X.success(o({id:`h9QFb9`,values:{0:e.name}})),i(),r(!1)},t[0]=o,t[1]=i,t[2]=r,t[3]=l):l=t[3];let u=l,d=n!==null,f;t[4]!==s||t[5]!==r?(f=e=>{!e&&!s&&r(!1)},t[4]=s,t[5]=r,t[6]=f):f=t[6];let p;t[7]!==o||t[8]!==s||t[9]!==u||t[10]!==n?(p=n?(0,$.jsx)(Yt,{itemName:o({id:`ExUzM4`,values:{0:n.name}}),isSubmitting:s,onDelete:()=>u(n),customDescription:o({id:`E1Da_b`,values:{0:n.path}})}):null,t[7]=o,t[8]=s,t[9]=u,t[10]=n,t[11]=p):p=t[11];let m;return t[12]!==d||t[13]!==f||t[14]!==p?(m=(0,$.jsx)(_,{open:d,onOpenChange:f,children:p}),t[12]=d,t[13]=f,t[14]=p,t[15]=m):m=t[15],m}function an(e){let t=(0,Q.c)(68),{skill:n,existingNames:r,onOpenChange:o,onRenamed:c}=e,{_:l}=a(),p=n!==null,h=(0,Z.useId)(),[v,y]=(0,Z.useState)(``),[b,x]=(0,Z.useState)(!1),S;t[0]===n?S=t[1]:(S=()=>{n&&y(n.name)},t[0]=n,t[1]=S);let C=n?.scope,w=n?.name,T;if(t[2]!==C||t[3]!==w?(T=[C,w],t[2]=C,t[3]=w,t[4]=T):T=t[4],(0,Z.useEffect)(S,T),!n)return null;let E,O,k,A;t[5]!==r||t[6]!==v||t[7]!==n.name?(k=v.trim(),A=k===n.name,E=k===``||!I.test(k),O=!E&&!A&&r.has(k),t[5]=r,t[6]=v,t[7]=n.name,t[8]=E,t[9]=O,t[10]=k,t[11]=A):(E=t[8],O=t[9],k=t[10],A=t[11]);let M=O,N=!E&&!M&&!A&&!b,P;t[12]!==l||t[13]!==N||t[14]!==o||t[15]!==c||t[16]!==n||t[17]!==k?(P=async function(){if(!n||!N)return;x(!0);let e=await D({scope:n.scope,fromName:n.name,toName:k});if(x(!1),!e.ok){X.error(l({id:`zKxoPm`,values:{0:n.name,1:e.error}}));return}X.success(l({id:`dUCQo4`,values:{trimmed:k}})),c?.(k),o(!1)},t[12]=l,t[13]=N,t[14]=o,t[15]=c,t[16]=n,t[17]=k,t[18]=P):P=t[18];let F=P,L;t[19]===o?L=t[20]:(L=e=>e?null:o(!1),t[19]=o,t[20]=L);let R;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,$.jsx)(d,{children:(0,$.jsx)(i,{id:`dw_3cv`})}),t[21]=R):R=t[21];let z;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsxs)(g,{children:[R,(0,$.jsx)(u,{children:(0,$.jsx)(i,{id:`R9IDFz`})})]}),t[22]=z):z=t[22];let B;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,$.jsx)(i,{id:`6YtxFj`}),t[23]=B):B=t[23];let V;t[24]===h?V=t[25]:(V=(0,$.jsx)(j,{htmlFor:h,children:B}),t[24]=h,t[25]=V);let H;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(H=e=>y(e.target.value),t[26]=H):H=t[26];let U;t[27]===F?U=t[28]:(U=e=>{e.key===`Enter`&&F()},t[27]=F,t[28]=U);let W=E||M,G=E&&k!==``||M?`${h}-error`:void 0,K;t[29]!==h||t[30]!==v||t[31]!==U||t[32]!==W||t[33]!==G?(K=(0,$.jsx)(ge,{id:h,value:v,onChange:H,onKeyDown:U,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,"aria-invalid":W,"aria-describedby":G,className:`font-mono`}),t[29]=h,t[30]=v,t[31]=U,t[32]=W,t[33]=G,t[34]=K):K=t[34];let ee;t[35]!==M||t[36]!==h||t[37]!==E||t[38]!==k?(ee=E&&k!==``?(0,$.jsx)(`p`,{id:`${h}-error`,className:`text-xs text-destructive`,children:(0,$.jsx)(i,{id:`A50vr3`,components:{0:(0,$.jsx)(`code`,{className:`font-mono`})}})}):M?(0,$.jsx)(`p`,{id:`${h}-error`,className:`text-xs text-destructive`,children:(0,$.jsx)(i,{id:`YJ1BTp`})}):null,t[35]=M,t[36]=h,t[37]=E,t[38]=k,t[39]=ee):ee=t[39];let te;t[40]!==V||t[41]!==K||t[42]!==ee?(te=(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[V,K,ee]}),t[40]=V,t[41]=K,t[42]=ee,t[43]=te):te=t[43];let q;t[44]===o?q=t[45]:(q=()=>o(!1),t[44]=o,t[45]=q);let ne;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,$.jsx)(i,{id:`dEgA5A`}),t[46]=ne):ne=t[46];let re;t[47]!==b||t[48]!==q?(re=(0,$.jsx)(s,{variant:`ghost`,onClick:q,disabled:b,children:ne}),t[47]=b,t[48]=q,t[49]=re):re=t[49];let ie;t[50]===F?ie=t[51]:(ie=()=>void F(),t[50]=F,t[51]=ie);let ae=!N,J;t[52]===b?J=t[53]:(J=b?(0,$.jsx)(i,{id:`tHKQ6j`}):(0,$.jsx)(i,{id:`2wxgft`}),t[52]=b,t[53]=J);let oe;t[54]!==ie||t[55]!==ae||t[56]!==J?(oe=(0,$.jsx)(s,{onClick:ie,disabled:ae,children:J}),t[54]=ie,t[55]=ae,t[56]=J,t[57]=oe):oe=t[57];let se;t[58]!==re||t[59]!==oe?(se=(0,$.jsxs)(m,{children:[re,oe]}),t[58]=re,t[59]=oe,t[60]=se):se=t[60];let Y;t[61]!==te||t[62]!==se?(Y=(0,$.jsxs)(f,{children:[z,te,se]}),t[61]=te,t[62]=se,t[63]=Y):Y=t[63];let ce;return t[64]!==p||t[65]!==Y||t[66]!==L?(ce=(0,$.jsx)(_,{open:p,onOpenChange:L,children:Y}),t[64]=p,t[65]=Y,t[66]=L,t[67]=ce):ce=t[67],ce}function on(e){let t=(0,Q.c)(15),{skill:n,onOpenChange:r,onUpdated:o}=e,{_:c}=a(),[l,v]=(0,Z.useState)(!1),y;t[0]!==c||t[1]!==r||t[2]!==o?(y=async function(e){v(!0);let t=await w({scope:e.scope,name:e.name});v(!1);let n=J(e.name);if(!t.ok){X.error(c({id:`FRqZ9v`,values:{0:t.error}}));return}X.success(t.checkpointRef?c({id:`My9uXI`,values:{0:t.version,display:n}}):c({id:`mPneVR`,values:{0:t.version,display:n}})),o(),r(!1)},t[0]=c,t[1]=r,t[2]=o,t[3]=y):y=t[3];let b=y,x=n!==null,S;t[4]!==r||t[5]!==l?(S=e=>{!e&&!l&&r(!1)},t[4]=r,t[5]=l,t[6]=S):S=t[6];let C;t[7]!==b||t[8]!==n||t[9]!==l?(C=n?(0,$.jsxs)(f,{className:`sm:max-w-lg`,children:[(0,$.jsxs)(g,{children:[(0,$.jsx)(d,{children:(0,$.jsx)(i,{id:`iAoh55`,values:{0:J(n.name)}})}),(0,$.jsx)(u,{children:n.installedVersion?(0,$.jsx)(i,{id:`47EXvY`,values:{0:n.bundledVersion??``,1:n.installedVersion}}):(0,$.jsx)(i,{id:`nD7Fx9`,values:{0:n.bundledVersion??``}})})]}),(0,$.jsx)(p,{}),(0,$.jsxs)(m,{children:[(0,$.jsx)(h,{asChild:!0,children:(0,$.jsx)(s,{variant:`outline`,disabled:l,children:(0,$.jsx)(i,{id:`dEgA5A`})})}),(0,$.jsx)(s,{onClick:()=>void b(n),disabled:l,children:l?(0,$.jsx)(i,{id:`JL3si7`}):(0,$.jsx)(i,{id:`EkH9pt`})})]})]}):null,t[7]=b,t[8]=n,t[9]=l,t[10]=C):C=t[10];let T;return t[11]!==x||t[12]!==S||t[13]!==C?(T=(0,$.jsx)(_,{open:x,onOpenChange:S,children:C}),t[11]=x,t[12]=S,t[13]=C,t[14]=T):T=t[14],T}function sn(){let e=(0,Q.c)(30),{_:t}=a(),[n,r]=(0,Z.useState)(null),[i,o]=(0,Z.useState)(null),[s,c]=(0,Z.useState)(null),[l,u]=(0,Z.useState)(null),d;e[0]===t?d=e[1]:(d=async function(e,n){u(e.name);let r=await S({scope:e.scope,name:e.name,...n?{targets:[...n]}:{}});if(u(null),!r.ok)return X.error(t({id:`Mj8R8K`,values:{0:r.error}})),r;let i=cn,a=new Set(r.hosts),o=r.hosts.filter(t=>!e.hosts.includes(t)),s=e.hosts.filter(e=>!a.has(e)),c=e=>{let t=r.warningCodes.indexOf(e);return t>=0?r.warnings[t]:void 0},l=c(`no-targets`);if(l)return X.warning(l),r;if(o.length>0){let e=c(`scripts-present`);e&&X.warning(e)}return r.hosts.length===0?X.success(t({id:`0LBDjY`,values:{0:e.name}})):o.length>0&&s.length===0?X.success(t({id:`PPFQ3o`,values:{0:e.name,1:i(o)}})):s.length>0&&o.length===0?X.success(t({id:`OOIVJo`,values:{0:e.name,1:i(s)}})):o.length>0&&s.length>0?X.success(t({id:`OxplNM`,values:{0:e.name,1:i(o),2:i(s)}})):X.success(t({id:`wDgmsr`,values:{0:e.name,1:i(r.hosts)}})),r},e[0]=t,e[1]=d);let f=d,p;e[2]===t?p=e[3]:(p=async function(e){u(e.name);let n=await C({scope:e.scope,name:e.name});return u(null),n.ok?X.success(t({id:`0LBDjY`,values:{0:e.name}})):X.error(t({id:`nJq7et`,values:{0:n.error}})),n},e[2]=t,e[3]=p);let m=p,h;e[4]===t?h=e[5]:(h=async function(e,n){let r=await E({scope:e.scope,name:e.name,existingNames:n});if(!r.ok){X.error(t({id:`UPjaXD`,values:{0:e.name,1:r.error}}));return}X.success(t({id:`0g7rCZ`,values:{0:r.name}}))},e[4]=t,e[5]=h);let g=h,_,v;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{e||r(null)},v=()=>r(null),e[6]=_,e[7]=v):(_=e[6],v=e[7]);let y;e[8]===n?y=e[9]:(y=(0,$.jsx)(rn,{skill:n,onOpenChange:_,onDeleted:v}),e[8]=n,e[9]=y);let b=i?.skill??null,x=i?.existingNames??un,w,T;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{e||o(null)},T=()=>o(null),e[10]=w,e[11]=T):(w=e[10],T=e[11]);let D;e[12]!==b||e[13]!==x?(D=(0,$.jsx)(an,{skill:b,existingNames:x,onOpenChange:w,onRenamed:T}),e[12]=b,e[13]=x,e[14]=D):D=e[14];let O,k;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{e||c(null)},k=()=>c(null),e[15]=O,e[16]=k):(O=e[15],k=e[16]);let A;e[17]===s?A=e[18]:(A=(0,$.jsx)(on,{skill:s,onOpenChange:O,onUpdated:k}),e[17]=s,e[18]=A);let j;e[19]!==D||e[20]!==A||e[21]!==y?(j=(0,$.jsxs)($.Fragment,{children:[y,D,A]}),e[19]=D,e[20]=A,e[21]=y,e[22]=j):j=e[22];let M=j,N;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(N=(e,t)=>o({skill:e,existingNames:t}),e[23]=N):N=e[23];let P;return e[24]!==M||e[25]!==g||e[26]!==f||e[27]!==l||e[28]!==m?(P={installingName:l,install:f,uninstall:m,duplicate:g,requestDelete:r,requestRename:N,requestUpdate:c,dialogs:M},e[24]=M,e[25]=g,e[26]=f,e[27]=l,e[28]=m,e[29]=P):P=e[29],P}function cn(e){return e.map(ln).join(`, `)}function ln(e){return N[e]??e}var un=new Set;function dn(e){let t=(0,Q.c)(19),{skill:n,onEdit:r,onInstall:a,onUninstall:o,onDelete:s}=e,c,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(ue,{"aria-hidden":!0}),l=(0,$.jsx)(i,{id:`ePK91l`}),t[0]=c,t[1]=l):(c=t[0],l=t[1]);let u;t[2]===r?u=t[3]:(u=(0,$.jsxs)(x,{onSelect:r,children:[c,l]}),t[2]=r,t[3]=u);let d;t[4]!==a||t[5]!==n.installed?(d=a&&!n.installed?(0,$.jsxs)(x,{onSelect:a,children:[(0,$.jsx)(De,{"aria-hidden":!0}),(0,$.jsx)(i,{id:`TKQ7K-`})]}):null,t[4]=a,t[5]=n.installed,t[6]=d):d=t[6];let f;t[7]!==o||t[8]!==n.installed?(f=n.installed?(0,$.jsxs)(x,{onSelect:o,children:[(0,$.jsx)(Ae,{"aria-hidden":!0}),(0,$.jsx)(i,{id:`fo0VXg`})]}):null,t[7]=o,t[8]=n.installed,t[9]=f):f=t[9];let p,m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(he,{"aria-hidden":!0}),m=(0,$.jsx)(i,{id:`cnGeoo`}),t[10]=p,t[11]=m):(p=t[10],m=t[11]);let h;t[12]===s?h=t[13]:(h=(0,$.jsxs)(x,{variant:`destructive`,onSelect:s,children:[p,m]}),t[12]=s,t[13]=h);let g;return t[14]!==u||t[15]!==d||t[16]!==f||t[17]!==h?(g=(0,$.jsxs)($.Fragment,{children:[u,d,f,h]}),t[14]=u,t[15]=d,t[16]=f,t[17]=h,t[18]=g):g=t[18],g}function fn(e){let t=(0,Q.c)(94),{skill:n,actions:r,existingNames:o}=e,{_:s}=a(),c=Ne(),l=Ft().states,{dispatch:u}=wt(),d=typeof window<`u`?window.okDesktop:void 0,f=n.absolutePath,p;t[0]===s?p=t[1]:(p=async function(e){try{await Ee(e),X.success(s({id:`SXCSQd`}))}catch{X.error(s({id:`cRHuuI`}))}},t[0]=s,t[1]=p);let m=p;if(n.managed){let e,r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsxs)(k,{className:`flex items-center gap-1.5 text-muted-foreground`,children:[(0,$.jsx)(Oe,{className:`size-3`,"aria-hidden":!0}),(0,$.jsx)(i,{id:`VITWk5`})]}),r=(0,$.jsx)(y,{}),t[2]=e,t[3]=r):(e=t[2],r=t[3]);let a;t[4]===f?a=t[5]:(a=d&&f?(0,$.jsxs)(x,{onSelect:()=>void d.shell.showItemInFolder(f),children:[(0,$.jsx)(fe,{"aria-hidden":!0}),(0,$.jsx)(i,{id:`LtSYdi`})]}):null,t[4]=f,t[5]=a);let o;t[6]!==n.name||t[7]!==n.scope||t[8]!==c?(o=dt({skillName:n.name,scope:n.scope,workspace:c}),t[6]=n.name,t[7]=n.scope,t[8]=c,t[9]=o):o=t[9];let s;t[10]!==u||t[11]!==l||t[12]!==o?(s=(0,$.jsx)(Zt,{input:o,installStates:l,isElectronHost:d!=null,dispatch:u}),t[10]=u,t[11]=l,t[12]=o,t[13]=s):s=t[13];let p;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsxs)(b,{children:[(0,$.jsx)(de,{"aria-hidden":!0}),(0,$.jsx)(i,{id:`zd00pH`})]}),t[14]=p):p=t[14];let h;t[15]!==f||t[16]!==m?(h=f?(0,$.jsx)(x,{onSelect:()=>void m(f),children:(0,$.jsx)(i,{id:`z2funE`})}):null,t[15]=f,t[16]=m,t[17]=h):h=t[17];let g;t[18]!==m||t[19]!==n.path?(g=()=>void m(n.path),t[18]=m,t[19]=n.path,t[20]=g):g=t[20];let _;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(i,{id:`xloBjn`}),t[21]=_):_=t[21];let S;t[22]===g?S=t[23]:(S=(0,$.jsx)(x,{onSelect:g,children:_}),t[22]=g,t[23]=S);let C;t[24]!==S||t[25]!==h?(C=(0,$.jsxs)(v,{children:[p,(0,$.jsxs)(A,{children:[h,S]})]}),t[24]=S,t[25]=h,t[26]=C):C=t[26];let w;return t[27]!==C||t[28]!==a||t[29]!==s?(w=(0,$.jsxs)($.Fragment,{children:[e,r,a,s,C]}),t[27]=C,t[28]=a,t[29]=s,t[30]=w):w=t[30],w}let h;t[31]===f?h=t[32]:(h=d&&f?(0,$.jsxs)(x,{onSelect:()=>void d.shell.showItemInFolder(f),children:[(0,$.jsx)(fe,{"aria-hidden":!0}),(0,$.jsx)(i,{id:`LtSYdi`})]}):null,t[31]=f,t[32]=h);let g;t[33]!==n.name||t[34]!==n.scope||t[35]!==c?(g=dt({skillName:n.name,scope:n.scope,workspace:c}),t[33]=n.name,t[34]=n.scope,t[35]=c,t[36]=g):g=t[36];let _;t[37]!==u||t[38]!==l||t[39]!==g?(_=(0,$.jsx)(Zt,{input:g,installStates:l,isElectronHost:d!=null,dispatch:u}),t[37]=u,t[38]=l,t[39]=g,t[40]=_):_=t[40];let S;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsxs)(b,{children:[(0,$.jsx)(de,{"aria-hidden":!0}),(0,$.jsx)(i,{id:`zd00pH`})]}),t[41]=S):S=t[41];let C;t[42]!==f||t[43]!==m?(C=f?(0,$.jsx)(x,{onSelect:()=>void m(f),children:(0,$.jsx)(i,{id:`z2funE`})}):null,t[42]=f,t[43]=m,t[44]=C):C=t[44];let w;t[45]!==m||t[46]!==n.path?(w=()=>void m(n.path),t[45]=m,t[46]=n.path,t[47]=w):w=t[47];let T;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(i,{id:`xloBjn`}),t[48]=T):T=t[48];let E;t[49]===w?E=t[50]:(E=(0,$.jsx)(x,{onSelect:w,children:T}),t[49]=w,t[50]=E);let D;t[51]!==C||t[52]!==E?(D=(0,$.jsxs)(v,{children:[S,(0,$.jsxs)(A,{children:[C,E]})]}),t[51]=C,t[52]=E,t[53]=D):D=t[53];let O;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(y,{}),t[54]=O):O=t[54];let j;t[55]!==r||t[56]!==o||t[57]!==n?(j=()=>void r.duplicate(n,o),t[55]=r,t[56]=o,t[57]=n,t[58]=j):j=t[58];let M,N;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(oe,{"aria-hidden":!0}),N=(0,$.jsx)(i,{id:`euc6Ns`}),t[59]=M,t[60]=N):(M=t[59],N=t[60]);let P;t[61]===j?P=t[62]:(P=(0,$.jsxs)(x,{onSelect:j,children:[M,N]}),t[61]=j,t[62]=P);let F;t[63]!==r||t[64]!==o||t[65]!==n?(F=()=>r.requestRename(n,o),t[63]=r,t[64]=o,t[65]=n,t[66]=F):F=t[66];let I,L;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsx)(ke,{"aria-hidden":!0}),L=(0,$.jsx)(i,{id:`2wxgft`}),t[67]=I,t[68]=L):(I=t[67],L=t[68]);let R;t[69]===F?R=t[70]:(R=(0,$.jsxs)(x,{onSelect:F,children:[I,L]}),t[69]=F,t[70]=R);let z;t[71]!==r||t[72]!==n?(z=n.updateAvailable?(0,$.jsxs)(x,{onSelect:()=>r.requestUpdate(n),children:[(0,$.jsx)(me,{"aria-hidden":!0}),(0,$.jsx)(i,{id:`6g2jsp`})]}):null,t[71]=r,t[72]=n,t[73]=z):z=t[73];let B;t[74]!==r||t[75]!==n?(B=n.installed?(0,$.jsxs)(x,{onSelect:()=>void r.uninstall(n),children:[(0,$.jsx)(Ae,{"aria-hidden":!0}),(0,$.jsx)(i,{id:`fo0VXg`})]}):(0,$.jsxs)(x,{onSelect:()=>void r.install(n),children:[(0,$.jsx)(De,{"aria-hidden":!0}),(0,$.jsx)(i,{id:`TKQ7K-`})]}),t[74]=r,t[75]=n,t[76]=B):B=t[76];let V;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(y,{}),t[77]=V):V=t[77];let H;t[78]!==r||t[79]!==n?(H=()=>r.requestDelete(n),t[78]=r,t[79]=n,t[80]=H):H=t[80];let U,W;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,$.jsx)(he,{"aria-hidden":!0}),W=(0,$.jsx)(i,{id:`cnGeoo`}),t[81]=U,t[82]=W):(U=t[81],W=t[82]);let G;t[83]===H?G=t[84]:(G=(0,$.jsxs)(x,{variant:`destructive`,onSelect:H,children:[U,W]}),t[83]=H,t[84]=G);let K;return t[85]!==D||t[86]!==P||t[87]!==R||t[88]!==h||t[89]!==z||t[90]!==B||t[91]!==G||t[92]!==_?(K=(0,$.jsxs)($.Fragment,{children:[h,_,D,O,P,R,z,B,V,G]}),t[85]=D,t[86]=P,t[87]=R,t[88]=h,t[89]=z,t[90]=B,t[91]=G,t[92]=_,t[93]=K):K=t[93],K}export{wt as C,De as D,Oe as E,lt as S,Me as T,ot as _,Zt as a,yt as b,Jt as c,Wt as d,Vt as f,ut as g,ct as h,Qt as i,qt as l,ft as m,fn as n,Yt as o,Ft as p,sn as r,Gt as s,dn as t,Ut as u,st as v,Ne as w,xt as x,dt as y};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./chunk-DseTPa7n.js";import{n as t,r as n,t as r}from"./compiler-runtime-DrcePeIl.js";import{n as i}from"./DocumentContext-_YdjpU4z.js";import{n as a,r as o}from"./dist-CSDjUb5q.js";import{a as s,c,i as l,n as u,o as d,r as f,s as p,t as m,u as h}from"./panel-BGYdvxEm.js";import{n as g,t as _,u as v}from"./createLucideIcon-Wgamzz8_.js";import{n as y,r as b,t as x}from"./collapsible-UIgt0pSO.js";import{B as S,I as C}from"./CodeMirrorPropInput-CgDBcDCj.js";import{n as w,t as T}from"./toggle-group-B30vKHKs.js";import{Ir as E,ft as D,ir as ee,lt as O}from"./dist-DXyZc_kW.js";import{t as k}from"./chevron-right-B2thM4kG.js";import{n as A,r as j}from"./CopyButton-B8lE78wK.js";import{i as te}from"./prop-types-DyrPDiUq.js";import{t as M}from"./refresh-cw-FMnveNBD.js";import{t as N}from"./triangle-alert-VZ_Cki-r.js";import{t as P}from"./dist-o9cVHl8Q.js";import{i as F}from"./startup-marks-Dq0rZGD-.js";import{a as I,s as L}from"./doc-hash-BALtx6hR.js";import{c as R,r as z}from"./lint-config-client-DbxK9eCK.js";var B=_(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),V=e(t(),1),H=r(),U=3e4,W=new Map;function G(e){return e?Date.now()-e.rememberedAt>U?null:e.navigation:null}function K(e,t){W.set(e,{navigation:t,rememberedAt:Date.now()})}function q(e){return G(W.get(e))}function J(e){let t=W.get(e);return W.delete(e),G(t)}function Y(e){W.delete(e)}function ne(e,t){let n=(0,H.c)(4),r=t===void 0?!1:t,[i,a]=(0,V.useState)(void 0),o=(0,V.useRef)(null),s,c;return n[0]!==r||n[1]!==e?(s=()=>{if(r||e.length===0){a(void 0);return}let t=function(){let t=window.innerHeight/2,n,r;for(let i of e){let e=document.getElementById(i);if(!e)continue;let a=e.getBoundingClientRect().top;a<0?n=i:r===void 0&&a<t&&(r=i)}a(r??n??e[0])},n=function(){o.current===null&&(o.current=requestAnimationFrame(()=>{o.current=null,t()}))};return document.addEventListener(`scroll`,n,{capture:!0,passive:!0}),t(),()=>{document.removeEventListener(`scroll`,n,{capture:!0}),o.current!==null&&(cancelAnimationFrame(o.current),o.current=null)}},c=[e,r],n[0]=r,n[1]=e,n[2]=s,n[3]=c):(s=n[2],c=n[3]),(0,V.useEffect)(s,c),i}var X=n(),re=300;async function ie(e){let t=await fetch(`/api/page-headings?docName=${encodeURIComponent(e)}`),n;try{n=await t.json()}catch(e){throw new S(P._({id:`qAQVSD`}),{cause:e,status:t.status})}if(!t.ok){let e=D.safeParse(n);throw e.success?Error(e.data.title):new S(P._({id:`zlErBl`}),{status:t.status})}let r=O.safeParse(n);if(!r.success)throw new S(P._({id:`XW18jo`}),{status:t.status});return r.data.headings??[]}var ae=32,oe=12,se=6,ce=`open-knowledge:outline-nav`;function Z(e){let t=(0,H.c)(2),n;return t[0]===e?n=t[1]:(n=(0,X.jsx)(F,{name:`outline-panel`,children:(0,X.jsx)(Q,{...e})}),t[0]=e,t[1]=n),n}function Q(e){let t=(0,H.c)(50),{docName:n,isSourceMode:r,className:g}=e,_=g===void 0?``:g,{_:y}=o(),{pages:b,loading:x}=te(),S=h(),{activeProvider:C,activeDocName:w}=i(),T,E;t[0]===n?(T=t[1],E=t[2]):(T=[`page-headings`,n],E=()=>ie(n),t[0]=n,t[1]=T,t[2]=E);let D;t[3]!==n||t[4]!==x||t[5]!==b?(D=!x&&(b.has(n)||ee(n)),t[3]=n,t[4]=x,t[5]=b,t[6]=D):D=t[6];let O;t[7]!==T||t[8]!==E||t[9]!==D?(O={queryKey:T,queryFn:E,enabled:D,staleTime:1/0},t[7]=T,t[8]=E,t[9]=D,t[10]=O):O=t[10];let{data:k,isLoading:A,error:j}=c(O),M;t[11]===k?M=t[12]:(M=k===void 0?[]:k,t[11]=k,t[12]=M);let N=M,P,F;t[13]!==w||t[14]!==C||t[15]!==n||t[16]!==S?(P=()=>{if(!C||w!==n)return;let e=C.document,t=null,r=()=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,S.invalidateQueries({queryKey:[`page-headings`,n]})},re)};return e.on(`update`,r),()=>{e.off(`update`,r),t!==null&&clearTimeout(t)}},F=[C,w,n,S],t[13]=w,t[14]=C,t[15]=n,t[16]=S,t[17]=P,t[18]=F):(P=t[17],F=t[18]),(0,V.useEffect)(P,F);let I;t[19]===N?I=t[20]:(I=N.map(le),t[19]=N,t[20]=I);let L=ne(I,r),R;t[21]!==L||t[22]!==N?(R=L?N.findIndex(e=>e.slug===L):-1,t[21]=L,t[22]=N,t[23]=R):R=t[23];let z=R,B;t[24]!==n||t[25]!==r?(B=function(e,t){let i={index:e,slug:t,mode:r?`source`:`wysiwyg`};i.mode===`source`&&K(n,{kind:`outline`,detail:i}),window.dispatchEvent(new CustomEvent(ce,{detail:i}))},t[24]=n,t[25]=r,t[26]=B):B=t[26];let U=B,W=((z>=0?N[z].level:1)-1)*oe+(oe-se)/2,G=z*ae+(ae-se)/2,q;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,X.jsx)(p,{children:(0,X.jsx)(a,{id:`dD7NPy`})}),t[27]=q):q=t[27];let J;t[28]!==N.length||t[29]!==A?(J=!A&&(0,X.jsx)(f,{children:N.length}),t[28]=N.length,t[29]=A,t[30]=J):J=t[30];let Y;t[31]===J?Y=t[32]:(Y=(0,X.jsxs)(d,{children:[q,J]}),t[31]=J,t[32]=Y);let Z;t[33]!==y||t[34]!==z||t[35]!==L||t[36]!==j||t[37]!==U||t[38]!==N||t[39]!==A||t[40]!==W||t[41]!==G?(Z=j?(0,X.jsx)(s,{className:`px-2`,children:j instanceof Error?j.message:y({id:`GuqOb1`})}):N.length===0&&!A?(0,X.jsx)(l,{className:`px-2`,children:(0,X.jsx)(a,{id:`0BB9ID`})}):(0,X.jsxs)(`nav`,{"aria-label":y({id:`BymzO4`}),className:`relative`,children:[z>=0&&(0,X.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute left-0 top-0 rounded-full bg-primary motion-safe:[transition:transform_0.25s_var(--ease-out-strong)]`,style:{width:se,height:se,transform:`translate(${W}px, ${G}px)`}}),N.map((e,t)=>{let n=e.slug===L;return(0,X.jsx)(`button`,{type:`button`,"aria-current":n?`location`:void 0,onClick:()=>U(t,e.slug),className:v(`w-full cursor-pointer truncate py-1.5 pe-2 text-left text-sm transition-colors`,n?`font-medium text-primary`:`text-muted-foreground hover:text-foreground`),style:{paddingLeft:`${(e.level-1)*oe+20}px`},title:e.text,children:e.text},t)})]}),t[33]=y,t[34]=z,t[35]=L,t[36]=j,t[37]=U,t[38]=N,t[39]=A,t[40]=W,t[41]=G,t[42]=Z):Z=t[42];let Q;t[43]!==A||t[44]!==Z?(Q=(0,X.jsx)(u,{className:`px-3 py-2`,"aria-busy":A,children:Z}),t[43]=A,t[44]=Z,t[45]=Q):Q=t[45];let $;return t[46]!==_||t[47]!==Y||t[48]!==Q?($=(0,X.jsxs)(m,{className:_,children:[Y,Q]}),t[46]=_,t[47]=Y,t[48]=Q,t[49]=$):$=t[49],$}function le(e){return e.slug}function $(e){let t=(0,H.c)(10),{scope:n,onScopeChange:r}=e,{_:i}=o(),s;t[0]===r?s=t[1]:(s=e=>{e&&r(e)},t[0]=r,t[1]=s);let c;t[2]===i?c=t[3]:(c=i({id:`aBgwis`}),t[2]=i,t[3]=c);let l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,X.jsx)(w,{value:`doc`,className:`flex-1`,"data-testid":`panel-scope-doc`,children:(0,X.jsx)(a,{id:`UpCz01`})}),t[4]=l):l=t[4];let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,X.jsx)(w,{value:`project`,className:`flex-1`,"data-testid":`panel-scope-project`,children:(0,X.jsx)(a,{id:`e0NrBM`})}),t[5]=u):u=t[5];let d;return t[6]!==n||t[7]!==s||t[8]!==c?(d=(0,X.jsx)(`div`,{className:`shrink-0 px-4 pb-2`,children:(0,X.jsxs)(T,{type:`single`,variant:`segmented`,size:`sm`,spacing:1,value:n,onValueChange:s,"aria-label":c,className:`w-full rounded-md bg-muted p-0.5 dark:bg-background`,children:[l,u]})}),t[6]=n,t[7]=s,t[8]=c,t[9]=d):d=t[9],d}var ue=`open-knowledge:lint-nav`;function de(e,t){return e.range.start.line-t.range.start.line||e.range.start.character-t.range.start.character}function fe(e){return{line:e.range.start.line+1,column:e.range.start.character+1}}function pe(e){let t=(0,H.c)(19),{diagnostic:n}=e,{_:r}=o(),i=n.severity===`error`?j:N,a=`${n.source}/${n.code}`,s=n.range.start.line+1,c=n.severity===`error`?`text-destructive`:`text-amber-500`,l;t[0]===c?l=t[1]:(l=v(`mt-0.5 size-3.5 shrink-0`,c),t[0]=c,t[1]=l);let u;t[2]!==i||t[3]!==l?(u=(0,X.jsx)(i,{"aria-hidden":`true`,className:l}),t[2]=i,t[3]=l,t[4]=u):u=t[4];let d;t[5]===n.message?d=t[6]:(d=(0,X.jsx)(`span`,{className:`text-foreground`,children:n.message}),t[5]=n.message,t[6]=d);let f;t[7]!==u||t[8]!==d?(f=(0,X.jsxs)(`span`,{className:`flex items-start gap-1.5 text-sm`,children:[u,d]}),t[7]=u,t[8]=d,t[9]=f):f=t[9];let p;t[10]!==r||t[11]!==s?(p=r({id:`enPTnx`,values:{displayLine:s}}),t[10]=r,t[11]=s,t[12]=p):p=t[12];let m;t[13]!==a||t[14]!==p?(m=(0,X.jsxs)(`span`,{className:`ps-5 font-mono text-xs text-muted-foreground`,children:[a,` · `,p]}),t[13]=a,t[14]=p,t[15]=m):m=t[15];let h;return t[16]!==f||t[17]!==m?(h=(0,X.jsxs)(X.Fragment,{children:[f,m]}),t[16]=f,t[17]=m,t[18]=h):h=t[18],h}function me(e){return`${e.source}/${e.code}-${e.range.start.line}-${e.range.start.character}-${e.message}`}function he(e){let t=(0,H.c)(22),{docName:n,diagnostics:r,onFix:i}=e,{_:s}=o(),[c,h]=(0,V.useState)(`doc`),_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(_={status:`idle`},t[0]=_):_=t[0];let[v,y]=(0,V.useState)(_),b;if(t[1]!==s||t[2]!==v||t[3]!==r||t[4]!==n||t[5]!==i||t[6]!==c){let e=[...r].sort(de),o;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(o=async function(){y({status:`loading`});let e=await z();y(e===null?{status:`failed`}:{status:`loaded`,result:e})},t[8]=o):o=t[8];let _=o,x;t[9]===v?x=t[10]:(x=function(e){h(e),e===`project`&&v.status===`idle`&&_()},t[9]=v,t[10]=x);let S=x,C;t[11]===n?C=t[12]:(C=function(e){let t=fe(e);K(n,{kind:`lint`,detail:t}),window.dispatchEvent(new CustomEvent(ue,{detail:t}))},t[11]=n,t[12]=C);let w=C,T;t[13]!==n||t[14]!==w?(T=function(e,t){let r=I(e);if(r===n){w(t);return}K(r,{kind:`lint`,detail:fe(t)}),window.location.hash=L(r)},t[13]=n,t[14]=w,t[15]=T):T=t[15];let E=T,D;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,X.jsx)(p,{children:(0,X.jsx)(a,{id:`OXdGnd`})}),t[16]=D):D=t[16];let ee=c===`doc`&&e.length>0&&(0,X.jsx)(f,{children:e.length}),O;t[17]===ee?O=t[18]:(O=(0,X.jsxs)(d,{children:[D,ee]}),t[17]=ee,t[18]=O);let k;t[19]!==S||t[20]!==c?(k=(0,X.jsx)($,{scope:c,onScopeChange:S}),t[19]=S,t[20]=c,t[21]=k):k=t[21],b=(0,X.jsxs)(m,{children:[O,k,c===`doc`?(0,X.jsx)(u,{className:`px-2 py-2`,children:e.length===0?(0,X.jsx)(l,{className:`px-2`,children:(0,X.jsx)(a,{id:`ZI8uvA`})}):(0,X.jsx)(`ul`,{"aria-label":s({id:`OXdGnd`}),className:`flex flex-col gap-0.5`,children:e.map(e=>{let t=e.range.start.line+1,n=i!==void 0&&(e.fixes?.length??0)>0,r=`${e.source}/${e.code}`;return(0,X.jsxs)(`li`,{className:`group flex items-start gap-1 rounded transition-colors hover:bg-muted`,children:[(0,X.jsx)(`button`,{type:`button`,onClick:()=>w(e),className:`flex flex-1 cursor-pointer flex-col gap-0.5 rounded px-2 py-1.5 text-left`,title:s({id:`aHPdYV`,values:{displayLine:t}}),children:(0,X.jsx)(pe,{diagnostic:e})}),n?(0,X.jsxs)(g,{size:`sm`,variant:`ghost`,className:`mt-1 mr-1 h-6 shrink-0 px-2 text-xs opacity-0 focus-visible:opacity-100 group-hover:opacity-100`,onClick:()=>i?.(e),"aria-label":s({id:`fZj9em`,values:{flatId:r}}),"data-testid":`problems-fix`,children:[(0,X.jsx)(B,{"aria-hidden":`true`,className:`size-3`}),(0,X.jsx)(a,{id:`c4fVUV`})]}):null]},me(e))})})}):(0,X.jsx)(ge,{audit:v,onRefresh:()=>void _(),onNavigate:E})]}),t[1]=s,t[2]=v,t[3]=r,t[4]=n,t[5]=i,t[6]=c,t[7]=b}else b=t[7];return b}function ge(e){let t=(0,H.c)(29),{audit:n,onRefresh:r,onNavigate:i}=e,{_:c}=o(),l=n.status===`loading`||n.status===`idle`,d;t[0]!==n.result||t[1]!==n.status?(d=n.status===`loaded`&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(a,{id:`DsDwR-`,values:{0:n.result.errorCount}}),` · `,(0,X.jsx)(a,{id:`W1SI2K`,values:{0:n.result.warningCount}})]}),t[0]=n.result,t[1]=n.status,t[2]=d):d=t[2];let f;t[3]===d?f=t[4]:(f=(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,"data-testid":`problems-audit-summary`,children:d}),t[3]=d,t[4]=f);let p;t[5]===c?p=t[6]:(p=c({id:`WRdYfS`}),t[5]=c,t[6]=p);let m;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(M,{className:`size-3.5`}),t[7]=m):m=t[7];let h;t[8]!==l||t[9]!==r||t[10]!==p?(h=(0,X.jsx)(g,{variant:`ghost`,size:`icon`,className:`size-6 shrink-0 text-muted-foreground`,"aria-label":p,"data-testid":`problems-audit-refresh`,disabled:l,onClick:r,children:m}),t[8]=l,t[9]=r,t[10]=p,t[11]=h):h=t[11];let _;t[12]!==f||t[13]!==h?(_=(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-2 pb-1`,children:[f,h]}),t[12]=f,t[13]=h,t[14]=_):_=t[14];let v;t[15]!==c||t[16]!==l?(v=l&&(0,X.jsx)(`div`,{className:`flex flex-col gap-1`,role:`status`,"aria-busy":`true`,"aria-label":c({id:`dx-TwN`}),children:[1,2,3].map(_e)}),t[15]=c,t[16]=l,t[17]=v):v=t[17];let y;t[18]===n.status?y=t[19]:(y=n.status===`failed`&&(0,X.jsx)(s,{className:`px-2 text-xs`,children:(0,X.jsx)(a,{id:`IFezUv`})}),t[18]=n.status,t[19]=y);let b;t[20]!==n.result||t[21]!==n.status||t[22]!==i?(b=n.status===`loaded`&&(0,X.jsx)(ve,{result:n.result,onNavigate:i}),t[20]=n.result,t[21]=n.status,t[22]=i,t[23]=b):b=t[23];let x;return t[24]!==_||t[25]!==v||t[26]!==y||t[27]!==b?(x=(0,X.jsxs)(u,{className:`px-2 py-2`,"data-testid":`problems-project-scope`,children:[_,v,y,b]}),t[24]=_,t[25]=v,t[26]=y,t[27]=b,t[28]=x):x=t[28],x}function _e(e){return(0,X.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded px-2 py-1.5`,children:[(0,X.jsx)(R,{className:`mt-0.5 size-3.5 shrink-0 rounded`}),(0,X.jsxs)(`div`,{className:`flex-1 space-y-1.5`,children:[(0,X.jsx)(R,{className:`h-3 w-28`}),(0,X.jsx)(R,{className:`h-3 w-40`})]})]},e)}function ve(e){let t=(0,H.c)(10),{result:n,onNavigate:r}=e,{_:i}=o(),s;t[0]!==i||t[1]!==n.warnings?(s=n.warnings.length>0&&(0,X.jsx)(`ul`,{"aria-label":i({id:`Rsdhj9`}),className:`flex flex-col gap-0.5 pb-1`,children:n.warnings.map(ye)}),t[0]=i,t[1]=n.warnings,t[2]=s):s=t[2];let c;t[3]!==r||t[4]!==n.fileCount||t[5]!==n.files?(c=n.files.length===0?(0,X.jsx)(l,{className:`px-2`,children:(0,X.jsx)(a,{id:`k_Dqw1`,values:{0:n.fileCount}})}):n.files.map(e=>(0,X.jsx)(be,{file:e,onNavigate:r},e.file)),t[3]=r,t[4]=n.fileCount,t[5]=n.files,t[6]=c):c=t[6];let u;return t[7]!==s||t[8]!==c?(u=(0,X.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[s,c]}),t[7]=s,t[8]=c,t[9]=u):u=t[9],u}function ye(e,t){return(0,X.jsxs)(`li`,{className:`flex items-start gap-1.5 px-2 text-xs`,children:[(0,X.jsx)(N,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0 text-amber-500`}),(0,X.jsx)(`span`,{className:`min-w-0 text-foreground`,children:e})]},`${t}-${e}`)}function be(e){let t=(0,H.c)(37),{file:n,onNavigate:r}=e,{_:i}=o(),a,s,c,l,u,d,f,p,m;if(t[0]!==i||t[1]!==n.diagnostics||t[2]!==n.file||t[3]!==r){let e=[...n.diagnostics].sort(de);s=x,f=!0,p=`problems-audit-group`;let o;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,X.jsx)(k,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-90 motion-reduce:transition-none`}),t[13]=o):o=t[13];let h;t[14]===n.file?h=t[15]:(h=(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-xs text-foreground`,title:n.file,children:n.file}),t[14]=n.file,t[15]=h),m=(0,X.jsxs)(b,{className:`group flex w-full cursor-pointer items-center gap-1.5 rounded px-2 py-1.5 text-left transition-colors hover:bg-muted`,children:[o,h,(0,X.jsx)(A,{variant:`gray`,"data-testid":`problems-audit-file-count`,className:`shrink-0`,children:e.length})]}),a=y,d=`overflow-hidden data-[state=open]:animate-[collapsible-down_150ms_ease-out] data-[state=closed]:animate-[collapsible-up_150ms_ease-in]`,t[16]!==i||t[17]!==n.file?(c=i({id:`zAJzIg`,values:{0:n.file}}),t[16]=i,t[17]=n.file,t[18]=c):c=t[18],l=`flex flex-col gap-0.5 pb-1 ps-3`;let g;t[19]!==i||t[20]!==n.file||t[21]!==r?(g=e=>{let t=e.range.start.line+1;return(0,X.jsx)(`li`,{children:(0,X.jsx)(`button`,{type:`button`,onClick:()=>r(n.file,e),className:`flex w-full cursor-pointer flex-col gap-0.5 rounded px-2 py-1.5 text-left transition-colors hover:bg-muted`,title:i({id:`kDwcbW`,values:{0:n.file,displayLine:t}}),children:(0,X.jsx)(pe,{diagnostic:e})})},me(e))},t[19]=i,t[20]=n.file,t[21]=r,t[22]=g):g=t[22],u=e.map(g),t[0]=i,t[1]=n.diagnostics,t[2]=n.file,t[3]=r,t[4]=a,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f,t[11]=p,t[12]=m}else a=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10],p=t[11],m=t[12];let h;t[23]!==c||t[24]!==l||t[25]!==u?(h=(0,X.jsx)(`ul`,{"aria-label":c,className:l,children:u}),t[23]=c,t[24]=l,t[25]=u,t[26]=h):h=t[26];let g;t[27]!==a||t[28]!==d||t[29]!==h?(g=(0,X.jsx)(a,{className:d,children:h}),t[27]=a,t[28]=d,t[29]=h,t[30]=g):g=t[30];let _;return t[31]!==s||t[32]!==f||t[33]!==p||t[34]!==m||t[35]!==g?(_=(0,X.jsxs)(s,{defaultOpen:f,"data-testid":p,children:[m,g]}),t[31]=s,t[32]=f,t[33]=p,t[34]=m,t[35]=g,t[36]=_):_=t[36],_}var xe={words:0,chars:0,tokens:0},Se=/[ -〿-ゟ゠-ヿ㐀-䶿一-鿿豈---ក-]/,Ce=/[\p{L}\p{N}]/u,we=new Set([`text`,`inlineCode`,`code`,`tag`]),Te=new Set([`html`,`definition`,`footnoteDefinition`,`yaml`,`toml`,`image`,`imageReference`,`mdxFlowExpression`,`mdxTextExpression`,`mdxjsEsm`,`rawMdxFallback`,`rawMdxFallbackMdast`]),Ee=new Set([`paragraph`,`heading`,`blockquote`,`list`,`listItem`,`thematicBreak`,`table`,`tableRow`,`tableCell`,`mdxJsxFlowElement`,`commentBlock`]);function De(e,t){if(!e)return;let n=e.type;if(!Te.has(n)){if(we.has(n)){e.value&&(t.push(e.value),n===`code`&&t.push(`
|
|
2
|
-
`));return}if(n===`wikiLink`||n===`wikiLinkEmbed`){let n=e.data?.alias??e.value??``;n&&t.push(n);return}if(Array.isArray(e.children)){for(let n of e.children)De(n,t);if(Ee.has(n)&&t.length>0){let e=t[t.length-1];e&&!e.endsWith(`
|
|
3
|
-
`)&&t.push(`
|
|
4
|
-
`)}}}}function Oe(e){try{let t=C().parseToMdast(e),n=[];return De(t,n),n.join(``).trim()}catch(t){return console.warn(`[document-stats] mdast parse failed, falling back to raw text`,t),e.trim()}}function ke(e){if(!e)return 0;let t=0;for(let n of e.split(/\s+/))Ce.test(n)&&t++;return t}function Ae(e){let t=globalThis.Intl.Segmenter;if(!t)return ke(e);let n=new t(void 0,{granularity:`word`}),r=0;for(let t of n.segment(e))t.isWordLike&&r++;return r}function je(e){let t=Se.test(e)?1.5:4;return Math.ceil(e.length/t)}function Me(e){return e?{words:Se.test(e)?Ae(e):ke(e),chars:e.length,tokens:je(e)}:{words:0,chars:0,tokens:0}}function Ne(e){if(!e)return{words:0,chars:0,tokens:0};let{body:t}=E(e);return t.trim()?Me(Oe(t)):{words:0,chars:0,tokens:0}}function Pe(e,{isMarkdown:t}){let n=e.trim();return n?Me(t?Oe(e):n):xe}var Fe=new Map,Ie=new Set,Le=(e,t)=>`${t}:${e}`;function Re(){for(let e of Ie)e()}function ze(e,t,n){let r=Le(e,t);if(n===null){Fe.delete(r)&&Re();return}let i=Fe.get(r);i&&i.words===n.words&&i.chars===n.chars&&i.tokens===n.tokens||(Fe.set(r,n),Re())}function Be(e,t){return e===null?null:Fe.get(Le(e,t))??null}function Ve(e){return Ie.add(e),()=>{Ie.delete(e)}}function He(e){let{from:t,to:n,empty:r}=e.state.selection;if(r)return null;let i=e.state.doc.textBetween(t,n,`
|
|
5
|
-
`,` `);return i.trim()?Pe(i,{isMarkdown:!1}):null}function Ue(e){let t=[];for(let n of e.state.selection.ranges)n.empty||t.push(e.state.sliceDoc(n.from,n.to));if(t.length===0)return null;let n=t.join(`
|
|
6
|
-
`);return n.trim()?Pe(n,{isMarkdown:!0}):null}export{Ve as a,ue as c,Z as d,Y as f,K as h,He as i,he as l,q as m,ze as n,xe as o,J as p,Ue as r,Ne as s,Be as t,ce as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./repair-skills-CFabpG6D.mjs";export{e as repairSkills};
|
package/dist/start-DmiJEfsU.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,f as t,r as n}from"./start-Dspbwbj4.mjs";export{n as bootStartServer,t as resolveHost,e as startCommand};
|