diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index f8dd2fa..b541db0 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -12,7 +12,7 @@ labels: bug > 请确认如下情况已检查,并将 [ ] 换成 [x] 来选择 (Change [ ] to [x] to selected which your could make sure) -- [ ] 已使用 Hugo Extended 0.86.0 或更高的版本 (I'm using Hugo Extended version 0.86.0 or later) +- [ ] 已使用 Hugo Extended 0.134.0 或更高的版本 (I'm using Hugo Extended version 0.134.0 or later) - [ ] 已使用 Hugo NexT 4.0 或更高的版本 (I'm using Hugo NexT version 4.0 or later) - [ ] 已阅读 [Hugo 故障排除](https://gohugo.io/troubleshooting/)并尝试修复无果 (I had already read the [Troubleshooting page of Hugo](https://gohugo.io/troubleshooting/)) - [ ] 已搜索过当前所有[已知问题](https://github.com/hugo-next/hugo-theme-next/issues)和[讨论区](https://github.com/hugo-next/hugo-theme-next/discussions/categories/q-a) ,但没有找到帮助 (I had already searched for current [Issues](https://github.com/hugo-next/hugo-theme-next/issues) and [Q & A](https://github.com/hugo-next/hugo-theme-next/discussions/categories/q-a), which does not help me.) diff --git a/.gitignore b/.gitignore index fc75fa0..a1cf3aa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,31 +1,14 @@ # Ignore files in Hugo NexT theme -exampleSite/* +# Special files in content folder +exampleSite/public/ +exampleSite/resources/ +exampleSite/.hugo_build.lock +exampleSite/config.dev.yaml +exampleSite/config.release.yaml +exampleSite/dev-startup.sh -# Exclude special files in content folder -exampleSite/content/**/ -!exampleSite/content -!exmapleSite/content/about.md -!exampleSite/content/archives -!exampleSite/content/post -!exampleSite/content/post/image-viewer -# Exclude special files in data folder -!exampleSite/data - -# Exclude special files in layouts folder -!exampleSite/layouts - -# Exclude special files in static folder -!exampleSite/static - -# Exclude special files -!exampleSite/config.yaml -!exampleSite/startup.sh - -data/* -!data/config.yaml -!data/resources.yaml # vscode .vscode/ diff --git a/README.md b/README.md index 0ff2f94..1a6d9c5 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ > All page designs & configuration compatibility with Hexo NexT, it's very easy migrate your site from Hexo to Hugo and enjoy yourself. -[![Gitter](https://img.shields.io/gitter/room/hugo-next/hugo-them-next?logo=gitter&style=flat-square&label=Gitter)](https://gitter.im/hugo-next/community) [![Build Hugo Version](https://img.shields.io/badge/Hugo-%3E=0.89.0-red?style=flat-square&logo=hugo&color=%23FF4088&&label=Hugo%20Extended)](https://github.com/gohugoio/hugo/releases/latest) [![GitHub deployments](https://img.shields.io/github/deployments/hugo-next/hugo-next.github.io/github-pages?style=flat-square&logo=GitHub&label=Github%20Pages)](https://github.com/hugo-next/hugo-theme-next) [![Contributors](https://img.shields.io/github/contributors/hugo-next/hugo-theme-next?style=flat-square&color=%235E0D73&logo=contributorcovenant&label=Contributors)](https://github.com/hugo-next/hugo-theme-next/graphs/contributors) [![Latest Release](https://img.shields.io/github/v/release/hugo-next/hugo-theme-next?include_prereleases&style=flat-square&color=%23DD2C00&logo=semanticrelease&label=Latest%20Release)](https://github.com/hugo-next/hugo-theme-next/releases) [![Repos Size](https://img.shields.io/github/repo-size/hugo-next/hugo-theme-next?style=flat-square&color=%23FFBF3B&logo=Files&label=Repo%20Size)](https://github.com/hugo-next/hugo-theme-next/find/main) [![GitHub](https://img.shields.io/github/license/hugo-next/hugo-theme-next?logo=webauthn&style=flat-square&label=License)](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE) +[![Gitter](https://img.shields.io/gitter/room/hugo-next/hugo-them-next?logo=gitter&style=flat-square&label=Gitter)](https://app.gitter.im/#/room/#hugo-next_community:gitter.im) [![Build Hugo Version](https://img.shields.io/badge/Hugo-%3E=0.134.0-red?style=flat-square&logo=hugo&color=%23FF4088&&label=Hugo%20Extended)](https://github.com/gohugoio/hugo/releases/latest) [![GitHub deployments](https://img.shields.io/github/deployments/hugo-next/hugo-next.github.io/github-pages?style=flat-square&logo=GitHub&label=Github%20Pages)](https://github.com/hugo-next/hugo-theme-next) [![Contributors](https://img.shields.io/github/contributors/hugo-next/hugo-theme-next?style=flat-square&color=%235E0D73&logo=contributorcovenant&label=Contributors)](https://github.com/hugo-next/hugo-theme-next/graphs/contributors) [![Latest Release](https://img.shields.io/github/v/release/hugo-next/hugo-theme-next?include_prereleases&style=flat-square&color=%23DD2C00&logo=semanticrelease&label=Latest%20Release)](https://github.com/hugo-next/hugo-theme-next/releases) [![Repos Size](https://img.shields.io/github/repo-size/hugo-next/hugo-theme-next?style=flat-square&color=%23FFBF3B&logo=Files&label=Repo%20Size)](https://github.com/hugo-next/hugo-theme-next/find/main) [![GitHub](https://img.shields.io/github/license/hugo-next/hugo-theme-next?logo=webauthn&style=flat-square&label=License)](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE) ![Screenshot](images/screenshot.png) @@ -176,6 +176,10 @@ Hope could submmit your site information in this file [flinks.yaml](https://gith All features development progress and new request in [Hugo NexT V4 Roadmap](https://github.com/hugo-next/hugo-theme-next/issues/9), welcome to join us and compelete it together. +[![Contributors](https://contrib.rocks/image?repo=hugo-next/hugo-theme-next)](https://github.com/hugo-next/hugo-theme-next/graphs/contributors) + +[![HugoNexT Stars](https://starchart.cc/hugo-next/hugo-theme-next.svg?variant=adaptive)](https://github.com/hugo-next/hugo-theme-next/stargazers) + ## 📜 License [MIT License](LICENSE) diff --git a/README.zh.md b/README.zh.md index b7172fc..ae7146c 100644 --- a/README.zh.md +++ b/README.zh.md @@ -10,7 +10,7 @@ > 本主题的所有页面设计和配置项都与原来 `Hexo` 引擎的 `NexT` 主题保持了良好的兼容性,可以非常平滑的从 `Hexo` 迁移至 `Hugo` 引擎,欢迎大家使用并反馈。 -[![Gitter](https://img.shields.io/gitter/room/hugo-next/hugo-them-next?logo=gitter&style=flat-square&label=Gitter)](https://gitter.im/hugo-next/community) [![Build Hugo Version](https://img.shields.io/badge/Hugo-%3E=0.89.0-red?style=flat-square&logo=hugo&color=%23FF4088&&label=Hugo%20Extended)](https://github.com/gohugoio/hugo/releases/latest) [![GitHub deployments](https://img.shields.io/github/deployments/hugo-next/hugo-next.github.io/github-pages?style=flat-square&logo=GitHub&label=Github%20Pages)](https://github.com/hugo-next/hugo-theme-next) [![Contributors](https://img.shields.io/github/contributors/hugo-next/hugo-theme-next?style=flat-square&color=%235E0D73&logo=contributorcovenant&label=Contributors)](https://github.com/hugo-next/hugo-theme-next/graphs/contributors) [![Latest Release](https://img.shields.io/github/v/release/hugo-next/hugo-theme-next?include_prereleases&style=flat-square&color=%23DD2C00&logo=semanticrelease&label=Latest%20Release)](https://github.com/hugo-next/hugo-theme-next/releases) [![Repos Size](https://img.shields.io/github/repo-size/hugo-next/hugo-theme-next?style=flat-square&color=%23FFBF3B&logo=Files&label=Repo%20Size)](https://github.com/hugo-next/hugo-theme-next/find/main) [![GitHub](https://img.shields.io/github/license/hugo-next/hugo-theme-next?logo=webauthn&style=flat-square&label=License)](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE) +[![Gitter](https://img.shields.io/gitter/room/hugo-next/hugo-them-next?logo=gitter&style=flat-square&label=Gitter)](https://app.gitter.im/#/room/#hugo-next_community:gitter.im) [![Build Hugo Version](https://img.shields.io/badge/Hugo-%3E=0.134.0-red?style=flat-square&logo=hugo&color=%23FF4088&&label=Hugo%20Extended)](https://github.com/gohugoio/hugo/releases/latest) [![GitHub deployments](https://img.shields.io/github/deployments/hugo-next/hugo-next.github.io/github-pages?style=flat-square&logo=GitHub&label=Github%20Pages)](https://github.com/hugo-next/hugo-theme-next) [![Contributors](https://img.shields.io/github/contributors/hugo-next/hugo-theme-next?style=flat-square&color=%235E0D73&logo=contributorcovenant&label=Contributors)](https://github.com/hugo-next/hugo-theme-next/graphs/contributors) [![Latest Release](https://img.shields.io/github/v/release/hugo-next/hugo-theme-next?include_prereleases&style=flat-square&color=%23DD2C00&logo=semanticrelease&label=Latest%20Release)](https://github.com/hugo-next/hugo-theme-next/releases) [![Repos Size](https://img.shields.io/github/repo-size/hugo-next/hugo-theme-next?style=flat-square&color=%23FFBF3B&logo=Files&label=Repo%20Size)](https://github.com/hugo-next/hugo-theme-next/find/main) [![GitHub](https://img.shields.io/github/license/hugo-next/hugo-theme-next?logo=webauthn&style=flat-square&label=License)](https://github.com/hugo-next/hugo-theme-next/blob/main/LICENSE) ![截图](images/screenshot.png) @@ -185,6 +185,10 @@ tags: 关于本主题的开发进度和后续的发展路线图,可访问 [Hugo NexT V4 Roadmap](https://github.com/hugo-next/hugo-theme-next/issues/9) 查看详情,也欢迎大家参与一起来完善。 +[![Contributors](https://contrib.rocks/image?repo=hugo-next/hugo-theme-next)](https://github.com/hugo-next/hugo-theme-next/graphs/contributors) + +[![HugoNexT Stars](https://starchart.cc/hugo-next/hugo-theme-next.svg?variant=adaptive)](https://github.com/hugo-next/hugo-theme-next/stargazers) + ## 📜 许可证 [MIT License](LICENSE) diff --git a/VERSION b/VERSION index 7962f0f..f6cdf40 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.6.3 \ No newline at end of file +4.7.0 diff --git a/assets/css/_colors.scss b/assets/css/_colors.scss index 62b163b..bf74c6d 100644 --- a/assets/css/_colors.scss +++ b/assets/css/_colors.scss @@ -4,6 +4,8 @@ --content-bg-color: #{$content-bg-color}; --card-bg-color: #{$card-bg-color}; --text-color: #{$text-color}; + --selection-bg: #{$grey-lighter}; + --selection-color: #{$black-deep}; --blockquote-color: #{$blockquote-color}; --link-color: #{$link-color}; --link-hover-color: #{$link-hover-color}; @@ -14,6 +16,8 @@ --menu-item-bg-color: #{$menu-item-bg-color}; --theme-color: #{$theme-color}; + --border-color: #{$border-color}; + --btn-default-bg: #{$btn-default-bg}; --btn-default-color: #{$btn-default-color}; --btn-default-border-color: #{$btn-default-border-color}; @@ -36,6 +40,8 @@ --content-bg-color: #{$content-bg-color-dark}; --card-bg-color: #{$card-bg-color-dark}; --text-color: #{$text-color-dark}; + --selection-bg: #{$gainsboro}; + --selection-color: #{$black-dim}; --blockquote-color: #{$blockquote-color-dark}; --link-color: #{$link-color-dark}; --link-hover-color: #{$link-hover-color-dark}; @@ -46,6 +52,8 @@ --menu-item-bg-color: #{$menu-item-bg-color-dark}; --theme-color: #{$theme-color-dark}; + --border-color: #{$border-color-dark}; + --btn-default-bg: #{$btn-default-bg-dark}; --btn-default-color: #{$btn-default-color-dark}; --btn-default-border-color: #{$btn-default-border-color-dark}; diff --git a/assets/css/_common/components/third-party/disqusjs.scss b/assets/css/_common/components/3rd/disqusjs.scss similarity index 100% rename from assets/css/_common/components/third-party/disqusjs.scss rename to assets/css/_common/components/3rd/disqusjs.scss diff --git a/assets/css/_common/components/third-party/gitalk.scss b/assets/css/_common/components/3rd/gitalk.scss similarity index 100% rename from assets/css/_common/components/third-party/gitalk.scss rename to assets/css/_common/components/3rd/gitalk.scss diff --git a/assets/css/_common/components/third-party/gitter.scss b/assets/css/_common/components/3rd/gitter.scss similarity index 100% rename from assets/css/_common/components/third-party/gitter.scss rename to assets/css/_common/components/3rd/gitter.scss diff --git a/assets/css/_common/components/third-party/index.scss b/assets/css/_common/components/3rd/index.scss similarity index 95% rename from assets/css/_common/components/third-party/index.scss rename to assets/css/_common/components/3rd/index.scss index c254fdb..51c75b2 100644 --- a/assets/css/_common/components/third-party/index.scss +++ b/assets/css/_common/components/3rd/index.scss @@ -6,7 +6,6 @@ @import 'gitter'; @import 'livere'; @import 'waline'; -@import 'mermaid'; .use-motion .animated { // Fix issue #48 #55 diff --git a/assets/css/_common/components/third-party/livere.scss b/assets/css/_common/components/3rd/livere.scss similarity index 100% rename from assets/css/_common/components/third-party/livere.scss rename to assets/css/_common/components/3rd/livere.scss diff --git a/assets/css/_common/components/third-party/related-posts.scss b/assets/css/_common/components/3rd/related-posts.scss similarity index 100% rename from assets/css/_common/components/third-party/related-posts.scss rename to assets/css/_common/components/3rd/related-posts.scss diff --git a/assets/css/_common/components/third-party/search.scss b/assets/css/_common/components/3rd/search.scss similarity index 100% rename from assets/css/_common/components/third-party/search.scss rename to assets/css/_common/components/3rd/search.scss diff --git a/assets/css/_common/components/third-party/utterances.scss b/assets/css/_common/components/3rd/utterances.scss similarity index 100% rename from assets/css/_common/components/third-party/utterances.scss rename to assets/css/_common/components/3rd/utterances.scss diff --git a/assets/css/_common/components/third-party/waline.scss b/assets/css/_common/components/3rd/waline.scss similarity index 100% rename from assets/css/_common/components/third-party/waline.scss rename to assets/css/_common/components/3rd/waline.scss diff --git a/assets/css/_common/components/index.scss b/assets/css/_common/components/index.scss index ca8bf6a..15bb2f2 100644 --- a/assets/css/_common/components/index.scss +++ b/assets/css/_common/components/index.scss @@ -12,9 +12,17 @@ z-index: $zindex-5; } +.hidden { + display: none !important; +} + +.show { + display: block !important; +} + @import 'tool-buttons'; @import 'reading-progress'; @import 'post'; @import 'pages'; -@import 'third-party'; +@import '3rd'; diff --git a/assets/css/_common/components/pages/flinks.scss b/assets/css/_common/components/pages/flinks.scss index 5f0ced2..95e3fc8 100644 --- a/assets/css/_common/components/pages/flinks.scss +++ b/assets/css/_common/components/pages/flinks.scss @@ -1,6 +1,6 @@ .flinks-block { - .flinks-block-title { + .flinks-header { text-align: center; font-weight: bold; } diff --git a/assets/css/_common/components/post/index.scss b/assets/css/_common/components/post/index.scss index 186c464..68a27b9 100644 --- a/assets/css/_common/components/post/index.scss +++ b/assets/css/_common/components/post/index.scss @@ -24,13 +24,13 @@ } @if $motion_trans_post_header { - .post-header { + .post-header, .flinks-header { visibility: hidden; } } @if $motion_trans_post_body { - .post-body { + .post-body, .flinks-body { visibility: hidden; } } @@ -78,4 +78,4 @@ @import 'post-footer'; @import 'post-widgets'; @import 'post-reward'; -@import 'post-followme'; +@import 'post-followme'; \ No newline at end of file diff --git a/assets/css/_common/components/post/post-alert.scss b/assets/css/_common/components/post/post-alert.scss new file mode 100644 index 0000000..d2c3b0b --- /dev/null +++ b/assets/css/_common/components/post/post-alert.scss @@ -0,0 +1,36 @@ + +@mixin alert-styles($type, $color) { + .post-alert-#{$type} { + padding: 0 0 0 10px; + border-left: 6px solid $color; + font-size: 0.825em; + color: $color; + } +} + +@each $key, $color in $post_alert_colors { + @include alert-styles(#{$key}, $color); +} + +.post-alert-title, .post-expired-title { + + display: flex; + align-items: center; + line-height: 1.5; + margin: 0; + + i { + font-size: 1.25em; + text-align: center; + vertical-align: middle; + } + + span { + margin: 0 0 0 8px; + letter-spacing: 0.08em; + } +} + +.post-alert-content, .post-expired-content { + color: var(--text-color); +} \ No newline at end of file diff --git a/assets/css/_common/components/post/post-body.scss b/assets/css/_common/components/post/post-body.scss index a7b1caf..c9fbdc3 100644 --- a/assets/css/_common/components/post/post-body.scss +++ b/assets/css/_common/components/post/post-body.scss @@ -80,4 +80,66 @@ svg { max-width: 98%; } + + // For read more post content anchor + #more { + visibility: hidden; + } + + /** Defined speical border properties for top card of post **/ + $speical-border-width: 5px; + $speical-border-radius: 8px; + .post-expired-tip { + + $expired-color: #4A90E2; + + font-size: var(--font-size-small); + border: 1px solid #4A90E2; + border-radius: $speical-border-radius; + border-left: $speical-border-width solid #4A90E2; + border-top: $speical-border-width solid #4A90E2; + box-shadow: .6rem .5rem 0.3rem var(--body-bg-color); + margin: 0 0 0.85em 0; + padding: 0.65em 0.15em 0.65em 0.95em; + display: none; + + .post-expired-title { + color: #4A90E2; + font-weight: bold; + } + + .post-expired-times { + font-weight: bold; + font-size: 1.15em; + color: #e5534b; + margin: 0 3px; + } + } + + .post-summary-wrapper { + $summary-color: #ea6733; + + margin: 0 0 .85em 0; + border-radius: $speical-border-radius; + border: 1px solid $summary-color; + border-right: $speical-border-width solid $summary-color; + border-bottom: $speical-border-width solid $summary-color; + box-shadow: .6rem .5rem 0.3rem var(--body-bg-color); + + .summary-title { + margin: .65em .93em 0 .93em; + color: $summary-color; + font-weight: bold; + } + + .summary-content { + background-color: var(--card-bg-color); + border-radius: $speical-border-radius; + box-shadow: .08rem .06rem 0.03rem var(--body-bg-color); + margin: .85em; + padding: .85em .95em; + } + } + + @import 'post-alert'; } diff --git a/assets/css/_common/components/post/post-footer.scss b/assets/css/_common/components/post/post-footer.scss index a7aa412..5cb7f52 100644 --- a/assets/css/_common/components/post/post-footer.scss +++ b/assets/css/_common/components/post/post-footer.scss @@ -91,3 +91,21 @@ } } } + +@if $post_share_enable { + .post-share-tools { + display: flex; + justify-content: center; + + a { + border: 0px; + } + } + + @if $post_sharethis_set { + .st-cmp-settings { + display: none; + } + } +} + diff --git a/assets/css/_common/components/third-party/mermaid.scss b/assets/css/_common/components/third-party/mermaid.scss deleted file mode 100644 index 7512808..0000000 --- a/assets/css/_common/components/third-party/mermaid.scss +++ /dev/null @@ -1,3 +0,0 @@ -.post-block .post-body .mermaid { - background: var(--highlight-foreground); -} \ No newline at end of file diff --git a/assets/css/_common/components/tool-buttons.scss b/assets/css/_common/components/tool-buttons.scss index 2f06f6d..2b8630a 100644 --- a/assets/css/_common/components/tool-buttons.scss +++ b/assets/css/_common/components/tool-buttons.scss @@ -43,10 +43,6 @@ .goto-comments { display: none; } - - .goto-comments-on { - display: block; - } } @if $back2top_enable { diff --git a/assets/css/_common/outline/footer/index.scss b/assets/css/_common/outline/footer/index.scss index 83e6762..1c9dbc7 100644 --- a/assets/css/_common/outline/footer/index.scss +++ b/assets/css/_common/outline/footer/index.scss @@ -29,7 +29,143 @@ font-size: $font-size-smallest; } - .google-translate { + .i18n-translate { + display: flex; + justify-content: center; + + .fa { + font-size: $font-size-largest; + margin: auto 0; + line-height: normal; + } + + .lang-select, .lang-options { + + .flag-icon { + background-size: cover; + width: 30px; + height: 20px; + display: none; + } + + .flag-icon-zh-cn { + background-image: url("/imgs/flags/zh-cn.svg"); + } + + .flag-icon-en-us { + background-image: url("/imgs/flags/en-us.svg"); + } + + .flag-icon-fr-fr { + background-image: url("/imgs/flags/fr-fr.svg"); + } + } + + .lang-select { + + .flag-icon { + display: block; + } + } + + .lang-select { + margin-left: 16px; + position: relative; + display: inline-block; + line-height: 1.25; + + .fa { + font-size: $font-size-large; + } + + .selected-option { + display: flex; + align-items: center; + cursor: pointer; + padding: 5px; + border: 1px solid #ccc; + border-radius: 4px; + justify-content: center; + width: 140px; + + /* &:hover { + + .lang-options { + display: block; + opacity: 1; + transform: translateY(0); + } + } */ + + .selected-language { + margin: 0 10px; + } + } + + .lang-options { + display: none; + position: absolute; + top: 100%; + left: 0; + right: 0; + border: 1px solid var(--border-color); + border-top: none; + border-radius: 0 0 4px 4px; + background-color: #ffffff; + opacity: 0; + transform: translateY(-10px); + transition: opacity 0.3s ease, transform 0.3s ease; + z-index: 1; + + &:hover { + display: block; + opacity: 1; + transform: translateY(0); + } + + .lang-option { + padding: 5px; + cursor: pointer; + display: flex; + justify-content: left; + padding-left: 14px; + + &:hover { + background-color: var(--selection-bg); + } + + .lang-name { + margin: 0 16px 0 8px; + } + } + } + } + } + + /* select { + margin-left: 10px; + + option { + font-size: $font-size-small; + background-repeat: no-repeat; + background-position: right center; + padding-right: 30px; + background-size: cover; + } + } + + .flag-icon-zh-cn { + background-image: url("../imgs/flags/zh-CN.png"); + } + + .flag-icon-en-us { + background-image: url("../imgs/flags/en-US.png"); + } + + .flag-icon-fr-fr { + background-image: url("../imgs/flags/fr-FR.png"); + } + } */ + /* .google-translate { display: flex; justify-content: center; .fa { @@ -37,7 +173,7 @@ margin: auto 0; line-height: normal; } - } + } */ @if $footer_vendors_enable { .vendors-list { @@ -47,14 +183,17 @@ img { display: inline-block; - max-width: 50px; - filter: var(--highlight-img-fill); + max-width: 48px; + min-width: 14px; + max-height: 16px; + @include mobile() { max-width: 40px; } - - &:last-child { - max-height: 18px; + + // Only work for svg image + &[src$=".svg"] { + filter: var(--highlight-img-fill); } } diff --git a/assets/css/_common/outline/mobile.scss b/assets/css/_common/outline/mobile.scss index 8282056..63bc6c9 100644 --- a/assets/css/_common/outline/mobile.scss +++ b/assets/css/_common/outline/mobile.scss @@ -20,7 +20,10 @@ } .post-block { - margin-top: initial !important; + //margin-top: initial !important; + // https://github.com/hugo-next/hugo-theme-next/issues/154 + // make the post block more clear in small screen + margin-top: 5px !important; // Inside posts blocks content padding (default 40px). padding: $content-mobile-padding 18px $content-mobile-padding !important; } diff --git a/assets/css/_common/scaffolding/base.scss b/assets/css/_common/scaffolding/base.scss index 3f3e049..2ca5f66 100644 --- a/assets/css/_common/scaffolding/base.scss +++ b/assets/css/_common/scaffolding/base.scss @@ -1,6 +1,7 @@ ::selection { - background: $selection-bg; - color: $selection-color; + background: var(--selection-bg); + color: var(--selection-color); + } html, body { diff --git a/assets/css/_common/scaffolding/highlight/copy-code.scss b/assets/css/_common/scaffolding/highlight/copy-code.scss index d30c876..b1eeff8 100644 --- a/assets/css/_common/scaffolding/highlight/copy-code.scss +++ b/assets/css/_common/scaffolding/highlight/copy-code.scss @@ -3,86 +3,182 @@ background: var(--highlight-background); margin-bottom: 26px; + line-height: 1.25; - //TODO Need fixed the copy button show position. - div:first-child { - overflow-x: auto; - } + > .code-header { + color:#f8f8f2; + display: flex; + justify-content: space-between; + align-items: center; + padding: .25rem 0; + width: 100%; - pre { - position: relative; - overflow-x: auto; - } + &:hover { + cursor: pointer; + } - table tbody tr { - //TODO Fixed the too long code line over - // layout background color. - background: #272822; - } + .code-lang { + width: 100%; + text-align: center; + font-weight: bold; - /* pre > code span { - white-space: break-spaces; - overflow: hidden; - word-break: break-all; - word-wrap: break-word; - } */ -} + &::after { + content: "Code"; + } + } -@if $codeblock_copy_btn_enable { - - .highlight:hover .copy-btn, pre:hover .copy-btn { - opacity: 1; - } - - .copy-btn { - color: $black-dim; - cursor: pointer; - line-height: 1.6; - opacity: 0; - padding: 2px 6px; - position: absolute; - right: 8px; - top: 4px; - transition: opacity $transition-ease; - background: var(--highlight-background); - - @if $codeblock_style == 'flat' { - background: white; - border: 0; - font-size: $font-size-smaller; - - } @else if $codeblock_style == 'mac' { - color: var(--highlight-foreground); - font-size: 14px; - border-radius: 3px; - } @else { - background-color: $gainsboro; - background-image: linear-gradient(#fcfcfc, $gainsboro); - border: 1px solid #d5d5d5; - border-radius: 3px; - font-size: $font-size-smaller; + .collapse-btn { + font-family: "Font Awesome 6 Free"; + font-weight: 900; + text-align: center; + width: 1.25em; + display: inline-block; + font-style: normal; + font-variant: normal; + line-height: 1; + text-rendering: auto; + padding-right: .25rem; + transition: content 1s ease-in-out; + &::before { + content: "\f102"; + } + + &.collapse::before { + content: "\f103"; + } + } + + @each $type, $text in $code-type-list { + &.#{$type} .code-lang::after { + content: $text; + } + } + + .ellipses-btn { + padding-right: .45rem; } } -} -@if $codeblock_style == 'mac' { - .highlight { + > .chroma { + position: relative; + max-height: 500px; + opacity: 1; + visibility: visible; + transition: max-height 0.8s ease-in-out, opacity 0.7s ease-in-out; + + &.hidden-code { + max-height: 0; + opacity: 0; + visibility: hidden; + + animation-name: slideInUp; + animation-duration: 1s; + } + + pre { + padding: .45rem 0; + } + + .lntd:first-child { + min-width: 1.6rem; + text-align: right; + background-color: #272822; + + a { + border-bottom: none; + } + } + + .lntd:last-child { + width: 100%; + + pre { + overflow-wrap: break-word; + white-space: pre-wrap; + line-break: anywhere; + word-break: break-all; + overflow-x: auto; + } + } + + > code > span { + overflow-wrap: break-word; + white-space: pre-wrap; + line-break: anywhere; + word-break: break-all; + } + + @if $codeblock_copy_btn_enable { + + &:hover .copy-btn { + opacity: 1; + } + + .copy-btn { + color: $black-dim; + cursor: pointer; + line-height: 1.6; + opacity: 0; + padding: 2px 6px; + position: absolute; + right: 8px; + top: 4px; + border-radius: 3px; + font-size: $font-size-medium; + transition: opacity $transition-ease; + background: var(--highlight-background); + + font-family: "Font Awesome 6 Free"; + font-weight: 900; + text-align: center; + width: 1.25em; + display: inline-block; + font-style: normal; + font-variant: normal; + text-rendering: auto; + + &::before { + content: "\f0c5"; + } + + &.copied::before { + content: "\f058"; + } + + &.uncopied::before { + content: "\f057"; + } + + @if $codeblock_style == 'flat' { + background: white; + border: 0; + } @else if $codeblock_style == 'mac' { + color: var(--highlight-foreground); + } @else { + background-color: $gainsboro; + background-image: linear-gradient(#fcfcfc, $gainsboro); + border: 1px solid #d5d5d5; + } + } + } + } + + + @if $codeblock_style == 'mac' { + border-radius: 5px; box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4); - padding-top: 30px; - .table-container { - border-radius: 0 0 5px 5px; - } - - &::before { - background: #fc625d; - box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b; - margin-top: -20px; - margin-left: 10px; - position: absolute; - @include round-icon(12px); - } + .code-header { + + &::before { + background: #fc625d; + box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b; + margin-left: 10px; + @include round-icon(12px); + } + } } + } \ No newline at end of file diff --git a/assets/css/_common/scaffolding/highlight/index.scss b/assets/css/_common/scaffolding/highlight/index.scss index bea46e8..fa461bd 100644 --- a/assets/css/_common/scaffolding/highlight/index.scss +++ b/assets/css/_common/scaffolding/highlight/index.scss @@ -1,4 +1,5 @@ @import 'copy-code'; +@import 'monokai'; %code-inline { background: var(--highlight-background); @@ -8,7 +9,7 @@ pre { padding: 18px; margin: 0; -} +} p > code, li > code { @extend %code-inline; diff --git a/assets/css/_common/scaffolding/highlight/monokai.scss b/assets/css/_common/scaffolding/highlight/monokai.scss new file mode 100644 index 0000000..46d95f2 --- /dev/null +++ b/assets/css/_common/scaffolding/highlight/monokai.scss @@ -0,0 +1,87 @@ +/** monokai highlight style **/ + /* Background */ .bg { color:#f8f8f2;background-color:#272822; } + /* PreWrapper */ .chroma { color:#f8f8f2;background-color:#272822; } + /* Other */ .chroma .x { } + /* Error */ .chroma .err { color:#960050;background-color:#1e0010 } + /* CodeLine */ .chroma .cl { } + /* LineLink */ .chroma .lnlinks { outline:none;text-decoration:none;color:inherit } + /* LineTableTD */ .chroma .lntd { vertical-align:top;padding:0;margin:0;border:0; } + /* LineTable */ .chroma .lntable { border-spacing:0;padding:0;margin:0;border:0; } + /* LineHighlight */ .chroma .hl { background-color:#3c3d38 } + /* LineNumbersTable */ .chroma .lnt { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f } + /* LineNumbers */ .chroma .ln { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f } + /* Line */ .chroma .line { display:flex; } + /* Keyword */ .chroma .k { color:#66d9ef } + /* KeywordConstant */ .chroma .kc { color:#66d9ef } + /* KeywordDeclaration */ .chroma .kd { color:#66d9ef } + /* KeywordNamespace */ .chroma .kn { color:#f92672 } + /* KeywordPseudo */ .chroma .kp { color:#66d9ef } + /* KeywordReserved */ .chroma .kr { color:#66d9ef } + /* KeywordType */ .chroma .kt { color:#66d9ef } + /* Name */ .chroma .n { } + /* NameAttribute */ .chroma .na { color:#a6e22e } + /* NameBuiltin */ .chroma .nb { } + /* NameBuiltinPseudo */ .chroma .bp { } + /* NameClass */ .chroma .nc { color:#a6e22e } + /* NameConstant */ .chroma .no { color:#66d9ef } + /* NameDecorator */ .chroma .nd { color:#a6e22e } + /* NameEntity */ .chroma .ni { } + /* NameException */ .chroma .ne { color:#a6e22e } + /* NameFunction */ .chroma .nf { color:#a6e22e } + /* NameFunctionMagic */ .chroma .fm { } + /* NameLabel */ .chroma .nl { } + /* NameNamespace */ .chroma .nn { } + /* NameOther */ .chroma .nx { color:#a6e22e } + /* NameProperty */ .chroma .py { } + /* NameTag */ .chroma .nt { color:#f92672 } + /* NameVariable */ .chroma .nv { } + /* NameVariableClass */ .chroma .vc { } + /* NameVariableGlobal */ .chroma .vg { } + /* NameVariableInstance */ .chroma .vi { } + /* NameVariableMagic */ .chroma .vm { } + /* Literal */ .chroma .l { color:#ae81ff } + /* LiteralDate */ .chroma .ld { color:#e6db74 } + /* LiteralString */ .chroma .s { color:#e6db74 } + /* LiteralStringAffix */ .chroma .sa { color:#e6db74 } + /* LiteralStringBacktick */ .chroma .sb { color:#e6db74 } + /* LiteralStringChar */ .chroma .sc { color:#e6db74 } + /* LiteralStringDelimiter */ .chroma .dl { color:#e6db74 } + /* LiteralStringDoc */ .chroma .sd { color:#e6db74 } + /* LiteralStringDouble */ .chroma .s2 { color:#e6db74 } + /* LiteralStringEscape */ .chroma .se { color:#ae81ff } + /* LiteralStringHeredoc */ .chroma .sh { color:#e6db74 } + /* LiteralStringInterpol */ .chroma .si { color:#e6db74 } + /* LiteralStringOther */ .chroma .sx { color:#e6db74 } + /* LiteralStringRegex */ .chroma .sr { color:#e6db74 } + /* LiteralStringSingle */ .chroma .s1 { color:#e6db74 } + /* LiteralStringSymbol */ .chroma .ss { color:#e6db74 } + /* LiteralNumber */ .chroma .m { color:#ae81ff } + /* LiteralNumberBin */ .chroma .mb { color:#ae81ff } + /* LiteralNumberFloat */ .chroma .mf { color:#ae81ff } + /* LiteralNumberHex */ .chroma .mh { color:#ae81ff } + /* LiteralNumberInteger */ .chroma .mi { color:#ae81ff } + /* LiteralNumberIntegerLong */ .chroma .il { color:#ae81ff } + /* LiteralNumberOct */ .chroma .mo { color:#ae81ff } + /* Operator */ .chroma .o { color:#f92672 } + /* OperatorWord */ .chroma .ow { color:#f92672 } + /* Punctuation */ .chroma .p { } + /* Comment */ .chroma .c { color:#75715e } + /* CommentHashbang */ .chroma .ch { color:#75715e } + /* CommentMultiline */ .chroma .cm { color:#75715e } + /* CommentSingle */ .chroma .c1 { color:#75715e } + /* CommentSpecial */ .chroma .cs { color:#75715e } + /* CommentPreproc */ .chroma .cp { color:#75715e } + /* CommentPreprocFile */ .chroma .cpf { color:#75715e } + /* Generic */ .chroma .g { } + /* GenericDeleted */ .chroma .gd { color:#f92672 } + /* GenericEmph */ .chroma .ge { font-style:italic } + /* GenericError */ .chroma .gr { } + /* GenericHeading */ .chroma .gh { } + /* GenericInserted */ .chroma .gi { color:#a6e22e } + /* GenericOutput */ .chroma .go { } + /* GenericPrompt */ .chroma .gp { } + /* GenericStrong */ .chroma .gs { font-weight:bold } + /* GenericSubheading */ .chroma .gu { color:#75715e } + /* GenericTraceback */ .chroma .gt { } + /* GenericUnderline */ .chroma .gl { } + /* TextWhitespace */ .chroma .w { } \ No newline at end of file diff --git a/assets/css/_common/scaffolding/tags/bilibili.scss b/assets/css/_common/scaffolding/tags/bilibili.scss new file mode 100644 index 0000000..e7c4523 --- /dev/null +++ b/assets/css/_common/scaffolding/tags/bilibili.scss @@ -0,0 +1,16 @@ +.bilibili-video { + position: relative; + width: 100%; + height: 0; + padding-bottom: 50%; + margin: auto; + text-align: center; + + iframe { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + } +} \ No newline at end of file diff --git a/assets/css/_common/scaffolding/tags/index.scss b/assets/css/_common/scaffolding/tags/index.scss index fc8eadd..ee65e08 100644 --- a/assets/css/_common/scaffolding/tags/index.scss +++ b/assets/css/_common/scaffolding/tags/index.scss @@ -2,7 +2,7 @@ @import 'group-pictures'; @import 'label'; @import 'link-grid'; -@import 'mermaid'; @import 'note'; @import 'pdf'; @import 'tabs'; +@import 'bilibili' diff --git a/assets/css/_common/scaffolding/tags/mermaid.scss b/assets/css/_common/scaffolding/tags/mermaid.scss deleted file mode 100644 index ab8b522..0000000 --- a/assets/css/_common/scaffolding/tags/mermaid.scss +++ /dev/null @@ -1,6 +0,0 @@ -@if $mermaid_enable { - .mermaid { - margin-bottom: 20px; - text-align: center; - } -} diff --git a/assets/css/_variables/base.scss b/assets/css/_variables/base.scss index f41ea0a..42be5bb 100644 --- a/assets/css/_variables/base.scss +++ b/assets/css/_variables/base.scss @@ -13,6 +13,7 @@ $grey-lighter : #ddd; $grey-light : #ccc; $grey : #bbb; $grey-dark : #999; +$grey-cnt : #5c5c5c; $grey-dim : #666; $black-light : #555; $black-dim : #333; @@ -49,7 +50,8 @@ $blockquote-color : $grey-dim; $blockquote-color-dark : $grey; // Global border color. -$border-color : $grey-light; +$border-color : $grey-dark; +$border-color-dark : $grey-lighter; // Background color for $body-bg-color : white; @@ -58,8 +60,10 @@ $content-bg-color : white; $content-bg-color-dark : $black-dim; // Selection -$selection-bg : $blue-deep; +$selection-bg : rgba(53, 166, 247, 0.25) !default; +$selection-bg-dark : rgba(50, 112, 194, 0.4) !default; $selection-color : $gainsboro; +$selection-color-dark : $grey-dark; // Dark mode color $card-bg-color : $whitesmoke; @@ -171,6 +175,60 @@ $highlight-foreground-dark : $highlight_dark_foreground; $highlight-gutter-background-dark : mix($highlight-background-dark, $highlight-foreground-dark, 90%); $highlight-gutter-foreground-dark : mix($highlight-background-dark, $highlight-foreground-dark, 10%); +// Code type list +$code-type-list: + "language-bash" "Bash", + "language-c" "C", + "language-cs" "C#", + "language-cpp" "C++", + "language-clojure" "Clojure", + "language-coffeescript" "CoffeeScript", + "language-css" "CSS", + "language-dart" "Dart", + "language-diff" "Diff", + "language-erlang" "Erlang", + "language-go" "Go", + "language-go-html-template" "Go HTML Template", + "language-groovy" "Groovy", + "language-haskell" "Haskell", + "language-html" "HTML", + "language-http" "HTTP", + "language-xml" "XML", + "language-java" "Java", + "language-js" "JavaScript", + "language-javascript" "JavaScript", + "language-json" "JSON", + "language-kotlin" "Kotlin", + "language-latex" "LaTeX", + "language-less" "Less", + "language-lisp" "Lisp", + "language-lua" "Lua", + "language-makefile" "Makefile", + "language-markdown" "Markdown", + "language-matlab" "Matlab", + "language-objectivec" "Objective-C", + "language-php" "PHP", + "language-perl" "Perl", + "language-powershell" "PowerShell", + "language-posh" "PowerShell", + "language-pwsh" "PowerShell", + "language-python" "Python", + "language-r" "R", + "language-ruby" "Ruby", + "language-rust" "Rust", + "language-scala" "Scala", + "language-scss" "Scss", + "language-shell" "Shell", + "language-sql" "SQL", + "language-swift" "Swift", + "language-tex" "TeX", + "language-toml" "TOML", + "language-ts" "TypeScript", + "language-typescript" "TypeScript", + "language-vue" "Vue", + "language-yml" "YAML", + "language-yaml" "YAML", + !default; // Buttons // -------------------------------------------------- diff --git a/assets/css/main.scss b/assets/css/main.scss index 1865bbd..1d8542f 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -7,7 +7,6 @@ $darkmode : {{ $P.darkmode }}; $body_scrollbar_overlay : {{ $P.bodyScrollbar.overlay }}; $body_scrollbar_stable : {{ $P.bodyScrollbar.stable }}; -$mermaid_enable : {{ $P.mermaid.enable }}; $mobile_layout_economy : {{ $P.mobileLayoutEconomy }}; $theme_color_dark : {{ $P.themeColor.dark }}; $theme_color_light : {{ $P.themeColor.light }}; @@ -85,6 +84,9 @@ $post_edit_enable : {{ $P.postEdit.enable }}; $post_meta_item_text : {{ $P.postMeta.itemText }}; $reward_settings_animation : {{ $P.rewardSets.animation }}; $post_end_tag_icon : {{ $P.postFooter.tagIcon }}; +$post_share_enable : {{ $P.share.enable }}; +$post_sharethis_set : {{ isset $P.share "sharethis" }}; +$post_alert_colors : ({{ range $key, $value := $P.postAlerts }} {{ $key }}: {{ $value.color }}, {{ end }}); // TODO find the paramters $text_align_desktop : {{ $P.textAlign.desktop }}; diff --git a/assets/css/noscript.scss b/assets/css/noscript.scss index 2ca321f..83c78aa 100644 --- a/assets/css/noscript.scss +++ b/assets/css/noscript.scss @@ -3,10 +3,13 @@ body { margin-top: 2rem; } .use-motion .menu-item, .use-motion .sidebar, .use-motion .post-block, +.use-motion .flinks-block, .use-motion .pagination, .use-motion .comments, .use-motion .post-header, +.use-motion .flinks-header, .use-motion .post-body, +.use-motion .flinks-body, .use-motion .collection-header { visibility: visible; } diff --git a/assets/js/third-party/comments/artalk.js b/assets/js/3rd/comments/artalk.js similarity index 100% rename from assets/js/third-party/comments/artalk.js rename to assets/js/3rd/comments/artalk.js diff --git a/assets/js/third-party/comments/giscus.js b/assets/js/3rd/comments/giscus.js similarity index 100% rename from assets/js/third-party/comments/giscus.js rename to assets/js/3rd/comments/giscus.js diff --git a/assets/js/third-party/comments/livere.js b/assets/js/3rd/comments/livere.js similarity index 100% rename from assets/js/third-party/comments/livere.js rename to assets/js/3rd/comments/livere.js diff --git a/assets/js/third-party/comments/utterances.js b/assets/js/3rd/comments/utterances.js similarity index 100% rename from assets/js/third-party/comments/utterances.js rename to assets/js/3rd/comments/utterances.js diff --git a/assets/js/third-party/comments/waline.js b/assets/js/3rd/comments/waline.js similarity index 93% rename from assets/js/third-party/comments/waline.js rename to assets/js/3rd/comments/waline.js index 8c3b191..5855941 100644 --- a/assets/js/third-party/comments/waline.js +++ b/assets/js/3rd/comments/waline.js @@ -5,10 +5,8 @@ NexT.plugins.comments.waline = function() { || !NexT.utils.checkDOMExist(element)) return; const { - comment, emoji, imguploader, - pageview, placeholder, sofa, requiredmeta, @@ -39,8 +37,6 @@ NexT.plugins.comments.waline = function() { Waline.init({ locale, el : element, - pageview : pageview, - comment : comment, emoji : emoji, imageUploader : imguploader, wordLimit : wordlimit, diff --git a/assets/js/3rd/comments/waline3.js b/assets/js/3rd/comments/waline3.js new file mode 100644 index 0000000..4219796 --- /dev/null +++ b/assets/js/3rd/comments/waline3.js @@ -0,0 +1,60 @@ +/* Waline3 comment plugin */ +NexT.plugins.comments.waline3 = function () { + const element = '.waline3-container'; + if (!NexT.CONFIG.waline3 + || !NexT.utils.checkDOMExist(element)) return; + + const { + emoji, + search, + imguploader, + placeholder, + sofa, + requiredmeta, + serverurl, + wordlimit, + reaction, + reactiontext, + reactiontitle + } = NexT.CONFIG.waline3.cfg; + + const waline_js = NexT.utils.getCDNResource(NexT.CONFIG.waline3.js); + + NexT.utils.lazyLoadComponent(element, () => { + + const waline_css = NexT.utils.getCDNResource(NexT.CONFIG.waline3.css); + NexT.utils.getStyle(waline_css, 'before'); + + let waline_script = ` + let locale = { + placeholder : '${placeholder}', + sofa : '${sofa}', + reactionTitle : '${reactiontitle}' + }; + + let recatt = ${JSON.stringify(reactiontext)} + recatt.forEach(function(value, index){ + locale['reaction'+index] = value; + }); + + import('${waline_js}').then((Waline) => { + Waline.init({ + locale, + el : '${element}', + emoji : ${emoji}, + search : ${search}, + imageUploader : ${imguploader}, + wordLimit : ${wordlimit}, + requiredMeta : ${JSON.stringify(requiredmeta)}, + reaction : ${reaction}, + serverURL : '${serverurl}', + dark : 'html[data-theme="dark"]' + }); + + NexT.utils.hiddeLodingCmp('${element}'); + }); + `; + + NexT.utils.getScript(null, { module: true, textContent: waline_script }); + }); +} \ No newline at end of file diff --git a/assets/js/3rd/others/clipboard.js b/assets/js/3rd/others/clipboard.js new file mode 100644 index 0000000..e23ce38 --- /dev/null +++ b/assets/js/3rd/others/clipboard.js @@ -0,0 +1,57 @@ +/* clipboard plugin */ +NexT.plugins.others.clipboard = function () { + + let chromaDiv = document.querySelectorAll('div.highlight div.chroma'); + if (chromaDiv.length === 0) return; + + chromaDiv.forEach(element => { + // Add copy button DOM. + let codeblock = element.querySelector('code[class]:not([class=""]'); + let lang = codeblock.className; + let copyBtn = document.createElement('div'); + copyBtn.classList.add('copy-btn'); + codeblock.parentNode.appendChild(copyBtn); + + element.addEventListener('mouseleave', () => { + setTimeout(() => { + copyBtn.classList.remove('copied','uncopied'); + }, 300); + }); + + // Add code header show + var ch = document.createElement('div'); + ch.classList.add('code-header'); + ch.classList.add(lang); + ch.insertAdjacentHTML('afterbegin', + ''); + ch.addEventListener('click', function () { + element.classList.toggle('hidden-code'); + ch.querySelector('.collapse-btn').classList.toggle('collapse'); + }, false); + + element.parentNode.insertBefore(ch, element); + }); + + if (!NexT.CONFIG.copybtn || !NexT.CONFIG.page.clipboard) return; + + const clipboard_js = NexT.utils.getCDNResource(NexT.CONFIG.page.clipboard.js); + NexT.utils.getScript(clipboard_js, function () { + // Register the clipboard event. + var clipboard = new ClipboardJS('.copy-btn', { + text: function (trigger) { + // TODO: Why there clipboard default text content with enter? + return trigger.previousElementSibling.textContent.trim(); + } + }); + + clipboard.on('success', function (e) { + e.clearSelection(); + e.trigger.classList.add('copied'); + }); + + clipboard.on('error', function (e) { + console.error('Copy failed:', e); + e.trigger.classList.add('uncopied'); + }); + }); +} \ No newline at end of file diff --git a/assets/js/3rd/others/counter.js b/assets/js/3rd/others/counter.js new file mode 100644 index 0000000..45f5c3e --- /dev/null +++ b/assets/js/3rd/others/counter.js @@ -0,0 +1,66 @@ +/* Page's view & comment counter plugin */ +NexT.plugins.others.counter = function () { + let pageview_js = undefined; + let comment_js = undefined; + + const post_meta = NexT.CONFIG.postmeta; + + const views = post_meta.views; + if (views != undefined && views.enable) { + let pageview_el = '#pageview-count'; + + switch (views.plugin) { + case 'waline': + pageview_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline.pagecnt); + NexT.utils.getScript(pageview_js, function () { + Waline.pageviewCount({ + selector : pageview_el, + serverURL: NexT.CONFIG.waline.cfg.serverurl + }); + }); + break; + case 'waline3': + pageview_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline3.pagecnt); + + let pageview_script = ` + import('${pageview_js}').then((Waline) => { + Waline.pageviewCount({ + selector : '${pageview_el}', + serverURL: '${NexT.CONFIG.waline3.cfg.serverurl}' + }) + }); + `; + NexT.utils.getScript(null, { module: true, textContent: pageview_script }); + break; + } + + } + + const comments = post_meta.comments; + if (comments != undefined && comments.enable) { + let comments_el = '#comments-count'; + switch (comments.plugin) { + case 'waline': + comment_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline.commentcnt); + NexT.utils.getScript(comment_js, function () { + Waline.commentCount({ + selector : comments_el, + serverURL: NexT.CONFIG.waline.cfg.serverurl + }); + }); + break; + case 'waline3': + comment_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline3.commentcnt); + let comment_script = ` + import('${comment_js}').then((Waline) => { + Waline.commentCount({ + selector : '${comments_el}', + serverURL: '${NexT.CONFIG.waline3.cfg.serverurl}' + }) + }); + `; + NexT.utils.getScript(null, { module: true, textContent: comment_script }); + break; + } + } +} \ No newline at end of file diff --git a/assets/js/third-party/others/lawidget.js b/assets/js/3rd/others/lawidget.js similarity index 91% rename from assets/js/third-party/others/lawidget.js rename to assets/js/3rd/others/lawidget.js index ff34674..1e2626b 100644 --- a/assets/js/third-party/others/lawidget.js +++ b/assets/js/3rd/others/lawidget.js @@ -1,5 +1,10 @@ /* 51La sidebar data widget */ NexT.plugins.others.lawidget = function() { + + if (!NexT.CONFIG.lawidget ) { + return; + } + const element = '#siteinfo-card-widget'; const lawt_js = NexT.CONFIG.lawidget.js.replace('laId', NexT.CONFIG.lawidget.id); diff --git a/assets/js/third-party/others/math.js b/assets/js/3rd/others/math.js similarity index 65% rename from assets/js/third-party/others/math.js rename to assets/js/3rd/others/math.js index 5ec5639..c25e9b9 100644 --- a/assets/js/third-party/others/math.js +++ b/assets/js/3rd/others/math.js @@ -4,13 +4,24 @@ NexT.plugins.others.math = function() { if (render === 'mathjax') { const render_js = NexT.utils.getCDNResource(NexT.CONFIG.page.math.js); - NexT.utils.getScript(render_js, function(){ + const mathjaxCfg = ` window.MathJax = { + // 自定义内联数学公式的分隔符号 tex: { - inlineMath: [["$", "$"]], + inlineMath: [['$', '$'], ['\\(', '\\)']] + }, + // SVG 渲染配置为全局共享字体缓存 + svg: { + fontCache: 'global' + }, + // 排除特定的HTML标签,避免过度渲染 + options: { + skipHtmlTags: ["script", "noscript", "style", "textarea", "pre", "footer"], } }; - }); + `; + NexT.utils.getScript(null, { textContent: mathjaxCfg }); + NexT.utils.getScript(render_js, { attributes: { id: "MathJax-script", "async": true }}); } if (render === 'katex') { diff --git a/assets/js/third-party/others/mermaid.js b/assets/js/3rd/others/mermaid.js similarity index 100% rename from assets/js/third-party/others/mermaid.js rename to assets/js/3rd/others/mermaid.js diff --git a/assets/js/third-party/search/algolia.js b/assets/js/3rd/search/algolia.js similarity index 100% rename from assets/js/third-party/search/algolia.js rename to assets/js/3rd/search/algolia.js diff --git a/assets/js/third-party/search/local.js b/assets/js/3rd/search/local.js similarity index 100% rename from assets/js/third-party/search/local.js rename to assets/js/3rd/search/local.js diff --git a/assets/js/3rd/share/addtoany.js b/assets/js/3rd/share/addtoany.js new file mode 100644 index 0000000..950b0b1 --- /dev/null +++ b/assets/js/3rd/share/addtoany.js @@ -0,0 +1,24 @@ +/* Addtoany share plugin */ +NexT.plugins.share.addtoany = function() { + const element = '.a2a_kit'; + if (!NexT.CONFIG.share.enable || !NexT.utils.checkDOMExist(element)) return; + + const addtoany = NexT.CONFIG.share.addtoany; + + if (!addtoany) return; + + NexT.utils.lazyLoadComponent(element, function() { + let addtoany_cfg = ` + var a2a_config = a2a_config || {}; + a2a_config.onclick = 1; + a2a_config.locale = "${addtoany.locale}"; + a2a_config.num_services = ${addtoany.num}; + `; + + NexT.utils.getScript(null, { + textContent: addtoany_cfg + }); + + NexT.utils.getScript(addtoany.js, () => { NexT.utils.hiddeLodingCmp(element); }); + }); +} \ No newline at end of file diff --git a/assets/js/3rd/share/sharethis.js b/assets/js/3rd/share/sharethis.js new file mode 100644 index 0000000..8a78257 --- /dev/null +++ b/assets/js/3rd/share/sharethis.js @@ -0,0 +1,21 @@ +/* Sharethis share plugin */ +NexT.plugins.share.sharethis = function() { + const element = '.sharethis-inline-share-buttons'; + if (!NexT.CONFIG.share.enable || !NexT.utils.checkDOMExist(element)) return; + + const sharethis = NexT.CONFIG.share.sharethis; + + if (!sharethis) return; + + const sharethis_js = sharethis.js.replace(/id/, sharethis.id); + + NexT.utils.lazyLoadComponent(element, function() { + NexT.utils.getScript(sharethis_js, { + attributes: { + async: 'async' + } + }); + + NexT.utils.hiddeLodingCmp(element); + }); +} \ No newline at end of file diff --git a/assets/js/motion.js b/assets/js/motion.js index dfc5a4a..138a417 100644 --- a/assets/js/motion.js +++ b/assets/js/motion.js @@ -95,10 +95,10 @@ NexT.motion.middleWares = { }); } - animate(postblock, '.post-block,.flinks-block, .pagination, .post-comments'); + animate(postblock, '.post-block, .flinks-block, .pagination, .post-comments'); animate(collheader, '.collection-header'); - animate(postheader, '.post-header'); - animate(postbody, '.post-body'); + animate(postheader, '.post-header, .flinks-header'); + animate(postbody, '.post-body, .flinks-body'); return sequence; }, diff --git a/assets/js/next-boot.js b/assets/js/next-boot.js index 03eeedd..c3123cd 100644 --- a/assets/js/next-boot.js +++ b/assets/js/next-boot.js @@ -61,19 +61,26 @@ NexT.boot.refresh = function() { NexT.utils.fmtSiteInfo(); + if (NexT.CONFIG.isMultiLang) { + NexT.utils.registerLangSelect(); + } + if (!NexT.CONFIG.page.isPage) return; - NexT.utils.registerSidebarTOC(); - NexT.utils.registerCopyCode(); + if (NexT.CONFIG.page.toc) NexT.utils.registerSidebarTOC(); + if (NexT.CONFIG.page.expired) NexT.utils.calPostExpiredDate(); + if (NexT.CONFIG.page.music) NexT.utils.registerAPlayer(); + + NexT.utils.registerImageViewer(); NexT.utils.registerPostReward(); + if(NexT.CONFIG.page.comments) { NexT.utils.initCommontesDispaly(); NexT.utils.registerCommonSwitch(); - NexT.utils.domAddClass('#goto-comments', 'goto-comments-on'); + NexT.utils.domAddClass('#goto-comments', 'show'); } else { - NexT.utils.hideComments(); + NexT.utils.domAddClass('#goto-comments', 'hidden'); } - NexT.utils.registerImageViewer(); //TODO /** diff --git a/assets/js/third-party/others/counter.js b/assets/js/third-party/others/counter.js deleted file mode 100644 index 8cb9098..0000000 --- a/assets/js/third-party/others/counter.js +++ /dev/null @@ -1,31 +0,0 @@ -/* Page's view & comment counter plugin */ -NexT.plugins.others.counter = function() { - let pageview_js = undefined; - let comment_js = undefined; - - const post_meta = NexT.CONFIG.postmeta; - - const views = post_meta.views; - if(views != undefined && views.enable) { - if (views.plugin == 'waline') { - pageview_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline.js[0]); - NexT.utils.getScript(pageview_js, function(){ - Waline.pageviewCount({ - serverURL: NexT.CONFIG.waline.cfg.serverurl - }); - }); - } - } - - const comments = post_meta.comments; - if (comments != undefined && comments.enable) { - if (comments.plugin == 'waline') { - comment_js = NexT.utils.getCDNResource(NexT.CONFIG.page.waline.js[1]); - NexT.utils.getScript(comment_js, function(){ - Waline.commentCount({ - serverURL: NexT.CONFIG.waline.cfg.serverurl - }); - }); - } - } -} \ No newline at end of file diff --git a/assets/js/third-party/others/translate.js b/assets/js/third-party/others/translate.js deleted file mode 100644 index 6dee18e..0000000 --- a/assets/js/third-party/others/translate.js +++ /dev/null @@ -1,9 +0,0 @@ -/* Google translate plugin */ -NexT.plugins.others.translate = function() { - const element = '#gtranslate'; - if (!NexT.utils.checkDOMExist(element)) return; - NexT.utils.lazyLoadComponent(element, function() { - window.translateelement_styles='/css/google-translate.min.css'; - NexT.utils.getScript('/js/third-party/google-translate.min.js'); - }); -} \ No newline at end of file diff --git a/assets/js/third-party/share/addthis.js b/assets/js/third-party/share/addthis.js deleted file mode 100644 index 1bc88e3..0000000 --- a/assets/js/third-party/share/addthis.js +++ /dev/null @@ -1,16 +0,0 @@ -/* AddThis share plugin */ -NexT.plugins.share.addthis = function() { - const element = '.addthis_inline_share_toolbox'; - if (!NexT.CONFIG.addthis || !NexT.utils.checkDOMExist(element)) return; - - const addthis_js = NexT.CONFIG.addthis.js + '?pubid=' + NexT.CONFIG.addthis.cfg.pubid; - - NexT.utils.lazyLoadComponent(element, function() { - NexT.utils.getScript(addthis_js, { - attributes: { - async: false - }, - parentNode: document.querySelector(element) - }); - }); -} \ No newline at end of file diff --git a/assets/js/utils.js b/assets/js/utils.js index 0cdd6bf..51691f3 100644 --- a/assets/js/utils.js +++ b/assets/js/utils.js @@ -7,15 +7,50 @@ HTMLElement.prototype.wrap = function (wrapper) { }; NexT.utils = { - registerMenuClick: function() { + registerAPlayer: function () { + this.getStyle( + NexT.utils.getCDNResource(NexT.CONFIG.page.music.css) + ); + + NexT.CONFIG.page.music.js.forEach(function(js) { + NexT.utils.getScript(NexT.utils.getCDNResource(js), true); + }); + + }, + calPostExpiredDate: function() { + const postMetaDom = document.querySelector('.post-meta-container'); + let postTime = postMetaDom.querySelector('time[itemprop="dateCreated datePublished"]').getAttribute("datetime"); + let postLastmodTime = postMetaDom.querySelector('time[itemprop="dateModified dateLastmod"]'); + + if (postLastmodTime != null) postTime = postLastmodTime.getAttribute("datetime"); + + let expiredTip = ''; + const expireCfg = NexT.CONFIG.page.expiredTips; + let expiredTime = this.diffDate(postTime, 2); + + if (expiredTime.indexOf(NexT.CONFIG.i18n.ds_years) > -1) { + expiredTip = expireCfg.warn.split('#'); + } else { + let days = parseInt(expiredTime.replace(NexT.CONFIG.i18n.ds_days, '').trim(), 10); + if (days < 180) return; + expiredTip = expireCfg.info.split('#'); + } + + let expiredTipPre = expiredTip[0]; + let expiredTipSuf = expiredTip[1]; + expiredTip = expiredTipPre + '' + expiredTime + '' + expiredTipSuf; + document.getElementById('post-expired-content').innerHTML = expiredTip; + this.domAddClass('#post-expired-tip', 'show'); + }, + registerMenuClick: function () { const pMenus = document.querySelectorAll('.main-menu > li > a.menus-parent'); - pMenus.forEach(function(item) { + pMenus.forEach(function (item) { const icon = item.querySelector('span > i'); - var ul = item.nextElementSibling; - - item.addEventListener('click', function(e) { + var ul = item.nextElementSibling; + + item.addEventListener('click', function (e) { e.preventDefault(); - + ul.classList.toggle('expand'); if (ul.classList.contains('expand')) { icon.className = 'fa fa-angle-down'; @@ -30,9 +65,9 @@ NexT.utils = { } }); }, - registerImageLoadEvent: function() { + registerImageLoadEvent: function () { const images = document.querySelectorAll('.sidebar img, .post-block img, .vendors-list img'); - + const callback = (entries) => { entries.forEach(item => { if (item.intersectionRatio > 0) { @@ -40,7 +75,7 @@ NexT.utils = { let imgSrc = ele.getAttribute('data-src'); if (imgSrc) { let img = new Image(); - img.addEventListener('load', function() { + img.addEventListener('load', function () { ele.src = imgSrc; }, false); ele.src = imgSrc; @@ -50,23 +85,23 @@ NexT.utils = { } }) }; - + const observer = new IntersectionObserver(callback); images.forEach(img => { observer.observe(img); }); }, - registerImageViewer: function() { + registerImageViewer: function () { const post_body = document.querySelector('.post-body'); if (post_body) { - new Viewer(post_body,{ navbar:2, toolbar:2 }); + new Viewer(post_body, { navbar: 2, toolbar: 2 }); } }, registerToolButtons: function () { const buttons = document.querySelector('.tool-buttons'); - + const scrollbar_buttons = buttons.querySelectorAll('div:not(#toggle-theme)'); scrollbar_buttons.forEach(button => { let targetId = button.id; @@ -86,12 +121,12 @@ NexT.utils = { slidScrollBarAnime: function (targetId, easing = 'linear', duration = 500) { const targetObj = document.getElementById(targetId); - + window.anime({ targets: document.scrollingElement, duration: duration, easing: easing, - scrollTop: targetId == '' || !targetObj ? 0 : targetObj.getBoundingClientRect().top + window.scrollY + scrollTop: targetId == '' || !targetObj ? 0 : targetObj.getBoundingClientRect().top + window.scrollY }); }, @@ -147,8 +182,8 @@ NexT.utils = { } }, - fmtLaWidget: function(){ - setTimeout(function(){ + fmtLaWidget: function () { + setTimeout(function () { const laWidget = document.querySelectorAll('#la-siteinfo-widget span'); if (laWidget.length > 0) { const valIds = [0, 2, 4, 6]; @@ -162,8 +197,8 @@ NexT.utils = { }, fmtBusuanzi: function () { - setTimeout(function(){ - const bszUV = document.getElementById('busuanzi_value_site_uv'); + setTimeout(function () { + const bszUV = document.getElementById('busuanzi_value_site_uv'); if (bszUV) { bszUV.innerText = NexT.utils.numberFormat(bszUV.innerText); } @@ -171,7 +206,7 @@ NexT.utils = { if (bszPV) { bszPV.innerText = NexT.utils.numberFormat(bszPV.innerText); } - }, 800); + }, 800); }, numberFormat: function (number) { @@ -244,14 +279,14 @@ NexT.utils = { let router = NexT.CONFIG.vendor.router; let { name, version, file, alias, alias_name } = res; - + let res_src = ''; - + switch (router.type) { case "modern": if (alias_name) name = alias_name; let alias_file = file.replace(/^(dist|lib|source|\/js|)\/(browser\/|)/, ''); - if (alias_file.indexOf('min') == -1) { + if (alias_file.indexOf('min') == -1) { alias_file = alias_file.replace(/\.js$/, '.min.js'); } res_src = `${router.url}/${name}/${version}/${alias_file}`; @@ -271,27 +306,57 @@ NexT.utils = { registerCopyCode: function () { if (!NexT.CONFIG.copybtn) return; - let figure = document.querySelectorAll('.highlight pre'); + /** let figure = document.querySelectorAll('.highlight pre'); if (figure.length === 0 || !NexT.CONFIG.copybtn) return; figure.forEach(element => { - let cn = element.querySelector('code').className; - // TODO seems hard code need find other ways fixed it. - if (cn == '') return; - element.insertAdjacentHTML('beforeend', '
'); + let cn = element.querySelector('code').className; + if (cn === '') return; + element.children[0].insertAdjacentHTML('beforebegin', '
'); + var clipboard = new ClipboardJS(element.children[0], + { + text: function(trigger) { + return trigger.nextElementSibling.textContent.trim(); + } + }); + clipboard.on('success', function (e) { + e.clearSelection(); + console.info('Action:', e.action); + console.info('Text:', e.text); + button.querySelector('i').className = 'fa fa-check-circle fa-fw'; + }); + clipboard.on('error', function (e) { + console.error('复制失败:', e); + button.querySelector('i').className = 'fa fa-times-circle fa-fw'; + }); const button = element.querySelector('.copy-btn'); - button.addEventListener('click', () => { + element.addEventListener('mouseleave', () => { + setTimeout(() => { + button.querySelector('i').className = 'fa fa-copy fa-fw'; + }, 300); + }); + });**/ + /** figure.forEach(element => { + let cn = element.querySelector('code').className; + if (cn === '') return; + element.insertAdjacentHTML('beforeend', '
'); + // element.insertAdjacentHTML('beforeend', '
'); + const button = element.querySelector('.copy-btn'); + button.addEventListener('click', async () => { const lines = element.querySelector('.code') || element.querySelector('code'); - const code = lines.innerText.replace(/(\n{2,})/g, '\n'); + let code = lines.textContent.trim(); + console.log('尝试复制代码:', code); + if (navigator.clipboard) { - // https://caniuse.com/mdn-api_clipboard_writetext navigator.clipboard.writeText(code).then(() => { + console.log('复制成功'); button.querySelector('i').className = 'fa fa-check-circle fa-fw'; - }, () => { + }).catch((err) => { + console.error('复制失败:', err); button.querySelector('i').className = 'fa fa-times-circle fa-fw'; }); } else { const ta = document.createElement('textarea'); - ta.style.top = window.scrollY + 'px'; // Prevent page scrolling + ta.style.top = window.scrollY + 'px'; ta.style.position = 'absolute'; ta.style.opacity = '0'; ta.readOnly = true; @@ -299,20 +364,22 @@ NexT.utils = { document.body.append(ta); ta.select(); ta.setSelectionRange(0, code.length); - ta.readOnly = false; - const result = document.execCommand('copy'); - button.querySelector('i').className = result ? 'fa fa-check-circle fa-fw' : 'fa fa-times-circle fa-fw'; - ta.blur(); // For iOS - button.blur(); + try { + const successful = document.execCommand('copy'); + if (!successful) throw new Error('复制命令执行失败'); + } catch (err) { + console.error('复制失败:', err); + } document.body.removeChild(ta); } + }); element.addEventListener('mouseleave', () => { setTimeout(() => { button.querySelector('i').className = 'fa fa-copy fa-fw'; }, 300); }); - }); + });**/ }, wrapTableWithBox: function () { @@ -432,22 +499,58 @@ NexT.utils = { const isSubPath = !NexT.CONFIG.root.startsWith(target.pathname) && location.pathname.startsWith(target.pathname); target.classList.toggle('menu-item-active', target.hostname === location.hostname && (isSamePath || isSubPath)); }); - }, + },*/ registerLangSelect: function() { - const selects = document.querySelectorAll('.lang-select'); - selects.forEach(sel => { - sel.value = NexT.CONFIG.page.lang; - sel.addEventListener('change', () => { - const target = sel.options[sel.selectedIndex]; - document.querySelectorAll('.lang-select-label span').forEach(span => { - span.innerText = target.text; - }); - // Disable Pjax to force refresh translation of menu item - window.location.href = target.dataset.href; + let selects = document.getElementById('lang-select'); + if (!selects) return; + + let selected = selects.querySelector('#lang-selected'); + let selectedVal = selected.querySelectorAll('span'); + let flagIcon = selectedVal[0]; + let langName = selectedVal[1]; + let selectIcon = selected.querySelector('i'); + + + let options = selects.querySelectorAll('#lang-options>div'); + let optionsDom = options[0].parentNode; + options.forEach(option => { + option.addEventListener('click', () => { + let langCode = option.getAttribute('lang-code'); + flagIcon.className = 'flag-icon flag-icon-'+langCode; + langName.innerHTML = option.getAttribute('lang-name'); + selectIcon.className = 'fa fa-chevron-down'; + optionsDom.style.opacity = '0'; + optionsDom.style.transform = 'translateY(-10px)'; + + let url = option.getAttribute('lang-url'); + + setTimeout(() => { + optionsDom.style.display = 'none'; + window.location.href = url; + }, 300); }); + }); + + selected.addEventListener('mouseenter', function() { + selectIcon.className = 'fa fa-chevron-up'; + optionsDom.style.display = 'block'; + optionsDom.style.opacity = '1'; + optionsDom.style.transform = 'translateY(0)'; + }); - },*/ + + optionsDom.addEventListener('mouseleave', function() { + selectIcon.className = 'fa fa-chevron-down'; + optionsDom.style.opacity = '0'; + optionsDom.style.transform = 'translateY(-10px)'; + + setTimeout(() => { + optionsDom.style.display = 'none'; + }, 300); + }); + + }, registerSidebarTOC: function () { const toc = document.getElementById('TableOfContents'); @@ -509,13 +612,6 @@ NexT.utils = { }); }, - hideComments: function () { - let postComments = document.querySelector('.post-comments'); - if (postComments !== null) { - postComments.style.display = 'none'; - } - }, - hiddeLodingCmp: function (selector) { const loadding = document.querySelector(selector).previousElementSibling; loadding.style.display = 'none'; @@ -587,7 +683,7 @@ NexT.utils = { }); }, - getStyle: function (src, position='after', parent) { + getStyle: function (src, position = 'after', parent) { const link = document.createElement('link'); link.setAttribute('rel', 'stylesheet'); link.setAttribute('type', 'text/css'); @@ -607,8 +703,11 @@ NexT.utils = { condition: legacyCondition }).then(options); } + const { condition = false, + module = false, + textContent = undefined, attributes: { id = '', async = false, @@ -628,6 +727,8 @@ NexT.utils = { if (id) script.id = id; if (crossOrigin) script.crossOrigin = crossOrigin; + if (module) script.type = 'module'; + if (textContent != undefined) script.textContent = textContent; script.async = async; script.defer = defer; Object.assign(script.dataset, dataset); @@ -638,22 +739,25 @@ NexT.utils = { script.onload = resolve; script.onerror = reject; - if (typeof src === 'object') { - const { url, integrity } = src; - script.src = url; - if (integrity) { - script.integrity = integrity; - script.crossOrigin = 'anonymous'; + if (src != null && src != undefined) { + if (typeof src === 'object') { + const { url, integrity } = src; + script.src = url; + if (integrity) { + script.integrity = integrity; + script.crossOrigin = 'anonymous'; + } + } else { + script.src = src; } - } else { - script.src = src; } + (parentNode || document.head).appendChild(script); } }); }, - lazyLoadComponent: function(selector, legacyCallback) { + lazyLoadComponent: function (selector, legacyCallback) { if (legacyCallback) { return this.lazyLoadComponent(selector).then(legacyCallback); } diff --git a/data/config.yaml b/data/config.yaml index b524df3..b07ece9 100644 --- a/data/config.yaml +++ b/data/config.yaml @@ -1,5 +1,5 @@ # Hugo NexT theme's custom config -version: 4.6.3 +version: 4.7.0 domain: hugo-next.eu.org diff --git a/data/resources.yaml b/data/resources.yaml index c0aa4c7..8d9d695 100644 --- a/data/resources.yaml +++ b/data/resources.yaml @@ -33,7 +33,7 @@ vendors: - name: zstatic home: "https://www.zstatic.net" - logo: "https://www.zstatic.net/favicon/favicon-16x16.png" + logo: "https://www.zstatic.net/logo.png" type: "modern" url: "https://s4.zstatic.net/ajax/libs" @@ -64,12 +64,12 @@ js: # CSS Resources css: - name: font-awesome - version: 6.6.0 + version: 6.7.2 file: css/all.min.css alias: '@fortawesome/fontawesome-free' - name: animate.css - version: 4.1.1 + version: 3.7.2 file: animate.min.css - name: viewerjs @@ -90,8 +90,12 @@ analytics: # 文章分享 # Share -addthis: - js: https://s7.addthis.com/js/300/addthis_widget.js +share: + sharethis: + js: https://platform-api.sharethis.com/js/sharethis.js#property=id&product=inline-share-buttons&source=platform + + addtoany: + js: https://static.addtoany.com/menu/page.js # 评论组件 # Comment component @@ -108,6 +112,19 @@ waline: file: dist/waline.css alias: "@waline/client" +waline3: + js: + name: waline + version: 3.3.0 + file: dist/waline.js + alias: "@waline/client" + + css: + name: waline + version: 3.3.0 + file: dist/waline.min.css + alias: "@waline/client" + artalk: js: name: artalk @@ -128,6 +145,7 @@ utterances: livere: js: https://cdn-city.livere.com/js/embed.dist.js + # 全文搜索 # Full text search algolia: @@ -146,25 +164,25 @@ plugins: js: name: mathjax version: 3.2.2 - file: es5/tex-mml-chtml.js + file: es5/tex-mml-svg.js katex: js: - name: katex alias_name: KaTeX - version: 0.16.9 + version: 0.16.15 file: dist/katex.min.js - name: auto-render alias: katex alias_name: KaTeX - version: 0.16.9 + version: 0.16.15 file: dist/contrib/auto-render.min.js css: name: katex alias_name: KaTeX - version: 0.16.9 + version: 0.16.15 file: dist/katex.min.css # 画图渲染 @@ -186,4 +204,38 @@ plugins: alias_name: waline version: 2.15.8 file: dist/comment.js - alias: "@waline/client" \ No newline at end of file + alias: "@waline/client" + waline3: + js: + - name: pageview + alias_name: waline + version: 3.3.0 + file: dist/pageview.js + alias: "@waline/client" + + - name: comment + alias_name: waline + version: 3.3.0 + file: dist/comment.js + alias: "@waline/client" + # 音乐播放器 + music: + js: + - name: aplayer + version: 1.10.1 + file: dist/APlayer.min.js + + - name: meting + version: 2.0.1 + file: dist/Meting.min.js + + css: + name: aplayer + version: 1.10.1 + file: dist/APlayer.min.css + # 复制到剪贴板 + clipboard: + js: + name: clipboard + version: 2.0.11 + file: dist/clipboard.min.js \ No newline at end of file diff --git a/exampleSite/content/about/index.en-us.md b/exampleSite/content/about/index.en-us.md new file mode 100644 index 0000000..ff62087 --- /dev/null +++ b/exampleSite/content/about/index.en-us.md @@ -0,0 +1,29 @@ +--- +title: "About Hugo NexT Organization" + +date: 2025-01-25T18:00:52+08:00 +lastmod: 2025-01-25T18:00:52+08:00 + +share: false +followme: false +nav: false +copyright: false +url: about.html +--- + +The `Hugo NexT` organization is jointly established by numerous friends from around the world who are fond of the `NexT` theme and style. The aim is to continue promoting and enhancing this theme within the `Hugo` engine. We warmly welcome you to join us! + +# Our Vision + +Continuing the classic black-and-white color scheme of `NexT`, it maintains simple usability and powerful functionality. + +# Usage Feedback + +- Join the online discussions on [GitHub Discussions](https://github.com/hugo-next/hugo-theme-next/discussions) or [Gitter](https://gitter.im/hugo-next/community) :beers: +- [GitHub Issues](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Bug&template=bug-report.md) Submit a bug report :bug: +- [GitHub Feature](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Feature+Request&template=feature-request.md) to propose new feature ideas :sparkles: + +> [!INFO] +> Chinese's users can also join the QQ group for communication: 604710815 + +{{< music url="/music/sky.mp3" name="City of the Sky" artist="Hayao Miyazaki" cover="/music/gongqijun.jpg" autoplay="true" >}} \ No newline at end of file diff --git a/exampleSite/content/about.md b/exampleSite/content/about/index.md similarity index 83% rename from exampleSite/content/about.md rename to exampleSite/content/about/index.md index c4e89c7..e05399f 100644 --- a/exampleSite/content/about.md +++ b/exampleSite/content/about/index.md @@ -1,6 +1,5 @@ --- title: "关于 Hugo NexT 组织" -description: "Hugo NexT 组织介绍说明。" date: 2022-06-09T20:12:52+08:00 lastmod: 2022-06-09T20:12:52+08:00 @@ -24,4 +23,7 @@ url: about.html - [GitHub Issues](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Bug&template=bug-report.md) 提交错误报告 :bug: - [GitHub Feature](https://github.com/hugo-next/hugo-theme-next/issues/new?labels=Feature+Request&template=feature-request.md) 表新功能的想法 :sparkles: -> 同时国内用户也可加入 QQ 群交流: 604710815 \ No newline at end of file +> [!INFO] +> 同时国内用户也可加入 QQ 群交流: 604710815 + +{{< music url="/music/sky.mp3" name="天空之城" artist="宫崎骏" cover="/music/gongqijun.jpg" autoplay="true" >}} \ No newline at end of file diff --git a/exampleSite/content/archives/_index.en-us.md b/exampleSite/content/archives/_index.en-us.md new file mode 100644 index 0000000..7ac9371 --- /dev/null +++ b/exampleSite/content/archives/_index.en-us.md @@ -0,0 +1,3 @@ +--- +date: 2025-01-25T20:46:25+08:00 +--- \ No newline at end of file diff --git a/exampleSite/content/flinks/index.en-us.md b/exampleSite/content/flinks/index.en-us.md new file mode 100644 index 0000000..bf29ccc --- /dev/null +++ b/exampleSite/content/flinks/index.en-us.md @@ -0,0 +1,14 @@ +--- +title: "Demo Sites" +type: flinks +url: flinks.html +--- + +If you want to exchange friendly links on this site, please leave your site information in the comment section. The format reference is as follows: + +```yaml +- name: Hugo-NexT + desc: Hugo NexT Official Site. + avatar: https://hugo-next.eu.org/imgs/hugo_next_avatar.png + link: https://hugo-next.eu.org +``` \ No newline at end of file diff --git a/exampleSite/content/flinks.md b/exampleSite/content/flinks/index.md similarity index 100% rename from exampleSite/content/flinks.md rename to exampleSite/content/flinks/index.md diff --git a/exampleSite/content/post/01-hello-world/index.en-us.md b/exampleSite/content/post/01-hello-world/index.en-us.md new file mode 100644 index 0000000..4b33230 --- /dev/null +++ b/exampleSite/content/post/01-hello-world/index.en-us.md @@ -0,0 +1,60 @@ +--- +title: "Hello world" +description: "Quickly describe the basic usage of Hugo website building." + +date: 2025-01-25T19:12:32+08:00 +lastmod: 2025-01-25T19:12:32+08:00 + +categories: + - StartBuilSite + +tags: + - Hugo + - Start now + +url: demo/hello-world.html +toc: true +weight: 2 +--- + +> Use the keyword `weight` to top the article. + +[Hugo](https://gohugo.io/), It is currently the fastest website construction framework in the world and one of the most popular open-source static site generators. With its astonishing speed and flexibility, Hugo has once again made website construction interesting. + + + +## Quick Start + +### Publish a new article + +```shell +$ hugo new hello-world.md +``` + +More information: [Content format](https://gohugo.io/content-management/formats/) + +### Start service + +```shell +$ hugo server +``` + +More information: [Hugo Service Command Line](https://gohugo.io/commands/hugo_server/) + +### Generate static files + +```shell +$ hugo +``` + +More information: [Hugo website building](https://gohugo.io/commands/hugo/) + +### Deploy to server + +```language +$ hugo deploy +``` + +More information: [Hugo Release](https://gohugo.io/commands/hugo_deploy/) + +Good luck, I believe you will love Hugo's journey of building a website! \ No newline at end of file diff --git a/exampleSite/content/post/hello-world.md b/exampleSite/content/post/01-hello-world/index.md similarity index 100% rename from exampleSite/content/post/hello-world.md rename to exampleSite/content/post/01-hello-world/index.md diff --git a/exampleSite/content/post/02-external-link/index.en-us.md b/exampleSite/content/post/02-external-link/index.en-us.md new file mode 100644 index 0000000..3a3e56e --- /dev/null +++ b/exampleSite/content/post/02-external-link/index.en-us.md @@ -0,0 +1,36 @@ +--- +title: "Welcome to the Hugo NexT organization" +description: "Hugo NexT is a theme specifically designed for the Hugo engine, maintaining simplicity, ease of use, and powerful functionality! " +Keywords: "Hugo, NexT, organization" + +date: 2025-01-25T20:59:12+08:00 +lastmod: 2025-01-25T20:59:12+08:00 + +categories: + - Example +tags: + - Hugo + - NexT + +expand: true +extlink: https://gitee.com/hugo-next/hugo-theme-next/ + +weight: 1 +--- + +Welcome to the Hugo NexT documentation site! It is from [Theme NexT](https://theme-next.js.org/) The transplanted one is [Hugo](https://gohugo.io/) The high-quality and elegant theme created maintains its easy-to-use features and powerful functionality. + + + +## User Guide + +Setting up a NexT theme is easy. Simply follow the documentation to quickly create your personal website! + +## Feedback + +- Visit the Awesome NexT list to share plugins and tutorials with other users. +- Join our Gitter chat. +- Add or improve translations within seconds. +- Report one in GitHub Issues :bug: . +- Apply for a new feature on GitHub. +- Request a vote for the most popular feature. \ No newline at end of file diff --git a/exampleSite/content/post/external-link.md b/exampleSite/content/post/02-external-link/index.md similarity index 93% rename from exampleSite/content/post/external-link.md rename to exampleSite/content/post/02-external-link/index.md index cd14bd6..ab5399c 100644 --- a/exampleSite/content/post/external-link.md +++ b/exampleSite/content/post/02-external-link/index.md @@ -14,10 +14,7 @@ tags: expand: true extlink: https://gitee.com/hugo-next/hugo-theme-next/ -#comment: -# enable: false -#toc: false -#url: "external-link.html" + weight: 1 --- diff --git a/exampleSite/content/post/03-markdown-syntax/index.en-us.md b/exampleSite/content/post/03-markdown-syntax/index.en-us.md new file mode 100644 index 0000000..7381366 --- /dev/null +++ b/exampleSite/content/post/03-markdown-syntax/index.en-us.md @@ -0,0 +1,222 @@ +--- +Title: "Markdown Syntax Support" +description: Describe the various markdown syntax and effect displays supported by NexT themes +isCJKLanguage: false + +publishDate: 2025-01-25T20:52:18+08:00 +lastmod: 2025-01-25T20:52:18+08:00 + +author: Mainroad +originLink: https://mainroad-demo.netlify.app/demo/basic-elements/ + +categories: + - Example + - MarkdownSyntax + +tags: + - Markdown + - Grammar + +toc: false +draft: false +url: demo/markdown-syntax.html +--- + +Only use this article to test whether the various syntax written in the content of the `Markdown` file is supported when building a website using the `Hugo` engine in the `NexT` theme, and demonstrate the actual effect. + + + +## Title Style + +Let's start with all possible headings, where the `

` - `

` elements in HTML represent six different levels of heading styles, with `

` being the maximum heading`< H6>` is the minimum title, with the following effect: + +# Title 1 +## Title 2 +### Title 3 +#### Title 4 +##### Title 5 +###### Title 6 + + +## Paragraph format + +According to [W3C](https://www.w3.org/)Defined [HTML5 Specification](https://www.w3.org/TR/html5/dom.html#elements),**HTML documents consist** of elements and text. The composition of each element consists of a [Start marker](https://www.w3.org/TR/html5/syntax.html#syntax), for example:`` , And [End Mark](https://www.w3.org/TR/html5/syntax.html#syntax), for example:`` . + +(*Some start and end markers may be omitted in certain situations and implied by other markers*.) + +Elements can have attributes that control how they work. For example, hyperlinks are formed using the `a` element and its `ref` attribute. + +### Markdown syntax + +```markdown +! [Image Description] (Image Address) +``` +![hugo-next-primary](//hugo-next.github.io/imgs/logo/hugo-next-primary.png) + +### HTML IMG tags + +```html + +``` + + + +### SVG format + +```html +xxxxxx +``` + + + +## List type + +### Ordered List + +1. The first element +2. The second element +3. The third element + +### Unordered List + +* List elements +* Another element +* And other elements + +### Nested List + +Using HTML's `ul` element to implement. + + + +### Custom List + +Custom lists (table lists) are also supported through HTML's `dl` element. + +
+
Hugo directory structure
+
assets
+
hugo.toml
+
content
+
data
+
theme
+
static
+
Hugo Template
+
Basic Template
+
List Template
+
Single page template
+
+ +## Block reference + + +The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. + +> Quoted text. +> This line is part of the same quote. +> Also you can *put* **Markdown** into a blockquote. + +Blockquote with a citation. + +
+

My goal wasn't to make a ton of money. It was to build good computers. I only started the company when I realized I could be an engineer forever.

+
Steve Wozniak
+
+ +According to Mozilla's website, Firefox 1.0 was released in 2004 and became a big success. + +## Table + +Tables aren't part of the core `Markdown` spec, but `Hugo` supports them. + +| ID | Make | Model | Year | +| --- | --------- | ------- | ---- | +| 1 | Honda | Accord | 2009 | +| 2 | Toyota | Camry | 2012 | +| 3 | Hyundai | Elantra | 2010 | + +Colons can be used to align columns. + +| Tables | Are | Cool | +|:----------- |:-------------:| ------------:| +| align: left | align: center | align: right | +| align: left | align: center | align: right | +| align: left | align: center | align: right | + +You can also use inline Markdown. + +| Inline | Markdown | In | Table | +| ---------- | --------- | ----------------- | ---------- | +| *italics* | **bold** | ~~strikethrough~~ | `code` | + +## Code + +Use Markdown syntax to write code blocks: + +```html + + + + +Example HTML5 Document + + +

Test

+ + +``` + +Use Hugo's `highlight` shortcode to write code blocks: + +{{< highlight html "hl_lines=2 5-7, linenostart=44" >}} + + + + +Example HTML5 Document + + +

Test

+ + +{{< /highlight >}} + + +## Other stuff — abbr, sub, sup, kbd, etc. + +GIF is a bitmap image format. + +H2O + +C6H12O6 + +Xn + Yn = Zn + +Press X to win. Or press CTRL+ALT+F to show FPS counter. + +As a unit of information in information theory, the bit has alternatively been called a shannon, named after Claude Shannon, the founder of field of information theory. + +Reference resources: + +- Refert from **Mainroad** theme [Basic Elements](https://mainroad-demo.netlify.app/post/basic-elements/)Content diff --git a/exampleSite/content/post/markdown-syntax.md b/exampleSite/content/post/03-markdown-syntax/index.md similarity index 86% rename from exampleSite/content/post/markdown-syntax.md rename to exampleSite/content/post/03-markdown-syntax/index.md index 974cb37..1493441 100644 --- a/exampleSite/content/post/markdown-syntax.md +++ b/exampleSite/content/post/03-markdown-syntax/index.md @@ -40,7 +40,7 @@ url: demo/markdown-syntax.html ## 段落格式 -根据[ W3C ](https://www.w3.org/)定义的[ HTML5 规范](https://www.w3.org/TR/html5/dom.html#elements),**HTML 文档由元素和文本组成**。每个元素的组成都由一个[开始标记](https://www.w3.org/TR/html5/syntax.html#syntax-start-tags)表示,例如: `` ,和[结束标记](https://www.w3.org/TR/html5/syntax.html#syntax-end-tags)表示,例如: `` 。(*某些开始标记和结束标记在某些情况下可以省略,并由其他标记暗示。*) +根据[W3C](https://www.w3.org/)定义的[HTML5 规范](https://www.w3.org/TR/html5/dom.html#elements),**HTML 文档由元素和文本组成**。每个元素的组成都由一个[开始标记](https://www.w3.org/TR/html5/syntax.html#syntax-start-tags)表示,例如: `` ,和[结束标记](https://www.w3.org/TR/html5/syntax.html#syntax-end-tags)表示,例如: `` 。(*某些开始标记和结束标记在某些情况下可以省略,并由其他标记暗示。*) 元素可以具有属性,这些属性控制元素的工作方式。例如:超链接是使用 `a` 元素及其 `href` 属性形成的。 ### Markdown 语法 @@ -48,14 +48,14 @@ url: demo/markdown-syntax.html ```markdown ![图像说明](图像地址) ``` -![hugo-next-primary](//lisenhui.gitee.io/imgs/hugo-next/logo/hugo-next-primary.png) +![hugo-next-primary](//hugo-next.github.io/imgs/logo/hugo-next-primary.png) ### HTML IMG 标签 ```html ``` - + ### SVG 格式 @@ -113,7 +113,7 @@ url: demo/markdown-syntax.html
Hugo 目录结构
assets
-
config.toml
+
hugo.toml
content
data
theme
@@ -167,6 +167,8 @@ url: demo/markdown-syntax.html ## Code +使用 Markdown 语法书写代码块: + ```html @@ -180,7 +182,9 @@ url: demo/markdown-syntax.html ``` -{{< highlight html >}} +使用Hugo自带的 `highlight` 短语标注代码块: + +{{< highlight html "hl_lines=2 5-7, linenostart=44" >}} @@ -208,4 +212,4 @@ Xn + Yn = Zn 比特作为信息论中的信息单位,也被称为 shannon ,以信息论领域的创始人 Claude shannon 的名字命名。 参考: -- 来自 **Mainroad** 主题的 [Basic Elements](https://mainroad-demo.netlify.app/demo/basic-elements/) 内容 +- 来自 **Mainroad** 主题的 [Basic Elements](https://mainroad-demo.netlify.app/post/basic-elements/) 内容 diff --git a/exampleSite/content/post/04-emoji-support/index.en-us.md b/exampleSite/content/post/04-emoji-support/index.en-us.md new file mode 100644 index 0000000..74116c6 --- /dev/null +++ b/exampleSite/content/post/04-emoji-support/index.en-us.md @@ -0,0 +1,203 @@ +--- +title: Support Emoji emojis +Description: "Usage guide for emojis in Hugo and NexT. " +keywords: "Hugo,NexT,Emoji" + +date: 2025-01-25T21:18:52+08:00 +lastmod: 2025-01-25T21:18:52+08:00 + +categories: + - Example + - Grammar + +tags: + - Facial expressions + - Emoji + +toc: true + +url: "demo/emoji-support.html" +--- + +Emojis can be enabled in various ways in the Hugo project. + +[`emojify`]( https://gohugo.io/functions/emojify/)The method can be called directly in the template, or use [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates#inline -shortcodes). + +To use emojis globally, you need to [configure](https://gohugo.io/getting-started/configuration/) them on your website set `enableEmoji` to `true`,Then you can directly enter the emoji code in the article. + + + +They start and end with a **colon** and contain the Emoji **code**: + +```markdown +Go camping! {:}tent: I'll be back soon + +How happy! {:}joy: +``` + +The output effect presented is as follows: + +> Let's go camping :tent: I'll be back soon.
+> I'm so happy :joy: + +The following symbol list is a very useful reference for emoji code. + +## Expressions and Emotions + +### Smiling face expression + +|Icon | Code | Icon | Code| +| :-: | - | :-: | - | +| :grinning: | `grinning` | :smiley: | `smiley` | +| :smile: | `smile` | :grin: | `grin` | +| :laughing: | `laughing`
`satisfied` | :sweat_smile: | `sweat_smile` | +| :rofl: | `rofl` | :joy: | `joy` | +| :slightly_smiling_face: | `slightly_smiling_face` | :upside_down_face: | `upside_down_face` | +| :wink: | `wink` | :blush: | `blush` | +| :innocent: | `innocent` | | | + +### Love expression + +|Icon | Code | Icon | Code| +| :-: | - | :-: | - | +| :heart_eyes: | `heart_eyes` | :kissing_heart: | `kissing_heart` | +| :kissing: | `kissing` | :relaxed: | `relaxed` | +| :kissing_closed_eyes: | `kissing_closed_eyes` | :kissing_smiling_eyes: | `kissing_smiling_eyes` | + +### Tongue sticking expression + +|Icon | Code | Icon | Code| +| :-: | - | :-: | - | +| :yum: | `yum` | :stuck_out_tongue: | `stuck_out_tongue` | +| :stuck_out_tongue_winking_eye: | `stuck_out_tongue_winking_eye` | :stuck_out_tongue_closed_eyes: | `stuck_out_tongue_closed_eyes` | +| :money_mouth_face: | `money_mouth_face` | :money_mouth_face: | | + + +### National and regional flags + +|Icon | Code | Icon | Code| +| :-: | - | :-: | - | +| :andorra: | `andorra` | :united_arab_emirates: | `united_arab_emirates` | +| :afghanistan: | `afghanistan` | :antigua_barbuda: | `antigua_barbuda` | +| :anguilla: | `anguilla` | :albania: | `albania` | +| :armenia: | `armenia` | :angola: | `angola` | +| :antarctica: | `antarctica` | :argentina: | `argentina` | +| :american_samoa: | `american_samoa` | :austria: | `austria` | +| :australia: | `australia` | :aruba: | `aruba` | +| :aland_islands: | `aland_islands` | :azerbaijan: | `azerbaijan` | +| :bosnia_herzegovina: | `bosnia_herzegovina` | :barbados: | `barbados` | +| :bangladesh: | `bangladesh` | :belgium: | `belgium` | +| :burkina_faso: | `burkina_faso` | :bulgaria: | `bulgaria` | +| :bahrain: | `bahrain` | :burundi: | `burundi` | +| :benin: | `benin` | :st_barthelemy: | `st_barthelemy` | +| :bermuda: | `bermuda` | :brunei: | `brunei` | +| :bolivia: | `bolivia` | :caribbean_netherlands: | `caribbean_netherlands` | +| :brazil: | `brazil` | :bahamas: | `bahamas` | +| :bhutan: | `bhutan` | :botswana: | `botswana` | +| :belarus: | `belarus` | :belize: | `belize` | +| :canada: | `canada` | :cocos_islands: | `cocos_islands` | +| :congo_kinshasa: | `congo_kinshasa` | :central_african_republic: | `central_african_republic` | +| :congo_brazzaville: | `congo_brazzaville` | :switzerland: | `switzerland` | +| :cote_divoire: | `cote_divoire` | :cook_islands: | `cook_islands` | +| :chile: | `chile` | :cameroon: | `cameroon` | +| :cn: | `cn` | :colombia: | `colombia` | +| :costa_rica: | `costa_rica` | :cuba: | `cuba` | +| :cape_verde: | `cape_verde` | :curacao: | `curacao` | +| :christmas_island: | `christmas_island` | :cyprus: | `cyprus` | +| :czech_republic: | `czech_republic` | :de: | `de` | +| :djibouti: | `djibouti` | :denmark: | `denmark` | +| :dominica: | `dominica` | :dominican_republic: | `dominican_republic` | +| :algeria: | `algeria` | :ecuador: | `ecuador` | +| :estonia: | `estonia` | :egypt: | `egypt` | +| :western_sahara: | `western_sahara` | :eritrea: | `eritrea` | +| :es: | `es` | :ethiopia: | `ethiopia` | +| :eu: | `eu`
`european_union` | :finland: | `finland` | +| :fiji: | `fiji` | :falkland_islands: | `falkland_islands` | +| :micronesia: | `micronesia` | :faroe_islands: | `faroe_islands` | +| :fr: | `fr` | :gabon: | `gabon` | +| :gb: | `gb`
`uk` | :grenada: | `grenada` | +| :georgia: | `georgia` | :french_guiana: | `french_guiana` | +| :guernsey: | `guernsey` | :ghana: | `ghana` | +| :gibraltar: | `gibraltar` | :greenland: | `greenland` | +| :gambia: | `gambia` | :guinea: | `guinea` | +| :guadeloupe: | `guadeloupe` | :equatorial_guinea: | `equatorial_guinea` | +| :greece: | `greece` | :south_georgia_south_sandwich_islands: | `south_georgia_south_sandwich_islands` | +| :guatemala: | `guatemala` | :guam: | `guam` | +| :guinea_bissau: | `guinea_bissau` | :guyana: | `guyana` | +| :hong_kong: | `hong_kong` | :honduras: | `honduras` | +| :croatia: | `croatia` | :haiti: | `haiti` | +| :hungary: | `hungary` | :canary_islands: | `canary_islands` | +| :indonesia: | `indonesia` | :ireland: | `ireland` | +| :israel: | `israel` | :isle_of_man: | `isle_of_man` | +| :india: | `india` | :british_indian_ocean_territory: | `british_indian_ocean_territory` | +| :iraq: | `iraq` | :iran: | `iran` | +| :iceland: | `iceland` | :it: | `it` | +| :jersey: | `jersey` | :jamaica: | `jamaica` | +| :jordan: | `jordan` | :jp: | `jp` | +| :kenya: | `kenya` | :kyrgyzstan: | `kyrgyzstan` | +| :cambodia: | `cambodia` | :kiribati: | `kiribati` | +| :comoros: | `comoros` | :st_kitts_nevis: | `st_kitts_nevis` | +| :north_korea: | `north_korea` | :kr: | `kr` | +| :kuwait: | `kuwait` | :cayman_islands: | `cayman_islands` | +| :kazakhstan: | `kazakhstan` | :laos: | `laos` | +| :lebanon: | `lebanon` | :st_lucia: | `st_lucia` | +| :liechtenstein: | `liechtenstein` | :sri_lanka: | `sri_lanka` | +| :liberia: | `liberia` | :lesotho: | `lesotho` | +| :lithuania: | `lithuania` | :luxembourg: | `luxembourg` | +| :latvia: | `latvia` | :libya: | `libya` | +| :morocco: | `morocco` | :monaco: | `monaco` | +| :moldova: | `moldova` | :montenegro: | `montenegro` | +| :madagascar: | `madagascar` | :marshall_islands: | `marshall_islands` | +| :macedonia: | `macedonia` | :mali: | `mali` | +| :myanmar: | `myanmar` | :mongolia: | `mongolia` | +| :macau: | `macau` | :northern_mariana_islands: | `northern_mariana_islands` | +| :martinique: | `martinique` | :mauritania: | `mauritania` | +| :montserrat: | `montserrat` | :malta: | `malta` | +| :mauritius: | `mauritius` | :maldives: | `maldives` | +| :malawi: | `malawi` | :mexico: | `mexico` | +| :malaysia: | `malaysia` | :mozambique: | `mozambique` | +| :namibia: | `namibia` | :new_caledonia: | `new_caledonia` | +| :niger: | `niger` | :norfolk_island: | `norfolk_island` | +| :nigeria: | `nigeria` | :nicaragua: | `nicaragua` | +| :netherlands: | `netherlands` | :norway: | `norway` | +| :nepal: | `nepal` | :nauru: | `nauru` | +| :niue: | `niue` | :new_zealand: | `new_zealand` | +| :oman: | `oman` | :panama: | `panama` | +| :peru: | `peru` | :french_polynesia: | `french_polynesia` | +| :papua_new_guinea: | `papua_new_guinea` | :philippines: | `philippines` | +| :pakistan: | `pakistan` | :poland: | `poland` | +| :st_pierre_miquelon: | `st_pierre_miquelon` | :pitcairn_islands: | `pitcairn_islands` | +| :puerto_rico: | `puerto_rico` | :palestinian_territories: | `palestinian_territories` | +| :portugal: | `portugal` | :palau: | `palau` | +| :paraguay: | `paraguay` | :qatar: | `qatar` | +| :reunion: | `reunion` | :romania: | `romania` | +| :serbia: | `serbia` | :ru: | `ru` | +| :rwanda: | `rwanda` | :saudi_arabia: | `saudi_arabia` | +| :solomon_islands: | `solomon_islands` | :seychelles: | `seychelles` | +| :sudan: | `sudan` | :sweden: | `sweden` | +| :singapore: | `singapore` | :st_helena: | `st_helena` | +| :slovenia: | `slovenia` | :slovakia: | `slovakia` | +| :sierra_leone: | `sierra_leone` | :san_marino: | `san_marino` | +| :senegal: | `senegal` | :somalia: | `somalia` | +| :suriname: | `suriname` | :south_sudan: | `south_sudan` | +| :sao_tome_principe: | `sao_tome_principe` | :el_salvador: | `el_salvador` | +| :sint_maarten: | `sint_maarten` | :syria: | `syria` | +| :swaziland: | `swaziland` | :turks_caicos_islands: | `turks_caicos_islands` | +| :chad: | `chad` | :french_southern_territories: | `french_southern_territories` | +| :togo: | `togo` | :thailand: | `thailand` | +| :tajikistan: | `tajikistan` | :tokelau: | `tokelau` | +| :timor_leste: | `timor_leste` | :turkmenistan: | `turkmenistan` | +| :tunisia: | `tunisia` | :tonga: | `tonga` | +| :tr: | `tr` | :trinidad_tobago: | `trinidad_tobago` | +| :tuvalu: | `tuvalu` | :taiwan: | `taiwan` | +| :tanzania: | `tanzania` | :ukraine: | `ukraine` | +| :uganda: | `uganda` | :us: | `us` | +| :uruguay: | `uruguay` | :uzbekistan: | `uzbekistan` | +| :vatican_city: | `vatican_city` | :st_vincent_grenadines: | `st_vincent_grenadines` | +| :venezuela: | `venezuela` | :british_virgin_islands: | `british_virgin_islands` | +| :us_virgin_islands: | `us_virgin_islands` | :vietnam: | `vietnam` | +| :vanuatu: | `vanuatu` | :wallis_futuna: | `wallis_futuna` | +| :samoa: | `samoa` | :kosovo: | `kosovo` | +| :yemen: | `yemen` | :mayotte: | `mayotte` | +| :south_africa: | `south_africa` | :zambia: | `zambia` | +| :zimbabwe: | `zimbabwe` | | | \ No newline at end of file diff --git a/exampleSite/content/post/emoji-support.md b/exampleSite/content/post/04-emoji-support/index.md similarity index 96% rename from exampleSite/content/post/emoji-support.md rename to exampleSite/content/post/04-emoji-support/index.md index 4eda136..f0e2e80 100644 --- a/exampleSite/content/post/emoji-support.md +++ b/exampleSite/content/post/04-emoji-support/index.md @@ -12,7 +12,9 @@ categories: tags: - 表情 - - emoji + - Emoji + +toc: true url: "demo/emoji-support.html" --- @@ -26,7 +28,7 @@ Emoji 可以通过多种方式在 Hugo 项目中启用。 -它们以**冒号**开头和结尾,并且包含 emoji 的 **代码**: +它们以**冒号**开头和结尾,并且包含 emoji 的 **简短代码**: ```markdown 去露营啦! {:}tent: 很快就回来. @@ -36,9 +38,8 @@ Emoji 可以通过多种方式在 Hugo 项目中启用。 呈现的输出效果如下: -去露营啦! :tent: 很快就回来。 - -真开心! :joy: +> 去露营啦! :tent: 很快就回来。
+> 真开心! :joy: 以下**符号清单**是 emoji 代码的非常有用的参考。 @@ -54,7 +55,7 @@ Emoji 可以通过多种方式在 Hugo 项目中启用。 | :rofl: | `rofl` | :joy: | `joy` | | :slightly_smiling_face: | `slightly_smiling_face` | :upside_down_face: | `upside_down_face` | | :wink: | `wink` | :blush: | `blush` | -| :innocent: | `innocent` | | | +| :innocent: | `innocent` | | | ### 爱意表情 @@ -70,7 +71,7 @@ Emoji 可以通过多种方式在 Hugo 项目中启用。 | :-: | - | :-: | - | | :yum: | `yum` | :stuck_out_tongue: | `stuck_out_tongue` | | :stuck_out_tongue_winking_eye: | `stuck_out_tongue_winking_eye` | :stuck_out_tongue_closed_eyes: | `stuck_out_tongue_closed_eyes` | -| :money_mouth_face: | `money_mouth_face` | | | +| :money_mouth_face: | `money_mouth_face` | :money_mouth_face: | | ### 国家和地区旗帜 @@ -200,4 +201,4 @@ Emoji 可以通过多种方式在 Hugo 项目中启用。 | :samoa: | `samoa` | :kosovo: | `kosovo` | | :yemen: | `yemen` | :mayotte: | `mayotte` | | :south_africa: | `south_africa` | :zambia: | `zambia` | -| :zimbabwe: | `zimbabwe` | | | \ No newline at end of file +| :zimbabwe: | `zimbabwe` | | | \ No newline at end of file diff --git a/exampleSite/content/post/05-table-of-content/index.en-us.md b/exampleSite/content/post/05-table-of-content/index.en-us.md new file mode 100644 index 0000000..9ab6006 --- /dev/null +++ b/exampleSite/content/post/05-table-of-content/index.en-us.md @@ -0,0 +1,66 @@ +--- +title: "Article Catalog Navigation" +description: "Describe the navigation effect of the article directory under NexT theme." +keywords: "Article, Table of Contents, Navigation" + +date: 2025-01-25T20:58:52+08:00 +lastmod: 2025-01-25T20:58:52+08:00 + +categories: + - Example +tags: + - Table of Contents + - Navigation + - Blog + +toc: true +url: demo/table-of-content.html +--- + +General Patton once said, "The measure of a person's success is not by standing at the peak, but by the rebound force after falling from the peak." Chu Shijian's life was like this: he became wealthy in middle age, gained both fame and fortune, and then fell to the bottom again. He started his own business at the age of 74, returned with Chu Cheng 10 years later, and made a comeback with billions of wealth. His development trajectory was a process of rebound. + + + +![Old Man](https://wfqqreader-1252317822.image.myqcloud.com/cover/568/814568/t6_814568.jpg) + +## Early stories +### Starting from + +In the spring of 2014, at the border of Huaning County and Yiliang County in Yunnan Province, a small mountain village called Yize had an old courtyard house with a history of over a hundred years demolished. The village committee is leading the villagers in the construction of a "beautiful countryside". In one year, the old village houses will no longer be visible, replaced by new reinforced concrete residential buildings. Just like the transformation of Chinese cities 10 or 20 years ago, this small village surrounded by mountains has also begun to fall into the "construction site mode". + +#### Childhood waves + +Almost all children who grow up by the river have an undeniable talent: good at water. Chu Shijian is no exception. Not only has he developed excellent swimming skills in the Nanpan River and flower ponds since childhood, but at the age of five or six, he can already dive far with a fierce spear. Moreover, he has been able to catch fish in the ponds on the Nanpan River and riverbanks since the age of seven or eight. + +### Youth stories + +Chu Shijian's more than ten years of living freely in the countryside were actually more than ten years of turbulent Chinese society. Especially after the Lugou Bridge Incident in 1937, the Japanese launched a full-scale invasion of China, and in just two or three years, most of China's territory fell one after another + +## Ten Years of Passionate Youth +### Becoming a guerrilla fighter + +In the summer of 1948, Chu Shijian returned to his hometown and became a teacher at Lufeng Railway Station Primary School. At the same time, he continued to maintain contact with the Communist Party organization with Chu Shiren and Chu Shijie, and did some work of transmitting intelligence + +#### War is raging + +Due to the significant disparity in combat effectiveness, guerrilla forces can only rely on exchanging one shot for another, specifically targeting weak areas of the enemy to attack, but more often than not, they are defending and shifting positions. + +### Embrace liberation + +In December 1949, Lu Han, the Chairman of the Nationalist Party in Yunnan Province, announced an uprising in Kunming, marking the official beginning of Yunnan's liberation. On February 20, 1950, Chen Gong, Song Renqiong, and Zhou Baozhong led the Fourth Corps of the Second Field Army of the People's Liberation Army into Kunming. On February 24, Chen Gong declared the liberation of the entire Yunnan province. + +## The discontinuity of life +### Falling into the bottom of life + +The people who were overthrown in the "anti rightist" movement had only one way to go after their "rightist" identity was determined: to be demoted to the farm. A farm is truly a place for farming, where one must live the same life as a farmer. + +## Conclusion +### Time is like a river + +In 2015, it was the 60th anniversary of Chu Shijian and Ma Jingfen's marriage, known as the commemorative year of the "diamond wedding". This is simply a reward in life. With the increasing divorce rate in China, a 60 year marriage is almost like a dream from a past life. With the companionship of a child, Chu Shijian and Ma Jingfen have experienced various storms of the country and individuals, and faced life and death together. They are not only husband and wife, but also a pair of comrades in arms. Although Ma Jingfen occasionally complains about Chu Shijian's carelessness when he was young, in the end, she would say, "Without me, there would be no him, and without him, there would be no me + +## Author thanks + +This book started interviewing in early summer 2014 and has been completed today, taking 18 months. The 'author' on the cover can only be my name, but only I know that this book contains the hearts and minds of too many people. Of course, I would like to first thank Mr. Wang Shi. Without him, there would be no book. Upon careful consideration, I realize that without Mr. Wang Shi's constant urging and encouragement, and without my writing work today. Since I started working as a professional writer in 2006, he has created many opportunities for me to write and has generously shared his life and learning experiences and insights with me. Thank you very much for your kindness. + +Finally, I would like to express my greatest gratitude to Mr. Chu Shijian. Not only because he was generous and candid in facing my various questions, but more importantly, in the process of listening to his story, his prosperous life experience, strong vitality, and his pure heart towards life and career also enriched my thinking about my own life. \ No newline at end of file diff --git a/exampleSite/content/post/table-of-content.md b/exampleSite/content/post/05-table-of-content/index.md similarity index 100% rename from exampleSite/content/post/table-of-content.md rename to exampleSite/content/post/05-table-of-content/index.md diff --git a/exampleSite/content/post/06-image-viewer/index.en-us.md b/exampleSite/content/post/06-image-viewer/index.en-us.md new file mode 100644 index 0000000..68a6a0a --- /dev/null +++ b/exampleSite/content/post/06-image-viewer/index.en-us.md @@ -0,0 +1,40 @@ +--- +title: "Image Browsing Tool" +description: "By default, images within the article will be browsed. Clicking on an image will display a larger image, while clicking on a blank space will close it." +Keywords: "image, image, browser, photo album" + +date: 2025-01-25T21:28:12+08:00 +lastmod: 2025-01-25T21:28:12+08:00 + +categories: + - Example + +tags: + - Image + - Album + - Browse + +url: "demo/image-viewer.html" +toc: false +expired: true +--- + +This theme comes with an image browser function that supports browsing images that appear in the article area. Clicking on an image can view a larger image, while clicking on a blank space can close it. No need to configure any parameters, just add image information at the corresponding position in the article. + + + +The image browser referenced [fengyuanchen](https://fengyuanchen.github.io/) Developed [viewerjs](https://fengyuanchen.github.io/viewerjs/) Supports displaying image name, size, rotation, scaling, playback, and other functions. You can click on the following example image to view the experience: + +## Animals + +![cute-scottish-fold-cat](/demo/image-viewer/photos/preview_cute-scottish-fold-cat.jpg) +![scottish-fold-kitten](/demo/image-viewer/photos/preview_scottish-fold-kitten.jpg) +![hourses](/demo/image-viewer/photos/preview_horses.jpg) +![owl-family-background](/demo/image-viewer/photos/preview_owl-family-background.jpg) + +## Scenery + +![luxury-resort-in-maldives](/demo/image-viewer/photos/preview_luxury-resort-in-maldives.jpg) +![sea-shell](/demo/image-viewer/photos/preview_sea-shell.jpg) +![the-arch-sunset](/demo/image-viewer/photos/preview_the-arch-sunset.jpg) +![norway-autumn-landscape](/demo/image-viewer/photos/preview_norway-autumn-landscape.jpg) \ No newline at end of file diff --git a/exampleSite/content/post/image-viewer.md b/exampleSite/content/post/06-image-viewer/index.md similarity index 56% rename from exampleSite/content/post/image-viewer.md rename to exampleSite/content/post/06-image-viewer/index.md index 19c8af2..d2e9a44 100644 --- a/exampleSite/content/post/image-viewer.md +++ b/exampleSite/content/post/06-image-viewer/index.md @@ -14,8 +14,9 @@ tags: - 相册 - 浏览 -url: "demo/image-viewer.html" +url: "/demo/image-viewer.html" toc: false +expired: true --- 本主题自带图像浏览器功能,支持对文章区域内出现的图片进行浏览,点击图片可以查看大图,点击空白处可以关闭。不需要配置任何参数,只要在文章里面相应的位置添加图片信息即可 。 @@ -26,15 +27,14 @@ toc: false ## 动物 -![cute-scottish-fold-cat](/post/image-viewer/preview_cute-scottish-fold-cat.jpg) -![scottish-fold-kitten](/post/image-viewer/preview_scottish-fold-kitten.jpg) -![hourses](/post/image-viewer/preview_horses.jpg) -![owl-family-background](/post/image-viewer/preview_owl-family-background.jpg) +![cute-scottish-fold-cat](/demo/image-viewer/photos/preview_cute-scottish-fold-cat.jpg) +![scottish-fold-kitten](/demo/image-viewer/photos/photos/preview_scottish-fold-kitten.jpg) +![hourses](/demo/image-viewer/photos/preview_horses.jpg) +![owl-family-background](/demo/image-viewer/photos/preview_owl-family-background.jpg) ## 风景 -![luxury-resort-in-maldives](/post/image-viewer/preview_luxury-resort-in-maldives.jpg) -![sea-shell](/post/image-viewer/preview_sea-shell.jpg) -![the-arch-sunset](/post/image-viewer/preview_the-arch-sunset.jpg) -![norway-autumn-landscape](/post/image-viewer/preview_norway-autumn-landscape.jpg) - +![luxury-resort-in-maldives](/demo/image-viewer/photos/preview_luxury-resort-in-maldives.jpg) +![sea-shell](/demo/image-viewer/photos/preview_sea-shell.jpg) +![the-arch-sunset](/demo/image-viewer/photos/preview_the-arch-sunset.jpg) +![norway-autumn-landscape](/demo/image-viewer/photos/preview_norway-autumn-landscape.jpg) \ No newline at end of file diff --git a/exampleSite/content/post/image-viewer/preview_cute-scottish-fold-cat.jpg b/exampleSite/content/post/06-image-viewer/photos/preview_cute-scottish-fold-cat.jpg similarity index 100% rename from exampleSite/content/post/image-viewer/preview_cute-scottish-fold-cat.jpg rename to exampleSite/content/post/06-image-viewer/photos/preview_cute-scottish-fold-cat.jpg diff --git a/exampleSite/content/post/image-viewer/preview_horses.jpg b/exampleSite/content/post/06-image-viewer/photos/preview_horses.jpg similarity index 100% rename from exampleSite/content/post/image-viewer/preview_horses.jpg rename to exampleSite/content/post/06-image-viewer/photos/preview_horses.jpg diff --git a/exampleSite/content/post/image-viewer/preview_luxury-resort-in-maldives.jpg b/exampleSite/content/post/06-image-viewer/photos/preview_luxury-resort-in-maldives.jpg similarity index 100% rename from exampleSite/content/post/image-viewer/preview_luxury-resort-in-maldives.jpg rename to exampleSite/content/post/06-image-viewer/photos/preview_luxury-resort-in-maldives.jpg diff --git a/exampleSite/content/post/image-viewer/preview_norway-autumn-landscape.jpg b/exampleSite/content/post/06-image-viewer/photos/preview_norway-autumn-landscape.jpg similarity index 100% rename from exampleSite/content/post/image-viewer/preview_norway-autumn-landscape.jpg rename to exampleSite/content/post/06-image-viewer/photos/preview_norway-autumn-landscape.jpg diff --git a/exampleSite/content/post/image-viewer/preview_owl-family-background.jpg b/exampleSite/content/post/06-image-viewer/photos/preview_owl-family-background.jpg similarity index 100% rename from exampleSite/content/post/image-viewer/preview_owl-family-background.jpg rename to exampleSite/content/post/06-image-viewer/photos/preview_owl-family-background.jpg diff --git a/exampleSite/content/post/image-viewer/preview_scottish-fold-kitten.jpg b/exampleSite/content/post/06-image-viewer/photos/preview_scottish-fold-kitten.jpg similarity index 100% rename from exampleSite/content/post/image-viewer/preview_scottish-fold-kitten.jpg rename to exampleSite/content/post/06-image-viewer/photos/preview_scottish-fold-kitten.jpg diff --git a/exampleSite/content/post/image-viewer/preview_sea-shell.jpg b/exampleSite/content/post/06-image-viewer/photos/preview_sea-shell.jpg similarity index 100% rename from exampleSite/content/post/image-viewer/preview_sea-shell.jpg rename to exampleSite/content/post/06-image-viewer/photos/preview_sea-shell.jpg diff --git a/exampleSite/content/post/image-viewer/preview_the-arch-sunset.jpg b/exampleSite/content/post/06-image-viewer/photos/preview_the-arch-sunset.jpg similarity index 100% rename from exampleSite/content/post/image-viewer/preview_the-arch-sunset.jpg rename to exampleSite/content/post/06-image-viewer/photos/preview_the-arch-sunset.jpg diff --git a/exampleSite/content/post/07-custom-files/index.en-us.md b/exampleSite/content/post/07-custom-files/index.en-us.md new file mode 100644 index 0000000..7119f7b --- /dev/null +++ b/exampleSite/content/post/07-custom-files/index.en-us.md @@ -0,0 +1,78 @@ +--- +title: "Support user-defined design" +description: "Users can customize file configurations to achieve personalized adjustments to the style and layout of the site" +keywords: "custom,files,layout" + +date: 2025-01-25T21:12:32+08:00 +lastmod: 2025-01-25T20:59:12+08:00 + +categories: + - Example + +tags: + - Customize + - Personalization + - Layout + +url: "demo/custom-files.html" +toc: true +--- + +For users familiar with front-end development, personalized adjustments can be made to the style and layout of the site through custom file configuration. In terms of layout, it mainly supports the site overview section in the left sidebar, as well as the two positions at the bottom of the site, but the style reset can be anywhere on the entire site. + +## Open configuration parameters + +Firstly, it is necessary to clarify that the following parameters are configured in the `params` area of the configuration file: + +```yaml +customFilePath: +sidebar: custom_sidebar.html +footer: custom_footer.html +style: /css/custom_style.css +``` + +> [!WARNING] +> **Attention:** The file names of `sidebar` and `footer` cannot be the same as their parameter names, otherwise it will affect the default layout design of the system. Remember!!!: smile: + + +Then create two directories, 'layouts/partitions', in the root directory of the site to store custom layout design files. Additionally, create two directories,' static/css', in the root directory of the site to store custom CSS style files. After everything is ready, you can refer to the following steps to complete your design idea. + +## Sidebar design + +Create a new file with the suffix 'html' in the 'partitions' directory earlier, where you can write the design or content you want to express, such as introducing some third-party component content. The example is as follows: + +```html +
+Support custom CSS and Sidebar layout now 💄💄💄 +
+``` + +Configure the path of the file to the corresponding parameters, please refer to the effect at the bottom of the left sidebar for the effect. + +## Footer design + +Create a new file with the suffix 'html' in the 'partitions' directory earlier, where you can write the design or content you want to express, such as introducing some third-party component content. The example is as follows: + +```html + +``` + +Configure the path of the file to the corresponding parameters, please refer to the effect at the bottom of the site for the effect. + +## Custom Style + +Create a new file with the suffix 'css' in the' css' directory earlier, and then redefine the style of the site or add some custom style designs to reference when writing articles. The example is as follows: + +```html +.custom-head5 { +font-size: 1.2em; +color: #ed6c24; +font-weight: bold; +} +``` + +Configure the path of the file to the corresponding parameters, and the effect reference is as follows: + + I am customizing the title style effect. \ No newline at end of file diff --git a/exampleSite/content/post/custom-files.md b/exampleSite/content/post/07-custom-files/index.md similarity index 99% rename from exampleSite/content/post/custom-files.md rename to exampleSite/content/post/07-custom-files/index.md index 460c0c6..a987db5 100644 --- a/exampleSite/content/post/custom-files.md +++ b/exampleSite/content/post/07-custom-files/index.md @@ -20,8 +20,6 @@ toc: true 对于熟悉前端开发的用户来说,可以通过自定义文件配置,实现对站点的样式和布局进行个性化的调整。其中布局方面主要是支持左侧边栏的站点概览部分,以及站点底部2个位置,但样式的重置可以是整个站点的任意位置。 - - ## 打开配置参数 首先要明确在配置文件的 `params` 区域中有配置如下参数: @@ -65,7 +63,6 @@ Website source code [!INFO] +> Used to test whether the directory navigation of an article will be directly closed and the comment function will be disabled without the H1-6 title header. + + + +Good evening, gentlemen and ladies, + +I am honored to receive the Clarke Award for Imagination in Service to Society. + +This award is a reward for imagination, which is a human ability that seems to belong only to God, and its significance far exceeds our imagination. Historians have said that the reason why humans were able to establish civilization beyond other species on Earth is mainly because they were able to create things in their own brains that do not exist in reality. In the future, when artificial intelligence surpasses human intelligence, imagination may be our only advantage over them. + +Science fiction is a literature based on imagination, and the first one that left a deep impression on me was Arthur Clarke's works. Except for Jules Verne and George Wells, Clarke's works are the earliest Western modern science fiction novels to enter China. In the early 1980s, China published his works "2001: A Space Odyssey" and "Rendezvous With Rama". At that time, the Cultural Revolution had just ended, and the old life and beliefs had collapsed, while the new had not yet been established. Like other young people, I felt lost in my heart. These two books activated my imagination for the first time, and my thoughts suddenly became much broader, with the feeling of a small stream flowing into the sea. On the night I finished reading '2001: A Space Odyssey', I walked out of my house and looked up at the starry sky. At that time, the sky in China was not too polluted, and I could see the Milky Way. In my eyes, the starry sky was completely different from the past. For the first time, I had a sense of awe towards the vastness and mystery of the universe, which was a religious feeling. And later I read 'Rendezvous With Rama', which also amazed me at how imagination can be used to construct a vivid imaginary world. It was these feelings brought to me by Clarke that later made me a science fiction writer. + +Now, more than thirty years have passed, and I gradually realize that our generation born in China in the 1960s may be the luckiest people in human history, because there has never been a generation before that has witnessed such a huge change in the world around us. The world we live in now is completely different from the world we grew up in, and this change is accelerating. China is a country full of a sense of the future. China's future may be full of challenges and crises, but it has never been as attractive as it is now. This provides fertile soil for science fiction novels, which have received unprecedented attention in China. As a science fiction writer born in China in the 1960s, it is a stroke of luck. + +I look forward to one day, like those science fiction novels that once described the information age, science fiction novels that describe space travel will become mundane. At that time, Mars and the asteroid belt were boring places where countless people made a living; Jupiter and its numerous satellites have become tourist destinations, and the only obstacle preventing people from going there is the expensive price. + +But even at this time, the universe remains a vast and unimaginable existence, with the nearest stars still out of reach. The vast starry sky can always carry our infinite imagination. + +Thank you all. + + +> [Click to read the full text](https://weread.qq.com/web/reader/ce032b305a9bc1ce0b0dd2akecc32f3013eccbc87e4b62e) \ No newline at end of file diff --git a/exampleSite/content/post/no-header-title.md b/exampleSite/content/post/08-no-header-title/index.md similarity index 99% rename from exampleSite/content/post/no-header-title.md rename to exampleSite/content/post/08-no-header-title/index.md index 6119175..62b5450 100644 --- a/exampleSite/content/post/no-header-title.md +++ b/exampleSite/content/post/08-no-header-title/index.md @@ -15,10 +15,12 @@ tags: comment: enable: false url: "demo/no-header-title.html" +expired: true --- 刘慈欣2018克拉克奖获奖感言(部分内容节选)。 +> [!INFO] > 用于测试在没有H1-6标题头时,文章的目录导航是否会直接关闭,并关闭评论功能。 diff --git a/exampleSite/content/post/09-syntax-highlighting/index.en-us.md b/exampleSite/content/post/09-syntax-highlighting/index.en-us.md new file mode 100644 index 0000000..2572954 --- /dev/null +++ b/exampleSite/content/post/09-syntax-highlighting/index.en-us.md @@ -0,0 +1,188 @@ +--- +Title: "Hugo's Built in Chroma Grammar Highlighting" +description: Describe the various syntax and highlighting effects supported by Chroma +Keywords: "Chroma, syntax, highlighting" + +date: 2025-01-29T20:09:52+08:00 +lastmod: 2025-01-29T20:09:52+08:00 + +categories: + - Example + - Grammar +tags: + - Grammar + - Highlight + - Chroma + +url: demo/syntax-highlighting.html +--- + +Hugo provides very fast syntax highlighting through Chroma, and now uses Chroma as code block highlighting support in Hugo. It is built into the Go language, and the speed is really, really fast. Most importantly, it is also compatible with the Pygments method we used before. + +The following verifies the rendering effect of code blocks in different languages and their correct highlighting through Hugo's built-in short code 'highlight' and 'Markodown' code blocks. For more information on optimizing syntax highlighting, please refer to the [Hugo Documentation](https://gohugo.io/getting-started/configuration-markup#highlight). + + + +## Programming language + +### GO + +```makrdown +{{}} + +func GetTitleFunc(style string) func(s string) string { +switch strings.ToLower(style) { +case "go": +return strings.Title +case "chicago": +return transform.NewTitleConverter(transform.ChicagoStyle) +default: +return transform.NewTitleConverter(transform.APStyle) +} +} + +{{}} +``` + +{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" >}} + +func GetTitleFunc(style string) func(s string) string { +switch strings.ToLower(style) { +case "go": +return strings.Title +case "chicago": +return transform.NewTitleConverter(transform.ChicagoStyle) +default: +return transform.NewTitleConverter(transform.APStyle) +} +} + +{{< / highlight >}} + +### Java + +```java +import javax.swing.JFrame; // Importing class JFrame +import javax.swing.JLabel; // Importing class JLabel +public class HelloWorld { +public static void main(String[] args) { +JFrame frame = new JFrame(); // Creating frame +frame.setTitle("Hi!"); // Setting title frame +frame.add(new JLabel("Hello, world!"));// Adding text to frame +frame.pack(); // Setting size to smallest +frame.setLocationRelativeTo(null); // Centering frame +frame.setVisible(true); // Showing frame +} +} +``` + +### Python + +``` python +print "Hello, world!" +``` + +### Git Comparison + +```diff {hl_lines=[4,"6-7"], linenos=true} +*** /path/to/original ''timestamp'' +--- /path/to/new ''timestamp'' +*************** +*** 1 **** +! This is a line. +--- 1 --- +! This is a replacement line. +It is important to spell +-removed line ++new line +``` + +```diff {hl_lines=[4,"6-7"], linenos=false} +*** /path/to/original ''timestamp'' +--- /path/to/new ''timestamp'' +*************** +*** 1 **** +! This is a line. +--- 1 --- +! This is a replacement line. +It is important to spell +-removed line ++new line +``` + +## File + +### Make file + +``` makefile {linenos=false} +CC=gcc +CFLAGS=-I. + +hellomake: hellomake.o hellofunc.o +$(CC) -o hellomake hellomake.o hellofunc.o -I. +``` + +### Markdown document + +``` markdown +**bold** +*italics* +[link](www.example.com) +``` + +## Data content + +### JSON data + +``` json +{"employees":[ +{"firstName":"John", "lastName":"Doe"}, +]} +``` + +### XML Content + +``` xml + + +John Doe + + +``` + +### SQL Query + +{{< highlight sql >}} + +SELECT column_name,column_name +FROM +Table +WHERE column_name = "condition" +{{< / highlight >}} + +### Auto guess code highlighted + +``` +.highlight { + + //Other codes + ...... + + > .chroma { + position: relative; + + + //Fix code block overflow issue + pre { + overflow-wrap: break-word; + white-space: pre-wrap; + line-break: anywhere; + word-break: break-all; + overflow-x: auto; + } + } +} +``` + + +In addition to the code highlighting listed above, it also supports highlighting in mainstream code languages such as C, C++, HTML, CSS, Shell scripts, etc., and can be tested for effectiveness on its own. \ No newline at end of file diff --git a/exampleSite/content/post/syntax-highlighting.md b/exampleSite/content/post/09-syntax-highlighting/index.md similarity index 71% rename from exampleSite/content/post/syntax-highlighting.md rename to exampleSite/content/post/09-syntax-highlighting/index.md index eafb9fb..38ecba9 100644 --- a/exampleSite/content/post/syntax-highlighting.md +++ b/exampleSite/content/post/09-syntax-highlighting/index.md @@ -27,6 +27,23 @@ Hugo 通过 Chroma 提供非常快速的语法高亮显示,现 Hugo 中使用 ### GO +```makrdown +{{}} + +func GetTitleFunc(style string) func(s string) string { + switch strings.ToLower(style) { + case "go": + return strings.Title + case "chicago": + return transform.NewTitleConverter(transform.ChicagoStyle) + default: + return transform.NewTitleConverter(transform.APStyle) + } +} + +{{}} +``` + {{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" >}} func GetTitleFunc(style string) func(s string) string { @@ -48,14 +65,14 @@ func GetTitleFunc(style string) func(s string) string { import javax.swing.JFrame; //Importing class JFrame import javax.swing.JLabel; //Importing class JLabel public class HelloWorld { - public static void main(String[] args) { - JFrame frame = new JFrame(); //Creating frame - frame.setTitle("Hi!"); //Setting title frame - frame.add(new JLabel("Hello, world!"));//Adding text to frame - frame.pack(); //Setting size to smallest - frame.setLocationRelativeTo(null); //Centering frame - frame.setVisible(true); //Showing frame - } + public static void main(String[] args) { + JFrame frame = new JFrame(); //Creating frame + frame.setTitle("Hi!"); //Setting title frame + frame.add(new JLabel("Hello, world!"));//Adding text to frame + frame.pack(); //Setting size to smallest + frame.setLocationRelativeTo(null); //Centering frame + frame.setVisible(true); //Showing frame + } } ``` @@ -143,5 +160,29 @@ FROM WHERE column_name = "condition" {{< / highlight >}} +### 自动猜测代码高亮显示 + +``` +.highlight { + + //Other codes + ...... + + > .chroma { + position: relative; + + + //Fix code block overflow issue + pre { + overflow-wrap: break-word; + white-space: pre-wrap; + line-break: anywhere; + word-break: break-all; + overflow-x: auto; + } + } +} +``` + 除以上列举的代码高亮显示外,还支持诸如:C 语言、C++、HTML、CSS、Shell脚本等各主流的代码语言高亮显示,可自行测试效果。 \ No newline at end of file diff --git a/exampleSite/content/post/10-math-formula/index.en-us.md b/exampleSite/content/post/10-math-formula/index.en-us.md new file mode 100644 index 0000000..c42df63 --- /dev/null +++ b/exampleSite/content/post/10-math-formula/index.en-us.md @@ -0,0 +1,259 @@ +--- +title: Mathematical Formula Rendering +description: The theme supports mathematical formula rendering schemes for two different plugins, mathjs and katex +keywords: "math,formula" + +date: 2025-01-29T20:50:02+08:00 +lastmod: 2025-01-29T20:50:02+08:00 + +categories: + - ThirdParty + - Mathematical +tags: + - Mathematical + - mathjax + - katex + + +url: "demo/math-formula.html" +math: mathjax +--- + +This theme supports two different schemes, `mathjax` and `katex`, and supports rendering mathematical formulas. You can choose according to your own needs. + + + +In the following example, [MathJax](https://www.mathjax.org/) will be used Plan to showcase rendering effects. + +{{< note info >}} + +- Create a new article using the `hugo new` command; +- You can globally enable data formula rendering. Please configure the parameter `math: katex` or `math: mathjax` in the article front parameters; +- Or configure the parameter to the header of the page where mathematical formulas need to be displayed. +> reducing unnecessary resource loading consumption + +{{< /note >}} + +**Attention:** Use [Supported TeX Features](https://docs.mathjax.org/en/latest/input/tex/index.html) Online reference materials. + +## Example + +### Insider formula + +Quadratic formula:$ Ax ^ 2+bx+c=0 $(supports using ` \ $...)\$` Format of inline formulas + +Quadratic formula (line break display formula) $$ax ^ 2+bx+c=0$$ + +The more complex formula is as follows:$ \lim^{x \to \infty}_{y \to 0}{\frac{x}{y}}$ + +Other inline formulas display ( _score_ _expression_ ): \(\frac{1}{2}\) (Supports inline formula effects in `\(...\)` format) + + +### Repeated scores + +$$ +\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} \equiv 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } } +$$ + + +### Sum mark + +$$ +\left(\sum_{k=1}^n a_k b_k \right)^2 \leq \left(\sum_{k=1}^n a_k^2 \right) \left(\sum_{k=1}^n b_k^2 \right) +$$ + + +### Sum of geometric series + +I have divided the next two examples into several lines so that they perform better on mobile phones. That's why they contain '\ display style'. Alternatively, truncation can be performed using syntax similar to '\ showlines {x=a+b \ \ y=b+c}', as detailed in: [mathjax-issues2312](https://github.com/mathjax/MathJax/issues/2312) + +$$ +\displaystyle\sum_{i=1}^{k+1}i +$$ + +$$ +\displaystyle= \left(\sum_{i=1}^ {k}i \right) +(k+1) +$$ + +$$ +\displaystyle= \frac{k(k+1)}{2}+k+1 +$$ + +$$ +\displaystyle= \frac{k(k+1)+2(k+1)}{2} +$$ + +$$ +\displaystyle= \frac{(k+1)(k+2)}{2} +$$ + +$$ +\displaystyle= \frac{(k+1)((k+1)+1)}{2} +$$ + +### Riding symbols + +$$ +\displaystyle 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = +$$ + +$$ +\displaystyle \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, +\displaystyle\text{ for }\lvert q\rvert < 1. +$$ + + +### Random number formula + +These are some linear mathematics:$ k_{n+1} = n^2 + k_n^2 - k_{n-1} $ , Then there are more texts. + + +### Greek alphabet + +$$ +\displaylines{\Gamma\ \Delta\ \Theta\ \Lambda\ \Xi\ \Pi\ \Sigma\ \Upsilon\ \Phi\ \Psi\ \Omega +\alpha\ \beta\ \gamma\ \delta\ \epsilon\ \zeta\ \\\\ \eta\ \theta\ \iota\ \kappa\ \lambda\ \mu\ \nu\ \xi \ \omicron\ \pi\ \rho\ \sigma\ \tau\ \upsilon\ \phi\ \chi\ \psi\ \omega\ \varepsilon\ \vartheta\ \varpi\ \varrho\ \varsigma\ \varphi} +$$ + +### Arrow + +$$ +\gets\ \to\ \leftarrow\ \rightarrow\ \uparrow\ \Uparrow\ \downarrow\ \Downarrow\ \updownarrow\ \Updownarrow +$$ + +$$ +\displaylines{\Leftarrow\ \Rightarrow\ \leftrightarrow\ \Leftrightarrow\ \mapsto\ \hookleftarrow +\leftharpoonup\ \leftharpoondown\ \\\\\ \rightleftharpoons\ \longleftarrow\ \Longleftarrow\ \longrightarrow} +$$ + +$$ +\Longrightarrow\ \longleftrightarrow\ \Longleftrightarrow\ \longmapsto\ \hookrightarrow\ \rightharpoonup +$$ + +$$ +\rightharpoondown\ \leadsto\ \nearrow\ \searrow\ \swarrow\ \nwarrow +$$ + + +## Symbols + +$$ +\surd\ \barwedge\ \veebar\ \odot\ \oplus\ \otimes\ \oslash\ \circledcirc\ \boxdot\ \bigtriangleup +$$ + +$$ +\bigtriangledown\ \dagger\ \diamond\ \star\ \triangleleft\ \triangleright\ \angle\ \infty\ \prime\ \triangle +$$ + + +### Calculus + +$$ +\int u \frac{dv}{dx}\,dx=uv-\int \frac{du} {dx}v \, dx +$$ + +$$ +f(x) = \int_{-\infty}^\infty \hat f(\xi)\,e^{2 \pi i \xi x} +$$ + +$$ +\oint \vec{F} \cdot d\vec{s}=0 +$$ + + +### Lorenz equation + +$$ +\begin{aligned} \dot{x} & = \sigma(y-x) \\\\ \dot{y} & = \rho x - y - xz \\\\ \dot{z} & = -\beta z + xy \end{aligned} +$$ + + +### Cross product + +This is feasible in KaTeX, but the separation of fractions is not very good in this environment. + +$$ +\mathbf {V}_1 \times \mathbf {V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\\\ \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\\\ \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \end{vmatrix} +$$ + +Here is a solution: use additional classes of the "mfrac" class (no difference in the case of MathJax) to make the score smaller: + +$$ +\mathbf {V}_1 \times \mathbf {V}_2 = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\\\ \frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\\\ \frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \end{vmatrix} +$$ + + +## Emphasize + +$$ +\hat{x}\ \vec{x}\ \ddot{x} +$$ + + +### Elastic parentheses + +$$ +\left(\frac{x^2}{y^3}\right) +$$ + + +### Scope of evaluation + +$$ +\left. \frac{x^3}{3}\right|_0^1 +$$ + + +### Diagnostic criteria + +$$ +f(n) = \begin{cases} \frac{n}{2}, & \text{if } n\text{ is even} \\\\ 3n+1, & \text{if } n\text{ is odd} \end{cases} +$$ + + +### Maxwell's equations system + +$$ +\begin{aligned} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\\\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\\\ \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\\\ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} +$$ + + +## Statistics + +Fixed phrases:$$ \frac{n!}{k!(n-k)!} = {^n}C_k{n \choose k}$$ + +### Score in Score + +$$ +\frac{\frac{1}{x}+\frac{1}{y}}{y-z} +$$ + + +### Nth root + +$$ +\sqrt[n]{1+x+x^2+x^3+\ldots} +$$ + + +### Matrix + +$$ +\begin{pmatrix} a_{11} & a_{12} & a_{13}\\\\ a_{21} & a_{22} & a_{23}\\\\ a_{31} & a_{32} & a_{33} \end{pmatrix} +\begin{bmatrix} 0 & \cdots & 0 \\\\ \vdots & \ddots & \vdots \\\\ 0 & \cdots & 0 \end{bmatrix} +$$ + + +## Punctuation marks + +$$ +f(x) = \sqrt{1+x} \quad (x \ge -1) +f(x) \sim x^2 \quad (x\to\infty) +$$ + +Now use punctuation marks: + +$$ +f(x) = \sqrt{1+x}, \quad x \ge -1 +f(x) \sim x^2, \quad x\to\infty +$$ \ No newline at end of file diff --git a/exampleSite/content/post/math-formula.md b/exampleSite/content/post/10-math-formula/index.md similarity index 90% rename from exampleSite/content/post/math-formula.md rename to exampleSite/content/post/10-math-formula/index.md index b047921..3e7ca9d 100644 --- a/exampleSite/content/post/math-formula.md +++ b/exampleSite/content/post/10-math-formula/index.md @@ -4,7 +4,7 @@ description: "主题支持mathjs和katex两种不同插件的数学公式渲染 keywords: "math,formula" date: 2022-09-11T10:16:02+08:00 -lastmod: 2022-09-11T10:16:02+08:00 +lastmod: 2024-12-12T18:48:32+08:00 categories: - 第三方引入 @@ -29,7 +29,7 @@ math: mathjax - 使用 `hugo new` 命令创建一篇新的文章 - 可以全局启用数据公式渲染,请在项目配置参数 `math: katex` 或 `math: mathjax` -- 或是将该参数配置到需要显示数学公式的页面头部(减少不必要的加载消耗) +- 或是将该参数配置到需要显示数学公式的页面头部(减少不必要的资源加载消耗) {{< /note >}} @@ -37,20 +37,33 @@ math: mathjax ## 例子 +### 内行公式 + +二次公式: $ax^2 + bx + c = 0$ (支持用`\$....\$`格式的行内公式) + +二次公式(换行显示公式) $$ax^2 + bx + c = 0$$ + +更加复杂公式是这样的: $\lim^{x \to \infty}_{y \to 0}{\frac{x}{y}}$ + +其它内联公式显示(分数表达 ):\(\frac{1}{2}\)(支持用`\(...\)`格式的行内公式效果) + ### 重复的分数 + $$ \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} \equiv 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } } $$ ### 总和记号 + $$ \left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) $$ ### 几何级数之和 + 我把接下来的两个例子分成了几行,这样它在手机上表现得更好。这就是为什么它们包含 `\displaystyle`。或者可使用类似 `\displaylines{x = a + b \\\ y = b + c}` 语法进行截断,具体信息可见:[mathjax-issues2312](https://github.com/mathjax/MathJax/issues/2312) $$ @@ -78,6 +91,7 @@ $$ $$ ### 乘记号 + $$ \displaystyle 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = $$ @@ -89,17 +103,19 @@ $$ ### 随文数式 -这是一些线性数学: $$ k_{n+1} = n^2 + k_n^2 - k_{n-1} $$ , 然后是更多的文本。 + +这是一些线性数学: $ k_{n+1} = n^2 + k_n^2 - k_{n-1} $ , 然后是更多的文本。 ### 希腊字母 + $$ \displaylines{\Gamma\ \Delta\ \Theta\ \Lambda\ \Xi\ \Pi\ \Sigma\ \Upsilon\ \Phi\ \Psi\ \Omega \alpha\ \beta\ \gamma\ \delta\ \epsilon\ \zeta\ \\\\ \eta\ \theta\ \iota\ \kappa\ \lambda\ \mu\ \nu\ \xi \ \omicron\ \pi\ \rho\ \sigma\ \tau\ \upsilon\ \phi\ \chi\ \psi\ \omega\ \varepsilon\ \vartheta\ \varpi\ \varrho\ \varsigma\ \varphi} $$ - ### 箭头 + $$ \gets\ \to\ \leftarrow\ \rightarrow\ \uparrow\ \Uparrow\ \downarrow\ \Downarrow\ \updownarrow\ \Updownarrow $$ @@ -119,6 +135,7 @@ $$ ## 符号 + $$ \surd\ \barwedge\ \veebar\ \odot\ \oplus\ \otimes\ \oslash\ \circledcirc\ \boxdot\ \bigtriangleup $$ @@ -129,6 +146,7 @@ $$ ### 微积分学 + $$ \int u \frac{dv}{dx}\,dx=uv-\int \frac{du}{dx}v\,dx $$ @@ -143,12 +161,14 @@ $$ ### 洛伦茨方程 + $$ \begin{aligned} \dot{x} & = \sigma(y-x) \\\\ \dot{y} & = \rho x - y - xz \\\\ \dot{z} & = -\beta z + xy \end{aligned} $$ ### 交叉乘积 + 这在KaTeX中是可行的,但在这种环境中馏分的分离不是很好。 $$ @@ -163,56 +183,60 @@ $$ ## 强调 + $$ \hat{x}\ \vec{x}\ \ddot{x} $$ ### 有弹性的括号 + $$ \left(\frac{x^2}{y^3}\right) $$ ### 评估范围 + $$ \left.\frac{x^3}{3}\right|_0^1 $$ ### 诊断标准 + $$ f(n) = \begin{cases} \frac{n}{2}, & \text{if } n\text{ is even} \\\\ 3n+1, & \text{if } n\text{ is odd} \end{cases} $$ ### 麦克斯韦方程组 + $$ \begin{aligned} \nabla \times \vec{\mathbf{B}} -\, \frac1c\, \frac{\partial\vec{\mathbf{E}}}{\partial t} & = \frac{4\pi}{c}\vec{\mathbf{j}} \\\\ \nabla \cdot \vec{\mathbf{E}} & = 4 \pi \rho \\\\ \nabla \times \vec{\mathbf{E}}\, +\, \frac1c\, \frac{\partial\vec{\mathbf{B}}}{\partial t} & = \vec{\mathbf{0}} \\\\ \nabla \cdot \vec{\mathbf{B}} & = 0 \end{aligned} $$ ## 统计学 -固定词组: -$$ -\frac{n!}{k!(n-k)!} = {^n}C_k -{n \choose k} -$$ +固定词组:$$\frac{n!}{k!(n-k)!} = {^n}C_k{n \choose k}$$ ### 分数在分数 + $$ \frac{\frac{1}{x}+\frac{1}{y}}{y-z} $$ ### n次方根 + $$ \sqrt[n]{1+x+x^2+x^3+\ldots} $$ ### 矩阵 + $$ \begin{pmatrix} a_{11} & a_{12} & a_{13}\\\\ a_{21} & a_{22} & a_{23}\\\\ a_{31} & a_{32} & a_{33} \end{pmatrix} \begin{bmatrix} 0 & \cdots & 0 \\\\ \vdots & \ddots & \vdots \\\\ 0 & \cdots & 0 \end{bmatrix} @@ -220,6 +244,7 @@ $$ ## 标点符号 + $$ f(x) = \sqrt{1+x} \quad (x \ge -1) f(x) \sim x^2 \quad (x\to\infty) diff --git a/exampleSite/content/post/11-mermaid-charts/index.en-us.md b/exampleSite/content/post/11-mermaid-charts/index.en-us.md new file mode 100644 index 0000000..393b852 --- /dev/null +++ b/exampleSite/content/post/11-mermaid-charts/index.en-us.md @@ -0,0 +1,193 @@ +--- +Title: "Mermaid Support Flowchart" +keywords: "mermaid,flow,chart" + +date: 2025-01-29T21:01:13+08:00 +lastmod: 2025-01-29T21:01:13+08:00 + +categories: + - ThirdParty + - DiagramSequence +tags: + - ProcessDiagram + - TimingDiagram + +url: "demo/mermaid-charts.html" +toc: true +--- + + +This theme now supports the use of `Mermaid` to draw flowcharts, sequence diagrams, Gantt charts, state diagrams, relationship diagrams, and more in plain text format. With the gradual development of `Mermaid`, various types of diagrams will be introduced in the future. For more types and usage methods, please follow its official website:[https://mermaid-js.github.io/](https://mermaid-js.github.io/). + + + +## Instructions for use + +{{< note info >}} + +- Create a new article using the `hugo new` command +- Write various types of diagrams using short code, with 2 built-in parameters: Align and bc (background color) can refer to the following usage examples + +{{< /note >}} + +## Process diagram + +```shell +{{}} +graph TD; +A-->B; +A-->C; +B-->D; +C-->D; +{{}} +``` + +{{< mermaid align="left" >}} +graph TD; +A-->B; +A-->C; +B-->D; +C-->D; +{{< /mermaid >}} + +## Timing diagram + +```shell +{{}} +sequenceDiagram +participant Alice +participant Bob +Alice->>John: Hello John, how are you? +loop Healthcheck +John->>John: Fight against hypochondria +end +Note right of John: Rational thoughts
prevail! +John-->>Alice: Great! +John->>Bob: How about you? +Bob-->>John: Jolly good! +{{}} +``` + +{{< mermaid bc="#eee" >}} +sequenceDiagram +participant Alice +participant Bob +Alice->>John: Hello John, how are you? +loop Healthcheck +John->>John: Fight against hypochondria +end +Note right of John: Rational thoughts
prevail! +John-->>Alice: Great! +John->>Bob: How about you? +Bob-->>John: Jolly good! +{{< /mermaid >}} + +## Class diagram + +```shell +{{}} +classDiagram +Class01 <|-- AveryLongClass : Cool +Class03 *-- Class04 +Class05 o-- Class06 +Class07 .. Class08 +Class09 --> C2 : Where am i? +Class09 --* C3 +Class09 --|> Class07 +Class07 : equals() +Class07 : Object[] elementData +Class01 : size() +Class01 : int chimp +Class01 : int gorilla +Class08 <--> C2: Cool label +{{}} +``` +{{< mermaid >}} +classDiagram +Class01 <|-- AveryLongClass : Cool +Class03 *-- Class04 +Class05 o-- Class06 +Class07 .. Class08 +Class09 --> C2 : Where am i? +Class09 --* C3 +Class09 --|> Class07 +Class07 : equals() +Class07 : Object[] elementData +Class01 : size() +Class01 : int chimp +Class01 : int gorilla +Class08 <--> C2: Cool label +{{< /mermaid >}} + +## Gantt Chart + +```shell +{{}} +gantt +dateFormat YYYY-MM-DD +title Adding GANTT diagram to mermaid +excludes weekdays 2014-01-10 + +section A section +Completed task :done, des1, 2014-01-06,2014-01-08 +Active task :active, des2, 2014-01-09, 3d +Future task : des3, after des2, 5d +Future task2 : des4, after des3, 5d +{{}} +``` +{{< mermaid >}} +gantt +dateFormat YYYY-MM-DD +title Adding GANTT diagram to mermaid +excludes weekdays 2014-01-10 + +section A section +Completed task :done, des1, 2014-01-06,2014-01-08 +Active task :active, des2, 2014-01-09, 3d +Future task : des3, after des2, 5d +Future task2 : des4, after des3, 5d +{{< /mermaid >}} + +## Entity Relationship Diagram + +```shell +{{}} +erDiagram +CUSTOMER ||--o{ ORDER : places +ORDER ||--|{ LINE-ITEM : contains +CUSTOMER }|..|{ DELIVERY-ADDRESS : uses +{{}} +``` +{{< mermaid >}} +erDiagram +CUSTOMER ||--o{ ORDER : places +ORDER ||--|{ LINE-ITEM : contains +CUSTOMER }|..|{ DELIVERY-ADDRESS : uses +{{< /mermaid >}} + +## User Journey + +```shell +{{}} +journey +title My working day +section Go to work +Make tea: 5: Me +Go upstairs: 3: Me +Do work: 1: Me, Cat +section Go home +Go downstairs: 5: Me +Sit down: 5: Me +{{}} +``` +{{< mermaid >}} +journey +title My working day +section Go to work +Make tea: 5: Me +Go upstairs: 3: Me +Do work: 1: Me, Cat +section Go home +Go downstairs: 5: Me +Sit down: 5: Me +{{< /mermaid >}} \ No newline at end of file diff --git a/exampleSite/content/post/mermaid-charts.md b/exampleSite/content/post/11-mermaid-charts/index.md similarity index 97% rename from exampleSite/content/post/mermaid-charts.md rename to exampleSite/content/post/11-mermaid-charts/index.md index cf426ac..9bc0c64 100644 --- a/exampleSite/content/post/mermaid-charts.md +++ b/exampleSite/content/post/11-mermaid-charts/index.md @@ -1,6 +1,5 @@ --- title: "Mermaid支持流程图" -description: "mermaid-flow-chart" keywords: "mermaid,flow,chart" date: 2022-09-18T20:58:13+08:00 @@ -14,7 +13,6 @@ tags: - 时序图 url: "demo/mermaid-charts.html" -mermaid: true toc: true --- @@ -28,7 +26,6 @@ toc: true {{< note info >}} - 通过 `hugo new` 命令创建一篇新的文章 -- 在文章头部配置 `mermaid: true` - 使用短代码书写各种类型的图,自带2个参数: align(对齐) 和 bc(背景色),可参考如下使用示例 {{< /note >}} diff --git a/exampleSite/content/post/12-shortcodes/index.en-us.md b/exampleSite/content/post/12-shortcodes/index.en-us.md new file mode 100644 index 0000000..a7c623c --- /dev/null +++ b/exampleSite/content/post/12-shortcodes/index.en-us.md @@ -0,0 +1,156 @@ +--- +title: "Custom shortcode example" +description: "Set commonly used block references, label cards, buttons, and other information as short codes for quick referencing" +Keywords: "short code, short code" + +date: 2025-01-29T21:08:50+08:00 +lastmod: 2025-01-29T21:08:50+08:00 + +categories: + - Example + - Grammar +tags: + - ShortCode + - Grammar +url: "demo/shortcodes.html" +toc: true +--- + +Although the `Markdown` syntax is already very rich and can meet the vast majority of our writing needs, in order to better layout the content of the article in a more friendly way, a set of custom phrases has been designed for citation, which can be quickly referenced when used. + + + +## Block reference + +When quoting some classic quotes, this phrase can be used. The grammar reference is as follows: + +```markdown +{{}} + +### block quote + +Write down the words you want to express! +{{}} +``` + +Actual effect: + +{{< quote >}} + +Hope is indifferent to existence, indifferent to nothingness, just like the road on earth. + + +In fact, there is no road on the ground, and with more people walking, it becomes a road. + +**Lu Xun** + +{{< /quote >}} + +## Information Block + +Support 'default'` The presentation of five different effects, including info, success, warning, and danger, with the following syntax reference: + +```markdown +{{}} +Write and express information +Support Markdown syntax +{{}} +``` + +Actual effect: + +{{< note default no-icon >}} + +### Default Header without icon + +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + +{{< note default >}} +### Default Header +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + +{{< note primary >}} +### Primary Header +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + +{{< note info >}} +### Info Header +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + +{{< note success >}} +### Success Header +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + +{{< note warning >}} +### Warning Header +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + +{{< note danger >}} +### Danger Header +**Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + + +## Bilibili video + +```markdown +{{}} +perhaps +{{}} +``` +{{< bilibili id=BV1Sx411T7QQ >}} + +## Music player + +Based on [Player](https://github.com/DIYgod/APlayer) And [MatingJS](https://github.com/metowolf/MetingJS) The library implements a responsive music player embedded in the meeting, with automatically recognized music platform URLs, including:` Netease, Tencent, Kugou, Baidu, and Xiami platforms also support user-defined music sources. Other relevant parameter explanations are as follows: + +|Parameter Name | Default | Description| +| :----: | :------: | :--- | +| **id** | _Required_ | Music ID, which is the unique identifier of the music on the music platform | +| **server** | _Required_ | Music platform, supports `netease`、 `tencent`、 `kugou`、 `baidu` and `xiami` | +| **type** | _Required_ | Play type, currently supports `song` 、 `playlist`、 `album`、 `search` and `artist` | +| **auto** | _Optional_ | Music address, only supports the platform in the server parameter | +| **theme** | `#448aff` | The theme color of the player defaults to `#448aff` | +| **url** | Empty |Custom music source URL, default to empty | +| **name** | Empty | Music name, default to empty | +| **artist** | Empty | Music author, default to empty | +| **cover** | Empty | Music cover URL, default to empty | +| **fixed** | `false` | Fixed player, default to `false` | +| **mini** | `false` | Display mini player, default to `false` | +| **autoplay** | `false` | Autoplay the music, default to `false` | +| **loop** | `all` | Loop playback, supports `all`、`one` and `none`,default to `all` | +| **order** | `list` | Play order `list` and `random`,default to `list` | +| **volume** | `0.7` | Volume, default is `0.7` | +| **mutex** | `true` | When multiple pieces of music are playing, should only the current player be turned on,default to `true` | +| **list-folded** | `false` | List collapse, default is `false` | +| **list-max-height** | `340px` | The maximum height of the list is 340px by default | + +### Single playback + +```markdown +{{}} +``` + +{{< music theme="#2980b9" server="tencent" type="song" id="002u4ZTb0CXmJA" mini="true" >}} + +### List playback + +```markdown +{{}} +``` + +{{< music server="netease" type="playlist" id="1982066521" list-max-height="140" >}} + +### Customize music source + +```markdown +{{}} +``` + +{{< music url="/music/sky.mp3" name="City of the Sky" artist="Hayao Miyazaki" cover="/music/gongqijun.jpg" autoplay="true" >}} \ No newline at end of file diff --git a/exampleSite/content/post/12-shortcodes/index.md b/exampleSite/content/post/12-shortcodes/index.md new file mode 100644 index 0000000..18ec4e1 --- /dev/null +++ b/exampleSite/content/post/12-shortcodes/index.md @@ -0,0 +1,152 @@ +--- +title: "自定义短语示例" +description: "将常用的块引用、标签卡、按钮等信息设置成短代码,便于快速引用" +keywords: "shortcode,短代码" + +date: 2022-08-06T14:41:50+08:00 +lastmod: 2022-08-06T14:41:50+08:00 + +categories: + - 示例文章 + - 语法 +tags: + - 短代码 + - 语法 +url: "demo/shortcodes.html" +toc: true +--- + +虽然 `Markdown` 语法已经非常丰富能够满足我们写文章的绝大部分需求,但是为更好的对文章内容进行更友好的排版,为引设计一套自定义的短语,便于在使用时能够快速引用。 + + + +## 块引用 + +在引用一些经典名言名句时,可以采用此短语,语法参考如下: + +```markdown +{{}} + ### block quote + 写下你想表达的话语! +{{}} +``` + +实际效果: + +{{< quote >}} + +希望是无所谓有,无所谓无的,这正如地上的路。 + + +其实地上本没有路,走的人多了,也便成了路。 + +**鲁迅** + +{{< /quote >}} + +## 信息块 + +支持 `default`,`info`,`success`,`warning`,`danger` 等五种不同效果的展示,语法参考如下: + +```markdown +{{}} + 书写表达的信息 + 支持 Markdown 语法 +{{}} +``` + +实际效果: + +{{< note default no-icon >}} + ### Default Header without icon + **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + +{{< note default >}} + ### Default Header + **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + +{{< note primary >}} + ### Primary Header + **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + +{{< note info >}} + ### Info Header + **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + +{{< note success >}} + ### Success Header + **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + +{{< note warning >}} + ### Warning Header + **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + +{{< note danger >}} + ### Danger Header + **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) +{{< /note >}} + + +## Bilibili 视频 + +```markdown +{{}} +或者 +{{}} +``` +{{< bilibili id=BV1Sx411T7QQ >}} + +## 音乐播放器 + +基于[APlayer](https://github.com/DIYgod/APlayer)和[MetingJS](https://github.com/metowolf/MetingJS)库实现见面内嵌的响应式音乐播放器,自动识别的音乐平台URL,包括:`netease`、 `tencent`、 `kugou`、 `baidu` 和 `xiami` 平台,也可以支持用户自定义的音乐源。其他相关的参数说明如下: + +| 参数名 | 默认 | 说明 | +| :----: | :------: | :--- | +| **id** | _必选_ | 音乐 ID,即音乐在音乐平台的唯一标识符 | +| **server** | _必选_ | 音乐平台,支持 `netease`、 `tencent`、 `kugou`、 `baidu` 和 `xiami` 平台 | +| **type** | _必选_ | 播放类型,目前支持 `song` 、 `playlist`、 `album`、 `search` 和 `artist` 类型 | +| **auto** | _可选_ | 音乐的地址,仅支持 server 参数中的平台 | +| **theme** | `#448aff` | 播放器的主题色,默认为 `#448aff` | +| **url** | 空 | 自定的音乐源 URL,默认为空 | +| **name** | 空 | 音乐名称,默认为空 | +| **artist** | 空 | 音乐作者,默认为空 | +| **cover** | 空 | 音乐封面 URL,默认为空 | +| **fixed** | `false` | 固定播放器,默认为 `false` | +| **mini** | `false` | 显示小播放器,默认为 `false` | +| **autoplay** | `false` | 自动播放,默认为 `false` | +| **loop** | `all` | 循环播放,支持`all`、`one` 和 `none`,默认为 `all` | +| **order** | `list` | 播放顺序`list` 和 `random`,支持默认为 `list` | +| **volume** | `0.7` | 音量,默认为 `0.7` | +| **mutex** | `true` | 有多个音乐播放时,是否只开启当前播放器,默认为 `true` | +| **list-folded** | `false` | 列表折叠,默认为 `false` | +| **list-max-height** | `340px` | 列表最大高度,默认为:340px | + +### 单曲播放 + +```markdown +{{}} +``` + +{{< music theme="#2980b9" server="tencent" type="song" id="002u4ZTb0CXmJA" mini="true" >}} + +### 列表播放 + +```markdown +{{}} +``` + +{{< music server="netease" type="playlist" id="1982066521" list-max-height="140" >}} + +### 自定义音乐源 + +```markdown +{{}} +``` + +{{< music url="/music/sky.mp3" name="天空之城" artist="宫崎骏" cover="/music/gongqijun.jpg" autoplay="true" >}} diff --git a/exampleSite/content/post/13-hugo-blockquote/index.en-us.md b/exampleSite/content/post/13-hugo-blockquote/index.en-us.md new file mode 100644 index 0000000..02a6976 --- /dev/null +++ b/exampleSite/content/post/13-hugo-blockquote/index.en-us.md @@ -0,0 +1,148 @@ +--- +title: "Support block information emphasis annotation in Markdown documents" +description: "Added rendering of blockquote style in the new version of Hugo framework, supports custom style design, and implements a warning style similar to Github" +keywords: "hugo,block,quote" + +date: 2025-01-29T21:24:02+08:00 +lastmod: 2025-01-29T21:24:02+08:00 + +categories: + - Example + - Grammar +tags: + - blockquote + - Hugo + +url: "demo/hugo-blockquote.html" +toc: true +expired: true +--- + +In the past, the `Hugo NexT` theme used to annotate block information through custom phrases. Recently, it has been discovered that `Hugo` has been updated from [v0.134.0](https://github.com/gohugoio/hugo/releases/tag/v0.134.0). From the beginning of the version, it is possible to support rendering Blockquote styles in Markdown documents through hook mode (which needs to be implemented by oneself), achieving warning style styles similar to Github. So 7 different styles were added to the `Hugo NexT` theme for users to choose from, and they could also customize icons and color configurations. + + + + + +Users can find the positions of the following two configuration items and adjust them according to their preferred style and color: + +```yaml +#Config. yaml or hugo.toml +postAlerts: +info: +icon: "circle-info" +color: "#4A90E2" +note: +icon: "bell" +color: "#17A2B8" +help: +icon: "circle-question" +color: "#967ADC" +error: +icon: "circle-xmark" +color: "#DC3545" +warning: +icon: "triangle-exclamation" +color: "#F39C12" +success: +icon: "circle-check" +color: "#32CD32" +important: +icon: "circle-plus" +color: "#007BFF" +``` + +```yaml +# i18n/zh-cn.yaml +PostAlert: +info : Information +note : Attention +help : 'Help' +error : Error +warning : Warning +success : 'Success' +important: 'Important' +``` + +The writing style and specific implementation effects in the Maarkdown document are as follows: + +## Information prompt + +```markdown +> [!INFO] +> HugoNexT theme supports custom style design, allowing you to achieve personalized design for your own site. +``` + +> [!INFO] +> HugoNexT theme supports custom style design, allowing you to achieve personalized design for your own site. + +## Attention to information + +```markdown +> [!NOTE] +> The latest version of the `Hugo NexT` theme supports Blockquote rendering for Markdown documents, with 7 different styles to choose from or customize. +``` + +> [!NOTE] +> The latest version of the `Hugo NexT` theme supports Blockquote rendering for Markdown documents, with 7 different styles to choose from or customize. + +## Help Information + +```markdown +> [!HELP] +> The HugoNexT theme provides complete example usage instructions and source code, making it easier to get started and use. +``` + +> [!HELP] +> The HugoNexT theme provides complete example usage instructions and source code, making it easier to get started and use. + +## Warning message + +```markdown +> [!WARNING] +> The HugoNexT theme uses SCSS precompilation and requires downloading the official Hugo extended version for use. +``` + +> [!WARNING] +> The HugoNexT theme uses SCSS precompilation and requires downloading the official Hugo extended version for use. + +## Error message + +```markdown +> [!ERROR] +> The `Hugo NexT` theme is only supported in Hugo v0.132.0 and above versions. +``` + +> [!ERROR] +> The `Hugo NexT` theme is only supported in Hugo v0.132.0 and above versions. + +## Success message + +```markdown +> [!SUCCESS] +> Congratulations on successfully deploying the `Hugo NexT` theme. Please feel free to start your creative work. +``` + +> [!SUCCESS] +>Congratulations on successfully deploying the `Hugo NexT` theme. Please feel free to start your creative work. + +## Important information + +```markdown +> [!IMPORTANT] +> The HugoNexT theme supports the use of external CDN services, but please ensure that your network is functioning properly and accessible to CDN services at this time. +``` + +> [!IMPORTANT] +> The HugoNexT theme supports the use of external CDN services, but please ensure that your network is functioning properly and accessible to CDN services at this time. + + +## Custom Title + +```markdown +> [!Info]+Custom Title Description +> The HugoNexT theme provides very open and flexible configurations, allowing users to customize according to their own ideas. +``` + +> [!Info]+Custom Title Description +> The HugoNexT theme provides very open and flexible configurations, allowing users to customize according to their own ideas. \ No newline at end of file diff --git a/exampleSite/content/post/13-hugo-blockquote/index.md b/exampleSite/content/post/13-hugo-blockquote/index.md new file mode 100644 index 0000000..cc1ee62 --- /dev/null +++ b/exampleSite/content/post/13-hugo-blockquote/index.md @@ -0,0 +1,148 @@ +--- +title: "支持在Markdown文档中实现块信息强调标注" +description: "在新版本Hugo框架中添加了对blockquote样式渲染,支持自定义样式设计,实现类似Github的警告风格样式。" +keywords: "hugo,block,quote" + +date: 2025-01-02T16:08:02+08:00 +lastmod: 2025-01-02T19:08:02+08:00 + +categories: + - 示例文章 + - 语法 +tags: + - blockquote + - Hugo + +url: "demo/hugo-blockquote.html" +toc: true +expired: true +--- + +过去 `HugoNexT` 主题都是通过自定义短语来实现块信息的标注,近期发现 `Hugo` 从[v0.134.0](https://github.com/gohugoio/hugo/releases/tag/v0.134.0)版本开始便是可以支持通过hook方式渲染Markdown文档中的Blockquote样式(需要自己实现),实现类似Github的警告风格样式。于是便在 `HugoNexT` 主题中添加7种不同风格供用户可选择使用,还可以自定义图标与颜色配置。 + + + + + +用户可以找到如下两处配置项的位置,然后根据自己喜欢的风格和颜色进行调整: + +```yaml +# config.yaml 或 hugo.toml +postAlerts: + info: + icon: "circle-info" + color: "#4A90E2" + note: + icon: "bell" + color: "#17A2B8" + help: + icon: "circle-question" + color: "#967ADC" + error: + icon: "circle-xmark" + color: "#DC3545" + warning: + icon: "triangle-exclamation" + color: "#F39C12" + success: + icon: "circle-check" + color: "#32CD32" + important: + icon: "circle-plus" + color: "#007BFF" +``` + +```yaml +# i18n/zh-cn.yaml +PostAlert: + info : "信息" + note : "注意" + help : "帮助" + error : "错误" + warning : "警告" + success : "成功" + important: "重要" +``` + +在Maarkdown文档中的写法和实现的具体效果参考如下: + +## 信息提示 + +```markdown +> [!INFO] +> `HugoNexT` 主题支持自定义样式设计,你可实现属于自己站点的个性化设计。 +``` + +> [!INFO] +> `HugoNexT` 主题支持自定义样式设计,你可实现属于自己站点的个性化设计。 + +## 注意信息 + +```markdown +> [!NOTE] +> 最新版本的 `HugoNexT` 主题支持Markdown文档的Blockquote渲染,有7种不同风格可选择使用或自定义配置。 +``` + +> [!NOTE] +> 最新版本的 `HugoNexT` 主题支持Markdown文档的Blockquote渲染,有7种不同风格可选择使用或自定义配置。 + +## 帮助信息 + +```markdown +> [!HELP] +> `HugoNexT` 主题提供了完整的示例使用说明及源代码,上手更为简单易用。 +``` + +> [!HELP] +> `HugoNexT` 主题提供了完整的示例使用说明及源代码,上手更为简单易用。 + +## 警告信息 + +```markdown +> [!WARNING] +> `HugoNexT` 主题使用了SCSS 预编译,需要下载 Hugo 官方 `hugo-extended` 版本使用。 +``` + +> [!WARNING] +> `HugoNexT` 主题使用了SCSS 预编译,需要下载 Hugo 官方 `hugo-extended` 版本使用。 + +## 错误信息 + +```markdown +> [!ERROR] +> `HugoNexT` 主题只支持在 Hugo v0.132.0 及以上版本中使用。 +``` + +> [!ERROR] +> `HugoNexT` 主题只支持在 Hugo v0.132.0 及以上版本中使用。 + +## 成功信息 + +```markdown +> [!SUCCESS] +> 恭喜你已经成功部署 `HugoNexT` 主题,请尽情的开始你的创作吧。 +``` + +> [!SUCCESS] +> 恭喜你已经成功部署 `HugoNexT` 主题,请尽情的开始你的创作吧。 + +## 重要信息 + +```markdown +> [!IMPORTANT] +> `HugoNexT` 主题支持使用外部的CDN服务,但此时请确保你的网络是正常且可访问CDN服务。 +``` + +> [!IMPORTANT] +> `HugoNexT` 主题支持使用外部的CDN服务,但此时请确保你的网络是正常且可访问CDN服务。 + + +## 自定义标题 + +```markdown +> [!Info]+ 自定义标题说明 +> `HugoNexT` 主题提供很开放的灵活配置,用户可按自己的想法改造。 +``` + +> [!Info]+ 自定义标题说明 +> `HugoNexT` 主题提供很开放的灵活配置,用户可按自己的想法改造。 \ No newline at end of file diff --git a/exampleSite/content/post/shortcodes.md b/exampleSite/content/post/shortcodes.md deleted file mode 100644 index b38c569..0000000 --- a/exampleSite/content/post/shortcodes.md +++ /dev/null @@ -1,92 +0,0 @@ ---- -title: "自定义短语示例" -description: "将常用的块引用、标签卡、按钮等信息设置成短代码,便于快速引用" -keywords: "shortcode,短代码" - -date: 2022-08-06T14:41:50+08:00 -lastmod: 2022-08-06T14:41:50+08:00 - -categories: - - 示例文章 - - 语法 -tags: - - 短代码 - - 语法 -url: "demo/shortcodes.html" ---- - -虽然 `Markdown` 语法已经非常丰富能够满足我们写文章的绝大部分需求,但是为更好的对文章内容进行更友好的排版,为引设计一套自定义的短语,便于在使用时能够快速引用。 - - - -## 块引用 - -在引用一些经典名言名句时,可以采用此短语,语法参考如下: - -```markdown -{{}} - ### block quote - 写下你想表达的话语! -{{}} -``` - -实际效果: - -{{< quote >}} - -希望是无所谓有,无所谓无的,这正如地上的路。 - - -其实地上本没有路,走的人多了,也便成了路。 - -**鲁迅** - -{{< /quote >}} - -## 信息块 - -支持 `default`,`info`,`success`,`warning`,`danger` 等五种不同效果的展示,语法参考如下: - -```markdown -{{}} - 书写表达的信息 - 支持 Markdown 语法 -{{}} -``` - -实际效果: - -{{< note default no-icon >}} - ### Default Header without icon - **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) -{{< /note >}} - -{{< note default >}} - ### Default Header - **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) -{{< /note >}} - -{{< note primary >}} - ### Primary Header - **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) -{{< /note >}} - -{{< note info >}} - ### Info Header - **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) -{{< /note >}} - -{{< note success >}} - ### Success Header - **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) -{{< /note >}} - -{{< note warning >}} - ### Warning Header - **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) -{{< /note >}} - -{{< note danger >}} - ### Danger Header - **Welcome** to [Hugo NexT!](https://preview.hugo-next.eu.org) -{{< /note >}} \ No newline at end of file diff --git a/exampleSite/data/flinks/en-us.yaml b/exampleSite/data/flinks/en-us.yaml new file mode 100644 index 0000000..58ec94f --- /dev/null +++ b/exampleSite/data/flinks/en-us.yaml @@ -0,0 +1,37 @@ +# 友情链接 +# Friend's links + +- FLinksTitle: Office Demo Site + FLinksDesc: Example content from the official theme. + FLinksList: + - name: Hugo + desc: The fastest website construction framework in the world! + avatar: https://gohugo.io/favicon-32x32.png + link: https://gohugo.io + timeout: 2 + visible: true + + - name: Hugo-NexT + desc: Hugo NexT Official Site + avatar: https://hugo-next.eu.org/imgs/hugo_next_avatar.png + link: https://hugo-next.eu.org + timeout: 2 + visible: true + + - name: Fanmeng Star Dust Space Station + desc: Even ordinary people have their own dreams! + avatar: https://elkan1788.github.io/imgs/avatar.png + link: https://lisenhui.cn + timeout: 2 + visible: true + + +- FLinksTitle: Hugo NexT Fan Groups + FLinksDesc: Exciting presentation from Hugo NexT theme enthusiasts! + FLinksList: + - name: Ahaji + desc: The first Hugo NexT loyal fan user on the entire network! + avatar: https://a.happy2008.top/imgs/stayhome-small.png + link: https://a.happy2008.top/ + timeout: 2 + visible: true \ No newline at end of file diff --git a/exampleSite/data/flinks.yaml b/exampleSite/data/flinks/zh-cn.yaml similarity index 100% rename from exampleSite/data/flinks.yaml rename to exampleSite/data/flinks/zh-cn.yaml diff --git a/exampleSite/config.yaml b/exampleSite/hugo.yaml similarity index 86% rename from exampleSite/config.yaml rename to exampleSite/hugo.yaml index 2c8805c..8cfc7ba 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/hugo.yaml @@ -23,12 +23,97 @@ theme: hugo-theme-next # Default laguage & code for website defaultContentLanguage: zh-cn languageCode: zh-CN +# 多语言配置 +# Multi-language settings +languages: + zh-cn: + languageCode: zh-CN + languageDirection: ltr + languageName: "简体中文" + weight: 1 + en-us: + languageCode: en-US + languageDirection: ltr + languageName: English + weight: 2 + menus: + main: + - identifier: home + name: Home + pageRef: / + pre: home + weight: 1 + - identifier: about + name: About + pageRef: /about.html + pre: user + weight: 2 + - identifier: flinks + name: Friend's Links + pageRef: /flinks.html + pre: thumbs-up + weight: 3 + - identifier: example + name: Example + pre: angles-down + weight: 4 + - identifier: flow-charts + name: Flow Charts + pageRef: /demo/mermaid-charts.html + weight: 1 + parent: example + - identifier: math + name: Math Formula + pageRef: /demo/math-formula.html + weight: 2 + parent: example + parent: example + - identifier: syntax + name: Syntax Highlighting + pageRef: /demo/syntax-highlighting.html + weight: 3 + parent: example + - identifier: archives + name: Archives + pageRef: /archives + pre: archive + weight: 5 + - identifier: commonweal + name: Commonweal404 + pageRef: /404.html + pre: heartbeat + weight: 6 + params: + yearFormat: "2006" + monthFormat: "01/02" + dateFormat: "2006/01/02" + timeFormat: "2006/01/02 15:04:05 -07:00" + + author: NexT Theme + subtitle: Build for Hugo Theme + description: Keep it simple, keep it powerful. + keywords: Hugo,NexT,theme,simple,powerful + + linksSets: + title: Links + + footer: + beian: + enable: false + + postFooter: + endLineTip: "~ End Line ~" + + rewardSets: + comment: ' How about you buy me a coffee?ヾ(^▽^*)))' + # 是否包含中文,日语,韩文 # Whether contains Chinese, Japanese and Korean hasCJKLanguage: true # 每页显示文章数量 # Display items per page -paginate: 10 +pagination: + pagerSize: 10 # 开启支持表情符号 # Enable Emoji support enableEmoji: true @@ -38,25 +123,15 @@ markup: goldmark: renderer: unsafe: true + # 高亮代码的样式 + # Highlight style of code highlight: - # # 高亮代码的样式名称,可选:monokai | emacs | api | dracula | friendly - # # 更多的样式:https://xyproto.github.io/splash/docs/all.html - # # Highlight style: monokai | emacs | api | dracula | friendly - # # More: https://xyproto.github.io/splash/docs/all.html - # style: "monokai" anchorLineNos: true codeFences: true guessSyntax: true - hl_Lines: "" - hl_inline: false - lineAnchors: "" - lineNoStart: 1 - lineNos: false - lineNumbersInTable: false - noClasses: true - noHl: false - style: monokai - tabWidth: 2 + lineNos: true + lineNumbersInTable: true + noClasses: false tableOfContents: # 开始/结束标题级别:1-6 (建议从2开始) # Heading title level of start or end: 1-6 @@ -126,29 +201,49 @@ menus: main: - identifier: home name: 首页 - pageref: / + pageRef: / pre: home weight: 1 - identifier: about name: 关于 - pageref: /about.html + pageRef: /about.html pre: user weight: 2 - identifier: flinks - name: 站点示例 - pageref: /flinks.html + name: 友情链接 + pageRef: /flinks.html pre: thumbs-up weight: 3 + - identifier: example + name: 语法示例 + pre: angles-down + weight: 4 + - identifier: flow-charts + name: 流程图 + pageRef: /demo/mermaid-charts.html + weight: 1 + parent: example + - identifier: math + name: 数学公式 + pageRef: /demo/math-formula.html + weight: 2 + parent: example + parent: example + - identifier: syntax + name: 语法高亮 + pageRef: /demo/syntax-highlighting.html + weight: 3 + parent: example - identifier: archives name: 归档 - pageref: /archives + pageRef: /archives pre: archive - weight: 4 + weight: 5 - identifier: commonweal name: 公益 404 - url: /404.html + pageRef: /404.html pre: heartbeat - weight: 5 + weight: 6 #----------------------------------------- # Hugo NexT 主题参数配置 @@ -164,7 +259,7 @@ params: yearFormat: "2006" monthFormat: "01-02" dateFormat: "2006-01-02" - timeFormat: "2006-01-02T15:04:05-07:00" + timeFormat: "2006-01-02 15:04:05 -07:00" # 页面模式 # Schemes @@ -199,10 +294,10 @@ params: # 用户自定义文件配置 # Define custom file paths. - # customFilePath: - # sidebar: custom_sidebar.html - # footer: custom_footer.html - # style: /css/custom_style.css + customFilePath: + sidebar: custom_sidebar.html + footer: custom_footer.html + style: /css/custom_style.css # 知识共享国际许可 4.0 # 更多信息: https://creativecommons.org/about/cclicenses/ @@ -385,10 +480,7 @@ params: # 站点底部设置 # Footer Settings # --------------------------------------------------------------- - footer: - # 启动谷歌翻译功能 - # Enable google translate in footer - translate: false + footer: # 站点开始年份,默认为当下时间的年份 # Specify the year when the site was setup. # If not defined, current year will be used. @@ -485,15 +577,46 @@ params: # 是否开启评论数显示 comments: enable: true - # 评论统计插件,暂只支持waline - # Comment counter plugin, only support waline + # 评论统计插件,暂只支持waline和waline3 + # Comment counter plugin, only support waline and waline3 plugin: waline # 是否开启页面访问数显示 views: enable: true - # 页面访问统计插件,支持busuanzi, waline, leancloud - # Page views counter plugin, support: busuanzi, waline, leancloud + # 页面访问统计插件,支持busuanzi, waline, waline3 + # Page views counter plugin, support: busuanzi, waline, waline3 plugin: busuanzi + # 是否开启过期提示 + # Expired tip + expired: false + # 是否开启摘要显示 + # Enable summary + summary: true + + # 文章内容中的提示信息设置 + # Alert settings in post content + postAlerts: + info: + icon: "circle-info" + color: "#4A90E2" + note: + icon: "bell" + color: "#17A2B8" + help: + icon: "circle-question" + color: "#967ADC" + error: + icon: "circle-xmark" + color: "#DC3545" + warning: + icon: "triangle-exclamation" + color: "#F39C12" + success: + icon: "circle-check" + color: "#32CD32" + important: + icon: "circle-plus" + color: "#007BFF" # 文章底部的设置 # Post footer settings @@ -809,7 +932,7 @@ params: # Lazyload all comment systems. # lazyload: false # 设置你要显示的2个评论插件,`weight` 数字越小越靠前 - # `name` 参数名可选值:livere | waline | utterances | artalk | giscus + # `name` 参数名可选值:livere | waline | waline3 | utterances | artalk | giscus # Modify texts or order for any naves, here are some examples. nav: - name: waline @@ -836,6 +959,20 @@ params: reactionText: [ '点赞', '踩一下', '得意', '不屑', '尴尬', '睡觉'] reactionTitle: "你认为这篇文章怎么样?" serverURL: # + # Waline(2) 与 Waline3 无法兼容只能是二选一 + # Waline3 采用的是ES模块开发,需要更高版本的浏览器才能支持,如考虑兼容性建议可优先选用Waline2 + # waline3: + # placeholder: "请文明发言哟 ヾ(≧▽≦*)o" + # sofa: "快来发表你的意见吧 (≧∀≦)ゞ" + # emoji: false + # search: true + # imgUploader: false + # wordLimit: 200 + # requiredMeta: ['nick', 'mail'] + # reaction: true + # reactionText: [ '点赞', '踩一下', '得意', '不屑', '尴尬', '睡觉'] + # reactionTitle: "你认为这篇文章怎么样?" + # serverURL: # # Artalk 评论插件 # 更多配置信息请参考:https://artalk.js.org @@ -921,11 +1058,19 @@ params: id: # color: "#fc6423" - # AddThis文章分享功能 - # 更多信息及配置请参考:https://www.addthis.com - # AddThis Share. - # See: https://www.addthis.com - addThisId: # + # 文章分享功能 + share: + enable: true + # 更多信息与配置,请参考:https://sharethis.com + # For more information and configuration, please refer to:https://sharethis.com + # sharethis: + # id: # + # 简单的在线分享,没有统计数据功能,更多信息可参考:https://www.addtoany.com/ + # Simple online sharing without statistical data function. + # For more information, please refer to: https://www.addtoany.com/ + addtoany: + locale: zh-CN + num_services: 8 # --------------------------------------------------------------- @@ -1052,15 +1197,6 @@ params: # Default height height: 500px - # Mermaid tag - mermaid: - enable: false - # Available themes: default | dark | forest | neutral - theme: - light: default - dark: dark - - # --------------------------------------------------------------- # 动画效果设置 # Animation Settings @@ -1073,11 +1209,10 @@ params: enable: true async: true transition: - # All available transition variants: https://theme-next.js.org/animate/ postBlock: fadeIn postHeader: fadeInDown postBody: fadeInDown - collHeader: fadeInLeft + collHeader: slideInRight # 侧边样效果 只有在 Pisces | Gemini 模式下才支持 # Only for Pisces | Gemini. sidebar: fadeInUp diff --git a/exampleSite/static/music/gongqijun.jpg b/exampleSite/static/music/gongqijun.jpg new file mode 100644 index 0000000..4aa1edc Binary files /dev/null and b/exampleSite/static/music/gongqijun.jpg differ diff --git a/exampleSite/static/music/sky.mp3 b/exampleSite/static/music/sky.mp3 new file mode 100644 index 0000000..489c5f0 Binary files /dev/null and b/exampleSite/static/music/sky.mp3 differ diff --git a/i18n/en.yaml b/i18n/en-us.yaml similarity index 82% rename from i18n/en.yaml rename to i18n/en-us.yaml index f851d87..0851315 100644 --- a/i18n/en.yaml +++ b/i18n/en-us.yaml @@ -71,13 +71,21 @@ PostMeta: tags: Tags more: "Read More" edit: "Edit this post" + expired: + title: "Note" + info: "🕰️ Hey,This article is an aged wine of over # the information may need updating, please check the best before date before reading." + warn: "🚀 Heads up! This article is from # ago and might not keep up with the pace of time. Bring your own time machine for reading, watch out for the time travel!" + summary: + title: Summary -Reward: - title: Donate - wechatpay: WechatPay - alipay: Alipay - paypal: Paypal - bitcoin: Bitcoin +PostAlert: + info : "Info" + note : "Note" + help : "Help" + error : "Error" + warning : "Warning" + success : "Success" + important: "Important" PostCopyRight: title: Post Title @@ -96,6 +104,13 @@ PostFollowMe: PostComments: title: Comments +Reward: + title: Donate + wechatpay: WechatPay + alipay: Alipay + paypal: Paypal + bitcoin: Bitcoin + SiteInfoItems: title: "Web Status" runTimes: "Running:" diff --git a/i18n/fr.yaml b/i18n/fr-fr.yaml similarity index 82% rename from i18n/fr.yaml rename to i18n/fr-fr.yaml index fcd936c..c23bffe 100644 --- a/i18n/fr.yaml +++ b/i18n/fr-fr.yaml @@ -18,7 +18,6 @@ CateTitle: AllSome: other: "Total :{{ .Some }}" - Symbol: colon: ":" comma: "," @@ -71,13 +70,21 @@ PostMeta: tags: Tags more: "Lire la suite" edit: "Editer ce billet" + expired: + title: "Astuce bienveillante" + info: "🕰️ Hey,This article is an aged wine of over # the information may need updating, please check the best before date before reading." + warn: "🚀 Heads up! this article is from # ago and might not keep up with the pace of time. Bring your own time machine for reading, watch out for the time travel!" + summary: + title: Summary -Reward: - title: Donner - wechatpay: WechatPay - alipay: Alipay - paypal: Paypal - bitcoin: Bitcoin +PostAlert: + info : "Info" + note : "Note" + help : "Aide" + error : "Erreur" + warning : "Avertissement" + success : "Succès" + important: "Inportant" PostCopyRight: title: Titre du billet @@ -96,6 +103,13 @@ PostFollowMe: PostComments: title: Commentaires +Reward: + title: Donner + wechatpay: WechatPay + alipay: Alipay + paypal: Paypal + bitcoin: Bitcoin + SiteInfoItems: title: "Statistiques" runTimes: "En cours:" diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index 639a358..cdc328c 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -71,13 +71,21 @@ PostMeta: tags: 标签 more: 阅读全文 edit: 编辑 + expired: + title: "温馨提醒" + info: "🕰️ 嗨,这篇文章已是#前的陈年佳酿,信息可能需要更新,阅读前请检查最佳赏味期限。" + warn: "🚀 注意啦!这篇文章来自#以前,可能已跟不上时代的步伐。阅读时请自备时光机,小心穿越哦!" + summary: + title: 总结摘要 -Reward: - title: 赞赏 - wechatpay: 微信 - alipay: 支付宝 - paypal: Paypal - bitcoin: 比特币 +PostAlert: + info : "信息" + note : "注意" + help : "帮助" + error : "错误" + warning : "警告" + success : "成功" + important: "重要" PostCopyRight: title: 文章标题 @@ -96,6 +104,13 @@ PostFollowMe: PostComments: title: 评论交流 +Reward: + title: 赞赏 + wechatpay: 微信 + alipay: 支付宝 + paypal: Paypal + bitcoin: 比特币 + SiteInfoItems: title: "网站资讯" runTimes: "已运行:" diff --git a/i18n/zh-tw.yaml b/i18n/zh-tw.yaml index 9b62961..7e557dd 100644 --- a/i18n/zh-tw.yaml +++ b/i18n/zh-tw.yaml @@ -71,13 +71,20 @@ PostMeta: tags: 標籤 more: 閱讀全文 edit: 編輯 - -Reward: - title: 讚賞 - wechatpay: 微信 - alipay: 支付寶 - paypal: Paypal - bitcoin: 比特幣 + expired: + title: "温馨提醒" + info: "🕰️ 嗨,这篇文章已是#前的陳年佳釀,資訊可能需要更新,閱讀前請檢查最佳賞味期限。" + warn: "🚀 請注意啦!這篇文章来自#以前,可能已經跟不上時代的腳步了。閱讀時請自備時光機,小心穿越哦!" + summary: + title: 總結摘要 +PostAlert: + info : "信息 " + note : "注意" + help : "幫助" + error : "錯誤" + warning : "警告" + success : "成功" + important: "重要" PostCopyRight: title: 文章標題 @@ -96,6 +103,13 @@ PostFollowMe: PostCommentTitle: other: 評論交流 +Reward: + title: 讚賞 + wechatpay: 微信 + alipay: 支付寶 + paypal: Paypal + bitcoin: 比特幣 + SiteInfoItems: title: "網站資訊" runTimes: "已運行:" diff --git a/layouts/_default/_markup/render-blockquote.html b/layouts/_default/_markup/render-blockquote.html new file mode 100644 index 0000000..f594319 --- /dev/null +++ b/layouts/_default/_markup/render-blockquote.html @@ -0,0 +1,23 @@ +{{ if eq .Type "alert" }} +{{ $postAlert := site.Params.postAlerts }} +{{ $alertCfg := index $postAlert .AlertType }} +
+
+ + + {{ with .AlertTitle }} + {{ . }} + {{ else }} + {{ or (T (printf "PostAlert.%s" .AlertType)) (title .AlertType) }} + {{ end }} + +
+
+ {{ .Text }} +
+
+{{ else }} +
+ {{ .Text }} +
+{{ end }} \ No newline at end of file diff --git a/layouts/_default/_markup/render-codeblock.html b/layouts/_default/_markup/render-codeblock.html new file mode 100644 index 0000000..5e27219 --- /dev/null +++ b/layouts/_default/_markup/render-codeblock.html @@ -0,0 +1,4 @@ +{{ $result := transform.HighlightCodeBlock . }} +{{ $result.Wrapped }} + +{{ .Page.Store.Set "codeblock" true }} \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index b4851e7..be8c974 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -27,7 +27,7 @@ {{ end }} - {{ partial "widgets.html" . }} + {{ partialCached "widgets.html" . }}
{{ block "main" . }}{{ end }} @@ -38,10 +38,11 @@
- + {{ partial "head/config.html" . }} {{ partial "scripts.html" . }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 2559499..4e439c8 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -47,7 +47,7 @@ {{ if not (in $allSecondaryCats $primaryCategory) }}
  • - + {{ $primaryCategory }} {{ $primaryCount }} @@ -62,7 +62,7 @@ {{ end }} {{ end }}
  • - + {{ . }} {{ $secondaryCount }} @@ -82,7 +82,7 @@
    {{ $randNums := (seq 10) }} {{- range $name, $items := $tags }} - {{ .Page.Title }} + {{ .Page.Title }} ({{ len $items }}) diff --git a/layouts/flinks/single.html b/layouts/flinks/single.html index ae897ea..d7916c8 100644 --- a/layouts/flinks/single.html +++ b/layouts/flinks/single.html @@ -5,9 +5,16 @@ {{ define "main" }}
  • ${e}
  • +`}checkbox(e){return"'}paragraph(e){return`

    ${e}

    +`}table(e,t){return` + +`+e+` +`+(t=t&&`${t}`)+`
    +`}tablerow(e){return` +${e} +`}tablecell(e,t){var n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+` +`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return"
    "}del(e){return`${e}`}link(e,t,n){var r=Ns(e);if(null===r)return n;let i='
    "}image(e,t,n){var r=Ns(e);if(null===r)return n;let i=`${n}{e=c[e].flat(1/0);r=r.concat(this.walkTokens(e,t))}):c.tokens&&(r=r.concat(this.walkTokens(c.tokens,t)))}}return r}use(...e){const w=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{const t={...e};if(t.async=this.defaults.async||t.async||!1,e.extensions&&(e.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){const r=w.renderers[n.name];r?w.renderers[n.name]=function(...e){let t=n.renderer.apply(this,e);return t=!1===t?r.apply(this,e):t}:w.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");const e=w[n.level];e?e.unshift(n.tokenizer):w[n.level]=[n.tokenizer],n.start&&("block"===n.level?w.startBlock?w.startBlock.push(n.start):w.startBlock=[n.start]:"inline"===n.level&&(w.startInline?w.startInline.push(n.start):w.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(w.childTokens[n.name]=n.childTokens)}),t.extensions=w),e.renderer){const n=this.defaults.renderer||new gi(this.defaults);for(const r in e.renderer){if(!(r in n))throw new Error(`renderer '${r}' does not exist`);if("options"!==r){const i=r,l=e.renderer[i],o=n[i];n[i]=(...e)=>{let t=l.apply(n,e);return(t=!1===t?o.apply(n,e):t)||""}}}t.renderer=n}if(e.tokenizer){const s=this.defaults.tokenizer||new fi(this.defaults);for(const a in e.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(!["options","rules","lexer"].includes(a)){const c=a,u=e.tokenizer[c],p=s[c];s[c]=(...e)=>{let t=u.apply(s,e);return t=!1===t?p.apply(s,e):t}}}t.tokenizer=s}if(e.hooks){const d=this.defaults.hooks||new wn;for(const h in e.hooks){if(!(h in d))throw new Error(`hook '${h}' does not exist`);if("options"!==h){const f=h,g=e.hooks[f],m=d[f];wn.passThroughHooks.has(h)?d[f]=e=>{if(this.defaults.async)return Promise.resolve(g.call(d,e)).then(e=>m.call(d,e));e=g.call(d,e);return m.call(d,e)}:d[f]=(...e)=>{let t=g.apply(d,e);return t=!1===t?m.apply(d,e):t}}}t.hooks=d}if(e.walkTokens){const v=this.defaults.walkTokens,y=e.walkTokens;t.walkTokens=function(e){let t=[];return t.push(y.call(this,e)),t=v?t.concat(v.call(this,e)):t}}this.defaults={...this.defaults,...t}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return it.lex(e,t??this.defaults)}parser(e,t){return rt.parse(e,t??this.defaults)}}xn=new WeakSet,kr=function(l,o){return(n,e)=>{const t={...e},r={...this.defaults,...t},i=(!0===this.defaults.async&&!1===t.async&&(r.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),r.async=!0),En(this,bi,wl).call(this,!!r.silent,!!r.async));if("u"l(e,r)).then(e=>r.hooks?r.hooks.processAllTokens(e):e).then(e=>r.walkTokens?Promise.all(this.walkTokens(e,r.walkTokens)).then(()=>e):e).then(e=>o(e,r)).then(e=>r.hooks?r.hooks.postprocess(e):e).catch(i);try{r.hooks&&(n=r.hooks.preprocess(n));let e=l(n,r),t=(r.hooks&&(e=r.hooks.processAllTokens(e)),r.walkTokens&&this.walkTokens(e,r.walkTokens),o(e,r));return t=r.hooks?r.hooks.postprocess(t):t}catch(e){return i(e)}}},bi=new WeakSet,wl=function(n,r){return e=>{var t;if(e.message+=` +Please report this to https://github.com/markedjs/marked.`,n)return t="

    An error occurred:

    "+$e(e.message+"",!0)+"
    ",r?Promise.resolve(t):t;if(r)return Promise.reject(e);throw e}};const Tt=new Js;function ue(e,t){return Tt.parse(e,t)}function gf(r){if((r="function"==typeof r?{highlight:r}:r)&&"function"==typeof r.highlight)return"string"!=typeof r.langPrefix&&(r.langPrefix="language-"),{async:!!r.async,walkTokens(e){if("code"===e.type){var t=Ys(e.lang);if(r.async)return Promise.resolve(r.highlight(e.text,t,e.lang||"")).then(Xs(e));t=r.highlight(e.text,t,e.lang||"");if(t instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");Xs(e)(t)}},renderer:{code(e,t,n){t=Ys(t),t=t?` class="${r.langPrefix}${il(t)}"`:"";return e=e.replace(/\n$/,""),`
    ${n?e:il(e,!0)}
    +
    `}}};throw new Error("Must provide highlight function")}function Ys(e){return(e||"").match(/\S*/)[0]}function Xs(t){return e=>{"string"==typeof e&&e!==t.text&&(t.escaped=!0,t.text=e)}}ue.options=ue.setOptions=function(e){return Tt.setOptions(e),ue.defaults=Tt.defaults,zs(ue.defaults),ue},ue.getDefaults=hr,ue.defaults=Rt,ue.use=function(...e){return Tt.use(...e),ue.defaults=Tt.defaults,zs(ue.defaults),ue},ue.walkTokens=function(e,t){return Tt.walkTokens(e,t)},ue.parseInline=Tt.parseInline,ue.Parser=rt,ue.parser=rt.parse,ue.Renderer=gi,ue.TextRenderer=yr,ue.Lexer=it,ue.lexer=it.lex,ue.Tokenizer=fi,ue.Hooks=wn,ue.parse=ue;const el=/[&<>"']/,mf=new RegExp(el.source,"g"),tl=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,vf=new RegExp(tl.source,"g"),wf={"&":"&","<":"<",">":">",'"':""","'":"'"},nl=e=>wf[e];function il(e,t){if(t){if(el.test(e))return e.replace(mf,nl)}else if(tl.test(e))return e.replace(vf,nl);return e}const bf=/\$.*?\$/,yf=/^\$(.*?)\$/,_f=/^(?:\s{0,3})\$\$((?:[^\n]|\n[^\n])+?)\n{0,1}\$\$/,kf=t=>[{name:"blockMath",level:"block",tokenizer(e){e=_f.exec(e);if(null!==e)return{type:"html",raw:e[0],text:t(!0,e[1])}}},{name:"inlineMath",level:"inline",start(e){var t=e.search(bf);return-1!==t?t:e.length},tokenizer(e){e=yf.exec(e);if(null!==e)return{type:"html",raw:e[0],text:t(!1,e[1])}}}],rl=(e="",n={})=>e.replace(/:(.+?):/g,(e,t)=>n[t]?`${t}`:e),xf=(e,{emojiMap:t,highlighter:n,texRenderer:r})=>{const i=new Js;return i.setOptions({breaks:!0}),n&&i.use(gf({highlight:n})),r&&(n=kf(r),i.use({extensions:n})),i.parse(rl(e,t))},_r=e=>{e=e.dataset.path;return null!=e&&e.length?e:null},Cf=e=>e.match(/[\w\d\s,.\u00C0-\u024F\u0400-\u04FF]+/giu),Ef=e=>e.match(/[\u4E00-\u9FD5]/gu),Sf=e=>{var t;return((null==(t=Cf(e))?void 0:t.reduce((e,t)=>e+(["",",","."].includes(t.trim())?0:t.trim().split(/\s+/u).length),0))??0)+((null==(t=Ef(e))?void 0:t.length)??0)},If=async()=>{if(!navigator)return"";const e=navigator["userAgentData"];let t=navigator.userAgent;if(!e||"Windows"!==e.platform)return t;const n=(await e.getHighEntropyValues(["platformVersion"]))["platformVersion"];return t=n&&13<=parseInt(n.split(".")[0])?t.replace("Windows NT 10.0","Windows NT 11.0"):t},ol=({serverURL:e,path:t=window.location.pathname,selector:n=".waline-comment-count",lang:r=navigator.language})=>{const i=new AbortController,l=document.querySelectorAll(n);return l.length&&Lr({serverURL:Rn(e),paths:Array.from(l).map(e=>Gr(_r(e)??t)),lang:r,signal:i.signal}).then(n=>{l.forEach((e,t)=>{e.innerText=n[t].toString()})}).catch(Os),i.abort.bind(i)},Rf=({size:e})=>Y("svg",{class:"wl-close-icon",viewBox:"0 0 1024 1024",width:e,height:e},[Y("path",{d:"M697.173 85.333h-369.92c-144.64 0-241.92 101.547-241.92 252.587v348.587c0 150.613 97.28 252.16 241.92 252.16h369.92c144.64 0 241.494-101.547 241.494-252.16V337.92c0-151.04-96.854-252.587-241.494-252.587z",fill:"currentColor"}),Y("path",{d:"m640.683 587.52-75.947-75.861 75.904-75.862a37.29 37.29 0 0 0 0-52.778 37.205 37.205 0 0 0-52.779 0l-75.946 75.818-75.862-75.946a37.419 37.419 0 0 0-52.821 0 37.419 37.419 0 0 0 0 52.821l75.947 75.947-75.776 75.733a37.29 37.29 0 1 0 52.778 52.821l75.776-75.776 75.947 75.947a37.376 37.376 0 0 0 52.779-52.821z",fill:"#888"})]),Tf=()=>Y("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},Y("path",{d:"m341.013 394.667 27.755 393.45h271.83l27.733-393.45h64.106l-28.01 397.952a64 64 0 0 1-63.83 59.498H368.768a64 64 0 0 1-63.83-59.52l-28.053-397.93h64.128zm139.307 19.818v298.667h-64V414.485h64zm117.013 0v298.667h-64V414.485h64zM181.333 288h640v64h-640v-64zm453.483-106.667v64h-256v-64h256z",fill:"red"})),Lf=()=>Y("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},Y("path",{d:"M563.2 463.3 677 540c1.7 1.2 3.7 1.8 5.8 1.8.7 0 1.4-.1 2-.2 2.7-.5 5.1-2.1 6.6-4.4l25.3-37.8c1.5-2.3 2.1-5.1 1.6-7.8s-2.1-5.1-4.4-6.6l-73.6-49.1 73.6-49.1c2.3-1.5 3.9-3.9 4.4-6.6.5-2.7 0-5.5-1.6-7.8l-25.3-37.8a10.1 10.1 0 0 0-6.6-4.4c-.7-.1-1.3-.2-2-.2-2.1 0-4.1.6-5.8 1.8l-113.8 76.6c-9.2 6.2-14.7 16.4-14.7 27.5.1 11 5.5 21.3 14.7 27.4zM387 348.8h-45.5c-5.7 0-10.4 4.7-10.4 10.4v153.3c0 5.7 4.7 10.4 10.4 10.4H387c5.7 0 10.4-4.7 10.4-10.4V359.2c0-5.7-4.7-10.4-10.4-10.4zm333.8 241.3-41-20a10.3 10.3 0 0 0-8.1-.5c-2.6.9-4.8 2.9-5.9 5.4-30.1 64.9-93.1 109.1-164.4 115.2-5.7.5-9.9 5.5-9.5 11.2l3.9 45.5c.5 5.3 5 9.5 10.3 9.5h.9c94.8-8 178.5-66.5 218.6-152.7 2.4-5 .3-11.2-4.8-13.6zm186-186.1c-11.9-42-30.5-81.4-55.2-117.1-24.1-34.9-53.5-65.6-87.5-91.2-33.9-25.6-71.5-45.5-111.6-59.2-41.2-14-84.1-21.1-127.8-21.1h-1.2c-75.4 0-148.8 21.4-212.5 61.7-63.7 40.3-114.3 97.6-146.5 165.8-32.2 68.1-44.3 143.6-35.1 218.4 9.3 74.8 39.4 145 87.3 203.3.1.2.3.3.4.5l36.2 38.4c1.1 1.2 2.5 2.1 3.9 2.6 73.3 66.7 168.2 103.5 267.5 103.5 73.3 0 145.2-20.3 207.7-58.7 37.3-22.9 70.3-51.5 98.1-85 27.1-32.7 48.7-69.5 64.2-109.1 15.5-39.7 24.4-81.3 26.6-123.8 2.4-43.6-2.5-87-14.5-129zm-60.5 181.1c-8.3 37-22.8 72-43 104-19.7 31.1-44.3 58.6-73.1 81.7-28.8 23.1-61 41-95.7 53.4-35.6 12.7-72.9 19.1-110.9 19.1-82.6 0-161.7-30.6-222.8-86.2l-34.1-35.8c-23.9-29.3-42.4-62.2-55.1-97.7-12.4-34.7-18.8-71-19.2-107.9-.4-36.9 5.4-73.3 17.1-108.2 12-35.8 30-69.2 53.4-99.1 31.7-40.4 71.1-72 117.2-94.1 44.5-21.3 94-32.6 143.4-32.6 49.3 0 97 10.8 141.8 32 34.3 16.3 65.3 38.1 92 64.8 26.1 26 47.5 56 63.6 89.2 16.2 33.2 26.6 68.5 31 105.1 4.6 37.5 2.7 75.3-5.6 112.3z",fill:"currentColor"})),Af=()=>Y("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[Y("path",{d:"M784 112H240c-88 0-160 72-160 160v480c0 88 72 160 160 160h544c88 0 160-72 160-160V272c0-88-72-160-160-160zm96 640c0 52.8-43.2 96-96 96H240c-52.8 0-96-43.2-96-96V272c0-52.8 43.2-96 96-96h544c52.8 0 96 43.2 96 96v480z",fill:"currentColor"}),Y("path",{d:"M352 480c52.8 0 96-43.2 96-96s-43.2-96-96-96-96 43.2-96 96 43.2 96 96 96zm0-128c17.6 0 32 14.4 32 32s-14.4 32-32 32-32-14.4-32-32 14.4-32 32-32zm462.4 379.2-3.2-3.2-177.6-177.6c-25.6-25.6-65.6-25.6-91.2 0l-80 80-36.8-36.8c-25.6-25.6-65.6-25.6-91.2 0L200 728c-4.8 6.4-8 14.4-8 24 0 17.6 14.4 32 32 32 9.6 0 16-3.2 22.4-9.6L380.8 640l134.4 134.4c6.4 6.4 14.4 9.6 24 9.6 17.6 0 32-14.4 32-32 0-9.6-4.8-17.6-9.6-24l-52.8-52.8 80-80L769.6 776c6.4 4.8 12.8 8 20.8 8 17.6 0 32-14.4 32-32 0-8-3.2-16-8-20.8z",fill:"currentColor"})]),Mf=({active:e=!1})=>Y("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[Y("path",{d:"M850.654 323.804c-11.042-25.625-26.862-48.532-46.885-68.225-20.022-19.61-43.258-34.936-69.213-45.73-26.78-11.124-55.124-16.727-84.375-16.727-40.622 0-80.256 11.123-114.698 32.135A214.79 214.79 0 0 0 512 241.819a214.79 214.79 0 0 0-23.483-16.562c-34.442-21.012-74.076-32.135-114.698-32.135-29.25 0-57.595 5.603-84.375 16.727-25.872 10.711-49.19 26.12-69.213 45.73-20.105 19.693-35.843 42.6-46.885 68.225-11.453 26.615-17.303 54.877-17.303 83.963 0 27.439 5.603 56.03 16.727 85.117 9.31 24.307 22.659 49.52 39.715 74.981 27.027 40.293 64.188 82.316 110.33 124.915 76.465 70.615 152.189 119.394 155.402 121.371l19.528 12.525c8.652 5.52 19.776 5.52 28.427 0l19.529-12.525c3.213-2.06 78.854-50.756 155.401-121.371 46.143-42.6 83.304-84.622 110.33-124.915 17.057-25.46 30.487-50.674 39.716-74.981 11.124-29.087 16.727-57.678 16.727-85.117.082-29.086-5.768-57.348-17.221-83.963z"+(e?"":"M512 761.5S218.665 573.55 218.665 407.767c0-83.963 69.461-152.023 155.154-152.023 60.233 0 112.473 33.618 138.181 82.727 25.708-49.109 77.948-82.727 138.18-82.727 85.694 0 155.155 68.06 155.155 152.023C805.335 573.551 512 761.5 512 761.5z"),fill:e?"red":"currentColor"})]),$f=()=>Y("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[Y("path",{d:"M710.816 654.301c70.323-96.639 61.084-230.578-23.705-314.843-46.098-46.098-107.183-71.109-172.28-71.109-65.008 0-126.092 25.444-172.28 71.109-45.227 46.098-70.756 107.183-70.756 172.106 0 64.923 25.444 126.007 71.194 172.106 46.099 46.098 107.184 71.109 172.28 71.109 51.414 0 100.648-16.212 142.824-47.404l126.53 126.006c7.058 7.06 16.297 10.979 26.406 10.979 10.105 0 19.343-3.919 26.402-10.979 14.467-14.467 14.467-38.172 0-52.723L710.816 654.301zm-315.107-23.265c-65.88-65.88-65.88-172.54 0-238.42 32.069-32.07 74.245-49.149 119.471-49.149 45.227 0 87.407 17.603 119.472 49.149 65.88 65.879 65.88 172.539 0 238.42-63.612 63.178-175.242 63.178-238.943 0zm0 0",fill:"currentColor"}),Y("path",{d:"M703.319 121.603H321.03c-109.8 0-199.469 89.146-199.469 199.38v382.034c0 109.796 89.236 199.38 199.469 199.38h207.397c20.653 0 37.384-16.645 37.384-37.299 0-20.649-16.731-37.296-37.384-37.296H321.03c-68.582 0-124.352-55.77-124.352-124.267V321.421c0-68.496 55.77-124.267 124.352-124.267h382.289c68.582 0 124.352 55.771 124.352 124.267V524.72c0 20.654 16.736 37.299 37.385 37.299 20.654 0 37.384-16.645 37.384-37.299V320.549c-.085-109.8-89.321-198.946-199.121-198.946zm0 0",fill:"currentColor"})]),Of=()=>Y("svg",{width:"16",height:"16",ariaHidden:"true"},Y("path",{d:"M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z",fill:"currentColor"})),jf=()=>Y("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},Y("path",{d:"M810.667 213.333a64 64 0 0 1 64 64V704a64 64 0 0 1-64 64H478.336l-146.645 96.107a21.333 21.333 0 0 1-33.024-17.856V768h-85.334a64 64 0 0 1-64-64V277.333a64 64 0 0 1 64-64h597.334zm0 64H213.333V704h149.334v63.296L459.243 704h351.424V277.333zm-271.36 213.334v64h-176.64v-64h176.64zm122.026-128v64H362.667v-64h298.666z",fill:"currentColor"})),zf=()=>Y("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},Y("path",{d:"M813.039 318.772L480.53 651.278H360.718V531.463L693.227 198.961C697.904 194.284 704.027 192 710.157 192C716.302 192 722.436 194.284 727.114 198.961L813.039 284.88C817.72 289.561 820 295.684 820 301.825C820 307.95 817.72 314.093 813.039 318.772ZM710.172 261.888L420.624 551.431V591.376H460.561L750.109 301.825L710.172 261.888ZM490.517 291.845H240.906V771.09H720.156V521.479C720.156 504.947 733.559 491.529 750.109 491.529C766.653 491.529 780.063 504.947 780.063 521.479V791.059C780.063 813.118 762.18 831 740.125 831H220.937C198.882 831 181 813.118 181 791.059V271.872C181 249.817 198.882 231.935 220.937 231.935H490.517C507.06 231.935 520.47 245.352 520.47 261.888C520.47 278.424 507.06 291.845 490.517 291.845Z",fill:"currentColor"})),Pf=()=>Y("svg",{class:"verified-icon",viewBox:"0 0 1024 1024",width:"14",height:"14"},Y("path",{d:"m894.4 461.56-54.4-63.2c-10.4-12-18.8-34.4-18.8-50.4v-68c0-42.4-34.8-77.2-77.2-77.2h-68c-15.6 0-38.4-8.4-50.4-18.8l-63.2-54.4c-27.6-23.6-72.8-23.6-100.8 0l-62.8 54.8c-12 10-34.8 18.4-50.4 18.4h-69.2c-42.4 0-77.2 34.8-77.2 77.2v68.4c0 15.6-8.4 38-18.4 50l-54 63.6c-23.2 27.6-23.2 72.4 0 100l54 63.6c10 12 18.4 34.4 18.4 50v68.4c0 42.4 34.8 77.2 77.2 77.2h69.2c15.6 0 38.4 8.4 50.4 18.8l63.2 54.4c27.6 23.6 72.8 23.6 100.8 0l63.2-54.4c12-10.4 34.4-18.8 50.4-18.8h68c42.4 0 77.2-34.8 77.2-77.2v-68c0-15.6 8.4-38.4 18.8-50.4l54.4-63.2c23.2-27.6 23.2-73.2-.4-100.8zm-216-25.2-193.2 193.2a30 30 0 0 1-42.4 0l-96.8-96.8a30.16 30.16 0 0 1 0-42.4c11.6-11.6 30.8-11.6 42.4 0l75.6 75.6 172-172c11.6-11.6 30.8-11.6 42.4 0 11.6 11.6 11.6 30.8 0 42.4z",fill:"#27ae60"})),mi=({size:e=100})=>Y("svg",{width:e,height:e,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},Y("circle",{cx:50,cy:50,fill:"none",stroke:"currentColor",strokeWidth:"4",r:"40","stroke-dasharray":"85 30"},Y("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1"}))),Ff=()=>Y("svg",{width:24,height:24,fill:"currentcolor",viewBox:"0 0 24 24"},[Y("path",{style:"transform: translateY(0.5px)",d:"M18.968 10.5H15.968V11.484H17.984V12.984H15.968V15H14.468V9H18.968V10.5V10.5ZM8.984 9C9.26533 9 9.49967 9.09367 9.687 9.281C9.87433 9.46833 9.968 9.70267 9.968 9.984V10.5H6.499V13.5H8.468V12H9.968V14.016C9.968 14.2973 9.87433 14.5317 9.687 14.719C9.49967 14.9063 9.26533 15 8.984 15H5.984C5.70267 15 5.46833 14.9063 5.281 14.719C5.09367 14.5317 5 14.2973 5 14.016V9.985C5 9.70367 5.09367 9.46933 5.281 9.282C5.46833 9.09467 5.70267 9.001 5.984 9.001H8.984V9ZM11.468 9H12.968V15H11.468V9V9Z"}),Y("path",{d:"M18.5 3H5.75C3.6875 3 2 4.6875 2 6.75V18C2 20.0625 3.6875 21.75 5.75 21.75H18.5C20.5625 21.75 22.25 20.0625 22.25 18V6.75C22.25 4.6875 20.5625 3 18.5 3ZM20.75 18C20.75 19.2375 19.7375 20.25 18.5 20.25H5.75C4.5125 20.25 3.5 19.2375 3.5 18V6.75C3.5 5.5125 4.5125 4.5 5.75 4.5H18.5C19.7375 4.5 20.75 5.5125 20.75 6.75V18Z"})]),Uf=()=>Dt("WALINE_USER_META",{nick:"",mail:"",link:""}),Nf=()=>Dt("WALINE_COMMENT_BOX_EDITOR",""),Hf="WALINE_LIKE";let sl=null;const ll=()=>sl=sl??Dt(Hf,[]),Df="WALINE_REACTION";let al=null;const Vf=()=>al=al??Dt(Df,{});var gt,vi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},cl={},Vt={},bn={},Bf=vi&&vi.__awaiter||function(e,o,s,a){return new(s=s||Promise)(function(n,t){function r(e){try{l(a.next(e))}catch(e){t(e)}}function i(e){try{l(a.throw(e))}catch(e){t(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}l((a=a.apply(e,o||[])).next())})},Wf=vi&&vi.__generator||function(r,i){var l,o,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(n){return function(e){var t=[n,e];if(l)throw new TypeError("Generator is already executing.");for(;a;)try{if(l=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]{const n=fl[e]??(fl[e]=cl.load(e,{useRecaptchaNet:!0,autoHideBadge:!0}));return{execute:t=>n.then(e=>e.execute(t))}},Zf=r=>({execute:async t=>{const e=Iu("https://challenges.cloudflare.com/turnstile/v0/api.js",void 0,{async:!1})["load"],n=(await e(),null==window?void 0:window.turnstile);return new Promise(e=>{null!=n&&n.ready(()=>{null!=n&&n.render(".wl-captcha-container",{sitekey:r,action:t,size:"compact",callback:e})})})}}),Qf="WALINE_USER";let dl=null;const wi=()=>dl=dl??Dt(Qf,{});var Jf=rn({__name:"ArticleReaction",setup(e,{expose:t}){t();const l=Vf(),o=Zn("config"),s=W(-1),a=W([]),r=we(()=>o.value.locale),c=we(()=>0{const{reaction:e,path:n}=o.value;return e.map((e,t)=>({icon:e,desc:r.value["reaction"+t],active:l.value[n]===t}))});let u;const i=async()=>{if(c.value){const{serverURL:e,lang:t,path:n,reaction:r}=o.value,i=new AbortController,l=(u=i.abort.bind(i),await ki({serverURL:e,lang:t,paths:[n],type:r.map((e,t)=>"reaction"+t),signal:i.signal}));a.value=r.map((e,t)=>l[0]["reaction"+t])}};on(()=>{je(()=>[o.value.serverURL,o.value.path],()=>{i()},{immediate:!0})}),Qi(()=>null==u?void 0:u());t={reactionStorage:l,config:o,votingIndex:s,voteNumbers:a,locale:r,isReactionEnabled:c,reactionsInfo:n,get abort(){return u},set abort(e){u=e},fetchReaction:i,vote:async e=>{var t,n,r,i;-1===s.value&&({serverURL:t,lang:n,path:r}=o.value,i=l.value[r],s.value=e,void 0!==i&&(await Sn({serverURL:t,lang:n,path:r,type:"reaction"+i,action:"desc"}),a.value[i]=Math.max(a.value[i]-1,0)),i!==e&&(await Sn({serverURL:t,lang:n,path:r,type:"reaction"+e}),a.value[e]=(a.value[e]||0)+1),i===e?delete l.value[r]:l.value[r]=e,s.value=-1)},get LoadingIcon(){return mi}};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}}),yn=(e,t)=>{const n=e.__vccOpts||e;for(var[r,i]of t)n[r]=i;return n};const Yf={key:0,class:"wl-reaction"},Xf=["textContent"],ed={class:"wl-reaction-list"},td=["onClick"],nd={class:"wl-reaction-img"},id=["src","alt"],rd=["textContent"],od=["textContent"];function sd(e,t,n,i,r,l){return i.reactionsInfo.length?(S(),L("div",Yf,[M("div",{class:"wl-reaction-title",textContent:Q(i.locale.reactionTitle)},null,8,Xf),M("ul",ed,[(S(!0),L(oe,null,ze(i.reactionsInfo,({active:e,icon:t,desc:n},r)=>(S(),L("li",{key:r,class:pe(["wl-reaction-item",{active:e}]),onClick:e=>i.vote(r)},[M("div",nd,[M("img",{src:t,alt:n},null,8,id),i.votingIndex===r?(S(),Xe(i.LoadingIcon,{key:0,class:"wl-reaction-loading"})):(S(),L("div",{key:1,class:"wl-reaction-votes",textContent:Q(i.voteNumbers[r]||0)},null,8,rd))]),M("div",{class:"wl-reaction-text",textContent:Q(n)},null,8,od)],10,td))),128))])])):Z("v-if",!0)}var ld=yn(Jf,[["render",sd],["__file","ArticleReaction.vue"]]),_n=new Map;function ad(e){e=_n.get(e);e&&e.destroy()}function cd(e){e=_n.get(e);e&&e.update()}var kn=null,hl=("u"parseFloat(s.maxHeight)?("hidden"===s.overflowY&&(l.style.overflow="scroll"),e=parseFloat(s.maxHeight)):"hidden"!==s.overflowY&&(l.style.overflow="hidden"),l.style.height=e+"px",n&&(l.style.textAlign=n),t&&t(),o!==e&&(l.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),o=e),r===s.overflow||n)||(t=s.textAlign,"hidden"===s.overflow&&(l.style.textAlign="start"===t?"end":"start"),i({restoreTextAlign:t,testForHeightReduction:!0}))}function n(){i({testForHeightReduction:!0,restoreTextAlign:null})}var l,t,o,s,r,a;(l=e)&&l.nodeName&&"TEXTAREA"===l.nodeName&&!_n.has(l)&&(o=null,s=window.getComputedStyle(l),t=l.value,r=function(){i({testForHeightReduction:""===t||!l.value.startsWith(t),restoreTextAlign:null}),t=l.value},a=function(t){l.removeEventListener("autosize:destroy",a),l.removeEventListener("autosize:update",n),l.removeEventListener("input",r),window.removeEventListener("resize",n),Object.keys(t).forEach(function(e){return l.style[e]=t[e]}),_n.delete(l)}.bind(l,{height:l.style.height,resize:l.style.resize,textAlign:l.style.textAlign,overflowY:l.style.overflowY,overflowX:l.style.overflowX,wordWrap:l.style.wordWrap}),l.addEventListener("autosize:destroy",a),l.addEventListener("autosize:update",n),l.addEventListener("input",r),window.addEventListener("resize",n),l.style.overflowX="hidden",l.style.wordWrap="break-word",_n.set(l,{destroy:a,update:n}),n())}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],ad),e},kn.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],cd),e}),kn),ud=rn({__name:"ImageWall",props:{items:{default:()=>[]},columnWidth:{default:300},gap:{default:0}},emits:["insert"],setup(e,{expose:t}){const n=e;t();let r=null;const i=W(null),l=W({}),o=W([]),s=()=>{var e=Math.floor((i.value.getBoundingClientRect().width+n.gap)/(n.columnWidth+n.gap));return 0new Array(e).fill(null).map(()=>[]),c=async e=>{var t;e>=n.items.length||(await Ut(),t=Array.from((null==(t=i.value)?void 0:t.children)??[]).reduce((e,t)=>t.getBoundingClientRect().height{o.value.length===s()&&!e||(o.value=a(s()),e=window.scrollY,await c(0),window.scrollTo({top:e}))};on(()=>{u(!0),(r=new ResizeObserver(()=>{u()})).observe(i.value),je(()=>[n.items],()=>{l.value={},u(!0)}),je(()=>[n.columnWidth,n.gap],()=>{u()})}),Ja(()=>r.unobserve(i.value));e={props:n,get resizeObserver(){return r},set resizeObserver(e){r=e},wall:i,state:l,columns:o,getColumnCount:s,createColumns:a,fillColumns:c,redraw:u,imageLoad:e=>{l.value[e.target.src]=!0},get LoadingIcon(){return mi}};return Object.defineProperty(e,"__isScriptSetup",{enumerable:!1,value:!0}),e}});const fd=["data-index"],dd=["src","title","onClick"];function hd(n,e,r,i,t,l){return S(),L("div",{ref:"wall",class:"wl-gallery",style:Zt({gap:r.gap+"px"})},[(S(!0),L(oe,null,ze(i.columns,(e,t)=>(S(),L("div",{key:t,class:"wl-gallery-column","data-index":t,style:Zt({gap:r.gap+"px"})},[(S(!0),L(oe,null,ze(e,t=>(S(),L(oe,{key:t},[i.state[r.items[t].src]?Z("v-if",!0):(S(),Xe(i.LoadingIcon,{key:0,size:36,style:{margin:"20px auto"}})),M("img",{class:"wl-gallery-item",src:r.items[t].src,title:r.items[t].title,loading:"lazy",onLoad:i.imageLoad,onClick:e=>n.$emit("insert",`![](${r.items[t].src})`)},null,40,dd)],64))),128))],12,fd))),128))],4)}var pd=yn(ud,[["render",hd],["__file","ImageWall.vue"]]),gd=rn({__name:"CommentBox",props:{edit:{default:null},rootId:{default:""},replyId:{default:""},replyUser:{default:""}},emits:["log","cancelEdit","cancelReply","submit"],setup(e,{expose:t,emit:n}){t();const f=e,g=n,m=Zn("config"),v=Nf(),y=Uf(),w=wi(),b=W({}),k=W(null),r=W(null),i=W(null),l=W(null),o=W(null),s=W(null),a=W(null),x=W({tabs:[],map:{}}),c=W(0),u=W(!1),p=W(!1),O=W(!1),_=W(""),S=W(0),d=Qt({loading:!0,list:[]}),h=W(0),C=W(!1),L=W(""),R=W(!1),I=W(!1),E=we(()=>m.value.locale),P=we(()=>{var e;return!(null==(e=w.value)||!e.token)}),A=we(()=>!1!==m.value.imageUploader),$=e=>{const t=k.value,n=t.selectionStart,r=t.selectionEnd||0,i=t.scrollTop;v.value=t.value.substring(0,n)+e+t.value.substring(r,t.value.length),t.focus(),t.selectionStart=n+e.length,t.selectionEnd=n+e.length,t.scrollTop=i},M=t=>{const n=`![${m.value.locale.uploading} ${t.name}]()`;return $(n),R.value=!0,Promise.resolve().then(()=>m.value.imageUploader(t)).then(e=>{v.value=v.value.replace(n,`\r +![${t.name}](${e})`)}).catch(e=>{alert(e.message),v.value=v.value.replace(n,"")}).then(()=>{R.value=!1})},T=async()=>{var e,t,n;const{serverURL:r,lang:i,login:l,wordLimit:o,requiredMeta:s,recaptchaV3Key:a,turnstileKey:c}=m.value,u=await If(),p={comment:L.value,nick:y.value.nick,mail:y.value.mail,link:y.value.link,url:m.value.path,ua:u};if(!f.edit)if(null!=(e=w.value)&&e.token)p.nick=w.value.display_name,p.mail=w.value.email,p.link=w.value.url;else{if("force"===l)return;if(-1{var t;null!=(t=i.value)&&t.contains(e.target)||null!=(t=l.value)&&t.contains(e.target)||(u.value=!1),null!=(t=o.value)&&t.contains(e.target)||null!=(t=s.value)&&t.contains(e.target)||(p.value=!1)},j=async e=>{var t;const{scrollTop:n,clientHeight:r,scrollHeight:i}=e.target,l=(r+n)/i,o=m.value.search,s=(null==(t=a.value)?void 0:t.value)??"";l<.9||d.loading||I.value||(d.loading=!0,(o.more&&d.list.length?await o.more(s,d.list.length):await o.search(s)).length?d.list=[...d.list,...o.more&&d.list.length?await o.more(s,d.list.length):await o.search(s)]:I.value=!0,d.loading=!1,setTimeout(()=>{e.target.scrollTop=n},50))},N=pu(e=>{d.list=[],I.value=!1,j(e)},300);je([m,S],([e,t])=>{e=e.wordLimit;e?te[1]?(h.value=e[1],C.value=!1):(h.value=e[1],C.value=!0):(h.value=0,C.value=!0)},{immediate:!0}),li("click",z),li("message",({data:e})=>{e&&"profile"===e.type&&(w.value={...w.value,...e.data},[localStorage,sessionStorage].filter(e=>e.getItem("WALINE_USER")).forEach(e=>e.setItem("WALINE_USER",JSON.stringify(w))))}),je(p,async e=>{if(e){const t=m.value.search;a.value&&(a.value.value=""),d.loading=!0,d.list=await((null==(e=t.default)?void 0:e.call(t))??t.search("")),d.loading=!1}}),on(()=>{var e;null!=(e=f.edit)&&e.objectId&&(v.value=f.edit.orig),je(()=>v.value,e=>{var{highlighter:t,texRenderer:n}=m.value;L.value=e,_.value=xf(e,{emojiMap:x.value.map,highlighter:t,texRenderer:n}),S.value=Sf(e),e?hl(k.value):hl.destroy(k.value)},{immediate:!0}),je(()=>m.value.emoji,e=>Mu(e).then(e=>{x.value=e}),{immediate:!0})});t={props:f,emit:g,config:m,editor:v,userMeta:y,userInfo:w,inputRefs:b,editorRef:k,imageUploadRef:r,emojiButtonRef:i,emojiPopupRef:l,gifButtonRef:o,gifPopupRef:s,gifSearchInputRef:a,emoji:x,emojiTabIndex:c,showEmoji:u,showGif:p,showPreview:O,previewText:_,wordNumber:S,searchResults:d,wordLimit:h,isWordNumberLegal:C,content:L,isSubmitting:R,isImageListEnd:I,locale:E,isLogin:P,canUploadImage:A,insert:$,onKeyDown:e=>{var t=e.key;(e.ctrlKey||e.metaKey)&&"Enter"===t&&T()},uploadImage:M,onDrop:e=>{var t;null!=(t=e.dataTransfer)&&t.items&&(t=js(e.dataTransfer.items))&&A.value&&(M(t),e.preventDefault())},onPaste:e=>{e.clipboardData&&(e=js(e.clipboardData.items))&&A.value&&M(e)},onChange:()=>{const e=r.value;e.files&&A.value&&M(e.files[0]).then(()=>{e.value=""})},submitComment:T,onLogin:e=>{e.preventDefault();var{lang:e,serverURL:t}=m.value;Ar({serverURL:t,lang:e}).then(e=>{((w.value=e).remember?localStorage:sessionStorage).setItem("WALINE_USER",JSON.stringify(e)),g("log")})},onLogout:()=>{w.value={},localStorage.setItem("WALINE_USER","null"),sessionStorage.setItem("WALINE_USER","null"),g("log")},onProfile:e=>{e.preventDefault();const{lang:t,serverURL:n}=m.value,r=(window.innerWidth-800)/2,i=(window.innerHeight-800)/2,l=new URLSearchParams({lng:t,token:w.value.token}),o=window.open(n+"/ui/profile?"+l.toString(),"_blank",`width=800,height=800,left=${r},top=${i},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);null!=o&&o.postMessage({type:"TOKEN",data:w.value.token},"*")},popupHandler:z,onImageWallScroll:j,onGifSearch:N,get CloseIcon(){return Rf},get EmojiIcon(){return Lf},get GifIcon(){return Ff},get ImageIcon(){return Af},get LoadingIcon(){return mi},get MarkdownIcon(){return Of},get PreviewIcon(){return $f},ImageWall:pd};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}});const md={key:0,class:"wl-login-info"},vd={class:"wl-avatar"},wd=["title"],bd=["title"],yd=["src"],_d=["title","textContent"],kd={class:"wl-panel"},xd=["for","textContent"],Cd=["id","onUpdate:modelValue","name","type"],Ed=["placeholder"],Sd={class:"wl-preview"},Id=M("hr",null,null,-1),Rd=["innerHTML"],Td={class:"wl-footer"},Ld={class:"wl-actions"},Ad={href:"https://guides.github.com/features/mastering-markdown/",title:"Markdown Guide","aria-label":"Markdown is supported",class:"wl-action",target:"_blank",rel:"noopener noreferrer"},Md=["title"],$d=["title"],Od=["title"],jd=["title"],zd={class:"wl-info"},Pd=M("div",{class:"wl-captcha-container"},null,-1),Fd={class:"wl-text-number"},Ud={key:0},Nd=["textContent"],Hd=["textContent"],Dd=["disabled"],Vd=["placeholder"],Bd={key:1,class:"wl-loading"},Wd={key:0,class:"wl-tab-wrapper"},qd=["title","onClick"],Kd=["src","alt"],Gd={key:0,class:"wl-tabs"},Zd=["onClick"],Qd=["src","alt","title"],Jd=["title"];function Yd(e,t,n,r,i,l){var o;return S(),L("div",{key:r.userInfo.token,class:"wl-comment"},["disable"===r.config.login||!r.isLogin||null!=(o=n.edit)&&o.objectId?Z("v-if",!0):(S(),L("div",md,[M("div",vd,[M("button",{type:"submit",class:"wl-logout-btn",title:r.locale.logout,onClick:r.onLogout},[ie(r.CloseIcon,{size:14})],8,wd),M("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:r.locale.profile,onClick:r.onProfile},[M("img",{src:r.userInfo.avatar,alt:"avatar"},null,8,yd)],8,bd)]),M("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:r.locale.profile,onClick:r.onProfile,textContent:Q(r.userInfo.display_name)},null,8,_d)])),M("div",kd,["force"!==r.config.login&&r.config.meta.length&&!r.isLogin?(S(),L("div",{key:0,class:pe(["wl-header","item"+r.config.meta.length])},[(S(!0),L(oe,null,ze(r.config.meta,t=>(S(),L("div",{key:t,class:"wl-header-item"},[M("label",{for:"wl-"+t,textContent:Q(r.locale[t]+(r.config.requiredMeta.includes(t)||!r.config.requiredMeta.length?"":`(${r.locale.optional})`))},null,8,xd),qn(M("input",{id:"wl-"+t,ref_for:!0,ref:e=>{e&&(r.inputRefs[t]=e)},"onUpdate:modelValue":e=>r.userMeta[t]=e,class:pe(["wl-input","wl-"+t]),name:t,type:"mail"===t?"email":"text"},null,10,Cd),[[iu,r.userMeta[t]]])]))),128))],2)):Z("v-if",!0),qn(M("textarea",{id:"wl-edit",ref:"editorRef","onUpdate:modelValue":t[0]||(t[0]=e=>r.editor=e),class:"wl-editor",placeholder:n.replyUser?"@"+n.replyUser:r.locale.placeholder,onKeydown:r.onKeyDown,onDrop:r.onDrop,onPaste:r.onPaste},null,40,Ed),[[ur,r.editor]]),qn(M("div",Sd,[Id,M("h4",null,Q(r.locale.preview)+":",1),M("div",{class:"wl-content",innerHTML:r.previewText},null,8,Rd)],512),[[ms,r.showPreview]]),M("div",Td,[M("div",Ld,[M("a",Ad,[ie(r.MarkdownIcon)]),qn(M("button",{ref:"emojiButtonRef",type:"button",class:pe(["wl-action",{active:r.showEmoji}]),title:r.locale.emoji,onClick:t[1]||(t[1]=e=>r.showEmoji=!r.showEmoji)},[ie(r.EmojiIcon)],10,Md),[[ms,r.emoji.tabs.length]]),r.config.search?(S(),L("button",{key:0,ref:"gifButtonRef",type:"button",class:pe(["wl-action",{active:r.showGif}]),title:r.locale.gif,onClick:t[2]||(t[2]=e=>r.showGif=!r.showGif)},[ie(r.GifIcon)],10,$d)):Z("v-if",!0),M("input",{id:"wl-image-upload",ref:"imageUploadRef",class:"upload",type:"file",accept:".png,.jpg,.jpeg,.webp,.bmp,.gif",onChange:r.onChange},null,544),r.canUploadImage?(S(),L("label",{key:1,for:"wl-image-upload",class:"wl-action",title:r.locale.uploadImage},[ie(r.ImageIcon)],8,Od)):Z("v-if",!0),M("button",{type:"button",class:pe(["wl-action",{active:r.showPreview}]),title:r.locale.preview,onClick:t[3]||(t[3]=e=>r.showPreview=!r.showPreview)},[ie(r.PreviewIcon)],10,jd)]),M("div",zd,[Pd,M("div",Fd,[et(Q(r.wordNumber)+" ",1),r.config.wordLimit?(S(),L("span",Ud,[et("  /  "),M("span",{class:pe({illegal:!r.isWordNumberLegal}),textContent:Q(r.wordLimit)},null,10,Nd)])):Z("v-if",!0),et("  "+Q(r.locale.word),1)]),"disable"===r.config.login||r.isLogin?Z("v-if",!0):(S(),L("button",{key:0,type:"button",class:"wl-btn",onClick:r.onLogin,textContent:Q(r.locale.login)},null,8,Hd)),"force"!==r.config.login||r.isLogin?(S(),L("button",{key:1,type:"submit",class:"primary wl-btn",title:"Cmd|Ctrl + Enter",disabled:r.isSubmitting,onClick:r.submitComment},[r.isSubmitting?(S(),Xe(r.LoadingIcon,{key:0,size:16})):(S(),L(oe,{key:1},[et(Q(r.locale.submit),1)],64))],8,Dd)):Z("v-if",!0)]),M("div",{ref:"gifPopupRef",class:pe(["wl-gif-popup",{display:r.showGif}])},[M("input",{ref:"gifSearchInputRef",type:"text",placeholder:r.locale.gifSearchPlaceholder,onInput:t[4]||(t[4]=(...e)=>r.onGifSearch&&r.onGifSearch(...e))},null,40,Vd),r.searchResults.list.length?(S(),Xe(r.ImageWall,{key:0,items:r.searchResults.list,"column-width":200,gap:6,onInsert:t[5]||(t[5]=e=>r.insert(e)),onScroll:r.onImageWallScroll},null,8,["items"])):Z("v-if",!0),r.searchResults.loading?(S(),L("div",Bd,[ie(r.LoadingIcon,{size:30})])):Z("v-if",!0)],2),M("div",{ref:"emojiPopupRef",class:pe(["wl-emoji-popup",{display:r.showEmoji}])},[(S(!0),L(oe,null,ze(r.emoji.tabs,(e,t)=>(S(),L(oe,{key:e.name},[t===r.emojiTabIndex?(S(),L("div",Wd,[(S(!0),L(oe,null,ze(e.items,t=>(S(),L("button",{key:t,type:"button",title:t,onClick:e=>r.insert(`:${t}:`)},[r.showEmoji?(S(),L("img",{key:0,class:"wl-emoji",src:r.emoji.map[t],alt:t,loading:"lazy",referrerPolicy:"no-referrer"},null,8,Kd)):Z("v-if",!0)],8,qd))),128))])):Z("v-if",!0)],64))),128)),1(S(),L("button",{key:e.name,type:"button",class:pe(["wl-tab",{active:r.emojiTabIndex===t}]),onClick:e=>r.emojiTabIndex=t},[M("img",{class:"wl-emoji",src:e.icon,alt:e.name,title:e.name,loading:"lazy",referrerPolicy:"no-referrer"},null,8,Qd)],10,Zd))),128))])):Z("v-if",!0)],2)])]),n.replyId||null!=(o=n.edit)&&o.objectId?(S(),L("button",{key:1,type:"button",class:"wl-close",title:r.locale.cancelReply,onClick:t[6]||(t[6]=e=>n.replyId?r.emit("cancelReply"):r.emit("cancelEdit"))},[ie(r.CloseIcon,{size:24})],8,Jd)):Z("v-if",!0)])}var pl=yn(gd,[["render",Yd],["__file","CommentBox.vue"]]),Xd=rn({__name:"CommentCard",props:{comment:{},edit:{default:null},rootId:{},reply:{default:null}},emits:["log","submit","delete","edit","like","status","sticky","reply"],setup(e,{expose:t,emit:n}){t();const r=e,i=n,l=Zn("config"),o=ll(),s=Su(),a=wi(),c=we(()=>l.value.locale),u=we(()=>{var e=r.comment["link"];return e?Qr(e)?e:"https://"+e:""}),p=we(()=>o.value.includes(r.comment.objectId)),d=we(()=>Hl(new Date(r.comment.time),s.value,c.value)),h=we(()=>"administrator"===a.value.type),f=we(()=>r.comment.user_id&&a.value.objectId===r.comment.user_id),g=we(()=>{var e;return r.comment.objectId===(null==(e=r.reply)?void 0:e.objectId)}),m=we(()=>{var e;return r.comment.objectId===(null==(e=r.edit)?void 0:e.objectId)}),v={props:r,emit:i,commentStatus:["approved","waiting","spam"],config:l,likes:o,now:s,userInfo:a,locale:c,link:u,like:p,time:d,isAdmin:h,isOwner:f,isReplyingCurrent:g,isEditingCurrent:m,CommentBox:pl,get DeleteIcon(){return Tf},get EditIcon(){return zf},get LikeIcon(){return Mf},get ReplyIcon(){return jf},get VerifiedIcon(){return Pf}};return Object.defineProperty(v,"__isScriptSetup",{enumerable:!1,value:!0}),v}});const eh=["id"],th={class:"wl-user","aria-hidden":"true"},nh=["src"],ih={class:"wl-card"},rh={class:"wl-head"},oh=["href"],sh={key:1,class:"wl-nick"},lh=["textContent"],ah=["textContent"],ch=["textContent"],uh=["textContent"],fh=["textContent"],dh={class:"wl-comment-actions"},hh=["title"],ph=["title"],gh={class:"wl-meta","aria-hidden":"true"},mh=["data-value","textContent"],vh={key:0,class:"wl-content"},wh={key:0},bh=["href"],yh=M("span",null,": ",-1),_h=["innerHTML"],kh={key:1,class:"wl-admin-actions"},xh={class:"wl-comment-status"},Ch=["disabled","onClick","textContent"],Eh={key:3,class:"wl-quote"};function Sh(e,t,n,r,i,l){var o;const s=Da("CommentCard",!0);return S(),L("div",{id:n.comment.objectId,class:"wl-card-item"},[M("div",th,[n.comment.avatar?(S(),L("img",{key:0,class:"wl-user-avatar",src:n.comment.avatar},null,8,nh)):Z("v-if",!0),n.comment.type?(S(),Xe(r.VerifiedIcon,{key:1})):Z("v-if",!0)]),M("div",ih,[M("div",rh,[r.link?(S(),L("a",{key:0,class:"wl-nick",href:r.link,target:"_blank",rel:"nofollow noopener noreferrer"},Q(n.comment.nick),9,oh)):(S(),L("span",sh,Q(n.comment.nick),1)),"administrator"===n.comment.type?(S(),L("span",{key:2,class:"wl-badge",textContent:Q(r.locale.admin)},null,8,lh)):Z("v-if",!0),n.comment.label?(S(),L("span",{key:3,class:"wl-badge",textContent:Q(n.comment.label)},null,8,ah)):Z("v-if",!0),n.comment.sticky?(S(),L("span",{key:4,class:"wl-badge",textContent:Q(r.locale.sticky)},null,8,ch)):Z("v-if",!0),"number"==typeof n.comment.level?(S(),L("span",{key:5,class:pe("wl-badge level"+n.comment.level),textContent:Q(r.locale["level"+n.comment.level]||"Level "+n.comment.level)},null,10,uh)):Z("v-if",!0),M("span",{class:"wl-time",textContent:Q(r.time)},null,8,fh),M("div",dh,[r.isAdmin||r.isOwner?(S(),L(oe,{key:0},[M("button",{type:"button",class:"wl-edit",onClick:t[0]||(t[0]=e=>r.emit("edit",n.comment))},[ie(r.EditIcon)]),M("button",{type:"button",class:"wl-delete",onClick:t[1]||(t[1]=e=>r.emit("delete",n.comment))},[ie(r.DeleteIcon)])],64)):Z("v-if",!0),M("button",{type:"button",class:"wl-like",title:r.like?r.locale.cancelLike:r.locale.like,onClick:t[2]||(t[2]=e=>r.emit("like",n.comment))},[ie(r.LikeIcon,{active:r.like},null,8,["active"]),et(" "+Q("like"in n.comment?n.comment.like:""),1)],8,hh),M("button",{type:"button",class:pe(["wl-reply",{active:r.isReplyingCurrent}]),title:r.isReplyingCurrent?r.locale.cancelReply:r.locale.reply,onClick:t[3]||(t[3]=e=>r.emit("reply",r.isReplyingCurrent?null:n.comment))},[ie(r.ReplyIcon)],10,ph)])]),M("div",gh,[(S(),L(oe,null,ze(["addr","browser","os"],e=>(S(),L(oe,null,[n.comment[e]?(S(),L("span",{key:e,class:pe("wl-"+e),"data-value":n.comment[e],textContent:Q(n.comment[e])},null,10,mh)):Z("v-if",!0)],64))),64))]),r.isEditingCurrent?Z("v-if",!0):(S(),L("div",vh,[n.comment.reply_user?(S(),L("p",wh,[M("a",{href:"#"+n.comment.pid},"@"+Q(n.comment.reply_user.nick),9,bh),yh])):Z("v-if",!0),M("div",{innerHTML:n.comment.comment},null,8,_h)])),r.isAdmin&&!r.isEditingCurrent?(S(),L("div",kh,[M("span",xh,[(S(),L(oe,null,ze(r.commentStatus,t=>M("button",{key:t,type:"submit",class:pe("wl-btn wl-"+t),disabled:n.comment.status===t,onClick:e=>r.emit("status",{status:t,comment:n.comment}),textContent:Q(r.locale[t])},null,10,Ch)),64))]),!r.isAdmin||"rid"in n.comment?Z("v-if",!0):(S(),L("button",{key:0,type:"submit",class:"wl-btn wl-sticky",onClick:t[4]||(t[4]=e=>r.emit("sticky",n.comment))},Q(n.comment.sticky?r.locale.unsticky:r.locale.sticky),1))])):Z("v-if",!0),r.isReplyingCurrent||r.isEditingCurrent?(S(),L("div",{key:2,class:pe({"wl-reply-wrapper":r.isReplyingCurrent,"wl-edit-wrapper":r.isEditingCurrent})},[ie(r.CommentBox,{edit:n.edit,"reply-id":null==(o=n.reply)?void 0:o.objectId,"reply-user":n.comment.nick,"root-id":n.rootId,onLog:t[5]||(t[5]=e=>r.emit("log")),onCancelReply:t[6]||(t[6]=e=>r.emit("reply",null)),onCancelEdit:t[7]||(t[7]=e=>r.emit("edit",null)),onSubmit:t[8]||(t[8]=e=>r.emit("submit",e))},null,8,["edit","reply-id","reply-user","root-id"])],2)):Z("v-if",!0),"children"in n.comment?(S(),L("div",Eh,[(S(!0),L(oe,null,ze(n.comment.children,e=>(S(),Xe(s,{key:e.objectId,comment:e,reply:n.reply,edit:n.edit,"root-id":n.rootId,onLog:t[9]||(t[9]=e=>r.emit("log")),onDelete:t[10]||(t[10]=e=>r.emit("delete",e)),onEdit:t[11]||(t[11]=e=>r.emit("edit",e)),onLike:t[12]||(t[12]=e=>r.emit("like",e)),onReply:t[13]||(t[13]=e=>r.emit("reply",e)),onStatus:t[14]||(t[14]=e=>r.emit("status",e)),onSticky:t[15]||(t[15]=e=>r.emit("sticky",e)),onSubmit:t[16]||(t[16]=e=>r.emit("submit",e))},null,8,["comment","reply","edit","root-id"]))),128))])):Z("v-if",!0)])],8,eh)}var Ih=yn(Xd,[["render",Sh],["__file","CommentCard.vue"]]);const gl="3.3.0";var Rh=rn({__name:"WalineComment",props:["serverURL","path","meta","requiredMeta","dark","commentSorting","lang","locale","pageSize","wordLimit","emoji","login","highlighter","texRenderer","imageUploader","search","copyright","recaptchaV3Key","turnstileKey","reaction"],setup(e,{expose:t}){t();const n=e,o={latest:"insertedAt_desc",oldest:"insertedAt_asc",hottest:"like_desc"},r=Object.keys(o),s=wi(),a=ll(),c=W("loading"),u=W(0),p=W(1),d=W(0),h=we(()=>Fl(n)),f=W(h.value.commentSorting),g=W([]),i=W(null),l=W(null),m=we(()=>Ul(h.value.dark)),v=we(()=>h.value.locale);Tu(m,{id:"waline-darkmode"});let y;const w=t=>{var e;const{serverURL:n,path:r,pageSize:i}=h.value,l=new AbortController;c.value="loading",null!=y&&y(),Ir({serverURL:n,lang:h.value.lang,path:r,pageSize:i,sortBy:o[f.value],page:t,signal:l.signal,token:null==(e=s.value)?void 0:e.token}).then(e=>{c.value="success",u.value=e.count,g.value.push(...e.data),p.value=t,d.value=e.totalPages}).catch(e=>{"AbortError"!==e.name&&(console.error(e.message),c.value="error")}),y=l.abort.bind(l)},b=()=>{u.value=0,g.value=[],w(1)};oc("config",h),on(()=>{je(()=>[n.serverURL,n.path],()=>b(),{immediate:!0})}),Qi(()=>null==y?void 0:y());t={props:n,sortKeyMap:o,sortingMethods:r,userInfo:s,likeStorage:a,status:c,count:u,page:p,totalPages:d,config:h,commentSortingRef:f,data:g,reply:i,edit:l,darkmodeStyle:m,i18n:v,get abort(){return y},set abort(e){y=e},getCommentData:w,loadMore:()=>w(p.value+1),refresh:b,onSortByChange:e=>{f.value!==e&&(f.value=e,b())},onReply:e=>{i.value=e},onEdit:e=>{l.value=e},onSubmit:t=>{if(l.value)l.value.comment=t.comment,l.value.orig=t.orig;else if("rid"in t){const e=g.value.find(({objectId:e})=>e===t.rid);e&&(Array.isArray(e.children)||(e.children=[]),e.children.push(t))}else g.value.unshift(t),u.value+=1},onStatusChange:async({comment:e,status:t})=>{var n,r;e.status!==t&&({serverURL:n,lang:r}=h.value,await qt({serverURL:n,lang:r,token:null==(n=s.value)?void 0:n.token,objectId:e.objectId,comment:{status:t}}),e.status=t)},onSticky:async e=>{var t,n;"rid"in e||({serverURL:t,lang:n}=h.value,await qt({serverURL:t,lang:n,token:null==(t=s.value)?void 0:t.token,objectId:e.objectId,comment:{sticky:e.sticky?0:1}}),e.sticky=!e.sticky)},onDelete:async({objectId:i})=>{var e,t;confirm("Are you sure you want to delete this comment?")&&({serverURL:e,lang:t}=h.value,await Tr({serverURL:e,lang:t,token:null==(e=s.value)?void 0:e.token,objectId:i}),g.value.some((t,r)=>t.objectId===i?(g.value=g.value.filter((e,t)=>t!==r),!0):t.children.some((e,n)=>e.objectId===i&&(g.value[r].children=t.children.filter((e,t)=>t!==n),!0))))},onLike:async e=>{var t;const{serverURL:n,lang:r}=h.value,i=e["objectId"],l=a.value.includes(i);await qt({serverURL:n,lang:r,objectId:i,token:null==(t=s.value)?void 0:t.token,comment:{like:!l}}),l?a.value=a.value.filter(e=>e!==i):(a.value=[...a.value,i],50(S(),L("li",{key:t,class:pe([t===r.commentSortingRef?"active":""]),onClick:e=>r.onSortByChange(t)},Q(r.i18n[t]),11,Oh))),128))])]),M("div",jh,[(S(!0),L(oe,null,ze(r.data,e=>(S(),Xe(r.CommentCard,{key:e.objectId,"root-id":e.objectId,comment:e,reply:r.reply,edit:r.edit,onLog:r.refresh,onReply:r.onReply,onEdit:r.onEdit,onSubmit:r.onSubmit,onStatus:r.onStatusChange,onDelete:r.onDelete,onSticky:r.onSticky,onLike:r.onLike},null,8,["root-id","comment","reply","edit"]))),128))]),"error"===r.status?(S(),L("div",zh,[M("button",{type:"button",class:"wl-btn",onClick:r.refresh,textContent:Q(r.i18n.refresh)},null,8,Ph)])):"loading"===r.status?(S(),L("div",Fh,[ie(r.LoadingIcon,{size:30})])):r.data.length?r.page{e.forEach((e,t)=>{const n=r[t].time;"number"==typeof n&&(e.innerText=n.toString())})},vl=({serverURL:e,path:n=window.location.pathname,selector:t=".waline-pageview-count",update:r=!0,lang:i=navigator.language})=>{const l=new AbortController,o=Array.from(document.querySelectorAll(t)),s=e=>{e=_r(e);return null!==e&&n!==e},a=t=>Mr({serverURL:Rn(e),paths:t.map(e=>_r(e)??n),lang:i,signal:l.signal}).then(e=>ml(e,t)).catch(Os);if(r){const c=o.filter(e=>!s(e)),u=o.filter(s);$r({serverURL:Rn(e),path:n,lang:i}).then(e=>ml(e,c)),u.length&&a(u)}else a(o);return l.abort.bind(l)},qh=({el:e="#waline",path:t=window.location.pathname,comment:n=!1,pageview:r=!1,...i})=>{var l=e?dr(e):null;if(e&&!l)throw new Error("Option 'el' do not match any domElement!");if(!i.serverURL)throw new Error("Option 'serverURL' is missing!");const o=Qt({...i}),s=Qt({comment:n,pageview:r,path:t}),a=l?lu(()=>Y(Wh,{path:s.path,...o})):null,c=(a&&a.mount(l),No(()=>{s.comment&&ol({serverURL:o.serverURL,path:s.path,...$t(s.comment)?{selector:s.comment}:{}})})),u=No(()=>{s.pageview&&vl({serverURL:o.serverURL,path:s.path,...$t(s.pageview)?{selector:s.pageview}:{}})});return{el:l,update:({comment:e,pageview:t,path:n=window.location.pathname,...r}={})=>{Object.entries(r).forEach(([e,t])=>{o[e]=t}),s.path=n,void 0!==e&&(s.comment=e),void 0!==t&&(s.pageview=t)},destroy:()=>{null!=a&&a.unmount(),c(),u()}}},Kh=({el:e,serverURL:t,count:n,lang:r=navigator.language})=>{const i=wi(),l=dr(e),o=new AbortController;return Or({serverURL:t,count:n,lang:r,signal:o.signal,token:null==(e=i.value)?void 0:e.token}).then(e=>l&&e.length?(l.innerHTML=`
    `,{comments:e,destroy:()=>{o.abort(),l.innerHTML=""}}):{comments:e,destroy:()=>o.abort()})},Gh=({el:e,serverURL:t,count:n,locale:r,lang:i=navigator.language,mode:l="list"})=>{const o=dr(e),s=new AbortController;return jr({serverURL:t,pageSize:n,lang:i,signal:s.signal}).then(e=>o&&e.length?(r={...qr(i),..."object"==typeof r?r:{}},o.innerHTML=``,{users:e,destroy:()=>{s.abort(),o.innerHTML=""}}):{users:e,destroy:()=>s.abort()})};export{Kh as RecentComments,Gh as UserList,Rr as addComment,ol as commentCount,In as defaultLocales,Tr as deleteComment,Lr as fetchCommentCount,ki as getArticleCounter,Ir as getComment,Mr as getPageview,Or as getRecentComment,jr as getUserList,qh as init,Ar as login,vl as pageviewCount,Sn as updateArticleCounter,qt as updateComment,$r as updatePageview,gl as version}; \ No newline at end of file diff --git a/static/js/3rd/waline/3.3.0/waline.umd.min.js b/static/js/3rd/waline/3.3.0/waline.umd.min.js new file mode 100644 index 0000000..147ddb1 --- /dev/null +++ b/static/js/3rd/waline/3.3.0/waline.umd.min.js @@ -0,0 +1,56 @@ +var Wh=Object.defineProperty,qh=(e,t,n)=>t in e?Wh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ne=(e,t,n)=>(qh(e,"symbol"!=typeof t?t+"":t,n),n),Kh=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},xr=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},_i=(e,t,n)=>(Kh(e,t,"access private method"),n);!function(e,t){"object"==typeof exports&&typeof module<"u"?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=typeof globalThis<"u"?globalThis:e||self).Waline={})}(this,function(e){"use strict";var i,x,L,R;const I={"Content-Type":"application/json"},A=e=>e.replace(/\/?$/,"/")+"api/",$=(e,t="")=>{if("object"==typeof e&&e.errno)throw new TypeError(`${t} failed with ${e.errno}: `+e.errmsg);return e},M=({serverURL:e,lang:t,paths:n,type:r,signal:l})=>fetch(`${A(e)}article?path=${encodeURIComponent(n.join(","))}&type=${encodeURIComponent(r.join(","))}&lang=`+t,{signal:l}).then(e=>e.json()).then(e=>$(e,"Get counter").data),P=({serverURL:e,lang:t,path:n,type:r,action:l})=>fetch(A(e)+"article?lang="+t,{method:"POST",headers:I,body:JSON.stringify({path:n,type:r,action:l})}).then(e=>e.json()).then(e=>$(e,"Update counter").data),U=({serverURL:e,lang:t,path:n,page:r,pageSize:l,sortBy:i,signal:o,token:s})=>{const a={};return s&&(a.Authorization="Bearer "+s),fetch(`${A(e)}comment?path=${encodeURIComponent(n)}&pageSize=${l}&page=${r}&lang=${t}&sortBy=`+i,{signal:o,headers:a}).then(e=>e.json()).then(e=>$(e,"Get comment data").data)},V=({serverURL:e,lang:t,token:n,comment:r})=>{const l={"Content-Type":"application/json"};return n&&(l.Authorization="Bearer "+n),fetch(A(e)+"comment?lang="+t,{method:"POST",headers:l,body:JSON.stringify(r)}).then(e=>e.json())},D=({serverURL:e,lang:t,token:n,objectId:r})=>fetch(A(e)+`comment/${r}?lang=`+t,{method:"DELETE",headers:{Authorization:"Bearer "+n}}).then(e=>e.json()).then(e=>$(e,"Delete comment")),H=({serverURL:e,lang:t,token:n,objectId:r,comment:l})=>fetch(A(e)+`comment/${r}?lang=`+t,{method:"PUT",headers:{...I,Authorization:"Bearer "+n},body:JSON.stringify(l)}).then(e=>e.json()).then(e=>$(e,"Update comment")),B=({serverURL:e,lang:t,paths:n,signal:r})=>fetch(`${A(e)}comment?type=count&url=${encodeURIComponent(n.join(","))}&lang=`+t,{signal:r}).then(e=>e.json()).then(e=>$(e,"Get comment count").data),W=({lang:e,serverURL:t})=>{const n=(window.innerWidth-450)/2,r=(window.innerHeight-450)/2,l=window.open(t.replace(/\/$/,"")+"/ui/login?lng="+encodeURIComponent(e),"_blank",`width=450,height=450,left=${n},top=${r},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);return null!=l&&l.postMessage({type:"TOKEN",data:null},"*"),new Promise(t=>{const n=({data:e})=>{e&&"object"==typeof e&&"userInfo"===e.type&&e.data.token&&(null!=l&&l.close(),window.removeEventListener("message",n),t(e.data))};window.addEventListener("message",n)})},q=({serverURL:e,lang:t,paths:n,signal:r})=>M({serverURL:e,lang:t,paths:n,type:["time"],signal:r}),G=e=>P({...e,type:"time",action:"inc"}),Z=({serverURL:e,lang:t,count:n,signal:r,token:l})=>{const i={};return l&&(i.Authorization="Bearer "+l),fetch(A(e)+`comment?type=recent&count=${n}&lang=`+t,{signal:r,headers:i}).then(e=>e.json())},K=({serverURL:e,signal:t,pageSize:n,lang:r})=>fetch(A(e)+`user?pageSize=${n}&lang=`+r,{signal:t}).then(e=>e.json()).then(e=>$(e,"user list")).then(e=>e.data),Q=["nick","mail","link"],ne=e=>e.filter(e=>Q.includes(e)),re=["//unpkg.com/@waline/emojis@1.1.0/weibo"],le=["//unpkg.com/@waline/emojis/tieba/tieba_agree.png","//unpkg.com/@waline/emojis/tieba/tieba_look_down.png","//unpkg.com/@waline/emojis/tieba/tieba_sunglasses.png","//unpkg.com/@waline/emojis/tieba/tieba_pick_nose.png","//unpkg.com/@waline/emojis/tieba/tieba_awkward.png","//unpkg.com/@waline/emojis/tieba/tieba_sleep.png"],ie=r=>new Promise((t,e)=>{if(128e3{var e;return t((null==(e=n.result)?void 0:e.toString())??"")},n.onerror=e}),oe=e=>!0===e?'

    TeX is not available in preview

    ':'TeX is not available in preview',se=new RegExp(`(${/[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/.source}|${/{let l=0;return e.replace(se,(e,t,n)=>{if(n)return`${n}`;if("<"===t)return"<";let r;ce[t]?r=ce[t]:(r=ae[l],ce[t]=r);n=`${t}`;return l=++l%ae.length,n})},pe=["nick","nickError","mail","mailError","link","optional","placeholder","sofa","submit","like","cancelLike","reply","cancelReply","comment","refresh","more","preview","emoji","uploadImage","seconds","minutes","hours","days","now","uploading","login","logout","admin","sticky","word","wordHint","anonymous","level0","level1","level2","level3","level4","level5","gif","gifSearchPlaceholder","profile","approved","waiting","spam","unsticky","oldest","latest","hottest","reactionTitle"],de=e=>Object.fromEntries(e.map((e,t)=>[pe[t],e]));var he=de(["NickName","NickName cannot be less than 3 bytes.","E-Mail","Please confirm your email address.","Website","Optional","Comment here...","No comment yet.","Submit","Like","Cancel like","Reply","Cancel reply","Comments","Refresh","Load More...","Preview","Emoji","Upload Image","seconds ago","minutes ago","hours ago","days ago","just now","Uploading","Login","logout","Admin","Sticky","Words",`Please input comments between $0 and $1 words! + Current word number: $2`,"Anonymous","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Search GIF","Profile","Approved","Waiting","Spam","Unsticky","Oldest","Latest","Hottest","What do you think?"]),fe=de(["Pseudo","Le pseudo ne peut pas faire moins de 3 octets.","E-mail","Veuillez confirmer votre adresse e-mail.","Site Web","Optionnel","Commentez ici...","Aucun commentaire pour l'instant.","Envoyer","J'aime","Annuler le j'aime","Répondre","Annuler la réponse","Commentaires","Actualiser","Charger plus...","Aperçu","Emoji","Télécharger une image","Il y a quelques secondes","Il y a quelques minutes","Il y a quelques heures","Il y a quelques jours","À l'instant","Téléchargement en cours","Connexion","Déconnexion","Admin","Épinglé","Mots",`Veuillez saisir des commentaires entre $0 et $1 mots ! + Nombre actuel de mots : $2`,"Anonyme","Nains","Hobbits","Ents","Mages","Elfes","Maïar","GIF","Rechercher un GIF","Profil","Approuvé","En attente","Indésirable","Détacher","Le plus ancien","Dernier","Le plus populaire","Qu'en pensez-vous ?"]),ge=de(["ニックネーム","3バイト以上のニックネームをご入力ください.","メールアドレス","メールアドレスをご確認ください.","サイト","オプション","ここにコメント","コメントしましょう~","提出する","Like","Cancel like","返信する","キャンセル","コメント","更新","さらに読み込む","プレビュー","絵文字","画像をアップロード","秒前","分前","時間前","日前","たっだ今","アップロード","ログインする","ログアウト","管理者","トップに置く","ワード",`コメントは $0 から $1 ワードの間でなければなりません! + 現在の単語番号: $2`,"匿名","うえにん","なかにん","しもおし","特にしもおし","かげ","なぬし","GIF","探す GIF","個人情報","承認済み","待っている","スパム","べたつかない","逆順","正順","人気順","どう思いますか?"]),me=de(["Apelido","Apelido não pode ser menor que 3 bytes.","E-Mail","Por favor, confirme seu endereço de e-mail.","Website","Opcional","Comente aqui...","Nenhum comentário, ainda.","Enviar","Like","Cancel like","Responder","Cancelar resposta","Comentários","Refrescar","Carregar Mais...","Visualizar","Emoji","Enviar Imagem","segundos atrás","minutos atrás","horas atrás","dias atrás","agora mesmo","Enviando","Entrar","Sair","Admin","Sticky","Palavras",`Favor enviar comentário com $0 a $1 palavras! + Número de palavras atuais: $2`,"Anônimo","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Pesquisar GIF","informação pessoal","Aprovado","Espera","Spam","Unsticky","Mais velho","Mais recentes","Mais quente","O que você acha?"]),ve=de(["Псевдоним","Никнейм не может быть меньше 3 байт.","Эл. адрес","Пожалуйста, подтвердите адрес вашей электронной почты.","Веб-сайт","Необязательный","Комментарий здесь...","Пока нет комментариев.","Отправить","Like","Cancel like","Отвечать","Отменить ответ","Комментарии","Обновить","Загрузи больше...","Превью","эмодзи","Загрузить изображение","секунд назад","несколько минут назад","несколько часов назад","дней назад","прямо сейчас","Загрузка","Авторизоваться","Выход из системы","Админ","Липкий","Слова",`Пожалуйста, введите комментарии от $0 до $1 слов! +Номер текущего слова: $2`,"Анонимный","Dwarves","Hobbits","Ents","Wizards","Elves","Maiar","GIF","Поиск GIF","Персональные данные","Одобренный","Ожидающий","Спам","Нелипкий","самый старый","последний","самый горячий","Что вы думаете?"]),ye=de(["Tên","Tên không được nhỏ hơn 3 ký tự.","E-Mail","Vui lòng xác nhập địa chỉ email của bạn.","Website","Tùy chọn","Hãy bình luận có văn hoá!","Chưa có bình luận","Gửi","Thích","Bỏ thích","Trả lời","Hủy bỏ","bình luận","Làm mới","Tải thêm...","Xem trước","Emoji","Tải lên hình ảnh","giây trước","phút trước","giờ trước","ngày trước","Vừa xong","Đang tải lên","Đăng nhập","đăng xuất","Quản trị viên","Dính","từ",`Bình luận phải có độ dài giữa $0 và $1 từ! + Số từ hiện tại: $2`,"Vô danh","Người lùn","Người tí hon","Thần rừng","Pháp sư","Tiên tộc","Maiar","Ảnh GIF","Tìm kiếm ảnh GIF","thông tin cá nhân","Đã được phê duyệt","Đang chờ đợi","Thư rác","Không dính","lâu đời nhất","muộn nhất","nóng nhất","What do you think?"]),t=de(["昵称","昵称不能少于3个字符","邮箱","请填写正确的邮件地址","网址","可选","欢迎评论","来发评论吧~","提交","喜欢","取消喜欢","回复","取消回复","评论","刷新","加载更多...","预览","表情","上传图片","秒前","分钟前","小时前","天前","刚刚","正在上传","登录","退出","博主","置顶","字",`评论字数应在 $0 到 $1 字之间! +当前字数:$2`,"匿名","潜水","冒泡","吐槽","活跃","话痨","传说","表情包","搜索表情包","个人资料","通过","待审核","垃圾","取消置顶","按倒序","按正序","按热度","你认为这篇文章怎么样?"]),we=de(["暱稱","暱稱不能少於3個字元","郵箱","請填寫正確的郵件地址","網址","可選","歡迎留言","來發留言吧~","送出","喜歡","取消喜歡","回覆","取消回覆","留言","重整","載入更多...","預覽","表情","上傳圖片","秒前","分鐘前","小時前","天前","剛剛","正在上傳","登入","登出","管理者","置頂","字",`留言字數應在 $0 到 $1 字之間! +目前字數:$2`,"匿名","潛水","冒泡","吐槽","活躍","多話","傳說","表情包","搜尋表情包","個人資料","通過","待審核","垃圾","取消置頂","最早","最新","熱門","你認為這篇文章怎麼樣?"]),be=de(["Benutzername","Der Benutzername darf nicht weniger als 3 Bytes umfassen.","E-Mail","Bitte bestätigen Sie Ihre E-Mail-Adresse.","Webseite","Optional","Kommentieren Sie hier...","Noch keine Kommentare.","Senden","Gefällt mir","Gefällt mir nicht mehr","Antworten","Antwort abbrechen","Kommentare","Aktualisieren","Mehr laden...","Vorschau","Emoji","Ein Bild hochladen","Vor einigen Sekunden","Vor einigen Minuten","Vor einigen Stunden","Vor einigen Tagen","Gerade eben","Hochladen läuft","Anmelden","Abmelden","Admin","Angeheftet","Wörter","Bitte geben Sie Kommentare zwischen $0 und $1 Wörtern ein! Aktuelle Anzahl der Wörter: $2","Anonym","Zwerge","Hobbits","Ents","Magier","Elfen","Maïar","GIF","Nach einem GIF suchen","Profil","Genehmigt","Ausstehend","Spam","Lösen","Älteste","Neueste","Am beliebtesten","Was denken Sie?"]);const ke="en-US",xe={zh:t,"zh-cn":t,"zh-tw":we,en:he,"en-us":he,fr:fe,"fr-fr":fe,jp:ge,"jp-jp":ge,"pt-br":me,ru:ve,"ru-ru":ve,vi:ye,"vi-vn":ye,de:be},_e=e=>xe[e.toLowerCase()]||xe[ke.toLowerCase()],Ce=e=>Object.keys(xe).includes(e.toLowerCase())?e:ke,Se=e=>{try{e=decodeURI(e)}catch{}return e},Le=(e="")=>e.replace(/\/$/u,""),Re=e=>/^(https?:)?\/\//.test(e),Ie=e=>{e=Le(e);return Re(e)?e:"https://"+e},Ee=(e,t)=>"function"==typeof e?e:!1!==e&&t,Ae=({serverURL:e,path:t=location.pathname,lang:n="u"({serverURL:Ie(e),path:Se(t),lang:Ce(n),locale:{..._e(Ce(n)),..."object"==typeof r?r:{}},wordLimit:(e=>Array.isArray(e)?e:!!e&&[0,e])(c),meta:ne(i),requiredMeta:ne(o),imageUploader:Ee(u,ie),highlighter:Ee(p,ue),texRenderer:Ee(d,oe),dark:s,emoji:"boolean"==typeof l?l?re:[]:l,pageSize:a,login:f,copyright:h,search:!1!==g&&("object"==typeof g?g:(n=>{const r=async(e,t={})=>fetch(`https://api.giphy.com/v1/gifs/${e}?`+new URLSearchParams({lang:n,limit:"20",rating:"g",api_key:"6CIMLkNMMOhRcXPoMCPkFy4Ybk2XUiMp",...t}).toString()).then(e=>e.json()).then(({data:e})=>e.map(e=>({title:e.title,src:e.images.downsized_medium.url})));return{search:e=>r("search",{q:e,offset:"0"}),default:()=>r("trending",{}),more:(e,t=0)=>r("search",{q:e,offset:t.toString()})}})(n)),recaptchaV3Key:v,turnstileKey:y,reaction:Array.isArray(m)?m:!0===m?le:[],commentSorting:w,...b}),$e=e=>"string"==typeof e,Te="{--waline-white:#000;--waline-light-grey:#666;--waline-dark-grey:#999;--waline-color:#888;--waline-bg-color:#1e1e1e;--waline-bg-color-light:#272727;--waline-bg-color-hover: #444;--waline-border-color:#333;--waline-disable-bg-color:#444;--waline-disable-color:#272727;--waline-bq-color:#272727;--waline-info-bg-color:#272727;--waline-info-color:#666}",je=(e,t)=>{let n=e.toString();for(;n.length{if(!e)return"";const r=$e(e)?new Date(-1!==e.indexOf(" ")?e.replace(/-/g,"/"):e):e,l=t.getTime()-r.getTime(),i=Math.floor(l/864e5);var o;return 0===i?(e=l%864e5,0===(t=Math.floor(e/36e5))?(e=e%36e5,0===(o=Math.floor(e/6e4))?Math.round(e%6e4/1e3)+" "+n.seconds:o+" "+n.minutes):t+" "+n.hours):i<0?n.now:i<8?i+" "+n.days:(e=r,o=je(e.getDate(),2),t=je(e.getMonth()+1,2),je(e.getFullYear(),2)+`-${t}-`+o)},Oe=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function Me(e){const t=new Set(e.split(","));return e=>t.has(e)}const _={},Pe=[],Ue=()=>{},Fe=()=>!1,Ve=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(122e.startsWith("onUpdate:"),f=Object.assign,He=(e,t)=>{t=e.indexOf(t);-1Be.call(e,t),j=Array.isArray,We=e=>"[object Map]"===Xe(e),qe=e=>"[object Set]"===Xe(e),Ge=e=>"[object Date]"===Xe(e),z=e=>"function"==typeof e,O=e=>"string"==typeof e,Ze=e=>"symbol"==typeof e,X=e=>null!==e&&"object"==typeof e,Ke=e=>(X(e)||z(e))&&z(e.then)&&z(e.catch),Qe=Object.prototype.toString,Xe=e=>Qe.call(e),Je=e=>Xe(e).slice(8,-1),Ye=e=>"[object Object]"===Xe(e),et=e=>O(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,tt=Me(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),nt=t=>{const n=Object.create(null);return e=>n[e]||(n[e]=t(e))},rt=/-(\w)/g,lt=nt(e=>e.replace(rt,(e,t)=>t?t.toUpperCase():"")),it=/\B([A-Z])/g,ot=nt(e=>e.replace(it,"-$1").toLowerCase()),st=nt(e=>e.charAt(0).toUpperCase()+e.slice(1)),at=nt(e=>e?"on"+st(e):""),ct=(e,t)=>!Object.is(e,t),ut=(t,n)=>{for(let e=0;e{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},dt=e=>{var t=parseFloat(e);return isNaN(t)?e:t};let ht;const ft=()=>ht=ht||(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function gt(t){if(j(t)){const l={};for(let e=0;e{if(e){const t=e.split(vt);1kt(e,t))}const a=e=>O(e)?e:null==e?"":j(e)||X(e)&&(e.toString===Qe||!z(e.toString))?JSON.stringify(e,_t,2):String(e),_t=(e,t)=>t&&t.__v_isRef?_t(e,t.value):We(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Ct(t,r)+" =>"]=n,e),{})}:qe(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Ct(e))}:Ze(t)?Ct(t):!X(t)||j(t)||Ye(t)?t:String(t),Ct=(e,t="")=>{var n;return Ze(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let C;class St{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=C,!e&&C&&(this.index=(C.scopes||(C.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){var t=C;try{return C=this,e()}finally{C=t}}}on(){C=this}off(){C=this.parent}stop(n){if(this._active){let e,t;for(e=0,t=this.effects.length;et._depsLength){for(let e=t._depsLength;e{const n=new Map;return n.cleanup=e,n.computed=t,n},Dt=new WeakMap,Ht=Symbol(""),Bt=Symbol("");function h(n,e,r){if($t&&Lt){let e=Dt.get(n),t=(e||Dt.set(n,e=new Map),e.get(r));t||e.set(r,t=Vt(()=>e.delete(r))),Ut(Lt,t)}}function Wt(e,t,r,l){const i=Dt.get(e);if(i){let n=[];if("clear"===t)n=[...i.values()];else if("length"===r&&j(e)){const o=Number(l);i.forEach((e,t)=>{("length"===t||!Ze(t)&&t>=o)&&n.push(e)})}else switch(void 0!==r&&n.push(i.get(r)),t){case"add":j(e)?et(r)&&n.push(i.get("length")):(n.push(i.get(Ht)),We(e)&&n.push(i.get(Bt)));break;case"delete":j(e)||(n.push(i.get(Ht)),We(e)&&n.push(i.get(Bt)));break;case"set":We(e)&&n.push(i.get(Ht))}Mt();for(const s of n)s&&Ft(s,4);Pt()}}const qt=Me("__proto__,__v_isRef,__isVue"),Gt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(Ze)),Zt=function(){const e={};return["includes","indexOf","lastIndexOf"].forEach(r=>{e[r]=function(...e){const n=J(this);for(let e=0,t=this.length;e{e[t]=function(...e){zt(),Mt();e=J(this)[t].apply(this,e);return Pt(),Ot(),e}}),e}();function Kt(e){Ze(e)||(e=String(e));const t=J(this);return h(t,0,e),t.hasOwnProperty(e)}class Qt{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){var r=this._isReadonly,l=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return l;if("__v_raw"===t)return n===(r?l?Sn:Cn:l?_n:xn).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;var i=j(e);if(!r){if(i&&T(Zt,t))return Reflect.get(Zt,t,n);if("hasOwnProperty"===t)return Kt}n=Reflect.get(e,t,n);return(Ze(t)?Gt.has(t):qt(t))||(r||h(e,0,t),l)?n:S(n)?i&&et(t)?n:n.value:X(n)?(r?Rn:Ln)(n):n}}class Xt extends Qt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let l=e[t];if(!this._isShallow){var i=An(l);if($n(n)||An(n)||(l=J(l),n=J(n)),!j(e)&&S(l)&&!S(n))return!i&&(l.value=n,!0)}var i=j(e)&&et(t)?Number(t)e,nn=e=>Reflect.getPrototypeOf(e);function rn(e,t,n=!1,r=!1){var l=J(e=e.__v_raw),i=J(t);n||(ct(t,i)&&h(l,0,t),h(l,0,i));const o=nn(l)["has"],s=r?tn:n?zn:jn;return o.call(l,t)?s(e.get(t)):o.call(l,i)?s(e.get(i)):void(e!==l&&e.get(t))}function ln(e,t=!1){const n=this.__v_raw,r=J(n),l=J(e);return t||(ct(e,l)&&h(r,0,e),h(r,0,l)),e===l?n.has(e):n.has(e)||n.has(l)}function on(e,t=!1){return e=e.__v_raw,t||h(J(e),0,Ht),Reflect.get(e,"size",e)}function sn(e){e=J(e);const t=J(this);return nn(t).has.call(t,e)||(t.add(e),Wt(t,"add",e,e)),this}function an(e,t){t=J(t);const n=J(this),{has:r,get:l}=nn(n);let i=r.call(n,e);i||(e=J(e),i=r.call(n,e));var o=l.call(n,e);return n.set(e,t),i?ct(t,o)&&Wt(n,"set",e,t):Wt(n,"add",e,t),this}function cn(e){const t=J(this),{has:n,get:r}=nn(t);let l=n.call(t,e);l||(e=J(e),l=n.call(t,e)),r&&r.call(t,e);var i=t.delete(e);return l&&Wt(t,"delete",e,void 0),i}function un(){const e=J(this),t=0!==e.size,n=e.clear();return t&&Wt(e,"clear",void 0,void 0),n}function pn(o,s){return function(n,r){const l=this,e=l.__v_raw,t=J(e),i=s?tn:o?zn:jn;return o||h(t,0,Ht),e.forEach((e,t)=>n.call(r,i(e),i(t),l))}}function dn(a,c,u){return function(...e){const t=this.__v_raw,n=J(t),r=We(n),l="entries"===a||a===Symbol.iterator&&r,i="keys"===a&&r,o=t[a](...e),s=u?tn:c?zn:jn;return c||h(n,0,i?Bt:Ht),{next(){var{value:e,done:t}=o.next();return t?{value:e,done:t}:{value:l?[s(e[0]),s(e[1])]:s(e),done:t}},[Symbol.iterator](){return this}}}}function hn(e){return function(){return"delete"!==e&&("clear"===e?void 0:this)}}const[fn,gn,mn,vn]=function(){const t={get(e){return rn(this,e)},get size(){return on(this)},has:ln,add:sn,set:an,delete:cn,clear:un,forEach:pn(!1,!1)},n={get(e){return rn(this,e,!1,!0)},get size(){return on(this)},has:ln,add:sn,set:an,delete:cn,clear:un,forEach:pn(!1,!0)},r={get(e){return rn(this,e,!0)},get size(){return on(this,!0)},has(e){return ln.call(this,e,!0)},add:hn("add"),set:hn("set"),delete:hn("delete"),clear:hn("clear"),forEach:pn(!0,!1)},l={get(e){return rn(this,e,!0,!0)},get size(){return on(this,!0)},has(e){return ln.call(this,e,!0)},add:hn("add"),set:hn("set"),delete:hn("delete"),clear:hn("clear"),forEach:pn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(e=>{t[e]=dn(e,!1,!1),r[e]=dn(e,!0,!1),n[e]=dn(e,!1,!0),l[e]=dn(e,!0,!0)}),[t,r,n,l]}();function yn(r,e){const l=e?r?vn:mn:r?gn:fn;return(e,t,n)=>"__v_isReactive"===t?!r:"__v_isReadonly"===t?r:"__v_raw"===t?e:Reflect.get(T(l,t)&&t in e?l:e,t,n)}const wn={get:yn(!1,!1)},bn={get:yn(!1,!0)},kn={get:yn(!0,!1)},xn=new WeakMap,_n=new WeakMap,Cn=new WeakMap,Sn=new WeakMap;function Ln(e){return An(e)?e:In(e,!1,Jt,wn,xn)}function Rn(e){return In(e,!0,Yt,kn,Cn)}function In(e,t,n,r,l){if(!X(e)||e.__v_raw&&(!t||!e.__v_isReactive))return e;t=l.get(e);if(t)return t;t=function(e){if(e.__v_skip||!Object.isExtensible(e))return 0;switch(Je(e)){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(e);if(0===t)return e;t=new Proxy(e,2===t?r:n);return l.set(e,t),t}function En(e){return An(e)?En(e.__v_raw):!(!e||!e.__v_isReactive)}function An(e){return!(!e||!e.__v_isReadonly)}function $n(e){return!(!e||!e.__v_isShallow)}function Tn(e){return e&&e.__v_raw}function J(e){var t=e&&e.__v_raw;return t?J(t):e}const jn=e=>X(e)?Ln(e):e,zn=e=>X(e)?Rn(e):e;class On{constructor(e,t,n,r){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Rt(()=>e(this._value),()=>Pn(this,2===this.effect._dirtyLevel?2:3)),(this.effect.computed=this).effect.active=this._cacheable=!r,this.__v_isReadonly=n}get value(){const e=J(this);return e._cacheable&&!e.effect.dirty||!ct(e._value,e._value=e.effect.run())||Pn(e,4),Mn(e),2<=e.effect._dirtyLevel&&Pn(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function Mn(e){var t;$t&&Lt&&(e=J(e),Ut(Lt,null!=(t=e.dep)?t:e.dep=Vt(()=>e.dep=void 0,e instanceof On?e:void 0)))}function Pn(e,t=4){e=(e=J(e)).dep;e&&Ft(e,t)}function S(e){return!(!e||!0!==e.__v_isRef)}function N(e){return Nn(e,!1)}function Un(e){return Nn(e,!0)}function Nn(e,t){return S(e)?e:new Fn(e,t)}class Fn{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:J(e),this._value=t?e:jn(e)}get value(){return Mn(this),this._value}set value(e){var t=this.__v_isShallow||$n(e)||An(e);e=t?e:J(e),ct(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:jn(e),Pn(this,4))}}function Vn(e){return S(e)?e.value:e}const Dn={get:(e,t,n)=>Vn(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const l=e[t];return S(l)&&!S(n)?(l.value=n,!0):Reflect.set(e,t,n,r)}};function Hn(e){return En(e)?e:new Proxy(e,Dn)}function Bn(e,t,n,r){try{return r?e(...r):e()}catch(e){qn(e,t,n)}}function Wn(t,n,r,l){if(z(t)){const e=Bn(t,n,r,l);return e&&Ke(e)&&e.catch(e=>{qn(e,n,r)}),e}if(j(t)){const i=[];for(let e=0;e>>1,l=o[r],i=or(l);ior(e)-or(t));if(Qn.length=0,Xn)Xn.push(...e);else{for(Xn=e,Jn=0;Jnnull==e.id?1/0:e.id,sr=(e,t)=>{var n=or(e)-or(t);if(0==n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function ar(e){Zn=!1,Gn=!0,o.sort(sr);try{for(Kn=0;Kn{let t;for(const n in e)"class"!==n&&"style"!==n&&!Ve(n)||((t=t||{})[n]=e[n]);return t},fr=(e,t)=>{const n={};for(const r in e)De(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function gr(t,n,r){var l=Object.keys(n);if(l.length!==Object.keys(t).length)return!0;for(let e=0;eXr(br);function _r(e,t){return Lr(e,null,t)}const Cr={};function Sr(e,t,n){return Lr(e,t,n)}function Lr(e,t,{immediate:n,deep:r,flush:l,once:i}=_){if(t&&i){const b=t;t=(...e)=>{b(...e),w()}}const o=E,s=e=>!0===r?e:Rr(e,!1===r?1:void 0);let a,c=!1,u=!1;if(S(e)?(a=()=>e.value,c=$n(e)):En(e)?(a=()=>s(e),c=!0):a=j(e)?(u=!0,c=e.some(e=>En(e)||$n(e)),()=>e.map(e=>S(e)?e.value:En(e)?s(e):z(e)?Bn(e,o,2):void 0)):z(e)?t?()=>Bn(e,o,2):()=>(p&&p(),Wn(e,o,3,[d])):Ue,t&&r){const k=a;a=()=>Rr(k())}let p,d=e=>{p=v.onStop=()=>{Bn(e,o,4),p=v.onStop=void 0}},h;if(ql){if(d=Ue,t?n&&Wn(t,o,3,[a(),u?[]:void 0,d]):a(),"sync"!==l)return Ue;{const x=kr();h=x.__watcherHandles||(x.__watcherHandles=[])}}let f=u?new Array(e.length).fill(Cr):Cr;const g=()=>{if(v.active&&v.dirty)if(t){const e=v.run();(r||c||(u?e.some((e,t)=>ct(e,f[t])):ct(e,f)))&&(p&&p(),Wn(t,o,3,[e,f===Cr?void 0:u&&f[0]===Cr?[]:f,d]),f=e)}else v.run()};g.allowRecurse=!!t;let m;m="sync"===l?g:"post"===l?()=>Y(g,o&&o.suspense):(g.pre=!0,o&&(g.id=o.uid),()=>nr(g));const v=new Rt(a,Ue,m),y=C,w=()=>{v.stop(),y&&He(y.effects,v)};return t?n?g():f=v.run():"post"===l?Y(v.run.bind(v),o&&o.suspense):v.run(),h&&h.push(w),w}function Rr(t,n=1/0,r){if(n<=0||!X(t)||t.__v_skip||(r=r||new Set).has(t))return t;if(r.add(t),n--,S(t))Rr(t.value,n,r);else if(j(t))for(let e=0;e{Rr(e,n,r)});else if(Ye(t))for(const e in t)Rr(t[e],n,r);return t}function Ir(e,i){if(null===c)return e;const o=Xl(c)||c.proxy,s=e.dirs||(e.dirs=[]);for(let l=0;l!!e.type.__asyncLoader,Tr=e=>e.type.__isKeepAlive;const jr=n=>(t,e=E)=>(!ql||"sp"===n)&&function(r,l,i=E,e=!1){if(i){const t=i[r]||(i[r]=[]),n=l.__weh||(l.__weh=(...e)=>{if(!i.isUnmounted){zt();const t=Hl(i),n=Wn(l,i,r,e);return t(),Ot(),n}});return e?t.unshift(n):t.push(n),n}}(n,(...e)=>t(...e),e),zr=jr("m"),Or=jr("bum"),Mr=jr("um");function u(n,r,e){let l;const i=e;if(j(n)||O(n)){l=new Array(n.length);for(let e=0,t=n.length;er(e,t,void 0,i));else{var o=Object.keys(n);l=new Array(o.length);for(let e=0,t=o.length;ee?Wl(e)?Xl(e)||e.proxy:Pr(e.parent):null,Ur=f(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Pr(e.parent),$root:e=>Pr(e.root),$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,nr(e.update)}),$nextTick:e=>e.n||(e.n=tr.bind(e.proxy)),$watch:e=>Ue}),Nr=(e,t)=>e!==_&&!e.__isScriptSetup&&T(e,t),Fr={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:r,data:l,props:i,accessCache:o,type:s,appContext:a}=e;if("$"!==t[0]){var c=o[t];if(void 0!==c)switch(c){case 1:return r[t];case 2:return l[t];case 4:return n[t];case 3:return i[t]}else{if(Nr(r,t))return o[t]=1,r[t];if(l!==_&&T(l,t))return o[t]=2,l[t];if((c=e.propsOptions[0])&&T(c,t))return o[t]=3,i[t];if(n!==_&&T(n,t))return o[t]=4,n[t];o[t]=0}}const u=Ur[t];let p,d;return u?("$attrs"===t&&h(e.attrs,0,""),u(e)):(p=s.__cssModules)&&(p=p[t])?p:n!==_&&T(n,t)?(o[t]=4,n[t]):(d=a.config.globalProperties,T(d,t)?d[t]:void 0)},set({_:e},t,n){const{data:r,setupState:l,ctx:i}=e;return Nr(l,t)?(l[t]=n,!0):r!==_&&T(r,t)?(r[t]=n,!0):!(T(e.props,t)||"$"===t[0]&&t.slice(1)in e)&&(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:l,propsOptions:i}},o){return!!n[o]||e!==_&&T(e,o)||Nr(t,o)||(n=i[0])&&T(n,o)||T(r,o)||T(Ur,o)||T(l.config.globalProperties,o)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:T(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Vr(e){return j(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function Dr(t,e,n,r=!1){const{mixins:l,extends:i}=e;i&&Dr(t,i,n,!0),l&&l.forEach(e=>Dr(t,e,n,!0));for(const o in e)if(!r||"expose"!==o){const s=Hr[o]||n&&n[o];t[o]=s?s(t[o],e[o]):e[o]}return t}const Hr={data:Br,props:Gr,emits:Gr,methods:qr,computed:qr,beforeCreate:l,created:l,beforeMount:l,mounted:l,beforeUpdate:l,updated:l,beforeDestroy:l,beforeUnmount:l,destroyed:l,unmounted:l,activated:l,deactivated:l,errorCaptured:l,serverPrefetch:l,components:qr,directives:qr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=f(Object.create(null),e);for(const r in t)n[r]=l(e[r],t[r]);return n},provide:Br,inject:function(e,t){return qr(Wr(e),Wr(t))}};function Br(e,t){return t?e?function(){return f(z(e)?e.call(this,this):e,z(t)?t.call(this,this):t)}:t:e}function Wr(t){if(j(t)){const n={};for(let e=0;eObject.create(Jr),el=e=>Object.getPrototypeOf(e)===Jr;function tl(e,t,n,r=!1){const l={},i=Yr();e.propsDefaults=Object.create(null),nl(e,t,l,i);for(const o in e.propsOptions[0])o in l||(l[o]=void 0);n?e.props=r?l:In(l,!1,en,bn,_n):e.type.props?e.props=l:e.props=i,e.attrs=i}function nl(t,n,r,l){const[i,o]=t.propsOptions;let s=!1,a;if(n)for(var c in n)if(!tt(c)){var u=n[c];let e;i&&T(i,e=lt(c))?o&&o.includes(e)?(a=a||{})[e]=u:r[e]=u:cr(t.emitsOptions,c)||c in l&&u===l[c]||(l[c]=u,s=!0)}if(o){var p=J(r),d=a||_;for(let e=0;eol(e,t)):z(e)&&ol(e,t)?0:-1}const al=e=>"_"===e[0]||"$stable"===e,cl=e=>j(e)?e.map(zl):[zl(e)],ul=(e,t,n)=>{if(t._n)return t;const r=function(r,l=c){if(!l||r._n)return r;const i=(...e)=>{i._d&&Sl(-1);var t=pr(l);let n;try{n=r(...e)}finally{pr(t),i._d&&Sl(1)}return n};return i._n=!0,i._c=!0,i._d=!0,i}((...e)=>cl(t(...e)),n);return r._c=!1,r},pl=(e,t,n)=>{var r=e._ctx;for(const i in e)if(!al(i)){var l=e[i];if(z(l))t[i]=ul(i,l,r);else if(null!=l){const o=cl(l);t[i]=()=>o}}},dl=(e,t)=>{const n=cl(t);e.slots.default=()=>n},hl=(e,t)=>{var n,r=e.slots=Yr();32&e.vnode.shapeFlag?(n=t._)?(f(r,t),pt(r,"_",n,!0)):pl(t,r):t&&dl(e,t)},fl=(e,t,n)=>{const{vnode:r,slots:l}=e;let i=!0,o=_;var s;if(32&r.shapeFlag?((s=t._)?n&&1===s?i=!1:(f(l,t),n||1!==s||delete l._):(i=!t.$stable,pl(t,l)),o=t):t&&(dl(e,t),o={default:1}),i)for(const a in l)al(a)||null!=o[a]||delete l[a]};function gl(t,n,r,l,i=!1){if(j(t))t.forEach((e,t)=>gl(e,n&&(j(n)?n[t]:n),r,l,i));else if(!$r(l)||i){const o=4&l.shapeFlag?Xl(l.component)||l.component.proxy:l.el,s=i?null:o,{i:a,r:c}=t,u=n&&n.r,p=a.refs===_?a.refs={}:a.refs,d=a.setupState;if(null!=u&&u!==c&&(O(u)?(p[u]=null,T(d,u)&&(d[u]=null)):S(u)&&(u.value=null)),z(c))Bn(c,a,12,[s,p]);else{const h=O(c),f=S(c);var e;(h||f)&&(e=()=>{if(t.f){const e=h?(T(d,c)?d:p)[c]:c.value;i?j(e)&&He(e,o):j(e)?e.includes(o)||e.push(o):h?(p[c]=[o],T(d,c)&&(d[c]=p[c])):(c.value=[o],t.k&&(p[t.k]=c.value))}else h?(p[c]=s,T(d,c)&&(d[c]=s)):f&&(c.value=s,t.k&&(p[t.k]=s))},s?(e.id=-1,Y(e,r)):e())}}}const Y=function(e,t){t&&t.pendingBranch?j(e)?t.effects.push(...e):t.effects.push(e):(t=e,j(t)?Qn.push(...t):Xn&&Xn.includes(t,t.allowRecurse?Jn+1:Jn)||Qn.push(t),rr())};function ml(e){{"boolean"!=typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__&&(ft().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1);const t=ft(),{insert:M,remove:g,patchProp:y,createElement:m,createText:P,createComment:l,setText:U,setElementText:S,parentNode:L,nextSibling:b,setScopeId:i=Ue,insertStaticContent:N}=(t.__VUE__=!0,e),E=(r,l,i,o=null,s=null,a=null,c=void 0,u=null,p=!!l.dynamicChildren)=>{if(r!==l){r&&!El(r,l)&&(o=K(r),Z(r,s,a,!0),r=null),-2===l.patchFlag&&(p=!1,l.dynamicChildren=null);const{type:A,ref:$,shapeFlag:T}=l;switch(A){case bl:var e=r,t=l,n=i,d=o;if(e==null)M(t.el=P(t.children),n,d);else{const j=t.el=e.el;t.children!==e.children&&U(j,t.children)}break;case kl:F(r,l,i,o);break;case xl:null==r&&(n=l,d=i,e=o,t=c,[n.el,n.anchor]=N(n.children,d,e,t,n.el,n.anchor));break;case ee:{var h=r;var f=l;var g=i;var m=o;var v=s;var y=a;var w=c;var b=u;var k=p;const z=f.el=h?h.el:P(""),O=f.anchor=h?h.anchor:P("");let{patchFlag:e,dynamicChildren:t,slotScopeIds:n}=f;n&&(b=b?b.concat(n):n),h==null?(M(z,g,m),M(O,g,m),D(f.children||[],g,O,v,y,w,b,k)):e>0&&e&64&&t&&h.dynamicChildren?(B(h.dynamicChildren,t,g,v,y,w,b),(f.key!=null||v&&f===v.subTree)&&wl(h,f,!0)):G(h,f,g,O,v,y,w,b,k)}break;default:1&T?(m=r,h=i,f=o,g=s,v=a,y=c,w=u,b=p,"svg"===(k=l).type?y="svg":"math"===k.type&&(y="mathml"),null==m?V(k,h,f,g,v,y,w,b):H(m,k,g,v,y,w,b)):6&T?(x=r,C=i,S=o,L=s,R=a,I=c,E=p,(_=l).slotScopeIds=u,null==x?512&_.shapeFlag?L.ctx.activate(_,C,S,I,E):W(_,C,S,L,R,I,E):q(x,_,E)):(64&T||128&T)&&A.process(r,l,i,o,s,a,c,u,p,Q)}var x,_,C,S,L,R,I,E;null!=$&&s&&gl($,r&&r.ref,a,l||r,!l)}},F=(e,t,n,r)=>{null==e?M(t.el=l(t.children||""),n,r):t.el=e.el},V=(e,t,n,r,l,i,o,s)=>{let a,c;const{props:u,shapeFlag:p,transition:d,dirs:h}=e;if(a=e.el=m(e.type,i,u&&u.is,u),8&p?S(a,e.children):16&p&&D(e.children,a,null,r,l,vl(e,i),o,s),h&&Er(e,null,r,"created"),v(a,e,e.scopeId,o,r),u){for(const g in u)"value"===g||tt(g)||y(a,g,null,u[g],i,e.children,r,l,$);"value"in u&&y(a,"value",null,u.value,i),(c=u.onVnodeBeforeMount)&&Pl(c,r,e)}h&&Er(e,null,r,"beforeMount");s=l,o=d;const f=(!s||!s.pendingBranch)&&o&&!o.persisted;f&&d.beforeEnter(a),M(a,t,n),((c=u&&u.onVnodeMounted)||f||h)&&Y(()=>{c&&Pl(c,r,e),f&&d.enter(a),h&&Er(e,null,r,"mounted")},l)},v=(t,e,n,r,l)=>{if(n&&i(t,n),r)for(let e=0;e{for(let e=c;e{var s=e.el=t.el;let{patchFlag:a,dynamicChildren:c,dirs:u}=e;a|=16&t.patchFlag;var p=t.props||_,d=e.props||_;let h;if(n&&yl(n,!1),(h=d.onVnodeBeforeUpdate)&&Pl(h,n,e,t),u&&Er(e,t,n,"beforeUpdate"),n&&yl(n,!0),c?B(t.dynamicChildren,c,s,n,r,vl(e,l),i):o||G(t,e,s,null,n,r,vl(e,l),i,!1),0{h&&Pl(h,n,e,t),u&&Er(e,t,n,"updated")},r)},B=(t,n,r,l,i,o,s)=>{for(let e=0;e{if(n!==r){if(n!==_)for(const c in n)tt(c)||c in r||y(e,c,n[c],null,o,t.children,l,i,$);for(const u in r){var s,a;tt(u)||(s=r[u])!==(a=n[u])&&"value"!==u&&y(e,u,a,s,o,t.children,l,i,$)}"value"in r&&y(e,"value",n.value,r.value,o)}},W=(e,t,n,r,l,i,o)=>{const s=e.component=function(e,t,n){const r=e.type,l=(t||e).appContext||Ul,i={uid:Nl++,vnode:e,type:r,parent:t,appContext:l,root:null,next:null,subTree:null,effect:null,update:null,scope:new St(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(l.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:function(e,t){const n=t.propsCache,r=n.get(e);if(r)return r;const l=e.props,i={},o=[];if(!l)return X(e)&&n.set(e,Pe),Pe;if(j(l))for(let e=0;ei[e]=null):f(i,l),X(e)&&n.set(e,i),i):(X(e)&&n.set(e,null),null)}(r,l),emit:null,emitted:null,propsDefaults:_,inheritAttrs:r.inheritAttrs,ctx:_,data:_,props:_,attrs:_,slots:_,refs:_,setupState:_,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=function(r,l,...i){if(!r.isUnmounted){var o=r.vnode.props||_;let e=i;var s=l.startsWith("update:"),a=s&&l.slice(7);a&&a in o&&({number:a,trim:c}=o[`${"modelValue"===a?"model":a}Modifiers`]||_,c&&(e=i.map(e=>O(e)?e.trim():e)),a&&(e=i.map(dt)));let t,n=o[t=at(l)]||o[t=at(lt(l))];(n=!n&&s?o[t=at(ot(l))]:n)&&Wn(n,r,6,e);var c=o[t+"Once"];if(c){if(r.emitted){if(r.emitted[t])return}else r.emitted={};r.emitted[t]=!0,Wn(c,r,6,e)}}}.bind(null,i),e.ce&&e.ce(i),i}(e,r,l);Tr(e)&&(s.ctx.renderer=Q);var[r,a=!1]=[s],{props:c,children:u}=(a&&Dl(a),r.vnode),p=Wl(r),c=(tl(r,c,p,a),hl(r,u),p?function(t,n){var e=t.type,e=(t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Fr),e)["setup"];if(e){const r=t.setupContext=1{t.exposed=e||{}}}}(t):null,l=Hl(t),i=(zt(),Bn(e,t,0,[t.props,r]));if(Ot(),l(),Ke(i)){if(i.then(Bl,Bl),n)return i.then(e=>{Gl(t,e,n)}).catch(e=>{qn(e,t,0)});t.asyncDep=i}else Gl(t,i,n)}else Kl(t,n)}(r,a):void 0);a&&Dl(!1),s.asyncDep?(l&&l.registerDep(s,d),e.el||(u=s.subTree=te(kl),F(null,u,t,n))):d(s,e,t,n,l,i,o)},q=(e,t,n)=>{const r=t.component=e.component;!function(e,t,n){var{props:r,children:e,component:l}=e,{props:i,children:o,patchFlag:s}=t,a=l.emitsOptions;if(t.dirs||t.transition)return 1;if(!(n&&0<=s))return!(!e&&!o||o&&o.$stable)||r!==i&&(r?!i||gr(r,i,a):i);if(1024&s)return 1;if(16&s)return r?gr(r,i,a):i;if(8&s){var c=t.dynamicProps;for(let e=0;eKn&&o.splice(e,1),r.effect.dirty=!0,r.update())},d=(m,v,y,w,b,k,x)=>{const _=()=>{if(m.isMounted){let{next:e,bu:t,u:n,parent:r,vnode:l}=m;{const d=function e(t){const n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(m);if(d)return e&&(e.el=l.el,R(m,e,x)),void d.asyncDep.then(()=>{m.isUnmounted||_()})}let i=e,o;yl(m,!1),e?(e.el=l.el,R(m,e,x)):e=l,t&&ut(t),(o=e.props&&e.props.onVnodeBeforeUpdate)&&Pl(o,r,e,l),yl(m,!0);var s=dr(m),a=m.subTree;if(m.subTree=s,E(a,s,L(a.el),K(a),m,b,k),e.el=s.el,null===i){var[{vnode:c,parent:u},p]=[m,s.el];for(;u;){const h=u.subTree;if(h.suspense&&h.suspense.activeBranch===c&&(h.el=c.el),h!==c)break;(c=u.vnode).el=p,u=u.parent}}n&&Y(n,b),(o=e.props&&e.props.onVnodeUpdated)&&Y(()=>Pl(o,r,e,l),b)}else{let e;const{el:t,props:n}=v,{bm:r,m:l,parent:i}=m,o=$r(v);if(yl(m,!1),r&&ut(r),!o&&(e=n&&n.onVnodeBeforeMount)&&Pl(e,i,v),yl(m,!0),t&&C){const f=()=>{m.subTree=dr(m),C(t,m.subTree,m,b,null)};o?v.type.__asyncLoader().then(()=>!m.isUnmounted&&f()):f()}else{a=m.subTree=dr(m);E(null,a,y,w,m,b,k),v.el=a.el}if(l&&Y(l,b),!o&&(e=n&&n.onVnodeMounted)){const g=v;Y(()=>Pl(e,i,g),b)}(256&v.shapeFlag||i&&$r(i.vnode)&&256&i.vnode.shapeFlag)&&m.a&&Y(m.a,b),m.isMounted=!0,v=y=w=null}},e=m.effect=new Rt(_,Ue,()=>nr(t),m.scope),t=m.update=()=>{e.dirty&&e.run()};t.id=m.uid,yl(m,!0),t()},R=(e,n,r)=>{var l=(n.component=e).vnode.props;e.vnode=n,e.next=null;{var i=e,o=n.props,s=l;l=r;const{props:p,attrs:d,vnode:{patchFlag:h}}=i,f=J(p),[g]=i.propsOptions;let t=!1;if(!(l||0{var c=e&&e.children,e=e?e.shapeFlag:0,u=t.children,{patchFlag:t,shapeFlag:p}=t;if(0k?$(d,g,m,!0,!1,x):D(h,f,t,g,m,v,y,w,x)}return}}8&p?(16&e&&$(c,l,i),u!==c&&S(n,u)):16&e?16&p?I(c,u,n,r,l,i,o,s,a):$(c,l,i,!0):(8&e&&S(n,""),16&p&&D(u,n,r,l,i,o,s,a))},I=(e,i,o,s,a,c,u,p,d)=>{let h=0;var f=i.length;let g=e.length-1,m=f-1;for(;h<=g&&h<=m;){var t=e[h],n=i[h]=(d?Ol:zl)(i[h]);if(!El(t,n))break;E(t,n,o,null,a,c,u,p,d),h++}for(;h<=g&&h<=m;){var r=e[g],l=i[m]=(d?Ol:zl)(i[m]);if(!El(r,l))break;E(r,l,o,null,a,c,u,p,d),g--,m--}if(h>g){if(h<=m)for(var v=m+1,y=vm)for(;h<=g;)Z(e[h],a,c,!0),h++;else{const S=h,L=h,R=new Map;for(h=L;h<=m;h++){var w=i[h]=(d?Ol:zl)(i[h]);null!=w.key&&R.set(w.key,h)}let t,n=0;var b=m-L+1;let r=!1,l=0;const I=new Array(b);for(h=0;h=b)Z(k,a,c,!0);else{let e;if(null!=k.key)e=R.get(k.key);else for(t=L;t<=m;t++)if(0===I[t-L]&&El(k,i[t])){e=t;break}void 0===e?Z(k,a,c,!0):(I[e-L]=h+1,e>=l?l=e:r=!0,E(k,i[e],o,null,a,c,u,p,d),n++)}}var x=r?function(e){const t=e.slice(),n=[0];let r,l,i,o,s;var a=e.length;for(r=0;r>1,e[n[s]]{const{el:i,type:o,transition:s,children:a,shapeFlag:c}=e;if(6&c)A(e.component.subTree,t,n,r);else if(128&c)e.suspense.move(t,n,r);else if(64&c)o.move(e,t,n,Q);else if(o===ee){M(i,t,n);for(let e=0;es.enter(i),l);else{const{leave:g,delayLeave:m,afterLeave:v}=s,y=()=>M(i,t,n),w=()=>{g(i,()=>{y(),v&&v()})};m?m(i,y,w):w()}else M(i,t,n)},Z=(t,n,r,l=!1,i=!1)=>{var{type:o,props:s,ref:e,children:a,dynamicChildren:c,shapeFlag:u,patchFlag:p,dirs:d}=t;if(null!=e&&gl(e,null,r,t,!0),256&u)n.ctx.deactivate(t);else{const h=1&u&&d,f=!$r(t);let e;if(f&&(e=s&&s.onVnodeBeforeUnmount)&&Pl(e,n,t),6&u)x(t.component,r,l);else{if(128&u)return void t.suspense.unmount(r,l);h&&Er(t,null,n,"beforeUnmount"),64&u?t.type.remove(t,n,r,i,Q,l):c&&(o!==ee||0{e&&Pl(e,n,t),h&&Er(t,null,n,"unmounted")},r)}},k=e=>{const{type:t,el:n,anchor:r,transition:l}=e;if(t===ee){for(var i,o=n,s=r;o!==s;)i=b(o),g(o),o=i;g(s)}else if(t===xl){for(var a,{el:c,anchor:u}=[e][0];c&&c!==u;)a=b(c),g(c),c=a;g(u)}else{const p=()=>{g(n),l&&!l.persisted&&l.afterLeave&&l.afterLeave()};if(1&e.shapeFlag&&l&&!l.persisted){const{leave:d,delayLeave:h}=l,f=()=>d(n,p);h?h(e.el,p,f):f()}else p()}},x=(e,t,n)=>{const{bum:r,scope:l,update:i,subTree:o,um:s}=e;r&&ut(r),l.stop(),i&&(i.active=!1,Z(o,e,t,n)),s&&Y(s,t),Y(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},$=(t,n,r,l=!1,i=!1,o=0)=>{for(let e=o;e6&e.shapeFlag?K(e.component.subTree):128&e.shapeFlag?e.suspense.next():b(e.anchor||e.el);let r=!1;const n=(e,t,n)=>{null==e?t._vnode&&Z(t._vnode,null,null,!0):E(t._vnode||null,e,t,null,null,null,n),r||(r=!0,lr(),ir(),r=!1),t._vnode=e},Q={p:E,um:Z,m:A,r:k,mt:W,mc:D,pc:G,pbc:B,n:K,o:e};let C;return{render:n,hydrate:void 0,createApp:function(c,u){return function(l,i=null){z(l)||(l=f({},l)),null==i||X(i)||(i=null);const o=Zr(),n=new WeakSet;let s=!1;const a=o.app={_uid:Kr++,_component:l,_props:i,_container:null,_context:o,_instance:null,version:Jl,get config(){return o.config},set config(e){},use(e,...t){return n.has(e)||(e&&z(e.install)?(n.add(e),e.install(a,...t)):z(e)&&(n.add(e),e(a,...t))),a},mixin(e){return a},component(e,t){return t?(o.components[e]=t,a):o.components[e]},directive(e,t){return t?(o.directives[e]=t,a):o.directives[e]},mount(e,t,n){if(!s){const r=te(l,i);return r.appContext=o,!0===n?n="svg":!1===n&&(n=void 0),t&&u?u(r,e):c(r,e,n),s=!0,(a._container=e).__vue_app__=a,Xl(r.component)||r.component.proxy}},unmount(){s&&(c(null,a._container),delete a._container.__vue_app__)},provide(e,t){return o.provides[e]=t,a},runWithContext(e){var t=Qr;Qr=a;try{return e()}finally{Qr=t}}};return a}}(n,void 0)}}}function vl({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function yl({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function wl(e,t,n=!1){const r=e.children,l=t.children;if(j(r)&&j(l))for(let t=0;te??null,$l=({ref:e,ref_key:t,ref_for:n})=>null!=(e="number"==typeof e?""+e:e)?O(e)||S(e)||z(e)?{i:c,r:e,k:t,f:!!n}:e:null;function v(e,t=null,n=null,r=0,l=null,i=e===ee?0:1,o=!1,s=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Al(t),ref:t&&$l(t),scopeId:ur,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:l,dynamicChildren:null,appContext:null,ctx:c};return s?(Ml(a,n),128&i&&e.normalize(a)):n&&(a.shapeFlag|=O(n)?8:16),0E||c;let Vl,Dl;{const eu=ft(),tu=(e,t)=>{let n;return(n=(n=eu[e])?n:eu[e]=[]).push(t),t=>{1e(t)):n[0](t)}};Vl=tu("__VUE_INSTANCE_SETTERS__",e=>E=e),Dl=tu("__VUE_SSR_SETTERS__",e=>ql=e)}const Hl=e=>{const t=E;return Vl(e),e.scope.on(),()=>{e.scope.off(),Vl(t)}},Bl=()=>{E&&E.scope.off(),Vl(null)};function Wl(e){return 4&e.vnode.shapeFlag}let ql=!1;function Gl(e,t,n){z(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:X(t)&&(e.setupState=Hn(t)),Kl(e,n)}let Zl;function Kl(e,t){const n=e.type;var r,l,i,o;e.render||(t||!Zl||n.render||(t=n.template||function(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:l,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,s=i.get(t);let a;return s?a=s:l.length||n||r?(a={},l.length&&l.forEach(e=>Dr(a,e,o,!0)),Dr(a,t,o)):a=t,X(t)&&i.set(t,a),a}(e).template)&&({isCustomElement:o,compilerOptions:r}=e.appContext.config,{delimiters:l,compilerOptions:i}=n,o=f(f({isCustomElement:o,delimiters:l},r),i),n.render=Zl(t,o)),e.render=n.render||Ue)}const Ql={get(e,t){return h(e,0,""),e[t]}};function Xl(n){if(n.exposed)return n.exposeProxy||(n.exposeProxy=new Proxy(Hn((e=n.exposed,Object.isExtensible(e)&&pt(e,"__v_skip",!0),e)),{get(e,t){return t in e?e[t]:t in Ur?Ur[t](n):void 0},has(e,t){return t in e||t in Ur}}));var e}const F=(n,e)=>{{var[n,r=!1]=[n,ql];let e,t;var l=z(n);return t=l?(e=n,Ue):(e=n.get,n.set),new On(e,t,l||!t,r)}};function w(e,t,n){var r=arguments.length;return 2===r?X(t)&&!j(t)?Il(t)?te(e,null,[t]):te(e,t):te(e,null,t):(3{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const l="svg"===t?Yl.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Yl.createElementNS("http://www.w3.org/1998/Math/MathML",e):Yl.createElement(e,n?{is:n}:void 0);return"select"===e&&r&&null!=r.multiple&&l.setAttribute("multiple",r.multiple),l},createText:e=>Yl.createTextNode(e),createComment:e=>Yl.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Yl.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,l,i){var o=n?n.previousSibling:t.lastChild;if(l&&(l===i||l.nextSibling))for(;t.insertBefore(l.cloneNode(!0),n),l!==i&&(l=l.nextSibling););else{ei.innerHTML="svg"===r?`${e}`:"mathml"===r?`${e}`:e;const a=ei.content;if("svg"===r||"mathml"===r){for(var s=a.firstChild;s.firstChild;)a.appendChild(s.firstChild);a.removeChild(s)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ni=Symbol("_vtc");const ri=Symbol("_vod"),li=Symbol("_vsh"),ii={beforeMount(e,{value:t},{transition:n}){e[ri]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):oi(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),oi(e,!0),r.enter(e)):r.leave(e,()=>{oi(e,!1)}):oi(e,t))},beforeUnmount(e,{value:t}){oi(e,t)}};function oi(e,t){e.style.display=t?e[ri]:"none",e[li]=!t}const si=Symbol(""),ai=/(^|;)\s*display\s*:/;const ci=/\s*!important$/;function ui(t,n,e){var r;j(e)?e.forEach(e=>ui(t,n,e)):(null==e&&(e=""),n.startsWith("--")?t.setProperty(n,e):(r=function(t,n){var e=di[n];if(e)return e;let r=lt(n);if("filter"!==r&&r in t)return di[n]=r;r=st(r);for(let e=0;e{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();Wn(function(e,t){{if(j(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(t=>e=>!e._stopped&&t&&t(e))}return t}}(e,n.value),t,5,[e])};return n.value=e,n.attached=bi(),n}(r,l),a):o&&(r=o,e.removeEventListener(s,r,a),i[t]=void 0))}const vi=/(?:Once|Passive|Capture)$/;let yi=0;const wi=Promise.resolve(),bi=()=>yi||(wi.then(()=>yi=0),yi=Date.now());const ki=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&96{const t=e.props["onUpdate:modelValue"]||!1;return j(t)?e=>ut(t,e):t};function Ci(e){e.target.composing=!0}function Si(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const b=Symbol("_assign"),Li={created(t,{modifiers:{lazy:e,trim:n,number:r}},l){t[b]=xi(l);const i=r||l.props&&"number"===l.props.type;fi(t,e?"change":"input",e=>{if(!e.target.composing){let e=t.value;n&&(e=e.trim()),i&&(e=dt(e)),t[b](e)}}),n&&fi(t,"change",()=>{t.value=t.value.trim()}),e||(fi(t,"compositionstart",Ci),fi(t,"compositionend",Si),fi(t,"change",Si))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:l}},i){e[b]=xi(i),e.composing||(i=t??"",(!l&&"number"!==e.type||/^0\d/.test(e.value)?e.value:dt(e.value))===i||document.activeElement===e&&"range"!==e.type&&(n||r&&e.value.trim()===i)||(e.value=i))}},Ri={deep:!0,created(a,e,t){a[b]=xi(t),fi(a,"change",()=>{const e=a._modelValue,t=Ti(a),n=a.checked,r=a[b];if(j(e)){var l=xt(e,t),i=-1!==l;if(n&&!i)r(e.concat(t));else if(!n&&i){const o=[...e];o.splice(l,1),r(o)}}else if(qe(e)){const s=new Set(e);n?s.add(t):s.delete(t),r(s)}else r(ji(a,n))})},mounted:Ii,beforeUpdate(e,t,n){e[b]=xi(n),Ii(e,t,n)}};function Ii(e,{value:t,oldValue:n},r){e._modelValue=t,j(t)?e.checked=-1{e[b](Ti(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[b]=xi(r),t!==n&&(e.checked=kt(t,r.props.value))}},Ai={deep:!0,created(t,{value:e,modifiers:{number:n}},r){const l=qe(e);fi(t,"change",()=>{var e=Array.prototype.filter.call(t.options,e=>e.selected).map(e=>n?dt(Ti(e)):Ti(e));t[b](t.multiple?l?new Set(e):e:e[0]),t._assigning=!0,tr(()=>{t._assigning=!1})}),t[b]=xi(r)},mounted(e,{value:t,modifiers:{}}){$i(e,t)},beforeUpdate(e,t,n){e[b]=xi(n)},updated(e,{value:t,modifiers:{}}){e._assigning||$i(e,t)}};function $i(n,r){var l,i=n.multiple,o=j(r);if(!i||o||qe(r)){for(let e=0,t=n.options.length;eString(e)===String(a)):-1{var c,l="svg"===l;if("class"===e)f=r,p=l,u=(c=t)[ni],null==(f=u?(f?[f,...u]:[...u]).join(" "):f)?c.removeAttribute("class"):p?c.setAttribute("class",f):c.className=f;else if("style"===e){var u=t,p=n,d=r;const m=u.style,v=O(d);let e=!1;if(d&&!v){if(p)if(O(p))for(const y of p.split(";")){var h=y.slice(0,y.indexOf(":")).trim();null==d[h]&&ui(m,h,"")}else for(const w in p)null==d[w]&&ui(m,w,"");for(const b in d)"display"===b&&(e=!0),ui(m,b,d[b])}else v?p!==d&&((c=m[si])&&(d+=";"+c),m.cssText=d,e=ai.test(d)):p&&u.removeAttribute("style");ri in u&&(u[ri]=e?m.display:"",u[li]&&(m.display="none"))}else if(Ve(e))De(e)||mi(t,e,0,r,o);else{if(!("."===e[0]?(e=e.slice(1),1):"^"===e[0]?(e=e.slice(1),0):function(e,t,n,r){if(r)return"innerHTML"===t||"textContent"===t||t in e&&ki(t)&&z(n);if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return;if("width"===t||"height"===t){r=e.tagName;if("IMG"===r||"VIDEO"===r||"CANVAS"===r||"SOURCE"===r)return}return(!ki(t)||!O(n))&&t in e}(t,e,r,l)))return"true-value"===e?t._trueValue=r:"false-value"===e&&(t._falseValue=r),o=t,s=e,a=r,void((i=l)&&s.startsWith("xlink:")?null==a?o.removeAttributeNS(hi,s.slice(6,s.length)):o.setAttributeNS(hi,s,a):(i=wt(s),null==a||i&&!bt(a)?o.removeAttribute(s):o.setAttribute(s,i?"":a)));var f=t,g=r;if("innerHTML"===(n=e)||"textContent"===n)i&&a(i,o,s),f[n]=g??"";else{const k=f.tagName;if("value"!==n||"PROGRESS"===k||k.includes("-")){let e=!1;""!==g&&null!=g||("boolean"==(i=typeof f[n])?g=bt(g):null==g&&"string"==i?(g="",e=!0):"number"==i&&(g=0,e=!0));try{f[n]=g}catch{}e&&f.removeAttribute(n)}else a=g??"",("OPTION"===k?f.getAttribute("value")||"":f.value)===a&&"_value"in f||(f.value=a),null==g&&f.removeAttribute(n),f._value=g}}}},ti);let Pi;const Ui=(...e)=>{const r=(Pi=Pi||ml(Mi)).createApp(...e),l=r["mount"];return r.mount=e=>{e=e;const t=O(e)?document.querySelector(e):e;if(t){const n=r._component;z(n)||n.render||n.template||(n.template=t.innerHTML),t.innerHTML="";e=l(t,!1,(e=t)instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0);return t instanceof Element&&(t.removeAttribute("v-cloak"),t.setAttribute("data-v-app","")),e}},r};function Ni(e){C&&(e=e,C&&C.cleanups.push(e))}function Fi(e){return"function"==typeof e?e():Vn(e)}const Vi=typeof window<"u"&&typeof document<"u",Di=Object.prototype.toString,Hi=e=>"[object Object]"===Di.call(e),Bi=()=>{};function Wi(r,l){return function(...n){return new Promise((e,t)=>{Promise.resolve(r(()=>l.apply(this,n),{fn:l,thisArg:this,args:n})).then(e).catch(t)})}}const qi=e=>e();function Gi(e,t=200,n={}){return Wi(function(e,i={}){let o,s,a=Bi;const c=e=>{clearTimeout(e),a(),a=Bi};return n=>{const r=Fi(e),l=Fi(i.maxWait);return o&&c(o),r<=0||void 0!==l&&l<=0?(s&&(c(s),s=null),Promise.resolve(n())):new Promise((e,t)=>{a=i.rejectOnCancel?t:e,l&&!s&&(s=setTimeout(()=>{o&&c(o),s=null,e(n())},l)),o=setTimeout(()=>{s&&c(s),s=null,e(n())},r)})}}(t,n),e)}function Zi(e,t,n={}){const{eventFilter:r,...l}=n,{eventFilter:i,pause:o,resume:s,isActive:a}=function(t=qi){const n=N(!0);return{isActive:Rn(n),pause:function(){n.value=!1},resume:function(){n.value=!0},eventFilter:(...e)=>{n.value&&t(...e)}}}(r);return{stop:function(e,t,n){const{eventFilter:r=qi,...l}=n;return Sr(e,Wi(r,t),l)}(e,t,{...l,eventFilter:i}),pause:o,resume:s,isActive:a}}function Ki(e,t=!0,n){Fl()?zr(e,n):t?e():tr(e)}const Qi=Vi?window:void 0,Xi=Vi?window.document:void 0;function Ji(...e){let t,l,i,n;if("string"==typeof e[0]||Array.isArray(e[0])?([l,i,n]=e,t=Qi):[t,l,i,n]=e,!t)return Bi;Array.isArray(l)||(l=[l]),Array.isArray(i)||(i=[i]);const o=[],s=()=>{o.forEach(e=>e()),o.length=0},r=Sr(()=>[function(e){var t,e=Fi(e);return null!=(t=null==e?void 0:e.$el)?t:e}(t),Fi(n)],([n,e])=>{if(s(),n){const r=Hi(e)?{...e}:e;o.push(...l.flatMap(t=>i.map(e=>((e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)))(n,t,e,r))))}},{immediate:!0,flush:"post"}),a=()=>{r(),s()};Ni(a)}const Yi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},eo="__vueuse_ssr_handlers__",to=(eo in Yi||(Yi[eo]=Yi[eo]||{}),Yi[eo]);const no={boolean:{read:e=>"true"===e,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},ro="vueuse-storage";function lo(r,e,l,t={}){const{flush:n="pre",deep:i=!0,listenToStorageChanges:o=!0,writeDefaults:s=!0,mergeDefaults:a=!1,shallow:c,window:u=Qi,eventFilter:p,onError:d=e=>{console.error(e)},initOnMounted:h}=t,f=(c?Un:N)("function"==typeof e?e():e);if(!l)try{l=(to.getDefaultStorage||(()=>{var e;return null==(e=Qi)?void 0:e.localStorage}))()}catch(e){d(e)}if(!l)return f;const g=Fi(e),m=null==(e=g)?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"object"==typeof e?"object":Number.isNaN(e)?"any":"number",v=null!=(e=t.serializer)?e:no[m],{pause:y,resume:w}=Zi(f,()=>{var e=f.value;try{var t,n=l.getItem(r);null==e?(b(n,null),l.removeItem(r)):(t=v.write(e),n!==t&&(l.setItem(r,t),b(n,t)))}catch(e){d(e)}},{flush:n,deep:i,eventFilter:p});function b(e,t){u&&u.dispatchEvent(new CustomEvent(ro,{detail:{key:r,oldValue:e,newValue:t,storageArea:l}}))}function k(e){if(!e||e.storageArea===l)if(e&&null==e.key)f.value=g;else if(!e||e.key===r){y();try{(null==e?void 0:e.newValue)!==v.write(f.value)&&(f.value=null==(n=(t=e)?t.newValue:l.getItem(r))?(s&&null!=g&&l.setItem(r,v.write(g)),g):!t&&a?(t=v.read(n),"function"==typeof a?a(t,g):"object"!==m||Array.isArray(t)?t:{...g,...t}):"string"!=typeof n?n:v.read(n))}catch(e){d(e)}finally{e?tr(w):w()}}var t,n}function x(e){k(e.detail)}return u&&o&&Ki(()=>{Ji(u,"storage",k),Ji(u,ro,x),h&&k()}),h||k(),f}function io(e={}){const{controls:t=!1,interval:n="requestAnimationFrame"}=e,r=N(new Date),l=()=>r.value=new Date,i="requestAnimationFrame"===n?function(n,e){const{immediate:t=!0,fpsLimit:r=void 0,window:l=Qi}=e,i=N(!1),o=r?1e3/r:null;let s=0,a=null;function c(e){var t;i.value&&l&&(t=e-(s=s||e),a=(o&&t{o.value&&Vi&&c()})),Ni(a),{isActive:o,pause:a,resume:c}}(l,n,{immediate:!0});return t?{now:r,...i}:r}function oo(o,s=Bi,e={}){const{immediate:t=!0,manual:n=!1,type:a="text/javascript",async:c=!0,crossOrigin:u,referrerPolicy:p,noModule:d,defer:h,document:f=Xi,attrs:g={}}=e,m=N(null);let r=null;const l=(e=!0)=>r=r||(i=>new Promise((t,r)=>{const l=e=>(m.value=e,t(e),e);if(f){let e=!1,n=f.querySelector(`script[src="${Fi(o)}"]`);n?n.hasAttribute("data-loaded")&&l(n):((n=f.createElement("script")).type=a,n.async=c,n.src=Fi(o),h&&(n.defer=h),u&&(n.crossOrigin=u),d&&(n.noModule=d),p&&(n.referrerPolicy=p),Object.entries(g).forEach(([e,t])=>null==n?void 0:n.setAttribute(e,t)),e=!0),n.addEventListener("error",e=>r(e)),n.addEventListener("abort",e=>r(e)),n.addEventListener("load",()=>{n.setAttribute("data-loaded","true"),s(n),l(n)}),e&&(n=f.head.appendChild(n)),i||l(n)}else t(!1)}))(e),i=()=>{var e;f&&(r=null,m.value&&(m.value=null),(e=f.querySelector(`script[src="${Fi(o)}"]`))&&f.head.removeChild(e))};return t&&!n&&Ki(l),n||(e=i,Fl()&&Mr(e,v)),{scriptTag:m,load:l,unload:i};var v}let so=0;const ao=e=>!!/@[0-9]+\.[0-9]+\.[0-9]+/.test(e),co=(e,t="",n="",r="")=>(t?t+"/":"")+n+e+(r?"."+r:""),uo=e=>Promise.all(e.map(e=>{if($e(e)){var t=Le(e);const r=lo("WALINE_EMOJI",{}),l=ao(t);if(l){var n=r.value[t];if(n)return Promise.resolve(n)}return fetch(t+"/info.json").then(e=>e.json()).then(e=>{e={folder:t,...e};return l&&(r.value[t]=e),e})}return Promise.resolve(e)})).then(e=>{const s={tabs:[],map:{}};return e.forEach(e=>{const{name:t,folder:n,icon:r,prefix:l="",type:i,items:o}=e;s.tabs.push({name:t,icon:co(r,n,l,i),items:o.map(e=>{var t=""+l+e;return s.map[t]=co(e,n,l,i),t})})}),s}),po=e=>{"AbortError"!==e.name&&console.error(e.message)},ho=e=>e instanceof HTMLElement?e:$e(e)?document.querySelector(e):null,fo=e=>e.type.includes("image"),go=e=>{const t=Array.from(e).find(fo);return t?t.getAsFile():null};function mo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let vo=mo();function yo(e){vo=e}const wo=/[&<>"']/,bo=new RegExp(wo.source,"g"),ko=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,xo=new RegExp(ko.source,"g"),_o={"&":"&","<":"<",">":">",'"':""","'":"'"},Co=e=>_o[e];function s(e,t){if(t){if(wo.test(e))return e.replace(bo,Co)}else if(ko.test(e))return e.replace(xo,Co);return e}const So=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;const Lo=/(^|[^\[])\^/g;function n(e,t){let r="string"==typeof e?e:e.source;t=t||"";const l={replace:(e,t)=>{let n="string"==typeof t?t:t.source;return n=n.replace(Lo,"$1"),r=r.replace(e,n),l},getRegex:()=>new RegExp(r,t)};return l}function Ro(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}t={exec:()=>null};function Io(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,l=t;for(;0<=--l&&"\\"===n[l];)r=!r;return r?"|":" |"}),r=n.split(/ \|/);let l=0;if(r[0].trim()||r.shift(),0t)r.splice(t);else for(;r.length{var t=e.match(/^\s+/);if(null===t)return e;var[t]=t;return t.length>=n.length?e.slice(n.length):e}).join(` +`)}(e=t[0],t[3]||""),{type:"code",raw:e,lang:t[2]&&t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"),text:n}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const n=Eo(e,"#");!this.options.pedantic&&n&&!/ $/.test(n)||(e=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){e=this.rules.block.hr.exec(e);if(e)return{type:"hr",raw:e[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){let e=n[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` + $1`);e=Eo(e.replace(/^ *>[ \t]?/gm,""),` +`);var t=this.lexer.state.top,r=(this.lexer.state.top=!0,this.lexer.blockTokens(e));return this.lexer.state.top=t,{type:"blockquote",raw:n[0],tokens:r,text:e}}}list(u){let p=this.rules.block.list.exec(u);if(p){let e=p[1].trim();const t=1" ".repeat(3*e.length)),n=u.split(` +`,1)[0],r=0,l=(this.options.pedantic?(r=2,a=t.trimStart()):(r=4<(r=p[2].search(/[^ ]/))?1:r,a=t.slice(r),r+=p[1].length),!1);if(!t&&/^ *$/.test(n)&&(s+=n+` +`,u=u.substring(n.length+1),e=!0),!e){const g=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),m=new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),v=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),y=new RegExp(`^ {0,${Math.min(3,r-1)}}#`);for(;u;){var d=u.split(` +`,1)[0];if(n=d,this.options.pedantic&&(n=n.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),v.test(n)||y.test(n)||g.test(n)||m.test(u))break;if(n.search(/[^ ]/)>=r||!n.trim())a+=` +`+n.slice(r);else{if(l||4<=t.search(/[^ ]/)||v.test(t)||y.test(t)||m.test(t))break;a+=` +`+n}l||n.trim()||(l=!0),s+=d+` +`,u=u.substring(d.length+1),t=n.slice(r)}}h.loose||(c?h.loose=!0:/\n *\n *$/.test(s)&&(c=!0));let i=null,o;this.options.gfm&&((i=/^\[[ xX]\] /.exec(a))&&(o="[ ] "!==i[0],a=a.replace(/^\[[ xX]\] +/,""))),h.items.push({type:"list_item",raw:s,task:!!i,checked:o,loose:!1,text:a,tokens:[]}),h.raw+=s}h.items[h.items.length-1].raw=s.trimEnd(),h.items[h.items.length-1].text=a.trimEnd(),h.raw=h.raw.trimEnd();for(let e=0;e"space"===e.type),r=0/\n.*\n/.test(e.raw));h.loose=r}if(h.loose)for(let e=0;e$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]&&t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"),{type:"def",tag:e,raw:t[0],href:n,title:r}}table(e){const t=this.rules.block.table.exec(e);if(t&&/[:|]/.test(t[2])){const n=Io(t[1]),r=t[2].replace(/^\||\| *$/g,"").split("|"),l=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split(` +`):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(const o of r)/^ *-+: *$/.test(o)?i.align.push("right"):/^ *:-+: *$/.test(o)?i.align.push("center"):/^ *:-+ *$/.test(o)?i.align.push("left"):i.align.push(null);for(const s of n)i.header.push({text:s,tokens:this.lexer.inline(s)});for(const a of l)i.rows.push(Io(a,i.header.length).map(e=>({text:e,tokens:this.lexer.inline(e)})));return i}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t)return e=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1],{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}text(e){e=this.rules.block.text.exec(e);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(e){e=this.rules.inline.escape.exec(e);if(e)return{type:"escape",raw:e[0],text:s(e[1])}}tag(e){e=this.rules.inline.tag.exec(e);if(e)return!this.lexer.state.inLink&&/^/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(n){const r=this.rules.inline.link.exec(n);if(r){const i=r[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;n=Eo(i.slice(0,-1),"\\");if((i.length-n.length)%2==0)return}else{var l,n=function(t,n){if(-1===t.indexOf(n[1]))return-1;let r=0;for(let e=0;e$/.test(i)?e.slice(1):e.slice(1,-1)),Ao(r,{href:e&&e.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const r=(n[2]||n[1]).replace(/\s+/g," "),l=t[r.toLowerCase()];return l?Ao(n,l,n[0],this.lexer):{type:"text",raw:e=n[0].charAt(0),text:e}}}emStrong(l,i,e=""){let o=this.rules.inline.emStrongLDelim.exec(l);if(!(!o||o[3]&&e.match(/[\p{L}\p{N}]/u))&&(!o[1]&&!o[2]||!e||this.rules.inline.punctuation.exec(e))){var s=[...o[0]].length-1;let e,t,n=s,r=0;const c="*"===o[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,i=i.slice(-1*l.length+s);null!=(o=c.exec(i));)if(e=o[1]||o[2]||o[3]||o[4]||o[5]||o[6])if(t=[...e].length,o[3]||o[4])n+=t;else if((o[5]||o[6])&&s%3&&!((s+t)%3))r+=t;else if(!(0<(n-=t))){t=Math.min(t,t+n+r);const u=[...o[0]][0].length,p=l.slice(0,s+o.index+u+t);if(Math.min(s,t)%2)return a=p.slice(1,-1),{type:"em",raw:p,text:a,tokens:this.lexer.inlineTokens(a)};var a=p.slice(2,-2);return{type:"strong",raw:p,text:a,tokens:this.lexer.inlineTokens(a)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let e=n[2].replace(/\n/g," ");var t=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return e=s(e=t&&r?e.substring(1,e.length-1):e,!0),{type:"codespan",raw:n[0],text:e}}}br(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}}del(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n){n=this.rules.inline.autolink.exec(n);if(n){let e,t;return t="@"===n[2]?"mailto:"+(e=s(n[1])):e=s(n[1]),{type:"link",raw:n[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var n,r;let l;if(l=this.rules.inline.url.exec(e)){let e,t;if("@"===l[2])e=s(l[0]),t="mailto:"+e;else{for(;r=l[0],l[0]=(null==(n=this.rules.inline._backpedal.exec(l[0]))?void 0:n[0])??"",r!==l[0];);e=s(l[0]),t="www."===l[1]?"http://"+l[0]:l[0]}return{type:"link",raw:l[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(t){t=this.rules.inline.text.exec(t);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:s(t[0]),{type:"text",raw:t[0],text:e}}}}const To=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,jo=/(?:[*+-]|\d{1,9}[.)])/,zo=n(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,jo).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Oo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Mo=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Po=n(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Mo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Uo=n(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,jo).getRegex(),No="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Fo=/|$))/,Vo=n("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",Fo).replace("tag",No).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Do=n(Oo).replace("hr",To).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",No).getRegex(),Ho={blockquote:n(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Do).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:Po,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:To,html:Vo,lheading:zo,list:Uo,newline:/^(?: *(?:\n|$))+/,paragraph:Do,table:t,text:/^[^\n]+/},Bo=n("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",To).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",No).getRegex(),Wo={...Ho,table:Bo,paragraph:n(Oo).replace("hr",To).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Bo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",No).getRegex()},qo={...Ho,html:n(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Fo).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:t,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:n(Oo).replace("hr",To).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",zo).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Go=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Zo=/^( {2,}|\\)\n(?!\s*$)/,Ko="\\p{P}\\p{S}",Qo=n(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,Ko).getRegex(),Xo=n(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Ko).getRegex(),Jo=n("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Ko).getRegex(),Yo=n("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Ko).getRegex(),es=n(/\\([punct])/,"gu").replace(/punct/g,Ko).getRegex(),ts=n(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ns=n(Fo).replace("(?:--\x3e|$)","--\x3e").getRegex(),rs=n("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ns).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ls=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,is=n(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",ls).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),os=n(/^!?\[(label)\]\[(ref)\]/).replace("label",ls).replace("ref",Mo).getRegex(),ss=n(/^!?\[(ref)\](?:\[\])?/).replace("ref",Mo).getRegex(),as=n("reflink|nolink(?!\\()","g").replace("reflink",os).replace("nolink",ss).getRegex(),cs={_backpedal:t,anyPunctuation:es,autolink:ts,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:Zo,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:t,emStrongLDelim:Xo,emStrongRDelimAst:Jo,emStrongRDelimUnd:Yo,escape:Go,link:is,nolink:ss,punctuation:Qo,reflink:os,reflinkSearch:as,tag:rs,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length));let n,e,l,i;for(;r;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(e=>!!(n=e.call({lexer:this},r,t))&&(r=r.substring(n.raw.length),t.push(n),!0)))){if(n=this.tokenizer.space(r)){r=r.substring(n.raw.length),1===n.raw.length&&0{"number"==typeof(n=e.call({lexer:this},s))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(l=r.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){e=t[t.length-1],i&&"paragraph"===e.type?(e.raw+=` +`+n.raw,e.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=e.text):t.push(n),i=l.length!==r.length,r=r.substring(n.raw.length);continue}if(n=this.tokenizer.text(r)){r=r.substring(n.raw.length),(e=t[t.length-1])&&"text"===e.type?(e.raw+=` +`+n.raw,e.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=e.text):t.push(n);continue}if(r){var o="Infinite loop on byte: "+r.charCodeAt(0);if(this.options.silent){console.error(o);break}throw new Error(o)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(r,t=[]){let n,e,l,i=r,o,s,a;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(0!!(n=e.call({lexer:this},r,t))&&(r=r.substring(n.raw.length),t.push(n),!0)))){if(n=this.tokenizer.escape(r)){r=r.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.tag(r)){r=r.substring(n.raw.length),(e=t[t.length-1])&&"text"===n.type&&"text"===e.type?(e.raw+=n.raw,e.text+=n.text):t.push(n);continue}if(n=this.tokenizer.link(r)){r=r.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(r,this.tokens.links)){r=r.substring(n.raw.length),(e=t[t.length-1])&&"text"===n.type&&"text"===e.type?(e.raw+=n.raw,e.text+=n.text):t.push(n);continue}if(n=this.tokenizer.emStrong(r,i,a)){r=r.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.codespan(r)){r=r.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.br(r)){r=r.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.del(r)){r=r.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.autolink(r)){r=r.substring(n.raw.length),t.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(r))){r=r.substring(n.raw.length),t.push(n);continue}if(l=r,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const p=r.slice(1);let n;this.options.extensions.startInline.forEach(e=>{"number"==typeof(n=e.call({lexer:this},p))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(l=r.substring(0,t+1))}if(n=this.tokenizer.inlineText(l)){r=r.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(a=n.raw.slice(-1)),s=!0,(e=t[t.length-1])&&"text"===e.type?(e.raw+=n.raw,e.text+=n.text):t.push(n);continue}if(r){var c="Infinite loop on byte: "+r.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}return t}}class ms{options;constructor(e){this.options=e||vo}code(e,t,n){t=null==(t=(t||"").match(/^\S*/))?void 0:t[0];return e=e.replace(/\n$/,"")+` +`,t?'
    '+(n?e:s(e,!0))+`
    +`:"
    "+(n?e:s(e,!0))+`
    +`}blockquote(e){return`
    +${e}
    +`}html(e,t){return e}heading(e,t,n){return`${e} +`}hr(){return`
    +`}list(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+`> +`+e+" +`}listitem(e,t,n){return`
  • ${e}
  • +`}checkbox(e){return"'}paragraph(e){return`

    ${e}

    +`}table(e,t){return` + +`+e+` +`+(t=t&&`${t}`)+`
    +`}tablerow(e){return` +${e} +`}tablecell(e,t){var n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+` +`}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return"
    "}del(e){return`${e}`}link(e,t,n){var r=Ro(e);if(null===r)return n;let l='
    "}image(e,t,n){var r=Ro(e);if(null===r)return n;let l=`${n}"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""));continue;case"code":i+=this.renderer.code(o.text,o.lang,!!o.escaped);continue;case"table":{var a=o;let e="",t="";for(let e=0;e{e=c[e].flat(1/0);r=r.concat(this.walkTokens(e,t))}):c.tokens&&(r=r.concat(this.walkTokens(c.tokens,t)))}}return r}use(...e){const w=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{const t={...e};if(t.async=this.defaults.async||t.async||!1,e.extensions&&(e.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){const r=w.renderers[n.name];r?w.renderers[n.name]=function(...e){let t=n.renderer.apply(this,e);return t=!1===t?r.apply(this,e):t}:w.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");const e=w[n.level];e?e.unshift(n.tokenizer):w[n.level]=[n.tokenizer],n.start&&("block"===n.level?w.startBlock?w.startBlock.push(n.start):w.startBlock=[n.start]:"inline"===n.level&&(w.startInline?w.startInline.push(n.start):w.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(w.childTokens[n.name]=n.childTokens)}),t.extensions=w),e.renderer){const n=this.defaults.renderer||new ms(this.defaults);for(const r in e.renderer){if(!(r in n))throw new Error(`renderer '${r}' does not exist`);if("options"!==r){const l=r,i=e.renderer[l],o=n[l];n[l]=(...e)=>{let t=i.apply(n,e);return(t=!1===t?o.apply(n,e):t)||""}}}t.renderer=n}if(e.tokenizer){const s=this.defaults.tokenizer||new $o(this.defaults);for(const a in e.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(!["options","rules","lexer"].includes(a)){const c=a,u=e.tokenizer[c],p=s[c];s[c]=(...e)=>{let t=u.apply(s,e);return t=!1===t?p.apply(s,e):t}}}t.tokenizer=s}if(e.hooks){const d=this.defaults.hooks||new ws;for(const h in e.hooks){if(!(h in d))throw new Error(`hook '${h}' does not exist`);if("options"!==h){const f=h,g=e.hooks[f],m=d[f];ws.passThroughHooks.has(h)?d[f]=e=>{if(this.defaults.async)return Promise.resolve(g.call(d,e)).then(e=>m.call(d,e));e=g.call(d,e);return m.call(d,e)}:d[f]=(...e)=>{let t=g.apply(d,e);return t=!1===t?m.apply(d,e):t}}}t.hooks=d}if(e.walkTokens){const v=this.defaults.walkTokens,y=e.walkTokens;t.walkTokens=function(e){let t=[];return t.push(y.call(this,e)),t=v?t.concat(v.call(this,e)):t}}this.defaults={...this.defaults,...t}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return gs.lex(e,t??this.defaults)}parser(e,t){return ys.parse(e,t??this.defaults)}}i=new WeakSet,x=function(i,o){return(n,e)=>{const t={...e},r={...this.defaults,...t},l=(!0===this.defaults.async&&!1===t.async&&(r.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),r.async=!0),_i(this,L,R).call(this,!!r.silent,!!r.async));if("u"i(e,r)).then(e=>r.hooks?r.hooks.processAllTokens(e):e).then(e=>r.walkTokens?Promise.all(this.walkTokens(e,r.walkTokens)).then(()=>e):e).then(e=>o(e,r)).then(e=>r.hooks?r.hooks.postprocess(e):e).catch(l);try{r.hooks&&(n=r.hooks.preprocess(n));let e=i(n,r),t=(r.hooks&&(e=r.hooks.processAllTokens(e)),r.walkTokens&&this.walkTokens(e,r.walkTokens),o(e,r));return t=r.hooks?r.hooks.postprocess(t):t}catch(e){return l(e)}}},L=new WeakSet,R=function(n,r){return e=>{var t;if(e.message+=` +Please report this to https://github.com/markedjs/marked.`,n)return t="

    An error occurred:

    "+s(e.message+"",!0)+"
    ",r?Promise.resolve(t):t;if(r)return Promise.reject(e);throw e}};const ks=new bs;function r(e,t){return ks.parse(e,t)}function xs(e){return(e||"").match(/\S*/)[0]}function _s(t){return e=>{"string"==typeof e&&e!==t.text&&(t.escaped=!0,t.text=e)}}r.options=r.setOptions=function(e){return ks.setOptions(e),yo(r.defaults=ks.defaults),r},r.getDefaults=mo,r.defaults=vo,r.use=function(...e){return ks.use(...e),yo(r.defaults=ks.defaults),r},r.walkTokens=function(e,t){return ks.walkTokens(e,t)},r.parseInline=ks.parseInline,r.Parser=ys,r.parser=ys.parse,r.Renderer=ms,r.TextRenderer=vs,r.Lexer=gs,r.lexer=gs.lex,r.Tokenizer=$o,r.Hooks=ws,r.parse=r;const Cs=/[&<>"']/,Ss=new RegExp(Cs.source,"g"),Ls=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Rs=new RegExp(Ls.source,"g"),Is={"&":"&","<":"<",">":">",'"':""","'":"'"},Es=e=>Is[e];function As(e,t){if(t){if(Cs.test(e))return e.replace(Ss,Es)}else if(Ls.test(e))return e.replace(Rs,Es);return e}const $s=/\$.*?\$/,Ts=/^\$(.*?)\$/,js=/^(?:\s{0,3})\$\$((?:[^\n]|\n[^\n])+?)\n{0,1}\$\$/,zs=(e="",n={})=>e.replace(/:(.+?):/g,(e,t)=>n[t]?`${t}`:e),Os=(e,{emojiMap:t,highlighter:n,texRenderer:r})=>{const l=new bs;var i;return l.setOptions({breaks:!0}),n&&l.use(function(r){if((r="function"==typeof r?{highlight:r}:r)&&"function"==typeof r.highlight)return"string"!=typeof r.langPrefix&&(r.langPrefix="language-"),{async:!!r.async,walkTokens(e){if("code"===e.type){var t=xs(e.lang);if(r.async)return Promise.resolve(r.highlight(e.text,t,e.lang||"")).then(_s(e));t=r.highlight(e.text,t,e.lang||"");if(t instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");_s(e)(t)}},renderer:{code(e,t,n){t=xs(t),t=t?` class="${r.langPrefix}${As(t)}"`:"";return e=e.replace(/\n$/,""),`
    ${n?e:As(e,!0)}
    +
    `}}};throw new Error("Must provide highlight function")}({highlight:n})),r&&(i=r,l.use({extensions:[{name:"blockMath",level:"block",tokenizer(e){e=js.exec(e);if(null!==e)return{type:"html",raw:e[0],text:i(!0,e[1])}}},{name:"inlineMath",level:"inline",start(e){var t=e.search($s);return-1!==t?t:e.length},tokenizer(e){e=Ts.exec(e);if(null!==e)return{type:"html",raw:e[0],text:i(!1,e[1])}}}]})),l.parse(zs(e,t))},Ms=e=>{e=e.dataset.path;return null!=e&&e.length?e:null},Ps=({serverURL:e,path:t=window.location.pathname,selector:n=".waline-comment-count",lang:r=navigator.language})=>{const l=new AbortController,i=document.querySelectorAll(n);return i.length&&B({serverURL:Ie(e),paths:Array.from(i).map(e=>Se(Ms(e)??t)),lang:r,signal:l.signal}).then(n=>{i.forEach((e,t)=>{e.innerText=n[t].toString()})}).catch(po),l.abort.bind(l)},Us=({size:e})=>w("svg",{class:"wl-close-icon",viewBox:"0 0 1024 1024",width:e,height:e},[w("path",{d:"M697.173 85.333h-369.92c-144.64 0-241.92 101.547-241.92 252.587v348.587c0 150.613 97.28 252.16 241.92 252.16h369.92c144.64 0 241.494-101.547 241.494-252.16V337.92c0-151.04-96.854-252.587-241.494-252.587z",fill:"currentColor"}),w("path",{d:"m640.683 587.52-75.947-75.861 75.904-75.862a37.29 37.29 0 0 0 0-52.778 37.205 37.205 0 0 0-52.779 0l-75.946 75.818-75.862-75.946a37.419 37.419 0 0 0-52.821 0 37.419 37.419 0 0 0 0 52.821l75.947 75.947-75.776 75.733a37.29 37.29 0 1 0 52.778 52.821l75.776-75.776 75.947 75.947a37.376 37.376 0 0 0 52.779-52.821z",fill:"#888"})]),Ns=()=>w("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},w("path",{d:"m341.013 394.667 27.755 393.45h271.83l27.733-393.45h64.106l-28.01 397.952a64 64 0 0 1-63.83 59.498H368.768a64 64 0 0 1-63.83-59.52l-28.053-397.93h64.128zm139.307 19.818v298.667h-64V414.485h64zm117.013 0v298.667h-64V414.485h64zM181.333 288h640v64h-640v-64zm453.483-106.667v64h-256v-64h256z",fill:"red"})),Fs=()=>w("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},w("path",{d:"M563.2 463.3 677 540c1.7 1.2 3.7 1.8 5.8 1.8.7 0 1.4-.1 2-.2 2.7-.5 5.1-2.1 6.6-4.4l25.3-37.8c1.5-2.3 2.1-5.1 1.6-7.8s-2.1-5.1-4.4-6.6l-73.6-49.1 73.6-49.1c2.3-1.5 3.9-3.9 4.4-6.6.5-2.7 0-5.5-1.6-7.8l-25.3-37.8a10.1 10.1 0 0 0-6.6-4.4c-.7-.1-1.3-.2-2-.2-2.1 0-4.1.6-5.8 1.8l-113.8 76.6c-9.2 6.2-14.7 16.4-14.7 27.5.1 11 5.5 21.3 14.7 27.4zM387 348.8h-45.5c-5.7 0-10.4 4.7-10.4 10.4v153.3c0 5.7 4.7 10.4 10.4 10.4H387c5.7 0 10.4-4.7 10.4-10.4V359.2c0-5.7-4.7-10.4-10.4-10.4zm333.8 241.3-41-20a10.3 10.3 0 0 0-8.1-.5c-2.6.9-4.8 2.9-5.9 5.4-30.1 64.9-93.1 109.1-164.4 115.2-5.7.5-9.9 5.5-9.5 11.2l3.9 45.5c.5 5.3 5 9.5 10.3 9.5h.9c94.8-8 178.5-66.5 218.6-152.7 2.4-5 .3-11.2-4.8-13.6zm186-186.1c-11.9-42-30.5-81.4-55.2-117.1-24.1-34.9-53.5-65.6-87.5-91.2-33.9-25.6-71.5-45.5-111.6-59.2-41.2-14-84.1-21.1-127.8-21.1h-1.2c-75.4 0-148.8 21.4-212.5 61.7-63.7 40.3-114.3 97.6-146.5 165.8-32.2 68.1-44.3 143.6-35.1 218.4 9.3 74.8 39.4 145 87.3 203.3.1.2.3.3.4.5l36.2 38.4c1.1 1.2 2.5 2.1 3.9 2.6 73.3 66.7 168.2 103.5 267.5 103.5 73.3 0 145.2-20.3 207.7-58.7 37.3-22.9 70.3-51.5 98.1-85 27.1-32.7 48.7-69.5 64.2-109.1 15.5-39.7 24.4-81.3 26.6-123.8 2.4-43.6-2.5-87-14.5-129zm-60.5 181.1c-8.3 37-22.8 72-43 104-19.7 31.1-44.3 58.6-73.1 81.7-28.8 23.1-61 41-95.7 53.4-35.6 12.7-72.9 19.1-110.9 19.1-82.6 0-161.7-30.6-222.8-86.2l-34.1-35.8c-23.9-29.3-42.4-62.2-55.1-97.7-12.4-34.7-18.8-71-19.2-107.9-.4-36.9 5.4-73.3 17.1-108.2 12-35.8 30-69.2 53.4-99.1 31.7-40.4 71.1-72 117.2-94.1 44.5-21.3 94-32.6 143.4-32.6 49.3 0 97 10.8 141.8 32 34.3 16.3 65.3 38.1 92 64.8 26.1 26 47.5 56 63.6 89.2 16.2 33.2 26.6 68.5 31 105.1 4.6 37.5 2.7 75.3-5.6 112.3z",fill:"currentColor"})),Vs=()=>w("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[w("path",{d:"M784 112H240c-88 0-160 72-160 160v480c0 88 72 160 160 160h544c88 0 160-72 160-160V272c0-88-72-160-160-160zm96 640c0 52.8-43.2 96-96 96H240c-52.8 0-96-43.2-96-96V272c0-52.8 43.2-96 96-96h544c52.8 0 96 43.2 96 96v480z",fill:"currentColor"}),w("path",{d:"M352 480c52.8 0 96-43.2 96-96s-43.2-96-96-96-96 43.2-96 96 43.2 96 96 96zm0-128c17.6 0 32 14.4 32 32s-14.4 32-32 32-32-14.4-32-32 14.4-32 32-32zm462.4 379.2-3.2-3.2-177.6-177.6c-25.6-25.6-65.6-25.6-91.2 0l-80 80-36.8-36.8c-25.6-25.6-65.6-25.6-91.2 0L200 728c-4.8 6.4-8 14.4-8 24 0 17.6 14.4 32 32 32 9.6 0 16-3.2 22.4-9.6L380.8 640l134.4 134.4c6.4 6.4 14.4 9.6 24 9.6 17.6 0 32-14.4 32-32 0-9.6-4.8-17.6-9.6-24l-52.8-52.8 80-80L769.6 776c6.4 4.8 12.8 8 20.8 8 17.6 0 32-14.4 32-32 0-8-3.2-16-8-20.8z",fill:"currentColor"})]),Ds=({active:e=!1})=>w("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[w("path",{d:"M850.654 323.804c-11.042-25.625-26.862-48.532-46.885-68.225-20.022-19.61-43.258-34.936-69.213-45.73-26.78-11.124-55.124-16.727-84.375-16.727-40.622 0-80.256 11.123-114.698 32.135A214.79 214.79 0 0 0 512 241.819a214.79 214.79 0 0 0-23.483-16.562c-34.442-21.012-74.076-32.135-114.698-32.135-29.25 0-57.595 5.603-84.375 16.727-25.872 10.711-49.19 26.12-69.213 45.73-20.105 19.693-35.843 42.6-46.885 68.225-11.453 26.615-17.303 54.877-17.303 83.963 0 27.439 5.603 56.03 16.727 85.117 9.31 24.307 22.659 49.52 39.715 74.981 27.027 40.293 64.188 82.316 110.33 124.915 76.465 70.615 152.189 119.394 155.402 121.371l19.528 12.525c8.652 5.52 19.776 5.52 28.427 0l19.529-12.525c3.213-2.06 78.854-50.756 155.401-121.371 46.143-42.6 83.304-84.622 110.33-124.915 17.057-25.46 30.487-50.674 39.716-74.981 11.124-29.087 16.727-57.678 16.727-85.117.082-29.086-5.768-57.348-17.221-83.963z"+(e?"":"M512 761.5S218.665 573.55 218.665 407.767c0-83.963 69.461-152.023 155.154-152.023 60.233 0 112.473 33.618 138.181 82.727 25.708-49.109 77.948-82.727 138.18-82.727 85.694 0 155.155 68.06 155.155 152.023C805.335 573.551 512 761.5 512 761.5z"),fill:e?"red":"currentColor"})]),Hs=()=>w("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},[w("path",{d:"M710.816 654.301c70.323-96.639 61.084-230.578-23.705-314.843-46.098-46.098-107.183-71.109-172.28-71.109-65.008 0-126.092 25.444-172.28 71.109-45.227 46.098-70.756 107.183-70.756 172.106 0 64.923 25.444 126.007 71.194 172.106 46.099 46.098 107.184 71.109 172.28 71.109 51.414 0 100.648-16.212 142.824-47.404l126.53 126.006c7.058 7.06 16.297 10.979 26.406 10.979 10.105 0 19.343-3.919 26.402-10.979 14.467-14.467 14.467-38.172 0-52.723L710.816 654.301zm-315.107-23.265c-65.88-65.88-65.88-172.54 0-238.42 32.069-32.07 74.245-49.149 119.471-49.149 45.227 0 87.407 17.603 119.472 49.149 65.88 65.879 65.88 172.539 0 238.42-63.612 63.178-175.242 63.178-238.943 0zm0 0",fill:"currentColor"}),w("path",{d:"M703.319 121.603H321.03c-109.8 0-199.469 89.146-199.469 199.38v382.034c0 109.796 89.236 199.38 199.469 199.38h207.397c20.653 0 37.384-16.645 37.384-37.299 0-20.649-16.731-37.296-37.384-37.296H321.03c-68.582 0-124.352-55.77-124.352-124.267V321.421c0-68.496 55.77-124.267 124.352-124.267h382.289c68.582 0 124.352 55.771 124.352 124.267V524.72c0 20.654 16.736 37.299 37.385 37.299 20.654 0 37.384-16.645 37.384-37.299V320.549c-.085-109.8-89.321-198.946-199.121-198.946zm0 0",fill:"currentColor"})]),Bs=()=>w("svg",{width:"16",height:"16",ariaHidden:"true"},w("path",{d:"M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z",fill:"currentColor"})),Ws=()=>w("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},w("path",{d:"M810.667 213.333a64 64 0 0 1 64 64V704a64 64 0 0 1-64 64H478.336l-146.645 96.107a21.333 21.333 0 0 1-33.024-17.856V768h-85.334a64 64 0 0 1-64-64V277.333a64 64 0 0 1 64-64h597.334zm0 64H213.333V704h149.334v63.296L459.243 704h351.424V277.333zm-271.36 213.334v64h-176.64v-64h176.64zm122.026-128v64H362.667v-64h298.666z",fill:"currentColor"})),qs=()=>w("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24"},w("path",{d:"M813.039 318.772L480.53 651.278H360.718V531.463L693.227 198.961C697.904 194.284 704.027 192 710.157 192C716.302 192 722.436 194.284 727.114 198.961L813.039 284.88C817.72 289.561 820 295.684 820 301.825C820 307.95 817.72 314.093 813.039 318.772ZM710.172 261.888L420.624 551.431V591.376H460.561L750.109 301.825L710.172 261.888ZM490.517 291.845H240.906V771.09H720.156V521.479C720.156 504.947 733.559 491.529 750.109 491.529C766.653 491.529 780.063 504.947 780.063 521.479V791.059C780.063 813.118 762.18 831 740.125 831H220.937C198.882 831 181 813.118 181 791.059V271.872C181 249.817 198.882 231.935 220.937 231.935H490.517C507.06 231.935 520.47 245.352 520.47 261.888C520.47 278.424 507.06 291.845 490.517 291.845Z",fill:"currentColor"})),Gs=()=>w("svg",{class:"verified-icon",viewBox:"0 0 1024 1024",width:"14",height:"14"},w("path",{d:"m894.4 461.56-54.4-63.2c-10.4-12-18.8-34.4-18.8-50.4v-68c0-42.4-34.8-77.2-77.2-77.2h-68c-15.6 0-38.4-8.4-50.4-18.8l-63.2-54.4c-27.6-23.6-72.8-23.6-100.8 0l-62.8 54.8c-12 10-34.8 18.4-50.4 18.4h-69.2c-42.4 0-77.2 34.8-77.2 77.2v68.4c0 15.6-8.4 38-18.4 50l-54 63.6c-23.2 27.6-23.2 72.4 0 100l54 63.6c10 12 18.4 34.4 18.4 50v68.4c0 42.4 34.8 77.2 77.2 77.2h69.2c15.6 0 38.4 8.4 50.4 18.8l63.2 54.4c27.6 23.6 72.8 23.6 100.8 0l63.2-54.4c12-10.4 34.4-18.8 50.4-18.8h68c42.4 0 77.2-34.8 77.2-77.2v-68c0-15.6 8.4-38.4 18.8-50.4l54.4-63.2c23.2-27.6 23.2-73.2-.4-100.8zm-216-25.2-193.2 193.2a30 30 0 0 1-42.4 0l-96.8-96.8a30.16 30.16 0 0 1 0-42.4c11.6-11.6 30.8-11.6 42.4 0l75.6 75.6 172-172c11.6-11.6 30.8-11.6 42.4 0 11.6 11.6 11.6 30.8 0 42.4z",fill:"#27ae60"})),Zs=({size:e=100})=>w("svg",{width:e,height:e,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},w("circle",{cx:50,cy:50,fill:"none",stroke:"currentColor",strokeWidth:"4",r:"40","stroke-dasharray":"85 30"},w("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1"}))),Ks=()=>w("svg",{width:24,height:24,fill:"currentcolor",viewBox:"0 0 24 24"},[w("path",{style:"transform: translateY(0.5px)",d:"M18.968 10.5H15.968V11.484H17.984V12.984H15.968V15H14.468V9H18.968V10.5V10.5ZM8.984 9C9.26533 9 9.49967 9.09367 9.687 9.281C9.87433 9.46833 9.968 9.70267 9.968 9.984V10.5H6.499V13.5H8.468V12H9.968V14.016C9.968 14.2973 9.87433 14.5317 9.687 14.719C9.49967 14.9063 9.26533 15 8.984 15H5.984C5.70267 15 5.46833 14.9063 5.281 14.719C5.09367 14.5317 5 14.2973 5 14.016V9.985C5 9.70367 5.09367 9.46933 5.281 9.282C5.46833 9.09467 5.70267 9.001 5.984 9.001H8.984V9ZM11.468 9H12.968V15H11.468V9V9Z"}),w("path",{d:"M18.5 3H5.75C3.6875 3 2 4.6875 2 6.75V18C2 20.0625 3.6875 21.75 5.75 21.75H18.5C20.5625 21.75 22.25 20.0625 22.25 18V6.75C22.25 4.6875 20.5625 3 18.5 3ZM20.75 18C20.75 19.2375 19.7375 20.25 18.5 20.25H5.75C4.5125 20.25 3.5 19.2375 3.5 18V6.75C3.5 5.5125 4.5125 4.5 5.75 4.5H18.5C19.7375 4.5 20.75 5.5125 20.75 6.75V18Z"})]);let Qs=null;const Xs=()=>Qs=Qs??lo("WALINE_LIKE",[]);let Js=null;var we=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ys={},he={},fe={},ea=we&&we.__awaiter||function(e,o,s,a){return new(s=s||Promise)(function(n,t){function r(e){try{i(a.next(e))}catch(e){t(e)}}function l(e){try{i(a.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,l)}i((a=a.apply(e,o||[])).next())})},ta=we&&we.__generator||function(r,l){var i,o,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(n){return function(e){var t=[n,e];if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)return s;switch(o=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,o=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]aa=aa??lo("WALINE_USER",{});be=Ar({__name:"ArticleReaction",setup(e,{expose:t}){t();const i=Js=Js??lo("WALINE_REACTION",{}),o=Xr("config"),s=N(-1),a=N([]),r=F(()=>o.value.locale),c=F(()=>0{const{reaction:e,path:n}=o.value;return e.map((e,t)=>({icon:e,desc:r.value["reaction"+t],active:i.value[n]===t}))});let u;const l=async()=>{if(c.value){const{serverURL:e,lang:t,path:n,reaction:r}=o.value,l=new AbortController,i=(u=l.abort.bind(l),await M({serverURL:e,lang:t,paths:[n],type:r.map((e,t)=>"reaction"+t),signal:l.signal}));a.value=r.map((e,t)=>i[0]["reaction"+t])}};zr(()=>{Lr(()=>[o.value.serverURL,o.value.path],()=>{l()},{immediate:!0})}),Mr(()=>null==u?void 0:u());t={reactionStorage:i,config:o,votingIndex:s,voteNumbers:a,locale:r,isReactionEnabled:c,reactionsInfo:n,get abort(){return u},set abort(e){u=e},fetchReaction:l,vote:async e=>{var t,n,r,l;-1===s.value&&({serverURL:t,lang:n,path:r}=o.value,l=i.value[r],s.value=e,void 0!==l&&(await P({serverURL:t,lang:n,path:r,type:"reaction"+l,action:"desc"}),a.value[l]=Math.max(a.value[l]-1,0)),l!==e&&(await P({serverURL:t,lang:n,path:r,type:"reaction"+e}),a.value[e]=(a.value[e]||0)+1),l===e?delete i.value[r]:i.value[r]=e,s.value=-1)},get LoadingIcon(){return Zs}};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}}),t=(e,t)=>{const n=e.__vccOpts||e;for(var[r,l]of t)n[r]=l;return n};const ua={key:0,class:"wl-reaction"},pa=["textContent"],da={class:"wl-reaction-list"},ha=["onClick"],fa={class:"wl-reaction-img"},ga=["src","alt"],ma=["textContent"],va=["textContent"];var ya=t(be,[["render",function(e,t,n,l,r,i){return l.reactionsInfo.length?(g(),m("div",ua,[v("div",{class:"wl-reaction-title",textContent:a(l.locale.reactionTitle)},null,8,pa),v("ul",da,[(g(!0),m(ee,null,u(l.reactionsInfo,({active:e,icon:t,desc:n},r)=>(g(),m("li",{key:r,class:p(["wl-reaction-item",{active:e}]),onClick:e=>l.vote(r)},[v("div",fa,[v("img",{src:t,alt:n},null,8,ga),l.votingIndex===r?(g(),Rl(l.LoadingIcon,{key:0,class:"wl-reaction-loading"})):(g(),m("div",{key:1,class:"wl-reaction-votes",textContent:a(l.voteNumbers[r]||0)},null,8,ma))]),v("div",{class:"wl-reaction-text",textContent:a(n)},null,8,va)],10,ha))),128))])])):y("v-if",!0)}],["__file","ArticleReaction.vue"]]),wa=new Map;function ba(e){e=wa.get(e);e&&e.destroy()}function ka(e){e=wa.get(e);e&&e.update()}var we=null,xa=("u"parseFloat(s.maxHeight)?("hidden"===s.overflowY&&(i.style.overflow="scroll"),e=parseFloat(s.maxHeight)):"hidden"!==s.overflowY&&(i.style.overflow="hidden"),i.style.height=e+"px",n&&(i.style.textAlign=n),t&&t(),o!==e&&(i.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),o=e),r===s.overflow||n)||(t=s.textAlign,"hidden"===s.overflow&&(i.style.textAlign="start"===t?"end":"start"),l({restoreTextAlign:t,testForHeightReduction:!0}))}function n(){l({testForHeightReduction:!0,restoreTextAlign:null})}var i,t,o,s,r,a;(i=e)&&i.nodeName&&"TEXTAREA"===i.nodeName&&!wa.has(i)&&(o=null,s=window.getComputedStyle(i),t=i.value,r=function(){l({testForHeightReduction:""===t||!i.value.startsWith(t),restoreTextAlign:null}),t=i.value},a=function(t){i.removeEventListener("autosize:destroy",a),i.removeEventListener("autosize:update",n),i.removeEventListener("input",r),window.removeEventListener("resize",n),Object.keys(t).forEach(function(e){return i.style[e]=t[e]}),wa.delete(i)}.bind(i,{height:i.style.height,resize:i.style.resize,textAlign:i.style.textAlign,overflowY:i.style.overflowY,overflowX:i.style.overflowX,wordWrap:i.style.wordWrap}),i.addEventListener("autosize:destroy",a),i.addEventListener("autosize:update",n),i.addEventListener("input",r),window.addEventListener("resize",n),i.style.overflowX="hidden",i.style.wordWrap="break-word",wa.set(i,{destroy:a,update:n}),n())}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],ba),e},we.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],ka),e}),we),ge=Ar({__name:"ImageWall",props:{items:{default:()=>[]},columnWidth:{default:300},gap:{default:0}},emits:["insert"],setup(e,{expose:t}){const n=e;t();let r=null;const l=N(null),i=N({}),o=N([]),s=()=>{var e=Math.floor((l.value.getBoundingClientRect().width+n.gap)/(n.columnWidth+n.gap));return 0new Array(e).fill(null).map(()=>[]),c=async e=>{var t;e>=n.items.length||(await tr(),t=Array.from((null==(t=l.value)?void 0:t.children)??[]).reduce((e,t)=>t.getBoundingClientRect().height{o.value.length===s()&&!e||(o.value=a(s()),e=window.scrollY,await c(0),window.scrollTo({top:e}))};zr(()=>{u(!0),(r=new ResizeObserver(()=>{u()})).observe(l.value),Sr(()=>[n.items],()=>{i.value={},u(!0)}),Sr(()=>[n.columnWidth,n.gap],()=>{u()})}),Or(()=>r.unobserve(l.value));e={props:n,get resizeObserver(){return r},set resizeObserver(e){r=e},wall:l,state:i,columns:o,getColumnCount:s,createColumns:a,fillColumns:c,redraw:u,imageLoad:e=>{i.value[e.target.src]=!0},get LoadingIcon(){return Zs}};return Object.defineProperty(e,"__isScriptSetup",{enumerable:!1,value:!0}),e}});const _a=["data-index"],Ca=["src","title","onClick"];var Sa=t(ge,[["render",function(n,e,r,l,t,i){return g(),m("div",{ref:"wall",class:"wl-gallery",style:gt({gap:r.gap+"px"})},[(g(!0),m(ee,null,u(l.columns,(e,t)=>(g(),m("div",{key:t,class:"wl-gallery-column","data-index":t,style:gt({gap:r.gap+"px"})},[(g(!0),m(ee,null,u(e,t=>(g(),m(ee,{key:t},[l.state[r.items[t].src]?y("v-if",!0):(g(),Rl(l.LoadingIcon,{key:0,size:36,style:{margin:"20px auto"}})),v("img",{class:"wl-gallery-item",src:r.items[t].src,title:r.items[t].title,loading:"lazy",onLoad:l.imageLoad,onClick:e=>n.$emit("insert",`![](${r.items[t].src})`)},null,40,Ca)],64))),128))],12,_a))),128))],4)}],["__file","ImageWall.vue"]]),me=Ar({__name:"CommentBox",props:{edit:{default:null},rootId:{default:""},replyId:{default:""},replyUser:{default:""}},emits:["log","cancelEdit","cancelReply","submit"],setup(e,{expose:t,emit:n}){t();const g=e,m=n,v=Xr("config"),y=lo("WALINE_COMMENT_BOX_EDITOR",""),w=lo("WALINE_USER_META",{nick:"",mail:"",link:""}),b=ca(),k=N({}),x=N(null),r=N(null),l=N(null),i=N(null),o=N(null),s=N(null),a=N(null),_=N({tabs:[],map:{}}),c=N(0),u=N(!1),p=N(!1),M=N(!1),C=N(""),S=N(0),d=Ln({loading:!0,list:[]}),h=N(0),L=N(!1),R=N(""),I=N(!1),f=N(!1),E=F(()=>v.value.locale),P=F(()=>{var e;return!(null==(e=b.value)||!e.token)}),A=F(()=>!1!==v.value.imageUploader),$=e=>{const t=x.value,n=t.selectionStart,r=t.selectionEnd||0,l=t.scrollTop;y.value=t.value.substring(0,n)+e+t.value.substring(r,t.value.length),t.focus(),t.selectionStart=n+e.length,t.selectionEnd=n+e.length,t.scrollTop=l},T=t=>{const n=`![${v.value.locale.uploading} ${t.name}]()`;return $(n),I.value=!0,Promise.resolve().then(()=>v.value.imageUploader(t)).then(e=>{y.value=y.value.replace(n,`\r +![${t.name}](${e})`)}).catch(e=>{alert(e.message),y.value=y.value.replace(n,"")}).then(()=>{I.value=!1})},j=async()=>{var e,t,n,r;const{serverURL:l,lang:i,login:o,wordLimit:s,requiredMeta:a,recaptchaV3Key:c,turnstileKey:u}=v.value,p=await(async()=>{if(!navigator)return"";const e=navigator["userAgentData"];let t=navigator.userAgent;if(!e||"Windows"!==e.platform)return t;const n=(await e.getHighEntropyValues(["platformVersion"]))["platformVersion"];return t=n&&13<=parseInt(n.split(".")[0])?t.replace("Windows NT 10.0","Windows NT 11.0"):t})(),d={comment:R.value,nick:w.value.nick,mail:w.value.mail,link:w.value.link,url:v.value.path,ua:p};if(!g.edit)if(null!=(n=b.value)&&n.token)d.nick=b.value.display_name,d.mail=b.value.email,d.link=b.value.url;else{if("force"===o)return;if(-1{const n=sa[e]??(sa[e]=Ys.load(e,{useRecaptchaNet:!0,autoHideBadge:!0}));return{execute:t=>n.then(e=>e.execute(t))}})(c).execute("social")),u&&(d.turnstile=(r=u,await(async t=>{const e=oo("https://challenges.cloudflare.com/turnstile/v0/api.js",void 0,{async:!1})["load"],n=(await e(),null==window?void 0:window.turnstile);return new Promise(e=>{null!=n&&n.ready(()=>{null!=n&&n.render(".wl-captcha-container",{sitekey:r,action:t,size:"compact",callback:e})})})})("social")));var h={serverURL:l,lang:i,token:null==(e=b.value)?void 0:e.token,comment:d},f=await(g.edit?H({objectId:g.edit.objectId,...h}):V(h));if(I.value=!1,f.errmsg)return alert(f.errmsg);m("submit",f.data),y.value="",C.value="",await tr(),g.replyId&&m("cancelReply"),null!=(t=g.edit)&&t.objectId&&m("cancelEdit")}catch(e){I.value=!1,alert(e.message)}}else null!=(n=x.value)&&n.focus()},z=e=>{var t;null!=(t=l.value)&&t.contains(e.target)||null!=(t=i.value)&&t.contains(e.target)||(u.value=!1),null!=(t=o.value)&&t.contains(e.target)||null!=(t=s.value)&&t.contains(e.target)||(p.value=!1)},O=async e=>{var t;const{scrollTop:n,clientHeight:r,scrollHeight:l}=e.target,i=(r+n)/l,o=v.value.search,s=(null==(t=a.value)?void 0:t.value)??"";i<.9||d.loading||f.value||(d.loading=!0,(o.more&&d.list.length?await o.more(s,d.list.length):await o.search(s)).length?d.list=[...d.list,...o.more&&d.list.length?await o.more(s,d.list.length):await o.search(s)]:f.value=!0,d.loading=!1,setTimeout(()=>{e.target.scrollTop=n},50))},U=Gi(e=>{d.list=[],f.value=!1,O(e)},300);Sr([v,S],([e,t])=>{e=e.wordLimit;e?te[1]?(h.value=e[1],L.value=!1):(h.value=e[1],L.value=!0):(h.value=0,L.value=!0)},{immediate:!0}),Ji("click",z),Ji("message",({data:e})=>{e&&"profile"===e.type&&(b.value={...b.value,...e.data},[localStorage,sessionStorage].filter(e=>e.getItem("WALINE_USER")).forEach(e=>e.setItem("WALINE_USER",JSON.stringify(b))))}),Sr(p,async e=>{if(e){const t=v.value.search;a.value&&(a.value.value=""),d.loading=!0,d.list=await((null==(e=t.default)?void 0:e.call(t))??t.search("")),d.loading=!1}}),zr(()=>{var e;null!=(e=g.edit)&&e.objectId&&(y.value=g.edit.orig),Lr(()=>y.value,e=>{var{highlighter:t,texRenderer:n}=v.value;R.value=e,C.value=Os(e,{emojiMap:_.value.map,highlighter:t,texRenderer:n}),S.value=((null==(n=(t=e).match(/[\w\d\s,.\u00C0-\u024F\u0400-\u04FF]+/giu))?void 0:n.reduce((e,t)=>e+(["",",","."].includes(t.trim())?0:t.trim().split(/\s+/u).length),0))??0)+((null==(n=t.match(/[\u4E00-\u9FD5]/gu))?void 0:n.length)??0),e?xa(x.value):xa.destroy(x.value)},{immediate:!0}),Lr(()=>v.value.emoji,e=>uo(e).then(e=>{_.value=e}),{immediate:!0})});t={props:g,emit:m,config:v,editor:y,userMeta:w,userInfo:b,inputRefs:k,editorRef:x,imageUploadRef:r,emojiButtonRef:l,emojiPopupRef:i,gifButtonRef:o,gifPopupRef:s,gifSearchInputRef:a,emoji:_,emojiTabIndex:c,showEmoji:u,showGif:p,showPreview:M,previewText:C,wordNumber:S,searchResults:d,wordLimit:h,isWordNumberLegal:L,content:R,isSubmitting:I,isImageListEnd:f,locale:E,isLogin:P,canUploadImage:A,insert:$,onKeyDown:e=>{var t=e.key;(e.ctrlKey||e.metaKey)&&"Enter"===t&&j()},uploadImage:T,onDrop:e=>{var t;null!=(t=e.dataTransfer)&&t.items&&(t=go(e.dataTransfer.items))&&A.value&&(T(t),e.preventDefault())},onPaste:e=>{e.clipboardData&&(e=go(e.clipboardData.items))&&A.value&&T(e)},onChange:()=>{const e=r.value;e.files&&A.value&&T(e.files[0]).then(()=>{e.value=""})},submitComment:j,onLogin:e=>{e.preventDefault();var{lang:e,serverURL:t}=v.value;W({serverURL:t,lang:e}).then(e=>{((b.value=e).remember?localStorage:sessionStorage).setItem("WALINE_USER",JSON.stringify(e)),m("log")})},onLogout:()=>{b.value={},localStorage.setItem("WALINE_USER","null"),sessionStorage.setItem("WALINE_USER","null"),m("log")},onProfile:e=>{e.preventDefault();const{lang:t,serverURL:n}=v.value,r=(window.innerWidth-800)/2,l=(window.innerHeight-800)/2,i=new URLSearchParams({lng:t,token:b.value.token}),o=window.open(n+"/ui/profile?"+i.toString(),"_blank",`width=800,height=800,left=${r},top=${l},scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no`);null!=o&&o.postMessage({type:"TOKEN",data:b.value.token},"*")},popupHandler:z,onImageWallScroll:O,onGifSearch:U,get CloseIcon(){return Us},get EmojiIcon(){return Fs},get GifIcon(){return Ks},get ImageIcon(){return Vs},get LoadingIcon(){return Zs},get MarkdownIcon(){return Bs},get PreviewIcon(){return Hs},ImageWall:Sa};return Object.defineProperty(t,"__isScriptSetup",{enumerable:!1,value:!0}),t}});const La={key:0,class:"wl-login-info"},Ra={class:"wl-avatar"},Ia=["title"],Ea=["title"],Aa=["src"],$a=["title","textContent"],Ta={class:"wl-panel"},ja=["for","textContent"],za=["id","onUpdate:modelValue","name","type"],Oa=["placeholder"],Ma={class:"wl-preview"},Pa=v("hr",null,null,-1),Ua=["innerHTML"],Na={class:"wl-footer"},Fa={class:"wl-actions"},Va={href:"https://guides.github.com/features/mastering-markdown/",title:"Markdown Guide","aria-label":"Markdown is supported",class:"wl-action",target:"_blank",rel:"noopener noreferrer"},Da=["title"],Ha=["title"],Ba=["title"],Wa=["title"],qa={class:"wl-info"},Ga=v("div",{class:"wl-captcha-container"},null,-1),Za={class:"wl-text-number"},Ka={key:0},Qa=["textContent"],Xa=["textContent"],Ja=["disabled"],Ya=["placeholder"],ec={key:1,class:"wl-loading"},tc={key:0,class:"wl-tab-wrapper"},nc=["title","onClick"],rc=["src","alt"],lc={key:0,class:"wl-tabs"},ic=["onClick"],oc=["src","alt","title"],sc=["title"];var ac=t(me,[["render",function(e,t,n,r,l,i){var o;return g(),m("div",{key:r.userInfo.token,class:"wl-comment"},["disable"===r.config.login||!r.isLogin||null!=(o=n.edit)&&o.objectId?y("v-if",!0):(g(),m("div",La,[v("div",Ra,[v("button",{type:"submit",class:"wl-logout-btn",title:r.locale.logout,onClick:r.onLogout},[te(r.CloseIcon,{size:14})],8,Ia),v("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:r.locale.profile,onClick:r.onProfile},[v("img",{src:r.userInfo.avatar,alt:"avatar"},null,8,Aa)],8,Ea)]),v("a",{href:"#",class:"wl-login-nick","aria-label":"Profile",title:r.locale.profile,onClick:r.onProfile,textContent:a(r.userInfo.display_name)},null,8,$a)])),v("div",Ta,["force"!==r.config.login&&r.config.meta.length&&!r.isLogin?(g(),m("div",{key:0,class:p(["wl-header","item"+r.config.meta.length])},[(g(!0),m(ee,null,u(r.config.meta,t=>(g(),m("div",{key:t,class:"wl-header-item"},[v("label",{for:"wl-"+t,textContent:a(r.locale[t]+(r.config.requiredMeta.includes(t)||!r.config.requiredMeta.length?"":`(${r.locale.optional})`))},null,8,ja),Ir(v("input",{id:"wl-"+t,ref_for:!0,ref:e=>{e&&(r.inputRefs[t]=e)},"onUpdate:modelValue":e=>r.userMeta[t]=e,class:p(["wl-input","wl-"+t]),name:t,type:"mail"===t?"email":"text"},null,10,za),[[zi,r.userMeta[t]]])]))),128))],2)):y("v-if",!0),Ir(v("textarea",{id:"wl-edit",ref:"editorRef","onUpdate:modelValue":t[0]||(t[0]=e=>r.editor=e),class:"wl-editor",placeholder:n.replyUser?"@"+n.replyUser:r.locale.placeholder,onKeydown:r.onKeyDown,onDrop:r.onDrop,onPaste:r.onPaste},null,40,Oa),[[Li,r.editor]]),Ir(v("div",Ma,[Pa,v("h4",null,a(r.locale.preview)+":",1),v("div",{class:"wl-content",innerHTML:r.previewText},null,8,Ua)],512),[[ii,r.showPreview]]),v("div",Na,[v("div",Fa,[v("a",Va,[te(r.MarkdownIcon)]),Ir(v("button",{ref:"emojiButtonRef",type:"button",class:p(["wl-action",{active:r.showEmoji}]),title:r.locale.emoji,onClick:t[1]||(t[1]=e=>r.showEmoji=!r.showEmoji)},[te(r.EmojiIcon)],10,Da),[[ii,r.emoji.tabs.length]]),r.config.search?(g(),m("button",{key:0,ref:"gifButtonRef",type:"button",class:p(["wl-action",{active:r.showGif}]),title:r.locale.gif,onClick:t[2]||(t[2]=e=>r.showGif=!r.showGif)},[te(r.GifIcon)],10,Ha)):y("v-if",!0),v("input",{id:"wl-image-upload",ref:"imageUploadRef",class:"upload",type:"file",accept:".png,.jpg,.jpeg,.webp,.bmp,.gif",onChange:r.onChange},null,544),r.canUploadImage?(g(),m("label",{key:1,for:"wl-image-upload",class:"wl-action",title:r.locale.uploadImage},[te(r.ImageIcon)],8,Ba)):y("v-if",!0),v("button",{type:"button",class:p(["wl-action",{active:r.showPreview}]),title:r.locale.preview,onClick:t[3]||(t[3]=e=>r.showPreview=!r.showPreview)},[te(r.PreviewIcon)],10,Wa)]),v("div",qa,[Ga,v("div",Za,[jl(a(r.wordNumber)+" ",1),r.config.wordLimit?(g(),m("span",Ka,[jl("  /  "),v("span",{class:p({illegal:!r.isWordNumberLegal}),textContent:a(r.wordLimit)},null,10,Qa)])):y("v-if",!0),jl("  "+a(r.locale.word),1)]),"disable"===r.config.login||r.isLogin?y("v-if",!0):(g(),m("button",{key:0,type:"button",class:"wl-btn",onClick:r.onLogin,textContent:a(r.locale.login)},null,8,Xa)),"force"!==r.config.login||r.isLogin?(g(),m("button",{key:1,type:"submit",class:"primary wl-btn",title:"Cmd|Ctrl + Enter",disabled:r.isSubmitting,onClick:r.submitComment},[r.isSubmitting?(g(),Rl(r.LoadingIcon,{key:0,size:16})):(g(),m(ee,{key:1},[jl(a(r.locale.submit),1)],64))],8,Ja)):y("v-if",!0)]),v("div",{ref:"gifPopupRef",class:p(["wl-gif-popup",{display:r.showGif}])},[v("input",{ref:"gifSearchInputRef",type:"text",placeholder:r.locale.gifSearchPlaceholder,onInput:t[4]||(t[4]=(...e)=>r.onGifSearch&&r.onGifSearch(...e))},null,40,Ya),r.searchResults.list.length?(g(),Rl(r.ImageWall,{key:0,items:r.searchResults.list,"column-width":200,gap:6,onInsert:t[5]||(t[5]=e=>r.insert(e)),onScroll:r.onImageWallScroll},null,8,["items"])):y("v-if",!0),r.searchResults.loading?(g(),m("div",ec,[te(r.LoadingIcon,{size:30})])):y("v-if",!0)],2),v("div",{ref:"emojiPopupRef",class:p(["wl-emoji-popup",{display:r.showEmoji}])},[(g(!0),m(ee,null,u(r.emoji.tabs,(e,t)=>(g(),m(ee,{key:e.name},[t===r.emojiTabIndex?(g(),m("div",tc,[(g(!0),m(ee,null,u(e.items,t=>(g(),m("button",{key:t,type:"button",title:t,onClick:e=>r.insert(`:${t}:`)},[r.showEmoji?(g(),m("img",{key:0,class:"wl-emoji",src:r.emoji.map[t],alt:t,loading:"lazy",referrerPolicy:"no-referrer"},null,8,rc)):y("v-if",!0)],8,nc))),128))])):y("v-if",!0)],64))),128)),1(g(),m("button",{key:e.name,type:"button",class:p(["wl-tab",{active:r.emojiTabIndex===t}]),onClick:e=>r.emojiTabIndex=t},[v("img",{class:"wl-emoji",src:e.icon,alt:e.name,title:e.name,loading:"lazy",referrerPolicy:"no-referrer"},null,8,oc)],10,ic))),128))])):y("v-if",!0)],2)])]),n.replyId||null!=(o=n.edit)&&o.objectId?(g(),m("button",{key:1,type:"button",class:"wl-close",title:r.locale.cancelReply,onClick:t[6]||(t[6]=e=>n.replyId?r.emit("cancelReply"):r.emit("cancelEdit"))},[te(r.CloseIcon,{size:24})],8,sc)):y("v-if",!0)])}],["__file","CommentBox.vue"]]),ve=Ar({__name:"CommentCard",props:{comment:{},edit:{default:null},rootId:{},reply:{default:null}},emits:["log","submit","delete","edit","like","status","sticky","reply"],setup(e,{expose:t,emit:n}){t();const r=e,l=n,i=Xr("config"),o=Xs(),s=io(),a=ca(),c=F(()=>i.value.locale),u=F(()=>{var e=r.comment["link"];return e?Re(e)?e:"https://"+e:""}),p=F(()=>o.value.includes(r.comment.objectId)),d=F(()=>ze(new Date(r.comment.time),s.value,c.value)),h=F(()=>"administrator"===a.value.type),f=F(()=>r.comment.user_id&&a.value.objectId===r.comment.user_id),g=F(()=>{var e;return r.comment.objectId===(null==(e=r.reply)?void 0:e.objectId)}),m=F(()=>{var e;return r.comment.objectId===(null==(e=r.edit)?void 0:e.objectId)}),v={props:r,emit:l,commentStatus:["approved","waiting","spam"],config:i,likes:o,now:s,userInfo:a,locale:c,link:u,like:p,time:d,isAdmin:h,isOwner:f,isReplyingCurrent:g,isEditingCurrent:m,CommentBox:ac,get DeleteIcon(){return Ns},get EditIcon(){return qs},get LikeIcon(){return Ds},get ReplyIcon(){return Ws},get VerifiedIcon(){return Gs}};return Object.defineProperty(v,"__isScriptSetup",{enumerable:!1,value:!0}),v}});const cc=["id"],uc={class:"wl-user","aria-hidden":"true"},pc=["src"],dc={class:"wl-card"},hc={class:"wl-head"},fc=["href"],gc={key:1,class:"wl-nick"},mc=["textContent"],vc=["textContent"],yc=["textContent"],wc=["textContent"],bc=["textContent"],kc={class:"wl-comment-actions"},xc=["title"],_c=["title"],Cc={class:"wl-meta","aria-hidden":"true"},Sc=["data-value","textContent"],Lc={key:0,class:"wl-content"},Rc={key:0},Ic=["href"],Ec=v("span",null,": ",-1),Ac=["innerHTML"],$c={key:1,class:"wl-admin-actions"},Tc={class:"wl-comment-status"},jc=["disabled","onClick","textContent"],zc={key:3,class:"wl-quote"};var Oc=t(ve,[["render",function(e,t,n,r,l,i){var o;const s=vr("CommentCard",!0);return g(),m("div",{id:n.comment.objectId,class:"wl-card-item"},[v("div",uc,[n.comment.avatar?(g(),m("img",{key:0,class:"wl-user-avatar",src:n.comment.avatar},null,8,pc)):y("v-if",!0),n.comment.type?(g(),Rl(r.VerifiedIcon,{key:1})):y("v-if",!0)]),v("div",dc,[v("div",hc,[r.link?(g(),m("a",{key:0,class:"wl-nick",href:r.link,target:"_blank",rel:"nofollow noopener noreferrer"},a(n.comment.nick),9,fc)):(g(),m("span",gc,a(n.comment.nick),1)),"administrator"===n.comment.type?(g(),m("span",{key:2,class:"wl-badge",textContent:a(r.locale.admin)},null,8,mc)):y("v-if",!0),n.comment.label?(g(),m("span",{key:3,class:"wl-badge",textContent:a(n.comment.label)},null,8,vc)):y("v-if",!0),n.comment.sticky?(g(),m("span",{key:4,class:"wl-badge",textContent:a(r.locale.sticky)},null,8,yc)):y("v-if",!0),"number"==typeof n.comment.level?(g(),m("span",{key:5,class:p("wl-badge level"+n.comment.level),textContent:a(r.locale["level"+n.comment.level]||"Level "+n.comment.level)},null,10,wc)):y("v-if",!0),v("span",{class:"wl-time",textContent:a(r.time)},null,8,bc),v("div",kc,[r.isAdmin||r.isOwner?(g(),m(ee,{key:0},[v("button",{type:"button",class:"wl-edit",onClick:t[0]||(t[0]=e=>r.emit("edit",n.comment))},[te(r.EditIcon)]),v("button",{type:"button",class:"wl-delete",onClick:t[1]||(t[1]=e=>r.emit("delete",n.comment))},[te(r.DeleteIcon)])],64)):y("v-if",!0),v("button",{type:"button",class:"wl-like",title:r.like?r.locale.cancelLike:r.locale.like,onClick:t[2]||(t[2]=e=>r.emit("like",n.comment))},[te(r.LikeIcon,{active:r.like},null,8,["active"]),jl(" "+a("like"in n.comment?n.comment.like:""),1)],8,xc),v("button",{type:"button",class:p(["wl-reply",{active:r.isReplyingCurrent}]),title:r.isReplyingCurrent?r.locale.cancelReply:r.locale.reply,onClick:t[3]||(t[3]=e=>r.emit("reply",r.isReplyingCurrent?null:n.comment))},[te(r.ReplyIcon)],10,_c)])]),v("div",Cc,[(g(),m(ee,null,u(["addr","browser","os"],e=>(g(),m(ee,null,[n.comment[e]?(g(),m("span",{key:e,class:p("wl-"+e),"data-value":n.comment[e],textContent:a(n.comment[e])},null,10,Sc)):y("v-if",!0)],64))),64))]),r.isEditingCurrent?y("v-if",!0):(g(),m("div",Lc,[n.comment.reply_user?(g(),m("p",Rc,[v("a",{href:"#"+n.comment.pid},"@"+a(n.comment.reply_user.nick),9,Ic),Ec])):y("v-if",!0),v("div",{innerHTML:n.comment.comment},null,8,Ac)])),r.isAdmin&&!r.isEditingCurrent?(g(),m("div",$c,[v("span",Tc,[(g(),m(ee,null,u(r.commentStatus,t=>v("button",{key:t,type:"submit",class:p("wl-btn wl-"+t),disabled:n.comment.status===t,onClick:e=>r.emit("status",{status:t,comment:n.comment}),textContent:a(r.locale[t])},null,10,jc)),64))]),!r.isAdmin||"rid"in n.comment?y("v-if",!0):(g(),m("button",{key:0,type:"submit",class:"wl-btn wl-sticky",onClick:t[4]||(t[4]=e=>r.emit("sticky",n.comment))},a(n.comment.sticky?r.locale.unsticky:r.locale.sticky),1))])):y("v-if",!0),r.isReplyingCurrent||r.isEditingCurrent?(g(),m("div",{key:2,class:p({"wl-reply-wrapper":r.isReplyingCurrent,"wl-edit-wrapper":r.isEditingCurrent})},[te(r.CommentBox,{edit:n.edit,"reply-id":null==(o=n.reply)?void 0:o.objectId,"reply-user":n.comment.nick,"root-id":n.rootId,onLog:t[5]||(t[5]=e=>r.emit("log")),onCancelReply:t[6]||(t[6]=e=>r.emit("reply",null)),onCancelEdit:t[7]||(t[7]=e=>r.emit("edit",null)),onSubmit:t[8]||(t[8]=e=>r.emit("submit",e))},null,8,["edit","reply-id","reply-user","root-id"])],2)):y("v-if",!0),"children"in n.comment?(g(),m("div",zc,[(g(!0),m(ee,null,u(n.comment.children,e=>(g(),Rl(s,{key:e.objectId,comment:e,reply:n.reply,edit:n.edit,"root-id":n.rootId,onLog:t[9]||(t[9]=e=>r.emit("log")),onDelete:t[10]||(t[10]=e=>r.emit("delete",e)),onEdit:t[11]||(t[11]=e=>r.emit("edit",e)),onLike:t[12]||(t[12]=e=>r.emit("like",e)),onReply:t[13]||(t[13]=e=>r.emit("reply",e)),onStatus:t[14]||(t[14]=e=>r.emit("status",e)),onSticky:t[15]||(t[15]=e=>r.emit("sticky",e)),onSubmit:t[16]||(t[16]=e=>r.emit("submit",e))},null,8,["comment","reply","edit","root-id"]))),128))])):y("v-if",!0)])],8,cc)}],["__file","CommentCard.vue"]]);he=Ar({__name:"WalineComment",props:["serverURL","path","meta","requiredMeta","dark","commentSorting","lang","locale","pageSize","wordLimit","emoji","login","highlighter","texRenderer","imageUploader","search","copyright","recaptchaV3Key","turnstileKey","reaction"],setup(t,{expose:n}){n();const e=t,o={latest:"insertedAt_desc",oldest:"insertedAt_asc",hottest:"like_desc"},r=Object.keys(o),s=ca(),a=Xs(),c=N("loading"),u=N(0),p=N(1),d=N(0),h=F(()=>Ae(e)),f=N(h.value.commentSorting),g=N([]),l=N(null),i=N(null),m=F(()=>(e=>$e(e)?"auto"===e?`@media(prefers-color-scheme:dark){body${Te}}`:""+e+Te:!0===e?":root"+Te:"")(h.value.dark)),v=F(()=>h.value.locale);{n=m;var y={id:"waline-darkmode"};const _=N(!1),{document:C=Xi,immediate:S=!0,manual:L=!1,id:R="vueuse_styletag_"+ ++so}=y,I=N(n);let e=()=>{};n=()=>{if(C){const t=C.getElementById(R)||C.createElement("style");t.isConnected||(t.id=R,y.media&&(t.media=y.media),C.head.appendChild(t)),_.value||(e=Sr(I,e=>{t.textContent=e},{immediate:!0}),_.value=!0)}},t=()=>{C&&_.value&&(e(),C.head.removeChild(C.getElementById(R)),_.value=!1)},S&&!L&&Ki(n),L||Ni(t),R,I,Rn(_)}let w;const b=t=>{var e;const{serverURL:n,path:r,pageSize:l}=h.value,i=new AbortController;c.value="loading",null!=w&&w(),U({serverURL:n,lang:h.value.lang,path:r,pageSize:l,sortBy:o[f.value],page:t,signal:i.signal,token:null==(e=s.value)?void 0:e.token}).then(e=>{c.value="success",u.value=e.count,g.value.push(...e.data),p.value=t,d.value=e.totalPages}).catch(e=>{"AbortError"!==e.name&&(console.error(e.message),c.value="error")}),w=i.abort.bind(i)},k=()=>{u.value=0,g.value=[],b(1)};n="config",t=h;if(E){let e=E.provides;var x=E.parent&&E.parent.provides;(e=x===e?E.provides=Object.create(x):e)[n]=t}zr(()=>{Lr(()=>[e.serverURL,e.path],()=>k(),{immediate:!0})}),Mr(()=>null==w?void 0:w());x={props:e,sortKeyMap:o,sortingMethods:r,userInfo:s,likeStorage:a,status:c,count:u,page:p,totalPages:d,config:h,commentSortingRef:f,data:g,reply:l,edit:i,darkmodeStyle:m,i18n:v,get abort(){return w},set abort(e){w=e},getCommentData:b,loadMore:()=>b(p.value+1),refresh:k,onSortByChange:e=>{f.value!==e&&(f.value=e,k())},onReply:e=>{l.value=e},onEdit:e=>{i.value=e},onSubmit:t=>{if(i.value)i.value.comment=t.comment,i.value.orig=t.orig;else if("rid"in t){const e=g.value.find(({objectId:e})=>e===t.rid);e&&(Array.isArray(e.children)||(e.children=[]),e.children.push(t))}else g.value.unshift(t),u.value+=1},onStatusChange:async({comment:e,status:t})=>{var n,r;e.status!==t&&({serverURL:n,lang:r}=h.value,await H({serverURL:n,lang:r,token:null==(n=s.value)?void 0:n.token,objectId:e.objectId,comment:{status:t}}),e.status=t)},onSticky:async e=>{var t,n;"rid"in e||({serverURL:t,lang:n}=h.value,await H({serverURL:t,lang:n,token:null==(t=s.value)?void 0:t.token,objectId:e.objectId,comment:{sticky:e.sticky?0:1}}),e.sticky=!e.sticky)},onDelete:async({objectId:l})=>{var e,t;confirm("Are you sure you want to delete this comment?")&&({serverURL:e,lang:t}=h.value,await D({serverURL:e,lang:t,token:null==(e=s.value)?void 0:e.token,objectId:l}),g.value.some((t,r)=>t.objectId===l?(g.value=g.value.filter((e,t)=>t!==r),!0):t.children.some((e,n)=>e.objectId===l&&(g.value[r].children=t.children.filter((e,t)=>t!==n),!0))))},onLike:async e=>{var t;const{serverURL:n,lang:r}=h.value,l=e["objectId"],i=a.value.includes(l);await H({serverURL:n,lang:r,objectId:l,token:null==(t=s.value)?void 0:t.token,comment:{like:!i}}),i?a.value=a.value.filter(e=>e!==l):(a.value=[...a.value,l],50(g(),m("li",{key:t,class:p([t===r.commentSortingRef?"active":""]),onClick:e=>r.onSortByChange(t)},a(r.i18n[t]),11,Vc))),128))])]),v("div",Dc,[(g(!0),m(ee,null,u(r.data,e=>(g(),Rl(r.CommentCard,{key:e.objectId,"root-id":e.objectId,comment:e,reply:r.reply,edit:r.edit,onLog:r.refresh,onReply:r.onReply,onEdit:r.onEdit,onSubmit:r.onSubmit,onStatus:r.onStatusChange,onDelete:r.onDelete,onSticky:r.onSticky,onLike:r.onLike},null,8,["root-id","comment","reply","edit"]))),128))]),"error"===r.status?(g(),m("div",Hc,[v("button",{type:"button",class:"wl-btn",onClick:r.refresh,textContent:a(r.i18n.refresh)},null,8,Bc)])):"loading"===r.status?(g(),m("div",Wc,[te(r.LoadingIcon,{size:30})])):r.data.length?r.page{e.forEach((e,t)=>{const n=r[t].time;"number"==typeof n&&(e.innerText=n.toString())})},Yc=({serverURL:e,path:n=window.location.pathname,selector:t=".waline-pageview-count",update:r=!0,lang:l=navigator.language})=>{const i=new AbortController,o=Array.from(document.querySelectorAll(t)),s=e=>{e=Ms(e);return null!==e&&n!==e},a=t=>q({serverURL:Ie(e),paths:t.map(e=>Ms(e)??n),lang:l,signal:i.signal}).then(e=>Jc(e,t)).catch(po);if(r){const c=o.filter(e=>!s(e)),u=o.filter(s);G({serverURL:Ie(e),path:n,lang:l}).then(e=>Jc(e,c)),u.length&&a(u)}else a(o);return i.abort.bind(i)};e.RecentComments=({el:e,serverURL:t,count:n,lang:r=navigator.language})=>{const l=ca(),i=ho(e),o=new AbortController;return Z({serverURL:t,count:n,lang:r,signal:o.signal,token:null==(e=l.value)?void 0:e.token}).then(e=>i&&e.length?(i.innerHTML=`
    `,{comments:e,destroy:()=>{o.abort(),i.innerHTML=""}}):{comments:e,destroy:()=>o.abort()})},e.UserList=({el:e,serverURL:t,count:n,locale:r,lang:l=navigator.language,mode:i="list"})=>{const o=ho(e),s=new AbortController;return K({serverURL:t,pageSize:n,lang:l,signal:s.signal}).then(e=>o&&e.length?(r={..._e(l),..."object"==typeof r?r:{}},o.innerHTML=``,{users:e,destroy:()=>{s.abort(),o.innerHTML=""}}):{users:e,destroy:()=>s.abort()})},e.addComment=V,e.commentCount=Ps,e.defaultLocales=xe,e.deleteComment=D,e.fetchCommentCount=B,e.getArticleCounter=M,e.getComment=U,e.getPageview=q,e.getRecentComment=Z,e.getUserList=K,e.init=({el:e="#waline",path:t=window.location.pathname,comment:n=!1,pageview:r=!1,...l})=>{var i=e?ho(e):null;if(e&&!i)throw new Error("Option 'el' do not match any domElement!");if(!l.serverURL)throw new Error("Option 'serverURL' is missing!");const o=Ln({...l}),s=Ln({comment:n,pageview:r,path:t}),a=i?Ui(()=>w(Xc,{path:s.path,...o})):null,c=(a&&a.mount(i),_r(()=>{s.comment&&Ps({serverURL:o.serverURL,path:s.path,...$e(s.comment)?{selector:s.comment}:{}})})),u=_r(()=>{s.pageview&&Yc({serverURL:o.serverURL,path:s.path,...$e(s.pageview)?{selector:s.pageview}:{}})});return{el:i,update:({comment:e,pageview:t,path:n=window.location.pathname,...r}={})=>{Object.entries(r).forEach(([e,t])=>{o[e]=t}),s.path=n,void 0!==e&&(s.comment=e),void 0!==t&&(s.pageview=t)},destroy:()=>{null!=a&&a.unmount(),c(),u()}}},e.login=W,e.pageviewCount=Yc,e.updateArticleCounter=P,e.updateComment=H,e.updatePageview=G,e.version="3.3.0"}); \ No newline at end of file diff --git a/static/js/index.js b/static/js/index.js deleted file mode 100644 index 6975cf0..0000000 --- a/static/js/index.js +++ /dev/null @@ -1 +0,0 @@ -// TODO keep the js folder \ No newline at end of file diff --git a/static/js/third-party/analytics/baidu-analytics.js b/static/js/third-party/analytics/baidu-analytics.js deleted file mode 100644 index c10e7d0..0000000 --- a/static/js/third-party/analytics/baidu-analytics.js +++ /dev/null @@ -1,7 +0,0 @@ -/* global _hmt */ - -if (!window._hmt) window._hmt = []; - -document.addEventListener('pjax:success', () => { - _hmt.push(['_trackPageview', location.pathname]); -}); diff --git a/static/js/third-party/analytics/google-analytics.js b/static/js/third-party/analytics/google-analytics.js deleted file mode 100644 index 2cd128f..0000000 --- a/static/js/third-party/analytics/google-analytics.js +++ /dev/null @@ -1,35 +0,0 @@ -/* global CONFIG, dataLayer, gtag */ - -if (!CONFIG.google_analytics.only_pageview) { - if (CONFIG.hostname === location.hostname) { - window.dataLayer = window.dataLayer || []; - window.gtag = function() { - dataLayer.push(arguments); - }; - gtag('js', new Date()); - gtag('config', CONFIG.google_analytics.tracking_id); - - document.addEventListener('pjax:success', () => { - gtag('event', 'page_view', { - page_location: location.href, - page_path : location.pathname, - page_title : document.title - }); - }); - } -} else { - const sendPageView = () => { - if (CONFIG.hostname !== location.hostname) return; - const uid = localStorage.getItem('uid') || (Math.random() + '.' + Math.random()); - localStorage.setItem('uid', uid); - navigator.sendBeacon('https://www.google-analytics.com/collect', new URLSearchParams({ - v : 1, - tid: CONFIG.google_analytics.tracking_id, - cid: uid, - t : 'pageview', - dp : encodeURIComponent(location.pathname) - })); - }; - document.addEventListener('pjax:complete', sendPageView); - sendPageView(); -} diff --git a/static/js/third-party/analytics/growingio.js b/static/js/third-party/analytics/growingio.js deleted file mode 100644 index 0460833..0000000 --- a/static/js/third-party/analytics/growingio.js +++ /dev/null @@ -1,10 +0,0 @@ -/* global CONFIG, gio */ - -if (!window.gio) { - window.gio = function() { - (window.gio.q = window.gio.q || []).push(arguments); - }; -} - -gio('init', `${CONFIG.growingio_analytics}`, {}); -gio('send'); diff --git a/static/js/third-party/chat/chatra.js b/static/js/third-party/chat/chatra.js deleted file mode 100644 index e495b8e..0000000 --- a/static/js/third-party/chat/chatra.js +++ /dev/null @@ -1,19 +0,0 @@ -/* global CONFIG, Chatra */ - -(function() { - if (CONFIG.chatra.embed) { - window.ChatraSetup = { - mode : 'frame', - injectTo: CONFIG.chatra.embed - }; - } - - window.ChatraID = CONFIG.chatra.id; - - const chatButton = document.querySelector('.sidebar-button button'); - if (chatButton) { - chatButton.addEventListener('click', () => { - Chatra('openChat', true); - }); - } -})(); diff --git a/static/js/third-party/chat/gitter.js b/static/js/third-party/chat/gitter.js deleted file mode 100644 index 2b26d05..0000000 --- a/static/js/third-party/chat/gitter.js +++ /dev/null @@ -1,5 +0,0 @@ -/* global CONFIG */ - -((window.gitter = {}).chat = {}).options = { - room: CONFIG.gitter.room -}; diff --git a/static/js/third-party/chat/tidio.js b/static/js/third-party/chat/tidio.js deleted file mode 100644 index bffb918..0000000 --- a/static/js/third-party/chat/tidio.js +++ /dev/null @@ -1,10 +0,0 @@ -/* global tidioChatApi */ - -(function() { - const chatButton = document.querySelector('.sidebar-button button'); - if (chatButton) { - chatButton.addEventListener('click', () => { - tidioChatApi.open(); - }); - } -})(); diff --git a/static/js/third-party/fancybox.js b/static/js/third-party/fancybox.js deleted file mode 100644 index bb436ab..0000000 --- a/static/js/third-party/fancybox.js +++ /dev/null @@ -1,38 +0,0 @@ -document.addEventListener('page:loaded', () => { - - /** - * Wrap images with fancybox. - */ - document.querySelectorAll('.post-body :not(a) > img, .post-body > img').forEach(element => { - const $image = $(element); - const imageLink = $image.attr('data-src') || $image.attr('src'); - const $imageWrapLink = $image.wrap(``).parent('a'); - if ($image.is('.post-gallery img')) { - $imageWrapLink.attr('data-fancybox', 'gallery').attr('rel', 'gallery'); - } else if ($image.is('.group-picture img')) { - $imageWrapLink.attr('data-fancybox', 'group').attr('rel', 'group'); - } else { - $imageWrapLink.attr('data-fancybox', 'default').attr('rel', 'default'); - } - - const imageTitle = $image.attr('title') || $image.attr('alt'); - if (imageTitle) { - // Do not append image-caption if pandoc has already created a figcaption - if (!$imageWrapLink.next('figcaption').length) { - $imageWrapLink.append(`

    ${imageTitle}

    `); - } - // Make sure img title tag will show correctly in fancybox - $imageWrapLink.attr('title', imageTitle).attr('data-caption', imageTitle); - } - }); - - $.fancybox.defaults.hash = false; - $('.fancybox').fancybox({ - loop : true, - helpers: { - overlay: { - locked: false - } - } - }); -}); diff --git a/static/js/third-party/google-translate.min.js b/static/js/third-party/google-translate.min.js deleted file mode 100644 index fd80e1b..0000000 --- a/static/js/third-party/google-translate.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(){var gtConstEvalStartTime=new Date();var h=this||self,l=/^[\w+/_-]+[=]{0,2}$/,m=null;function n(a){return(a=a.querySelector&&a.querySelector("script[nonce]"))&&(a=a.nonce||a.getAttribute("nonce"))&&l.test(a)?a:""}function p(a,b){function c(){}c.prototype=b.prototype;a.i=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.h=function(g,f,k){for(var e=Array(arguments.length-2),d=2;d"}else d=void 0===c?"undefined":null===c?"null":typeof c;v("Argument is not a %s (or a non-Element, non-Location mock); got: %s","HTMLScriptElement",d)}a instanceof x&&a.constructor===x?d=a.g:(d=typeof a,v("expected object of type TrustedResourceUrl, got '"+a+"' of type "+("object"!=d?d:a?Array.isArray(a)?"array":d:"null")),d="type_error:TrustedResourceUrl");c.src=d;(d=c.ownerDocument&&c.ownerDocument.defaultView)&&d!=h?d=n(d.document):(null===m&&(m=n(h.document)),d=m);d&&c.setAttribute("nonce",d);z(c)}function _loadCss(a){var b=document.createElement("link");b.type="text/css";b.rel="stylesheet";b.charset="UTF-8";b.href=a;z(b)}function _isNS(a){a=a.split(".");for(var b=window,c=0;c { - if (!CONFIG.enableMath) return; - - NexT.utils.getScript(CONFIG.katex.copy_tex_js).catch(() => {}); -}); diff --git a/static/js/third-party/math/mathjax.js b/static/js/third-party/math/mathjax.js deleted file mode 100644 index fe4d448..0000000 --- a/static/js/third-party/math/mathjax.js +++ /dev/null @@ -1,36 +0,0 @@ -/* global NexT, CONFIG, MathJax */ - -document.addEventListener('page:loaded', () => { - if (!CONFIG.enableMath) return; - - if (typeof MathJax === 'undefined') { - window.MathJax = { - tex: { - inlineMath: { '[+]': [['$', '$']] }, - tags : CONFIG.mathjax.tags - }, - options: { - renderActions: { - insertedScript: [200, () => { - document.querySelectorAll('mjx-container').forEach(node => { - const target = node.parentNode; - if (target.nodeName.toLowerCase() === 'li') { - target.parentNode.classList.add('has-jax'); - } - }); - }, '', false] - } - } - }; - NexT.utils.getScript(CONFIG.mathjax.js, { - attributes: { - defer: true - } - }); - } else { - MathJax.startup.document.state(0); - MathJax.typesetClear(); - MathJax.texReset(); - MathJax.typesetPromise(); - } -}); diff --git a/static/js/third-party/pace.js b/static/js/third-party/pace.js deleted file mode 100644 index c22d59f..0000000 --- a/static/js/third-party/pace.js +++ /dev/null @@ -1,7 +0,0 @@ -/* global Pace */ - -Pace.options.restartOnPushState = false; - -document.addEventListener('pjax:send', () => { - Pace.restart(); -}); diff --git a/static/js/third-party/quicklink.js b/static/js/third-party/quicklink.js deleted file mode 100644 index 2543ad1..0000000 --- a/static/js/third-party/quicklink.js +++ /dev/null @@ -1,37 +0,0 @@ -/* global CONFIG, quicklink */ - -(function() { - if (typeof CONFIG.quicklink.ignores === 'string') { - const ignoresStr = `[${CONFIG.quicklink.ignores}]`; - CONFIG.quicklink.ignores = JSON.parse(ignoresStr); - } - - let resetFn = null; - - const onRefresh = () => { - if (resetFn) resetFn(); - if (!CONFIG.quicklink.enable) return; - - let ignoresArr = CONFIG.quicklink.ignores || []; - if (!Array.isArray(ignoresArr)) { - ignoresArr = [ignoresArr]; - } - - resetFn = quicklink.listen({ - timeout : CONFIG.quicklink.timeout, - priority: CONFIG.quicklink.priority, - ignores : [ - uri => uri.includes('#'), - uri => uri === CONFIG.quicklink.url, - ...ignoresArr - ] - }); - }; - - if (CONFIG.quicklink.delay) { - window.addEventListener('load', onRefresh); - document.addEventListener('pjax:success', onRefresh); - } else { - document.addEventListener('page:loaded', onRefresh); - } -})(); diff --git a/static/js/third-party/rating.js b/static/js/third-party/rating.js deleted file mode 100644 index fc61a3a..0000000 --- a/static/js/third-party/rating.js +++ /dev/null @@ -1,22 +0,0 @@ -/* global CONFIG, WPac */ - -(function() { - const widgets = [{ - widget: 'Rating', - id : CONFIG.rating.id, - el : 'wpac-rating', - color : CONFIG.rating.color - }]; - - document.addEventListener('page:loaded', () => { - if (!CONFIG.page.isPost) return; - - const newWidgets = widgets.map(widget => ({ ...widget })); - - if (window.WPac) { - WPac.init(newWidgets); - } else { - window.wpac_init = newWidgets; - } - }); -})(); diff --git a/static/js/third-party/statistics/firestore.js b/static/js/third-party/statistics/firestore.js deleted file mode 100644 index b06dbb1..0000000 --- a/static/js/third-party/statistics/firestore.js +++ /dev/null @@ -1,64 +0,0 @@ -/* global CONFIG, firebase */ - -firebase.initializeApp({ - apiKey : CONFIG.firestore.apiKey, - projectId: CONFIG.firestore.projectId -}); - -(function() { - const getCount = (doc, increaseCount) => { - // IncreaseCount will be false when not in article page - return doc.get().then(d => { - // Has no data, initialize count - let count = d.exists ? d.data().count : 0; - // If first view this article - if (increaseCount) { - // Increase count - count++; - doc.set({ - count - }); - } - return count; - }); - }; - - const appendCountTo = el => { - return count => { - el.innerText = count; - }; - }; - - const db = firebase.firestore(); - const articles = db.collection(CONFIG.firestore.collection); - - document.addEventListener('page:loaded', () => { - - if (CONFIG.page.isPost) { - // Fix issue #118 - // https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent - const title = document.querySelector('.post-title').textContent.trim(); - const doc = articles.doc(title); - let increaseCount = CONFIG.hostname === location.hostname; - if (localStorage.getItem(title)) { - increaseCount = false; - } else { - // Mark as visited - localStorage.setItem(title, true); - } - getCount(doc, increaseCount).then(appendCountTo(document.querySelector('.firestore-visitors-count'))); - } else if (CONFIG.page.isHome) { - const promises = [...document.querySelectorAll('.post-title')].map(element => { - const title = element.textContent.trim(); - const doc = articles.doc(title); - return getCount(doc); - }); - Promise.all(promises).then(counts => { - const metas = document.querySelectorAll('.firestore-visitors-count'); - counts.forEach((val, idx) => { - appendCountTo(metas[idx])(val); - }); - }); - } - }); -})(); diff --git a/static/js/third-party/statistics/lean-analytics.js b/static/js/third-party/statistics/lean-analytics.js deleted file mode 100644 index b5d4205..0000000 --- a/static/js/third-party/statistics/lean-analytics.js +++ /dev/null @@ -1,102 +0,0 @@ -/* global CONFIG */ -/* eslint-disable no-console */ - -(function() { - const leancloudSelector = url => { - url = encodeURI(url); - return document.getElementById(url).querySelector('.leancloud-visitors-count'); - }; - - const addCount = Counter => { - const visitors = document.querySelector('.leancloud_visitors'); - const url = decodeURI(visitors.id); - const title = visitors.dataset.flagTitle; - - Counter('get', `/classes/Counter?where=${encodeURIComponent(JSON.stringify({ url }))}`) - .then(response => response.json()) - .then(({ results }) => { - if (results.length > 0) { - const counter = results[0]; - leancloudSelector(url).innerText = counter.time + 1; - Counter('put', '/classes/Counter/' + counter.objectId, { - time: { - '__op' : 'Increment', - 'amount': 1 - } - }) - .catch(error => { - console.error('Failed to save visitor count', error); - }); - } else if (CONFIG.leancloud_visitors.security) { - leancloudSelector(url).innerText = 'Counter not initialized! More info at console err msg.'; - console.error('ATTENTION! LeanCloud counter has security bug, see how to solve it here: https://github.com/theme-next/hexo-leancloud-counter-security. \n However, you can still use LeanCloud without security, by setting `security` option to `false`.'); - } else { - Counter('post', '/classes/Counter', { title, url, time: 1 }) - .then(response => response.json()) - .then(() => { - leancloudSelector(url).innerText = 1; - }) - .catch(error => { - console.error('Failed to create', error); - }); - } - }) - .catch(error => { - console.error('LeanCloud Counter Error', error); - }); - }; - - const showTime = Counter => { - const visitors = document.querySelectorAll('.leancloud_visitors'); - const entries = [...visitors].map(element => { - return decodeURI(element.id); - }); - - Counter('get', `/classes/Counter?where=${encodeURIComponent(JSON.stringify({ url: { '$in': entries } }))}`) - .then(response => response.json()) - .then(({ results }) => { - for (const url of entries) { - const target = results.find(item => item.url === url); - leancloudSelector(url).innerText = target ? target.time : 0; - } - }) - .catch(error => { - console.error('LeanCloud Counter Error', error); - }); - }; - - const { app_id, app_key, server_url } = CONFIG.leancloud_visitors; - const fetchData = api_server => { - const Counter = (method, url, data) => { - return fetch(`${api_server}/1.1${url}`, { - method, - headers: { - 'X-LC-Id' : app_id, - 'X-LC-Key' : app_key, - 'Content-Type': 'application/json' - }, - body: JSON.stringify(data) - }); - }; - if (CONFIG.page.isPost) { - if (CONFIG.hostname !== location.hostname) return; - addCount(Counter); - } else if (document.querySelectorAll('.post-title-link').length >= 1) { - showTime(Counter); - } - }; - - const api_server = app_id.slice(-9) === '-MdYXbMMI' ? `https://${app_id.slice(0, 8).toLowerCase()}.api.lncldglobal.com` : server_url; - - document.addEventListener('page:loaded', () => { - if (api_server) { - fetchData(api_server); - } else { - fetch(`https://app-router.leancloud.cn/2/route?appId=${app_id}`) - .then(response => response.json()) - .then(({ api_server }) => { - fetchData(`https://${api_server}`); - }); - } - }); -})(); diff --git a/static/js/third-party/tags/mermaid.js b/static/js/third-party/tags/mermaid.js deleted file mode 100644 index 9623dc5..0000000 --- a/static/js/third-party/tags/mermaid.js +++ /dev/null @@ -1,32 +0,0 @@ -/* global NexT, CONFIG, mermaid */ - -document.addEventListener('page:loaded', () => { - const mermaidElements = document.querySelectorAll('.mermaid'); - if (mermaidElements.length) { - NexT.utils.getScript(CONFIG.mermaid.js, { - condition: window.mermaid - }).then(() => { - mermaidElements.forEach(element => { - const newElement = document.createElement('div'); - newElement.innerHTML = element.innerHTML; - newElement.className = element.className; - const parent = element.parentNode; - // Fix issue #347 - // Support mermaid inside backtick code block - if (parent.matches('pre')) { - parent.parentNode.replaceChild(newElement, parent); - } else { - parent.replaceChild(newElement, element); - } - }); - mermaid.initialize({ - theme : CONFIG.darkmode && window.matchMedia('(prefers-color-scheme: dark)').matches ? CONFIG.mermaid.theme.dark : CONFIG.mermaid.theme.light, - logLevel : 4, - flowchart: { curve: 'linear' }, - gantt : { axisFormat: '%m/%d/%Y' }, - sequence : { actorMargin: 50 } - }); - mermaid.init(); - }); - } -}); diff --git a/static/js/third-party/tags/pdf.js b/static/js/third-party/tags/pdf.js deleted file mode 100644 index 7e82891..0000000 --- a/static/js/third-party/tags/pdf.js +++ /dev/null @@ -1,23 +0,0 @@ -/* global NexT, CONFIG, PDFObject */ - -document.addEventListener('page:loaded', () => { - if (document.querySelectorAll('.pdf-container').length) { - NexT.utils.getScript(CONFIG.pdf.object_url, { - condition: window.PDFObject - }).then(() => { - document.querySelectorAll('.pdf-container').forEach(element => { - PDFObject.embed(element.dataset.target, element, { - pdfOpenParams: { - navpanes : 0, - toolbar : 0, - statusbar: 0, - pagemode : 'thumbs', - view : 'FitH' - }, - PDFJS_URL: CONFIG.pdf.url, - height : element.dataset.height - }); - }); - }); - } -}); diff --git a/theme.toml b/theme.toml index eae8001..f290a6b 100644 --- a/theme.toml +++ b/theme.toml @@ -5,7 +5,7 @@ description = "Easily & powerful theme for Hugo engine." homepage = "https://github.com/hugo-next/hugo-theme-next" tags = ["Blog", "Simple", "Personal", "Responsive", "Documentation", "Light", "Dark"] features = ["Blog", "Responsive", "Documentation", "Light", "Dark"] -min_version = "0.89.0" +min_version = "0.134.0" demosite = "https://preview.hugo-next.eu.org" [author]