@vuepress/theme-default 2.0.0-rc.130 → 2.0.0-rc.131

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 (116) hide show
  1. package/dist/client/components/VPNavbar.vue +1 -0
  2. package/dist/client/components/VPSidebarItem.vue +1 -1
  3. package/dist/client/composables/index.d.ts +11 -11
  4. package/dist/client/composables/index.js +1 -1
  5. package/dist/client/composables/useDarkMode.d.ts +1 -1
  6. package/dist/client/composables/useDarkMode.js +1 -2
  7. package/dist/client/composables/useData.d.ts +1 -1
  8. package/dist/client/composables/useData.js +1 -2
  9. package/dist/client/composables/useEditLink.d.ts +1 -1
  10. package/dist/client/composables/useEditLink.js +1 -2
  11. package/dist/client/composables/useNavbarConfig.d.ts +1 -1
  12. package/dist/client/composables/useNavbarConfig.js +1 -2
  13. package/dist/client/composables/useNavbarRepo.d.ts +1 -1
  14. package/dist/client/composables/useNavbarRepo.js +1 -2
  15. package/dist/client/composables/useNavbarSelectLanguage.d.ts +1 -1
  16. package/dist/client/composables/useNavbarSelectLanguage.js +1 -2
  17. package/dist/client/composables/useNavigate.d.ts +1 -1
  18. package/dist/client/composables/useNavigate.js +1 -2
  19. package/dist/client/composables/useRelatedLinks.d.ts +1 -1
  20. package/dist/client/composables/useRelatedLinks.js +1 -2
  21. package/dist/client/composables/useScrollPromise.d.ts +1 -1
  22. package/dist/client/composables/useScrollPromise.js +1 -2
  23. package/dist/client/composables/useSidebarItems.d.ts +1 -1
  24. package/dist/client/composables/useSidebarItems.js +1 -2
  25. package/dist/client/composables/useUpdateDeviceStatus.d.ts +1 -1
  26. package/dist/client/composables/useUpdateDeviceStatus.js +1 -2
  27. package/dist/client/config.d.ts +1 -2
  28. package/dist/client/config.js.map +1 -1
  29. package/dist/client/index.d.ts +19 -19
  30. package/dist/client/index.js +1 -1
  31. package/dist/client/utils/index.d.ts +5 -5
  32. package/dist/client/utils/index.js +1 -1
  33. package/dist/client/utils/isActiveSidebarItem.d.ts +1 -1
  34. package/dist/client/utils/isActiveSidebarItem.js +1 -2
  35. package/dist/client/utils/resolveAutoLink.d.ts +1 -1
  36. package/dist/client/utils/resolveAutoLink.js +1 -2
  37. package/dist/client/utils/resolveEditLink.d.ts +1 -1
  38. package/dist/client/utils/resolveEditLink.js +1 -2
  39. package/dist/client/utils/resolvePrefix.d.ts +1 -1
  40. package/dist/client/utils/resolvePrefix.js +1 -2
  41. package/dist/client/utils/resolveRepoType.d.ts +1 -1
  42. package/dist/client/utils/resolveRepoType.js +1 -2
  43. package/dist/composables-CAISgiXf.js +1 -0
  44. package/dist/index-BKZ67WMa.d.ts +1 -0
  45. package/dist/index-BVVgDSdq.d.ts +1 -0
  46. package/dist/{index-BNjRb2Mr.d.ts → index-ur5YvkCJ.d.ts} +1 -1
  47. package/dist/isActiveSidebarItem-BQHhsM53.js +2 -0
  48. package/dist/isActiveSidebarItem-BQHhsM53.js.map +1 -0
  49. package/dist/{isActiveSidebarItem-DE0Ymo1m.d.ts → isActiveSidebarItem-K6rOnBw4.d.ts} +2 -2
  50. package/dist/node/index.d.ts +2 -2
  51. package/dist/node/index.js +1 -1
  52. package/dist/node/index.js.map +1 -1
  53. package/dist/{resolveAutoLink-bQLxrWMd.d.ts → resolveAutoLink-DBXc0Cd3.d.ts} +2 -2
  54. package/dist/resolveAutoLink-XUJwl3Kb.js +2 -0
  55. package/dist/resolveAutoLink-XUJwl3Kb.js.map +1 -0
  56. package/dist/{resolveEditLink-DRtLIWXz.d.ts → resolveEditLink-BRZu2eno.d.ts} +1 -1
  57. package/dist/resolveEditLink-lteF0-Mv.js +2 -0
  58. package/dist/resolveEditLink-lteF0-Mv.js.map +1 -0
  59. package/dist/{resolvePrefix-DEl0CDB0.d.ts → resolvePrefix-BXZhEIJn.d.ts} +1 -1
  60. package/dist/resolvePrefix-CQnTmTk4.js +2 -0
  61. package/dist/resolvePrefix-CQnTmTk4.js.map +1 -0
  62. package/dist/resolveRepoType-BfcHRhpi.js +2 -0
  63. package/dist/resolveRepoType-BfcHRhpi.js.map +1 -0
  64. package/dist/{resolveRepoType-DefRTDOt.d.ts → resolveRepoType-DEy0Gvc4.d.ts} +1 -1
  65. package/dist/{typings-D-rXvaET.d.ts → typings-CiGFIZqG.d.ts} +2 -2
  66. package/dist/useDarkMode-BfKvIN6K.js +2 -0
  67. package/dist/useDarkMode-BfKvIN6K.js.map +1 -0
  68. package/dist/{useDarkMode-Zrmg4e6i.d.ts → useDarkMode-uRSRwA8U.d.ts} +1 -1
  69. package/dist/{useData-BFB4h32K.d.ts → useData-DwmcO8iz.d.ts} +2 -2
  70. package/dist/useData-nv4hwlgW.js +2 -0
  71. package/dist/useData-nv4hwlgW.js.map +1 -0
  72. package/dist/useEditLink-BmoW42FE.js +2 -0
  73. package/dist/useEditLink-BmoW42FE.js.map +1 -0
  74. package/dist/{useEditLink-m723nvlZ.d.ts → useEditLink-COgJktiW.d.ts} +1 -1
  75. package/dist/useNavbarConfig-CxVplYul.js +2 -0
  76. package/dist/useNavbarConfig-CxVplYul.js.map +1 -0
  77. package/dist/{useNavbarConfig-BnkOLDyM.d.ts → useNavbarConfig-fLxvBobP.d.ts} +2 -2
  78. package/dist/useNavbarRepo-BScd94be.js +2 -0
  79. package/dist/useNavbarRepo-BScd94be.js.map +1 -0
  80. package/dist/{useNavbarRepo-BT8z2mBp.d.ts → useNavbarRepo-DndxHxeK.d.ts} +2 -2
  81. package/dist/useNavbarSelectLanguage-FHyzHFEW.js +2 -0
  82. package/dist/useNavbarSelectLanguage-FHyzHFEW.js.map +1 -0
  83. package/dist/{useNavbarSelectLanguage-DMcyeLfA.d.ts → useNavbarSelectLanguage-a9ZpUKwM.d.ts} +2 -2
  84. package/dist/useNavigate-mlFey3ew.js +2 -0
  85. package/dist/useNavigate-mlFey3ew.js.map +1 -0
  86. package/dist/{useNavigate-D__eeZa2.d.ts → useNavigate-zqYnxkd_.d.ts} +1 -1
  87. package/dist/useRelatedLinks-BwsPumn1.js +2 -0
  88. package/dist/useRelatedLinks-BwsPumn1.js.map +1 -0
  89. package/dist/{useRelatedLinks-CoqxjiuJ.d.ts → useRelatedLinks-DxkE-gdP.d.ts} +2 -2
  90. package/dist/useScrollPromise-CB6ZLciv.js +2 -0
  91. package/dist/useScrollPromise-CB6ZLciv.js.map +1 -0
  92. package/dist/{useScrollPromise-DtXkT3fi.d.ts → useScrollPromise-TwtWBE3d.d.ts} +2 -2
  93. package/dist/useSidebarItems-CL0nJ7E8.js +2 -0
  94. package/dist/useSidebarItems-CL0nJ7E8.js.map +1 -0
  95. package/dist/{useSidebarItems-nMm3AAZ3.d.ts → useSidebarItems-aGO1YtUp.d.ts} +3 -3
  96. package/dist/{useUpdateDeviceStatus-B3bXVdPs.d.ts → useUpdateDeviceStatus-CsrJ_Qqv.d.ts} +1 -1
  97. package/dist/useUpdateDeviceStatus-DMKiVB3W.js +2 -0
  98. package/dist/useUpdateDeviceStatus-DMKiVB3W.js.map +1 -0
  99. package/dist/utils-CAISgiXf.js +1 -0
  100. package/package.json +21 -21
  101. package/dist/client/composables/useDarkMode.js.map +0 -1
  102. package/dist/client/composables/useData.js.map +0 -1
  103. package/dist/client/composables/useEditLink.js.map +0 -1
  104. package/dist/client/composables/useNavbarConfig.js.map +0 -1
  105. package/dist/client/composables/useNavbarRepo.js.map +0 -1
  106. package/dist/client/composables/useNavbarSelectLanguage.js.map +0 -1
  107. package/dist/client/composables/useNavigate.js.map +0 -1
  108. package/dist/client/composables/useRelatedLinks.js.map +0 -1
  109. package/dist/client/composables/useScrollPromise.js.map +0 -1
  110. package/dist/client/composables/useSidebarItems.js.map +0 -1
  111. package/dist/client/composables/useUpdateDeviceStatus.js.map +0 -1
  112. package/dist/client/utils/isActiveSidebarItem.js.map +0 -1
  113. package/dist/client/utils/resolveAutoLink.js.map +0 -1
  114. package/dist/client/utils/resolveEditLink.js.map +0 -1
  115. package/dist/client/utils/resolvePrefix.js.map +0 -1
  116. package/dist/client/utils/resolveRepoType.js.map +0 -1
@@ -43,6 +43,7 @@ const getCssValue = (el: HTMLElement | null, property: string): number => {
43
43
  property as keyof CSSStyleDeclaration
44
44
  ]
45
45
 
46
+ // oxlint-disable-next-line unicorn/prefer-number-coercion
46
47
  const num = Number.parseInt(val as string, 10)
47
48
 
48
49
  return Number.isNaN(num) ? 0 : num
@@ -43,7 +43,7 @@ const onClick = (event: Event): void => {
43
43
 
44
44
  // reset open status after navigation
45
45
  const unregisterRouterHook = router.afterEach(() => {
46
- void nextTick(() => {
46
+ void nextTick().then(() => {
47
47
  isOpen.value = isOpenDefault.value
48
48
  })
49
49
  })
@@ -1,12 +1,12 @@
1
- import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../../useDarkMode-Zrmg4e6i.js";
2
- import { n as useData, t as Data } from "../../useData-BFB4h32K.js";
3
- import { t as useEditLink } from "../../useEditLink-m723nvlZ.js";
4
- import { t as useNavigate } from "../../useNavigate-D__eeZa2.js";
5
- import { t as useNavbarConfig } from "../../useNavbarConfig-BnkOLDyM.js";
6
- import { t as useNavbarRepo } from "../../useNavbarRepo-BT8z2mBp.js";
7
- import { t as useNavbarSelectLanguage } from "../../useNavbarSelectLanguage-DMcyeLfA.js";
8
- import { t as useRelatedLinks } from "../../useRelatedLinks-CoqxjiuJ.js";
9
- import { n as useScrollPromise, t as ScrollPromise } from "../../useScrollPromise-DtXkT3fi.js";
10
- import { a as resolveSidebarItems, c as setupSidebarItems, i as resolveSidebarHeadingItem, l as sidebarItemsSymbol, n as resolveArraySidebarItems, o as resolveSidebarPageHeader, r as resolveMultiSidebarItems, s as resolveSidebarPageHeaders, t as SidebarItemsRef, u as useSidebarItems } from "../../useSidebarItems-nMm3AAZ3.js";
11
- import { n as useUpdateDeviceStatus, t as DeviceType } from "../../useUpdateDeviceStatus-B3bXVdPs.js";
1
+ import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../../useDarkMode-uRSRwA8U.js";
2
+ import { n as useData, t as Data } from "../../useData-DwmcO8iz.js";
3
+ import { t as useEditLink } from "../../useEditLink-COgJktiW.js";
4
+ import { t as useNavigate } from "../../useNavigate-zqYnxkd_.js";
5
+ import { t as useNavbarConfig } from "../../useNavbarConfig-fLxvBobP.js";
6
+ import { t as useNavbarRepo } from "../../useNavbarRepo-DndxHxeK.js";
7
+ import { t as useNavbarSelectLanguage } from "../../useNavbarSelectLanguage-a9ZpUKwM.js";
8
+ import { t as useRelatedLinks } from "../../useRelatedLinks-DxkE-gdP.js";
9
+ import { n as useScrollPromise, t as ScrollPromise } from "../../useScrollPromise-TwtWBE3d.js";
10
+ import { a as resolveSidebarItems, c as setupSidebarItems, i as resolveSidebarHeadingItem, l as sidebarItemsSymbol, n as resolveArraySidebarItems, o as resolveSidebarPageHeader, r as resolveMultiSidebarItems, s as resolveSidebarPageHeaders, t as SidebarItemsRef, u as useSidebarItems } from "../../useSidebarItems-aGO1YtUp.js";
11
+ import { n as useUpdateDeviceStatus, t as DeviceType } from "../../useUpdateDeviceStatus-CsrJ_Qqv.js";
12
12
  export { DarkModeRef, Data, DeviceType, ScrollPromise, SidebarItemsRef, resolveArraySidebarItems, resolveMultiSidebarItems, resolveSidebarHeadingItem, resolveSidebarItems, resolveSidebarPageHeader, resolveSidebarPageHeaders, setupDarkMode, setupSidebarItems, sidebarItemsSymbol, useDarkMode, useData, useEditLink, useNavbarConfig, useNavbarRepo, useNavbarSelectLanguage, useNavigate, useRelatedLinks, useScrollPromise, useSidebarItems, useUpdateDeviceStatus };
@@ -1 +1 @@
1
- import{setupDarkMode as e,useDarkMode as t}from"./useDarkMode.js";import{useData as n}from"./useData.js";import{useEditLink as r}from"./useEditLink.js";import{useNavigate as i}from"./useNavigate.js";import{useNavbarConfig as a}from"./useNavbarConfig.js";import{useNavbarRepo as o}from"./useNavbarRepo.js";import{useNavbarSelectLanguage as s}from"./useNavbarSelectLanguage.js";import{useRelatedLinks as c}from"./useRelatedLinks.js";import{useScrollPromise as l}from"./useScrollPromise.js";import{resolveArraySidebarItems as u,resolveMultiSidebarItems as d,resolveSidebarHeadingItem as f,resolveSidebarItems as p,resolveSidebarPageHeader as m,resolveSidebarPageHeaders as h,setupSidebarItems as g,sidebarItemsSymbol as _,useSidebarItems as v}from"./useSidebarItems.js";import{DeviceType as y,useUpdateDeviceStatus as b}from"./useUpdateDeviceStatus.js";export{y as DeviceType,u as resolveArraySidebarItems,d as resolveMultiSidebarItems,f as resolveSidebarHeadingItem,p as resolveSidebarItems,m as resolveSidebarPageHeader,h as resolveSidebarPageHeaders,e as setupDarkMode,g as setupSidebarItems,_ as sidebarItemsSymbol,t as useDarkMode,n as useData,r as useEditLink,a as useNavbarConfig,o as useNavbarRepo,s as useNavbarSelectLanguage,i as useNavigate,c as useRelatedLinks,l as useScrollPromise,v as useSidebarItems,b as useUpdateDeviceStatus};
1
+ import{n as e,t}from"../../useDarkMode-BfKvIN6K.js";import{t as n}from"../../useData-nv4hwlgW.js";import{t as r}from"../../useEditLink-BmoW42FE.js";import{t as i}from"../../useNavigate-mlFey3ew.js";import{t as a}from"../../useNavbarConfig-CxVplYul.js";import{t as o}from"../../useNavbarRepo-BScd94be.js";import{t as s}from"../../useNavbarSelectLanguage-FHyzHFEW.js";import{t as c}from"../../useRelatedLinks-BwsPumn1.js";import{t as l}from"../../useScrollPromise-CB6ZLciv.js";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"../../useSidebarItems-CL0nJ7E8.js";import{n as y,t as b}from"../../useUpdateDeviceStatus-DMKiVB3W.js";import"../../composables-CAISgiXf.js";export{b as DeviceType,v as resolveArraySidebarItems,m as resolveMultiSidebarItems,g as resolveSidebarHeadingItem,f as resolveSidebarItems,u as resolveSidebarPageHeader,h as resolveSidebarPageHeaders,t as setupDarkMode,_ as setupSidebarItems,d as sidebarItemsSymbol,e as useDarkMode,n as useData,r as useEditLink,a as useNavbarConfig,o as useNavbarRepo,s as useNavbarSelectLanguage,i as useNavigate,c as useRelatedLinks,l as useScrollPromise,p as useSidebarItems,y as useUpdateDeviceStatus};
@@ -1,2 +1,2 @@
1
- import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../../useDarkMode-Zrmg4e6i.js";
1
+ import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../../useDarkMode-uRSRwA8U.js";
2
2
  export { DarkModeRef, setupDarkMode, useDarkMode };
@@ -1,2 +1 @@
1
- import{darkModeSymbol as e}from"@vuepress/helper/client";import{usePreferredDark as t,useStorage as n,watchImmediate as r}from"@vueuse/core";import{computed as i,inject as a,onMounted as o,onUnmounted as s,provide as c}from"vue";import{useData as l}from"@theme/useData";const u=e=>{let t=globalThis.document.documentElement;t.dataset.theme=e?`dark`:`light`},d=e=>{o(()=>{r(e,u)}),s(()=>{u(e.value)})},f=()=>{let t=a(e);if(!t)throw Error(`useDarkMode() is called without provider.`);return t},p=()=>{let{themeLocale:r}=l(),a=t(),o=n(`vuepress-color-scheme`,r.value.colorMode),s=i({get(){return r.value.colorModeSwitch?o.value===`auto`?a.value:o.value===`dark`:r.value.colorMode===`dark`},set(e){e===a.value?o.value=`auto`:o.value=e?`dark`:`light`}});c(e,s),d(s)};export{p as setupDarkMode,f as useDarkMode};
2
- //# sourceMappingURL=useDarkMode.js.map
1
+ import{n as e,t}from"../../useDarkMode-BfKvIN6K.js";export{t as setupDarkMode,e as useDarkMode};
@@ -1,2 +1,2 @@
1
- import { n as useData, t as Data } from "../../useData-BFB4h32K.js";
1
+ import { n as useData, t as Data } from "../../useData-DwmcO8iz.js";
2
2
  export { Data, useData };
@@ -1,2 +1 @@
1
- import{useData as e}from"vuepress/client";import{useThemeData as t,useThemeLocaleData as n}from"@vuepress/plugin-theme-data/client";const r=()=>({...e(),theme:t(),themeLocale:n()});export{r as useData};
2
- //# sourceMappingURL=useData.js.map
1
+ import{t as e}from"../../useData-nv4hwlgW.js";export{e as useData};
@@ -1,2 +1,2 @@
1
- import { t as useEditLink } from "../../useEditLink-m723nvlZ.js";
1
+ import { t as useEditLink } from "../../useEditLink-COgJktiW.js";
2
2
  export { useEditLink };
@@ -1,2 +1 @@
1
- import{computed as e}from"vue";import{useData as t}from"@theme/useData";import{resolveEditLink as n}from"@theme/resolveEditLink";const r=()=>{let{frontmatter:r,page:i,themeLocale:a}=t();return e(()=>{if(!(r.value.editLink??a.value.editLink??!0))return null;let{repo:e,docsRepo:t=e,docsBranch:o=`main`,docsDir:s=``,editLinkText:c}=a.value;if(!t)return null;let l=n({docsRepo:t,docsBranch:o,docsDir:s,filePathRelative:i.value.filePathRelative,editLinkPattern:r.value.editLinkPattern??a.value.editLinkPattern});return l?{text:c??`Edit this page`,link:l}:null})};export{r as useEditLink};
2
- //# sourceMappingURL=useEditLink.js.map
1
+ import{t as e}from"../../useEditLink-BmoW42FE.js";export{e as useEditLink};
@@ -1,2 +1,2 @@
1
- import { t as useNavbarConfig } from "../../useNavbarConfig-BnkOLDyM.js";
1
+ import { t as useNavbarConfig } from "../../useNavbarConfig-fLxvBobP.js";
2
2
  export { useNavbarConfig };
@@ -1,2 +1 @@
1
- import{isString as e}from"vuepress/shared";import{isLinkRelative as t}from"@vuepress/helper/client";import{computed as n}from"vue";import{useData as r}from"@theme/useData";import{resolveAutoLink as i}from"@theme/resolveAutoLink";import{resolvePrefix as a}from"@theme/resolvePrefix";const o=(n,r=``)=>e(n)?i(a(r,n)):`children`in n?{...n,children:n.children.map(e=>o(e,a(r,n.prefix)))}:{...n,link:t(n.link)?i(a(r,n.link)).link:n.link},s=()=>{let{themeLocale:e}=r();return n(()=>(e.value.navbar||[]).map(e=>o(e)))};export{s as useNavbarConfig};
2
- //# sourceMappingURL=useNavbarConfig.js.map
1
+ import{t as e}from"../../useNavbarConfig-CxVplYul.js";export{e as useNavbarConfig};
@@ -1,2 +1,2 @@
1
- import { t as useNavbarRepo } from "../../useNavbarRepo-BT8z2mBp.js";
1
+ import { t as useNavbarRepo } from "../../useNavbarRepo-DndxHxeK.js";
2
2
  export { useNavbarRepo };
@@ -1,2 +1 @@
1
- import{isLinkHttp as e}from"vuepress/shared";import{computed as t}from"vue";import{useData as n}from"@theme/useData";import{resolveRepoType as r}from"@theme/resolveRepoType";const i=()=>{let{themeLocale:i}=n(),a=t(()=>i.value.repo),o=t(()=>a.value?r(a.value):null),s=t(()=>a.value&&!e(a.value)?`https://github.com/${a.value}`:a.value),c=t(()=>s.value?i.value.repoLabel?i.value.repoLabel:o.value==null?`Source`:o.value:null);return t(()=>!s.value||!c.value?[]:[{text:c.value,link:s.value}])};export{i as useNavbarRepo};
2
- //# sourceMappingURL=useNavbarRepo.js.map
1
+ import{t as e}from"../../useNavbarRepo-BScd94be.js";export{e as useNavbarRepo};
@@ -1,2 +1,2 @@
1
- import { t as useNavbarSelectLanguage } from "../../useNavbarSelectLanguage-DMcyeLfA.js";
1
+ import { t as useNavbarSelectLanguage } from "../../useNavbarSelectLanguage-a9ZpUKwM.js";
2
2
  export { useNavbarSelectLanguage };
@@ -1,2 +1 @@
1
- import{useRoutePaths as e}from"@vuepress/helper/client";import{useRoute as t}from"vuepress/client";import{useMounted as n}from"@vueuse/core";import{computed as r}from"vue";import{useData as i}from"@theme/useData";const a=()=>{let a=t(),o=e(),{routeLocale:s,site:c,siteLocale:l,theme:u,themeLocale:d}=i(),f=n();return r(()=>{let e=Object.keys(c.value.locales);if(e.length<2)return[];let t=a.path,n=a.fullPath;return[{text:`${d.value.selectLanguageText}`,ariaLabel:`${d.value.selectLanguageAriaLabel??d.value.selectLanguageText}`,children:e.map(e=>{let r=c.value.locales?.[e]??{},i=u.value.locales?.[e]??{},a=`${r.lang}`,d=i.selectLanguageName??a;if(a===l.value.lang)return{text:d,activeMatch:`.`,link:f.value?n:t};let p=t.replace(s.value,e);return{text:d,link:o.value.some(e=>e===p)?f.value?n.replace(t,p):p:i.home??e}})}]})};export{a as useNavbarSelectLanguage};
2
- //# sourceMappingURL=useNavbarSelectLanguage.js.map
1
+ import{t as e}from"../../useNavbarSelectLanguage-FHyzHFEW.js";export{e as useNavbarSelectLanguage};
@@ -1,2 +1,2 @@
1
- import { t as useNavigate } from "../../useNavigate-D__eeZa2.js";
1
+ import { t as useNavigate } from "../../useNavigate-zqYnxkd_.js";
2
2
  export { useNavigate };
@@ -1,2 +1 @@
1
- import{isLinkAbsolute as e,isLinkWithProtocol as t}from"@vuepress/helper/client";import{useRoute as n,useRouter as r}from"vuepress/client";const i=()=>{let i=r(),a=n();return n=>{n&&(e(n)?a.fullPath!==n&&i.push(n):t(n)?window.open(n):i.push(encodeURI(n)))}};export{i as useNavigate};
2
- //# sourceMappingURL=useNavigate.js.map
1
+ import{t as e}from"../../useNavigate-mlFey3ew.js";export{e as useNavigate};
@@ -1,2 +1,2 @@
1
- import { t as useRelatedLinks } from "../../useRelatedLinks-CoqxjiuJ.js";
1
+ import { t as useRelatedLinks } from "../../useRelatedLinks-DxkE-gdP.js";
2
2
  export { useRelatedLinks };
@@ -1,2 +1 @@
1
- import{isPlainObject as e,isString as t}from"vuepress/shared";import{resolveRoute as n,useRoutePath as r}from"vuepress/client";import{useSidebarItems as i}from"@theme/useSidebarItems";import{computed as a}from"vue";import{useData as o}from"@theme/useData";import{resolveAutoLink as s}from"@theme/resolveAutoLink";const c=(n,r)=>n===!1?!1:t(n)?s(n,r):e(n)?{...n,link:s(n.link,r).link}:null,l=(e,t,r)=>{let i=e.findIndex(e=>e.link===t);if(i!==-1){let t=e[i+r];return t?t.link?t:`prefix`in t&&!n(t.prefix).notFound?{...t,link:t.prefix}:null:null}for(let n of e)if(`children`in n){let e=l(n.children,t,r);if(e)return e}let a=e.findIndex(e=>`prefix`in e&&e.prefix===t);if(a!==-1){let t=e[a+r];return t?t.link?t:`prefix`in t&&!n(t.prefix).notFound?{...t,link:t.prefix}:null:null}return null},u=()=>{let{frontmatter:e,themeLocale:t}=o(),n=i(),s=r();return{prevLink:a(()=>{let r=c(e.value.prev,s.value);return r===!1?null:r??(t.value.prev===!1?null:l(n.value,s.value,-1))}),nextLink:a(()=>{let r=c(e.value.next,s.value);return r===!1?null:r??(t.value.next===!1?null:l(n.value,s.value,1))})}};export{u as useRelatedLinks};
2
- //# sourceMappingURL=useRelatedLinks.js.map
1
+ import{t as e}from"../../useRelatedLinks-BwsPumn1.js";export{e as useRelatedLinks};
@@ -1,2 +1,2 @@
1
- import { n as useScrollPromise, t as ScrollPromise } from "../../useScrollPromise-DtXkT3fi.js";
1
+ import { n as useScrollPromise, t as ScrollPromise } from "../../useScrollPromise-TwtWBE3d.js";
2
2
  export { ScrollPromise, useScrollPromise };
@@ -1,2 +1 @@
1
- let e=null,t=null;const n={wait:()=>e,pending:()=>{e=new Promise(e=>{t=e})},resolve:()=>{t?.(),e=null,t=null}},r=()=>n;export{r as useScrollPromise};
2
- //# sourceMappingURL=useScrollPromise.js.map
1
+ import{t as e}from"../../useScrollPromise-CB6ZLciv.js";export{e as useScrollPromise};
@@ -1,2 +1,2 @@
1
- import { a as resolveSidebarItems, c as setupSidebarItems, i as resolveSidebarHeadingItem, l as sidebarItemsSymbol, n as resolveArraySidebarItems, o as resolveSidebarPageHeader, r as resolveMultiSidebarItems, s as resolveSidebarPageHeaders, t as SidebarItemsRef, u as useSidebarItems } from "../../useSidebarItems-nMm3AAZ3.js";
1
+ import { a as resolveSidebarItems, c as setupSidebarItems, i as resolveSidebarHeadingItem, l as sidebarItemsSymbol, n as resolveArraySidebarItems, o as resolveSidebarPageHeader, r as resolveMultiSidebarItems, s as resolveSidebarPageHeaders, t as SidebarItemsRef, u as useSidebarItems } from "../../useSidebarItems-aGO1YtUp.js";
2
2
  export { SidebarItemsRef, resolveArraySidebarItems, resolveMultiSidebarItems, resolveSidebarHeadingItem, resolveSidebarItems, resolveSidebarPageHeader, resolveSidebarPageHeaders, setupSidebarItems, sidebarItemsSymbol, useSidebarItems };
@@ -1,2 +1 @@
1
- import{isPlainObject as e,isString as t}from"vuepress/shared";import{isLinkRelative as n,keys as r,startsWith as i}from"@vuepress/helper/client";import{useRoutePath as a}from"vuepress/client";import{useHeaders as o}from"@theme/useHeaders";import{computed as s,inject as c,provide as l}from"vue";import{useData as u}from"@theme/useData";import{resolveAutoLink as d}from"@theme/resolveAutoLink";import{resolvePrefix as f}from"@theme/resolvePrefix";const p=e=>({text:e.title,link:e.link,children:m(e.children)}),m=e=>e?e.map(e=>p(e)):[],h=(e,t)=>[{text:e.title,children:m(t)}],g=(e,r,i,a=``)=>{let o=(e,a)=>{let s=t(e)?d(f(a,e)):t(e.link)?{...e,link:n(e.link)?d(f(a,e.link)).link:e.link}:e;if(`children`in s)return{...s,children:s.children.map(e=>o(e,f(a,s.prefix)))};if(s.link===i){let e=r[0]?.level===1?r[0].children:r;return{...s,children:m(e)}}return s};return e.map(e=>o(e,a))},_=(e,t,n,a)=>{let o=r(e).sort((e,t)=>t.length-e.length);for(let r of o)if(i(decodeURI(a),r)){let i=e[r];return i===!1?[]:i===`heading`?h(t,n):g(i,n,a,r)}return console.warn(`${decodeURI(a)} is missing sidebar config.`),[]},v=Symbol(`sidebarItems`),y=()=>{let e=c(v);if(!e)throw Error(`useSidebarItems() is called without provider.`);return e},b=(t,n,r,i,a)=>t===!1?[]:t===`heading`?h(n,a):Array.isArray(t)?g(t,a,r,i):e(t)?_(t,n,a,r):[],x=()=>{let{frontmatter:e,page:t,routeLocale:n,themeLocale:r}=u(),i=o(),c=a(),d=s(()=>!e.value.home&&(e.value.sidebar??r.value.sidebar??`heading`));l(v,s(()=>b(d.value,t.value,c.value,n.value,i.value)))};export{g as resolveArraySidebarItems,_ as resolveMultiSidebarItems,h as resolveSidebarHeadingItem,b as resolveSidebarItems,p as resolveSidebarPageHeader,m as resolveSidebarPageHeaders,x as setupSidebarItems,v as sidebarItemsSymbol,y as useSidebarItems};
2
- //# sourceMappingURL=useSidebarItems.js.map
1
+ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"../../useSidebarItems-CL0nJ7E8.js";export{c as resolveArraySidebarItems,i as resolveMultiSidebarItems,o as resolveSidebarHeadingItem,n as resolveSidebarItems,e as resolveSidebarPageHeader,a as resolveSidebarPageHeaders,s as setupSidebarItems,t as sidebarItemsSymbol,r as useSidebarItems};
@@ -1,2 +1,2 @@
1
- import { n as useUpdateDeviceStatus, t as DeviceType } from "../../useUpdateDeviceStatus-B3bXVdPs.js";
1
+ import { n as useUpdateDeviceStatus, t as DeviceType } from "../../useUpdateDeviceStatus-CsrJ_Qqv.js";
2
2
  export { DeviceType, useUpdateDeviceStatus };
@@ -1,2 +1 @@
1
- import{useEventListener as e}from"@vueuse/core";import{onMounted as t}from"vue";import n from"../styles/_variables.module.scss";let r=function(e){return e.Mobile=`mobile`,e}({});const i={mobile:Number.parseInt(n.mobile.replace(`px`,``),10)},a=(n,r)=>{let a=i[n];if(!Number.isInteger(a)){if(__VUEPRESS_DEV__)throw Error(`device width must be a integer`);return}e(`orientationchange`,()=>{r(a)}),e(`resize`,()=>{r(a)}),t(()=>{r(a)})};export{r as DeviceType,a as useUpdateDeviceStatus};
2
- //# sourceMappingURL=useUpdateDeviceStatus.js.map
1
+ import{n as e,t}from"../../useUpdateDeviceStatus-DMKiVB3W.js";export{t as DeviceType,e as useUpdateDeviceStatus};
@@ -1,6 +1,5 @@
1
- import * as _$vuepress_client0 from "vuepress/client";
2
1
  //#region src/client/config.d.ts
3
- declare const _default: _$vuepress_client0.ClientConfig;
2
+ declare const _default: import("vuepress/client").ClientConfig;
4
3
  //#endregion
5
4
  export { _default as default };
6
5
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","names":[],"sources":["../../src/client/config.ts"],"sourcesContent":["import { hasGlobalComponent } from '@vuepress/helper/client'\nimport { defineClientConfig } from 'vuepress/client'\n\nimport { setupDarkMode } from '@theme/useDarkMode'\nimport { setupHeaders } from '@theme/useHeaders'\nimport { useScrollPromise } from '@theme/useScrollPromise'\nimport { setupSidebarItems } from '@theme/useSidebarItems'\n\nimport { Badge } from './components/global/index.js'\nimport Layout from './layouts/Layout.vue'\nimport NotFound from './layouts/NotFound.vue'\n\nimport '@vuepress/helper/colors.css'\nimport '@vuepress/helper/normalize.css'\nimport './styles/index.scss'\n\nexport default defineClientConfig({\n enhance({ app, router }) {\n if (!hasGlobalComponent('Badge')) app.component('Badge', Badge)\n\n // handle scrollBehavior with transition\n const scrollBehavior = router.options.scrollBehavior!\n\n // scrollBehavior is a bit hard to typed here\n // oxlint-disable-next-line typescript/explicit-function-return-type\n router.options.scrollBehavior = async (...args) => {\n await useScrollPromise().wait()\n return scrollBehavior(...args)\n }\n },\n\n setup() {\n setupDarkMode()\n setupHeaders()\n setupSidebarItems()\n },\n\n layouts: {\n Layout,\n NotFound,\n },\n})\n"],"mappings":"0iBAgBA,IAAA,EAAe,EAAmB,CAChC,QAAQ,CAAE,MAAK,UAAU,CAClB,EAAmB,OAAO,GAAG,EAAI,UAAU,QAAS,CAAK,EAG9D,IAAM,EAAiB,EAAO,QAAQ,eAItC,EAAO,QAAQ,eAAiB,MAAO,GAAG,KACxC,MAAM,EAAiB,EAAE,KAAK,EACvB,EAAe,GAAG,CAAI,EAEjC,EAEA,OAAQ,CACN,EAAc,EACd,EAAa,EACb,EAAkB,CACpB,EAEA,QAAS,CACP,SACA,UACF,CACF,CAAC"}
1
+ {"version":3,"file":"config.js","names":[],"sources":["../../src/client/config.ts"],"sourcesContent":["import { hasGlobalComponent } from '@vuepress/helper/client'\nimport { defineClientConfig } from 'vuepress/client'\n\nimport { setupDarkMode } from '@theme/useDarkMode'\nimport { setupHeaders } from '@theme/useHeaders'\nimport { useScrollPromise } from '@theme/useScrollPromise'\nimport { setupSidebarItems } from '@theme/useSidebarItems'\n\nimport { Badge } from './components/global/index.js'\nimport Layout from './layouts/Layout.vue'\nimport NotFound from './layouts/NotFound.vue'\n\nimport '@vuepress/helper/colors.css'\nimport '@vuepress/helper/normalize.css'\nimport './styles/index.scss'\n\nexport default defineClientConfig({\n enhance({ app, router }) {\n if (!hasGlobalComponent('Badge')) app.component('Badge', Badge)\n\n // handle scrollBehavior with transition\n const scrollBehavior = router.options.scrollBehavior!\n\n // scrollBehavior is a bit hard to typed here\n // oxlint-disable-next-line typescript/explicit-function-return-type\n router.options.scrollBehavior = async (...args) => {\n await useScrollPromise().wait()\n return scrollBehavior(...args)\n }\n },\n\n setup() {\n setupDarkMode()\n setupHeaders()\n setupSidebarItems()\n },\n\n layouts: {\n Layout,\n NotFound,\n },\n})\n"],"mappings":"0iBAgBA,IAAA,EAAe,EAAmB,CAChC,QAAQ,CAAE,MAAK,UAAU,CAClB,EAAmB,OAAO,GAAG,EAAI,UAAU,QAAS,CAAK,EAG9D,IAAM,EAAiB,EAAO,QAAQ,eAItC,EAAO,QAAQ,eAAiB,MAAO,GAAG,KACxC,MAAM,EAAiB,CAAC,CAAC,KAAK,EACvB,EAAe,GAAG,CAAI,EAEjC,EAEA,OAAQ,CACN,EAAc,EACd,EAAa,EACb,EAAkB,CACpB,EAEA,QAAS,CACP,SACA,UACF,CACF,CAAC"}
@@ -1,19 +1,19 @@
1
- import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../useDarkMode-Zrmg4e6i.js";
2
- import { _ as NavbarOptions, a as DefaultThemeData, c as SidebarArrayOptions, d as SidebarLinkOptions, f as SidebarObjectOptions, g as NavbarLinkOptions, h as NavbarGroupOptions, i as DefaultThemePageFrontmatter, l as SidebarGroupOptions, m as NavGroup, n as DefaultThemeNormalPageFrontmatter, o as DefaultThemeLocaleData, p as SidebarOptions, r as DefaultThemePageData, s as DefaultThemeLocaleOptions, t as DefaultThemeHomePageFrontmatter, u as SidebarItemOptions, v as AutoLinkOptions, y as NavItemOptions } from "../index-BNjRb2Mr.js";
3
- import { n as useData, t as Data } from "../useData-BFB4h32K.js";
4
- import { t as useEditLink } from "../useEditLink-m723nvlZ.js";
5
- import { t as useNavigate } from "../useNavigate-D__eeZa2.js";
6
- import { a as SidebarLinkItem, i as SidebarItem, n as SidebarGroupItem, r as SidebarHeaderItem, t as NavbarItem } from "../typings-D-rXvaET.js";
7
- import { t as useNavbarConfig } from "../useNavbarConfig-BnkOLDyM.js";
8
- import { t as useNavbarRepo } from "../useNavbarRepo-BT8z2mBp.js";
9
- import { t as useNavbarSelectLanguage } from "../useNavbarSelectLanguage-DMcyeLfA.js";
10
- import { t as useRelatedLinks } from "../useRelatedLinks-CoqxjiuJ.js";
11
- import { n as useScrollPromise, t as ScrollPromise } from "../useScrollPromise-DtXkT3fi.js";
12
- import { a as resolveSidebarItems, c as setupSidebarItems, i as resolveSidebarHeadingItem, l as sidebarItemsSymbol, n as resolveArraySidebarItems, o as resolveSidebarPageHeader, r as resolveMultiSidebarItems, s as resolveSidebarPageHeaders, t as SidebarItemsRef, u as useSidebarItems } from "../useSidebarItems-nMm3AAZ3.js";
13
- import { n as useUpdateDeviceStatus, t as DeviceType } from "../useUpdateDeviceStatus-B3bXVdPs.js";
14
- import { t as isActiveSidebarItem } from "../isActiveSidebarItem-DE0Ymo1m.js";
15
- import { t as resolveAutoLink } from "../resolveAutoLink-bQLxrWMd.js";
16
- import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../resolveEditLink-DRtLIWXz.js";
17
- import { t as resolvePrefix } from "../resolvePrefix-DEl0CDB0.js";
18
- import { n as resolveRepoType, t as RepoType } from "../resolveRepoType-DefRTDOt.js";
19
- export { AutoLinkOptions, DarkModeRef, Data, DefaultThemeData, DefaultThemeHomePageFrontmatter, DefaultThemeLocaleData, DefaultThemeLocaleOptions, DefaultThemeNormalPageFrontmatter, DefaultThemePageData, DefaultThemePageFrontmatter, DeviceType, EDIT_LINK_PATTERNS, NavGroup, NavItemOptions, NavbarGroupOptions, NavbarItem, NavbarLinkOptions, NavbarOptions, RepoType, ScrollPromise, SidebarArrayOptions, SidebarGroupItem, SidebarGroupOptions, SidebarHeaderItem, SidebarItem, SidebarItemOptions, SidebarItemsRef, SidebarLinkItem, SidebarLinkOptions, SidebarObjectOptions, SidebarOptions, isActiveSidebarItem, resolveArraySidebarItems, resolveAutoLink, resolveEditLink, resolveMultiSidebarItems, resolvePrefix, resolveRepoType, resolveSidebarHeadingItem, resolveSidebarItems, resolveSidebarPageHeader, resolveSidebarPageHeaders, setupDarkMode, setupSidebarItems, sidebarItemsSymbol, useDarkMode, useData, useEditLink, useNavbarConfig, useNavbarRepo, useNavbarSelectLanguage, useNavigate, useRelatedLinks, useScrollPromise, useSidebarItems, useUpdateDeviceStatus };
1
+ import { n as setupDarkMode, r as useDarkMode, t as DarkModeRef } from "../useDarkMode-uRSRwA8U.js";
2
+ import { _ as NavbarOptions, a as DefaultThemeData, c as SidebarArrayOptions, d as SidebarLinkOptions, f as SidebarObjectOptions, g as NavbarLinkOptions, h as NavbarGroupOptions, i as DefaultThemePageFrontmatter, l as SidebarGroupOptions, m as NavGroup, n as DefaultThemeNormalPageFrontmatter, o as DefaultThemeLocaleData, p as SidebarOptions, r as DefaultThemePageData, s as DefaultThemeLocaleOptions, t as DefaultThemeHomePageFrontmatter, u as SidebarItemOptions, v as AutoLinkOptions, y as NavItemOptions } from "../index-ur5YvkCJ.js";
3
+ import { n as useData, t as Data } from "../useData-DwmcO8iz.js";
4
+ import { t as useEditLink } from "../useEditLink-COgJktiW.js";
5
+ import { t as useNavigate } from "../useNavigate-zqYnxkd_.js";
6
+ import { a as SidebarLinkItem, i as SidebarItem, n as SidebarGroupItem, r as SidebarHeaderItem, t as NavbarItem } from "../typings-CiGFIZqG.js";
7
+ import { t as useNavbarConfig } from "../useNavbarConfig-fLxvBobP.js";
8
+ import { t as useNavbarRepo } from "../useNavbarRepo-DndxHxeK.js";
9
+ import { t as useNavbarSelectLanguage } from "../useNavbarSelectLanguage-a9ZpUKwM.js";
10
+ import { t as useRelatedLinks } from "../useRelatedLinks-DxkE-gdP.js";
11
+ import { n as useScrollPromise, t as ScrollPromise } from "../useScrollPromise-TwtWBE3d.js";
12
+ import { a as resolveSidebarItems, c as setupSidebarItems, i as resolveSidebarHeadingItem, l as sidebarItemsSymbol, n as resolveArraySidebarItems, o as resolveSidebarPageHeader, r as resolveMultiSidebarItems, s as resolveSidebarPageHeaders, t as SidebarItemsRef, u as useSidebarItems } from "../useSidebarItems-aGO1YtUp.js";
13
+ import { n as useUpdateDeviceStatus, t as DeviceType } from "../useUpdateDeviceStatus-CsrJ_Qqv.js";
14
+ import { t as isActiveSidebarItem } from "../isActiveSidebarItem-K6rOnBw4.js";
15
+ import { t as resolveAutoLink } from "../resolveAutoLink-DBXc0Cd3.js";
16
+ import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../resolveEditLink-BRZu2eno.js";
17
+ import { t as resolvePrefix } from "../resolvePrefix-BXZhEIJn.js";
18
+ import { n as resolveRepoType, t as RepoType } from "../resolveRepoType-DEy0Gvc4.js";
19
+ export { type AutoLinkOptions, DarkModeRef, Data, type DefaultThemeData, type DefaultThemeHomePageFrontmatter, type DefaultThemeLocaleData, type DefaultThemeLocaleOptions, type DefaultThemeNormalPageFrontmatter, type DefaultThemePageData, type DefaultThemePageFrontmatter, DeviceType, EDIT_LINK_PATTERNS, type NavGroup, type NavItemOptions, type NavbarGroupOptions, type NavbarItem, type NavbarLinkOptions, type NavbarOptions, RepoType, ScrollPromise, type SidebarArrayOptions, type SidebarGroupItem, type SidebarGroupOptions, type SidebarHeaderItem, type SidebarItem, type SidebarItemOptions, SidebarItemsRef, type SidebarLinkItem, type SidebarLinkOptions, type SidebarObjectOptions, type SidebarOptions, isActiveSidebarItem, resolveArraySidebarItems, resolveAutoLink, resolveEditLink, resolveMultiSidebarItems, resolvePrefix, resolveRepoType, resolveSidebarHeadingItem, resolveSidebarItems, resolveSidebarPageHeader, resolveSidebarPageHeaders, setupDarkMode, setupSidebarItems, sidebarItemsSymbol, useDarkMode, useData, useEditLink, useNavbarConfig, useNavbarRepo, useNavbarSelectLanguage, useNavigate, useRelatedLinks, useScrollPromise, useSidebarItems, useUpdateDeviceStatus };
@@ -1 +1 @@
1
- import{setupDarkMode as e,useDarkMode as t}from"./composables/useDarkMode.js";import{useData as n}from"./composables/useData.js";import{useEditLink as r}from"./composables/useEditLink.js";import{useNavigate as i}from"./composables/useNavigate.js";import{useNavbarConfig as a}from"./composables/useNavbarConfig.js";import{useNavbarRepo as o}from"./composables/useNavbarRepo.js";import{useNavbarSelectLanguage as s}from"./composables/useNavbarSelectLanguage.js";import{useRelatedLinks as c}from"./composables/useRelatedLinks.js";import{useScrollPromise as l}from"./composables/useScrollPromise.js";import{resolveArraySidebarItems as u,resolveMultiSidebarItems as d,resolveSidebarHeadingItem as f,resolveSidebarItems as p,resolveSidebarPageHeader as m,resolveSidebarPageHeaders as h,setupSidebarItems as g,sidebarItemsSymbol as _,useSidebarItems as v}from"./composables/useSidebarItems.js";import{DeviceType as y,useUpdateDeviceStatus as b}from"./composables/useUpdateDeviceStatus.js";import"./composables/index.js";import{isActiveSidebarItem as x}from"./utils/isActiveSidebarItem.js";import{resolveAutoLink as S}from"./utils/resolveAutoLink.js";import{EDIT_LINK_PATTERNS as C,resolveEditLink as w}from"./utils/resolveEditLink.js";import{resolvePrefix as T}from"./utils/resolvePrefix.js";import{resolveRepoType as E}from"./utils/resolveRepoType.js";import"./utils/index.js";export{y as DeviceType,C as EDIT_LINK_PATTERNS,x as isActiveSidebarItem,u as resolveArraySidebarItems,S as resolveAutoLink,w as resolveEditLink,d as resolveMultiSidebarItems,T as resolvePrefix,E as resolveRepoType,f as resolveSidebarHeadingItem,p as resolveSidebarItems,m as resolveSidebarPageHeader,h as resolveSidebarPageHeaders,e as setupDarkMode,g as setupSidebarItems,_ as sidebarItemsSymbol,t as useDarkMode,n as useData,r as useEditLink,a as useNavbarConfig,o as useNavbarRepo,s as useNavbarSelectLanguage,i as useNavigate,c as useRelatedLinks,l as useScrollPromise,v as useSidebarItems,b as useUpdateDeviceStatus};
1
+ import{n as e,t}from"../useDarkMode-BfKvIN6K.js";import{t as n}from"../useData-nv4hwlgW.js";import{t as r}from"../useEditLink-BmoW42FE.js";import{t as i}from"../useNavigate-mlFey3ew.js";import{t as a}from"../useNavbarConfig-CxVplYul.js";import{t as o}from"../useNavbarRepo-BScd94be.js";import{t as s}from"../useNavbarSelectLanguage-FHyzHFEW.js";import{t as c}from"../useRelatedLinks-BwsPumn1.js";import{t as l}from"../useScrollPromise-CB6ZLciv.js";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"../useSidebarItems-CL0nJ7E8.js";import{n as y,t as b}from"../useUpdateDeviceStatus-DMKiVB3W.js";import{t as x}from"../isActiveSidebarItem-BQHhsM53.js";import{t as S}from"../resolveAutoLink-XUJwl3Kb.js";import{n as C,t as w}from"../resolveEditLink-lteF0-Mv.js";import{t as T}from"../resolvePrefix-CQnTmTk4.js";import{t as E}from"../resolveRepoType-BfcHRhpi.js";export{b as DeviceType,w as EDIT_LINK_PATTERNS,x as isActiveSidebarItem,v as resolveArraySidebarItems,S as resolveAutoLink,C as resolveEditLink,m as resolveMultiSidebarItems,T as resolvePrefix,E as resolveRepoType,g as resolveSidebarHeadingItem,f as resolveSidebarItems,u as resolveSidebarPageHeader,h as resolveSidebarPageHeaders,t as setupDarkMode,_ as setupSidebarItems,d as sidebarItemsSymbol,e as useDarkMode,n as useData,r as useEditLink,a as useNavbarConfig,o as useNavbarRepo,s as useNavbarSelectLanguage,i as useNavigate,c as useRelatedLinks,l as useScrollPromise,p as useSidebarItems,y as useUpdateDeviceStatus};
@@ -1,6 +1,6 @@
1
- import { t as isActiveSidebarItem } from "../../isActiveSidebarItem-DE0Ymo1m.js";
2
- import { t as resolveAutoLink } from "../../resolveAutoLink-bQLxrWMd.js";
3
- import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../../resolveEditLink-DRtLIWXz.js";
4
- import { t as resolvePrefix } from "../../resolvePrefix-DEl0CDB0.js";
5
- import { n as resolveRepoType, t as RepoType } from "../../resolveRepoType-DefRTDOt.js";
1
+ import { t as isActiveSidebarItem } from "../../isActiveSidebarItem-K6rOnBw4.js";
2
+ import { t as resolveAutoLink } from "../../resolveAutoLink-DBXc0Cd3.js";
3
+ import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../../resolveEditLink-BRZu2eno.js";
4
+ import { t as resolvePrefix } from "../../resolvePrefix-BXZhEIJn.js";
5
+ import { n as resolveRepoType, t as RepoType } from "../../resolveRepoType-DEy0Gvc4.js";
6
6
  export { EDIT_LINK_PATTERNS, RepoType, isActiveSidebarItem, resolveAutoLink, resolveEditLink, resolvePrefix, resolveRepoType };
@@ -1 +1 @@
1
- import{isActiveSidebarItem as e}from"./isActiveSidebarItem.js";import{resolveAutoLink as t}from"./resolveAutoLink.js";import{EDIT_LINK_PATTERNS as n,resolveEditLink as r}from"./resolveEditLink.js";import{resolvePrefix as i}from"./resolvePrefix.js";import{resolveRepoType as a}from"./resolveRepoType.js";export{n as EDIT_LINK_PATTERNS,e as isActiveSidebarItem,t as resolveAutoLink,r as resolveEditLink,i as resolvePrefix,a as resolveRepoType};
1
+ import{t as e}from"../../isActiveSidebarItem-BQHhsM53.js";import{t}from"../../resolveAutoLink-XUJwl3Kb.js";import{n,t as r}from"../../resolveEditLink-lteF0-Mv.js";import{t as i}from"../../resolvePrefix-CQnTmTk4.js";import{t as a}from"../../resolveRepoType-BfcHRhpi.js";import"../../utils-CAISgiXf.js";export{r as EDIT_LINK_PATTERNS,e as isActiveSidebarItem,t as resolveAutoLink,n as resolveEditLink,i as resolvePrefix,a as resolveRepoType};
@@ -1,2 +1,2 @@
1
- import { t as isActiveSidebarItem } from "../../isActiveSidebarItem-DE0Ymo1m.js";
1
+ import { t as isActiveSidebarItem } from "../../isActiveSidebarItem-K6rOnBw4.js";
2
2
  export { isActiveSidebarItem };
@@ -1,2 +1 @@
1
- import{normalizePath as e}from"@vuepress/helper/client";const t=(t,n)=>n.hash===t?!0:e(decodeURI(n.path),!0)===e(decodeURI(t),!0),n=(e,r)=>e.link&&t(e.link,r)?!0:`children`in e?e.children.some(e=>n(e,r)):!1;export{n as isActiveSidebarItem};
2
- //# sourceMappingURL=isActiveSidebarItem.js.map
1
+ import{t as e}from"../../isActiveSidebarItem-BQHhsM53.js";export{e as isActiveSidebarItem};
@@ -1,2 +1,2 @@
1
- import { t as resolveAutoLink } from "../../resolveAutoLink-bQLxrWMd.js";
1
+ import { t as resolveAutoLink } from "../../resolveAutoLink-DBXc0Cd3.js";
2
2
  export { resolveAutoLink };
@@ -1,2 +1 @@
1
- import{resolveRoute as e}from"vuepress/client";const t=(t,n)=>{let{notFound:r,meta:i,path:a}=e(t,n);return r?{text:a,link:a}:{text:i.title||a,link:a}};export{t as resolveAutoLink};
2
- //# sourceMappingURL=resolveAutoLink.js.map
1
+ import{t as e}from"../../resolveAutoLink-XUJwl3Kb.js";export{e as resolveAutoLink};
@@ -1,2 +1,2 @@
1
- import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../../resolveEditLink-DRtLIWXz.js";
1
+ import { n as resolveEditLink, t as EDIT_LINK_PATTERNS } from "../../resolveEditLink-BRZu2eno.js";
2
2
  export { EDIT_LINK_PATTERNS, resolveEditLink };
@@ -1,2 +1 @@
1
- import{isLinkHttp as e,removeEndingSlash as t,removeLeadingSlash as n}from"vuepress/shared";import{resolveRepoType as r}from"@theme/resolveRepoType";const i={GitHub:`:repo/edit/:branch/:path`,GitLab:`:repo/-/edit/:branch/:path`,Gitee:`:repo/edit/:branch/:path`,Bitbucket:`:repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default`},a=({docsRepo:e,editLinkPattern:t})=>{if(t)return t;let n=r(e);return n==null?null:i[n]},o=({docsRepo:r,docsBranch:i,docsDir:o,filePathRelative:s,editLinkPattern:c})=>{if(!s)return null;let l=a({docsRepo:r,editLinkPattern:c});return l?l.replace(/:repo/u,e(r)?r:`https://github.com/${r}`).replace(/:branch/u,i).replace(/:path/u,n(`${t(o)}/${s}`)):null};export{i as EDIT_LINK_PATTERNS,o as resolveEditLink};
2
- //# sourceMappingURL=resolveEditLink.js.map
1
+ import{n as e,t}from"../../resolveEditLink-lteF0-Mv.js";export{t as EDIT_LINK_PATTERNS,e as resolveEditLink};
@@ -1,2 +1,2 @@
1
- import { t as resolvePrefix } from "../../resolvePrefix-DEl0CDB0.js";
1
+ import { t as resolvePrefix } from "../../resolvePrefix-BXZhEIJn.js";
2
2
  export { resolvePrefix };
@@ -1,2 +1 @@
1
- import{ensureEndingSlash as e,isLinkAbsolute as t,isLinkWithProtocol as n}from"@vuepress/helper/client";const r=(r=``,i=``)=>t(i)||n(i)?i:`${e(r)}${i}`;export{r as resolvePrefix};
2
- //# sourceMappingURL=resolvePrefix.js.map
1
+ import{t as e}from"../../resolvePrefix-CQnTmTk4.js";export{e as resolvePrefix};
@@ -1,2 +1,2 @@
1
- import { n as resolveRepoType, t as RepoType } from "../../resolveRepoType-DefRTDOt.js";
1
+ import { n as resolveRepoType, t as RepoType } from "../../resolveRepoType-DEy0Gvc4.js";
2
2
  export { RepoType, resolveRepoType };
@@ -1,2 +1 @@
1
- import{isLinkHttp as e}from"vuepress/shared";const t=t=>!e(t)||/^(https?:)?\/\/github\.com\//u.test(t)?`GitHub`:/^(https?:)?\/\/bitbucket\.org\//u.test(t)?`Bitbucket`:/^(https?:)?\/\/gitlab\.com\//u.test(t)?`GitLab`:/^(https?:)?\/\/gitee\.com\//u.test(t)?`Gitee`:null;export{t as resolveRepoType};
2
- //# sourceMappingURL=resolveRepoType.js.map
1
+ import{t as e}from"../../resolveRepoType-BfcHRhpi.js";export{e as resolveRepoType};
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -328,4 +328,4 @@ interface DefaultThemeNormalPageFrontmatter extends DefaultThemePageFrontmatter
328
328
  }
329
329
  //#endregion
330
330
  export { NavbarOptions as _, DefaultThemeData as a, SidebarArrayOptions as c, SidebarLinkOptions as d, SidebarObjectOptions as f, NavbarLinkOptions as g, NavbarGroupOptions as h, DefaultThemePageFrontmatter as i, SidebarGroupOptions as l, NavGroup as m, DefaultThemeNormalPageFrontmatter as n, DefaultThemeLocaleData as o, SidebarOptions as p, DefaultThemePageData as r, DefaultThemeLocaleOptions as s, DefaultThemeHomePageFrontmatter as t, SidebarItemOptions as u, AutoLinkOptions as v, NavItemOptions as y };
331
- //# sourceMappingURL=index-BNjRb2Mr.d.ts.map
331
+ //# sourceMappingURL=index-ur5YvkCJ.d.ts.map
@@ -0,0 +1,2 @@
1
+ import{normalizePath as e}from"@vuepress/helper/client";const t=(t,n)=>n.hash===t?!0:e(decodeURI(n.path),!0)===e(decodeURI(t),!0),n=(e,r)=>e.link&&t(e.link,r)?!0:`children`in e?e.children.some(e=>n(e,r)):!1;export{n as t};
2
+ //# sourceMappingURL=isActiveSidebarItem-BQHhsM53.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isActiveSidebarItem-BQHhsM53.js","names":[],"sources":["../src/client/utils/isActiveSidebarItem.ts"],"sourcesContent":["import { normalizePath } from '@vuepress/helper/client'\nimport type { RouteLocationNormalizedLoaded } from 'vuepress/client'\n\nimport type { SidebarItem } from '../typings.js'\n\nconst isActiveLink = (\n link: string,\n route: RouteLocationNormalizedLoaded,\n): boolean => {\n if (route.hash === link) return true\n\n const currentPath = normalizePath(decodeURI(route.path), true)\n const targetPath = normalizePath(decodeURI(link), true)\n return currentPath === targetPath\n}\n\nexport const isActiveSidebarItem = (\n item: SidebarItem,\n route: RouteLocationNormalizedLoaded,\n): boolean => {\n if (item.link && isActiveLink(item.link, route)) return true\n\n if ('children' in item)\n return item.children.some((child) => isActiveSidebarItem(child, route))\n\n return false\n}\n"],"mappings":"wDAKA,MAAM,GACJ,EACA,IAEI,EAAM,OAAS,EAAa,GAEZ,EAAc,UAAU,EAAM,IAAI,EAAG,EAExC,IADE,EAAc,UAAU,CAAI,EAAG,EAClB,EAGrB,GACX,EACA,IAEI,EAAK,MAAQ,EAAa,EAAK,KAAM,CAAK,EAAU,GAEpD,aAAc,EACT,EAAK,SAAS,KAAM,GAAU,EAAoB,EAAO,CAAK,CAAC,EAEjE"}
@@ -1,8 +1,8 @@
1
- import { i as SidebarItem } from "./typings-D-rXvaET.js";
1
+ import { i as SidebarItem } from "./typings-CiGFIZqG.js";
2
2
  import { RouteLocationNormalizedLoaded } from "vuepress/client";
3
3
 
4
4
  //#region src/client/utils/isActiveSidebarItem.d.ts
5
5
  declare const isActiveSidebarItem: (item: SidebarItem, route: RouteLocationNormalizedLoaded) => boolean;
6
6
  //#endregion
7
7
  export { isActiveSidebarItem as t };
8
- //# sourceMappingURL=isActiveSidebarItem-DE0Ymo1m.d.ts.map
8
+ //# sourceMappingURL=isActiveSidebarItem-K6rOnBw4.d.ts.map
@@ -1,4 +1,4 @@
1
- import { _ as NavbarOptions, a as DefaultThemeData, c as SidebarArrayOptions, d as SidebarLinkOptions, f as SidebarObjectOptions, g as NavbarLinkOptions, h as NavbarGroupOptions, i as DefaultThemePageFrontmatter, l as SidebarGroupOptions, m as NavGroup, n as DefaultThemeNormalPageFrontmatter, o as DefaultThemeLocaleData, p as SidebarOptions, r as DefaultThemePageData, s as DefaultThemeLocaleOptions, t as DefaultThemeHomePageFrontmatter, u as SidebarItemOptions, v as AutoLinkOptions, y as NavItemOptions } from "../index-BNjRb2Mr.js";
1
+ import { _ as NavbarOptions, a as DefaultThemeData, c as SidebarArrayOptions, d as SidebarLinkOptions, f as SidebarObjectOptions, g as NavbarLinkOptions, h as NavbarGroupOptions, i as DefaultThemePageFrontmatter, l as SidebarGroupOptions, m as NavGroup, n as DefaultThemeNormalPageFrontmatter, o as DefaultThemeLocaleData, p as SidebarOptions, r as DefaultThemePageData, s as DefaultThemeLocaleOptions, t as DefaultThemeHomePageFrontmatter, u as SidebarItemOptions, v as AutoLinkOptions, y as NavItemOptions } from "../index-ur5YvkCJ.js";
2
2
  import { BackToTopPluginOptions } from "@vuepress/plugin-back-to-top";
3
3
  import { CopyCodePluginOptions } from "@vuepress/plugin-copy-code";
4
4
  import { GitPluginOptions } from "@vuepress/plugin-git";
@@ -73,5 +73,5 @@ declare const assignDefaultLocaleOptions: (localeOptions: DefaultThemeLocaleOpti
73
73
  */
74
74
  declare const resolveMarkdownHintLocales: (localeOptions: DefaultThemeData) => LocaleConfig<MarkdownHintPluginLocaleData>;
75
75
  //#endregion
76
- export { AutoLinkOptions, DEFAULT_LOCALE_DATA, DEFAULT_LOCALE_OPTIONS, DefaultThemeData, DefaultThemeHomePageFrontmatter, DefaultThemeLocaleData, DefaultThemeLocaleOptions, DefaultThemeNormalPageFrontmatter, DefaultThemeOptions, DefaultThemePageData, DefaultThemePageFrontmatter, DefaultThemePluginsOptions, NavGroup, NavItemOptions, NavbarGroupOptions, NavbarLinkOptions, NavbarOptions, SidebarArrayOptions, SidebarGroupOptions, SidebarItemOptions, SidebarLinkOptions, SidebarObjectOptions, SidebarOptions, assignDefaultLocaleOptions, defaultTheme, resolveMarkdownHintLocales };
76
+ export { type AutoLinkOptions, DEFAULT_LOCALE_DATA, DEFAULT_LOCALE_OPTIONS, type DefaultThemeData, type DefaultThemeHomePageFrontmatter, type DefaultThemeLocaleData, type DefaultThemeLocaleOptions, type DefaultThemeNormalPageFrontmatter, DefaultThemeOptions, type DefaultThemePageData, type DefaultThemePageFrontmatter, type DefaultThemePluginsOptions, type NavGroup, type NavItemOptions, type NavbarGroupOptions, type NavbarLinkOptions, type NavbarOptions, type SidebarArrayOptions, type SidebarGroupOptions, type SidebarItemOptions, type SidebarLinkOptions, type SidebarObjectOptions, type SidebarOptions, assignDefaultLocaleOptions, defaultTheme, resolveMarkdownHintLocales };
77
77
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- import{addViteOptimizeDepsExclude as e}from"@vuepress/helper";import{activeHeaderLinksPlugin as t}from"@vuepress/plugin-active-header-links";import{backToTopPlugin as n}from"@vuepress/plugin-back-to-top";import{copyCodePlugin as r}from"@vuepress/plugin-copy-code";import{gitPlugin as i}from"@vuepress/plugin-git";import{linksCheckPlugin as a}from"@vuepress/plugin-links-check";import{markdownHintPlugin as o}from"@vuepress/plugin-markdown-hint";import{markdownTabPlugin as s}from"@vuepress/plugin-markdown-tab";import{mediumZoomPlugin as c}from"@vuepress/plugin-medium-zoom";import{nprogressPlugin as l}from"@vuepress/plugin-nprogress";import{palettePlugin as u}from"@vuepress/plugin-palette";import{prismjsPlugin as d}from"@vuepress/plugin-prismjs";import{seoPlugin as f}from"@vuepress/plugin-seo";import{sitemapPlugin as p}from"@vuepress/plugin-sitemap";import{themeDataPlugin as m}from"@vuepress/plugin-theme-data";import{isPlainObject as h}from"vuepress/shared";import{fs as g,getDirname as _,path as v}from"vuepress/utils";const y={colorMode:`auto`,colorModeSwitch:!0,navbar:[],logo:null,repo:null,selectLanguageText:`Languages`,selectLanguageAriaLabel:`Select language`,sidebar:`heading`,sidebarDepth:2,editLink:!0,editLinkText:`Edit this page`,lastUpdated:!0,contributors:!0,contributorsText:`Contributors`,notFound:[`There's nothing here.`,`How did we get here?`,`That's a Four-Oh-Four.`,`Looks like we've got some broken links.`],backToHome:`Take me home`,openInNewWindow:`open in new window`,toggleColorMode:`toggle color mode`,toggleSidebar:`toggle sidebar`},b={selectLanguageName:`English`},x=e=>{e.locales??={},Object.assign(e,{...y,...e}),e.locales[`/`]??={},Object.assign(e.locales[`/`],{...b,...e.locales[`/`]})},S=e=>Object.entries(e.locales??{}).reduce((e,[t,n])=>(e[t]={},n.tip&&(e[t].tip=n.tip),n.warning&&(e[t].warning=n.warning),n.danger&&(e[t].caution=n.danger),n.important&&(e[t].important=n.important),n.note&&(e[t].note=n.note),e),{}),C=import.meta.dirname||_(import.meta.url),w=({hostname:_,themePlugins:y={},...b}={})=>(x(b),{name:`@vuepress/theme-default`,userStyle:`.vuepress/styles/index.scss`,templateBuild:v.resolve(C,`../../templates/build.html`),alias:{...Object.fromEntries(g.readdirSync(v.resolve(C,`../client/components`)).filter(e=>e.endsWith(`.vue`)).map(e=>[`@theme/${e}`,v.resolve(C,`../client/components`,e)])),...Object.fromEntries(g.readdirSync(v.resolve(C,`../client/composables`)).filter(e=>e.endsWith(`.js`)).map(e=>[`@theme/${e.slice(0,-3)}`,v.resolve(C,`../client/composables`,e)])),...Object.fromEntries(g.readdirSync(v.resolve(C,`../client/utils`)).filter(e=>e.endsWith(`.js`)).map(e=>[`@theme/${e.slice(0,-3)}`,v.resolve(C,`../client/utils`,e)]))},clientConfigFile:v.resolve(C,`../client/config.js`),extendsBundlerOptions:(t,n)=>{e(t,n,`@theme`)},extendsPage:e=>{e.data.filePathRelative=e.filePathRelative,e.routeMeta.title=e.title},plugins:[y.activeHeaderLinks??!0?t({delay:300}):[],y.backToTop??!0?n(h(y.backToTop)?y.backToTop:{}):[],y.copyCode??!0?r({...h(y.copyCode)?y.copyCode:{}}):[],y.hint??!0?o({locales:S(b),...h(y.hint)?y.hint:{}}):[],y.git??!0?i({createdTime:!1,updatedTime:b.lastUpdated??!0,changelog:{repoUrl:b.repo||``},...h(y.git)?y.git:{}}):[],y.linksCheck??!0?a(h(y.linksCheck)?y.linksCheck:{}):[],y.mediumZoom??!0?c():[],y.nprogress??!0?l():[],u({preset:`sass`}),y.prismjs??!0?d(h(y.prismjs)?y.prismjs:{}):[],_&&(y.seo??!0)?f({hostname:_,...h(y.seo)?y.seo:{}}):[],_&&(y.sitemap??!0)?p({hostname:_,...h(y.sitemap)?y.sitemap:{}}):[],y.tab??!0?s(h(y.tab)?y.tab:{codeTabs:!0,tabs:!0}):[],m({themeData:b})]});export{b as DEFAULT_LOCALE_DATA,y as DEFAULT_LOCALE_OPTIONS,x as assignDefaultLocaleOptions,w as defaultTheme,S as resolveMarkdownHintLocales};
1
+ import{addViteOptimizeDepsExclude as e}from"@vuepress/helper";import{activeHeaderLinksPlugin as t}from"@vuepress/plugin-active-header-links";import{backToTopPlugin as n}from"@vuepress/plugin-back-to-top";import{copyCodePlugin as r}from"@vuepress/plugin-copy-code";import{gitPlugin as i}from"@vuepress/plugin-git";import{linksCheckPlugin as a}from"@vuepress/plugin-links-check";import{markdownHintPlugin as o}from"@vuepress/plugin-markdown-hint";import{markdownTabPlugin as s}from"@vuepress/plugin-markdown-tab";import{mediumZoomPlugin as c}from"@vuepress/plugin-medium-zoom";import{nprogressPlugin as l}from"@vuepress/plugin-nprogress";import{palettePlugin as u}from"@vuepress/plugin-palette";import{prismjsPlugin as d}from"@vuepress/plugin-prismjs";import{seoPlugin as f}from"@vuepress/plugin-seo";import{sitemapPlugin as p}from"@vuepress/plugin-sitemap";import{themeDataPlugin as m}from"@vuepress/plugin-theme-data";import{isPlainObject as h}from"vuepress/shared";import{fs as g,getDirname as _,path as v}from"vuepress/utils";const y={colorMode:`auto`,colorModeSwitch:!0,navbar:[],logo:null,repo:null,selectLanguageText:`Languages`,selectLanguageAriaLabel:`Select language`,sidebar:`heading`,sidebarDepth:2,editLink:!0,editLinkText:`Edit this page`,lastUpdated:!0,contributors:!0,contributorsText:`Contributors`,notFound:[`There's nothing here.`,`How did we get here?`,`That's a Four-Oh-Four.`,`Looks like we've got some broken links.`],backToHome:`Take me home`,openInNewWindow:`open in new window`,toggleColorMode:`toggle color mode`,toggleSidebar:`toggle sidebar`},b={selectLanguageName:`English`},x=e=>{e.locales??={},Object.assign(e,{...y,...e}),e.locales[`/`]??={},Object.assign(e.locales[`/`],{...b,...e.locales[`/`]})},S=e=>Object.entries(e.locales??{}).reduce((e,[t,n])=>(e[t]={},n.tip&&(e[t].tip=n.tip),n.warning&&(e[t].warning=n.warning),n.danger&&(e[t].caution=n.danger),n.important&&(e[t].important=n.important),n.note&&(e[t].note=n.note),e),{}),C=import.meta.dirname||_(import.meta.url),[w,T,E]=await Promise.all([g.readdir(v.resolve(C,`../client/components`)),g.readdir(v.resolve(C,`../client/composables`)),g.readdir(v.resolve(C,`../client/utils`))]),D=({hostname:g,themePlugins:_={},...y}={})=>(x(y),{name:`@vuepress/theme-default`,userStyle:`.vuepress/styles/index.scss`,templateBuild:v.resolve(C,`../../templates/build.html`),alias:{...Object.fromEntries(w.filter(e=>e.endsWith(`.vue`)).map(e=>[`@theme/${e}`,v.resolve(C,`../client/components`,e)])),...Object.fromEntries(T.filter(e=>e.endsWith(`.js`)).map(e=>[`@theme/${e.slice(0,-3)}`,v.resolve(C,`../client/composables`,e)])),...Object.fromEntries(E.filter(e=>e.endsWith(`.js`)).map(e=>[`@theme/${e.slice(0,-3)}`,v.resolve(C,`../client/utils`,e)]))},clientConfigFile:v.resolve(C,`../client/config.js`),extendsBundlerOptions:(t,n)=>{e(t,n,`@theme`)},extendsPage:e=>{e.data.filePathRelative=e.filePathRelative,e.routeMeta.title=e.title},plugins:[_.activeHeaderLinks??!0?t({delay:300}):[],_.backToTop??!0?n(h(_.backToTop)?_.backToTop:{}):[],_.copyCode??!0?r({...h(_.copyCode)?_.copyCode:{}}):[],_.hint??!0?o({locales:S(y),...h(_.hint)?_.hint:{}}):[],_.git??!0?i({createdTime:!1,updatedTime:y.lastUpdated??!0,changelog:{repoUrl:y.repo||``},...h(_.git)?_.git:{}}):[],_.linksCheck??!0?a(h(_.linksCheck)?_.linksCheck:{}):[],_.mediumZoom??!0?c():[],_.nprogress??!0?l():[],u({preset:`sass`}),_.prismjs??!0?d(h(_.prismjs)?_.prismjs:{}):[],g&&(_.seo??!0)?f({hostname:g,...h(_.seo)?_.seo:{}}):[],g&&(_.sitemap??!0)?p({hostname:g,...h(_.sitemap)?_.sitemap:{}}):[],_.tab??!0?s(h(_.tab)?_.tab:{codeTabs:!0,tabs:!0}):[],m({themeData:y})]});export{b as DEFAULT_LOCALE_DATA,y as DEFAULT_LOCALE_OPTIONS,x as assignDefaultLocaleOptions,D as defaultTheme,S as resolveMarkdownHintLocales};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/node/utils/assignDefaultLocaleOptions.ts","../../src/node/utils/resolveMarkdownHintLocales.ts","../../src/node/defaultTheme.ts"],"sourcesContent":["import type {\n DefaultThemeLocaleData,\n DefaultThemeLocaleOptions,\n} from '../../shared/index.js'\n\nexport const DEFAULT_LOCALE_OPTIONS: DefaultThemeLocaleOptions = {\n // color mode\n colorMode: 'auto',\n colorModeSwitch: true,\n\n // navbar\n navbar: [],\n logo: null,\n repo: null,\n selectLanguageText: 'Languages',\n selectLanguageAriaLabel: 'Select language',\n\n // sidebar\n sidebar: 'heading',\n sidebarDepth: 2,\n\n // page meta\n editLink: true,\n editLinkText: 'Edit this page',\n lastUpdated: true,\n contributors: true,\n contributorsText: 'Contributors',\n\n // 404 page messages\n notFound: [\n `There's nothing here.`,\n `How did we get here?`,\n `That's a Four-Oh-Four.`,\n `Looks like we've got some broken links.`,\n ],\n backToHome: 'Take me home',\n\n // a11y\n openInNewWindow: 'open in new window',\n toggleColorMode: 'toggle color mode',\n toggleSidebar: 'toggle sidebar',\n}\n\nexport const DEFAULT_LOCALE_DATA: DefaultThemeLocaleData = {\n // navbar\n selectLanguageName: 'English',\n}\n\n/**\n * Assign default options\n *\n * @param localeOptions - Locale options to assign default options\n */\nexport const assignDefaultLocaleOptions = (\n localeOptions: DefaultThemeLocaleOptions,\n): void => {\n localeOptions.locales ??= {}\n Object.assign(localeOptions, {\n ...DEFAULT_LOCALE_OPTIONS,\n ...localeOptions,\n })\n localeOptions.locales['/'] ??= {}\n Object.assign(localeOptions.locales['/'], {\n ...DEFAULT_LOCALE_DATA,\n ...localeOptions.locales['/'],\n })\n}\n","import type { MarkdownHintPluginLocaleData } from '@vuepress/plugin-markdown-hint'\nimport type { LocaleConfig } from 'vuepress/shared'\n\nimport type { DefaultThemeData } from '../../shared/index.js'\n\n/**\n * Resolve options for `@vuepress/plugin-markdown-container`\n *\n * For custom containers default title\n *\n * @param localeOptions - Locales config from theme options\n * @returns Locales config for `@vuepress/plugin-markdown-container`\n */\nexport const resolveMarkdownHintLocales = (\n localeOptions: DefaultThemeData,\n): LocaleConfig<MarkdownHintPluginLocaleData> =>\n Object.entries(localeOptions.locales ?? {}).reduce<\n LocaleConfig<MarkdownHintPluginLocaleData>\n >((result, [key, value]) => {\n result[key] = {}\n\n if (value.tip) result[key].tip = value.tip\n if (value.warning) result[key].warning = value.warning\n if (value.danger) result[key].caution = value.danger\n if (value.important) result[key].important = value.important\n if (value.note) result[key].note = value.note\n\n return result\n }, {})\n","import { addViteOptimizeDepsExclude } from '@vuepress/helper'\nimport { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links'\nimport { backToTopPlugin } from '@vuepress/plugin-back-to-top'\nimport { copyCodePlugin } from '@vuepress/plugin-copy-code'\nimport { gitPlugin } from '@vuepress/plugin-git'\nimport { linksCheckPlugin } from '@vuepress/plugin-links-check'\nimport { markdownHintPlugin } from '@vuepress/plugin-markdown-hint'\nimport { markdownTabPlugin } from '@vuepress/plugin-markdown-tab'\nimport { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom'\nimport { nprogressPlugin } from '@vuepress/plugin-nprogress'\nimport { palettePlugin } from '@vuepress/plugin-palette'\nimport { prismjsPlugin } from '@vuepress/plugin-prismjs'\nimport { seoPlugin } from '@vuepress/plugin-seo'\nimport { sitemapPlugin } from '@vuepress/plugin-sitemap'\nimport { themeDataPlugin } from '@vuepress/plugin-theme-data'\nimport type { Page, Theme } from 'vuepress/core'\nimport { isPlainObject } from 'vuepress/shared'\nimport { fs, getDirname, path } from 'vuepress/utils'\n\nimport type { DefaultThemeLocaleOptions } from '../shared/index.js'\nimport type { DefaultThemePluginsOptions } from './typings.js'\nimport {\n assignDefaultLocaleOptions,\n resolveMarkdownHintLocales,\n} from './utils/index.js'\n\nconst __dirname = import.meta.dirname || getDirname(import.meta.url)\n\nexport interface DefaultThemeOptions extends DefaultThemeLocaleOptions {\n /** Deployed hostname */\n hostname?: string\n\n /** To avoid confusion with the root `plugins` option, we use `themePlugins` */\n themePlugins?: DefaultThemePluginsOptions\n}\n\nexport const defaultTheme = ({\n hostname,\n themePlugins = {},\n ...localeOptions\n}: DefaultThemeOptions = {}): Theme => {\n assignDefaultLocaleOptions(localeOptions)\n\n return {\n name: '@vuepress/theme-default',\n\n userStyle: '.vuepress/styles/index.scss',\n\n templateBuild: path.resolve(__dirname, '../../templates/build.html'),\n\n alias: {\n // use alias to make all components replaceable\n ...Object.fromEntries(\n fs\n .readdirSync(path.resolve(__dirname, '../client/components'))\n .filter((file) => file.endsWith('.vue'))\n .map((file) => [\n `@theme/${file}`,\n path.resolve(__dirname, '../client/components', file),\n ]),\n ),\n // use alias to make all composables replaceable\n ...Object.fromEntries(\n fs\n .readdirSync(path.resolve(__dirname, '../client/composables'))\n .filter((file) => file.endsWith('.js'))\n .map((file) => [\n `@theme/${file.slice(0, -3)}`,\n path.resolve(__dirname, '../client/composables', file),\n ]),\n ),\n // use alias to make all utils replaceable\n ...Object.fromEntries(\n fs\n .readdirSync(path.resolve(__dirname, '../client/utils'))\n .filter((file) => file.endsWith('.js'))\n .map((file) => [\n `@theme/${file.slice(0, -3)}`,\n path.resolve(__dirname, '../client/utils', file),\n ]),\n ),\n },\n\n clientConfigFile: path.resolve(__dirname, '../client/config.js'),\n\n extendsBundlerOptions: (bundlerOptions, app) => {\n // ensure theme alias is not optimized by Vite\n addViteOptimizeDepsExclude(bundlerOptions, app, '@theme')\n },\n\n extendsPage: (page: Page) => {\n // save relative file path into page data to generate edit link\n page.data.filePathRelative = page.filePathRelative\n // save title into route meta to generate navbar and sidebar\n page.routeMeta.title = page.title\n },\n\n plugins: [\n // @vuepress/plugin-active-header-link\n (themePlugins.activeHeaderLinks ?? true)\n ? activeHeaderLinksPlugin({\n // should greater than page transition duration\n delay: 300,\n })\n : [],\n\n // @vuepress/plugin-back-to-top\n (themePlugins.backToTop ?? true)\n ? backToTopPlugin(\n isPlainObject(themePlugins.backToTop) ? themePlugins.backToTop : {},\n )\n : [],\n\n // @vuepress/plugin-copy-code\n (themePlugins.copyCode ?? true)\n ? copyCodePlugin({\n ...(isPlainObject(themePlugins.copyCode)\n ? themePlugins.copyCode\n : {}),\n })\n : [],\n\n // @vuepress/plugin-markdown-container\n (themePlugins.hint ?? true)\n ? markdownHintPlugin({\n locales: resolveMarkdownHintLocales(localeOptions),\n ...(isPlainObject(themePlugins.hint) ? themePlugins.hint : {}),\n })\n : [],\n\n // @vuepress/plugin-git\n (themePlugins.git ?? true)\n ? gitPlugin({\n createdTime: false,\n updatedTime: localeOptions.lastUpdated ?? true,\n changelog: { repoUrl: localeOptions.repo || '' },\n ...(isPlainObject(themePlugins.git) ? themePlugins.git : {}),\n })\n : [],\n\n // @vuepress/plugin-links-check\n (themePlugins.linksCheck ?? true)\n ? linksCheckPlugin(\n isPlainObject(themePlugins.linksCheck)\n ? themePlugins.linksCheck\n : {},\n )\n : [],\n\n // @vuepress/plugin-medium-zoom\n (themePlugins.mediumZoom ?? true) ? mediumZoomPlugin() : [],\n\n // @vuepress/plugin-nprogress\n (themePlugins.nprogress ?? true) ? nprogressPlugin() : [],\n\n // @vuepress/plugin-palette\n palettePlugin({ preset: 'sass' }),\n\n // @vuepress/plugin-prismjs\n (themePlugins.prismjs ?? true)\n ? prismjsPlugin(\n isPlainObject(themePlugins.prismjs) ? themePlugins.prismjs : {},\n )\n : [],\n\n // @vuepress/plugin-seo\n hostname && (themePlugins.seo ?? true)\n ? seoPlugin({\n hostname,\n ...(isPlainObject(themePlugins.seo) ? themePlugins.seo : {}),\n })\n : [],\n\n // @vuepress/plugin-sitemap\n hostname && (themePlugins.sitemap ?? true)\n ? sitemapPlugin({\n hostname,\n ...(isPlainObject(themePlugins.sitemap)\n ? themePlugins.sitemap\n : {}),\n })\n : [],\n\n // @vuepress/plugin-markdown-tab\n (themePlugins.tab ?? true)\n ? markdownTabPlugin(\n isPlainObject(themePlugins.tab)\n ? themePlugins.tab\n : { codeTabs: true, tabs: true },\n )\n : [],\n\n // @vuepress/plugin-theme-data\n themeDataPlugin({ themeData: localeOptions }),\n ],\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/node/utils/assignDefaultLocaleOptions.ts","../../src/node/utils/resolveMarkdownHintLocales.ts","../../src/node/defaultTheme.ts"],"sourcesContent":["import type {\n DefaultThemeLocaleData,\n DefaultThemeLocaleOptions,\n} from '../../shared/index.js'\n\nexport const DEFAULT_LOCALE_OPTIONS: DefaultThemeLocaleOptions = {\n // color mode\n colorMode: 'auto',\n colorModeSwitch: true,\n\n // navbar\n navbar: [],\n logo: null,\n repo: null,\n selectLanguageText: 'Languages',\n selectLanguageAriaLabel: 'Select language',\n\n // sidebar\n sidebar: 'heading',\n sidebarDepth: 2,\n\n // page meta\n editLink: true,\n editLinkText: 'Edit this page',\n lastUpdated: true,\n contributors: true,\n contributorsText: 'Contributors',\n\n // 404 page messages\n notFound: [\n `There's nothing here.`,\n `How did we get here?`,\n `That's a Four-Oh-Four.`,\n `Looks like we've got some broken links.`,\n ],\n backToHome: 'Take me home',\n\n // a11y\n openInNewWindow: 'open in new window',\n toggleColorMode: 'toggle color mode',\n toggleSidebar: 'toggle sidebar',\n}\n\nexport const DEFAULT_LOCALE_DATA: DefaultThemeLocaleData = {\n // navbar\n selectLanguageName: 'English',\n}\n\n/**\n * Assign default options\n *\n * @param localeOptions - Locale options to assign default options\n */\nexport const assignDefaultLocaleOptions = (\n localeOptions: DefaultThemeLocaleOptions,\n): void => {\n localeOptions.locales ??= {}\n Object.assign(localeOptions, {\n ...DEFAULT_LOCALE_OPTIONS,\n ...localeOptions,\n })\n localeOptions.locales['/'] ??= {}\n Object.assign(localeOptions.locales['/'], {\n ...DEFAULT_LOCALE_DATA,\n ...localeOptions.locales['/'],\n })\n}\n","import type { MarkdownHintPluginLocaleData } from '@vuepress/plugin-markdown-hint'\nimport type { LocaleConfig } from 'vuepress/shared'\n\nimport type { DefaultThemeData } from '../../shared/index.js'\n\n/**\n * Resolve options for `@vuepress/plugin-markdown-container`\n *\n * For custom containers default title\n *\n * @param localeOptions - Locales config from theme options\n * @returns Locales config for `@vuepress/plugin-markdown-container`\n */\nexport const resolveMarkdownHintLocales = (\n localeOptions: DefaultThemeData,\n): LocaleConfig<MarkdownHintPluginLocaleData> =>\n Object.entries(localeOptions.locales ?? {}).reduce<\n LocaleConfig<MarkdownHintPluginLocaleData>\n >((result, [key, value]) => {\n result[key] = {}\n\n if (value.tip) result[key].tip = value.tip\n if (value.warning) result[key].warning = value.warning\n if (value.danger) result[key].caution = value.danger\n if (value.important) result[key].important = value.important\n if (value.note) result[key].note = value.note\n\n return result\n }, {})\n","import { addViteOptimizeDepsExclude } from '@vuepress/helper'\nimport { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links'\nimport { backToTopPlugin } from '@vuepress/plugin-back-to-top'\nimport { copyCodePlugin } from '@vuepress/plugin-copy-code'\nimport { gitPlugin } from '@vuepress/plugin-git'\nimport { linksCheckPlugin } from '@vuepress/plugin-links-check'\nimport { markdownHintPlugin } from '@vuepress/plugin-markdown-hint'\nimport { markdownTabPlugin } from '@vuepress/plugin-markdown-tab'\nimport { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom'\nimport { nprogressPlugin } from '@vuepress/plugin-nprogress'\nimport { palettePlugin } from '@vuepress/plugin-palette'\nimport { prismjsPlugin } from '@vuepress/plugin-prismjs'\nimport { seoPlugin } from '@vuepress/plugin-seo'\nimport { sitemapPlugin } from '@vuepress/plugin-sitemap'\nimport { themeDataPlugin } from '@vuepress/plugin-theme-data'\nimport type { Page, Theme } from 'vuepress/core'\nimport { isPlainObject } from 'vuepress/shared'\nimport { fs, getDirname, path } from 'vuepress/utils'\n\nimport type { DefaultThemeLocaleOptions } from '../shared/index.js'\nimport type { DefaultThemePluginsOptions } from './typings.js'\nimport {\n assignDefaultLocaleOptions,\n resolveMarkdownHintLocales,\n} from './utils/index.js'\n\nconst __dirname = import.meta.dirname || getDirname(import.meta.url)\n\nconst [componentFiles, composableFiles, utilFiles] = await Promise.all([\n fs.readdir(path.resolve(__dirname, '../client/components')),\n fs.readdir(path.resolve(__dirname, '../client/composables')),\n fs.readdir(path.resolve(__dirname, '../client/utils')),\n])\n\nexport interface DefaultThemeOptions extends DefaultThemeLocaleOptions {\n /** Deployed hostname */\n hostname?: string\n\n /** To avoid confusion with the root `plugins` option, we use `themePlugins` */\n themePlugins?: DefaultThemePluginsOptions\n}\n\nexport const defaultTheme = ({\n hostname,\n themePlugins = {},\n ...localeOptions\n}: DefaultThemeOptions = {}): Theme => {\n assignDefaultLocaleOptions(localeOptions)\n\n return {\n name: '@vuepress/theme-default',\n\n userStyle: '.vuepress/styles/index.scss',\n\n templateBuild: path.resolve(__dirname, '../../templates/build.html'),\n\n alias: {\n // use alias to make all components replaceable\n ...Object.fromEntries(\n componentFiles\n .filter((file) => file.endsWith('.vue'))\n .map((file) => [\n `@theme/${file}`,\n path.resolve(__dirname, '../client/components', file),\n ]),\n ),\n // use alias to make all composables replaceable\n ...Object.fromEntries(\n composableFiles\n .filter((file) => file.endsWith('.js'))\n .map((file) => [\n `@theme/${file.slice(0, -3)}`,\n path.resolve(__dirname, '../client/composables', file),\n ]),\n ),\n // use alias to make all utils replaceable\n ...Object.fromEntries(\n utilFiles\n .filter((file) => file.endsWith('.js'))\n .map((file) => [\n `@theme/${file.slice(0, -3)}`,\n path.resolve(__dirname, '../client/utils', file),\n ]),\n ),\n },\n\n clientConfigFile: path.resolve(__dirname, '../client/config.js'),\n\n extendsBundlerOptions: (bundlerOptions, app) => {\n // ensure theme alias is not optimized by Vite\n addViteOptimizeDepsExclude(bundlerOptions, app, '@theme')\n },\n\n extendsPage: (page: Page) => {\n // save relative file path into page data to generate edit link\n page.data.filePathRelative = page.filePathRelative\n // save title into route meta to generate navbar and sidebar\n page.routeMeta.title = page.title\n },\n\n plugins: [\n // @vuepress/plugin-active-header-link\n (themePlugins.activeHeaderLinks ?? true)\n ? activeHeaderLinksPlugin({\n // should greater than page transition duration\n delay: 300,\n })\n : [],\n\n // @vuepress/plugin-back-to-top\n (themePlugins.backToTop ?? true)\n ? backToTopPlugin(\n isPlainObject(themePlugins.backToTop) ? themePlugins.backToTop : {},\n )\n : [],\n\n // @vuepress/plugin-copy-code\n (themePlugins.copyCode ?? true)\n ? copyCodePlugin({\n ...(isPlainObject(themePlugins.copyCode)\n ? themePlugins.copyCode\n : {}),\n })\n : [],\n\n // @vuepress/plugin-markdown-container\n (themePlugins.hint ?? true)\n ? markdownHintPlugin({\n locales: resolveMarkdownHintLocales(localeOptions),\n ...(isPlainObject(themePlugins.hint) ? themePlugins.hint : {}),\n })\n : [],\n\n // @vuepress/plugin-git\n (themePlugins.git ?? true)\n ? gitPlugin({\n createdTime: false,\n updatedTime: localeOptions.lastUpdated ?? true,\n changelog: { repoUrl: localeOptions.repo || '' },\n ...(isPlainObject(themePlugins.git) ? themePlugins.git : {}),\n })\n : [],\n\n // @vuepress/plugin-links-check\n (themePlugins.linksCheck ?? true)\n ? linksCheckPlugin(\n isPlainObject(themePlugins.linksCheck)\n ? themePlugins.linksCheck\n : {},\n )\n : [],\n\n // @vuepress/plugin-medium-zoom\n (themePlugins.mediumZoom ?? true) ? mediumZoomPlugin() : [],\n\n // @vuepress/plugin-nprogress\n (themePlugins.nprogress ?? true) ? nprogressPlugin() : [],\n\n // @vuepress/plugin-palette\n palettePlugin({ preset: 'sass' }),\n\n // @vuepress/plugin-prismjs\n (themePlugins.prismjs ?? true)\n ? prismjsPlugin(\n isPlainObject(themePlugins.prismjs) ? themePlugins.prismjs : {},\n )\n : [],\n\n // @vuepress/plugin-seo\n hostname && (themePlugins.seo ?? true)\n ? seoPlugin({\n hostname,\n ...(isPlainObject(themePlugins.seo) ? themePlugins.seo : {}),\n })\n : [],\n\n // @vuepress/plugin-sitemap\n hostname && (themePlugins.sitemap ?? true)\n ? sitemapPlugin({\n hostname,\n ...(isPlainObject(themePlugins.sitemap)\n ? themePlugins.sitemap\n : {}),\n })\n : [],\n\n // @vuepress/plugin-markdown-tab\n (themePlugins.tab ?? true)\n ? markdownTabPlugin(\n isPlainObject(themePlugins.tab)\n ? themePlugins.tab\n : { codeTabs: true, tabs: true },\n )\n : [],\n\n // @vuepress/plugin-theme-data\n themeDataPlugin({ themeData: localeOptions }),\n ],\n }\n}\n"],"mappings":"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"}
@@ -1,4 +1,4 @@
1
- import { v as AutoLinkOptions } from "./index-BNjRb2Mr.js";
1
+ import { v as AutoLinkOptions } from "./index-ur5YvkCJ.js";
2
2
 
3
3
  //#region src/client/utils/resolveAutoLink.d.ts
4
4
  /**
@@ -17,4 +17,4 @@ import { v as AutoLinkOptions } from "./index-BNjRb2Mr.js";
17
17
  declare const resolveAutoLink: (config: string, currentPath?: string) => AutoLinkOptions;
18
18
  //#endregion
19
19
  export { resolveAutoLink as t };
20
- //# sourceMappingURL=resolveAutoLink-bQLxrWMd.d.ts.map
20
+ //# sourceMappingURL=resolveAutoLink-DBXc0Cd3.d.ts.map
@@ -0,0 +1,2 @@
1
+ import{resolveRoute as e}from"vuepress/client";const t=(t,n)=>{let{notFound:r,meta:i,path:a}=e(t,n);return r?{text:a,link:a}:{text:i.title||a,link:a}};export{t};
2
+ //# sourceMappingURL=resolveAutoLink-XUJwl3Kb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveAutoLink-XUJwl3Kb.js","names":[],"sources":["../src/client/utils/resolveAutoLink.ts"],"sourcesContent":["import { resolveRoute } from 'vuepress/client'\n\nimport type { AutoLinkOptions } from '../../shared/index.js'\n\n/**\n * Resolve AutoLink props from string\n *\n * 从字符串解析 AutoLink 属性\n *\n * @example\n * - Input: '/README.md'\n * - Output: { text: 'Home', link: '/' }\n *\n * @param config - The string to resolve / 要解析的字符串\n * @param currentPath - The current route path / 当前路由路径\n * @returns Resolved AutoLink options / 解析后的 AutoLink 选项\n */\nexport const resolveAutoLink = (\n config: string,\n currentPath?: string,\n): AutoLinkOptions => {\n const { notFound, meta, path } = resolveRoute<{\n title?: string\n }>(config, currentPath)\n\n return notFound\n ? { text: path, link: path }\n : {\n text: meta.title || path,\n link: path,\n }\n}\n"],"mappings":"+CAiBA,MAAa,GACX,EACA,IACoB,CACpB,GAAM,CAAE,WAAU,OAAM,QAAS,EAE9B,EAAQ,CAAW,EAEtB,OAAO,EACH,CAAE,KAAM,EAAM,KAAM,CAAK,EACzB,CACE,KAAM,EAAK,OAAS,EACpB,KAAM,CACR,CACN"}
@@ -17,4 +17,4 @@ declare const resolveEditLink: ({
17
17
  }) => string | null;
18
18
  //#endregion
19
19
  export { resolveEditLink as n, EDIT_LINK_PATTERNS as t };
20
- //# sourceMappingURL=resolveEditLink-DRtLIWXz.d.ts.map
20
+ //# sourceMappingURL=resolveEditLink-BRZu2eno.d.ts.map
@@ -0,0 +1,2 @@
1
+ import{isLinkHttp as e,removeEndingSlash as t,removeLeadingSlash as n}from"vuepress/shared";import{resolveRepoType as r}from"@theme/resolveRepoType";const i={GitHub:`:repo/edit/:branch/:path`,GitLab:`:repo/-/edit/:branch/:path`,Gitee:`:repo/edit/:branch/:path`,Bitbucket:`:repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default`},a=({docsRepo:e,editLinkPattern:t})=>{if(t)return t;let n=r(e);return n==null?null:i[n]},o=({docsRepo:r,docsBranch:i,docsDir:o,filePathRelative:s,editLinkPattern:c})=>{if(!s)return null;let l=a({docsRepo:r,editLinkPattern:c});return l?l.replace(/:repo/u,e(r)?r:`https://github.com/${r}`).replace(/:branch/u,i).replace(/:path/u,n(`${t(o)}/${s}`)):null};export{o as n,i as t};
2
+ //# sourceMappingURL=resolveEditLink-lteF0-Mv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveEditLink-lteF0-Mv.js","names":[],"sources":["../src/client/utils/resolveEditLink.ts"],"sourcesContent":["import {\n isLinkHttp,\n removeEndingSlash,\n removeLeadingSlash,\n} from 'vuepress/shared'\n\nimport type { RepoType } from '@theme/resolveRepoType'\nimport { resolveRepoType } from '@theme/resolveRepoType'\n\nexport const EDIT_LINK_PATTERNS: Record<Exclude<RepoType, null>, string> = {\n GitHub: ':repo/edit/:branch/:path',\n GitLab: ':repo/-/edit/:branch/:path',\n Gitee: ':repo/edit/:branch/:path',\n Bitbucket:\n ':repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default',\n}\n\nconst resolveEditLinkPatterns = ({\n docsRepo,\n editLinkPattern,\n}: {\n docsRepo: string\n editLinkPattern?: string\n}): string | null => {\n if (editLinkPattern) return editLinkPattern\n\n const repoType = resolveRepoType(docsRepo)\n if (repoType != null) return EDIT_LINK_PATTERNS[repoType]\n\n return null\n}\n\nexport const resolveEditLink = ({\n docsRepo,\n docsBranch,\n docsDir,\n filePathRelative,\n editLinkPattern,\n}: {\n docsRepo: string\n docsBranch: string\n docsDir: string\n filePathRelative: string | null\n editLinkPattern?: string\n}): string | null => {\n if (!filePathRelative) return null\n\n const pattern = resolveEditLinkPatterns({ docsRepo, editLinkPattern })\n if (!pattern) return null\n\n return pattern\n .replace(\n /:repo/u,\n isLinkHttp(docsRepo) ? docsRepo : `https://github.com/${docsRepo}`,\n )\n .replace(/:branch/u, docsBranch)\n .replace(\n /:path/u,\n removeLeadingSlash(`${removeEndingSlash(docsDir)}/${filePathRelative}`),\n )\n}\n"],"mappings":"qJASA,MAAa,EAA8D,CACzE,OAAQ,2BACR,OAAQ,6BACR,MAAO,2BACP,UACE,iFACJ,EAEM,GAA2B,CAC/B,WACA,qBAImB,CACnB,GAAI,EAAiB,OAAO,EAE5B,IAAM,EAAW,EAAgB,CAAQ,EAGzC,OAFI,GAAY,KAET,KAFsB,EAAmB,EAGlD,EAEa,GAAmB,CAC9B,WACA,aACA,UACA,mBACA,qBAOmB,CACnB,GAAI,CAAC,EAAkB,OAAO,KAE9B,IAAM,EAAU,EAAwB,CAAE,WAAU,iBAAgB,CAAC,EAGrE,OAFK,EAEE,EACJ,QACC,SACA,EAAW,CAAQ,EAAI,EAAW,sBAAsB,GAC1D,CAAC,CACA,QAAQ,WAAY,CAAU,CAAC,CAC/B,QACC,SACA,EAAmB,GAAG,EAAkB,CAAO,EAAE,GAAG,GAAkB,CACxE,EAXmB,IAYvB"}
@@ -2,4 +2,4 @@
2
2
  declare const resolvePrefix: (prefix?: string, path?: string) => string;
3
3
  //#endregion
4
4
  export { resolvePrefix as t };
5
- //# sourceMappingURL=resolvePrefix-DEl0CDB0.d.ts.map
5
+ //# sourceMappingURL=resolvePrefix-BXZhEIJn.d.ts.map
@@ -0,0 +1,2 @@
1
+ import{ensureEndingSlash as e,isLinkAbsolute as t,isLinkWithProtocol as n}from"@vuepress/helper/client";const r=(r=``,i=``)=>t(i)||n(i)?i:`${e(r)}${i}`;export{r as t};
2
+ //# sourceMappingURL=resolvePrefix-CQnTmTk4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolvePrefix-CQnTmTk4.js","names":[],"sources":["../src/client/utils/resolvePrefix.ts"],"sourcesContent":["import {\n ensureEndingSlash,\n isLinkAbsolute,\n isLinkWithProtocol,\n} from '@vuepress/helper/client'\n\nexport const resolvePrefix = (prefix = '', path = ''): string =>\n isLinkAbsolute(path) || isLinkWithProtocol(path)\n ? path\n : `${ensureEndingSlash(prefix)}${path}`\n"],"mappings":"wGAMA,MAAa,GAAiB,EAAS,GAAI,EAAO,KAChD,EAAe,CAAI,GAAK,EAAmB,CAAI,EAC3C,EACA,GAAG,EAAkB,CAAM,IAAI"}