@inkeep/open-knowledge 0.72.0-beta.3 → 0.72.0-beta.4

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.
Files changed (176) hide show
  1. package/dist/cli.mjs +67 -67
  2. package/dist/constants-tN6BLxqK.mjs +1 -0
  3. package/dist/{dist-C7Oi9AkI.mjs → dist-B7NFh0MZ.mjs} +464 -464
  4. package/dist/dist-D7HUGErx.mjs +1 -0
  5. package/dist/index.d.mts +9 -0
  6. package/dist/index.mjs +2 -2
  7. package/dist/init-0RF5mT_e.mjs +1 -0
  8. package/dist/{init-CWcaDlCV.mjs → init-R__-FL-k.mjs} +26 -26
  9. package/dist/{launch-json-removal-D0gfkVnw.mjs → launch-json-removal-7D0nQT56.mjs} +1 -1
  10. package/dist/{loader-hAzEG8eI.mjs → loader-BRYG-jTN.mjs} +1 -1
  11. package/dist/loader-BicS4rg_.mjs +1 -0
  12. package/dist/{open-browser-B9QXUTKM.mjs → open-browser-4-j8NELI.mjs} +1 -1
  13. package/dist/{preview-FVftoA1B.mjs → preview-DjhHIWGN.mjs} +1 -1
  14. package/dist/preview-DtEWXaoq.mjs +1 -0
  15. package/dist/public/assets/{ActivityModeContent-CSx6poL6.js → ActivityModeContent-DLnzCgfz.js} +1 -1
  16. package/dist/public/assets/AddPropertiesButton-5U2Y3uKp.js +2 -0
  17. package/dist/public/assets/{AgentDiffPane-D3ZqC-5y.js → AgentDiffPane-B5amlfmP.js} +1 -1
  18. package/dist/public/assets/{AgentIconCluster-mIIoSODi.js → AgentIconCluster-DiWkEX6O.js} +1 -1
  19. package/dist/public/assets/{AgentThreadClientBinder-zhmAd3N4.js → AgentThreadClientBinder-iSWzdyTG.js} +1 -1
  20. package/dist/public/assets/{BugReportHistory-DdAlxeKa.js → BugReportHistory-CounGQhT.js} +1 -1
  21. package/dist/public/assets/{BugReportHistoryDialog-BWMg-utz.js → BugReportHistoryDialog-CgPrrnbM.js} +1 -1
  22. package/dist/public/assets/CodeMirrorPropInput-Cmq0OheO.js +3 -0
  23. package/dist/public/assets/ConsentDialogBody-BD4DWbp5.js +2 -0
  24. package/dist/public/assets/{DiffViewBoundary-BrG_w2xt.js → DiffViewBoundary-BXdwk2Iq.js} +1 -1
  25. package/dist/public/assets/DocumentContext-TAFDDp6U.js +39 -0
  26. package/dist/public/assets/{EditorModeToggle-CRx6a4xr.js → EditorModeToggle-Dg7vVHl3.js} +1 -1
  27. package/dist/public/assets/{EnableSyncConfirmDialog-BbglKynl.js → EnableSyncConfirmDialog-R-Z946N5.js} +1 -1
  28. package/dist/public/assets/{ExcalidrawDocEditor-Cx-PkkWC.js → ExcalidrawDocEditor-CY1lJS-2.js} +1 -1
  29. package/dist/public/assets/FeedbackForm-CUHxAufb.js +1 -0
  30. package/dist/public/assets/{GraphPanel-BERS2Xxc.js → GraphPanel-omwwsp_N.js} +1 -1
  31. package/dist/public/assets/{ImageAttachments-n3q9E21B.js → ImageAttachments-BpYJnzlN.js} +1 -1
  32. package/dist/public/assets/{ImportSkillDialog-Buq_cGPy.js → ImportSkillDialog-BTpla3g7.js} +1 -1
  33. package/dist/public/assets/{LintConfigEditor-oCqNvP7d.js → LintConfigEditor-CVkLVVX0.js} +1 -1
  34. package/dist/public/assets/{ManagedArtifactProperties-CPB8QDOa.js → ManagedArtifactProperties-C1nhYITR.js} +1 -1
  35. package/dist/public/assets/ManagedArtifactProperties-D_9Orim7.js +1 -0
  36. package/dist/public/assets/McpConsentDialogBody-CXF6JRwT.js +1 -0
  37. package/dist/public/assets/{MermaidDocEditor-DoSSJiAU.js → MermaidDocEditor-Nc0VfQkz.js} +1 -1
  38. package/dist/public/assets/{OpenInAgentMenuItem-B-A26xF4.js → OpenInAgentMenuItem-CzPwpHyZ.js} +1 -1
  39. package/dist/public/assets/{PropertyDisplayRow-CqbjHwwA.js → PropertyDisplayRow-BGe6-4L9.js} +1 -1
  40. package/dist/public/assets/{RegisteredAgentIcon-D2Kzp4_r.js → RegisteredAgentIcon-Dit7Zlh0.js} +1 -1
  41. package/dist/public/assets/{ReportBugDialogBody-ByKRBwrn.js → ReportBugDialogBody-CiI1lRKj.js} +2 -2
  42. package/dist/public/assets/{ReportBugMenuTrigger-BT4k4UZV.js → ReportBugMenuTrigger-DoDCPu1X.js} +2 -2
  43. package/dist/public/assets/{SchemaConfigEditor-DLF8mr_B.js → SchemaConfigEditor-CSINzXTv.js} +1 -1
  44. package/dist/public/assets/{SessionsHost-PvYlMZLt.js → SessionsHost-Crwf7ff-.js} +2 -2
  45. package/dist/public/assets/SettingsDialogBody-Bl3NZ37F.js +12 -0
  46. package/dist/public/assets/{ShareBranchSwitchDialog-CSAWwldJ.js → ShareBranchSwitchDialog-DqSgSjyg.js} +1 -1
  47. package/dist/public/assets/{ShareReceiveDialog-CuDoDPVy.js → ShareReceiveDialog-BZtxSZra.js} +1 -1
  48. package/dist/public/assets/{ShareReceiveMissDialog-4JK4Afbo.js → ShareReceiveMissDialog-dnAsxL19.js} +1 -1
  49. package/dist/public/assets/{SkillCostValue-EajgoFy_.js → SkillCostValue-CHZQh8Rq.js} +1 -1
  50. package/dist/public/assets/{SkillEditBanner-rv5kIgLF.js → SkillEditBanner-SYzSHptQ.js} +1 -1
  51. package/dist/public/assets/{SkillForkDialog-B8iWPj-U.js → SkillForkDialog-Cz82rkwA.js} +1 -1
  52. package/dist/public/assets/{SkillInstallMenu-vK6OSpiK.js → SkillInstallMenu-CNY0p5vX.js} +1 -1
  53. package/dist/public/assets/{SkillOriginInline-Dj_Ri0FX.js → SkillOriginInline-DuKHAOBP.js} +1 -1
  54. package/dist/public/assets/{SkillToolbarControls-C6eBVVk1.js → SkillToolbarControls-CjE7B4SI.js} +1 -1
  55. package/dist/public/assets/{SlidesToolbarControls-DY6ttC2a.js → SlidesToolbarControls-C5RytnIw.js} +1 -1
  56. package/dist/public/assets/SourceEditor-CAEGq_cL.js +1 -0
  57. package/dist/public/assets/{TerminalPanel-lplfgXxO.js → TerminalPanel-Lr-gSBEo.js} +3 -3
  58. package/dist/public/assets/{TerminalWindowApp-CzStYFjF.js → TerminalWindowApp-Cbqv2j6x.js} +1 -1
  59. package/dist/public/assets/{TextDocEditor-BVU_T1nc.js → TextDocEditor-BbjLCMRm.js} +1 -1
  60. package/dist/public/assets/{ThreadView-B3rNh-vX.js → ThreadView-BhfeLCUr.js} +3 -3
  61. package/dist/public/assets/{TimelineDiffPane-Dz0cEdgE.js → TimelineDiffPane-DeUhHr6c.js} +1 -1
  62. package/dist/public/assets/agent-connection-status-XSdlZ0uj.js +1 -0
  63. package/dist/public/assets/auth-state-cache-lPOpwdxt.js +11 -0
  64. package/dist/public/assets/{bug-report-send-manager-CdO7h2kH.js → bug-report-send-manager-C8UOqZop.js} +1 -1
  65. package/dist/public/assets/client-version-DMKN1tA1.js +1 -0
  66. package/dist/public/assets/{comment-chips-BTwi9aHu.js → comment-chips-DG6TcreO.js} +1 -1
  67. package/dist/public/assets/config-provider-CL2LHJwy.js +4 -0
  68. package/dist/public/assets/css-color-to-hex-21hHTVNl.js +1 -0
  69. package/dist/public/assets/{dist-CyWcc58M.js → dist-75Tp0j2s.js} +1 -1
  70. package/dist/public/assets/{doc-hash-BEmc5wpM.js → doc-hash-0sJsliMq.js} +1 -1
  71. package/dist/public/assets/{doc-undo-manager-CPWQABEA.js → doc-undo-manager-CUMz1Lu7.js} +1 -1
  72. package/dist/public/assets/{documents-events-D_K3dHNa.js → documents-events-DvTemRtX.js} +1 -1
  73. package/dist/public/assets/{file-tree-adapter-D5yCyoxr.js → file-tree-adapter-C-zUZxGY.js} +1 -1
  74. package/dist/public/assets/{file-tree-utils-Css5oRd6.js → file-tree-utils-DQrKhuvs.js} +1 -1
  75. package/dist/public/assets/{folder-config-api-CYCg3Hjc.js → folder-config-api-O8wiP8u9.js} +1 -1
  76. package/dist/public/assets/globals-MNUe1ruv.css +1 -0
  77. package/dist/public/assets/{index-pdO5v09U.js → index-YzLx3klx.js} +15 -15
  78. package/dist/public/assets/{lint-config-client-D2CVLI8s.js → lint-config-client-D_K_I33M.js} +1 -1
  79. package/dist/public/assets/{markdownlint-rule-browser-BhjLeHcZ.js → markdownlint-rule-browser-D_33Iwwv.js} +1 -1
  80. package/dist/public/assets/messages-BYiJXmNN.js +1 -0
  81. package/dist/public/assets/messages-BwGMYA_G.js +1 -0
  82. package/dist/public/assets/messages-CFWXeDS9.js +1 -0
  83. package/dist/public/assets/messages-CbXu74T2.js +1 -0
  84. package/dist/public/assets/messages-Czy5uUdz.js +1 -0
  85. package/dist/public/assets/messages-DKoHMjaK.js +1 -0
  86. package/dist/public/assets/messages-DVDSsf5u.js +1 -0
  87. package/dist/public/assets/messages-Dnppvuua.js +1 -0
  88. package/dist/public/assets/messages-IHf96h9y.js +1 -0
  89. package/dist/public/assets/messages-ijpiuVRD.js +1 -0
  90. package/dist/public/assets/messages-lPluOXUP.js +1 -0
  91. package/dist/public/assets/messages-nbT9wGXG.js +1 -0
  92. package/dist/public/assets/navigation-targets-CLA-LGSO.js +1 -0
  93. package/dist/public/assets/{page-list-cache-B2Cbn6_1.js → page-list-cache-DmQP_SV8.js} +1 -1
  94. package/dist/public/assets/{pending-receive-nav-store-D5-DrypM.js → pending-receive-nav-store-lpN2Xg2z.js} +1 -1
  95. package/dist/public/assets/{progress-DeFcA31j.js → progress-CpKCXRqy.js} +3 -3
  96. package/dist/public/assets/{project-paths-BHj1N2_J.js → project-paths-gqDqqCq-.js} +1 -1
  97. package/dist/public/assets/{prop-types-BZCimyh-.js → prop-types-Cz_4UFXS.js} +1 -1
  98. package/dist/public/assets/{receive-store-DzTOlR0N.js → receive-store-CmP1Rnn7.js} +1 -1
  99. package/dist/public/assets/{selection-context-BIa29kJ8.js → selection-context-BYtzxyLE.js} +1 -1
  100. package/dist/public/assets/{skill-scope-N9lA7J2A.js → skill-scope-zjfKF_hV.js} +1 -1
  101. package/dist/public/assets/{skills-api-t8N6VdpP.js → skills-api-DefDq-V9.js} +1 -1
  102. package/dist/public/assets/{src-ByO9uVZB.js → src-DyfxwlyE.js} +2 -2
  103. package/dist/public/assets/{startup-marks-w6Ilv1dh.js → startup-marks-DkofILWo.js} +1 -1
  104. package/dist/public/assets/{tag-pill-input-By-KRpAS.js → tag-pill-input-fBTfmjgu.js} +1 -1
  105. package/dist/public/assets/{target-navigation-intent-Bu5cNTBP.js → target-navigation-intent-JS6hYcot.js} +1 -1
  106. package/dist/public/assets/{telemetry-impl-CKvjKher.js → telemetry-impl-CFkmFcv6.js} +1 -1
  107. package/dist/public/assets/{telemetry-startup-BfBWUHVq.js → telemetry-startup-Bac091X8.js} +1 -1
  108. package/dist/public/assets/{terminal-cli-display-BNnRIpgq.js → terminal-cli-display-B8ySenln.js} +1 -1
  109. package/dist/public/assets/{terminal-command-events-BGXJdDho.js → terminal-command-events-DrvZC8Eu.js} +1 -1
  110. package/dist/public/assets/{terminal-launch-events-DCbQD5pb.js → terminal-launch-events-qWlFGuUx.js} +1 -1
  111. package/dist/public/assets/{terminal-telemetry-C3BIM0C7.js → terminal-telemetry-CpRQ96Ji.js} +1 -1
  112. package/dist/public/assets/{typing-burst-detector-PnjW2-x3.js → typing-burst-detector-BBbOZnKo.js} +4 -4
  113. package/dist/public/assets/uninstall-v61_ZoXT.js +1 -0
  114. package/dist/public/assets/{use-activity-panel-HmfzKdzs.js → use-activity-panel-DCGFCgW4.js} +1 -1
  115. package/dist/public/assets/use-apply-config-language-BS-vov2w.js +2 -0
  116. package/dist/public/assets/{use-collab-url-B_rNmVb_.js → use-collab-url-mFOjr2IA.js} +1 -1
  117. package/dist/public/assets/{use-conflicts-DwqMCspl.js → use-conflicts-C8dN_iXo.js} +1 -1
  118. package/dist/public/assets/{use-live-xterm-theme-WB5uWQWt.js → use-live-xterm-theme-B9dAAZD3.js} +1 -1
  119. package/dist/public/assets/{use-open-skill-DzszCWzx.js → use-open-skill-BAPaR7kA.js} +1 -1
  120. package/dist/public/assets/{use-settings-route-D7psIUas.js → use-settings-route-BxaIY7g8.js} +1 -1
  121. package/dist/public/assets/{use-skill-origin-D-hrfwwb.js → use-skill-origin-CZlBPaka.js} +1 -1
  122. package/dist/public/assets/{use-skills-Drb1FGEU.js → use-skills-C6QmTsGG.js} +1 -1
  123. package/dist/public/assets/{use-terminal-enabled-Bre_0Sqg.js → use-terminal-enabled-D0rb9s4e.js} +1 -1
  124. package/dist/public/assets/use-timeline-entry-diff-6pBvX9Gh.js +5 -0
  125. package/dist/public/assets/{use-workspace-BY7Os3yY.js → use-workspace-CPN4D3G_.js} +1 -1
  126. package/dist/public/index.html +58 -58
  127. package/dist/public/uninstall.html +7 -6
  128. package/dist/{registry-probes-BK8Gw65W.mjs → registry-probes-Cthf_D-E.mjs} +10 -10
  129. package/dist/{removal-file-path-BhN_h0Rm.mjs → removal-file-path-B3Ia2LYa.mjs} +1 -1
  130. package/dist/{repair-launch-json-QWDfpWfu.mjs → repair-launch-json-LAfXDQlt.mjs} +1 -1
  131. package/dist/{repair-mcp-configs-CGM7N62T.mjs → repair-mcp-configs-Dz9benJ2.mjs} +1 -1
  132. package/dist/src-BCVXAb8B.mjs +1 -0
  133. package/dist/src-CQqhz0Kv.mjs +11 -0
  134. package/dist/start-C5D7Sm06.mjs +1 -0
  135. package/dist/{start-BcH8YieI.mjs → start-C9LxTCYi.mjs} +3 -3
  136. package/package.json +4 -4
  137. package/dist/constants-BWwITVsY.mjs +0 -1
  138. package/dist/dist-s4KdL8xn.mjs +0 -1
  139. package/dist/init-B-wniKG4.mjs +0 -1
  140. package/dist/loader-ClY3YXAr.mjs +0 -1
  141. package/dist/preview-C605fqZX.mjs +0 -1
  142. package/dist/public/assets/AddPropertiesButton-DXjzjICF.js +0 -2
  143. package/dist/public/assets/CodeMirrorPropInput-Bo7jcqv0.js +0 -3
  144. package/dist/public/assets/ConsentDialogBody-CpPyfOOm.js +0 -2
  145. package/dist/public/assets/DocumentContext-DW2Sgfp0.js +0 -39
  146. package/dist/public/assets/FeedbackForm-gNbKRMDT.js +0 -1
  147. package/dist/public/assets/ManagedArtifactProperties-DwP8yFwK.js +0 -1
  148. package/dist/public/assets/McpConsentDialogBody-DBFdcvuZ.js +0 -1
  149. package/dist/public/assets/SettingsDialogBody-CGABSyyD.js +0 -12
  150. package/dist/public/assets/SourceEditor-BRi3EW6e.js +0 -1
  151. package/dist/public/assets/agent-connection-status-VLm1l6MH.js +0 -1
  152. package/dist/public/assets/auth-state-cache-wQqrLqzV.js +0 -11
  153. package/dist/public/assets/client-version-B-nUcRRZ.js +0 -1
  154. package/dist/public/assets/config-provider-CkrfHldq.js +0 -5
  155. package/dist/public/assets/css-color-to-hex-D4ROZoal.js +0 -1
  156. package/dist/public/assets/globals-Dphjn3Yt.css +0 -1
  157. package/dist/public/assets/i18n-Da7WHZe6.js +0 -1
  158. package/dist/public/assets/messages--JnqpgOb.js +0 -1
  159. package/dist/public/assets/messages--gUdia_5.js +0 -1
  160. package/dist/public/assets/messages-Bg6waVkx.js +0 -1
  161. package/dist/public/assets/messages-BjU_8px0.js +0 -1
  162. package/dist/public/assets/messages-CPorGTui.js +0 -1
  163. package/dist/public/assets/messages-D2kPydYD.js +0 -1
  164. package/dist/public/assets/messages-DK2UgHWp.js +0 -1
  165. package/dist/public/assets/messages-DMbO4A7Z.js +0 -1
  166. package/dist/public/assets/messages-IESTLOtJ.js +0 -1
  167. package/dist/public/assets/messages-JiwS-kMF.js +0 -1
  168. package/dist/public/assets/messages-bHA62mu3.js +0 -1
  169. package/dist/public/assets/messages-hiCq1tp-.js +0 -1
  170. package/dist/public/assets/navigation-targets-Fxss68va.js +0 -1
  171. package/dist/public/assets/uninstall-Cfx0qbqa.js +0 -1
  172. package/dist/public/assets/use-timeline-entry-diff-BexxkO9d.js +0 -5
  173. package/dist/src-2phljj3W.mjs +0 -1
  174. package/dist/src-8U8NRuX2.mjs +0 -11
  175. package/dist/start-CWRlBbxO.mjs +0 -1
  176. /package/dist/public/assets/{globals-Cs3w5NCz.js → globals-iI2jjGV8.js} +0 -0
@@ -1 +1 @@
1
- import{N as e}from"./dist-CyWcc58M.js";var t=`open-knowledge:documents-changed`,n=new Set(e.options);function r(e){return e===void 0||!Array.isArray(e)?[`files`]:[...new Set(e.filter(e=>n.has(e)))]}function i(e=[`files`]){window.dispatchEvent(new CustomEvent(t,{detail:{channels:r(e)}}))}function a(e){let n=t=>{e(r(t instanceof CustomEvent?t.detail?.channels:void 0))};return window.addEventListener(t,n),()=>window.removeEventListener(t,n)}function o(e){return e.includes(`local-targets`)||e.includes(`files`)}var s=`open-knowledge:doc-persisted`;function c(e){window.dispatchEvent(new CustomEvent(s,{detail:{docName:e}}))}function l(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail?.docName;typeof n==`string`&&n.length>0&&e(n)};return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}var u=`open-knowledge:branch-changed`;function d(e){window.dispatchEvent(new CustomEvent(u,{detail:{branch:e}}))}function f(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail;e(n?.branch??null)};return window.addEventListener(u,t),()=>window.removeEventListener(u,t)}var p=`open-knowledge:templates-changed`;function m(){window.dispatchEvent(new CustomEvent(p))}function h(e){let t=()=>e();return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}var g=`open-knowledge:skills-changed`;function _(){window.dispatchEvent(new CustomEvent(g))}function v(e){let t=()=>e();return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}var y=`open-knowledge:skill-scope-moved`;function b(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}var S=new Set,C=(e,t)=>`${e}\u0000${t}`;function w(e,t){S.add(C(e,t)),_()}function T(e,t){S.delete(C(e,t))&&_()}var E=new Map;function D(e,t){let n=C(e,t);E.set(n,(E.get(n)??0)+1),_()}function O(e,t){let n=C(e,t),r=E.get(n);r!==void 0&&(r<=1?E.delete(n):E.set(n,r-1),_())}function k(e,t){return E.has(C(e,t))}function A(){return[...E.keys()].sort().join(``)}function j(e,t){return S.has(C(e,t))}function M(e){return S.size===0?e:e.filter(e=>!S.has(C(e.scope,e.name)))}export{l as _,c as a,v as b,_ as c,O as d,o as f,f as g,A as h,d as i,m as l,k as m,w as n,i as o,j as p,D as r,b as s,M as t,T as u,a as v,h as x,x as y};
1
+ import{N as e}from"./dist-75Tp0j2s.js";var t=`open-knowledge:documents-changed`,n=new Set(e.options);function r(e){return e===void 0||!Array.isArray(e)?[`files`]:[...new Set(e.filter(e=>n.has(e)))]}function i(e=[`files`]){window.dispatchEvent(new CustomEvent(t,{detail:{channels:r(e)}}))}function a(e){let n=t=>{e(r(t instanceof CustomEvent?t.detail?.channels:void 0))};return window.addEventListener(t,n),()=>window.removeEventListener(t,n)}function o(e){return e.includes(`local-targets`)||e.includes(`files`)}var s=`open-knowledge:doc-persisted`;function c(e){window.dispatchEvent(new CustomEvent(s,{detail:{docName:e}}))}function l(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail?.docName;typeof n==`string`&&n.length>0&&e(n)};return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}var u=`open-knowledge:branch-changed`;function d(e){window.dispatchEvent(new CustomEvent(u,{detail:{branch:e}}))}function f(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail;e(n?.branch??null)};return window.addEventListener(u,t),()=>window.removeEventListener(u,t)}var p=`open-knowledge:templates-changed`;function m(){window.dispatchEvent(new CustomEvent(p))}function h(e){let t=()=>e();return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}var g=`open-knowledge:skills-changed`;function _(){window.dispatchEvent(new CustomEvent(g))}function v(e){let t=()=>e();return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}var y=`open-knowledge:skill-scope-moved`;function b(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}var S=new Set,C=(e,t)=>`${e}\u0000${t}`;function w(e,t){S.add(C(e,t)),_()}function T(e,t){S.delete(C(e,t))&&_()}var E=new Map;function D(e,t){let n=C(e,t);E.set(n,(E.get(n)??0)+1),_()}function O(e,t){let n=C(e,t),r=E.get(n);r!==void 0&&(r<=1?E.delete(n):E.set(n,r-1),_())}function k(e,t){return E.has(C(e,t))}function A(){return[...E.keys()].sort().join(``)}function j(e,t){return S.has(C(e,t))}function M(e){return S.size===0?e:e.filter(e=>!S.has(C(e.scope,e.name)))}export{l as _,c as a,v as b,_ as c,O as d,o as f,f as g,A as h,d as i,m as l,k as m,w as n,i as o,j as p,D as r,b as s,M as t,T as u,a as v,h as x,x as y};
@@ -1 +1 @@
1
- import{Xo as e,Zo as t,rs as n,ts as r}from"./dist-CyWcc58M.js";import{c as i,l as a,u as o}from"./doc-hash-BEmc5wpM.js";import{i as s}from"./navigation-targets-Fxss68va.js";import{c,l,s as u}from"./file-tree-utils-Css5oRd6.js";import{t as d}from"./file-tree-rename-validation-CaMw2nJs.js";var f=`application/x-open-knowledge-sidebar-item+json`,p={image:!0,video:!0,audio:!0,pdf:!0,text:!0,mermaid:!0,excalidraw:!0};function m(e){return JSON.stringify(e)}function h(e){return e?Array.from(e.types).includes(f):!1}function ee(e){return e.kind===`folder`?{target:{kind:`folder`,target:e.folderPath,folderPath:e.folderPath},hash:o(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:i(e.assetPath)}:{target:s(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:a(e.docName)}}function g(e){if(!e||!h(e))return null;let t=e.getData(f);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!_(n)||n.v!==1||typeof n.kind!=`string`)return null;if(n.kind===`doc`){if(typeof n.docName!=`string`||n.docName.length===0)return null;let e=n.size;return e!==null&&typeof e!=`number`?null:{v:1,kind:`doc`,docName:n.docName,size:e}}if(n.kind===`folder`)return typeof n.folderPath==`string`?{v:1,kind:`folder`,folderPath:n.folderPath}:null;if(n.kind===`asset`){if(typeof n.assetPath!=`string`||n.assetPath.length===0)return null;let e=n.mediaKind;return e!==null&&!v(e)?null:{v:1,kind:`asset`,assetPath:n.assetPath,mediaKind:e}}return null}function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){return typeof e==`string`&&Object.hasOwn(p,e)}var y=`.md`,b=/\.(md|mdx)$/i;function x(n,i=y){return b.test(n)||r(n)||t(n)||e(n)?n:`${n}${i}`}function S(e){return $(e).replace(b,``)}function C(e,t){let n=$(e),r=k(t),i=t.find(e=>c(e)&&A(e,r)===n)??t.find(e=>c(e)&&T(e)===n);if(i)return i.docName;let a=S(n);return t.find(e=>{let t=T(e);return t!==n&&b.test(t)&&S(t)===a})&&b.test(n)?n:a}function w(e,t){let n=k(t);return t.find(t=>A(t,n)===e)??t.find(t=>T(t)===e)}function T(e){return l(e)?O(e.path):u(e)?e.path:x(e.docName,e.docExt)}function E(e){let t=$(e).match(b);return t?`.${t[1].toLowerCase()}`:void 0}function D(e){return $(e)}function O(e){let t=$(e.trim());return t?`${t}/`:``}function te(e){return e.endsWith(`/`)?D(e):S(e)}function k(e){let t=new Map;for(let n of e){if(!c(n))continue;let e=n.docName.match(b);if(!e)continue;let r=n.docName.slice(0,-e[0].length),i=t.get(r);i?i.add(e[0]):t.set(r,new Set([e[0]]))}return t}function A(e,t){let n=T(e);if(!c(e))return n;let r=e.docName.match(b);if(!r)return n;let i=e.docName.slice(0,-r[0].length);return(t.get(i)?.size??0)>1?n:`${e.docName}${e.docExt??y}`}function j(e){let t=k(e),n=new Set,r=[];for(let i of e){let e=A(i,t);n.has(e)||(n.add(e),r.push(e))}return r}function M(e){return[...e].sort().join(`\0`)}function N(e){return M(j(e))}function P(e,t={}){let n=new Set;for(let r of e){let e=(l(r)||u(r)?r.path:r.docName).split(`/`).filter(Boolean);if(!t.includeOkFolders&&e.includes(`.ok`))continue;if(l(r)){let e=O(r.path);e&&n.add(e)}let i=l(r)?e.length:e.length-1;for(let t=1;t<=i;t++)n.add(`${e.slice(0,t).join(`/`)}/`)}return[...n].sort()}function F(e){if(!e)return[];let t=$(e.replace(b,``)).split(`/`).filter(Boolean),n=[],r=e.endsWith(`/`)?t.length:t.length-1;for(let e=1;e<=r;e++)n.push(`${t.slice(0,e).join(`/`)}/`);return n}function I(e,t,n){let r=E(e);if(r)return r;let i=n.find(e=>c(e)&&e.docName===t);return i?i.docExt??y:Q(e).includes(`.`)?void 0:y}function L(e,t){let n=e.lastIndexOf(`/`),r=n===-1?``:e.slice(0,n+1),i=n===-1?e:e.slice(n+1),a=t.filter(e=>{if(!u(e)||!e.path.startsWith(r))return!1;let t=e.path.slice(r.length);return!t.includes(`/`)&&t.startsWith(`${i}.`)});return a.length===1?a[0].path:null}function R(e,t,n){if(E(e))return null;let r=n.find(e=>u(e)&&e.path===t);return r?r.path:Q(e).includes(`.`)?t:L(t,n)}function z(e,t){let n=e.kind===`directory`,r=n?D(e.path):C(e.path,t);if(n)return{kind:`folder`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!0)};let i=R(e.path,r,t);if(i)return{kind:`asset`,name:$(Q(i)),path:i,treePath:i};let a=I(e.path,r,t);return{kind:`file`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!1),docExt:a}}function B(e){return e.kind===`directory`?D(e.path):e.path}function V(e,t){return t?O(e):b.test(e)?e:`${e}${y}`}function H(e,t,n){let r=O(t),i=new Set(n);for(let t=0;t<100;t++){let n=t===0?``:` ${t+1}`;if(e===`file`){let e=`${r}Untitled${n}${y}`;if(!i.has(e))return{addPath:e,renamePath:e};continue}let a=`${r}New Folder${n}/`;if(!i.has(a))return{addPath:a,renamePath:a}}throw Error(`Could not allocate a unique tree placeholder`)}function U(e,t){return e===`file`?V(t,!1):`${D(t)}/index${y}`}function W(e,t){return t.kind===`root`||t.directoryPath==null?Q(e):`${t.directoryPath}${Q(e)}`}function G(e,t){if(t)return D(O(e));let n=S(e),r=n.lastIndexOf(`/`);return r===-1?``:n.slice(0,r)}function K(e,t){let n=D(O(e));return n?`${n}/${t}`:t}function q(e,t,n){e.append(`parentDocName`,K(t,n)),e.append(`placement`,`parent-dir`)}function J(e,t){return(t.path??K(e,t.src)).replace(/^\/+/,``)}function Y(e){let t=e.dataTransfer?.types;if(!t)return!1;let n=Array.from(t);return n.includes(`Files`)&&!n.includes(`application/x-open-knowledge-sidebar-item+json`)}function X(e){return Array.from(e.dataTransfer?.files??[]).filter(e=>e.name.length>0||e.size>0)}function Z(e,t){let r=d(e).toLowerCase();if(r===``)return null;let i=new Date().toISOString();if(r===`.md`||r===`.mdx`)return{kind:`document`,docName:S(e),docExt:r,modified:i,size:t.size};let a=r.startsWith(`.`)?r.slice(1):r;return{kind:`asset`,path:e,assetExt:a,mediaKind:n(a),modified:i,size:t.size}}function Q(e){let t=$(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function $(e){return e.endsWith(`/`)?e.slice(0,-1):e}export{g as A,z as C,f as D,J as E,h as O,C as S,te as T,G as _,U as a,D as b,j as c,T as d,X as f,V as g,Y as h,W as i,m as j,ee as k,N as l,O as m,P as n,H as o,w as p,F as r,x as s,q as t,Z as u,B as v,M as w,S as x,L as y};
1
+ import{Qo as e,Zo as t,is as n,ns as r}from"./dist-75Tp0j2s.js";import{c as i,l as a,u as o}from"./doc-hash-0sJsliMq.js";import{i as s}from"./navigation-targets-CLA-LGSO.js";import{c,l,s as u}from"./file-tree-utils-DQrKhuvs.js";import{t as d}from"./file-tree-rename-validation-CaMw2nJs.js";var f=`application/x-open-knowledge-sidebar-item+json`,p={image:!0,video:!0,audio:!0,pdf:!0,text:!0,mermaid:!0,excalidraw:!0};function m(e){return JSON.stringify(e)}function h(e){return e?Array.from(e.types).includes(f):!1}function ee(e){return e.kind===`folder`?{target:{kind:`folder`,target:e.folderPath,folderPath:e.folderPath},hash:o(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:i(e.assetPath)}:{target:s(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:a(e.docName)}}function g(e){if(!e||!h(e))return null;let t=e.getData(f);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!_(n)||n.v!==1||typeof n.kind!=`string`)return null;if(n.kind===`doc`){if(typeof n.docName!=`string`||n.docName.length===0)return null;let e=n.size;return e!==null&&typeof e!=`number`?null:{v:1,kind:`doc`,docName:n.docName,size:e}}if(n.kind===`folder`)return typeof n.folderPath==`string`?{v:1,kind:`folder`,folderPath:n.folderPath}:null;if(n.kind===`asset`){if(typeof n.assetPath!=`string`||n.assetPath.length===0)return null;let e=n.mediaKind;return e!==null&&!v(e)?null:{v:1,kind:`asset`,assetPath:n.assetPath,mediaKind:e}}return null}function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){return typeof e==`string`&&Object.hasOwn(p,e)}var y=`.md`,b=/\.(md|mdx)$/i;function x(n,i=y){return b.test(n)||r(n)||e(n)||t(n)?n:`${n}${i}`}function S(e){return $(e).replace(b,``)}function C(e,t){let n=$(e),r=k(t),i=t.find(e=>c(e)&&A(e,r)===n)??t.find(e=>c(e)&&T(e)===n);if(i)return i.docName;let a=S(n);return t.find(e=>{let t=T(e);return t!==n&&b.test(t)&&S(t)===a})&&b.test(n)?n:a}function w(e,t){let n=k(t);return t.find(t=>A(t,n)===e)??t.find(t=>T(t)===e)}function T(e){return l(e)?O(e.path):u(e)?e.path:x(e.docName,e.docExt)}function E(e){let t=$(e).match(b);return t?`.${t[1].toLowerCase()}`:void 0}function D(e){return $(e)}function O(e){let t=$(e.trim());return t?`${t}/`:``}function te(e){return e.endsWith(`/`)?D(e):S(e)}function k(e){let t=new Map;for(let n of e){if(!c(n))continue;let e=n.docName.match(b);if(!e)continue;let r=n.docName.slice(0,-e[0].length),i=t.get(r);i?i.add(e[0]):t.set(r,new Set([e[0]]))}return t}function A(e,t){let n=T(e);if(!c(e))return n;let r=e.docName.match(b);if(!r)return n;let i=e.docName.slice(0,-r[0].length);return(t.get(i)?.size??0)>1?n:`${e.docName}${e.docExt??y}`}function j(e){let t=k(e),n=new Set,r=[];for(let i of e){let e=A(i,t);n.has(e)||(n.add(e),r.push(e))}return r}function M(e){return[...e].sort().join(`\0`)}function N(e){return M(j(e))}function P(e,t={}){let n=new Set;for(let r of e){let e=(l(r)||u(r)?r.path:r.docName).split(`/`).filter(Boolean);if(!t.includeOkFolders&&e.includes(`.ok`))continue;if(l(r)){let e=O(r.path);e&&n.add(e)}let i=l(r)?e.length:e.length-1;for(let t=1;t<=i;t++)n.add(`${e.slice(0,t).join(`/`)}/`)}return[...n].sort()}function F(e){if(!e)return[];let t=$(e.replace(b,``)).split(`/`).filter(Boolean),n=[],r=e.endsWith(`/`)?t.length:t.length-1;for(let e=1;e<=r;e++)n.push(`${t.slice(0,e).join(`/`)}/`);return n}function I(e,t,n){let r=E(e);if(r)return r;let i=n.find(e=>c(e)&&e.docName===t);return i?i.docExt??y:Q(e).includes(`.`)?void 0:y}function L(e,t){let n=e.lastIndexOf(`/`),r=n===-1?``:e.slice(0,n+1),i=n===-1?e:e.slice(n+1),a=t.filter(e=>{if(!u(e)||!e.path.startsWith(r))return!1;let t=e.path.slice(r.length);return!t.includes(`/`)&&t.startsWith(`${i}.`)});return a.length===1?a[0].path:null}function R(e,t,n){if(E(e))return null;let r=n.find(e=>u(e)&&e.path===t);return r?r.path:Q(e).includes(`.`)?t:L(t,n)}function z(e,t){let n=e.kind===`directory`,r=n?D(e.path):C(e.path,t);if(n)return{kind:`folder`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!0)};let i=R(e.path,r,t);if(i)return{kind:`asset`,name:$(Q(i)),path:i,treePath:i};let a=I(e.path,r,t);return{kind:`file`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!1),docExt:a}}function B(e){return e.kind===`directory`?D(e.path):e.path}function V(e,t){return t?O(e):b.test(e)?e:`${e}${y}`}function H(e,t,n){let r=O(t),i=new Set(n);for(let t=0;t<100;t++){let n=t===0?``:` ${t+1}`;if(e===`file`){let e=`${r}Untitled${n}${y}`;if(!i.has(e))return{addPath:e,renamePath:e};continue}let a=`${r}New Folder${n}/`;if(!i.has(a))return{addPath:a,renamePath:a}}throw Error(`Could not allocate a unique tree placeholder`)}function U(e,t){return e===`file`?V(t,!1):`${D(t)}/index${y}`}function W(e,t){return t.kind===`root`||t.directoryPath==null?Q(e):`${t.directoryPath}${Q(e)}`}function G(e,t){if(t)return D(O(e));let n=S(e),r=n.lastIndexOf(`/`);return r===-1?``:n.slice(0,r)}function K(e,t){let n=D(O(e));return n?`${n}/${t}`:t}function q(e,t,n){e.append(`parentDocName`,K(t,n)),e.append(`placement`,`parent-dir`)}function J(e,t){return(t.path??K(e,t.src)).replace(/^\/+/,``)}function Y(e){let t=e.dataTransfer?.types;if(!t)return!1;let n=Array.from(t);return n.includes(`Files`)&&!n.includes(`application/x-open-knowledge-sidebar-item+json`)}function X(e){return Array.from(e.dataTransfer?.files??[]).filter(e=>e.name.length>0||e.size>0)}function Z(e,t){let r=d(e).toLowerCase();if(r===``)return null;let i=new Date().toISOString();if(r===`.md`||r===`.mdx`)return{kind:`document`,docName:S(e),docExt:r,modified:i,size:t.size};let a=r.startsWith(`.`)?r.slice(1):r;return{kind:`asset`,path:e,assetExt:a,mediaKind:n(a),modified:i,size:t.size}}function Q(e){let t=$(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function $(e){return e.endsWith(`/`)?e.slice(0,-1):e}export{g as A,z as C,f as D,J as E,h as O,C as S,te as T,G as _,U as a,D as b,j as c,T as d,X as f,V as g,Y as h,W as i,m as j,ee as k,N as l,O as m,P as n,H as o,w as p,F as r,x as s,q as t,Z as u,B as v,M as w,S as x,L as y};
@@ -1 +1 @@
1
- import{Qr as e,ii as t,zs as n}from"./dist-CyWcc58M.js";function r(e){return e.kind===`asset`}function i(e){return e.kind===`document`}function a(e){return e.kind===`folder`}function o(e){let t=[],n=0;for(let r of e)switch(r.kind){case`document`:if(r.docName===void 0){n+=1;break}t.push({kind:`document`,docName:r.docName,docExt:r.docExt,size:r.size,modified:r.modified,isSymlink:r.isSymlink,canonicalDocName:r.canonicalDocName,targetPath:r.targetPath});break;case`asset`:if(r.path===void 0||r.assetExt===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt,mediaKind:r.mediaKind??null,size:r.size,modified:r.modified,referencedBy:r.referencedBy});break;case`file`:if(r.path===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt??s(r.path),mediaKind:null,size:r.size,modified:r.modified,referencedBy:[]});break;case`folder`:if(r.path===void 0){n+=1;break}t.push({kind:`folder`,path:r.path,size:r.size,modified:r.modified,hasChildren:r.hasChildren,isSymlink:r.isSymlink,targetPath:r.targetPath});break;default:r.kind;break}return n>0&&console.warn(`[file-tree-utils] dropped ${n} listing entries missing variant identity fields`),t}function s(e){let t=e.includes(`/`)?e.split(`/`).pop()??e:e,n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():t.startsWith(`.`)&&t.length>1?t.slice(1).toLowerCase():`file`}function c(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function l(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function u(e){return e.split(`/`).some(e=>e.toLowerCase()===`.ok`)}function d(e,t){return t&&e!==`document`&&e!==`folder`}function f(t,n){return!n&&e(t)}function p(n,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1,showOkFolders:o=!1}=r;return n.filter(n=>{let r=n.docName??n.path??``;if(r===``||d(n.kind,a))return!1;let s=r.split(`/`),c=s.indexOf(`.ok`);if(c!==-1){if(!o)return!1;let t=s.slice(0,c).join(`/`);return i||t===``||!e(t)}return t(r)?!1:!f(r,i)})}function m(e,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1}=r,o=e.docName??e.path??``;return o===``||n(o)||t(o)||u(o)?{hiddenFiles:!1,onlyMarkdownFiles:!1}:{hiddenFiles:f(o,i),onlyMarkdownFiles:d(e.kind,a)}}function h(e){let{visibility:t={},unfilteredRootEntryCount:n,knownPageCount:r}=e;return(n>0||r>0)&&(t.showOnlyMarkdownFiles??!1)?`filtered-to-zero`:`true-empty`}export{p as a,i as c,o as d,l as i,a as l,h as n,u as o,c as r,r as s,m as t,s as u};
1
+ import{$r as e,Bs as t,ai as n}from"./dist-75Tp0j2s.js";function r(e){return e.kind===`asset`}function i(e){return e.kind===`document`}function a(e){return e.kind===`folder`}function o(e){let t=[],n=0;for(let r of e)switch(r.kind){case`document`:if(r.docName===void 0){n+=1;break}t.push({kind:`document`,docName:r.docName,docExt:r.docExt,size:r.size,modified:r.modified,isSymlink:r.isSymlink,canonicalDocName:r.canonicalDocName,targetPath:r.targetPath});break;case`asset`:if(r.path===void 0||r.assetExt===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt,mediaKind:r.mediaKind??null,size:r.size,modified:r.modified,referencedBy:r.referencedBy});break;case`file`:if(r.path===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt??s(r.path),mediaKind:null,size:r.size,modified:r.modified,referencedBy:[]});break;case`folder`:if(r.path===void 0){n+=1;break}t.push({kind:`folder`,path:r.path,size:r.size,modified:r.modified,hasChildren:r.hasChildren,isSymlink:r.isSymlink,targetPath:r.targetPath});break;default:r.kind;break}return n>0&&console.warn(`[file-tree-utils] dropped ${n} listing entries missing variant identity fields`),t}function s(e){let t=e.includes(`/`)?e.split(`/`).pop()??e:e,n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():t.startsWith(`.`)&&t.length>1?t.slice(1).toLowerCase():`file`}function c(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function l(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function u(e){return e.split(`/`).some(e=>e.toLowerCase()===`.ok`)}function d(e,t){return t&&e!==`document`&&e!==`folder`}function f(t,n){return!n&&e(t)}function p(t,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1,showOkFolders:o=!1}=r;return t.filter(t=>{let r=t.docName??t.path??``;if(r===``||d(t.kind,a))return!1;let s=r.split(`/`),c=s.indexOf(`.ok`);if(c!==-1){if(!o)return!1;let t=s.slice(0,c).join(`/`);return i||t===``||!e(t)}return n(r)?!1:!f(r,i)})}function m(e,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1}=r,o=e.docName??e.path??``;return o===``||t(o)||n(o)||u(o)?{hiddenFiles:!1,onlyMarkdownFiles:!1}:{hiddenFiles:f(o,i),onlyMarkdownFiles:d(e.kind,a)}}function h(e){let{visibility:t={},unfilteredRootEntryCount:n,knownPageCount:r}=e;return(n>0||r>0)&&(t.showOnlyMarkdownFiles??!1)?`filtered-to-zero`:`true-empty`}export{p as a,i as c,o as d,l as i,a as l,h as n,u as o,c as r,r as s,m as t,s as u};
@@ -1 +1 @@
1
- import{l as e}from"./documents-events-D_K3dHNa.js";import{t}from"./parse-api-error-BtEdpaFC.js";import{t as n}from"./createLucideIcon-B6ULg5PN.js";var r=n(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]);async function i(e){return t(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function a(e,t){try{let n=await fetch(`/api/folder-config`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e,frontmatter:t})});return n.ok?{ok:!0}:{ok:!1,error:await i(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(t){try{let n=await fetch(`/api/template`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function s(t,n){try{let r=`?folder=${encodeURIComponent(t)}&name=${encodeURIComponent(n)}`,a=await fetch(`/api/template${r}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return e(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function c(t){try{let n=await fetch(`/api/template`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,committed:r?.committed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function l(t){try{let n=await fetch(`/api/template/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,path:r?.path??``,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{o as a,a as i,l as n,r as o,c as r,s as t};
1
+ import{l as e}from"./documents-events-DvTemRtX.js";import{t}from"./parse-api-error-BtEdpaFC.js";import{t as n}from"./createLucideIcon-B6ULg5PN.js";var r=n(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]);async function i(e){return t(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function a(e,t){try{let n=await fetch(`/api/folder-config`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e,frontmatter:t})});return n.ok?{ok:!0}:{ok:!1,error:await i(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(t){try{let n=await fetch(`/api/template`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function s(t,n){try{let r=`?folder=${encodeURIComponent(t)}&name=${encodeURIComponent(n)}`,a=await fetch(`/api/template${r}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return e(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function c(t){try{let n=await fetch(`/api/template`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,committed:r?.committed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function l(t){try{let n=await fetch(`/api/template/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,path:r?.path??``,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{o as a,a as i,l as n,r as o,c as r,s as t};