diff --git a/404.html b/404.html index 0f918364..50cad578 100644 --- a/404.html +++ b/404.html @@ -5,18 +5,21 @@ 404 | 哪吒监控 - - - - - - - + + + + + + + + + + + -
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.
- +
+ \ No newline at end of file diff --git a/assets/1.b4b4591f.jpeg b/assets/1.VA-CzEkF.jpeg similarity index 100% rename from assets/1.b4b4591f.jpeg rename to assets/1.VA-CzEkF.jpeg diff --git a/assets/2.38c2ea56.png b/assets/2.r5IbCoDU.png similarity index 100% rename from assets/2.38c2ea56.png rename to assets/2.r5IbCoDU.png diff --git a/assets/4.fe6a4e7a.jpg b/assets/4.DAp6JO4C.jpg similarity index 100% rename from assets/4.fe6a4e7a.jpg rename to assets/4.DAp6JO4C.jpg diff --git a/assets/5.23139306.png b/assets/5.DI5HceD6.png similarity index 100% rename from assets/5.23139306.png rename to assets/5.DI5HceD6.png diff --git a/assets/6.22a61698.png b/assets/6.B0QVmape.png similarity index 100% rename from assets/6.22a61698.png rename to assets/6.B0QVmape.png diff --git a/assets/app.586a9009.js b/assets/app.586a9009.js deleted file mode 100644 index d18203ed..00000000 --- a/assets/app.586a9009.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as c,o as p,c as u,C as f,a4 as s,M as r,a5 as m,a6 as h,a7 as _,a8 as w,a9 as A,aa as g,ab as v,ac as P,ad as y,ae as C,J as $,d as b,u as x,p as E,k as R,af as D,ag as L,ah as T}from"./chunks/framework.44fd0451.js";import{t as i}from"./chunks/theme.ccb07a11.js";const V={data(){return{show:!1}},mounted(){this.show=navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i)}},k={key:0,class:"wwads-cn wwads-horizontal","data-id":"296"};function O(e,t,a,n,l,J){return l.show?(p(),u("div",k)):f("",!0)}const S=c(V,[["render",O]]),j={},B={class:"wwads-cn wwads-vertical","data-id":"296",style:{"margin-bottom":"20px"}};function F(e,t){return p(),u("div",B)}const z=c(j,[["render",F]]),H={...i,Layout(){return s(i.Layout,null,{"doc-top":()=>s(S),"aside-top":()=>s(z)})}};function d(e){if(e.extends){const t=d(e.extends);return{...t,...e,async enhanceApp(a){t.enhanceApp&&await t.enhanceApp(a),e.enhanceApp&&await e.enhanceApp(a)}}}return e}const o=d(H),I=b({name:"VitePressApp",setup(){const{site:e}=x();return E(()=>{R(()=>{document.documentElement.lang=e.value.lang,document.documentElement.dir=e.value.dir})}),D(),L(),T(),o.setup&&o.setup(),()=>s(o.Layout)}});async function M(){const e=G(),t=N();t.provide(h,e);const a=_(e.route);return t.provide(w,a),t.component("Content",A),t.component("ClientOnly",g),Object.defineProperties(t.config.globalProperties,{$frontmatter:{get(){return a.frontmatter.value}},$params:{get(){return a.page.value.params}}}),o.enhanceApp&&await o.enhanceApp({app:t,router:e,siteData:v}),{app:t,router:e,data:a}}function N(){return P(I)}function G(){let e=r,t;return y(a=>{let n=C(a);return e&&(t=n),(e||t===n)&&(n=n.replace(/\.js$/,".lean.js")),r&&(e=!1),$(()=>import(n),[])},o.NotFound)}r&&M().then(({app:e,router:t,data:a})=>{t.go().then(()=>{m(t.route,a.site),e.mount("#app")})});export{M as createApp}; diff --git a/assets/app.BSuXTqpA.js b/assets/app.BSuXTqpA.js new file mode 100644 index 00000000..c2c02b22 --- /dev/null +++ b/assets/app.BSuXTqpA.js @@ -0,0 +1 @@ +import{U as o,a5 as p,a6 as u,a7 as l,a8 as c,a9 as f,aa as d,ab as m,ac as h,ad as g,ae as A,d as P,u as v,y,x as w,af as C,ag as R,ah as b,a3 as E}from"./chunks/framework.BmdFiWrL.js";import{R as S}from"./chunks/theme.DAaY-8e0.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(S),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return y(()=>{w(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&C(),R(),b(),s.setup&&s.setup(),()=>E(s.Layout)}});async function _(){globalThis.__VITEPRESS__=!0;const e=D(),a=x();a.provide(u,e);const t=l(e.route);return a.provide(c,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function x(){return h(T)}function D(){let e=o,a;return g(t=>{let n=A(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&_().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{_ as createApp}; diff --git a/assets/case_case1.md.4511267a.js b/assets/case_case1.md.4511267a.js deleted file mode 100644 index d215ba35..00000000 --- a/assets/case_case1.md.4511267a.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a,R as r}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"自建一个TG机器人来查询服务器信息","description":"","frontmatter":{},"headers":[],"relativePath":"case/case1.md","filePath":"case/case1.md","lastUpdated":1718495592000}'),o={name:"case/case1.md"},_=r('

自建一个TG机器人来查询服务器信息

贡献者:

项目地址:nezha_api_tgbot

镜像备份(非实时更新):nezha_api_tgbot
机器人可以通过API向面板请求服务器状态信息,得到信息后发送给用户
你可以搭建此机器人来方便地查看指定服务器的当前状态且不需要打开面板

',5),s=[_];function i(n,c,p,h,l,d){return t(),a("div",null,s)}const g=e(o,[["render",i]]);export{b as __pageData,g as default}; diff --git a/assets/case_case1.md.4511267a.lean.js b/assets/case_case1.md.4511267a.lean.js deleted file mode 100644 index 1ddf38bf..00000000 --- a/assets/case_case1.md.4511267a.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a,R as r}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"自建一个TG机器人来查询服务器信息","description":"","frontmatter":{},"headers":[],"relativePath":"case/case1.md","filePath":"case/case1.md","lastUpdated":1718495592000}'),o={name:"case/case1.md"},_=r("",5),s=[_];function i(n,c,p,h,l,d){return t(),a("div",null,s)}const g=e(o,[["render",i]]);export{b as __pageData,g as default}; diff --git a/assets/case_case1.md.ChD04IfY.js b/assets/case_case1.md.ChD04IfY.js new file mode 100644 index 00000000..c87838a5 --- /dev/null +++ b/assets/case_case1.md.ChD04IfY.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as r}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"自建一个TG机器人来查询服务器信息","description":"","frontmatter":{},"headers":[],"relativePath":"case/case1.md","filePath":"case/case1.md","lastUpdated":1719239024000}'),o={name:"case/case1.md"},_=r('

自建一个TG机器人来查询服务器信息

贡献者:

项目地址:nezha_api_tgbot

镜像备份(非实时更新):nezha_api_tgbot
机器人可以通过API向面板请求服务器状态信息,得到信息后发送给用户
你可以搭建此机器人来方便地查看指定服务器的当前状态且不需要打开面板

',5),s=[_];function i(n,c,p,h,l,d){return a(),t("div",null,s)}const g=e(o,[["render",i]]);export{b as __pageData,g as default}; diff --git a/assets/case_case1.md.ChD04IfY.lean.js b/assets/case_case1.md.ChD04IfY.lean.js new file mode 100644 index 00000000..447f422f --- /dev/null +++ b/assets/case_case1.md.ChD04IfY.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as r}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"自建一个TG机器人来查询服务器信息","description":"","frontmatter":{},"headers":[],"relativePath":"case/case1.md","filePath":"case/case1.md","lastUpdated":1719239024000}'),o={name:"case/case1.md"},_=r("",5),s=[_];function i(n,c,p,h,l,d){return a(),t("div",null,s)}const g=e(o,[["render",i]]);export{b as __pageData,g as default}; diff --git a/assets/case_case2.md.15761344.js b/assets/case_case2.md.15761344.js deleted file mode 100644 index 78b8e4f5..00000000 --- a/assets/case_case2.md.15761344.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a}from"./chunks/qrcode.59c44dde.js";import{_ as e,o as r,c as i,R as t}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"在iOS/MacOS中使用Siri运行快捷指令查询服务器状态","description":"","frontmatter":{},"headers":[],"relativePath":"case/case2.md","filePath":"case/case2.md","lastUpdated":1718495592000}'),o={name:"case/case2.md"},c=t('

在iOS/MacOS中使用Siri运行快捷指令查询服务器状态

当前版本:V1.0
贡献者:

获取快捷指令

使用iPhone或iPad扫描以下二维码,获取快捷指令

coode

MacOS用户请访问这里,获取快捷指令

使用说明

WARNING

每个快捷指令只能监控一台服务器,如需要监控多个服务器,请多次复制此快捷指令并分别配置,然后分别修改快捷指令名称,如;一号服务器状态、二号服务器状态等

',8),s=[c];function l(d,n,h,_,p,m){return r(),i("div",null,s)}const S=e(o,[["render",l]]);export{b as __pageData,S as default}; diff --git a/assets/case_case2.md.15761344.lean.js b/assets/case_case2.md.15761344.lean.js deleted file mode 100644 index 0f62d1da..00000000 --- a/assets/case_case2.md.15761344.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a}from"./chunks/qrcode.59c44dde.js";import{_ as e,o as r,c as i,R as t}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"在iOS/MacOS中使用Siri运行快捷指令查询服务器状态","description":"","frontmatter":{},"headers":[],"relativePath":"case/case2.md","filePath":"case/case2.md","lastUpdated":1718495592000}'),o={name:"case/case2.md"},c=t("",8),s=[c];function l(d,n,h,_,p,m){return r(),i("div",null,s)}const S=e(o,[["render",l]]);export{b as __pageData,S as default}; diff --git a/assets/case_case2.md.p4X-B3ai.js b/assets/case_case2.md.p4X-B3ai.js new file mode 100644 index 00000000..2914a496 --- /dev/null +++ b/assets/case_case2.md.p4X-B3ai.js @@ -0,0 +1 @@ +import{_ as a}from"./chunks/qrcode.CZOxHFH-.js";import{_ as e,c as r,o as i,a4 as t}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"在iOS/MacOS中使用Siri运行快捷指令查询服务器状态","description":"","frontmatter":{},"headers":[],"relativePath":"case/case2.md","filePath":"case/case2.md","lastUpdated":1719239024000}'),o={name:"case/case2.md"},c=t('

在iOS/MacOS中使用Siri运行快捷指令查询服务器状态

当前版本:V1.0
贡献者:

获取快捷指令

使用iPhone或iPad扫描以下二维码,获取快捷指令

coode

MacOS用户请访问这里,获取快捷指令

使用说明

WARNING

每个快捷指令只能监控一台服务器,如需要监控多个服务器,请多次复制此快捷指令并分别配置,然后分别修改快捷指令名称,如;一号服务器状态、二号服务器状态等

',8),s=[c];function l(d,n,h,_,p,m){return i(),r("div",null,s)}const S=e(o,[["render",l]]);export{b as __pageData,S as default}; diff --git a/assets/case_case2.md.p4X-B3ai.lean.js b/assets/case_case2.md.p4X-B3ai.lean.js new file mode 100644 index 00000000..843e116a --- /dev/null +++ b/assets/case_case2.md.p4X-B3ai.lean.js @@ -0,0 +1 @@ +import{_ as a}from"./chunks/qrcode.CZOxHFH-.js";import{_ as e,c as r,o as i,a4 as t}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"在iOS/MacOS中使用Siri运行快捷指令查询服务器状态","description":"","frontmatter":{},"headers":[],"relativePath":"case/case2.md","filePath":"case/case2.md","lastUpdated":1719239024000}'),o={name:"case/case2.md"},c=t("",8),s=[c];function l(d,n,h,_,p,m){return i(),r("div",null,s)}const S=e(o,[["render",l]]);export{b as __pageData,S as default}; diff --git a/assets/case_case3.md.Bktz5arj.js b/assets/case_case3.md.Bktz5arj.js new file mode 100644 index 00000000..b8c15587 --- /dev/null +++ b/assets/case_case3.md.Bktz5arj.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as a,a4 as r}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人","description":"","frontmatter":{},"headers":[],"relativePath":"case/case3.md","filePath":"case/case3.md","lastUpdated":1719239024000}'),d={name:"case/case3.md"},l=r('

自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人

贡献者:

项目地址:nezha_telegram_bot

镜像备份(非实时更新):nezha_telegram_bot

项目特色

开源Telegram机器人项目,可以基于API实时查询哪吒面板的服务器信息。

命令列表

命令功能仅私聊
start开始使用键盘主菜单✔️
help帮助列表
add添加面板链接和token✔️
url添加面板链接✔️
token添加面板token✔️
info获取保存的面板链接和token✔️
delete删除保存的面板链接和token✔️
id命令后面添加整数id,来进行单个服务器信息查询(私聊带刷新按钮,群聊不带)
all查询所有服务器的统计信息
search在服务器名字中搜索关键字(支持多个,用空格分开)

效果展示

imageimage

',12),i=[l];function o(h,n,c,s,_,m){return a(),e("div",null,i)}const f=t(d,[["render",o]]);export{b as __pageData,f as default}; diff --git a/assets/case_case3.md.Bktz5arj.lean.js b/assets/case_case3.md.Bktz5arj.lean.js new file mode 100644 index 00000000..9c32d75c --- /dev/null +++ b/assets/case_case3.md.Bktz5arj.lean.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as a,a4 as r}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人","description":"","frontmatter":{},"headers":[],"relativePath":"case/case3.md","filePath":"case/case3.md","lastUpdated":1719239024000}'),d={name:"case/case3.md"},l=r("",12),i=[l];function o(h,n,c,s,_,m){return a(),e("div",null,i)}const f=t(d,[["render",o]]);export{b as __pageData,f as default}; diff --git a/assets/case_case3.md.dd36066e.js b/assets/case_case3.md.dd36066e.js deleted file mode 100644 index b67ee47e..00000000 --- a/assets/case_case3.md.dd36066e.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,o as e,c as a,R as r}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人","description":"","frontmatter":{},"headers":[],"relativePath":"case/case3.md","filePath":"case/case3.md","lastUpdated":1718495592000}'),d={name:"case/case3.md"},l=r('

自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人

贡献者:

项目地址:nezha_telegram_bot

镜像备份(非实时更新):nezha_telegram_bot

项目特色

开源Telegram机器人项目,可以基于API实时查询哪吒面板的服务器信息。

命令列表

命令功能仅私聊
start开始使用键盘主菜单✔️
help帮助列表
add添加面板链接和token✔️
url添加面板链接✔️
token添加面板token✔️
info获取保存的面板链接和token✔️
delete删除保存的面板链接和token✔️
id命令后面添加整数id,来进行单个服务器信息查询(私聊带刷新按钮,群聊不带)
all查询所有服务器的统计信息
search在服务器名字中搜索关键字(支持多个,用空格分开)

效果展示

imageimage

',12),i=[l];function o(h,n,c,s,_,m){return e(),a("div",null,i)}const b=t(d,[["render",o]]);export{f as __pageData,b as default}; diff --git a/assets/case_case3.md.dd36066e.lean.js b/assets/case_case3.md.dd36066e.lean.js deleted file mode 100644 index 0d85589d..00000000 --- a/assets/case_case3.md.dd36066e.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,o as e,c as a,R as r}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人","description":"","frontmatter":{},"headers":[],"relativePath":"case/case3.md","filePath":"case/case3.md","lastUpdated":1718495592000}'),d={name:"case/case3.md"},l=r("",12),i=[l];function o(h,n,c,s,_,m){return e(),a("div",null,i)}const b=t(d,[["render",o]]);export{f as __pageData,b as default}; diff --git a/assets/case_case4.md.3d76eaa8.js b/assets/case_case4.md.3d76eaa8.js deleted file mode 100644 index a1c70ad5..00000000 --- a/assets/case_case4.md.3d76eaa8.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as t,c as e,R as a}from"./chunks/framework.44fd0451.js";const r="/assets/2.38c2ea56.png",n="/assets/5.23139306.png",o="/assets/6.22a61698.png",p="/assets/4.fe6a4e7a.jpg",c="/assets/1.b4b4591f.jpeg",y=JSON.parse('{"title":"重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑","description":"","frontmatter":{},"headers":[],"relativePath":"case/case4.md","filePath":"case/case4.md","lastUpdated":1718495592000}'),_={name:"case/case4.md"},i=a('

重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑



2

还在因为自己的小鸡配置太差被朋友嘲笑吗?
还在想参加以针会友活动却因为小鸡不够排面而觉得羞耻吗?
还在因为在哪吒TG群里机器人排名太低而觉得自己低人一等吗?


今天开始!找回自信!

来自南京的名老中医 dysf888 独家秘方!让你找回男人本色,激情畅享!
安装 Fake Agent,可随意修改服务器监测数据的倍数上传到 Dashboard,让你的小鸡 脱!胎!换!骨! 让你在 MJJ 面前起来!

镜像备份(非实时更新):Fake Agent

哪吒监控创始人奶爸也在用:
5


男人用了都说好:
6
4



1

',12),l=[i];function g(f,b,h,m,d,k){return t(),e("div",null,l)}const z=s(_,[["render",g]]);export{y as __pageData,z as default}; diff --git a/assets/case_case4.md.3d76eaa8.lean.js b/assets/case_case4.md.3d76eaa8.lean.js deleted file mode 100644 index ed8862a4..00000000 --- a/assets/case_case4.md.3d76eaa8.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as t,c as e,R as a}from"./chunks/framework.44fd0451.js";const r="/assets/2.38c2ea56.png",n="/assets/5.23139306.png",o="/assets/6.22a61698.png",p="/assets/4.fe6a4e7a.jpg",c="/assets/1.b4b4591f.jpeg",y=JSON.parse('{"title":"重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑","description":"","frontmatter":{},"headers":[],"relativePath":"case/case4.md","filePath":"case/case4.md","lastUpdated":1718495592000}'),_={name:"case/case4.md"},i=a("",12),l=[i];function g(f,b,h,m,d,k){return t(),e("div",null,l)}const z=s(_,[["render",g]]);export{y as __pageData,z as default}; diff --git a/assets/case_case4.md.Dcp2TVIl.js b/assets/case_case4.md.Dcp2TVIl.js new file mode 100644 index 00000000..a84f9396 --- /dev/null +++ b/assets/case_case4.md.Dcp2TVIl.js @@ -0,0 +1 @@ +import{_ as s,c as t,o as e,a4 as a}from"./chunks/framework.BmdFiWrL.js";const r="/assets/2.r5IbCoDU.png",n="/assets/5.DI5HceD6.png",o="/assets/6.B0QVmape.png",p="/assets/4.DAp6JO4C.jpg",c="/assets/1.VA-CzEkF.jpeg",u=JSON.parse('{"title":"重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑","description":"","frontmatter":{},"headers":[],"relativePath":"case/case4.md","filePath":"case/case4.md","lastUpdated":1719239024000}'),_={name:"case/case4.md"},i=a('

重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑



2

还在因为自己的小鸡配置太差被朋友嘲笑吗?
还在想参加以针会友活动却因为小鸡不够排面而觉得羞耻吗?
还在因为在哪吒TG群里机器人排名太低而觉得自己低人一等吗?


今天开始!找回自信!

来自南京的名老中医 dysf888 独家秘方!让你找回男人本色,激情畅享!
安装 Fake Agent,可随意修改服务器监测数据的倍数上传到 Dashboard,让你的小鸡 脱!胎!换!骨! 让你在 MJJ 面前起来!

镜像备份(非实时更新):Fake Agent

哪吒监控创始人奶爸也在用:
5


男人用了都说好:
6
4



1

',12),l=[i];function g(b,f,h,m,d,k){return e(),t("div",null,l)}const y=s(_,[["render",g]]);export{u as __pageData,y as default}; diff --git a/assets/case_case4.md.Dcp2TVIl.lean.js b/assets/case_case4.md.Dcp2TVIl.lean.js new file mode 100644 index 00000000..ec390c3b --- /dev/null +++ b/assets/case_case4.md.Dcp2TVIl.lean.js @@ -0,0 +1 @@ +import{_ as s,c as t,o as e,a4 as a}from"./chunks/framework.BmdFiWrL.js";const r="/assets/2.r5IbCoDU.png",n="/assets/5.DI5HceD6.png",o="/assets/6.B0QVmape.png",p="/assets/4.DAp6JO4C.jpg",c="/assets/1.VA-CzEkF.jpeg",u=JSON.parse('{"title":"重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑","description":"","frontmatter":{},"headers":[],"relativePath":"case/case4.md","filePath":"case/case4.md","lastUpdated":1719239024000}'),_={name:"case/case4.md"},i=a("",12),l=[i];function g(b,f,h,m,d,k){return e(),t("div",null,l)}const y=s(_,[["render",g]]);export{u as __pageData,y as default}; diff --git a/assets/case_case5.md.05a62247.js b/assets/case_case5.md.05a62247.js deleted file mode 100644 index 51d9c771..00000000 --- a/assets/case_case5.md.05a62247.js +++ /dev/null @@ -1,47 +0,0 @@ -import{_ as a,o as e,c as s,R as t}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"使用 Argo 隧道的哪吒服务端","description":"","frontmatter":{},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1718495592000}'),l={name:"case/case5.md"},n=t(`

使用 Argo 隧道的哪吒服务端

贡献者:

项目地址:Argo-Nezha-Service-Container

镜像备份(非实时更新):Argo-Nezha-Service-Container


目录


项目特点:

image

准备需要用的变量

image

面板域名加上 https:// 开头,回调地址再加上 /oauth2/callback 结尾

imageimageimageimageimage

Argo 认证的获取方式: json 或 token

Argo 隧道认证方式有 json 和 token,使用两个方式其中之一。推荐前者,理由脚本会处理好所有的 Argo 隧道参数和路径,后者需要到 Cloudflare 官网手动设置,容易出错。

(方式 1 - Json):

通过 Cloudflare Json 生成网轻松获取 Argo 隧道 json 信息: https://fscarmen.cloudflare.now.cc

image

(方式 2 - Token): 通过 Cloudflare 官网,手动生成 Argo 隧道 token 信息

到 cf 官网:https://dash.cloudflare.com/

imageimageimageimageimageimageimage

PaaS 部署实例

镜像 fscarmen/argo-nezha:latest , 支持 amd64 和 arm64 架构

用到的变量

变量名是否必须备注
GH_USERgithub 的用户名,用于面板管理授权
GH_CLIENTID在 github 上申请
GH_CLIENTSECRET在 github 上申请
GH_BACKUP_USER在 github 上备份哪吒服务端数据库的 github 用户名,不填则与面板管理授权的账户 GH_USER 一致
GH_REPO在 github 上备份哪吒服务端数据库文件的 github 库
GH_EMAILgithub 的邮箱,用于备份的 git 推送到远程库
GH_PATgithub 的 PAT
ARGO_AUTHJson: 从 https://fscarmen.cloudflare.now.cc 获取的 Argo Json
Token: 从 Cloudflare 官网获取
ARGO_DOMAINArgo 域名

Koyeb

Deploy to Koyeb

imageimageimageimageimage

VPS 部署方式 1 --- docker

docker 部署

docker run -dit \\
-           --name nezha_dashboard \\
-           --pull always \\
-           --restart always \\
-           -e GH_USER=<填 github 用户名> \\
-           -e GH_EMAIL=<填 github 邮箱> \\
-           -e GH_PAT=<填获取的> \\
-           -e GH_REPO=<填自定义的> \\
-           -e GH_CLIENTID=<填获取的>  \\
-           -e GH_CLIENTSECRET=<填获取的> \\
-           -e ARGO_AUTH='<填获取的 Argo json 或者 token>' \\
-           -e ARGO_DOMAIN=<填自定义的> \\
-           -e GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量> \\
-           fscarmen/argo-nezha

docker-compose 部署

version: '3.8'
-services:
-    argo-nezha:
-        image: fscarmen/argo-nezha
-        pull: always
-        container_name: nezha_dashboard
-        restart: always
-        environment:
-            - GH_USER=<填 github 用户名>
-            - GH_EMAIL=<<填 github 邮箱>
-            - GH_PAT=<填获取的>
-            - GH_REPO=<填自定义的>
-            - GH_CLIENTID=<填获取的>
-            - GH_CLIENTSECRET=<填获取的>
-            - ARGO_AUTH='<填获取的 Argo json 或者 token>'
-            - ARGO_DOMAIN=<填自定义的>
-            - GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量>

VPS 部署方式 2 --- 宿主机

bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)

客户端接入

通过gRPC传输,无需额外配置。使用面板给到的安装方式,举例

curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent nezha.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls

SSH 接入

<file path>/cloudflared access ssh --hostname nezha.seales.nom.za/<GH_CLIENTID>
imageimageimage

手动备份数据

方法一: 把 Github 备份库里的 README.md 文件内容改为 backup

image

方法二: ssh 进去后,容器版本运行 /dashboard/backup.sh; 非容器版本运行 /opt/nezha/dashboard/backup.sh

自动还原备份

下图为以还原文件名为 dashboard-2023-04-23-13:08:37.tar.gz 作示例

image

手动还原备份

bash /dashboard/restore.sh <文件名>
image

完美搬家

tar czvf dashboard.tar.gz /dashboard

主体目录文件及说明

/dashboard/
-|-- app                  # 哪吒面板主程序
-|-- argo.json            # Argo 隧道 json 文件,记录着使用隧道的信息
-|-- argo.yml             # Argo 隧道 yml 文件,用于在一同隧道下,根据不同域名来分流 web, gRPC 和 ssh 协议的作用
-|-- backup.sh            # 备份数据脚本
-|-- restore.sh           # 还原备份脚本
-|-- dbfile               # 记录最新的还原或备份文件名
-|-- resource             # 面板主题、语言和旗帜等资料的文件夹
-|-- data
-|   |-- config.yaml      # 哪吒面板的配置,如 Github OAuth2 / gRPC 域名 / 端口 / 是否启用 TLS 等信息
-|   \`-- sqlite.db        # SQLite 数据库文件,记录着面板设置的所有 severs 和 cron 等信息
-|-- entrypoint.sh        # 主脚本,容器运行后执行
-|-- nezha.csr            # SSL/TLS 证书签名请求
-|-- nezha.key            # SSL/TLS 证书的私钥信息
-|-- nezha.pem            # SSL/TLS 证书文件
-|-- cloudflared          # Cloudflare Argo 隧道主程序
-|-- grpcwebproxy         # gRPC 反代主程序
-\`-- nezha-agent          # 哪吒客户端,用于监控本地 localhost

鸣谢下列作者的文章和项目:

免责声明:

`,89),r=[n];function o(c,i,p,h,d,g){return e(),s("div",null,r)}const u=a(l,[["render",o]]);export{m as __pageData,u as default}; diff --git a/assets/case_case5.md.05a62247.lean.js b/assets/case_case5.md.05a62247.lean.js deleted file mode 100644 index 7f1113c4..00000000 --- a/assets/case_case5.md.05a62247.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as e,c as s,R as t}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"使用 Argo 隧道的哪吒服务端","description":"","frontmatter":{},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1718495592000}'),l={name:"case/case5.md"},n=t("",89),r=[n];function o(c,i,p,h,d,g){return e(),s("div",null,r)}const u=a(l,[["render",o]]);export{m as __pageData,u as default}; diff --git a/assets/case_case5.md._Z3o2S8Q.js b/assets/case_case5.md._Z3o2S8Q.js new file mode 100644 index 00000000..e2c34b6c --- /dev/null +++ b/assets/case_case5.md._Z3o2S8Q.js @@ -0,0 +1,47 @@ +import{_ as a,c as e,o as s,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"使用 Argo 隧道的哪吒服务端","description":"","frontmatter":{},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1719239024000}'),n={name:"case/case5.md"},r=t(`

使用 Argo 隧道的哪吒服务端

贡献者:

项目地址:Argo-Nezha-Service-Container

镜像备份(非实时更新):Argo-Nezha-Service-Container


目录


项目特点:

image

准备需要用的变量

image

面板域名加上 https:// 开头,回调地址再加上 /oauth2/callback 结尾

imageimageimageimageimage

Argo 认证的获取方式: json 或 token

Argo 隧道认证方式有 json 和 token,使用两个方式其中之一。推荐前者,理由脚本会处理好所有的 Argo 隧道参数和路径,后者需要到 Cloudflare 官网手动设置,容易出错。

(方式 1 - Json):

通过 Cloudflare Json 生成网轻松获取 Argo 隧道 json 信息: https://fscarmen.cloudflare.now.cc

image

(方式 2 - Token): 通过 Cloudflare 官网,手动生成 Argo 隧道 token 信息

到 cf 官网:https://dash.cloudflare.com/

imageimageimageimageimageimageimage

PaaS 部署实例

镜像 fscarmen/argo-nezha:latest , 支持 amd64 和 arm64 架构

用到的变量

变量名是否必须备注
GH_USERgithub 的用户名,用于面板管理授权
GH_CLIENTID在 github 上申请
GH_CLIENTSECRET在 github 上申请
GH_BACKUP_USER在 github 上备份哪吒服务端数据库的 github 用户名,不填则与面板管理授权的账户 GH_USER 一致
GH_REPO在 github 上备份哪吒服务端数据库文件的 github 库
GH_EMAILgithub 的邮箱,用于备份的 git 推送到远程库
GH_PATgithub 的 PAT
ARGO_AUTHJson: 从 https://fscarmen.cloudflare.now.cc 获取的 Argo Json
Token: 从 Cloudflare 官网获取
ARGO_DOMAINArgo 域名

Koyeb

Deploy to Koyeb

imageimageimageimageimage

VPS 部署方式 1 --- docker

docker 部署

docker run -dit \\
+           --name nezha_dashboard \\
+           --pull always \\
+           --restart always \\
+           -e GH_USER=<填 github 用户名> \\
+           -e GH_EMAIL=<填 github 邮箱> \\
+           -e GH_PAT=<填获取的> \\
+           -e GH_REPO=<填自定义的> \\
+           -e GH_CLIENTID=<填获取的>  \\
+           -e GH_CLIENTSECRET=<填获取的> \\
+           -e ARGO_AUTH='<填获取的 Argo json 或者 token>' \\
+           -e ARGO_DOMAIN=<填自定义的> \\
+           -e GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量> \\
+           fscarmen/argo-nezha

docker-compose 部署

version: '3.8'
+services:
+    argo-nezha:
+        image: fscarmen/argo-nezha
+        pull: always
+        container_name: nezha_dashboard
+        restart: always
+        environment:
+            - GH_USER=<填 github 用户名>
+            - GH_EMAIL=<<填 github 邮箱>
+            - GH_PAT=<填获取的>
+            - GH_REPO=<填自定义的>
+            - GH_CLIENTID=<填获取的>
+            - GH_CLIENTSECRET=<填获取的>
+            - ARGO_AUTH='<填获取的 Argo json 或者 token>'
+            - ARGO_DOMAIN=<填自定义的>
+            - GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量>

VPS 部署方式 2 --- 宿主机

bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)

客户端接入

通过gRPC传输,无需额外配置。使用面板给到的安装方式,举例

curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent nezha.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls

SSH 接入

<file path>/cloudflared access ssh --hostname nezha.seales.nom.za/<GH_CLIENTID>
imageimageimage

手动备份数据

方法一: 把 Github 备份库里的 README.md 文件内容改为 backup

image

方法二: ssh 进去后,容器版本运行 /dashboard/backup.sh; 非容器版本运行 /opt/nezha/dashboard/backup.sh

自动还原备份

下图为以还原文件名为 dashboard-2023-04-23-13:08:37.tar.gz 作示例

image

手动还原备份

bash /dashboard/restore.sh <文件名>
image

完美搬家

tar czvf dashboard.tar.gz /dashboard

主体目录文件及说明

/dashboard/
+|-- app                  # 哪吒面板主程序
+|-- argo.json            # Argo 隧道 json 文件,记录着使用隧道的信息
+|-- argo.yml             # Argo 隧道 yml 文件,用于在一同隧道下,根据不同域名来分流 web, gRPC 和 ssh 协议的作用
+|-- backup.sh            # 备份数据脚本
+|-- restore.sh           # 还原备份脚本
+|-- dbfile               # 记录最新的还原或备份文件名
+|-- resource             # 面板主题、语言和旗帜等资料的文件夹
+|-- data
+|   |-- config.yaml      # 哪吒面板的配置,如 Github OAuth2 / gRPC 域名 / 端口 / 是否启用 TLS 等信息
+|   \`-- sqlite.db        # SQLite 数据库文件,记录着面板设置的所有 severs 和 cron 等信息
+|-- entrypoint.sh        # 主脚本,容器运行后执行
+|-- nezha.csr            # SSL/TLS 证书签名请求
+|-- nezha.key            # SSL/TLS 证书的私钥信息
+|-- nezha.pem            # SSL/TLS 证书文件
+|-- cloudflared          # Cloudflare Argo 隧道主程序
+|-- grpcwebproxy         # gRPC 反代主程序
+\`-- nezha-agent          # 哪吒客户端,用于监控本地 localhost

鸣谢下列作者的文章和项目:

免责声明:

`,89),l=[r];function i(o,c,h,p,d,g){return s(),e("div",null,l)}const m=a(n,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/case_case5.md._Z3o2S8Q.lean.js b/assets/case_case5.md._Z3o2S8Q.lean.js new file mode 100644 index 00000000..6121f197 --- /dev/null +++ b/assets/case_case5.md._Z3o2S8Q.lean.js @@ -0,0 +1 @@ +import{_ as a,c as e,o as s,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"使用 Argo 隧道的哪吒服务端","description":"","frontmatter":{},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1719239024000}'),n={name:"case/case5.md"},r=t("",89),l=[r];function i(o,c,h,p,d,g){return s(),e("div",null,l)}const m=a(n,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/case_index.md.0560322d.js b/assets/case_index.md.Dpbpc1R2.js similarity index 76% rename from assets/case_index.md.0560322d.js rename to assets/case_index.md.Dpbpc1R2.js index dffc579e..a39b93e8 100644 --- a/assets/case_index.md.0560322d.js +++ b/assets/case_index.md.Dpbpc1R2.js @@ -1 +1 @@ -import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"社区项目","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"社区项目","hero":{"name":"哪吒监控社区项目","text":"社区贡献的相关项目","tagline":"为哪吒监控提供了更多扩展","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"查看项目 →","link":"/case/case1"}]},"features":[{"title":"提交项目","details":"我们欢迎您提交自己的项目,请加入TG群联系管理员了解相关事宜"},{"title":"注意事项","details":"所有项目均由社区成员贡献,请您知悉哪吒监控团队无法为社区项目承担包括且不限于:保修、可用性、安全性等责任"}]},"headers":[],"relativePath":"case/index.md","filePath":"case/index.md","lastUpdated":1718495592000}'),s={name:"case/index.md"};function n(i,r,c,o,d,l){return t(),a("div")}const _=e(s,[["render",n]]);export{p as __pageData,_ as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"社区项目","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"社区项目","hero":{"name":"哪吒监控社区项目","text":"社区贡献的相关项目","tagline":"为哪吒监控提供了更多扩展","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"查看项目 →","link":"/case/case1"}]},"features":[{"title":"提交项目","details":"我们欢迎您提交自己的项目,请加入TG群联系管理员了解相关事宜"},{"title":"注意事项","details":"所有项目均由社区成员贡献,请您知悉哪吒监控团队无法为社区项目承担包括且不限于:保修、可用性、安全性等责任"}]},"headers":[],"relativePath":"case/index.md","filePath":"case/index.md","lastUpdated":1719239024000}'),s={name:"case/index.md"};function n(i,r,c,o,d,l){return a(),t("div")}const _=e(s,[["render",n]]);export{p as __pageData,_ as default}; diff --git a/assets/case_index.md.0560322d.lean.js b/assets/case_index.md.Dpbpc1R2.lean.js similarity index 76% rename from assets/case_index.md.0560322d.lean.js rename to assets/case_index.md.Dpbpc1R2.lean.js index dffc579e..a39b93e8 100644 --- a/assets/case_index.md.0560322d.lean.js +++ b/assets/case_index.md.Dpbpc1R2.lean.js @@ -1 +1 @@ -import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"社区项目","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"社区项目","hero":{"name":"哪吒监控社区项目","text":"社区贡献的相关项目","tagline":"为哪吒监控提供了更多扩展","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"查看项目 →","link":"/case/case1"}]},"features":[{"title":"提交项目","details":"我们欢迎您提交自己的项目,请加入TG群联系管理员了解相关事宜"},{"title":"注意事项","details":"所有项目均由社区成员贡献,请您知悉哪吒监控团队无法为社区项目承担包括且不限于:保修、可用性、安全性等责任"}]},"headers":[],"relativePath":"case/index.md","filePath":"case/index.md","lastUpdated":1718495592000}'),s={name:"case/index.md"};function n(i,r,c,o,d,l){return t(),a("div")}const _=e(s,[["render",n]]);export{p as __pageData,_ as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"社区项目","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"社区项目","hero":{"name":"哪吒监控社区项目","text":"社区贡献的相关项目","tagline":"为哪吒监控提供了更多扩展","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"查看项目 →","link":"/case/case1"}]},"features":[{"title":"提交项目","details":"我们欢迎您提交自己的项目,请加入TG群联系管理员了解相关事宜"},{"title":"注意事项","details":"所有项目均由社区成员贡献,请您知悉哪吒监控团队无法为社区项目承担包括且不限于:保修、可用性、安全性等责任"}]},"headers":[],"relativePath":"case/index.md","filePath":"case/index.md","lastUpdated":1719239024000}'),s={name:"case/index.md"};function n(i,r,c,o,d,l){return a(),t("div")}const _=e(s,[["render",n]]);export{p as __pageData,_ as default}; diff --git a/assets/chunks/VPAlgoliaSearchBox.0c29092b.js b/assets/chunks/VPAlgoliaSearchBox.0c29092b.js deleted file mode 100644 index 82f60900..00000000 --- a/assets/chunks/VPAlgoliaSearchBox.0c29092b.js +++ /dev/null @@ -1,17 +0,0 @@ -import{d as fo,ai as mo,x as po,p as vo,w as ho,o as yo,c as go}from"./framework.44fd0451.js";import{u as bo}from"./theme.ccb07a11.js";/*! @docsearch/js 3.5.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */function cn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function I(t){for(var e=1;e=0||(l[c]=a[c]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function st(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var o=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(o!=null){var i,a,u=[],c=!0,s=!1;try{for(o=o.call(n);!(c=(i=o.next()).done)&&(u.push(i.value),!r||u.length!==r);c=!0);}catch(l){s=!0,a=l}finally{try{c||o.return==null||o.return()}finally{if(s)throw a}}return u}}(t,e)||yr(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ft(t){return function(e){if(Array.isArray(e))return Lt(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||yr(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function yr(t,e){if(t){if(typeof t=="string")return Lt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lt(t,e):void 0}}function Lt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n3)for(n=[n],i=3;i0?Pe(v.type,v.props,v.key,null,v.__v):v)!=null){if(v.__=n,v.__b=n.__b+1,(p=b[l])===null||p&&v.key==p.key&&v.type===p.type)b[l]=void 0;else for(m=0;m<_;m++){if((p=b[m])&&v.key==p.key&&v.type===p.type){b[m]=void 0;break}p=null}Zt(t,v,p=p||mt,o,i,a,u,c,s),d=v.__e,(m=v.ref)&&p.ref!=m&&(y||(y=[]),p.ref&&y.push(p.ref,null,v),y.push(m,v.__c||d,v)),d!=null?(h==null&&(h=d),typeof v.type=="function"&&v.__k!=null&&v.__k===p.__k?v.__d=c=wr(v,c,t):c=jr(t,v,p,b,d,c),s||n.type!=="option"?typeof n.type=="function"&&(n.__d=c):t.value=""):c&&p.__e==c&&c.parentNode!=t&&(c=Ve(p))}for(n.__e=h,l=_;l--;)b[l]!=null&&(typeof n.type=="function"&&b[l].__e!=null&&b[l].__e==n.__d&&(n.__d=Ve(r,l+1)),Ir(b[l],b[l]));if(y)for(l=0;l3)for(n=[n],i=3;i=n.__.length&&n.__.push({}),n.__[t]}function kr(t){return pe=1,Ar(xr,t)}function Ar(t,e,n){var r=ze(de++,2);return r.t=t,r.__c||(r.__=[n?n(e):xr(void 0,e),function(o){var i=r.t(r.__[0],o);r.__[0]!==i&&(r.__=[i,r.__[1]],r.__c.setState({}))}],r.__c=q),r.__}function Cr(t,e){var n=ze(de++,3);!w.__s&&Yt(n.__H,e)&&(n.__=t,n.__H=e,q.__H.__h.push(n))}function gn(t,e){var n=ze(de++,4);!w.__s&&Yt(n.__H,e)&&(n.__=t,n.__H=e,q.__h.push(n))}function Pt(t,e){var n=ze(de++,7);return Yt(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Po(){Ht.forEach(function(t){if(t.__P)try{t.__H.__h.forEach(at),t.__H.__h.forEach(Ut),t.__H.__h=[]}catch(e){t.__H.__h=[],w.__e(e,t.__v)}}),Ht=[]}w.__b=function(t){q=null,pn&&pn(t)},w.__r=function(t){vn&&vn(t),de=0;var e=(q=t.__c).__H;e&&(e.__h.forEach(at),e.__h.forEach(Ut),e.__h=[])},w.diffed=function(t){dn&&dn(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(Ht.push(e)!==1&&mn===w.requestAnimationFrame||((mn=w.requestAnimationFrame)||function(n){var r,o=function(){clearTimeout(i),bn&&cancelAnimationFrame(r),setTimeout(n)},i=setTimeout(o,100);bn&&(r=requestAnimationFrame(o))})(Po)),q=void 0},w.__c=function(t,e){e.some(function(n){try{n.__h.forEach(at),n.__h=n.__h.filter(function(r){return!r.__||Ut(r)})}catch(r){e.some(function(o){o.__h&&(o.__h=[])}),e=[],w.__e(r,n.__v)}}),hn&&hn(t,e)},w.unmount=function(t){yn&&yn(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(at)}catch(n){w.__e(n,e.__v)}};var bn=typeof requestAnimationFrame=="function";function at(t){var e=q;typeof t.__c=="function"&&t.__c(),q=e}function Ut(t){var e=q;t.__c=t.__(),q=e}function Yt(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function xr(t,e){return typeof e=="function"?e(t):e}function Nr(t,e){for(var n in e)t[n]=e[n];return t}function Ft(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function Bt(t){this.props=t}(Bt.prototype=new W).isPureReactComponent=!0,Bt.prototype.shouldComponentUpdate=function(t,e){return Ft(this.props,t)||Ft(this.state,e)};var _n=w.__b;w.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),_n&&_n(t)};var Io=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,On=function(t,e){return t==null?null:J(J(t).map(e))},Do={map:On,forEach:On,count:function(t){return t?J(t).length:0},only:function(t){var e=J(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:J},ko=w.__e;function ct(){this.__u=0,this.t=null,this.__b=null}function Tr(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function we(){this.u=null,this.o=null}w.__e=function(t,e,n){if(t.then){for(var r,o=e;o=o.__;)if((r=o.__c)&&r.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),r.__c(t,e)}ko(t,e,n)},(ct.prototype=new W).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=Tr(r.__v),i=!1,a=function(){i||(i=!0,n.componentWillUnmount=n.__c,o?o(u):u())};n.__c=n.componentWillUnmount,n.componentWillUnmount=function(){a(),n.__c&&n.__c()};var u=function(){if(!--r.__u){if(r.state.__e){var s=r.state.__e;r.__v.__k[0]=function m(p,v,d){return p&&(p.__v=null,p.__k=p.__k&&p.__k.map(function(h){return m(h,v,d)}),p.__c&&p.__c.__P===v&&(p.__e&&d.insertBefore(p.__e,p.__d),p.__c.__e=!0,p.__c.__P=d)),p}(s,s.__c.__P,s.__c.__O)}var l;for(r.setState({__e:r.__b=null});l=r.t.pop();)l.forceUpdate()}},c=e.__h===!0;r.__u++||c||r.setState({__e:r.__b=r.__v.__k[0]}),t.then(a,a)},ct.prototype.componentWillUnmount=function(){this.t=[]},ct.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function i(a,u,c){return a&&(a.__c&&a.__c.__H&&(a.__c.__H.__.forEach(function(s){typeof s.__c=="function"&&s.__c()}),a.__c.__H=null),(a=Nr({},a)).__c!=null&&(a.__c.__P===c&&(a.__c.__P=u),a.__c=null),a.__k=a.__k&&a.__k.map(function(s){return i(s,u,c)})),a}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__e&&V(X,null,t.fallback);return o&&(o.__h=null),[V(X,null,e.__e?null:t.children),o]};var Sn=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),e.i.removeChild(r)}}),We(V(Ao,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Rr(t,e){return V(Co,{__v:t,i:e})}(we.prototype=new W).__e=function(t){var e=this,n=Tr(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),Sn(e,t,r)):o()};n?n(i):i()}},we.prototype.render=function(t){this.u=null,this.o=new Map;var e=J(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},we.prototype.componentDidUpdate=we.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){Sn(t,n,e)})};var qr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,xo=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,No=function(t){return(typeof Symbol<"u"&&Be(Symbol())=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(t)};function Lr(t,e,n){return e.__k==null&&(e.textContent=""),We(t,e),typeof n=="function"&&n(),t?t.__c:null}W.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(W.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var wn=w.event;function To(){}function Ro(){return this.cancelBubble}function qo(){return this.defaultPrevented}w.event=function(t){return wn&&(t=wn(t)),t.persist=To,t.isPropagationStopped=Ro,t.isDefaultPrevented=qo,t.nativeEvent=t};var Mr,jn={configurable:!0,get:function(){return this.class}},En=w.vnode;w.vnode=function(t){var e=t.type,n=t.props,r=n;if(typeof e=="string"){for(var o in r={},n){var i=n[o];o==="value"&&"defaultValue"in n&&i==null||(o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&i===!0?i="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+e)&&!No(n.type)?o="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():xo.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():i===null&&(i=void 0),r[o]=i)}e=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=J(n.children).forEach(function(a){a.props.selected=r.value.indexOf(a.props.value)!=-1})),e=="select"&&r.defaultValue!=null&&(r.value=J(n.children).forEach(function(a){a.props.selected=r.multiple?r.defaultValue.indexOf(a.props.value)!=-1:r.defaultValue==a.props.value})),t.props=r}e&&n.class!=n.className&&(jn.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",jn)),t.$$typeof=qr,En&&En(t)};var Pn=w.__r;w.__r=function(t){Pn&&Pn(t),Mr=t.__c};var Lo={ReactCurrentDispatcher:{current:{readContext:function(t){return Mr.__n[t.__c].props.value}}}};(typeof performance>"u"?"undefined":Be(performance))=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function In(t){return!!t&&t.$$typeof===qr}var f={useState:kr,useReducer:Ar,useEffect:Cr,useLayoutEffect:gn,useRef:function(t){return pe=5,Pt(function(){return{current:t}},[])},useImperativeHandle:function(t,e,n){pe=6,gn(function(){typeof t=="function"?t(e()):t&&(t.current=e())},n==null?n:n.concat(t))},useMemo:Pt,useCallback:function(t,e){return pe=8,Pt(function(){return t},e)},useContext:function(t){var e=q.context[t.__c],n=ze(de++,9);return n.__c=t,e?(n.__==null&&(n.__=!0,e.sub(q)),e.props.value):t.__},useDebugValue:function(t,e){w.useDebugValue&&w.useDebugValue(e?e(t):t)},version:"16.8.0",Children:Do,render:Lr,hydrate:function(t,e,n){return Dr(t,e),typeof n=="function"&&n(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(We(null,t),!0)},createPortal:Rr,createElement:V,createContext:function(t,e){var n={__c:e="__cC"+br++,__:t,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(Mt)},this.sub=function(a){o.push(a);var u=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),u&&u.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n},createFactory:function(t){return V.bind(null,t)},cloneElement:function(t){return In(t)?Eo.apply(null,arguments):t},createRef:function(){return{current:null}},Fragment:X,isValidElement:In,findDOMNode:function(t){return t&&(t.base||t.nodeType===1&&t)||null},Component:W,PureComponent:Bt,memo:function(t,e){function n(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),e?!e(this.props,o)||!a:Ft(this.props,o)}function r(o){return this.shouldComponentUpdate=n,V(t,o)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(t){function e(n,r){var o=Nr({},n);return delete o.ref,t(o,(r=n.ref||r)&&(Be(r)!="object"||"current"in r)?r:null)}return e.$$typeof=Io,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e},unstable_batchedUpdates:function(t,e){return t(e)},StrictMode:X,Suspense:ct,SuspenseList:we,lazy:function(t){var e,n,r;function o(i){if(e||(e=t()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw e;return V(n,i)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Lo};function Mo(){return f.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},f.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function Hr(){return f.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},f.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var Ho=["translations"];function Vt(){return Vt=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(l[c]=a[c]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var Bo=f.forwardRef(function(t,e){var n=t.translations,r=n===void 0?{}:n,o=Fo(t,Ho),i=r.buttonText,a=i===void 0?"Search":i,u=r.buttonAriaLabel,c=u===void 0?"Search":u,s=Uo(kr(null),2),l=s[0],m=s[1];return Cr(function(){typeof navigator<"u"&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?m("⌘"):m("Ctrl"))},[]),f.createElement("button",Vt({type:"button",className:"DocSearch DocSearch-Button","aria-label":c},o,{ref:e}),f.createElement("span",{className:"DocSearch-Button-Container"},f.createElement(Hr,null),f.createElement("span",{className:"DocSearch-Button-Placeholder"},a)),f.createElement("span",{className:"DocSearch-Button-Keys"},l!==null&&f.createElement(f.Fragment,null,f.createElement("kbd",{className:"DocSearch-Button-Key"},l==="Ctrl"?f.createElement(Mo,null):l),f.createElement("kbd",{className:"DocSearch-Button-Key"},"K"))))});function Ur(t,e){var n=void 0;return function(){for(var r=arguments.length,o=new Array(r),i=0;it.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(l[c]=a[c]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function xn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function ve(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:20,n=[],r=0;r=3||n===2&&r>=4||n===1&&r>=10);function i(a,u,c){if(o&&c!==void 0){var s=c[0].__autocomplete_algoliaCredentials,l={"X-Algolia-Application-Id":s.appId,"X-Algolia-API-Key":s.apiKey};t.apply(void 0,[a].concat(Ye(u),[{headers:l}]))}else t.apply(void 0,[a].concat(Ye(u)))}return{init:function(a,u){t("init",{appId:a,apiKey:u})},setUserToken:function(a){t("setUserToken",a)},clickedObjectIDsAfterSearch:function(){for(var a=arguments.length,u=new Array(a),c=0;c0&&i("clickedObjectIDsAfterSearch",Ge(u),u[0].items)},clickedObjectIDs:function(){for(var a=arguments.length,u=new Array(a),c=0;c0&&i("clickedObjectIDs",Ge(u),u[0].items)},clickedFilters:function(){for(var a=arguments.length,u=new Array(a),c=0;c0&&t.apply(void 0,["clickedFilters"].concat(u))},convertedObjectIDsAfterSearch:function(){for(var a=arguments.length,u=new Array(a),c=0;c0&&i("convertedObjectIDsAfterSearch",Ge(u),u[0].items)},convertedObjectIDs:function(){for(var a=arguments.length,u=new Array(a),c=0;c0&&i("convertedObjectIDs",Ge(u),u[0].items)},convertedFilters:function(){for(var a=arguments.length,u=new Array(a),c=0;c0&&t.apply(void 0,["convertedFilters"].concat(u))},viewedObjectIDs:function(){for(var a=arguments.length,u=new Array(a),c=0;c0&&u.reduce(function(s,l){var m=l.items,p=Br(l,$o);return[].concat(Ye(s),Ye(Qo(ve(ve({},p),{},{objectIDs:(m==null?void 0:m.map(function(v){return v.objectID}))||p.objectIDs})).map(function(v){return{items:m,payload:v}})))},[]).forEach(function(s){var l=s.items;return i("viewedObjectIDs",[s.payload],l)})},viewedFilters:function(){for(var a=arguments.length,u=new Array(a),c=0;c0&&t.apply(void 0,["viewedFilters"].concat(u))}}}function Yo(t){var e=t.items.reduce(function(n,r){var o;return n[r.__autocomplete_indexName]=((o=n[r.__autocomplete_indexName])!==null&&o!==void 0?o:[]).concat(r),n},{});return Object.keys(e).map(function(n){return{index:n,items:e[n],algoliaSource:["autocomplete"]}})}function Dt(t){return t.objectID&&t.__autocomplete_indexName&&t.__autocomplete_queryID}function De(t){return De=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(t)}function ae(t){return function(e){if(Array.isArray(e))return kt(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||function(e,n){if(e){if(typeof e=="string")return kt(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kt(e,n)}}(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function kt(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&ei({onItemsChange:r,items:p,insights:u,state:m}))}},0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(l){var m=l.setContext,p=l.onSelect,v=l.onActive;a("addAlgoliaAgent","insights-plugin"),m({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:u}}),p(function(d){var h=d.item,y=d.state,b=d.event;Dt(h)&&o({state:y,event:b,insights:u,item:h,insightsEvents:[G({eventName:"Item Selected"},An({item:h,items:c.current}))]})}),v(function(d){var h=d.item,y=d.state,b=d.event;Dt(h)&&i({state:y,event:b,insights:u,item:h,insightsEvents:[G({eventName:"Item Active"},An({item:h,items:c.current}))]})})},onStateChange:function(l){var m=l.state;s({state:m})},__autocomplete_pluginOptions:t}}function ut(t,e){var n=e;return{then:function(r,o){return ut(t.then(Xe(r,n,t),Xe(o,n,t)),n)},catch:function(r){return ut(t.catch(Xe(r,n,t)),n)},finally:function(r){return r&&n.onCancelList.push(r),ut(t.finally(Xe(r&&function(){return n.onCancelList=[],r()},n,t)),n)},cancel:function(){n.isCanceled=!0;var r=n.onCancelList;n.onCancelList=[],r.forEach(function(o){o()})},isCanceled:function(){return n.isCanceled===!0}}}function Tn(t){return ut(t,{isCanceled:!1,onCancelList:[]})}function Xe(t,e,n){return t?function(r){return e.isCanceled?r:t(r)}:n}function Rn(t,e,n,r){if(!n)return null;if(t<0&&(e===null||r!==null&&e===0))return n+t;var o=(e===null?-1:e)+t;return o<=-1||o>=n?r===null?null:0:o}function qn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ln(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0},reshape:function(i){return i.sources}},t),{},{id:(n=t.id)!==null&&n!==void 0?n:"autocomplete-".concat(Vo++),plugins:o,initialState:ce({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},t.initialState),onStateChange:function(i){var a;(a=t.onStateChange)===null||a===void 0||a.call(t,i),o.forEach(function(u){var c;return(c=u.onStateChange)===null||c===void 0?void 0:c.call(u,i)})},onSubmit:function(i){var a;(a=t.onSubmit)===null||a===void 0||a.call(t,i),o.forEach(function(u){var c;return(c=u.onSubmit)===null||c===void 0?void 0:c.call(u,i)})},onReset:function(i){var a;(a=t.onReset)===null||a===void 0||a.call(t,i),o.forEach(function(u){var c;return(c=u.onReset)===null||c===void 0?void 0:c.call(u,i)})},getSources:function(i){return Promise.all([].concat(ci(o.map(function(a){return a.getSources})),[t.getSources]).filter(Boolean).map(function(a){return function(u,c){var s=[];return Promise.resolve(u(c)).then(function(l){return Promise.all(l.filter(function(m){return!!m}).map(function(m){if(m.sourceId,s.includes(m.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(m.sourceId)," is not unique."));s.push(m.sourceId);var p={getItemInputValue:function(d){return d.state.query},getItemUrl:function(){},onSelect:function(d){(0,d.setIsOpen)(!1)},onActive:vt,onResolve:vt};Object.keys(p).forEach(function(d){p[d].__default=!0});var v=Ln(Ln({},p),m);return Promise.resolve(v)}))})}(a,i)})).then(function(a){return Ke(a)}).then(function(a){return a.map(function(u){return ce(ce({},u),{},{onSelect:function(c){u.onSelect(c),e.forEach(function(s){var l;return(l=s.onSelect)===null||l===void 0?void 0:l.call(s,c)})},onActive:function(c){u.onActive(c),e.forEach(function(s){var l;return(l=s.onActive)===null||l===void 0?void 0:l.call(s,c)})},onResolve:function(c){u.onResolve(c),e.forEach(function(s){var l;return(l=s.onResolve)===null||l===void 0?void 0:l.call(s,c)})}})})})},navigator:ce({navigate:function(i){var a=i.itemUrl;r.location.assign(a)},navigateNewTab:function(i){var a=i.itemUrl,u=r.open(a,"_blank","noopener");u==null||u.focus()},navigateNewWindow:function(i){var a=i.itemUrl;r.open(a,"_blank","noopener")}},t.navigator)})}function Ne(t){return Ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(t)}function Fn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function tt(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(l[c]=a[c]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var Wn,xt,rt,Se=null,Kn=(Wn=-1,xt=-1,rt=void 0,function(t){var e=++Wn;return Promise.resolve(t).then(function(n){return rt&&e=0||(l[c]=a[c]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function Le(t){return Le=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(t)}var _i=["props","refresh","store"],Oi=["inputElement","formElement","panelElement"],Si=["inputElement"],wi=["inputElement","maxLength"],ji=["sourceIndex"],Ei=["sourceIndex"],Pi=["item","source","sourceIndex"];function $n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function R(t){for(var e=1;e=0||(l[c]=a[c]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function Di(t){var e=t.props,n=t.refresh,r=t.store,o=ne(t,_i),i=function(a,u){return u!==void 0?"".concat(a,"-").concat(u):a};return{getEnvironmentProps:function(a){var u=a.inputElement,c=a.formElement,s=a.panelElement;function l(m){!r.getState().isOpen&&r.pendingRequests.isEmpty()||m.target===u||[c,s].some(function(p){return v=p,d=m.target,v===d||v.contains(d);var v,d})===!1&&(r.dispatch("blur",null),e.debug||r.pendingRequests.cancelAll())}return R({onTouchStart:l,onMouseDown:l,onTouchMove:function(m){r.getState().isOpen!==!1&&u===e.environment.document.activeElement&&m.target!==u&&u.blur()}},ne(a,Oi))},getRootProps:function(a){return R({role:"combobox","aria-expanded":r.getState().isOpen,"aria-haspopup":"listbox","aria-owns":r.getState().isOpen?"".concat(e.id,"-list"):void 0,"aria-labelledby":"".concat(e.id,"-label")},a)},getFormProps:function(a){return a.inputElement,R({action:"",noValidate:!0,role:"search",onSubmit:function(u){var c;u.preventDefault(),e.onSubmit(R({event:u,refresh:n,state:r.getState()},o)),r.dispatch("submit",null),(c=a.inputElement)===null||c===void 0||c.blur()},onReset:function(u){var c;u.preventDefault(),e.onReset(R({event:u,refresh:n,state:r.getState()},o)),r.dispatch("reset",null),(c=a.inputElement)===null||c===void 0||c.focus()}},ne(a,Si))},getLabelProps:function(a){var u=a||{},c=u.sourceIndex,s=ne(u,ji);return R({htmlFor:"".concat(i(e.id,c),"-input"),id:"".concat(i(e.id,c),"-label")},s)},getInputProps:function(a){var u;function c(y){(e.openOnFocus||r.getState().query)&&se(R({event:y,props:e,query:r.getState().completion||r.getState().query,refresh:n,store:r},o)),r.dispatch("focus",null)}var s=a||{},l=(s.inputElement,s.maxLength),m=l===void 0?512:l,p=ne(s,wi),v=fe(r.getState()),d=function(y){return!!(y&&y.match(ri))}(((u=e.environment.navigator)===null||u===void 0?void 0:u.userAgent)||""),h=v!=null&&v.itemUrl&&!d?"go":"search";return R({"aria-autocomplete":"both","aria-activedescendant":r.getState().isOpen&&r.getState().activeItemId!==null?"".concat(e.id,"-item-").concat(r.getState().activeItemId):void 0,"aria-controls":r.getState().isOpen?"".concat(e.id,"-list"):void 0,"aria-labelledby":"".concat(e.id,"-label"),value:r.getState().completion||r.getState().query,id:"".concat(e.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:h,spellCheck:"false",autoFocus:e.autoFocus,placeholder:e.placeholder,maxLength:m,type:"search",onChange:function(y){se(R({event:y,props:e,query:y.currentTarget.value.slice(0,m),refresh:n,store:r},o))},onKeyDown:function(y){(function(b){var _=b.event,S=b.props,O=b.refresh,g=b.store,P=bi(b,yi);if(_.key==="ArrowUp"||_.key==="ArrowDown"){var C=function(){var M=S.environment.document.getElementById("".concat(S.id,"-item-").concat(g.getState().activeItemId));M&&(M.scrollIntoViewIfNeeded?M.scrollIntoViewIfNeeded(!1):M.scrollIntoView(!1))},L=function(){var M=fe(g.getState());if(g.getState().activeItemId!==null&&M){var Ot=M.item,St=M.itemInputValue,$e=M.itemUrl,B=M.source;B.onActive(te({event:_,item:Ot,itemInputValue:St,itemUrl:$e,refresh:O,source:B,state:g.getState()},P))}};_.preventDefault(),g.getState().isOpen===!1&&(S.openOnFocus||g.getState().query)?se(te({event:_,props:S,query:g.getState().query,refresh:O,store:g},P)).then(function(){g.dispatch(_.key,{nextActiveItemId:S.defaultActiveItemId}),L(),setTimeout(C,0)}):(g.dispatch(_.key,{}),L(),C())}else if(_.key==="Escape")_.preventDefault(),g.dispatch(_.key,null),g.pendingRequests.cancelAll();else if(_.key==="Tab")g.dispatch("blur",null),g.pendingRequests.cancelAll();else if(_.key==="Enter"){if(g.getState().activeItemId===null||g.getState().collections.every(function(M){return M.items.length===0}))return void(S.debug||g.pendingRequests.cancelAll());_.preventDefault();var x=fe(g.getState()),k=x.item,N=x.itemInputValue,U=x.itemUrl,F=x.source;if(_.metaKey||_.ctrlKey)U!==void 0&&(F.onSelect(te({event:_,item:k,itemInputValue:N,itemUrl:U,refresh:O,source:F,state:g.getState()},P)),S.navigator.navigateNewTab({itemUrl:U,item:k,state:g.getState()}));else if(_.shiftKey)U!==void 0&&(F.onSelect(te({event:_,item:k,itemInputValue:N,itemUrl:U,refresh:O,source:F,state:g.getState()},P)),S.navigator.navigateNewWindow({itemUrl:U,item:k,state:g.getState()}));else if(!_.altKey){if(U!==void 0)return F.onSelect(te({event:_,item:k,itemInputValue:N,itemUrl:U,refresh:O,source:F,state:g.getState()},P)),void S.navigator.navigate({itemUrl:U,item:k,state:g.getState()});se(te({event:_,nextState:{isOpen:!1},props:S,query:N,refresh:O,store:g},P)).then(function(){F.onSelect(te({event:_,item:k,itemInputValue:N,itemUrl:U,refresh:O,source:F,state:g.getState()},P))})}}})(R({event:y,props:e,refresh:n,store:r},o))},onFocus:c,onBlur:vt,onClick:function(y){a.inputElement!==e.environment.document.activeElement||r.getState().isOpen||c(y)}},p)},getPanelProps:function(a){return R({onMouseDown:function(u){u.preventDefault()},onMouseLeave:function(){r.dispatch("mouseleave",null)}},a)},getListProps:function(a){var u=a||{},c=u.sourceIndex,s=ne(u,Ei);return R({role:"listbox","aria-labelledby":"".concat(i(e.id,c),"-label"),id:"".concat(i(e.id,c),"-list")},s)},getItemProps:function(a){var u=a.item,c=a.source,s=a.sourceIndex,l=ne(a,Pi);return R({id:"".concat(i(e.id,s),"-item-").concat(u.__autocomplete_id),role:"option","aria-selected":r.getState().activeItemId===u.__autocomplete_id,onMouseMove:function(m){if(u.__autocomplete_id!==r.getState().activeItemId){r.dispatch("mousemove",u.__autocomplete_id);var p=fe(r.getState());if(r.getState().activeItemId!==null&&p){var v=p.item,d=p.itemInputValue,h=p.itemUrl,y=p.source;y.onActive(R({event:m,item:v,itemInputValue:d,itemUrl:h,refresh:n,source:y,state:r.getState()},o))}}},onMouseDown:function(m){m.preventDefault()},onClick:function(m){var p=c.getItemInputValue({item:u,state:r.getState()}),v=c.getItemUrl({item:u,state:r.getState()});(v?Promise.resolve():se(R({event:m,nextState:{isOpen:!1},props:e,query:p,refresh:n,store:r},o))).then(function(){c.onSelect(R({event:m,item:u,itemInputValue:p,itemUrl:v,refresh:n,source:c,state:r.getState()},o))})}},l)}}}function Me(t){return Me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(t)}function Jn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function ki(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(l[c]=a[c]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function Yi(t){var e=t.translations,n=e===void 0?{}:e,r=Zi(t,Ji),o=n.noResultsText,i=o===void 0?"No results for":o,a=n.suggestedQueryText,u=a===void 0?"Try searching for":a,c=n.reportMissingResultsText,s=c===void 0?"Believe this query should return results?":c,l=n.reportMissingResultsLinkText,m=l===void 0?"Let us know.":l,p=r.state.context.searchSuggestions;return f.createElement("div",{className:"DocSearch-NoResults"},f.createElement("div",{className:"DocSearch-Screen-Icon"},f.createElement(zi,null)),f.createElement("p",{className:"DocSearch-Title"},i,' "',f.createElement("strong",null,r.state.query),'"'),p&&p.length>0&&f.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},f.createElement("p",{className:"DocSearch-Help"},u,":"),f.createElement("ul",null,p.slice(0,3).reduce(function(v,d){return[].concat(Qi(v),[f.createElement("li",{key:d},f.createElement("button",{className:"DocSearch-Prefill",key:d,type:"button",onClick:function(){r.setQuery(d.toLowerCase()+" "),r.refresh(),r.inputRef.current.focus()}},d))])},[]))),r.getMissingResultsUrl&&f.createElement("p",{className:"DocSearch-Help"},"".concat(s," "),f.createElement("a",{href:r.getMissingResultsUrl({query:r.state.query}),target:"_blank",rel:"noopener noreferrer"},m)))}var Gi=["hit","attribute","tagName"];function Xn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function er(t){for(var e=1;e=0||(l[c]=a[c]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function tr(t,e){return e.split(".").reduce(function(n,r){return n!=null&&n[r]?n[r]:null},t)}function le(t){var e=t.hit,n=t.attribute,r=t.tagName;return V(r===void 0?"span":r,er(er({},ea(t,Gi)),{},{dangerouslySetInnerHTML:{__html:tr(e,"_snippetResult.".concat(n,".value"))||tr(e,n)}}))}function nr(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var o=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(o!=null){var i,a,u=[],c=!0,s=!1;try{for(o=o.call(n);!(c=(i=o.next()).done)&&(u.push(i.value),!r||u.length!==r);c=!0);}catch(l){s=!0,a=l}finally{try{c||o.return==null||o.return()}finally{if(s)throw a}}return u}}(t,e)||function(n,r){if(n){if(typeof n=="string")return rr(n,r);var o=Object.prototype.toString.call(n).slice(8,-1);if(o==="Object"&&n.constructor&&(o=n.constructor.name),o==="Map"||o==="Set")return Array.from(n);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return rr(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function rr(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n|<\/mark>)/g,ra=RegExp(zr.source);function $r(t){var e,n,r,o,i,a=t;if(!a.__docsearch_parent&&!t._highlightResult)return t.hierarchy.lvl0;var u=((a.__docsearch_parent?(e=a.__docsearch_parent)===null||e===void 0||(n=e._highlightResult)===null||n===void 0||(r=n.hierarchy)===null||r===void 0?void 0:r.lvl0:(o=t._highlightResult)===null||o===void 0||(i=o.hierarchy)===null||i===void 0?void 0:i.lvl0)||{}).value;return u&&ra.test(u)?u.replace(zr,""):u}function $t(){return $t=Object.assign||function(t){for(var e=1;e=0||(l[c]=a[c]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function ca(t){var e=t.translations,n=e===void 0?{}:e,r=aa(t,ia),o=n.recentSearchesTitle,i=o===void 0?"Recent":o,a=n.noRecentSearchesText,u=a===void 0?"No recent searches":a,c=n.saveRecentSearchButtonTitle,s=c===void 0?"Save this search":c,l=n.removeRecentSearchButtonTitle,m=l===void 0?"Remove this search from history":l,p=n.favoriteSearchesTitle,v=p===void 0?"Favorite":p,d=n.removeFavoriteSearchButtonTitle,h=d===void 0?"Remove this search from favorites":d;return r.state.status==="idle"&&r.hasCollections===!1?r.disableUserPersonalization?null:f.createElement("div",{className:"DocSearch-StartScreen"},f.createElement("p",{className:"DocSearch-Help"},u)):r.hasCollections===!1?null:f.createElement("div",{className:"DocSearch-Dropdown-Container"},f.createElement(zt,ht({},r,{title:i,collection:r.state.collections[0],renderIcon:function(){return f.createElement("div",{className:"DocSearch-Hit-icon"},f.createElement(Hi,null))},renderAction:function(y){var b=y.item,_=y.runFavoriteTransition,S=y.runDeleteTransition;return f.createElement(f.Fragment,null,f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:s,type:"submit",onClick:function(O){O.preventDefault(),O.stopPropagation(),_(function(){r.favoriteSearches.add(b),r.recentSearches.remove(b),r.refresh()})}},f.createElement(Gn,null))),f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:m,type:"submit",onClick:function(O){O.preventDefault(),O.stopPropagation(),S(function(){r.recentSearches.remove(b),r.refresh()})}},f.createElement(Kt,null))))}})),f.createElement(zt,ht({},r,{title:v,collection:r.state.collections[1],renderIcon:function(){return f.createElement("div",{className:"DocSearch-Hit-icon"},f.createElement(Gn,null))},renderAction:function(y){var b=y.item,_=y.runDeleteTransition;return f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:h,type:"submit",onClick:function(S){S.preventDefault(),S.stopPropagation(),_(function(){r.favoriteSearches.remove(b),r.refresh()})}},f.createElement(Kt,null)))}})))}var ua=["translations"];function yt(){return yt=Object.assign||function(t){for(var e=1;e=0||(l[c]=a[c]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var sa=f.memo(function(t){var e=t.translations,n=e===void 0?{}:e,r=la(t,ua);if(r.state.status==="error")return f.createElement($i,{translations:n==null?void 0:n.errorScreen});var o=r.state.collections.some(function(i){return i.items.length>0});return r.state.query?o===!1?f.createElement(Yi,yt({},r,{translations:n==null?void 0:n.noResultsScreen})):f.createElement(oa,r):f.createElement(ca,yt({},r,{hasCollections:o,translations:n==null?void 0:n.startScreen}))},function(t,e){return e.state.status==="loading"||e.state.status==="stalled"}),fa=["translations"];function gt(){return gt=Object.assign||function(t){for(var e=1;e=0||(l[c]=a[c]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function pa(t){var e=t.translations,n=e===void 0?{}:e,r=ma(t,fa),o=n.resetButtonTitle,i=o===void 0?"Clear the query":o,a=n.resetButtonAriaLabel,u=a===void 0?"Clear the query":a,c=n.cancelButtonText,s=c===void 0?"Cancel":c,l=n.cancelButtonAriaLabel,m=l===void 0?"Cancel":l,p=r.getFormProps({inputElement:r.inputRef.current}).onReset;return f.useEffect(function(){r.autoFocus&&r.inputRef.current&&r.inputRef.current.focus()},[r.autoFocus,r.inputRef]),f.useEffect(function(){r.isFromSelection&&r.inputRef.current&&r.inputRef.current.select()},[r.isFromSelection,r.inputRef]),f.createElement(f.Fragment,null,f.createElement("form",{className:"DocSearch-Form",onSubmit:function(v){v.preventDefault()},onReset:p},f.createElement("label",gt({className:"DocSearch-MagnifierLabel"},r.getLabelProps()),f.createElement(Hr,null)),f.createElement("div",{className:"DocSearch-LoadingIndicator"},f.createElement(Mi,null)),f.createElement("input",gt({className:"DocSearch-Input",ref:r.inputRef},r.getInputProps({inputElement:r.inputRef.current,autoFocus:r.autoFocus,maxLength:64}))),f.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":u,hidden:!r.state.query},f.createElement(Kt,null))),f.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":m,onClick:r.onClose},s))}var va=["_highlightResult","_snippetResult"];function da(t,e){if(t==null)return{};var n,r,o=function(a,u){if(a==null)return{};var c,s,l={},m=Object.keys(a);for(s=0;s=0||(l[c]=a[c]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function ha(t){return function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch{return!1}}()===!1?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(e){return window.localStorage.setItem(t,JSON.stringify(e))},getItem:function(){var e=window.localStorage.getItem(t);return e?JSON.parse(e):[]}}}function ar(t){var e=t.key,n=t.limit,r=n===void 0?5:n,o=ha(e),i=o.getItem().slice(0,r);return{add:function(a){var u=a,c=(u._highlightResult,u._snippetResult,da(u,va)),s=i.findIndex(function(l){return l.objectID===c.objectID});s>-1&&i.splice(s,1),i.unshift(c),i=i.slice(0,r),o.setItem(i)},remove:function(a){i=i.filter(function(u){return u.objectID!==a.objectID}),o.setItem(i)},getAll:function(){return i}}}var ya=["facetName","facetQuery"];function ga(t){var e,n="algoliasearch-client-js-".concat(t.key),r=function(){return e===void 0&&(e=t.localStorage||window.localStorage),e},o=function(){return JSON.parse(r().getItem(n)||"{}")};return{get:function(i,a){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var c=JSON.stringify(i),s=o()[c];return Promise.all([s||a(),s!==void 0])}).then(function(c){var s=st(c,2),l=s[0],m=s[1];return Promise.all([l,m||u.miss(l)])}).then(function(c){return st(c,1)[0]})},set:function(i,a){return Promise.resolve().then(function(){var u=o();return u[JSON.stringify(i)]=a,r().setItem(n,JSON.stringify(u)),a})},delete:function(i){return Promise.resolve().then(function(){var a=o();delete a[JSON.stringify(i)],r().setItem(n,JSON.stringify(a))})},clear:function(){return Promise.resolve().then(function(){r().removeItem(n)})}}}function je(t){var e=ft(t.caches),n=e.shift();return n===void 0?{get:function(r,o){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return o().then(function(a){return Promise.all([a,i.miss(a)])}).then(function(a){return st(a,1)[0]})},set:function(r,o){return Promise.resolve(o)},delete:function(r){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(r,o){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return n.get(r,o,i).catch(function(){return je({caches:e}).get(r,o,i)})},set:function(r,o){return n.set(r,o).catch(function(){return je({caches:e}).set(r,o)})},delete:function(r){return n.delete(r).catch(function(){return je({caches:e}).delete(r)})},clear:function(){return n.clear().catch(function(){return je({caches:e}).clear()})}}}function Tt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},e={};return{get:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},i=JSON.stringify(n);if(i in e)return Promise.resolve(t.serializable?JSON.parse(e[i]):e[i]);var a=r(),u=o&&o.miss||function(){return Promise.resolve()};return a.then(function(c){return u(c)}).then(function(){return a})},set:function(n,r){return e[JSON.stringify(n)]=t.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(n){return delete e[JSON.stringify(n)],Promise.resolve()},clear:function(){return e={},Promise.resolve()}}}function ba(t){for(var e=t.length-1;e>0;e--){var n=Math.floor(Math.random()*(e+1)),r=t[e];t[e]=t[n],t[n]=r}return t}function Jr(t,e){return e&&Object.keys(e).forEach(function(n){t[n]=e[n](t)}),t}function bt(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0?r:void 0,timeout:n.timeout||e,headers:n.headers||{},queryParameters:n.queryParameters||{},cacheable:n.cacheable}}var me={Read:1,Write:2,Any:3},Qr=1,_a=2,Zr=3;function Yr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qr;return I(I({},t),{},{status:e,lastUpdate:Date.now()})}function Gr(t){return typeof t=="string"?{protocol:"https",url:t,accept:me.Any}:{protocol:t.protocol||"https",url:t.url,accept:t.accept||me.Any}}var ur="GET",_t="POST";function Oa(t,e){return Promise.all(e.map(function(n){return t.get(n,function(){return Promise.resolve(Yr(n))})})).then(function(n){var r=n.filter(function(a){return function(u){return u.status===Qr||Date.now()-u.lastUpdate>12e4}(a)}),o=n.filter(function(a){return function(u){return u.status===Zr&&Date.now()-u.lastUpdate<=12e4}(a)}),i=[].concat(ft(r),ft(o));return{getTimeout:function(a,u){return(o.length===0&&a===0?1:o.length+3+a)*u},statelessHosts:i.length>0?i.map(function(a){return Gr(a)}):e}})}function lr(t,e,n,r){var o=[],i=function(p,v){if(!(p.method===ur||p.data===void 0&&v.data===void 0)){var d=Array.isArray(p.data)?p.data:I(I({},p.data),v.data);return JSON.stringify(d)}}(n,r),a=function(p,v){var d=I(I({},p.headers),v.headers),h={};return Object.keys(d).forEach(function(y){var b=d[y];h[y.toLowerCase()]=b}),h}(t,r),u=n.method,c=n.method!==ur?{}:I(I({},n.data),r.data),s=I(I(I({"x-algolia-agent":t.userAgent.value},t.queryParameters),c),r.queryParameters),l=0,m=function p(v,d){var h=v.pop();if(h===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:sr(o)};var y={data:i,headers:a,method:u,url:wa(h,n.path,s),connectTimeout:d(l,t.timeouts.connect),responseTimeout:d(l,r.timeout)},b=function(S){var O={request:y,response:S,host:h,triesLeft:v.length};return o.push(O),O},_={onSucess:function(S){return function(O){try{return JSON.parse(O.content)}catch(g){throw function(P,C){return{name:"DeserializationError",message:P,response:C}}(g.message,O)}}(S)},onRetry:function(S){var O=b(S);return S.isTimedOut&&l++,Promise.all([t.logger.info("Retryable failure",eo(O)),t.hostsCache.set(h,Yr(h,S.isTimedOut?Zr:_a))]).then(function(){return p(v,d)})},onFail:function(S){throw b(S),function(O,g){var P=O.content,C=O.status,L=P;try{L=JSON.parse(P).message}catch{}return function(x,k,N){return{name:"ApiError",message:x,status:k,transporterStackTrace:N}}(L,C,g)}(S,sr(o))}};return t.requester.send(y).then(function(S){return function(O,g){return function(P){var C=P.status;return P.isTimedOut||function(L){var x=L.isTimedOut,k=L.status;return!x&&~~k==0}(P)||~~(C/100)!=2&&~~(C/100)!=4}(O)?g.onRetry(O):~~(O.status/100)==2?g.onSucess(O):g.onFail(O)}(S,_)})};return Oa(t.hostsCache,e).then(function(p){return m(ft(p.statelessHosts).reverse(),p.getTimeout)})}function Sa(t){var e={value:"Algolia for JavaScript (".concat(t,")"),add:function(n){var r="; ".concat(n.segment).concat(n.version!==void 0?" (".concat(n.version,")"):"");return e.value.indexOf(r)===-1&&(e.value="".concat(e.value).concat(r)),e}};return e}function wa(t,e,n){var r=Xr(n),o="".concat(t.protocol,"://").concat(t.url,"/").concat(e.charAt(0)==="/"?e.substr(1):e);return r.length&&(o+="?".concat(r)),o}function Xr(t){return Object.keys(t).map(function(e){return bt("%s=%s",e,(n=t[e],Object.prototype.toString.call(n)==="[object Object]"||Object.prototype.toString.call(n)==="[object Array]"?JSON.stringify(t[e]):t[e]));var n}).join("&")}function sr(t){return t.map(function(e){return eo(e)})}function eo(t){var e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return I(I({},t),{},{request:I(I({},t.request),{},{headers:I(I({},t.request.headers),e)})})}var ja=function(t){var e=t.appId,n=function(i,a,u){var c={"x-algolia-api-key":u,"x-algolia-application-id":a};return{headers:function(){return i===lt.WithinHeaders?c:{}},queryParameters:function(){return i===lt.WithinQueryParameters?c:{}}}}(t.authMode!==void 0?t.authMode:lt.WithinHeaders,e,t.apiKey),r=function(i){var a=i.hostsCache,u=i.logger,c=i.requester,s=i.requestsCache,l=i.responsesCache,m=i.timeouts,p=i.userAgent,v=i.hosts,d=i.queryParameters,h={hostsCache:a,logger:u,requester:c,requestsCache:s,responsesCache:l,timeouts:m,userAgent:p,headers:i.headers,queryParameters:d,hosts:v.map(function(y){return Gr(y)}),read:function(y,b){var _=cr(b,h.timeouts.read),S=function(){return lr(h,h.hosts.filter(function(g){return(g.accept&me.Read)!=0}),y,_)};if((_.cacheable!==void 0?_.cacheable:y.cacheable)!==!0)return S();var O={request:y,mappedRequestOptions:_,transporter:{queryParameters:h.queryParameters,headers:h.headers}};return h.responsesCache.get(O,function(){return h.requestsCache.get(O,function(){return h.requestsCache.set(O,S()).then(function(g){return Promise.all([h.requestsCache.delete(O),g])},function(g){return Promise.all([h.requestsCache.delete(O),Promise.reject(g)])}).then(function(g){var P=st(g,2);return P[0],P[1]})})},{miss:function(g){return h.responsesCache.set(O,g)}})},write:function(y,b){return lr(h,h.hosts.filter(function(_){return(_.accept&me.Write)!=0}),y,cr(b,h.timeouts.write))}};return h}(I(I({hosts:[{url:"".concat(e,"-dsn.algolia.net"),accept:me.Read},{url:"".concat(e,".algolia.net"),accept:me.Write}].concat(ba([{url:"".concat(e,"-1.algolianet.com")},{url:"".concat(e,"-2.algolianet.com")},{url:"".concat(e,"-3.algolianet.com")}]))},t),{},{headers:I(I(I({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),t.headers),queryParameters:I(I({},n.queryParameters()),t.queryParameters)})),o={transporter:r,appId:e,addAlgoliaAgent:function(i,a){r.userAgent.add({segment:i,version:a})},clearCache:function(){return Promise.all([r.requestsCache.clear(),r.responsesCache.clear()]).then(function(){})}};return Jr(o,t.methods)},to=function(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r={transporter:t.transporter,appId:t.appId,indexName:e};return Jr(r,n.methods)}},fr=function(t){return function(e,n){var r=e.map(function(o){return I(I({},o),{},{params:Xr(o.params||{})})});return t.transporter.read({method:_t,path:"1/indexes/*/queries",data:{requests:r},cacheable:!0},n)}},mr=function(t){return function(e,n){return Promise.all(e.map(function(r){var o=r.params,i=o.facetName,a=o.facetQuery,u=Oo(o,ya);return to(t)(r.indexName,{methods:{searchForFacetValues:no}}).searchForFacetValues(i,a,I(I({},n),u))}))}},Ea=function(t){return function(e,n,r){return t.transporter.read({method:_t,path:bt("1/answers/%s/prediction",t.indexName),data:{query:e,queryLanguages:n},cacheable:!0},r)}},Pa=function(t){return function(e,n){return t.transporter.read({method:_t,path:bt("1/indexes/%s/query",t.indexName),data:{query:e},cacheable:!0},n)}},no=function(t){return function(e,n,r){return t.transporter.read({method:_t,path:bt("1/indexes/%s/facets/%s/query",t.indexName,e),data:{facetQuery:n},cacheable:!0},r)}},Ia=1,Da=2,ka=3;function ro(t,e,n){var r,o={appId:t,apiKey:e,timeouts:{connect:1,read:2,write:30},requester:{send:function(i){return new Promise(function(a){var u=new XMLHttpRequest;u.open(i.method,i.url,!0),Object.keys(i.headers).forEach(function(m){return u.setRequestHeader(m,i.headers[m])});var c,s=function(m,p){return setTimeout(function(){u.abort(),a({status:0,content:p,isTimedOut:!0})},1e3*m)},l=s(i.connectTimeout,"Connection timeout");u.onreadystatechange=function(){u.readyState>u.OPENED&&c===void 0&&(clearTimeout(l),c=s(i.responseTimeout,"Socket timeout"))},u.onerror=function(){u.status===0&&(clearTimeout(l),clearTimeout(c),a({content:u.responseText||"Network request failed",status:u.status,isTimedOut:!1}))},u.onload=function(){clearTimeout(l),clearTimeout(c),a({content:u.responseText,status:u.status,isTimedOut:!1})},u.send(i.data)})}},logger:(r=ka,{debug:function(i,a){return Ia>=r&&console.debug(i,a),Promise.resolve()},info:function(i,a){return Da>=r&&console.info(i,a),Promise.resolve()},error:function(i,a){return console.error(i,a),Promise.resolve()}}),responsesCache:Tt(),requestsCache:Tt({serializable:!1}),hostsCache:je({caches:[ga({key:"".concat("4.8.5","-").concat(t)}),Tt()]}),userAgent:Sa("4.8.5").add({segment:"Browser",version:"lite"}),authMode:lt.WithinQueryParameters};return ja(I(I(I({},o),n),{},{methods:{search:fr,searchForFacetValues:mr,multipleQueries:fr,multipleSearchForFacetValues:mr,initIndex:function(i){return function(a){return to(i)(a,{methods:{search:Pa,searchForFacetValues:no,findAnswers:Ea}})}}}}))}ro.version="4.8.5";var Aa=["footer","searchBox"];function Fe(){return Fe=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0||(l[c]=a[c]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function Ta(t){var e=t.appId,n=t.apiKey,r=t.indexName,o=t.placeholder,i=o===void 0?"Search docs":o,a=t.searchParameters,u=t.maxResultsPerGroup,c=t.onClose,s=c===void 0?na:c,l=t.transformItems,m=l===void 0?ir:l,p=t.hitComponent,v=p===void 0?Li:p,d=t.resultsFooterComponent,h=d===void 0?function(){return null}:d,y=t.navigator,b=t.initialScrollY,_=b===void 0?0:b,S=t.transformSearchClient,O=S===void 0?ir:S,g=t.disableUserPersonalization,P=g!==void 0&&g,C=t.initialQuery,L=C===void 0?"":C,x=t.translations,k=x===void 0?{}:x,N=t.getMissingResultsUrl,U=t.insights,F=U!==void 0&&U,M=k.footer,Ot=k.searchBox,St=Na(k,Aa),$e=xa(f.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),B=$e[0],oo=$e[1],Gt=f.useRef(null),wt=f.useRef(null),Xt=f.useRef(null),Je=f.useRef(null),he=f.useRef(null),Q=f.useRef(10),en=f.useRef(typeof window<"u"?window.getSelection().toString().slice(0,64):"").current,ee=f.useRef(L||en).current,tn=function(j,D,T){return f.useMemo(function(){var H=ro(j,D);return H.addAlgoliaAgent("docsearch","3.5.1"),/docsearch.js \(.*\)/.test(H.transporter.userAgent.value)===!1&&H.addAlgoliaAgent("docsearch-react","3.5.1"),T(H)},[j,D,T])}(e,n,O),oe=f.useRef(ar({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(r),limit:10})).current,ye=f.useRef(ar({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(r),limit:oe.getAll().length===0?7:4})).current,ge=f.useCallback(function(j){if(!P){var D=j.type==="content"?j.__docsearch_parent:j;D&&oe.getAll().findIndex(function(T){return T.objectID===D.objectID})===-1&&ye.add(D)}},[oe,ye,P]),io=f.useCallback(function(j){if(B.context.algoliaInsightsPlugin&&j.__autocomplete_id){var D=j,T={eventName:"Item Selected",index:D.__autocomplete_indexName,items:[D],positions:[j.__autocomplete_id],queryID:D.__autocomplete_queryID};B.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(T)}},[B.context.algoliaInsightsPlugin]),be=f.useMemo(function(){return Ti({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:ee,context:{searchSuggestions:[]}},insights:F,navigator:y,onStateChange:function(j){oo(j.state)},getSources:function(j){var D=j.query,T=j.state,H=j.setContext,Z=j.setStatus;if(!D)return P?[]:[{sourceId:"recentSearches",onSelect:function(A){var K=A.item,ie=A.event;ge(K),it(ie)||s()},getItemUrl:function(A){return A.item.url},getItems:function(){return ye.getAll()}},{sourceId:"favoriteSearches",onSelect:function(A){var K=A.item,ie=A.event;ge(K),it(ie)||s()},getItemUrl:function(A){return A.item.url},getItems:function(){return oe.getAll()}}];var Y=!!F;return tn.search([{query:D,indexName:r,params:Rt({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(Q.current),"hierarchy.lvl2:".concat(Q.current),"hierarchy.lvl3:".concat(Q.current),"hierarchy.lvl4:".concat(Q.current),"hierarchy.lvl5:".concat(Q.current),"hierarchy.lvl6:".concat(Q.current),"content:".concat(Q.current)],snippetEllipsisText:"…",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:Y},a)}]).catch(function(A){throw A.name==="RetryError"&&Z("error"),A}).then(function(A){var K=A.results,ie=K[0],uo=ie.hits,lo=ie.nbHits,jt=or(uo,function(Et){return $r(Et)},u);T.context.searchSuggestions.length0&&(nn(),he.current&&he.current.focus())},[ee,nn]),f.useEffect(function(){function j(){if(wt.current){var D=.01*window.innerHeight;wt.current.style.setProperty("--docsearch-vh","".concat(D,"px"))}}return j(),window.addEventListener("resize",j),function(){window.removeEventListener("resize",j)}},[]),f.createElement("div",Fe({ref:Gt},co({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container",B.status==="stalled"&&"DocSearch-Container--Stalled",B.status==="error"&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(j){j.target===j.currentTarget&&s()}}),f.createElement("div",{className:"DocSearch-Modal",ref:wt},f.createElement("header",{className:"DocSearch-SearchBar",ref:Xt},f.createElement(pa,Fe({},be,{state:B,autoFocus:ee.length===0,inputRef:he,isFromSelection:!!ee&&ee===en,translations:Ot,onClose:s}))),f.createElement("div",{className:"DocSearch-Dropdown",ref:Je},f.createElement(sa,Fe({},be,{indexName:r,state:B,hitComponent:v,resultsFooterComponent:h,disableUserPersonalization:P,recentSearches:ye,favoriteSearches:oe,inputRef:he,translations:St,getMissingResultsUrl:N,onItemClick:function(j,D){io(j),ge(j),it(D)||s()}}))),f.createElement("footer",{className:"DocSearch-Footer"},f.createElement(qi,{translations:M}))))}function Jt(){return Jt=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&arguments[1]!==void 0?arguments[1]:window;return typeof e=="string"?n.document.querySelector(e):e}(t.container,t.environment))}const La={id:"docsearch"},Ua=fo({__name:"VPAlgoliaSearchBox",props:{algolia:{}},setup(t){const e=t,n=mo(),r=po(),{site:o,localeIndex:i,lang:a}=bo();vo(u),ho(i,u);function u(){var v,d;const l={...e.algolia,...(v=e.algolia.locales)==null?void 0:v[i.value]},m=((d=l.searchParameters)==null?void 0:d.facetFilters)??[],p=[...(Array.isArray(m)?m:[m]).filter(h=>!h.startsWith("lang:")),`lang:${a.value}`];c({...l,searchParameters:{...l.searchParameters,facetFilters:p}})}function c(l){const m=Object.assign({},l,{container:"#docsearch",navigator:{navigate({itemUrl:p}){const{pathname:v}=new URL(window.location.origin+p);r.path===v?window.location.assign(window.location.origin+p):n.go(p)}},transformItems(p){return p.map(v=>Object.assign({},v,{url:s(v.url)}))},hitComponent({hit:p,children:v}){return{__v:null,type:"a",ref:void 0,constructor:void 0,key:void 0,props:{href:p.url,children:v}}}});qa(m)}function s(l){const{pathname:m,hash:p}=new URL(l);return m.replace(/\.html$/,o.value.cleanUrls?"":".html")+p}return(l,m)=>(yo(),go("div",La))}});export{Ua as default}; diff --git a/assets/chunks/VPAlgoliaSearchBox.BRY8HxQs.js b/assets/chunks/VPAlgoliaSearchBox.BRY8HxQs.js new file mode 100644 index 00000000..cbe86f7c --- /dev/null +++ b/assets/chunks/VPAlgoliaSearchBox.BRY8HxQs.js @@ -0,0 +1,17 @@ +import{d as mo,ai as po,L as vo,y as ho,v as yo,R as go,o as bo,c as _o}from"./framework.BmdFiWrL.js";import{u as Oo}from"./theme.DAaY-8e0.js";/*! @docsearch/js 3.6.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */function lr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function I(t){for(var e=1;e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function se(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var o=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(o!=null){var i,a,c=[],u=!0,s=!1;try{for(o=o.call(r);!(u=(i=o.next()).done)&&(c.push(i.value),!n||c.length!==n);u=!0);}catch(l){s=!0,a=l}finally{try{u||o.return==null||o.return()}finally{if(s)throw a}}return c}}(t,e)||_n(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ft(t){return function(e){if(Array.isArray(e))return qt(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||_n(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function _n(t,e){if(t){if(typeof t=="string")return qt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?qt(t,e):void 0}}function qt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r3)for(r=[r],i=3;i0?Ie(v.type,v.props,v.key,null,v.__v):v)!=null){if(v.__=r,v.__b=r.__b+1,(p=b[l])===null||p&&v.key==p.key&&v.type===p.type)b[l]=void 0;else for(m=0;m<_;m++){if((p=b[m])&&v.key==p.key&&v.type===p.type){b[m]=void 0;break}p=null}Yt(t,v,p=p||mt,o,i,a,c,u,s),d=v.__e,(m=v.ref)&&p.ref!=m&&(y||(y=[]),p.ref&&y.push(p.ref,null,v),y.push(m,v.__c||d,v)),d!=null?(h==null&&(h=d),typeof v.type=="function"&&v.__k!=null&&v.__k===p.__k?v.__d=u=Pn(v,u,t):u=In(t,v,p,b,d,u),s||r.type!=="option"?typeof r.type=="function"&&(r.__d=u):t.value=""):u&&p.__e==u&&u.parentNode!=t&&(u=Ke(p))}for(r.__e=h,l=_;l--;)b[l]!=null&&(typeof r.type=="function"&&b[l].__e!=null&&b[l].__e==r.__d&&(r.__d=Ke(n,l+1)),An(b[l],b[l]));if(y)for(l=0;l3)for(r=[r],i=3;i=r.__.length&&r.__.push({}),r.__[t]}function Gt(t){return pe=1,xn(Nn,t)}function xn(t,e,r){var n=Je(de++,2);return n.t=t,n.__c||(n.__=[r?r(e):Nn(void 0,e),function(o){var i=n.t(n.__[0],o);n.__[0]!==i&&(n.__=[i,n.__[1]],n.__c.setState({}))}],n.__c=L),n.__}function Xt(t,e){var r=Je(de++,3);!w.__s&&er(r.__H,e)&&(r.__=t,r.__H=e,L.__H.__h.push(r))}function _r(t,e){var r=Je(de++,4);!w.__s&&er(r.__H,e)&&(r.__=t,r.__H=e,L.__h.push(r))}function Pt(t,e){var r=Je(de++,7);return er(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function ko(){Ht.forEach(function(t){if(t.__P)try{t.__H.__h.forEach(ut),t.__H.__h.forEach(Ut),t.__H.__h=[]}catch(e){t.__H.__h=[],w.__e(e,t.__v)}}),Ht=[]}w.__b=function(t){L=null,dr&&dr(t)},w.__r=function(t){hr&&hr(t),de=0;var e=(L=t.__c).__H;e&&(e.__h.forEach(ut),e.__h.forEach(Ut),e.__h=[])},w.diffed=function(t){yr&&yr(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(Ht.push(e)!==1&&vr===w.requestAnimationFrame||((vr=w.requestAnimationFrame)||function(r){var n,o=function(){clearTimeout(i),Or&&cancelAnimationFrame(n),setTimeout(r)},i=setTimeout(o,100);Or&&(n=requestAnimationFrame(o))})(ko)),L=void 0},w.__c=function(t,e){e.some(function(r){try{r.__h.forEach(ut),r.__h=r.__h.filter(function(n){return!n.__||Ut(n)})}catch(n){e.some(function(o){o.__h&&(o.__h=[])}),e=[],w.__e(n,r.__v)}}),gr&&gr(t,e)},w.unmount=function(t){br&&br(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(ut)}catch(r){w.__e(r,e.__v)}};var Or=typeof requestAnimationFrame=="function";function ut(t){var e=L;typeof t.__c=="function"&&t.__c(),L=e}function Ut(t){var e=L;t.__c=t.__(),L=e}function er(t,e){return!t||t.length!==e.length||e.some(function(r,n){return r!==t[n]})}function Nn(t,e){return typeof e=="function"?e(t):e}function Tn(t,e){for(var r in e)t[r]=e[r];return t}function Ft(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var n in e)if(n!=="__source"&&t[n]!==e[n])return!0;return!1}function Bt(t){this.props=t}(Bt.prototype=new W).isPureReactComponent=!0,Bt.prototype.shouldComponentUpdate=function(t,e){return Ft(this.props,t)||Ft(this.state,e)};var Sr=w.__b;w.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Sr&&Sr(t)};var Do=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,wr=function(t,e){return t==null?null:$($(t).map(e))},Ao={map:wr,forEach:wr,count:function(t){return t?$(t).length:0},only:function(t){var e=$(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:$},Co=w.__e;function ct(){this.__u=0,this.t=null,this.__b=null}function Rn(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function je(){this.u=null,this.o=null}w.__e=function(t,e,r){if(t.then){for(var n,o=e;o=o.__;)if((n=o.__c)&&n.__c)return e.__e==null&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e)}Co(t,e,r)},(ct.prototype=new W).__c=function(t,e){var r=e.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=Rn(n.__v),i=!1,a=function(){i||(i=!0,r.componentWillUnmount=r.__c,o?o(c):c())};r.__c=r.componentWillUnmount,r.componentWillUnmount=function(){a(),r.__c&&r.__c()};var c=function(){if(!--n.__u){if(n.state.__e){var s=n.state.__e;n.__v.__k[0]=function m(p,v,d){return p&&(p.__v=null,p.__k=p.__k&&p.__k.map(function(h){return m(h,v,d)}),p.__c&&p.__c.__P===v&&(p.__e&&d.insertBefore(p.__e,p.__d),p.__c.__e=!0,p.__c.__P=d)),p}(s,s.__c.__P,s.__c.__O)}var l;for(n.setState({__e:n.__b=null});l=n.t.pop();)l.forceUpdate()}},u=e.__h===!0;n.__u++||u||n.setState({__e:n.__b=n.__v.__k[0]}),t.then(a,a)},ct.prototype.componentWillUnmount=function(){this.t=[]},ct.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=function i(a,c,u){return a&&(a.__c&&a.__c.__H&&(a.__c.__H.__.forEach(function(s){typeof s.__c=="function"&&s.__c()}),a.__c.__H=null),(a=Tn({},a)).__c!=null&&(a.__c.__P===u&&(a.__c.__P=c),a.__c=null),a.__k=a.__k&&a.__k.map(function(s){return i(s,c,u)})),a}(this.__b,r,n.__O=n.__P)}this.__b=null}var o=e.__e&&K(X,null,t.fallback);return o&&(o.__h=null),[K(X,null,e.__e?null:t.children),o]};var jr=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]>>1,1),e.i.removeChild(n)}}),We(K(xo,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Ln(t,e){return K(No,{__v:t,i:e})}(je.prototype=new W).__e=function(t){var e=this,r=Rn(e.__v),n=e.o.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),jr(e,t,n)):o()};r?r(i):i()}},je.prototype.render=function(t){this.u=null,this.o=new Map;var e=$(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},je.prototype.componentDidUpdate=je.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,r){jr(t,r,e)})};var qn=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,To=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ro=function(t){return(typeof Symbol<"u"&&Ve(Symbol())=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(t)};function Mn(t,e,r){return e.__k==null&&(e.textContent=""),We(t,e),typeof r=="function"&&r(),t?t.__c:null}W.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(W.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Er=w.event;function Lo(){}function qo(){return this.cancelBubble}function Mo(){return this.defaultPrevented}w.event=function(t){return Er&&(t=Er(t)),t.persist=Lo,t.isPropagationStopped=qo,t.isDefaultPrevented=Mo,t.nativeEvent=t};var Hn,Pr={configurable:!0,get:function(){return this.class}},Ir=w.vnode;w.vnode=function(t){var e=t.type,r=t.props,n=r;if(typeof e=="string"){for(var o in n={},r){var i=r[o];o==="value"&&"defaultValue"in r&&i==null||(o==="defaultValue"&&"value"in r&&r.value==null?o="value":o==="download"&&i===!0?i="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+e)&&!Ro(r.type)?o="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(o)?o=o.toLowerCase():To.test(o)?o=o.replace(/[A-Z0-9]/,"-$&").toLowerCase():i===null&&(i=void 0),n[o]=i)}e=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=$(r.children).forEach(function(a){a.props.selected=n.value.indexOf(a.props.value)!=-1})),e=="select"&&n.defaultValue!=null&&(n.value=$(r.children).forEach(function(a){a.props.selected=n.multiple?n.defaultValue.indexOf(a.props.value)!=-1:n.defaultValue==a.props.value})),t.props=n}e&&r.class!=r.className&&(Pr.enumerable="className"in r,r.className!=null&&(n.class=r.className),Object.defineProperty(n,"className",Pr)),t.$$typeof=qn,Ir&&Ir(t)};var kr=w.__r;w.__r=function(t){kr&&kr(t),Hn=t.__c};var Ho={ReactCurrentDispatcher:{current:{readContext:function(t){return Hn.__n[t.__c].props.value}}}};(typeof performance>"u"?"undefined":Ve(performance))=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function Dr(t){return!!t&&t.$$typeof===qn}var f={useState:Gt,useReducer:xn,useEffect:Xt,useLayoutEffect:_r,useRef:function(t){return pe=5,Pt(function(){return{current:t}},[])},useImperativeHandle:function(t,e,r){pe=6,_r(function(){typeof t=="function"?t(e()):t&&(t.current=e())},r==null?r:r.concat(t))},useMemo:Pt,useCallback:function(t,e){return pe=8,Pt(function(){return t},e)},useContext:function(t){var e=L.context[t.__c],r=Je(de++,9);return r.__c=t,e?(r.__==null&&(r.__=!0,e.sub(L)),e.props.value):t.__},useDebugValue:function(t,e){w.useDebugValue&&w.useDebugValue(e?e(t):t)},version:"16.8.0",Children:Ao,render:Mn,hydrate:function(t,e,r){return Cn(t,e),typeof r=="function"&&r(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(We(null,t),!0)},createPortal:Ln,createElement:K,createContext:function(t,e){var r={__c:e="__cC"+Sn++,__:t,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=[],(i={})[e]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(Mt)},this.sub=function(a){o.push(a);var c=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),c&&c.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r},createFactory:function(t){return K.bind(null,t)},cloneElement:function(t){return Dr(t)?Io.apply(null,arguments):t},createRef:function(){return{current:null}},Fragment:X,isValidElement:Dr,findDOMNode:function(t){return t&&(t.base||t.nodeType===1&&t)||null},Component:W,PureComponent:Bt,memo:function(t,e){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),e?!e(this.props,o)||!a:Ft(this.props,o)}function n(o){return this.shouldComponentUpdate=r,K(t,o)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n},forwardRef:function(t){function e(r,n){var o=Tn({},r);return delete o.ref,t(o,(n=r.ref||n)&&(Ve(n)!="object"||"current"in n)?n:null)}return e.$$typeof=Do,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e},unstable_batchedUpdates:function(t,e){return t(e)},StrictMode:X,Suspense:ct,SuspenseList:je,lazy:function(t){var e,r,n;function o(i){if(e||(e=t()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw e;return K(r,i)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ho};function Uo(){return f.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},f.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function Un(){return f.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20","aria-hidden":"true"},f.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var Fo=["translations"];function Vt(){return Vt=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var Vo=f.forwardRef(function(t,e){var r=t.translations,n=r===void 0?{}:r,o=Bo(t,Fo),i=n.buttonText,a=i===void 0?"Search":i,c=n.buttonAriaLabel,u=c===void 0?"Search":c,s=Fn(Gt(null),2),l=s[0],m=s[1];return Xt(function(){typeof navigator<"u"&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?m("⌘"):m("Ctrl"))},[]),f.createElement("button",Vt({type:"button",className:"DocSearch DocSearch-Button","aria-label":u},o,{ref:e}),f.createElement("span",{className:"DocSearch-Button-Container"},f.createElement(Un,null),f.createElement("span",{className:"DocSearch-Button-Placeholder"},a)),f.createElement("span",{className:"DocSearch-Button-Keys"},l!==null&&f.createElement(f.Fragment,null,f.createElement(Cr,{reactsToKey:l==="Ctrl"?"Ctrl":"Meta"},l==="Ctrl"?f.createElement(Uo,null):l),f.createElement(Cr,{reactsToKey:"k"},"K"))))});function Cr(t){var e=t.reactsToKey,r=t.children,n=Fn(Gt(!1),2),o=n[0],i=n[1];return Xt(function(){if(e)return window.addEventListener("keydown",a),window.addEventListener("keyup",c),function(){window.removeEventListener("keydown",a),window.removeEventListener("keyup",c)};function a(u){u.key===e&&i(!0)}function c(u){u.key!==e&&u.key!=="Meta"||i(!1)}},[e]),f.createElement("kbd",{className:o?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"},r)}function Bn(t,e){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;it.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Rr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function ve(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:20,r=[],n=0;n=3||r===2&&n>=4||r===1&&n>=10);function i(a,c,u){if(o&&u!==void 0){var s=u[0].__autocomplete_algoliaCredentials,l={"X-Algolia-Application-Id":s.appId,"X-Algolia-API-Key":s.apiKey};t.apply(void 0,[a].concat(Ge(c),[{headers:l}]))}else t.apply(void 0,[a].concat(Ge(c)))}return{init:function(a,c){t("init",{appId:a,apiKey:c})},setUserToken:function(a){t("setUserToken",a)},clickedObjectIDsAfterSearch:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&i("clickedObjectIDsAfterSearch",Xe(c),c[0].items)},clickedObjectIDs:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&i("clickedObjectIDs",Xe(c),c[0].items)},clickedFilters:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&t.apply(void 0,["clickedFilters"].concat(c))},convertedObjectIDsAfterSearch:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&i("convertedObjectIDsAfterSearch",Xe(c),c[0].items)},convertedObjectIDs:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&i("convertedObjectIDs",Xe(c),c[0].items)},convertedFilters:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&t.apply(void 0,["convertedFilters"].concat(c))},viewedObjectIDs:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&c.reduce(function(s,l){var m=l.items,p=Kn(l,$o);return[].concat(Ge(s),Ge(Zo(ve(ve({},p),{},{objectIDs:(m==null?void 0:m.map(function(v){return v.objectID}))||p.objectIDs})).map(function(v){return{items:m,payload:v}})))},[]).forEach(function(s){var l=s.items;return i("viewedObjectIDs",[s.payload],l)})},viewedFilters:function(){for(var a=arguments.length,c=new Array(a),u=0;u0&&t.apply(void 0,["viewedFilters"].concat(c))}}}function Go(t){var e=t.items.reduce(function(r,n){var o;return r[n.__autocomplete_indexName]=((o=r[n.__autocomplete_indexName])!==null&&o!==void 0?o:[]).concat(n),r},{});return Object.keys(e).map(function(r){return{index:r,items:e[r],algoliaSource:["autocomplete"]}})}function kt(t){return t.objectID&&t.__autocomplete_indexName&&t.__autocomplete_queryID}function De(t){return De=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(t)}function ie(t){return function(e){if(Array.isArray(e))return Dt(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||function(e,r){if(e){if(typeof e=="string")return Dt(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dt(e,r)}}(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Dt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&ti({onItemsChange:n,items:p,insights:c,state:m}))}},0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(l){var m=l.setContext,p=l.onSelect,v=l.onActive;a("addAlgoliaAgent","insights-plugin"),m({algoliaInsightsPlugin:{__algoliaSearchParameters:{clickAnalytics:!0},insights:c}}),p(function(d){var h=d.item,y=d.state,b=d.event;kt(h)&&o({state:y,event:b,insights:c,item:h,insightsEvents:[G({eventName:"Item Selected"},Nr({item:h,items:u.current}))]})}),v(function(d){var h=d.item,y=d.state,b=d.event;kt(h)&&i({state:y,event:b,insights:c,item:h,insightsEvents:[G({eventName:"Item Active"},Nr({item:h,items:u.current}))]})})},onStateChange:function(l){var m=l.state;s({state:m})},__autocomplete_pluginOptions:t}}function lt(t,e){var r=e;return{then:function(n,o){return lt(t.then(et(n,r,t),et(o,r,t)),r)},catch:function(n){return lt(t.catch(et(n,r,t)),r)},finally:function(n){return n&&r.onCancelList.push(n),lt(t.finally(et(n&&function(){return r.onCancelList=[],n()},r,t)),r)},cancel:function(){r.isCanceled=!0;var n=r.onCancelList;r.onCancelList=[],n.forEach(function(o){o()})},isCanceled:function(){return r.isCanceled===!0}}}function qr(t){return lt(t,{isCanceled:!1,onCancelList:[]})}function et(t,e,r){return t?function(n){return e.isCanceled?n:t(n)}:r}function Mr(t,e,r,n){if(!r)return null;if(t<0&&(e===null||n!==null&&e===0))return r+t;var o=(e===null?-1:e)+t;return o<=-1||o>=r?n===null?null:0:o}function Hr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function Ur(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r0},reshape:function(i){return i.sources}},t),{},{id:(r=t.id)!==null&&r!==void 0?r:"autocomplete-".concat(Ko++),plugins:o,initialState:ae({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},t.initialState),onStateChange:function(i){var a;(a=t.onStateChange)===null||a===void 0||a.call(t,i),o.forEach(function(c){var u;return(u=c.onStateChange)===null||u===void 0?void 0:u.call(c,i)})},onSubmit:function(i){var a;(a=t.onSubmit)===null||a===void 0||a.call(t,i),o.forEach(function(c){var u;return(u=c.onSubmit)===null||u===void 0?void 0:u.call(c,i)})},onReset:function(i){var a;(a=t.onReset)===null||a===void 0||a.call(t,i),o.forEach(function(c){var u;return(u=c.onReset)===null||u===void 0?void 0:u.call(c,i)})},getSources:function(i){return Promise.all([].concat(ci(o.map(function(a){return a.getSources})),[t.getSources]).filter(Boolean).map(function(a){return function(c,u){var s=[];return Promise.resolve(c(u)).then(function(l){return Promise.all(l.filter(function(m){return!!m}).map(function(m){if(m.sourceId,s.includes(m.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(m.sourceId)," is not unique."));s.push(m.sourceId);var p={getItemInputValue:function(d){return d.state.query},getItemUrl:function(){},onSelect:function(d){(0,d.setIsOpen)(!1)},onActive:vt,onResolve:vt};Object.keys(p).forEach(function(d){p[d].__default=!0});var v=Ur(Ur({},p),m);return Promise.resolve(v)}))})}(a,i)})).then(function(a){return ze(a)}).then(function(a){return a.map(function(c){return ae(ae({},c),{},{onSelect:function(u){c.onSelect(u),e.forEach(function(s){var l;return(l=s.onSelect)===null||l===void 0?void 0:l.call(s,u)})},onActive:function(u){c.onActive(u),e.forEach(function(s){var l;return(l=s.onActive)===null||l===void 0?void 0:l.call(s,u)})},onResolve:function(u){c.onResolve(u),e.forEach(function(s){var l;return(l=s.onResolve)===null||l===void 0?void 0:l.call(s,u)})}})})})},navigator:ae({navigate:function(i){var a=i.itemUrl;n.location.assign(a)},navigateNewTab:function(i){var a=i.itemUrl,c=n.open(a,"_blank","noopener");c==null||c.focus()},navigateNewWindow:function(i){var a=i.itemUrl;n.open(a,"_blank","noopener")}},t.navigator)})}function Te(t){return Te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(t)}function Kr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function rt(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var Jr,xt,ot,we=null,$r=(Jr=-1,xt=-1,ot=void 0,function(t){var e=++Jr;return Promise.resolve(t).then(function(r){return ot&&e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Me(t){return Me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(t)}var Oi=["props","refresh","store"],Si=["inputElement","formElement","panelElement"],wi=["inputElement"],ji=["inputElement","maxLength"],Ei=["sourceIndex"],Pi=["sourceIndex"],Ii=["item","source","sourceIndex"];function Zr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function R(t){for(var e=1;e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Di(t){var e=t.props,r=t.refresh,n=t.store,o=re(t,Oi),i=function(a,c){return c!==void 0?"".concat(a,"-").concat(c):a};return{getEnvironmentProps:function(a){var c=a.inputElement,u=a.formElement,s=a.panelElement;function l(m){!n.getState().isOpen&&n.pendingRequests.isEmpty()||m.target===c||[u,s].some(function(p){return v=p,d=m.target,v===d||v.contains(d);var v,d})===!1&&(n.dispatch("blur",null),e.debug||n.pendingRequests.cancelAll())}return R({onTouchStart:l,onMouseDown:l,onTouchMove:function(m){n.getState().isOpen!==!1&&c===e.environment.document.activeElement&&m.target!==c&&c.blur()}},re(a,Si))},getRootProps:function(a){return R({role:"combobox","aria-expanded":n.getState().isOpen,"aria-haspopup":"listbox","aria-owns":n.getState().isOpen?"".concat(e.id,"-list"):void 0,"aria-labelledby":"".concat(e.id,"-label")},a)},getFormProps:function(a){return a.inputElement,R({action:"",noValidate:!0,role:"search",onSubmit:function(c){var u;c.preventDefault(),e.onSubmit(R({event:c,refresh:r,state:n.getState()},o)),n.dispatch("submit",null),(u=a.inputElement)===null||u===void 0||u.blur()},onReset:function(c){var u;c.preventDefault(),e.onReset(R({event:c,refresh:r,state:n.getState()},o)),n.dispatch("reset",null),(u=a.inputElement)===null||u===void 0||u.focus()}},re(a,wi))},getLabelProps:function(a){var c=a||{},u=c.sourceIndex,s=re(c,Ei);return R({htmlFor:"".concat(i(e.id,u),"-input"),id:"".concat(i(e.id,u),"-label")},s)},getInputProps:function(a){var c;function u(y){(e.openOnFocus||n.getState().query)&&le(R({event:y,props:e,query:n.getState().completion||n.getState().query,refresh:r,store:n},o)),n.dispatch("focus",null)}var s=a||{},l=(s.inputElement,s.maxLength),m=l===void 0?512:l,p=re(s,ji),v=fe(n.getState()),d=function(y){return!!(y&&y.match(oi))}(((c=e.environment.navigator)===null||c===void 0?void 0:c.userAgent)||""),h=v!=null&&v.itemUrl&&!d?"go":"search";return R({"aria-autocomplete":"both","aria-activedescendant":n.getState().isOpen&&n.getState().activeItemId!==null?"".concat(e.id,"-item-").concat(n.getState().activeItemId):void 0,"aria-controls":n.getState().isOpen?"".concat(e.id,"-list"):void 0,"aria-labelledby":"".concat(e.id,"-label"),value:n.getState().completion||n.getState().query,id:"".concat(e.id,"-input"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",enterKeyHint:h,spellCheck:"false",autoFocus:e.autoFocus,placeholder:e.placeholder,maxLength:m,type:"search",onChange:function(y){le(R({event:y,props:e,query:y.currentTarget.value.slice(0,m),refresh:r,store:n},o))},onKeyDown:function(y){(function(b){var _=b.event,S=b.props,O=b.refresh,g=b.store,P=_i(b,gi);if(_.key==="ArrowUp"||_.key==="ArrowDown"){var C=function(){var M=S.environment.document.getElementById("".concat(S.id,"-item-").concat(g.getState().activeItemId));M&&(M.scrollIntoViewIfNeeded?M.scrollIntoViewIfNeeded(!1):M.scrollIntoView(!1))},q=function(){var M=fe(g.getState());if(g.getState().activeItemId!==null&&M){var Ot=M.item,St=M.itemInputValue,$e=M.itemUrl,B=M.source;B.onActive(te({event:_,item:Ot,itemInputValue:St,itemUrl:$e,refresh:O,source:B,state:g.getState()},P))}};_.preventDefault(),g.getState().isOpen===!1&&(S.openOnFocus||g.getState().query)?le(te({event:_,props:S,query:g.getState().query,refresh:O,store:g},P)).then(function(){g.dispatch(_.key,{nextActiveItemId:S.defaultActiveItemId}),q(),setTimeout(C,0)}):(g.dispatch(_.key,{}),q(),C())}else if(_.key==="Escape")_.preventDefault(),g.dispatch(_.key,null),g.pendingRequests.cancelAll();else if(_.key==="Tab")g.dispatch("blur",null),g.pendingRequests.cancelAll();else if(_.key==="Enter"){if(g.getState().activeItemId===null||g.getState().collections.every(function(M){return M.items.length===0}))return void(S.debug||g.pendingRequests.cancelAll());_.preventDefault();var x=fe(g.getState()),D=x.item,N=x.itemInputValue,U=x.itemUrl,F=x.source;if(_.metaKey||_.ctrlKey)U!==void 0&&(F.onSelect(te({event:_,item:D,itemInputValue:N,itemUrl:U,refresh:O,source:F,state:g.getState()},P)),S.navigator.navigateNewTab({itemUrl:U,item:D,state:g.getState()}));else if(_.shiftKey)U!==void 0&&(F.onSelect(te({event:_,item:D,itemInputValue:N,itemUrl:U,refresh:O,source:F,state:g.getState()},P)),S.navigator.navigateNewWindow({itemUrl:U,item:D,state:g.getState()}));else if(!_.altKey){if(U!==void 0)return F.onSelect(te({event:_,item:D,itemInputValue:N,itemUrl:U,refresh:O,source:F,state:g.getState()},P)),void S.navigator.navigate({itemUrl:U,item:D,state:g.getState()});le(te({event:_,nextState:{isOpen:!1},props:S,query:N,refresh:O,store:g},P)).then(function(){F.onSelect(te({event:_,item:D,itemInputValue:N,itemUrl:U,refresh:O,source:F,state:g.getState()},P))})}}})(R({event:y,props:e,refresh:r,store:n},o))},onFocus:u,onBlur:vt,onClick:function(y){a.inputElement!==e.environment.document.activeElement||n.getState().isOpen||u(y)}},p)},getPanelProps:function(a){return R({onMouseDown:function(c){c.preventDefault()},onMouseLeave:function(){n.dispatch("mouseleave",null)}},a)},getListProps:function(a){var c=a||{},u=c.sourceIndex,s=re(c,Pi);return R({role:"listbox","aria-labelledby":"".concat(i(e.id,u),"-label"),id:"".concat(i(e.id,u),"-list")},s)},getItemProps:function(a){var c=a.item,u=a.source,s=a.sourceIndex,l=re(a,Ii);return R({id:"".concat(i(e.id,s),"-item-").concat(c.__autocomplete_id),role:"option","aria-selected":n.getState().activeItemId===c.__autocomplete_id,onMouseMove:function(m){if(c.__autocomplete_id!==n.getState().activeItemId){n.dispatch("mousemove",c.__autocomplete_id);var p=fe(n.getState());if(n.getState().activeItemId!==null&&p){var v=p.item,d=p.itemInputValue,h=p.itemUrl,y=p.source;y.onActive(R({event:m,item:v,itemInputValue:d,itemUrl:h,refresh:r,source:y,state:n.getState()},o))}}},onMouseDown:function(m){m.preventDefault()},onClick:function(m){var p=u.getItemInputValue({item:c,state:n.getState()}),v=u.getItemUrl({item:c,state:n.getState()});(v?Promise.resolve():le(R({event:m,nextState:{isOpen:!1},props:e,query:p,refresh:r,store:n},o))).then(function(){u.onSelect(R({event:m,item:c,itemInputValue:p,itemUrl:v,refresh:r,source:u,state:n.getState()},o))})}},l)}}}function He(t){return He=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},He(t)}function Yr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function Ai(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function Gi(t){var e=t.translations,r=e===void 0?{}:e,n=Yi(t,Qi),o=r.noResultsText,i=o===void 0?"No results for":o,a=r.suggestedQueryText,c=a===void 0?"Try searching for":a,u=r.reportMissingResultsText,s=u===void 0?"Believe this query should return results?":u,l=r.reportMissingResultsLinkText,m=l===void 0?"Let us know.":l,p=n.state.context.searchSuggestions;return f.createElement("div",{className:"DocSearch-NoResults"},f.createElement("div",{className:"DocSearch-Screen-Icon"},f.createElement(Ji,null)),f.createElement("p",{className:"DocSearch-Title"},i,' "',f.createElement("strong",null,n.state.query),'"'),p&&p.length>0&&f.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},f.createElement("p",{className:"DocSearch-Help"},c,":"),f.createElement("ul",null,p.slice(0,3).reduce(function(v,d){return[].concat(Zi(v),[f.createElement("li",{key:d},f.createElement("button",{className:"DocSearch-Prefill",key:d,type:"button",onClick:function(){n.setQuery(d.toLowerCase()+" "),n.refresh(),n.inputRef.current.focus()}},d))])},[]))),n.getMissingResultsUrl&&f.createElement("p",{className:"DocSearch-Help"},"".concat(s," "),f.createElement("a",{href:n.getMissingResultsUrl({query:n.state.query}),target:"_blank",rel:"noopener noreferrer"},m)))}var Xi=["hit","attribute","tagName"];function rn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),r.push.apply(r,n)}return r}function nn(t){for(var e=1;e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function on(t,e){return e.split(".").reduce(function(r,n){return r!=null&&r[n]?r[n]:null},t)}function ce(t){var e=t.hit,r=t.attribute,n=t.tagName;return K(n===void 0?"span":n,nn(nn({},ta(t,Xi)),{},{dangerouslySetInnerHTML:{__html:on(e,"_snippetResult.".concat(r,".value"))||on(e,r)}}))}function an(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,n){var o=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(o!=null){var i,a,c=[],u=!0,s=!1;try{for(o=o.call(r);!(u=(i=o.next()).done)&&(c.push(i.value),!n||c.length!==n);u=!0);}catch(l){s=!0,a=l}finally{try{u||o.return==null||o.return()}finally{if(s)throw a}}return c}}(t,e)||function(r,n){if(r){if(typeof r=="string")return un(r,n);var o=Object.prototype.toString.call(r).slice(8,-1);if(o==="Object"&&r.constructor&&(o=r.constructor.name),o==="Map"||o==="Set")return Array.from(r);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return un(r,n)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function un(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r|<\/mark>)/g,oa=RegExp($n.source);function Qn(t){var e,r,n=t;if(!n.__docsearch_parent&&!t._highlightResult)return t.hierarchy.lvl0;var o=((n.__docsearch_parent?(e=n.__docsearch_parent)===null||e===void 0||(e=e._highlightResult)===null||e===void 0||(e=e.hierarchy)===null||e===void 0?void 0:e.lvl0:(r=t._highlightResult)===null||r===void 0||(r=r.hierarchy)===null||r===void 0?void 0:r.lvl0)||{}).value;return o&&oa.test(o)?o.replace($n,""):o}function Jt(){return Jt=Object.assign||function(t){for(var e=1;e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function ca(t){var e=t.translations,r=e===void 0?{}:e,n=ua(t,aa),o=r.recentSearchesTitle,i=o===void 0?"Recent":o,a=r.noRecentSearchesText,c=a===void 0?"No recent searches":a,u=r.saveRecentSearchButtonTitle,s=u===void 0?"Save this search":u,l=r.removeRecentSearchButtonTitle,m=l===void 0?"Remove this search from history":l,p=r.favoriteSearchesTitle,v=p===void 0?"Favorite":p,d=r.removeFavoriteSearchButtonTitle,h=d===void 0?"Remove this search from favorites":d;return n.state.status==="idle"&&n.hasCollections===!1?n.disableUserPersonalization?null:f.createElement("div",{className:"DocSearch-StartScreen"},f.createElement("p",{className:"DocSearch-Help"},c)):n.hasCollections===!1?null:f.createElement("div",{className:"DocSearch-Dropdown-Container"},f.createElement(zt,ht({},n,{title:i,collection:n.state.collections[0],renderIcon:function(){return f.createElement("div",{className:"DocSearch-Hit-icon"},f.createElement(Ui,null))},renderAction:function(y){var b=y.item,_=y.runFavoriteTransition,S=y.runDeleteTransition;return f.createElement(f.Fragment,null,f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:s,type:"submit",onClick:function(O){O.preventDefault(),O.stopPropagation(),_(function(){n.favoriteSearches.add(b),n.recentSearches.remove(b),n.refresh()})}},f.createElement(tn,null))),f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:m,type:"submit",onClick:function(O){O.preventDefault(),O.stopPropagation(),S(function(){n.recentSearches.remove(b),n.refresh()})}},f.createElement(Wt,null))))}})),f.createElement(zt,ht({},n,{title:v,collection:n.state.collections[1],renderIcon:function(){return f.createElement("div",{className:"DocSearch-Hit-icon"},f.createElement(tn,null))},renderAction:function(y){var b=y.item,_=y.runDeleteTransition;return f.createElement("div",{className:"DocSearch-Hit-action"},f.createElement("button",{className:"DocSearch-Hit-action-button",title:h,type:"submit",onClick:function(S){S.preventDefault(),S.stopPropagation(),_(function(){n.favoriteSearches.remove(b),n.refresh()})}},f.createElement(Wt,null)))}})))}var la=["translations"];function yt(){return yt=Object.assign||function(t){for(var e=1;e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var fa=f.memo(function(t){var e=t.translations,r=e===void 0?{}:e,n=sa(t,la);if(n.state.status==="error")return f.createElement($i,{translations:r==null?void 0:r.errorScreen});var o=n.state.collections.some(function(i){return i.items.length>0});return n.state.query?o===!1?f.createElement(Gi,yt({},n,{translations:r==null?void 0:r.noResultsScreen})):f.createElement(ia,n):f.createElement(ca,yt({},n,{hasCollections:o,translations:r==null?void 0:r.startScreen}))},function(t,e){return e.state.status==="loading"||e.state.status==="stalled"}),ma=["translations"];function gt(){return gt=Object.assign||function(t){for(var e=1;e=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function va(t){var e=t.translations,r=e===void 0?{}:e,n=pa(t,ma),o=r.resetButtonTitle,i=o===void 0?"Clear the query":o,a=r.resetButtonAriaLabel,c=a===void 0?"Clear the query":a,u=r.cancelButtonText,s=u===void 0?"Cancel":u,l=r.cancelButtonAriaLabel,m=l===void 0?"Cancel":l,p=r.searchInputLabel,v=p===void 0?"Search":p,d=n.getFormProps({inputElement:n.inputRef.current}).onReset;return f.useEffect(function(){n.autoFocus&&n.inputRef.current&&n.inputRef.current.focus()},[n.autoFocus,n.inputRef]),f.useEffect(function(){n.isFromSelection&&n.inputRef.current&&n.inputRef.current.select()},[n.isFromSelection,n.inputRef]),f.createElement(f.Fragment,null,f.createElement("form",{className:"DocSearch-Form",onSubmit:function(h){h.preventDefault()},onReset:d},f.createElement("label",gt({className:"DocSearch-MagnifierLabel"},n.getLabelProps()),f.createElement(Un,null),f.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},v)),f.createElement("div",{className:"DocSearch-LoadingIndicator"},f.createElement(Hi,null)),f.createElement("input",gt({className:"DocSearch-Input",ref:n.inputRef},n.getInputProps({inputElement:n.inputRef.current,autoFocus:n.autoFocus,maxLength:64}))),f.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":c,hidden:!n.state.query},f.createElement(Wt,null))),f.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":m,onClick:n.onClose},s))}var da=["_highlightResult","_snippetResult"];function ha(t,e){if(t==null)return{};var r,n,o=function(a,c){if(a==null)return{};var u,s,l={},m=Object.keys(a);for(s=0;s=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function ya(t){return function(){var e="__TEST_KEY__";try{return localStorage.setItem(e,""),localStorage.removeItem(e),!0}catch{return!1}}()===!1?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(e){return window.localStorage.setItem(t,JSON.stringify(e))},getItem:function(){var e=window.localStorage.getItem(t);return e?JSON.parse(e):[]}}}function sn(t){var e=t.key,r=t.limit,n=r===void 0?5:r,o=ya(e),i=o.getItem().slice(0,n);return{add:function(a){var c=a,u=(c._highlightResult,c._snippetResult,ha(c,da)),s=i.findIndex(function(l){return l.objectID===u.objectID});s>-1&&i.splice(s,1),i.unshift(u),i=i.slice(0,n),o.setItem(i)},remove:function(a){i=i.filter(function(c){return c.objectID!==a.objectID}),o.setItem(i)},getAll:function(){return i}}}var ga=["facetName","facetQuery"];function ba(t){var e,r="algoliasearch-client-js-".concat(t.key),n=function(){return e===void 0&&(e=t.localStorage||window.localStorage),e},o=function(){return JSON.parse(n().getItem(r)||"{}")},i=function(c){n().setItem(r,JSON.stringify(c))},a=function(){var c=t.timeToLive?1e3*t.timeToLive:null,u=o(),s=Object.fromEntries(Object.entries(u).filter(function(m){return se(m,2)[1].timestamp!==void 0}));if(i(s),c){var l=Object.fromEntries(Object.entries(s).filter(function(m){var p=se(m,2)[1],v=new Date().getTime();return!(p.timestamp+c2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){a();var l=JSON.stringify(c);return o()[l]}).then(function(l){return Promise.all([l?l.value:u(),l!==void 0])}).then(function(l){var m=se(l,2),p=m[0],v=m[1];return Promise.all([p,v||s.miss(p)])}).then(function(l){return se(l,1)[0]})},set:function(c,u){return Promise.resolve().then(function(){var s=o();return s[JSON.stringify(c)]={timestamp:new Date().getTime(),value:u},n().setItem(r,JSON.stringify(s)),u})},delete:function(c){return Promise.resolve().then(function(){var u=o();delete u[JSON.stringify(c)],n().setItem(r,JSON.stringify(u))})},clear:function(){return Promise.resolve().then(function(){n().removeItem(r)})}}}function Ee(t){var e=ft(t.caches),r=e.shift();return r===void 0?{get:function(n,o){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return o().then(function(a){return Promise.all([a,i.miss(a)])}).then(function(a){return se(a,1)[0]})},set:function(n,o){return Promise.resolve(o)},delete:function(n){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(n,o){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(n,o,i).catch(function(){return Ee({caches:e}).get(n,o,i)})},set:function(n,o){return r.set(n,o).catch(function(){return Ee({caches:e}).set(n,o)})},delete:function(n){return r.delete(n).catch(function(){return Ee({caches:e}).delete(n)})},clear:function(){return r.clear().catch(function(){return Ee({caches:e}).clear()})}}}function Tt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},e={};return{get:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},i=JSON.stringify(r);if(i in e)return Promise.resolve(t.serializable?JSON.parse(e[i]):e[i]);var a=n(),c=o&&o.miss||function(){return Promise.resolve()};return a.then(function(u){return c(u)}).then(function(){return a})},set:function(r,n){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear:function(){return e={},Promise.resolve()}}}function _a(t){for(var e=t.length-1;e>0;e--){var r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}function Zn(t,e){return e&&Object.keys(e).forEach(function(r){t[r]=e[r](t)}),t}function bt(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n0?n:void 0,timeout:r.timeout||e,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var me={Read:1,Write:2,Any:3},Yn=1,Oa=2,Gn=3;function Xn(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yn;return I(I({},t),{},{status:e,lastUpdate:Date.now()})}function eo(t){return typeof t=="string"?{protocol:"https",url:t,accept:me.Any}:{protocol:t.protocol||"https",url:t.url,accept:t.accept||me.Any}}var $t="GET",_t="POST";function Sa(t,e){return Promise.all(e.map(function(r){return t.get(r,function(){return Promise.resolve(Xn(r))})})).then(function(r){var n=r.filter(function(a){return function(c){return c.status===Yn||Date.now()-c.lastUpdate>12e4}(a)}),o=r.filter(function(a){return function(c){return c.status===Gn&&Date.now()-c.lastUpdate<=12e4}(a)}),i=[].concat(ft(n),ft(o));return{getTimeout:function(a,c){return(o.length===0&&a===0?1:o.length+3+a)*c},statelessHosts:i.length>0?i.map(function(a){return eo(a)}):e}})}function mn(t,e,r,n){var o=[],i=function(p,v){if(!(p.method===$t||p.data===void 0&&v.data===void 0)){var d=Array.isArray(p.data)?p.data:I(I({},p.data),v.data);return JSON.stringify(d)}}(r,n),a=function(p,v){var d=I(I({},p.headers),v.headers),h={};return Object.keys(d).forEach(function(y){var b=d[y];h[y.toLowerCase()]=b}),h}(t,n),c=r.method,u=r.method!==$t?{}:I(I({},r.data),n.data),s=I(I(I({"x-algolia-agent":t.userAgent.value},t.queryParameters),u),n.queryParameters),l=0,m=function p(v,d){var h=v.pop();if(h===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:pn(o)};var y={data:i,headers:a,method:c,url:ja(h,r.path,s),connectTimeout:d(l,t.timeouts.connect),responseTimeout:d(l,n.timeout)},b=function(S){var O={request:y,response:S,host:h,triesLeft:v.length};return o.push(O),O},_={onSuccess:function(S){return function(O){try{return JSON.parse(O.content)}catch(g){throw function(P,C){return{name:"DeserializationError",message:P,response:C}}(g.message,O)}}(S)},onRetry:function(S){var O=b(S);return S.isTimedOut&&l++,Promise.all([t.logger.info("Retryable failure",ro(O)),t.hostsCache.set(h,Xn(h,S.isTimedOut?Gn:Oa))]).then(function(){return p(v,d)})},onFail:function(S){throw b(S),function(O,g){var P=O.content,C=O.status,q=P;try{q=JSON.parse(P).message}catch{}return function(x,D,N){return{name:"ApiError",message:x,status:D,transporterStackTrace:N}}(q,C,g)}(S,pn(o))}};return t.requester.send(y).then(function(S){return function(O,g){return function(P){var C=P.status;return P.isTimedOut||function(q){var x=q.isTimedOut,D=q.status;return!x&&~~D==0}(P)||~~(C/100)!=2&&~~(C/100)!=4}(O)?g.onRetry(O):~~(O.status/100)==2?g.onSuccess(O):g.onFail(O)}(S,_)})};return Sa(t.hostsCache,e).then(function(p){return m(ft(p.statelessHosts).reverse(),p.getTimeout)})}function wa(t){var e={value:"Algolia for JavaScript (".concat(t,")"),add:function(r){var n="; ".concat(r.segment).concat(r.version!==void 0?" (".concat(r.version,")"):"");return e.value.indexOf(n)===-1&&(e.value="".concat(e.value).concat(n)),e}};return e}function ja(t,e,r){var n=to(r),o="".concat(t.protocol,"://").concat(t.url,"/").concat(e.charAt(0)==="/"?e.substr(1):e);return n.length&&(o+="?".concat(n)),o}function to(t){return Object.keys(t).map(function(e){return bt("%s=%s",e,(r=t[e],Object.prototype.toString.call(r)==="[object Object]"||Object.prototype.toString.call(r)==="[object Array]"?JSON.stringify(t[e]):t[e]));var r}).join("&")}function pn(t){return t.map(function(e){return ro(e)})}function ro(t){var e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return I(I({},t),{},{request:I(I({},t.request),{},{headers:I(I({},t.request.headers),e)})})}var Ea=function(t){var e=t.appId,r=function(i,a,c){var u={"x-algolia-api-key":c,"x-algolia-application-id":a};return{headers:function(){return i===st.WithinHeaders?u:{}},queryParameters:function(){return i===st.WithinQueryParameters?u:{}}}}(t.authMode!==void 0?t.authMode:st.WithinHeaders,e,t.apiKey),n=function(i){var a=i.hostsCache,c=i.logger,u=i.requester,s=i.requestsCache,l=i.responsesCache,m=i.timeouts,p=i.userAgent,v=i.hosts,d=i.queryParameters,h={hostsCache:a,logger:c,requester:u,requestsCache:s,responsesCache:l,timeouts:m,userAgent:p,headers:i.headers,queryParameters:d,hosts:v.map(function(y){return eo(y)}),read:function(y,b){var _=fn(b,h.timeouts.read),S=function(){return mn(h,h.hosts.filter(function(g){return(g.accept&me.Read)!=0}),y,_)};if((_.cacheable!==void 0?_.cacheable:y.cacheable)!==!0)return S();var O={request:y,mappedRequestOptions:_,transporter:{queryParameters:h.queryParameters,headers:h.headers}};return h.responsesCache.get(O,function(){return h.requestsCache.get(O,function(){return h.requestsCache.set(O,S()).then(function(g){return Promise.all([h.requestsCache.delete(O),g])},function(g){return Promise.all([h.requestsCache.delete(O),Promise.reject(g)])}).then(function(g){var P=se(g,2);return P[0],P[1]})})},{miss:function(g){return h.responsesCache.set(O,g)}})},write:function(y,b){return mn(h,h.hosts.filter(function(_){return(_.accept&me.Write)!=0}),y,fn(b,h.timeouts.write))}};return h}(I(I({hosts:[{url:"".concat(e,"-dsn.algolia.net"),accept:me.Read},{url:"".concat(e,".algolia.net"),accept:me.Write}].concat(_a([{url:"".concat(e,"-1.algolianet.com")},{url:"".concat(e,"-2.algolianet.com")},{url:"".concat(e,"-3.algolianet.com")}]))},t),{},{headers:I(I(I({},r.headers()),{"content-type":"application/x-www-form-urlencoded"}),t.headers),queryParameters:I(I({},r.queryParameters()),t.queryParameters)})),o={transporter:n,appId:e,addAlgoliaAgent:function(i,a){n.userAgent.add({segment:i,version:a})},clearCache:function(){return Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then(function(){})}};return Zn(o,t.methods)},Pa=function(t){return function(e,r){return e.method===$t?t.transporter.read(e,r):t.transporter.write(e,r)}},no=function(t){return function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={transporter:t.transporter,appId:t.appId,indexName:e};return Zn(n,r.methods)}},vn=function(t){return function(e,r){var n=e.map(function(o){return I(I({},o),{},{params:to(o.params||{})})});return t.transporter.read({method:_t,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},r)}},dn=function(t){return function(e,r){return Promise.all(e.map(function(n){var o=n.params,i=o.facetName,a=o.facetQuery,c=wo(o,ga);return no(t)(n.indexName,{methods:{searchForFacetValues:oo}}).searchForFacetValues(i,a,I(I({},r),c))}))}},Ia=function(t){return function(e,r,n){return t.transporter.read({method:_t,path:bt("1/answers/%s/prediction",t.indexName),data:{query:e,queryLanguages:r},cacheable:!0},n)}},ka=function(t){return function(e,r){return t.transporter.read({method:_t,path:bt("1/indexes/%s/query",t.indexName),data:{query:e},cacheable:!0},r)}},oo=function(t){return function(e,r,n){return t.transporter.read({method:_t,path:bt("1/indexes/%s/facets/%s/query",t.indexName,e),data:{facetQuery:r},cacheable:!0},n)}},Da=1,Aa=2,Ca=3;function io(t,e,r){var n,o={appId:t,apiKey:e,timeouts:{connect:1,read:2,write:30},requester:{send:function(i){return new Promise(function(a){var c=new XMLHttpRequest;c.open(i.method,i.url,!0),Object.keys(i.headers).forEach(function(m){return c.setRequestHeader(m,i.headers[m])});var u,s=function(m,p){return setTimeout(function(){c.abort(),a({status:0,content:p,isTimedOut:!0})},1e3*m)},l=s(i.connectTimeout,"Connection timeout");c.onreadystatechange=function(){c.readyState>c.OPENED&&u===void 0&&(clearTimeout(l),u=s(i.responseTimeout,"Socket timeout"))},c.onerror=function(){c.status===0&&(clearTimeout(l),clearTimeout(u),a({content:c.responseText||"Network request failed",status:c.status,isTimedOut:!1}))},c.onload=function(){clearTimeout(l),clearTimeout(u),a({content:c.responseText,status:c.status,isTimedOut:!1})},c.send(i.data)})}},logger:(n=Ca,{debug:function(i,a){return Da>=n&&console.debug(i,a),Promise.resolve()},info:function(i,a){return Aa>=n&&console.info(i,a),Promise.resolve()},error:function(i,a){return console.error(i,a),Promise.resolve()}}),responsesCache:Tt(),requestsCache:Tt({serializable:!1}),hostsCache:Ee({caches:[ba({key:"".concat("4.19.1","-").concat(t)}),Tt()]}),userAgent:wa("4.19.1").add({segment:"Browser",version:"lite"}),authMode:st.WithinQueryParameters};return Ea(I(I(I({},o),r),{},{methods:{search:vn,searchForFacetValues:dn,multipleQueries:vn,multipleSearchForFacetValues:dn,customRequest:Pa,initIndex:function(i){return function(a){return no(i)(a,{methods:{search:ka,searchForFacetValues:oo,findAnswers:Ia}})}}}}))}io.version="4.19.1";var xa=["footer","searchBox"];function Be(){return Be=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0||(l[u]=a[u]);return l}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function La(t){var e=t.appId,r=t.apiKey,n=t.indexName,o=t.placeholder,i=o===void 0?"Search docs":o,a=t.searchParameters,c=t.maxResultsPerGroup,u=t.onClose,s=u===void 0?na:u,l=t.transformItems,m=l===void 0?ln:l,p=t.hitComponent,v=p===void 0?Mi:p,d=t.resultsFooterComponent,h=d===void 0?function(){return null}:d,y=t.navigator,b=t.initialScrollY,_=b===void 0?0:b,S=t.transformSearchClient,O=S===void 0?ln:S,g=t.disableUserPersonalization,P=g!==void 0&&g,C=t.initialQuery,q=C===void 0?"":C,x=t.translations,D=x===void 0?{}:x,N=t.getMissingResultsUrl,U=t.insights,F=U!==void 0&&U,M=D.footer,Ot=D.searchBox,St=Ra(D,xa),$e=Ta(f.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),B=$e[0],ao=$e[1],tr=f.useRef(null),wt=f.useRef(null),rr=f.useRef(null),Qe=f.useRef(null),he=f.useRef(null),Q=f.useRef(10),nr=f.useRef(typeof window<"u"?window.getSelection().toString().slice(0,64):"").current,ee=f.useRef(q||nr).current,or=function(j,k,T){return f.useMemo(function(){var H=io(j,k);return H.addAlgoliaAgent("docsearch","3.6.0"),/docsearch.js \(.*\)/.test(H.transporter.userAgent.value)===!1&&H.addAlgoliaAgent("docsearch-react","3.6.0"),T(H)},[j,k,T])}(e,r,O),oe=f.useRef(sn({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(n),limit:10})).current,ye=f.useRef(sn({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(n),limit:oe.getAll().length===0?7:4})).current,ge=f.useCallback(function(j){if(!P){var k=j.type==="content"?j.__docsearch_parent:j;k&&oe.getAll().findIndex(function(T){return T.objectID===k.objectID})===-1&&ye.add(k)}},[oe,ye,P]),uo=f.useCallback(function(j){if(B.context.algoliaInsightsPlugin&&j.__autocomplete_id){var k=j,T={eventName:"Item Selected",index:k.__autocomplete_indexName,items:[k],positions:[j.__autocomplete_id],queryID:k.__autocomplete_queryID};B.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(T)}},[B.context.algoliaInsightsPlugin]),be=f.useMemo(function(){return Ri({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:ee,context:{searchSuggestions:[]}},insights:F,navigator:y,onStateChange:function(j){ao(j.state)},getSources:function(j){var k=j.query,T=j.state,H=j.setContext,Z=j.setStatus;if(!k)return P?[]:[{sourceId:"recentSearches",onSelect:function(A){var V=A.item,_e=A.event;ge(V),at(_e)||s()},getItemUrl:function(A){return A.item.url},getItems:function(){return ye.getAll()}},{sourceId:"favoriteSearches",onSelect:function(A){var V=A.item,_e=A.event;ge(V),at(_e)||s()},getItemUrl:function(A){return A.item.url},getItems:function(){return oe.getAll()}}];var Y=!!F;return or.search([{query:k,indexName:n,params:Rt({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(Q.current),"hierarchy.lvl2:".concat(Q.current),"hierarchy.lvl3:".concat(Q.current),"hierarchy.lvl4:".concat(Q.current),"hierarchy.lvl5:".concat(Q.current),"hierarchy.lvl6:".concat(Q.current),"content:".concat(Q.current)],snippetEllipsisText:"…",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:Y},a)}]).catch(function(A){throw A.name==="RetryError"&&Z("error"),A}).then(function(A){var V=A.results[0],_e=V.hits,so=V.nbHits,jt=cn(_e,function(Et){return Qn(Et)},c);T.context.searchSuggestions.length0&&(ir(),he.current&&he.current.focus())},[ee,ir]),f.useEffect(function(){function j(){if(wt.current){var k=.01*window.innerHeight;wt.current.style.setProperty("--docsearch-vh","".concat(k,"px"))}}return j(),window.addEventListener("resize",j),function(){window.removeEventListener("resize",j)}},[]),f.createElement("div",Be({ref:tr},lo({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container",B.status==="stalled"&&"DocSearch-Container--Stalled",B.status==="error"&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(j){j.target===j.currentTarget&&s()}}),f.createElement("div",{className:"DocSearch-Modal",ref:wt},f.createElement("header",{className:"DocSearch-SearchBar",ref:rr},f.createElement(va,Be({},be,{state:B,autoFocus:ee.length===0,inputRef:he,isFromSelection:!!ee&&ee===nr,translations:Ot,onClose:s}))),f.createElement("div",{className:"DocSearch-Dropdown",ref:Qe},f.createElement(fa,Be({},be,{indexName:n,state:B,hitComponent:v,resultsFooterComponent:h,disableUserPersonalization:P,recentSearches:ye,favoriteSearches:oe,inputRef:he,translations:St,getMissingResultsUrl:N,onItemClick:function(j,k){uo(j),ge(j),at(k)||s()}}))),f.createElement("footer",{className:"DocSearch-Footer"},f.createElement(qi,{translations:M}))))}function Qt(){return Qt=Object.assign||function(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&arguments[1]!==void 0?arguments[1]:window;return typeof e=="string"?r.document.querySelector(e):e}(t.container,t.environment))}const Ha={id:"docsearch"},Ba=mo({__name:"VPAlgoliaSearchBox",props:{algolia:{}},setup(t){const e=t,r=po(),n=vo(),{site:o,localeIndex:i,lang:a}=Oo();ho(c),yo(i,c);async function c(){var v,d;await go();const l={...e.algolia,...(v=e.algolia.locales)==null?void 0:v[i.value]},m=((d=l.searchParameters)==null?void 0:d.facetFilters)??[],p=[...(Array.isArray(m)?m:[m]).filter(h=>!h.startsWith("lang:")),`lang:${a.value}`];u({...l,searchParameters:{...l.searchParameters,facetFilters:p}})}function u(l){const m=Object.assign({},l,{container:"#docsearch",navigator:{navigate({itemUrl:p}){const{pathname:v}=new URL(window.location.origin+p);n.path===v?window.location.assign(window.location.origin+p):r.go(p)}},transformItems(p){return p.map(v=>Object.assign({},v,{url:s(v.url)}))},hitComponent({hit:p,children:v}){return{__v:null,type:"a",ref:void 0,constructor:void 0,key:void 0,props:{href:p.url,children:v}}}});Ma(m)}function s(l){const{pathname:m,hash:p}=new URL(l,location.origin);return m.replace(/\.html$/,o.value.cleanUrls?"":".html")+p}return(l,m)=>(bo(),_o("div",Ha))}});export{Ba as default}; diff --git a/assets/chunks/framework.44fd0451.js b/assets/chunks/framework.44fd0451.js deleted file mode 100644 index a60885c7..00000000 --- a/assets/chunks/framework.44fd0451.js +++ /dev/null @@ -1,2 +0,0 @@ -function Yn(e,t){const n=Object.create(null),s=e.split(",");for(let r=0;r!!n[r.toLowerCase()]:r=>!!n[r]}const te={},ft=[],Pe=()=>{},xi=()=>!1,Ei=/^on[^a-z]/,Ht=e=>Ei.test(e),Jn=e=>e.startsWith("onUpdate:"),oe=Object.assign,Xn=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Ti=Object.prototype.hasOwnProperty,q=(e,t)=>Ti.call(e,t),N=Array.isArray,at=e=>an(e)==="[object Map]",hr=e=>an(e)==="[object Set]",B=e=>typeof e=="function",re=e=>typeof e=="string",Zn=e=>typeof e=="symbol",ee=e=>e!==null&&typeof e=="object",pr=e=>ee(e)&&B(e.then)&&B(e.catch),gr=Object.prototype.toString,an=e=>gr.call(e),Ai=e=>an(e).slice(8,-1),mr=e=>an(e)==="[object Object]",Qn=e=>re(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,At=Yn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),un=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Ri=/-(\w)/g,Me=un(e=>e.replace(Ri,(t,n)=>n?n.toUpperCase():"")),Pi=/\B([A-Z])/g,rt=un(e=>e.replace(Pi,"-$1").toLowerCase()),dn=un(e=>e.charAt(0).toUpperCase()+e.slice(1)),Xt=un(e=>e?`on${dn(e)}`:""),Ft=(e,t)=>!Object.is(e,t),Tn=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Ii=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Oi=e=>{const t=re(e)?Number(e):NaN;return isNaN(t)?e:t};let xs;const Nn=()=>xs||(xs=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Gn(e){if(N(e)){const t={};for(let n=0;n{if(n){const s=n.split(Si);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function es(e){let t="";if(re(e))t=e;else if(N(e))for(let n=0;nre(e)?e:e==null?"":N(e)||ee(e)&&(e.toString===gr||!B(e.toString))?JSON.stringify(e,br,2):String(e),br=(e,t)=>t&&t.__v_isRef?br(e,t.value):at(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r])=>(n[`${s} =>`]=r,n),{})}:hr(t)?{[`Set(${t.size})`]:[...t.values()]}:ee(t)&&!N(t)&&!mr(t)?String(t):t;let _e;class $i{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=_e,!t&&_e&&(this.index=(_e.scopes||(_e.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=_e;try{return _e=this,t()}finally{_e=n}}}on(){_e=this}off(){_e=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},yr=e=>(e.w&Ve)>0,vr=e=>(e.n&Ve)>0,Bi=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s{(d==="length"||d>=c)&&l.push(a)})}else switch(n!==void 0&&l.push(o.get(n)),t){case"add":N(e)?Qn(n)&&l.push(o.get("length")):(l.push(o.get(nt)),at(e)&&l.push(o.get($n)));break;case"delete":N(e)||(l.push(o.get(nt)),at(e)&&l.push(o.get($n)));break;case"set":at(e)&&l.push(o.get(nt));break}if(l.length===1)l[0]&&Un(l[0]);else{const c=[];for(const a of l)a&&c.push(...a);Un(ts(c))}}function Un(e,t){const n=N(e)?e:[...e];for(const s of n)s.computed&&Ts(s);for(const s of n)s.computed||Ts(s)}function Ts(e,t){(e!==Ae||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function Ki(e,t){var n;return(n=tn.get(e))==null?void 0:n.get(t)}const ki=Yn("__proto__,__v_isRef,__isVue"),xr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Zn)),Wi=ss(),Vi=ss(!1,!0),qi=ss(!0),As=zi();function zi(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=z(this);for(let i=0,o=this.length;i{e[t]=function(...n){vt();const s=z(this)[t].apply(this,n);return Ct(),s}}),e}function Yi(e){const t=z(this);return pe(t,"has",e),t.hasOwnProperty(e)}function ss(e=!1,t=!1){return function(s,r,i){if(r==="__v_isReactive")return!e;if(r==="__v_isReadonly")return e;if(r==="__v_isShallow")return t;if(r==="__v_raw"&&i===(e?t?ao:Pr:t?Rr:Ar).get(s))return s;const o=N(s);if(!e){if(o&&q(As,r))return Reflect.get(As,r,i);if(r==="hasOwnProperty")return Yi}const l=Reflect.get(s,r,i);return(Zn(r)?xr.has(r):ki(r))||(e||pe(s,"get",r),t)?l:ce(l)?o&&Qn(r)?l:l.value:ee(l)?e?Ir(l):pn(l):l}}const Ji=Er(),Xi=Er(!0);function Er(e=!1){return function(n,s,r,i){let o=n[s];if(mt(o)&&ce(o)&&!ce(r))return!1;if(!e&&(!nn(r)&&!mt(r)&&(o=z(o),r=z(r)),!N(n)&&ce(o)&&!ce(r)))return o.value=r,!0;const l=N(n)&&Qn(s)?Number(s)e,hn=e=>Reflect.getPrototypeOf(e);function Dt(e,t,n=!1,s=!1){e=e.__v_raw;const r=z(e),i=z(t);n||(t!==i&&pe(r,"get",t),pe(r,"get",i));const{has:o}=hn(r),l=s?rs:n?ls:St;if(o.call(r,t))return l(e.get(t));if(o.call(r,i))return l(e.get(i));e!==r&&e.get(t)}function Kt(e,t=!1){const n=this.__v_raw,s=z(n),r=z(e);return t||(e!==r&&pe(s,"has",e),pe(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function kt(e,t=!1){return e=e.__v_raw,!t&&pe(z(e),"iterate",nt),Reflect.get(e,"size",e)}function Rs(e){e=z(e);const t=z(this);return hn(t).has.call(t,e)||(t.add(e),He(t,"add",e,e)),this}function Ps(e,t){t=z(t);const n=z(this),{has:s,get:r}=hn(n);let i=s.call(n,e);i||(e=z(e),i=s.call(n,e));const o=r.call(n,e);return n.set(e,t),i?Ft(t,o)&&He(n,"set",e,t):He(n,"add",e,t),this}function Is(e){const t=z(this),{has:n,get:s}=hn(t);let r=n.call(t,e);r||(e=z(e),r=n.call(t,e)),s&&s.call(t,e);const i=t.delete(e);return r&&He(t,"delete",e,void 0),i}function Os(){const e=z(this),t=e.size!==0,n=e.clear();return t&&He(e,"clear",void 0,void 0),n}function Wt(e,t){return function(s,r){const i=this,o=i.__v_raw,l=z(o),c=t?rs:e?ls:St;return!e&&pe(l,"iterate",nt),o.forEach((a,d)=>s.call(r,c(a),c(d),i))}}function Vt(e,t,n){return function(...s){const r=this.__v_raw,i=z(r),o=at(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,a=r[e](...s),d=n?rs:t?ls:St;return!t&&pe(i,"iterate",c?$n:nt),{next(){const{value:p,done:y}=a.next();return y?{value:p,done:y}:{value:l?[d(p[0]),d(p[1])]:d(p),done:y}},[Symbol.iterator](){return this}}}}function Ue(e){return function(...t){return e==="delete"?!1:this}}function no(){const e={get(i){return Dt(this,i)},get size(){return kt(this)},has:Kt,add:Rs,set:Ps,delete:Is,clear:Os,forEach:Wt(!1,!1)},t={get(i){return Dt(this,i,!1,!0)},get size(){return kt(this)},has:Kt,add:Rs,set:Ps,delete:Is,clear:Os,forEach:Wt(!1,!0)},n={get(i){return Dt(this,i,!0)},get size(){return kt(this,!0)},has(i){return Kt.call(this,i,!0)},add:Ue("add"),set:Ue("set"),delete:Ue("delete"),clear:Ue("clear"),forEach:Wt(!0,!1)},s={get(i){return Dt(this,i,!0,!0)},get size(){return kt(this,!0)},has(i){return Kt.call(this,i,!0)},add:Ue("add"),set:Ue("set"),delete:Ue("delete"),clear:Ue("clear"),forEach:Wt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=Vt(i,!1,!1),n[i]=Vt(i,!0,!1),t[i]=Vt(i,!1,!0),s[i]=Vt(i,!0,!0)}),[e,n,t,s]}const[so,ro,io,oo]=no();function is(e,t){const n=t?e?oo:io:e?ro:so;return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(q(n,r)&&r in s?n:s,r,i)}const lo={get:is(!1,!1)},co={get:is(!1,!0)},fo={get:is(!0,!1)},Ar=new WeakMap,Rr=new WeakMap,Pr=new WeakMap,ao=new WeakMap;function uo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ho(e){return e.__v_skip||!Object.isExtensible(e)?0:uo(Ai(e))}function pn(e){return mt(e)?e:os(e,!1,Tr,lo,Ar)}function po(e){return os(e,!1,to,co,Rr)}function Ir(e){return os(e,!0,eo,fo,Pr)}function os(e,t,n,s,r){if(!ee(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=ho(e);if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function ut(e){return mt(e)?ut(e.__v_raw):!!(e&&e.__v_isReactive)}function mt(e){return!!(e&&e.__v_isReadonly)}function nn(e){return!!(e&&e.__v_isShallow)}function Or(e){return ut(e)||mt(e)}function z(e){const t=e&&e.__v_raw;return t?z(t):e}function Rt(e){return en(e,"__v_skip",!0),e}const St=e=>ee(e)?pn(e):e,ls=e=>ee(e)?Ir(e):e;function cs(e){ke&&Ae&&(e=z(e),wr(e.dep||(e.dep=ts())))}function fs(e,t){e=z(e);const n=e.dep;n&&Un(n)}function ce(e){return!!(e&&e.__v_isRef===!0)}function dt(e){return Fr(e,!1)}function go(e){return Fr(e,!0)}function Fr(e,t){return ce(e)?e:new mo(e,t)}class mo{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:z(t),this._value=n?t:St(t)}get value(){return cs(this),this._value}set value(t){const n=this.__v_isShallow||nn(t)||mt(t);t=n?t:z(t),Ft(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:St(t),fs(this))}}function _o(e){return ce(e)?e.value:e}const bo={get:(e,t,n)=>_o(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return ce(r)&&!ce(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Sr(e){return ut(e)?e:new Proxy(e,bo)}class yo{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:s}=t(()=>cs(this),()=>fs(this));this._get=n,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}function Mc(e){return new yo(e)}class vo{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Ki(z(this._object),this._key)}}class Co{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Lc(e,t,n){return ce(e)?e:B(e)?new Co(e):ee(e)&&arguments.length>1?wo(e,t,n):dt(e)}function wo(e,t,n){const s=e[t];return ce(s)?s:new vo(e,t,n)}class xo{constructor(t,n,s,r){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new ns(t,()=>{this._dirty||(this._dirty=!0,fs(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=s}get value(){const t=z(this);return cs(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function Eo(e,t,n=!1){let s,r;const i=B(e);return i?(s=e,r=Pe):(s=e.get,r=e.set),new xo(s,r,i||!r,n)}function We(e,t,n,s){let r;try{r=s?e(...s):e()}catch(i){$t(i,t,n)}return r}function we(e,t,n,s){if(B(e)){const i=We(e,t,n,s);return i&&pr(i)&&i.catch(o=>{$t(o,t,n)}),i}const r=[];for(let i=0;i>>1;Lt(fe[s])Se&&fe.splice(t,1)}function Po(e){N(e)?ht.push(...e):(!Ne||!Ne.includes(e,e.allowRecurse?Qe+1:Qe))&&ht.push(e),Nr()}function Fs(e,t=Mt?Se+1:0){for(;tLt(n)-Lt(s)),Qe=0;Qee.id==null?1/0:e.id,Io=(e,t)=>{const n=Lt(e)-Lt(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Hr(e){jn=!1,Mt=!0,fe.sort(Io);const t=Pe;try{for(Se=0;Sere(x)?x.trim():x)),p&&(r=n.map(Ii))}let l,c=s[l=Xt(t)]||s[l=Xt(Me(t))];!c&&i&&(c=s[l=Xt(rt(t))]),c&&we(c,e,6,r);const a=s[l+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,we(a,e,6,r)}}function $r(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!B(e)){const c=a=>{const d=$r(a,t,!0);d&&(l=!0,oe(o,d))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(ee(e)&&s.set(e,null),null):(N(i)?i.forEach(c=>o[c]=null):oe(o,i),ee(e)&&s.set(e,o),o)}function mn(e,t){return!e||!Ht(t)?!1:(t=t.slice(2).replace(/Once$/,""),q(e,t[0].toLowerCase()+t.slice(1))||q(e,rt(t))||q(e,t))}let ae=null,_n=null;function rn(e){const t=ae;return ae=e,_n=e&&e.type.__scopeId||null,t}function Nc(e){_n=e}function Hc(){_n=null}function Fo(e,t=ae,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&ks(-1);const i=rn(t);let o;try{o=e(...r)}finally{rn(i),s._d&&ks(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function An(e){const{type:t,vnode:n,proxy:s,withProxy:r,props:i,propsOptions:[o],slots:l,attrs:c,emit:a,render:d,renderCache:p,data:y,setupState:x,ctx:I,inheritAttrs:R}=e;let $,_;const b=rn(e);try{if(n.shapeFlag&4){const P=r||s;$=Te(d.call(P,P,p,i,x,y,I)),_=c}else{const P=t;$=Te(P.length>1?P(i,{attrs:c,slots:l,emit:a}):P(i,null)),_=t.props?c:So(c)}}catch(P){Ot.length=0,$t(P,e,1),$=se(be)}let H=$;if(_&&R!==!1){const P=Object.keys(_),{shapeFlag:K}=H;P.length&&K&7&&(o&&P.some(Jn)&&(_=Mo(_,o)),H=qe(H,_))}return n.dirs&&(H=qe(H),H.dirs=H.dirs?H.dirs.concat(n.dirs):n.dirs),n.transition&&(H.transition=n.transition),$=H,rn(b),$}const So=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ht(n))&&((t||(t={}))[n]=e[n]);return t},Mo=(e,t)=>{const n={};for(const s in e)(!Jn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Lo(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,a=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Ss(s,o,a):!!o;if(c&8){const d=t.dynamicProps;for(let p=0;pe.__isSuspense;function Ur(e,t){t&&t.pendingBranch?N(e)?t.effects.push(...e):t.effects.push(e):Po(e)}function $o(e,t){return bn(e,null,t)}function $c(e,t){return bn(e,null,{flush:"post"})}const qt={};function Zt(e,t,n){return bn(e,t,n)}function bn(e,t,{immediate:n,deep:s,flush:r,onTrack:i,onTrigger:o}=te){var l;const c=ji()===((l=le)==null?void 0:l.scope)?le:null;let a,d=!1,p=!1;if(ce(e)?(a=()=>e.value,d=nn(e)):ut(e)?(a=()=>e,s=!0):N(e)?(p=!0,d=e.some(P=>ut(P)||nn(P)),a=()=>e.map(P=>{if(ce(P))return P.value;if(ut(P))return ct(P);if(B(P))return We(P,c,2)})):B(e)?t?a=()=>We(e,c,2):a=()=>{if(!(c&&c.isUnmounted))return y&&y(),we(e,c,3,[x])}:a=Pe,t&&s){const P=a;a=()=>ct(P())}let y,x=P=>{y=b.onStop=()=>{We(P,c,4)}},I;if(yt)if(x=Pe,t?n&&we(t,c,3,[a(),p?[]:void 0,x]):a(),r==="sync"){const P=Fl();I=P.__watcherHandles||(P.__watcherHandles=[])}else return Pe;let R=p?new Array(e.length).fill(qt):qt;const $=()=>{if(b.active)if(t){const P=b.run();(s||d||(p?P.some((K,J)=>Ft(K,R[J])):Ft(P,R)))&&(y&&y(),we(t,c,3,[P,R===qt?void 0:p&&R[0]===qt?[]:R,x]),R=P)}else b.run()};$.allowRecurse=!!t;let _;r==="sync"?_=$:r==="post"?_=()=>de($,c&&c.suspense):($.pre=!0,c&&($.id=c.uid),_=()=>gn($));const b=new ns(a,_);t?n?$():R=b.run():r==="post"?de(b.run.bind(b),c&&c.suspense):b.run();const H=()=>{b.stop(),c&&c.scope&&Xn(c.scope.effects,b)};return I&&I.push(H),H}function Uo(e,t,n){const s=this.proxy,r=re(e)?e.includes(".")?jr(s,e):()=>s[e]:e.bind(s,s);let i;B(t)?i=t:(i=t.handler,n=t);const o=le;bt(this);const l=bn(r,i.bind(s),n);return o?bt(o):st(),l}function jr(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r{ct(n,t)});else if(mr(e))for(const n in e)ct(e[n],t);return e}function Fe(e,t,n,s){const r=e.dirs,i=t&&t.dirs;for(let o=0;o{e.isMounted=!0}),Wr(()=>{e.isUnmounting=!0}),e}const ye=[Function,Array],Br={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ye,onEnter:ye,onAfterEnter:ye,onEnterCancelled:ye,onBeforeLeave:ye,onLeave:ye,onAfterLeave:ye,onLeaveCancelled:ye,onBeforeAppear:ye,onAppear:ye,onAfterAppear:ye,onAppearCancelled:ye},Bo={name:"BaseTransition",props:Br,setup(e,{slots:t}){const n=ci(),s=jo();let r;return()=>{const i=t.default&&Kr(t.default(),!0);if(!i||!i.length)return;let o=i[0];if(i.length>1){for(const R of i)if(R.type!==be){o=R;break}}const l=z(e),{mode:c}=l;if(s.isLeaving)return Rn(o);const a=Ms(o);if(!a)return Rn(o);const d=Bn(a,l,s,n);Dn(a,d);const p=n.subTree,y=p&&Ms(p);let x=!1;const{getTransitionKey:I}=a.type;if(I){const R=I();r===void 0?r=R:R!==r&&(r=R,x=!0)}if(y&&y.type!==be&&(!Ge(a,y)||x)){const R=Bn(y,l,s,n);if(Dn(y,R),c==="out-in")return s.isLeaving=!0,R.afterLeave=()=>{s.isLeaving=!1,n.update.active!==!1&&n.update()},Rn(o);c==="in-out"&&a.type!==be&&(R.delayLeave=($,_,b)=>{const H=Dr(s,y);H[String(y.key)]=y,$._leaveCb=()=>{_(),$._leaveCb=void 0,delete d.delayedLeave},d.delayedLeave=b})}return o}}},Do=Bo;function Dr(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Bn(e,t,n,s){const{appear:r,mode:i,persisted:o=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:a,onEnterCancelled:d,onBeforeLeave:p,onLeave:y,onAfterLeave:x,onLeaveCancelled:I,onBeforeAppear:R,onAppear:$,onAfterAppear:_,onAppearCancelled:b}=t,H=String(e.key),P=Dr(n,e),K=(A,D)=>{A&&we(A,s,9,D)},J=(A,D)=>{const j=D[1];K(A,D),N(A)?A.every(Y=>Y.length<=1)&&j():A.length<=1&&j()},V={mode:i,persisted:o,beforeEnter(A){let D=l;if(!n.isMounted)if(r)D=R||l;else return;A._leaveCb&&A._leaveCb(!0);const j=P[H];j&&Ge(e,j)&&j.el._leaveCb&&j.el._leaveCb(),K(D,[A])},enter(A){let D=c,j=a,Y=d;if(!n.isMounted)if(r)D=$||c,j=_||a,Y=b||d;else return;let O=!1;const k=A._enterCb=S=>{O||(O=!0,S?K(Y,[A]):K(j,[A]),V.delayedLeave&&V.delayedLeave(),A._enterCb=void 0)};D?J(D,[A,k]):k()},leave(A,D){const j=String(e.key);if(A._enterCb&&A._enterCb(!0),n.isUnmounting)return D();K(p,[A]);let Y=!1;const O=A._leaveCb=k=>{Y||(Y=!0,D(),k?K(I,[A]):K(x,[A]),A._leaveCb=void 0,P[j]===e&&delete P[j])};P[j]=e,y?J(y,[A,O]):O()},clone(A){return Bn(A,t,n,s)}};return V}function Rn(e){if(Ut(e))return e=qe(e),e.children=null,e}function Ms(e){return Ut(e)?e.children?e.children[0]:void 0:e}function Dn(e,t){e.shapeFlag&6&&e.component?Dn(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Kr(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;ioe({name:e.name},t,{setup:e}))():e}const pt=e=>!!e.type.__asyncLoader;function Uc(e){B(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,timeout:i,suspensible:o=!0,onError:l}=e;let c=null,a,d=0;const p=()=>(d++,c=null,y()),y=()=>{let x;return c||(x=c=t().catch(I=>{if(I=I instanceof Error?I:new Error(String(I)),l)return new Promise((R,$)=>{l(I,()=>R(p()),()=>$(I),d+1)});throw I}).then(I=>x!==c&&c?c:(I&&(I.__esModule||I[Symbol.toStringTag]==="Module")&&(I=I.default),a=I,I)))};return us({name:"AsyncComponentWrapper",__asyncLoader:y,get __asyncResolved(){return a},setup(){const x=le;if(a)return()=>Pn(a,x);const I=b=>{c=null,$t(b,x,13,!s)};if(o&&x.suspense||yt)return y().then(b=>()=>Pn(b,x)).catch(b=>(I(b),()=>s?se(s,{error:b}):null));const R=dt(!1),$=dt(),_=dt(!!r);return r&&setTimeout(()=>{_.value=!1},r),i!=null&&setTimeout(()=>{if(!R.value&&!$.value){const b=new Error(`Async component timed out after ${i}ms.`);I(b),$.value=b}},i),y().then(()=>{R.value=!0,x.parent&&Ut(x.parent.vnode)&&gn(x.parent.update)}).catch(b=>{I(b),$.value=b}),()=>{if(R.value&&a)return Pn(a,x);if($.value&&s)return se(s,{error:$.value});if(n&&!_.value)return se(n)}}})}function Pn(e,t){const{ref:n,props:s,children:r,ce:i}=t.vnode,o=se(e,s,r);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const Ut=e=>e.type.__isKeepAlive;function Ko(e,t){kr(e,"a",t)}function ko(e,t){kr(e,"da",t)}function kr(e,t,n=le){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(yn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Ut(r.parent.vnode)&&Wo(s,t,n,r),r=r.parent}}function Wo(e,t,n,s){const r=yn(t,e,s,!0);Cn(()=>{Xn(s[t],r)},n)}function yn(e,t,n=le,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;vt(),bt(n);const l=we(t,n,e,o);return st(),Ct(),l});return s?r.unshift(i):r.push(i),i}}const $e=e=>(t,n=le)=>(!yt||e==="sp")&&yn(e,(...s)=>t(...s),n),Vo=$e("bm"),vn=$e("m"),qo=$e("bu"),zo=$e("u"),Wr=$e("bum"),Cn=$e("um"),Yo=$e("sp"),Jo=$e("rtg"),Xo=$e("rtc");function Zo(e,t=le){yn("ec",e,t)}const ds="components";function jc(e,t){return qr(ds,e,!0,t)||e}const Vr=Symbol.for("v-ndc");function Bc(e){return re(e)?qr(ds,e,!1)||e:e||Vr}function qr(e,t,n=!0,s=!1){const r=ae||le;if(r){const i=r.type;if(e===ds){const l=Pl(i,!1);if(l&&(l===t||l===Me(t)||l===dn(Me(t))))return i}const o=Ls(r[e]||i[e],t)||Ls(r.appContext[e],t);return!o&&s?i:o}}function Ls(e,t){return e&&(e[t]||e[Me(t)]||e[dn(Me(t))])}function Dc(e,t,n,s){let r;const i=n&&n[s];if(N(e)||re(e)){r=new Array(e.length);for(let o=0,l=e.length;ot(o,l,void 0,i&&i[l]));else{const o=Object.keys(e);r=new Array(o.length);for(let l=0,c=o.length;lfn(t)?!(t.type===be||t.type===he&&!zr(t.children)):!0)?e:null}function kc(e,t){const n={};for(const s in e)n[t&&/[A-Z]/.test(s)?`on:${s}`:Xt(s)]=e[s];return n}const Kn=e=>e?fi(e)?_s(e)||e.proxy:Kn(e.parent):null,Pt=oe(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=>Kn(e.parent),$root:e=>Kn(e.root),$emit:e=>e.emit,$options:e=>hs(e),$forceUpdate:e=>e.f||(e.f=()=>gn(e.update)),$nextTick:e=>e.n||(e.n=Lr.bind(e.proxy)),$watch:e=>Uo.bind(e)}),In=(e,t)=>e!==te&&!e.__isScriptSetup&&q(e,t),Qo={get({_:e},t){const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;let a;if(t[0]!=="$"){const x=o[t];if(x!==void 0)switch(x){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(In(s,t))return o[t]=1,s[t];if(r!==te&&q(r,t))return o[t]=2,r[t];if((a=e.propsOptions[0])&&q(a,t))return o[t]=3,i[t];if(n!==te&&q(n,t))return o[t]=4,n[t];kn&&(o[t]=0)}}const d=Pt[t];let p,y;if(d)return t==="$attrs"&&pe(e,"get",t),d(e);if((p=l.__cssModules)&&(p=p[t]))return p;if(n!==te&&q(n,t))return o[t]=4,n[t];if(y=c.config.globalProperties,q(y,t))return y[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return In(r,t)?(r[t]=n,!0):s!==te&&q(s,t)?(s[t]=n,!0):q(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let l;return!!n[o]||e!==te&&q(e,o)||In(t,o)||(l=i[0])&&q(l,o)||q(s,o)||q(Pt,o)||q(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:q(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Wc(){return Go().slots}function Go(){const e=ci();return e.setupContext||(e.setupContext=ui(e))}function Ns(e){return N(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let kn=!0;function el(e){const t=hs(e),n=e.proxy,s=e.ctx;kn=!1,t.beforeCreate&&Hs(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:a,created:d,beforeMount:p,mounted:y,beforeUpdate:x,updated:I,activated:R,deactivated:$,beforeDestroy:_,beforeUnmount:b,destroyed:H,unmounted:P,render:K,renderTracked:J,renderTriggered:V,errorCaptured:A,serverPrefetch:D,expose:j,inheritAttrs:Y,components:O,directives:k,filters:S}=t;if(a&&tl(a,s,null),o)for(const ne in o){const Q=o[ne];B(Q)&&(s[ne]=Q.bind(n))}if(r){const ne=r.call(n,n);ee(ne)&&(e.data=pn(ne))}if(kn=!0,i)for(const ne in i){const Q=i[ne],ze=B(Q)?Q.bind(n,n):B(Q.get)?Q.get.bind(n,n):Pe,jt=!B(Q)&&B(Q.set)?Q.set.bind(n):Pe,Ye=Ee({get:ze,set:jt});Object.defineProperty(s,ne,{enumerable:!0,configurable:!0,get:()=>Ye.value,set:Ie=>Ye.value=Ie})}if(l)for(const ne in l)Yr(l[ne],s,n,ne);if(c){const ne=B(c)?c.call(n):c;Reflect.ownKeys(ne).forEach(Q=>{ll(Q,ne[Q])})}d&&Hs(d,e,"c");function X(ne,Q){N(Q)?Q.forEach(ze=>ne(ze.bind(n))):Q&&ne(Q.bind(n))}if(X(Vo,p),X(vn,y),X(qo,x),X(zo,I),X(Ko,R),X(ko,$),X(Zo,A),X(Xo,J),X(Jo,V),X(Wr,b),X(Cn,P),X(Yo,D),N(j))if(j.length){const ne=e.exposed||(e.exposed={});j.forEach(Q=>{Object.defineProperty(ne,Q,{get:()=>n[Q],set:ze=>n[Q]=ze})})}else e.exposed||(e.exposed={});K&&e.render===Pe&&(e.render=K),Y!=null&&(e.inheritAttrs=Y),O&&(e.components=O),k&&(e.directives=k)}function tl(e,t,n=Pe){N(e)&&(e=Wn(e));for(const s in e){const r=e[s];let i;ee(r)?"default"in r?i=gt(r.from||s,r.default,!0):i=gt(r.from||s):i=gt(r),ce(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function Hs(e,t,n){we(N(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Yr(e,t,n,s){const r=s.includes(".")?jr(n,s):()=>n[s];if(re(e)){const i=t[e];B(i)&&Zt(r,i)}else if(B(e))Zt(r,e.bind(n));else if(ee(e))if(N(e))e.forEach(i=>Yr(i,t,n,s));else{const i=B(e.handler)?e.handler.bind(n):t[e.handler];B(i)&&Zt(r,i,e)}}function hs(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(a=>on(c,a,o,!0)),on(c,t,o)),ee(t)&&i.set(t,c),c}function on(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&on(e,i,n,!0),r&&r.forEach(o=>on(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=nl[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const nl={data:$s,props:Us,emits:Us,methods:Tt,computed:Tt,beforeCreate:ue,created:ue,beforeMount:ue,mounted:ue,beforeUpdate:ue,updated:ue,beforeDestroy:ue,beforeUnmount:ue,destroyed:ue,unmounted:ue,activated:ue,deactivated:ue,errorCaptured:ue,serverPrefetch:ue,components:Tt,directives:Tt,watch:rl,provide:$s,inject:sl};function $s(e,t){return t?e?function(){return oe(B(e)?e.call(this,this):e,B(t)?t.call(this,this):t)}:t:e}function sl(e,t){return Tt(Wn(e),Wn(t))}function Wn(e){if(N(e)){const t={};for(let n=0;n1)return n&&B(t)?t.call(s&&s.proxy):t}}function cl(e,t,n,s=!1){const r={},i={};en(i,wn,1),e.propsDefaults=Object.create(null),Xr(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:po(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function fl(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=z(r),[c]=e.propsOptions;let a=!1;if((s||o>0)&&!(o&16)){if(o&8){const d=e.vnode.dynamicProps;for(let p=0;p{c=!0;const[y,x]=Zr(p,t,!0);oe(o,y),x&&l.push(...x)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!c)return ee(e)&&s.set(e,ft),ft;if(N(i))for(let d=0;d-1,x[1]=R<0||I-1||q(x,"default"))&&l.push(p)}}}const a=[o,l];return ee(e)&&s.set(e,a),a}function js(e){return e[0]!=="$"}function Bs(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Ds(e,t){return Bs(e)===Bs(t)}function Ks(e,t){return N(t)?t.findIndex(n=>Ds(n,e)):B(t)&&Ds(t,e)?0:-1}const Qr=e=>e[0]==="_"||e==="$stable",ps=e=>N(e)?e.map(Te):[Te(e)],al=(e,t,n)=>{if(t._n)return t;const s=Fo((...r)=>ps(t(...r)),n);return s._c=!1,s},Gr=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Qr(r))continue;const i=e[r];if(B(i))t[r]=al(r,i,s);else if(i!=null){const o=ps(i);t[r]=()=>o}}},ei=(e,t)=>{const n=ps(t);e.slots.default=()=>n},ul=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=z(t),en(t,"_",n)):Gr(t,e.slots={})}else e.slots={},t&&ei(e,t);en(e.slots,wn,1)},dl=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=te;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:(oe(r,t),!n&&l===1&&delete r._):(i=!t.$stable,Gr(t,r)),o=t}else t&&(ei(e,t),o={default:1});if(i)for(const l in r)!Qr(l)&&!(l in o)&&delete r[l]};function cn(e,t,n,s,r=!1){if(N(e)){e.forEach((y,x)=>cn(y,t&&(N(t)?t[x]:t),n,s,r));return}if(pt(s)&&!r)return;const i=s.shapeFlag&4?_s(s.component)||s.component.proxy:s.el,o=r?null:i,{i:l,r:c}=e,a=t&&t.r,d=l.refs===te?l.refs={}:l.refs,p=l.setupState;if(a!=null&&a!==c&&(re(a)?(d[a]=null,q(p,a)&&(p[a]=null)):ce(a)&&(a.value=null)),B(c))We(c,l,12,[o,d]);else{const y=re(c),x=ce(c);if(y||x){const I=()=>{if(e.f){const R=y?q(p,c)?p[c]:d[c]:c.value;r?N(R)&&Xn(R,i):N(R)?R.includes(i)||R.push(i):y?(d[c]=[i],q(p,c)&&(p[c]=d[c])):(c.value=[i],e.k&&(d[e.k]=c.value))}else y?(d[c]=o,q(p,c)&&(p[c]=o)):x&&(c.value=o,e.k&&(d[e.k]=o))};o?(I.id=-1,de(I,n)):I()}}}let je=!1;const zt=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",Yt=e=>e.nodeType===8;function hl(e){const{mt:t,p:n,o:{patchProp:s,createText:r,nextSibling:i,parentNode:o,remove:l,insert:c,createComment:a}}=e,d=(_,b)=>{if(!b.hasChildNodes()){n(null,_,b),sn(),b._vnode=_;return}je=!1,p(b.firstChild,_,null,null,null),sn(),b._vnode=_,je&&console.error("Hydration completed but contains mismatches.")},p=(_,b,H,P,K,J=!1)=>{const V=Yt(_)&&_.data==="[",A=()=>R(_,b,H,P,K,V),{type:D,ref:j,shapeFlag:Y,patchFlag:O}=b;let k=_.nodeType;b.el=_,O===-2&&(J=!1,b.dynamicChildren=null);let S=null;switch(D){case _t:k!==3?b.children===""?(c(b.el=r(""),o(_),_),S=_):S=A():(_.data!==b.children&&(je=!0,_.data=b.children),S=i(_));break;case be:k!==8||V?S=A():S=i(_);break;case It:if(V&&(_=i(_),k=_.nodeType),k===1||k===3){S=_;const ge=!b.children.length;for(let X=0;X{J=J||!!b.dynamicChildren;const{type:V,props:A,patchFlag:D,shapeFlag:j,dirs:Y}=b,O=V==="input"&&Y||V==="option";if(O||D!==-1){if(Y&&Fe(b,null,H,"created"),A)if(O||!J||D&48)for(const S in A)(O&&S.endsWith("value")||Ht(S)&&!At(S))&&s(_,S,null,A[S],!1,void 0,H);else A.onClick&&s(_,"onClick",null,A.onClick,!1,void 0,H);let k;if((k=A&&A.onVnodeBeforeMount)&&ve(k,H,b),Y&&Fe(b,null,H,"beforeMount"),((k=A&&A.onVnodeMounted)||Y)&&Ur(()=>{k&&ve(k,H,b),Y&&Fe(b,null,H,"mounted")},P),j&16&&!(A&&(A.innerHTML||A.textContent))){let S=x(_.firstChild,b,_,H,P,K,J);for(;S;){je=!0;const ge=S;S=S.nextSibling,l(ge)}}else j&8&&_.textContent!==b.children&&(je=!0,_.textContent=b.children)}return _.nextSibling},x=(_,b,H,P,K,J,V)=>{V=V||!!b.dynamicChildren;const A=b.children,D=A.length;for(let j=0;j{const{slotScopeIds:V}=b;V&&(K=K?K.concat(V):V);const A=o(_),D=x(i(_),b,A,H,P,K,J);return D&&Yt(D)&&D.data==="]"?i(b.anchor=D):(je=!0,c(b.anchor=a("]"),A,D),D)},R=(_,b,H,P,K,J)=>{if(je=!0,b.el=null,J){const D=$(_);for(;;){const j=i(_);if(j&&j!==D)l(j);else break}}const V=i(_),A=o(_);return l(_),n(null,b,A,V,H,P,zt(A),K),V},$=_=>{let b=0;for(;_;)if(_=i(_),_&&Yt(_)&&(_.data==="["&&b++,_.data==="]")){if(b===0)return i(_);b--}return _};return[d,p]}const de=Ur;function pl(e){return gl(e,hl)}function gl(e,t){const n=Nn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:a,setElementText:d,parentNode:p,nextSibling:y,setScopeId:x=Pe,insertStaticContent:I}=e,R=(f,u,h,m=null,g=null,w=null,T=!1,C=null,E=!!u.dynamicChildren)=>{if(f===u)return;f&&!Ge(f,u)&&(m=Bt(f),Ie(f,g,w,!0),f=null),u.patchFlag===-2&&(E=!1,u.dynamicChildren=null);const{type:v,ref:M,shapeFlag:F}=u;switch(v){case _t:$(f,u,h,m);break;case be:_(f,u,h,m);break;case It:f==null&&b(u,h,m,T);break;case he:O(f,u,h,m,g,w,T,C,E);break;default:F&1?K(f,u,h,m,g,w,T,C,E):F&6?k(f,u,h,m,g,w,T,C,E):(F&64||F&128)&&v.process(f,u,h,m,g,w,T,C,E,it)}M!=null&&g&&cn(M,f&&f.ref,w,u||f,!u)},$=(f,u,h,m)=>{if(f==null)s(u.el=l(u.children),h,m);else{const g=u.el=f.el;u.children!==f.children&&a(g,u.children)}},_=(f,u,h,m)=>{f==null?s(u.el=c(u.children||""),h,m):u.el=f.el},b=(f,u,h,m)=>{[f.el,f.anchor]=I(f.children,u,h,m,f.el,f.anchor)},H=({el:f,anchor:u},h,m)=>{let g;for(;f&&f!==u;)g=y(f),s(f,h,m),f=g;s(u,h,m)},P=({el:f,anchor:u})=>{let h;for(;f&&f!==u;)h=y(f),r(f),f=h;r(u)},K=(f,u,h,m,g,w,T,C,E)=>{T=T||u.type==="svg",f==null?J(u,h,m,g,w,T,C,E):D(f,u,g,w,T,C,E)},J=(f,u,h,m,g,w,T,C)=>{let E,v;const{type:M,props:F,shapeFlag:L,transition:U,dirs:W}=f;if(E=f.el=o(f.type,w,F&&F.is,F),L&8?d(E,f.children):L&16&&A(f.children,E,null,m,g,w&&M!=="foreignObject",T,C),W&&Fe(f,null,m,"created"),V(E,f,f.scopeId,T,m),F){for(const Z in F)Z!=="value"&&!At(Z)&&i(E,Z,null,F[Z],w,f.children,m,g,Le);"value"in F&&i(E,"value",null,F.value),(v=F.onVnodeBeforeMount)&&ve(v,m,f)}W&&Fe(f,null,m,"beforeMount");const G=(!g||g&&!g.pendingBranch)&&U&&!U.persisted;G&&U.beforeEnter(E),s(E,u,h),((v=F&&F.onVnodeMounted)||G||W)&&de(()=>{v&&ve(v,m,f),G&&U.enter(E),W&&Fe(f,null,m,"mounted")},g)},V=(f,u,h,m,g)=>{if(h&&x(f,h),m)for(let w=0;w{for(let v=E;v{const C=u.el=f.el;let{patchFlag:E,dynamicChildren:v,dirs:M}=u;E|=f.patchFlag&16;const F=f.props||te,L=u.props||te;let U;h&&Je(h,!1),(U=L.onVnodeBeforeUpdate)&&ve(U,h,u,f),M&&Fe(u,f,h,"beforeUpdate"),h&&Je(h,!0);const W=g&&u.type!=="foreignObject";if(v?j(f.dynamicChildren,v,C,h,m,W,w):T||Q(f,u,C,null,h,m,W,w,!1),E>0){if(E&16)Y(C,u,F,L,h,m,g);else if(E&2&&F.class!==L.class&&i(C,"class",null,L.class,g),E&4&&i(C,"style",F.style,L.style,g),E&8){const G=u.dynamicProps;for(let Z=0;Z{U&&ve(U,h,u,f),M&&Fe(u,f,h,"updated")},m)},j=(f,u,h,m,g,w,T)=>{for(let C=0;C{if(h!==m){if(h!==te)for(const C in h)!At(C)&&!(C in m)&&i(f,C,h[C],null,T,u.children,g,w,Le);for(const C in m){if(At(C))continue;const E=m[C],v=h[C];E!==v&&C!=="value"&&i(f,C,v,E,T,u.children,g,w,Le)}"value"in m&&i(f,"value",h.value,m.value)}},O=(f,u,h,m,g,w,T,C,E)=>{const v=u.el=f?f.el:l(""),M=u.anchor=f?f.anchor:l("");let{patchFlag:F,dynamicChildren:L,slotScopeIds:U}=u;U&&(C=C?C.concat(U):U),f==null?(s(v,h,m),s(M,h,m),A(u.children,h,M,g,w,T,C,E)):F>0&&F&64&&L&&f.dynamicChildren?(j(f.dynamicChildren,L,h,g,w,T,C),(u.key!=null||g&&u===g.subTree)&&ti(f,u,!0)):Q(f,u,h,M,g,w,T,C,E)},k=(f,u,h,m,g,w,T,C,E)=>{u.slotScopeIds=C,f==null?u.shapeFlag&512?g.ctx.activate(u,h,m,T,E):S(u,h,m,g,w,T,E):ge(f,u,E)},S=(f,u,h,m,g,w,T)=>{const C=f.component=El(f,m,g);if(Ut(f)&&(C.ctx.renderer=it),Tl(C),C.asyncDep){if(g&&g.registerDep(C,X),!f.el){const E=C.subTree=se(be);_(null,E,u,h)}return}X(C,f,u,h,g,w,T)},ge=(f,u,h)=>{const m=u.component=f.component;if(Lo(f,u,h))if(m.asyncDep&&!m.asyncResolved){ne(m,u,h);return}else m.next=u,Ro(m.update),m.update();else u.el=f.el,m.vnode=u},X=(f,u,h,m,g,w,T)=>{const C=()=>{if(f.isMounted){let{next:M,bu:F,u:L,parent:U,vnode:W}=f,G=M,Z;Je(f,!1),M?(M.el=W.el,ne(f,M,T)):M=W,F&&Tn(F),(Z=M.props&&M.props.onVnodeBeforeUpdate)&&ve(Z,U,M,W),Je(f,!0);const ie=An(f),xe=f.subTree;f.subTree=ie,R(xe,ie,p(xe.el),Bt(xe),f,g,w),M.el=ie.el,G===null&&No(f,ie.el),L&&de(L,g),(Z=M.props&&M.props.onVnodeUpdated)&&de(()=>ve(Z,U,M,W),g)}else{let M;const{el:F,props:L}=u,{bm:U,m:W,parent:G}=f,Z=pt(u);if(Je(f,!1),U&&Tn(U),!Z&&(M=L&&L.onVnodeBeforeMount)&&ve(M,G,u),Je(f,!0),F&&En){const ie=()=>{f.subTree=An(f),En(F,f.subTree,f,g,null)};Z?u.type.__asyncLoader().then(()=>!f.isUnmounted&&ie()):ie()}else{const ie=f.subTree=An(f);R(null,ie,h,m,f,g,w),u.el=ie.el}if(W&&de(W,g),!Z&&(M=L&&L.onVnodeMounted)){const ie=u;de(()=>ve(M,G,ie),g)}(u.shapeFlag&256||G&&pt(G.vnode)&&G.vnode.shapeFlag&256)&&f.a&&de(f.a,g),f.isMounted=!0,u=h=m=null}},E=f.effect=new ns(C,()=>gn(v),f.scope),v=f.update=()=>E.run();v.id=f.uid,Je(f,!0),v()},ne=(f,u,h)=>{u.component=f;const m=f.vnode.props;f.vnode=u,f.next=null,fl(f,u.props,m,h),dl(f,u.children,h),vt(),Fs(),Ct()},Q=(f,u,h,m,g,w,T,C,E=!1)=>{const v=f&&f.children,M=f?f.shapeFlag:0,F=u.children,{patchFlag:L,shapeFlag:U}=u;if(L>0){if(L&128){jt(v,F,h,m,g,w,T,C,E);return}else if(L&256){ze(v,F,h,m,g,w,T,C,E);return}}U&8?(M&16&&Le(v,g,w),F!==v&&d(h,F)):M&16?U&16?jt(v,F,h,m,g,w,T,C,E):Le(v,g,w,!0):(M&8&&d(h,""),U&16&&A(F,h,m,g,w,T,C,E))},ze=(f,u,h,m,g,w,T,C,E)=>{f=f||ft,u=u||ft;const v=f.length,M=u.length,F=Math.min(v,M);let L;for(L=0;LM?Le(f,g,w,!0,!1,F):A(u,h,m,g,w,T,C,E,F)},jt=(f,u,h,m,g,w,T,C,E)=>{let v=0;const M=u.length;let F=f.length-1,L=M-1;for(;v<=F&&v<=L;){const U=f[v],W=u[v]=E?Ke(u[v]):Te(u[v]);if(Ge(U,W))R(U,W,h,null,g,w,T,C,E);else break;v++}for(;v<=F&&v<=L;){const U=f[F],W=u[L]=E?Ke(u[L]):Te(u[L]);if(Ge(U,W))R(U,W,h,null,g,w,T,C,E);else break;F--,L--}if(v>F){if(v<=L){const U=L+1,W=UL)for(;v<=F;)Ie(f[v],g,w,!0),v++;else{const U=v,W=v,G=new Map;for(v=W;v<=L;v++){const me=u[v]=E?Ke(u[v]):Te(u[v]);me.key!=null&&G.set(me.key,v)}let Z,ie=0;const xe=L-W+1;let ot=!1,vs=0;const wt=new Array(xe);for(v=0;v=xe){Ie(me,g,w,!0);continue}let Oe;if(me.key!=null)Oe=G.get(me.key);else for(Z=W;Z<=L;Z++)if(wt[Z-W]===0&&Ge(me,u[Z])){Oe=Z;break}Oe===void 0?Ie(me,g,w,!0):(wt[Oe-W]=v+1,Oe>=vs?vs=Oe:ot=!0,R(me,u[Oe],h,null,g,w,T,C,E),ie++)}const Cs=ot?ml(wt):ft;for(Z=Cs.length-1,v=xe-1;v>=0;v--){const me=W+v,Oe=u[me],ws=me+1{const{el:w,type:T,transition:C,children:E,shapeFlag:v}=f;if(v&6){Ye(f.component.subTree,u,h,m);return}if(v&128){f.suspense.move(u,h,m);return}if(v&64){T.move(f,u,h,it);return}if(T===he){s(w,u,h);for(let F=0;FC.enter(w),g);else{const{leave:F,delayLeave:L,afterLeave:U}=C,W=()=>s(w,u,h),G=()=>{F(w,()=>{W(),U&&U()})};L?L(w,W,G):G()}else s(w,u,h)},Ie=(f,u,h,m=!1,g=!1)=>{const{type:w,props:T,ref:C,children:E,dynamicChildren:v,shapeFlag:M,patchFlag:F,dirs:L}=f;if(C!=null&&cn(C,null,h,f,!0),M&256){u.ctx.deactivate(f);return}const U=M&1&&L,W=!pt(f);let G;if(W&&(G=T&&T.onVnodeBeforeUnmount)&&ve(G,u,f),M&6)wi(f.component,h,m);else{if(M&128){f.suspense.unmount(h,m);return}U&&Fe(f,null,u,"beforeUnmount"),M&64?f.type.remove(f,u,h,g,it,m):v&&(w!==he||F>0&&F&64)?Le(v,u,h,!1,!0):(w===he&&F&384||!g&&M&16)&&Le(E,u,h),m&&bs(f)}(W&&(G=T&&T.onVnodeUnmounted)||U)&&de(()=>{G&&ve(G,u,f),U&&Fe(f,null,u,"unmounted")},h)},bs=f=>{const{type:u,el:h,anchor:m,transition:g}=f;if(u===he){Ci(h,m);return}if(u===It){P(f);return}const w=()=>{r(h),g&&!g.persisted&&g.afterLeave&&g.afterLeave()};if(f.shapeFlag&1&&g&&!g.persisted){const{leave:T,delayLeave:C}=g,E=()=>T(h,w);C?C(f.el,w,E):E()}else w()},Ci=(f,u)=>{let h;for(;f!==u;)h=y(f),r(f),f=h;r(u)},wi=(f,u,h)=>{const{bum:m,scope:g,update:w,subTree:T,um:C}=f;m&&Tn(m),g.stop(),w&&(w.active=!1,Ie(T,f,u,h)),C&&de(C,u),de(()=>{f.isUnmounted=!0},u),u&&u.pendingBranch&&!u.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===u.pendingId&&(u.deps--,u.deps===0&&u.resolve())},Le=(f,u,h,m=!1,g=!1,w=0)=>{for(let T=w;Tf.shapeFlag&6?Bt(f.component.subTree):f.shapeFlag&128?f.suspense.next():y(f.anchor||f.el),ys=(f,u,h)=>{f==null?u._vnode&&Ie(u._vnode,null,null,!0):R(u._vnode||null,f,u,null,null,null,h),Fs(),sn(),u._vnode=f},it={p:R,um:Ie,m:Ye,r:bs,mt:S,mc:A,pc:Q,pbc:j,n:Bt,o:e};let xn,En;return t&&([xn,En]=t(it)),{render:ys,hydrate:xn,createApp:ol(ys,xn)}}function Je({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function ti(e,t,n=!1){const s=e.children,r=t.children;if(N(s)&&N(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}const _l=e=>e.__isTeleport,he=Symbol.for("v-fgt"),_t=Symbol.for("v-txt"),be=Symbol.for("v-cmt"),It=Symbol.for("v-stc"),Ot=[];let Re=null;function ni(e=!1){Ot.push(Re=e?null:[])}function bl(){Ot.pop(),Re=Ot[Ot.length-1]||null}let Nt=1;function ks(e){Nt+=e}function si(e){return e.dynamicChildren=Nt>0?Re||ft:null,bl(),Nt>0&&Re&&Re.push(e),e}function Vc(e,t,n,s,r,i){return si(oi(e,t,n,s,r,i,!0))}function ri(e,t,n,s,r){return si(se(e,t,n,s,r,!0))}function fn(e){return e?e.__v_isVNode===!0:!1}function Ge(e,t){return e.type===t.type&&e.key===t.key}const wn="__vInternal",ii=({key:e})=>e??null,Qt=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?re(e)||ce(e)||B(e)?{i:ae,r:e,k:t,f:!!n}:e:null);function oi(e,t=null,n=null,s=0,r=null,i=e===he?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ii(t),ref:t&&Qt(t),scopeId:_n,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:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:ae};return l?(gs(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=re(n)?8:16),Nt>0&&!o&&Re&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Re.push(c),c}const se=yl;function yl(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Vr)&&(e=be),fn(e)){const l=qe(e,t,!0);return n&&gs(l,n),Nt>0&&!i&&Re&&(l.shapeFlag&6?Re[Re.indexOf(e)]=l:Re.push(l)),l.patchFlag|=-2,l}if(Il(e)&&(e=e.__vccOpts),t){t=vl(t);let{class:l,style:c}=t;l&&!re(l)&&(t.class=es(l)),ee(c)&&(Or(c)&&!N(c)&&(c=oe({},c)),t.style=Gn(c))}const o=re(e)?1:Ho(e)?128:_l(e)?64:ee(e)?4:B(e)?2:0;return oi(e,t,n,s,r,o,i,!0)}function vl(e){return e?Or(e)||wn in e?oe({},e):e:null}function qe(e,t,n=!1){const{props:s,ref:r,patchFlag:i,children:o}=e,l=t?Cl(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&ii(l),ref:t&&t.ref?n&&r?N(r)?r.concat(Qt(t)):[r,Qt(t)]:Qt(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==he?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&qe(e.ssContent),ssFallback:e.ssFallback&&qe(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function li(e=" ",t=0){return se(_t,null,e,t)}function qc(e,t){const n=se(It,null,e);return n.staticCount=t,n}function zc(e="",t=!1){return t?(ni(),ri(be,null,e)):se(be,null,e)}function Te(e){return e==null||typeof e=="boolean"?se(be):N(e)?se(he,null,e.slice()):typeof e=="object"?Ke(e):se(_t,null,String(e))}function Ke(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:qe(e)}function gs(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(N(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),gs(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(wn in t)?t._ctx=ae:r===3&&ae&&(ae.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else B(t)?(t={default:t,_ctx:ae},n=32):(t=String(t),s&64?(n=16,t=[li(t)]):n=8);e.children=t,e.shapeFlag|=n}function Cl(...e){const t={};for(let n=0;nle||ae;let ms,lt,Ws="__VUE_INSTANCE_SETTERS__";(lt=Nn()[Ws])||(lt=Nn()[Ws]=[]),lt.push(e=>le=e),ms=e=>{lt.length>1?lt.forEach(t=>t(e)):lt[0](e)};const bt=e=>{ms(e),e.scope.on()},st=()=>{le&&le.scope.off(),ms(null)};function fi(e){return e.vnode.shapeFlag&4}let yt=!1;function Tl(e,t=!1){yt=t;const{props:n,children:s}=e.vnode,r=fi(e);cl(e,n,r,t),ul(e,s);const i=r?Al(e,t):void 0;return yt=!1,i}function Al(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Rt(new Proxy(e.ctx,Qo));const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?ui(e):null;bt(e),vt();const i=We(s,e,0,[e.props,r]);if(Ct(),st(),pr(i)){if(i.then(st,st),t)return i.then(o=>{Vs(e,o,t)}).catch(o=>{$t(o,e,0)});e.asyncDep=i}else Vs(e,i,t)}else ai(e,t)}function Vs(e,t,n){B(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ee(t)&&(e.setupState=Sr(t)),ai(e,n)}let qs;function ai(e,t,n){const s=e.type;if(!e.render){if(!t&&qs&&!s.render){const r=s.template||hs(e).template;if(r){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,a=oe(oe({isCustomElement:i,delimiters:l},o),c);s.render=qs(r,a)}}e.render=s.render||Pe}bt(e),vt(),el(e),Ct(),st()}function Rl(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return pe(e,"get","$attrs"),t[n]}}))}function ui(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return Rl(e)},slots:e.slots,emit:e.emit,expose:t}}function _s(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Sr(Rt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Pt)return Pt[n](e)},has(t,n){return n in t||n in Pt}}))}function Pl(e,t=!0){return B(e)?e.displayName||e.name:e.name||t&&e.__name}function Il(e){return B(e)&&"__vccOpts"in e}const Ee=(e,t)=>Eo(e,t,yt);function qn(e,t,n){const s=arguments.length;return s===2?ee(t)&&!N(t)?fn(t)?se(e,null,[t]):se(e,t):se(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&fn(n)&&(n=[n]),se(e,t,n))}const Ol=Symbol.for("v-scx"),Fl=()=>gt(Ol),Sl="3.3.4",Ml="http://www.w3.org/2000/svg",et=typeof document<"u"?document:null,zs=et&&et.createElement("template"),Ll={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t?et.createElementNS(Ml,e):et.createElement(e,n?{is:n}:void 0);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>et.createTextNode(e),createComment:e=>et.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>et.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{zs.innerHTML=s?`${e}`:e;const l=zs.content;if(s){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Nl(e,t,n){const s=e._vtc;s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Hl(e,t,n){const s=e.style,r=re(n);if(n&&!r){if(t&&!re(t))for(const i in t)n[i]==null&&zn(s,i,"");for(const i in n)zn(s,i,n[i])}else{const i=s.display;r?t!==n&&(s.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(s.display=i)}}const Ys=/\s*!important$/;function zn(e,t,n){if(N(n))n.forEach(s=>zn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=$l(e,t);Ys.test(n)?e.setProperty(rt(s),n.replace(Ys,""),"important"):e[s]=n}}const Js=["Webkit","Moz","ms"],On={};function $l(e,t){const n=On[t];if(n)return n;let s=Me(t);if(s!=="filter"&&s in e)return On[t]=s;s=dn(s);for(let r=0;rFn||(Wl.then(()=>Fn=0),Fn=Date.now());function ql(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;we(zl(s,n.value),t,5,[s])};return n.value=e,n.attached=Vl(),n}function zl(e,t){if(N(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Qs=/^on[a-z]/,Yl=(e,t,n,s,r=!1,i,o,l,c)=>{t==="class"?Nl(e,s,r):t==="style"?Hl(e,n,s):Ht(t)?Jn(t)||Kl(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Jl(e,t,s,r))?jl(e,t,s,i,o,l,c):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Ul(e,t,s,r))};function Jl(e,t,n,s){return s?!!(t==="innerHTML"||t==="textContent"||t in e&&Qs.test(t)&&B(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Qs.test(t)&&re(n)?!1:t in e}const Be="transition",xt="animation",di=(e,{slots:t})=>qn(Do,Xl(e),t);di.displayName="Transition";const hi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};di.props=oe({},Br,hi);const Xe=(e,t=[])=>{N(e)?e.forEach(n=>n(...t)):e&&e(...t)},Gs=e=>e?N(e)?e.some(t=>t.length>1):e.length>1:!1;function Xl(e){const t={};for(const O in e)O in hi||(t[O]=e[O]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:a=o,appearToClass:d=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:y=`${n}-leave-active`,leaveToClass:x=`${n}-leave-to`}=e,I=Zl(r),R=I&&I[0],$=I&&I[1],{onBeforeEnter:_,onEnter:b,onEnterCancelled:H,onLeave:P,onLeaveCancelled:K,onBeforeAppear:J=_,onAppear:V=b,onAppearCancelled:A=H}=t,D=(O,k,S)=>{Ze(O,k?d:l),Ze(O,k?a:o),S&&S()},j=(O,k)=>{O._isLeaving=!1,Ze(O,p),Ze(O,x),Ze(O,y),k&&k()},Y=O=>(k,S)=>{const ge=O?V:b,X=()=>D(k,O,S);Xe(ge,[k,X]),er(()=>{Ze(k,O?c:i),De(k,O?d:l),Gs(ge)||tr(k,s,R,X)})};return oe(t,{onBeforeEnter(O){Xe(_,[O]),De(O,i),De(O,o)},onBeforeAppear(O){Xe(J,[O]),De(O,c),De(O,a)},onEnter:Y(!1),onAppear:Y(!0),onLeave(O,k){O._isLeaving=!0;const S=()=>j(O,k);De(O,p),ec(),De(O,y),er(()=>{O._isLeaving&&(Ze(O,p),De(O,x),Gs(P)||tr(O,s,$,S))}),Xe(P,[O,S])},onEnterCancelled(O){D(O,!1),Xe(H,[O])},onAppearCancelled(O){D(O,!0),Xe(A,[O])},onLeaveCancelled(O){j(O),Xe(K,[O])}})}function Zl(e){if(e==null)return null;if(ee(e))return[Sn(e.enter),Sn(e.leave)];{const t=Sn(e);return[t,t]}}function Sn(e){return Oi(e)}function De(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function Ze(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function er(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Ql=0;function tr(e,t,n,s){const r=e._endId=++Ql,i=()=>{r===e._endId&&s()};if(n)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=Gl(e,t);if(!o)return s();const a=o+"end";let d=0;const p=()=>{e.removeEventListener(a,y),i()},y=x=>{x.target===e&&++d>=c&&p()};setTimeout(()=>{d(n[I]||"").split(", "),r=s(`${Be}Delay`),i=s(`${Be}Duration`),o=nr(r,i),l=s(`${xt}Delay`),c=s(`${xt}Duration`),a=nr(l,c);let d=null,p=0,y=0;t===Be?o>0&&(d=Be,p=o,y=i.length):t===xt?a>0&&(d=xt,p=a,y=c.length):(p=Math.max(o,a),d=p>0?o>a?Be:xt:null,y=d?d===Be?i.length:c.length:0);const x=d===Be&&/\b(transform|all)(,|$)/.test(s(`${Be}Property`).toString());return{type:d,timeout:p,propCount:y,hasTransform:x}}function nr(e,t){for(;e.lengthsr(n)+sr(e[s])))}function sr(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function ec(){return document.body.offsetHeight}const tc=["ctrl","shift","alt","meta"],nc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>tc.some(n=>e[`${n}Key`]&&!t.includes(n))},Yc=(e,t)=>(n,...s)=>{for(let r=0;rn=>{if(!("key"in n))return;const s=rt(n.key);if(t.some(r=>r===s||sc[r]===s))return e(n)},rc=oe({patchProp:Yl},Ll);let Mn,rr=!1;function ic(){return Mn=rr?Mn:pl(rc),rr=!0,Mn}const Xc=(...e)=>{const t=ic().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=oc(s);if(r)return n(r,!0,r instanceof SVGElement)},t};function oc(e){return re(e)?document.querySelector(e):e}const Zc=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},lc="modulepreload",cc=function(e){return"/"+e},ir={},Qc=function(t,n,s){if(!n||n.length===0)return t();const r=document.getElementsByTagName("link");return Promise.all(n.map(i=>{if(i=cc(i),i in ir)return;ir[i]=!0;const o=i.endsWith(".css"),l=o?'[rel="stylesheet"]':"";if(!!s)for(let d=r.length-1;d>=0;d--){const p=r[d];if(p.href===i&&(!o||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${l}`))return;const a=document.createElement("link");if(a.rel=o?"stylesheet":lc,o||(a.as="script",a.crossOrigin=""),a.href=i,document.head.appendChild(a),o)return new Promise((d,p)=>{a.addEventListener("load",d),a.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())},fc=window.__VP_SITE_DATA__,pi=/^[a-z]+:/i,Gc=/^pathname:\/\//,ef="vitepress-theme-appearance",gi=/#.*$/,ac=/(index)?\.(md|html)$/,Ce=typeof document<"u",mi={relativePath:"",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function uc(e,t,n=!1){if(t===void 0)return!1;if(e=or(`/${e}`),n)return new RegExp(t).test(e);if(or(t)!==e)return!1;const s=t.match(gi);return s?(Ce?location.hash:"")===s[0]:!0}function or(e){return decodeURI(e).replace(gi,"").replace(ac,"")}function dc(e){return pi.test(e)}function hc(e,t){var s,r,i,o,l,c,a;const n=Object.keys(e.locales).find(d=>d!=="root"&&!dc(d)&&uc(t,`/${d}/`,!0))||"root";return Object.assign({},e,{localeIndex:n,lang:((s=e.locales[n])==null?void 0:s.lang)??e.lang,dir:((r=e.locales[n])==null?void 0:r.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:bi(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(a=e.locales[n])==null?void 0:a.themeConfig}})}function _i(e,t){const n=t.title||e.title,s=t.titleTemplate??e.titleTemplate;if(typeof s=="string"&&s.includes(":title"))return s.replace(/:title/g,n);const r=pc(e.title,s);return`${n}${r}`}function pc(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function gc(e,t){const[n,s]=t;if(n!=="meta")return!1;const r=Object.entries(s)[0];return r==null?!1:e.some(([i,o])=>i===n&&o[r[0]]===r[1])}function bi(e,t){return[...e.filter(n=>!gc(t,n)),...t]}const mc=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,_c=/^[a-z]:/i;function lr(e){const t=_c.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(mc,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const bc=Symbol(),tt=go(fc);function tf(e){const t=Ee(()=>hc(tt.value,e.data.relativePath));return{site:t,theme:Ee(()=>t.value.themeConfig),page:Ee(()=>e.data),frontmatter:Ee(()=>e.data.frontmatter),params:Ee(()=>e.data.params),lang:Ee(()=>t.value.lang),dir:Ee(()=>t.value.dir),localeIndex:Ee(()=>t.value.localeIndex||"root"),title:Ee(()=>_i(t.value,e.data)),description:Ee(()=>e.data.description||t.value.description),isDark:dt(!1)}}function nf(){const e=gt(bc);if(!e)throw new Error("vitepress data not properly injected in app");return e}function yc(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function cr(e){return pi.test(e)||e.startsWith(".")?e:yc(tt.value.base,e)}function vc(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),Ce){const n="/";t=lr(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let s=__VP_HASH_MAP__[t.toLowerCase()];s||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",s=__VP_HASH_MAP__[t.toLowerCase()]),t=`${n}assets/${t}.${s}.js`}else t=`./${lr(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let Gt=[];function sf(e){Gt.push(e),Cn(()=>{Gt=Gt.filter(t=>t!==e)})}const Cc=Symbol(),fr="http://a.com",wc=()=>({path:"/",component:null,data:mi});function rf(e,t){const n=pn(wc()),s={route:n,go:r};async function r(l=Ce?location.href:"/"){var a,d;await((a=s.onBeforeRouteChange)==null?void 0:a.call(s,l));const c=new URL(l,fr);tt.value.cleanUrls||!c.pathname.endsWith("/")&&!c.pathname.endsWith(".html")&&(c.pathname+=".html",l=c.pathname+c.search+c.hash),Ce&&l!==location.href&&(history.replaceState({scrollPosition:window.scrollY},document.title),history.pushState(null,"",l)),await o(l),await((d=s.onAfterRouteChanged)==null?void 0:d.call(s,l))}let i=null;async function o(l,c=0,a=!1){const d=new URL(l,fr),p=i=d.pathname;try{let y=await e(p);if(i===p){i=null;const{default:x,__pageData:I}=y;if(!x)throw new Error(`Invalid route component: ${x}`);n.path=Ce?p:cr(p),n.component=Rt(x),n.data=Rt(I),Ce&&Lr(()=>{let R=tt.value.base+I.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!tt.value.cleanUrls&&!R.endsWith("/")&&(R+=".html"),R!==d.pathname&&(d.pathname=R,l=R+d.search+d.hash,history.replaceState(null,"",l)),d.hash&&!c){let $=null;try{$=document.querySelector(decodeURIComponent(d.hash))}catch(_){console.warn(_)}if($){ar($,d.hash);return}}window.scrollTo(0,c)})}}catch(y){if(!/fetch/.test(y.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(y),!a)try{const x=await fetch(tt.value.base+"hashmap.json");window.__VP_HASH_MAP__=await x.json(),await o(l,c,!0);return}catch{}i===p&&(i=null,n.path=Ce?p:cr(p),n.component=t?Rt(t):null,n.data=mi)}}return Ce&&(window.addEventListener("click",l=>{if(l.target.closest("button"))return;const a=l.target.closest("a");if(a&&!a.closest(".vp-raw")&&(a instanceof SVGElement||!a.download)){const{target:d}=a,{href:p,origin:y,pathname:x,hash:I,search:R}=new URL(a.href instanceof SVGAnimatedString?a.href.animVal:a.href,a.baseURI),$=window.location,_=x.match(/\.\w+$/);!l.ctrlKey&&!l.shiftKey&&!l.altKey&&!l.metaKey&&d!=="_blank"&&y===$.origin&&!(_&&_[0]!==".html")&&(l.preventDefault(),x===$.pathname&&R===$.search?I&&(I!==$.hash&&(history.pushState(null,"",I),window.dispatchEvent(new Event("hashchange"))),ar(a,I,a.classList.contains("header-anchor"))):r(p))}},{capture:!0}),window.addEventListener("popstate",l=>{o(location.href,l.state&&l.state.scrollPosition||0)}),window.addEventListener("hashchange",l=>{l.preventDefault()})),s}function xc(){const e=gt(Cc);if(!e)throw new Error("useRouter() is called without provider.");return e}function yi(){return xc().route}function ar(e,t,n=!1){let s=null;try{s=e.classList.contains("header-anchor")?e:document.querySelector(decodeURIComponent(t))}catch(r){console.warn(r)}if(s){const r=tt.value.scrollOffset;let i=0;if(typeof r=="number")i=r;else if(typeof r=="string")i=ur(r);else if(Array.isArray(r))for(const c of r){const a=ur(c);if(a){i=a;break}}const o=parseInt(window.getComputedStyle(s).paddingTop,10),l=window.scrollY+s.getBoundingClientRect().top-i+o;!n||Math.abs(l-window.scrollY)>window.innerHeight?window.scrollTo(0,l):window.scrollTo({left:0,top:l,behavior:"smooth"})}}function ur(e){const t=document.querySelector(e);if(!t)return 0;const n=t.getBoundingClientRect().bottom;return n<0?0:n+24}const dr=()=>Gt.forEach(e=>e()),of=us({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=yi();return()=>qn(e.as,{style:{position:"relative"}},[t.component?qn(t.component,{onVnodeMounted:dr,onVnodeUpdated:dr}):"404 Page Not Found"])}});function lf(e,t){let n=[],s=!0;const r=i=>{if(s){s=!1;return}n.forEach(o=>document.head.removeChild(o)),n=[],i.forEach(o=>{const l=Ec(o);document.head.appendChild(l),n.push(l)})};$o(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[];document.title=_i(o,i),document.querySelector("meta[name=description]").setAttribute("content",l||o.description),r(bi(o.head,Ac(c)))})}function Ec([e,t,n]){const s=document.createElement(e);for(const r in t)s.setAttribute(r,t[r]);return n&&(s.innerHTML=n),s}function Tc(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function Ac(e){return e.filter(t=>!Tc(t))}const Ln=new Set,vi=()=>document.createElement("link"),Rc=e=>{const t=vi();t.rel="prefetch",t.href=e,document.head.appendChild(t)},Pc=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let Jt;const Ic=Ce&&(Jt=vi())&&Jt.relList&&Jt.relList.supports&&Jt.relList.supports("prefetch")?Rc:Pc;function cf(){if(!Ce||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const s=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!Ln.has(c)){Ln.add(c);const a=vc(c);Ic(a)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{target:o}=i,{hostname:l,pathname:c}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),a=c.match(/\.\w+$/);a&&a[0]!==".html"||o!=="_blank"&&l===location.hostname&&(c!==location.pathname?n.observe(i):Ln.add(c))})})};vn(s);const r=yi();Zt(()=>r.path,s),Cn(()=>{n&&n.disconnect()})}const ff=us({setup(e,{slots:t}){const n=dt(!1);return vn(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function af(){if(Ce){const e=new Map;window.addEventListener("click",t=>{var s;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const r=n.parentElement,i=(s=n.nextElementSibling)==null?void 0:s.nextElementSibling;if(!r||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(r.className);let l="";i.querySelectorAll("span.line:not(.diff.remove)").forEach(c=>l+=(c.textContent||"")+` -`),l=l.slice(0,-1),o&&(l=l.replace(/^ *(\$|>) /gm,"").trim()),Oc(l).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const c=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,c)})}})}}async function Oc(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const s=document.getSelection(),r=s?s.rangeCount>0&&s.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),r&&(s.removeAllRanges(),s.addRange(r)),n&&n.focus()}}function uf(){Ce&&window.addEventListener("click",e=>{var n,s;const t=e.target;if(t.matches(".vp-code-group input")){const r=(n=t.parentElement)==null?void 0:n.parentElement,i=Array.from((r==null?void 0:r.querySelectorAll("input"))||[]).indexOf(t),o=r==null?void 0:r.querySelector('div[class*="language-"].active'),l=(s=r==null?void 0:r.querySelectorAll('div[class*="language-"]:not(.language-id)'))==null?void 0:s[i];o&&l&&o!==l&&(o.classList.remove("active"),l.classList.add("active"))}})}export{Jc as $,ri as A,Fo as B,zc as C,jc as D,Cl as E,he as F,se as G,Gn as H,Uc as I,Qc as J,Bc as K,pi as L,Ce as M,Dc as N,Nc as O,Gc as P,Hc as Q,qc as R,ef as S,di as T,gt as U,ll as V,zo as W,sf as X,Lr as Y,go as Z,Zc as _,li as a,kc as a0,$c as a1,Yc as a2,Wc as a3,qn as a4,lf as a5,Cc as a6,tf as a7,bc as a8,of as a9,ff as aa,tt as ab,Xc as ac,rf as ad,vc as ae,cf as af,af as ag,uf as ah,xc as ai,_o as b,Vc as c,us as d,Lc as e,Ir as f,Mc as g,dt as h,ji as i,Sc as j,$o as k,Ee as l,ci as m,es as n,ni as o,vn as p,dc as q,Kc as r,cr as s,Fc as t,nf as u,uc as v,Zt as w,yi as x,Cn as y,oi as z}; diff --git a/assets/chunks/framework.BmdFiWrL.js b/assets/chunks/framework.BmdFiWrL.js new file mode 100644 index 00000000..e8320f5e --- /dev/null +++ b/assets/chunks/framework.BmdFiWrL.js @@ -0,0 +1,17 @@ +/** +* @vue/shared v3.4.30 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function hr(e,t){const n=new Set(e.split(","));return r=>n.has(r)}const te={},gt=[],Se=()=>{},ho=()=>!1,Vt=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),pr=e=>e.startsWith("onUpdate:"),le=Object.assign,gr=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},po=Object.prototype.hasOwnProperty,Y=(e,t)=>po.call(e,t),B=Array.isArray,mt=e=>vn(e)==="[object Map]",Fs=e=>vn(e)==="[object Set]",W=e=>typeof e=="function",ie=e=>typeof e=="string",Ze=e=>typeof e=="symbol",Z=e=>e!==null&&typeof e=="object",$s=e=>(Z(e)||W(e))&&W(e.then)&&W(e.catch),Hs=Object.prototype.toString,vn=e=>Hs.call(e),go=e=>vn(e).slice(8,-1),js=e=>vn(e)==="[object Object]",mr=e=>ie(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,yt=hr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),bn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},mo=/-(\w)/g,Ne=bn(e=>e.replace(mo,(t,n)=>n?n.toUpperCase():"")),yo=/\B([A-Z])/g,ft=bn(e=>e.replace(yo,"-$1").toLowerCase()),wn=bn(e=>e.charAt(0).toUpperCase()+e.slice(1)),sn=bn(e=>e?`on${wn(e)}`:""),Je=(e,t)=>!Object.is(e,t),$n=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},_o=e=>{const t=parseFloat(e);return isNaN(t)?e:t},vo=e=>{const t=ie(e)?Number(e):NaN;return isNaN(t)?e:t};let Dr;const Ds=()=>Dr||(Dr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function yr(e){if(B(e)){const t={};for(let n=0;n{if(n){const r=n.split(wo);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function _r(e){let t="";if(ie(e))t=e;else if(B(e))for(let n=0;nie(e)?e:e==null?"":B(e)||Z(e)&&(e.toString===Hs||!W(e.toString))?JSON.stringify(e,Bs,2):String(e),Bs=(e,t)=>t&&t.__v_isRef?Bs(e,t.value):mt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,s],i)=>(n[Hn(r,i)+" =>"]=s,n),{})}:Fs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Hn(n))}:Ze(t)?Hn(t):Z(t)&&!B(t)&&!js(t)?String(t):t,Hn=(e,t="")=>{var n;return Ze(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.4.30 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let we;class To{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=we,!t&&we&&(this.index=(we.scopes||(we.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=we;try{return we=this,t()}finally{we=n}}}on(){we=this}off(){we=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n=5)break}}this._dirtyLevel===1&&(this._dirtyLevel=0),Ve()}return this._dirtyLevel>=5}set dirty(t){this._dirtyLevel=t?5:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=ze,n=ct;try{return ze=!0,ct=this,this._runnings++,Ur(this),this.fn()}finally{Br(this),this._runnings--,ct=n,ze=t}}stop(){this.active&&(Ur(this),Br(this),this.onStop&&this.onStop(),this.active=!1)}}function Oo(e){return e.value}function Ur(e){e._trackId++,e._depsLength=0}function Br(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t0&&(s??(s=e.get(r)===r._trackId))){r._dirtyLevel=2;continue}r._dirtyLevel{const n=new Map;return n.cleanup=e,n.computed=t,n},un=new WeakMap,at=Symbol(""),sr=Symbol("");function ve(e,t,n){if(ze&&ct){let r=un.get(e);r||un.set(e,r=new Map);let s=r.get(n);s||r.set(n,s=zs(()=>r.delete(n))),qs(ct,s)}}function je(e,t,n,r,s,i){const o=un.get(e);if(!o)return;let l=[];if(t==="clear")l=[...o.values()];else if(n==="length"&&B(e)){const c=Number(r);o.forEach((u,d)=>{(d==="length"||!Ze(d)&&d>=c)&&l.push(u)})}else switch(n!==void 0&&l.push(o.get(n)),t){case"add":B(e)?mr(n)&&l.push(o.get("length")):(l.push(o.get(at)),mt(e)&&l.push(o.get(sr)));break;case"delete":B(e)||(l.push(o.get(at)),mt(e)&&l.push(o.get(sr)));break;case"set":mt(e)&&l.push(o.get(at));break}br();for(const c of l)c&&Gs(c,5);wr()}function Lo(e,t){const n=un.get(e);return n&&n.get(t)}const Io=hr("__proto__,__v_isRef,__isVue"),Xs=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Ze)),Kr=Po();function Po(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=J(this);for(let i=0,o=this.length;i{e[t]=function(...n){et(),br();const r=J(this)[t].apply(this,n);return wr(),Ve(),r}}),e}function Mo(e){Ze(e)||(e=String(e));const t=J(this);return ve(t,"has",e),t.hasOwnProperty(e)}class Ys{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?qo:ei:i?Zs:Qs).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const o=B(t);if(!s){if(o&&Y(Kr,n))return Reflect.get(Kr,n,r);if(n==="hasOwnProperty")return Mo}const l=Reflect.get(t,n,r);return(Ze(n)?Xs.has(n):Io(n))||(s||ve(t,"get",n),i)?l:pe(l)?o&&mr(n)?l:l.value:Z(l)?s?Sn(l):Cn(l):l}}class Js extends Ys{constructor(t=!1){super(!1,t)}set(t,n,r,s){let i=t[n];if(!this._isShallow){const c=Mt(i);if(!fn(r)&&!Mt(r)&&(i=J(i),r=J(r)),!B(t)&&pe(i)&&!pe(r))return c?!1:(i.value=r,!0)}const o=B(t)&&mr(n)?Number(n)e,En=e=>Reflect.getPrototypeOf(e);function qt(e,t,n=!1,r=!1){e=e.__v_raw;const s=J(e),i=J(t);n||(Je(t,i)&&ve(s,"get",t),ve(s,"get",i));const{has:o}=En(s),l=r?Er:n?xr:Nt;if(o.call(s,t))return l(e.get(t));if(o.call(s,i))return l(e.get(i));e!==s&&e.get(t)}function Gt(e,t=!1){const n=this.__v_raw,r=J(n),s=J(e);return t||(Je(e,s)&&ve(r,"has",e),ve(r,"has",s)),e===s?n.has(e):n.has(e)||n.has(s)}function zt(e,t=!1){return e=e.__v_raw,!t&&ve(J(e),"iterate",at),Reflect.get(e,"size",e)}function kr(e){e=J(e);const t=J(this);return En(t).has.call(t,e)||(t.add(e),je(t,"add",e,e)),this}function Wr(e,t){t=J(t);const n=J(this),{has:r,get:s}=En(n);let i=r.call(n,e);i||(e=J(e),i=r.call(n,e));const o=s.call(n,e);return n.set(e,t),i?Je(t,o)&&je(n,"set",e,t):je(n,"add",e,t),this}function qr(e){const t=J(this),{has:n,get:r}=En(t);let s=n.call(t,e);s||(e=J(e),s=n.call(t,e)),r&&r.call(t,e);const i=t.delete(e);return s&&je(t,"delete",e,void 0),i}function Gr(){const e=J(this),t=e.size!==0,n=e.clear();return t&&je(e,"clear",void 0,void 0),n}function Xt(e,t){return function(r,s){const i=this,o=i.__v_raw,l=J(o),c=t?Er:e?xr:Nt;return!e&&ve(l,"iterate",at),o.forEach((u,d)=>r.call(s,c(u),c(d),i))}}function Yt(e,t,n){return function(...r){const s=this.__v_raw,i=J(s),o=mt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,u=s[e](...r),d=n?Er:t?xr:Nt;return!t&&ve(i,"iterate",c?sr:at),{next(){const{value:h,done:y}=u.next();return y?{value:h,done:y}:{value:l?[d(h[0]),d(h[1])]:d(h),done:y}},[Symbol.iterator](){return this}}}}function Be(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function jo(){const e={get(i){return qt(this,i)},get size(){return zt(this)},has:Gt,add:kr,set:Wr,delete:qr,clear:Gr,forEach:Xt(!1,!1)},t={get(i){return qt(this,i,!1,!0)},get size(){return zt(this)},has:Gt,add:kr,set:Wr,delete:qr,clear:Gr,forEach:Xt(!1,!0)},n={get(i){return qt(this,i,!0)},get size(){return zt(this,!0)},has(i){return Gt.call(this,i,!0)},add:Be("add"),set:Be("set"),delete:Be("delete"),clear:Be("clear"),forEach:Xt(!0,!1)},r={get(i){return qt(this,i,!0,!0)},get size(){return zt(this,!0)},has(i){return Gt.call(this,i,!0)},add:Be("add"),set:Be("set"),delete:Be("delete"),clear:Be("clear"),forEach:Xt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=Yt(i,!1,!1),n[i]=Yt(i,!0,!1),t[i]=Yt(i,!1,!0),r[i]=Yt(i,!0,!0)}),[e,n,t,r]}const[Vo,Do,Uo,Bo]=jo();function Cr(e,t){const n=t?e?Bo:Uo:e?Do:Vo;return(r,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?r:Reflect.get(Y(n,s)&&s in r?n:r,s,i)}const Ko={get:Cr(!1,!1)},ko={get:Cr(!1,!0)},Wo={get:Cr(!0,!1)};const Qs=new WeakMap,Zs=new WeakMap,ei=new WeakMap,qo=new WeakMap;function Go(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function zo(e){return e.__v_skip||!Object.isExtensible(e)?0:Go(go(e))}function Cn(e){return Mt(e)?e:Sr(e,!1,Fo,Ko,Qs)}function Xo(e){return Sr(e,!1,Ho,ko,Zs)}function Sn(e){return Sr(e,!0,$o,Wo,ei)}function Sr(e,t,n,r,s){if(!Z(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=s.get(e);if(i)return i;const o=zo(e);if(o===0)return e;const l=new Proxy(e,o===2?r:n);return s.set(e,l),l}function At(e){return Mt(e)?At(e.__v_raw):!!(e&&e.__v_isReactive)}function Mt(e){return!!(e&&e.__v_isReadonly)}function fn(e){return!!(e&&e.__v_isShallow)}function ti(e){return e?!!e.__v_raw:!1}function J(e){const t=e&&e.__v_raw;return t?J(t):e}function on(e){return Object.isExtensible(e)&&Vs(e,"__v_skip",!0),e}const Nt=e=>Z(e)?Cn(e):e,xr=e=>Z(e)?Sn(e):e;class ni{constructor(t,n,r,s){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new vr(()=>t(this._value),()=>Rt(this,this.effect._dirtyLevel===3?3:4)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=r}get value(){const t=J(this),n=t.effect._dirtyLevel;return(!t._cacheable||t.effect.dirty)&&Je(t._value,t._value=t.effect.run())&&n!==3&&Rt(t,5),Tr(t),t.effect._dirtyLevel>=2&&Rt(t,3),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Yo(e,t,n=!1){let r,s;const i=W(e);return i?(r=e,s=Se):(r=e.get,s=e.set),new ni(r,s,i||!s,n)}function Tr(e){var t;ze&&ct&&(e=J(e),qs(ct,(t=e.dep)!=null?t:e.dep=zs(()=>e.dep=void 0,e instanceof ni?e:void 0)))}function Rt(e,t=5,n,r){e=J(e);const s=e.dep;s&&Gs(s,t)}function pe(e){return!!(e&&e.__v_isRef===!0)}function oe(e){return si(e,!1)}function ri(e){return si(e,!0)}function si(e,t){return pe(e)?e:new Jo(e,t)}class Jo{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:J(t),this._value=n?t:Nt(t)}get value(){return Tr(this),this._value}set value(t){const n=this.__v_isShallow||fn(t)||Mt(t);t=n?t:J(t),Je(t,this._rawValue)&&(this._rawValue,this._rawValue=t,this._value=n?t:Nt(t),Rt(this,5))}}function ii(e){return pe(e)?e.value:e}const Qo={get:(e,t,n)=>ii(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const s=e[t];return pe(s)&&!pe(n)?(s.value=n,!0):Reflect.set(e,t,n,r)}};function oi(e){return At(e)?e:new Proxy(e,Qo)}class Zo{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>Tr(this),()=>Rt(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function el(e){return new Zo(e)}class tl{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Lo(J(this._object),this._key)}}class nl{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function rl(e,t,n){return pe(e)?e:W(e)?new nl(e):Z(e)&&arguments.length>1?sl(e,t,n):oe(e)}function sl(e,t,n){const r=e[t];return pe(r)?r:new tl(e,t,n)}/** +* @vue/runtime-core v3.4.30 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Xe(e,t,n,r){try{return r?e(...r):e()}catch(s){Dt(s,t,n)}}function xe(e,t,n,r){if(W(e)){const s=Xe(e,t,n,r);return s&&$s(s)&&s.catch(i=>{Dt(i,t,n)}),s}if(B(e)){const s=[];for(let i=0;i>>1,s=de[r],i=$t(s);iPe&&de.splice(t,1)}function cl(e){B(e)?_t.push(...e):(!We||!We.includes(e,e.allowRecurse?it+1:it))&&_t.push(e),ci()}function zr(e,t,n=Ft?Pe+1:0){for(;n$t(n)-$t(r));if(_t.length=0,We){We.push(...t);return}for(We=t,it=0;ite.id==null?1/0:e.id,al=(e,t)=>{const n=$t(e)-$t(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function ai(e){ir=!1,Ft=!0,de.sort(al);try{for(Pe=0;Peie(E)?E.trim():E)),h&&(s=n.map(_o))}let l,c=r[l=sn(t)]||r[l=sn(Ne(t))];!c&&i&&(c=r[l=sn(ft(t))]),c&&xe(c,e,6,s);const u=r[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,xe(u,e,6,s)}}function ui(e,t,n=!1){const r=t.emitsCache,s=r.get(e);if(s!==void 0)return s;const i=e.emits;let o={},l=!1;if(!W(e)){const c=u=>{const d=ui(u,t,!0);d&&(l=!0,le(o,d))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(Z(e)&&r.set(e,null),null):(B(i)?i.forEach(c=>o[c]=null):le(o,i),Z(e)&&r.set(e,o),o)}function An(e,t){return!e||!Vt(t)?!1:(t=t.slice(2).replace(/Once$/,""),Y(e,t[0].toLowerCase()+t.slice(1))||Y(e,ft(t))||Y(e,t))}let he=null,Rn=null;function hn(e){const t=he;return he=e,Rn=e&&e.type.__scopeId||null,t}function Ba(e){Rn=e}function Ka(){Rn=null}function fl(e,t=he,n){if(!t||e._n)return e;const r=(...s)=>{r._d&&cs(-1);const i=hn(t);let o;try{o=e(...s)}finally{hn(i),r._d&&cs(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function jn(e){const{type:t,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:l,emit:c,render:u,renderCache:d,props:h,data:y,setupState:E,ctx:A,inheritAttrs:P}=e,$=hn(e);let q,D;try{if(n.shapeFlag&4){const m=s||r,M=m;q=Ae(u.call(M,m,d,h,E,y,A)),D=l}else{const m=t;q=Ae(m.length>1?m(h,{attrs:l,slots:o,emit:c}):m(h,null)),D=t.props?l:dl(l)}}catch(m){Pt.length=0,Dt(m,e,1),q=se(me)}let g=q;if(D&&P!==!1){const m=Object.keys(D),{shapeFlag:M}=g;m.length&&M&7&&(i&&m.some(pr)&&(D=hl(D,i)),g=Qe(g,D,!1,!0))}return n.dirs&&(g=Qe(g,null,!1,!0),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&(g.transition=n.transition),q=g,hn($),q}const dl=e=>{let t;for(const n in e)(n==="class"||n==="style"||Vt(n))&&((t||(t={}))[n]=e[n]);return t},hl=(e,t)=>{const n={};for(const r in e)(!pr(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function pl(e,t,n){const{props:r,children:s,component:i}=e,{props:o,children:l,patchFlag:c}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Xr(r,o,u):!!o;if(c&8){const d=t.dynamicProps;for(let h=0;he.__isSuspense;function pi(e,t){t&&t.pendingBranch?B(e)?t.effects.push(...e):t.effects.push(e):cl(e)}function On(e,t,n=ue,r=!1){if(n){const s=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{et();const l=Bt(n),c=xe(t,n,e,o);return l(),Ve(),c});return r?s.unshift(i):s.push(i),i}}const Ue=e=>(t,n=ue)=>{(!Kt||e==="sp")&&On(e,(...r)=>t(...r),n)},yl=Ue("bm"),Ct=Ue("m"),_l=Ue("bu"),vl=Ue("u"),gi=Ue("bum"),Ln=Ue("um"),bl=Ue("sp"),wl=Ue("rtg"),El=Ue("rtc");function Cl(e,t=ue){On("ec",e,t)}function Ie(e,t,n,r){const s=e.dirs,i=t&&t.dirs;for(let o=0;ot(o,l,void 0,i));else{const o=Object.keys(e);s=new Array(o.length);for(let l=0,c=o.length;l!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function Ga(e){W(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:r,delay:s=200,timeout:i,suspensible:o=!0,onError:l}=e;let c=null,u,d=0;const h=()=>(d++,c=null,y()),y=()=>{let E;return c||(E=c=t().catch(A=>{if(A=A instanceof Error?A:new Error(String(A)),l)return new Promise((P,$)=>{l(A,()=>P(h()),()=>$(A),d+1)});throw A}).then(A=>E!==c&&c?c:(A&&(A.__esModule||A[Symbol.toStringTag]==="Module")&&(A=A.default),u=A,A)))};return Rr({name:"AsyncComponentWrapper",__asyncLoader:y,get __asyncResolved(){return u},setup(){const E=ue;if(u)return()=>Vn(u,E);const A=D=>{c=null,Dt(D,E,13,!r)};if(o&&E.suspense||Kt)return y().then(D=>()=>Vn(D,E)).catch(D=>(A(D),()=>r?se(r,{error:D}):null));const P=oe(!1),$=oe(),q=oe(!!s);return s&&setTimeout(()=>{q.value=!1},s),i!=null&&setTimeout(()=>{if(!P.value&&!$.value){const D=new Error(`Async component timed out after ${i}ms.`);A(D),$.value=D}},i),y().then(()=>{P.value=!0,E.parent&&Ut(E.parent.vnode)&&(E.parent.effect.dirty=!0,Tn(E.parent.update))}).catch(D=>{A(D),$.value=D}),()=>{if(P.value&&u)return Vn(u,E);if($.value&&r)return se(r,{error:$.value});if(n&&!q.value)return se(n)}}})}function Vn(e,t){const{ref:n,props:r,children:s,ce:i}=t.vnode,o=se(e,r,s);return o.ref=n,o.ce=i,delete t.vnode.ce,o}function za(e,t,n={},r,s){if(he.isCE||he.parent&&vt(he.parent)&&he.parent.isCE)return t!=="default"&&(n.name=t),se("slot",n,r&&r());let i=e[t];i&&i._c&&(i._d=!1),Hi();const o=i&&mi(i(n)),l=Vi(_e,{key:n.key||o&&o.key||`_${t}`},o||(r?r():[]),o&&e._===1?64:-2);return!s&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function mi(e){return e.some(t=>yn(t)?!(t.type===me||t.type===_e&&!mi(t.children)):!0)?e:null}function Xa(e,t){const n={};for(const r in e)n[/[A-Z]/.test(r)?`on:${r}`:sn(r)]=e[r];return n}const or=e=>e?Ki(e)?Pr(e):or(e.parent):null,Ot=le(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=>or(e.parent),$root:e=>or(e.root),$emit:e=>e.emit,$options:e=>Or(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,Tn(e.update)}),$nextTick:e=>e.n||(e.n=xn.bind(e.proxy)),$watch:e=>Gl.bind(e)}),Dn=(e,t)=>e!==te&&!e.__isScriptSetup&&Y(e,t),Sl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:l,appContext:c}=e;let u;if(t[0]!=="$"){const E=o[t];if(E!==void 0)switch(E){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(Dn(r,t))return o[t]=1,r[t];if(s!==te&&Y(s,t))return o[t]=2,s[t];if((u=e.propsOptions[0])&&Y(u,t))return o[t]=3,i[t];if(n!==te&&Y(n,t))return o[t]=4,n[t];lr&&(o[t]=0)}}const d=Ot[t];let h,y;if(d)return t==="$attrs"&&ve(e.attrs,"get",""),d(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==te&&Y(n,t))return o[t]=4,n[t];if(y=c.config.globalProperties,Y(y,t))return y[t]},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return Dn(s,t)?(s[t]=n,!0):r!==te&&Y(r,t)?(r[t]=n,!0):Y(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:i}},o){let l;return!!n[o]||e!==te&&Y(e,o)||Dn(t,o)||(l=i[0])&&Y(l,o)||Y(r,o)||Y(Ot,o)||Y(s.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Y(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ya(){return xl().slots}function xl(){const e=Pn();return e.setupContext||(e.setupContext=Wi(e))}function Jr(e){return B(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let lr=!0;function Tl(e){const t=Or(e),n=e.proxy,r=e.ctx;lr=!1,t.beforeCreate&&Qr(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:l,provide:c,inject:u,created:d,beforeMount:h,mounted:y,beforeUpdate:E,updated:A,activated:P,deactivated:$,beforeDestroy:q,beforeUnmount:D,destroyed:g,unmounted:m,render:M,renderTracked:O,renderTriggered:K,errorCaptured:U,serverPrefetch:I,expose:w,inheritAttrs:N,components:x,directives:G,filters:ne}=t;if(u&&Al(u,r,null),o)for(const X in o){const H=o[X];W(H)&&(r[X]=H.bind(n))}if(s){const X=s.call(n,n);Z(X)&&(e.data=Cn(X))}if(lr=!0,i)for(const X in i){const H=i[X],Fe=W(H)?H.bind(n,n):W(H.get)?H.get.bind(n,n):Se,kt=!W(H)&&W(H.set)?H.set.bind(n):Se,tt=re({get:Fe,set:kt});Object.defineProperty(r,X,{enumerable:!0,configurable:!0,get:()=>tt.value,set:Oe=>tt.value=Oe})}if(l)for(const X in l)yi(l[X],r,n,X);if(c){const X=W(c)?c.call(n):c;Reflect.ownKeys(X).forEach(H=>{Ml(H,X[H])})}d&&Qr(d,e,"c");function j(X,H){B(H)?H.forEach(Fe=>X(Fe.bind(n))):H&&X(H.bind(n))}if(j(yl,h),j(Ct,y),j(_l,E),j(vl,A),j(zl,P),j(Xl,$),j(Cl,U),j(El,O),j(wl,K),j(gi,D),j(Ln,m),j(bl,I),B(w))if(w.length){const X=e.exposed||(e.exposed={});w.forEach(H=>{Object.defineProperty(X,H,{get:()=>n[H],set:Fe=>n[H]=Fe})})}else e.exposed||(e.exposed={});M&&e.render===Se&&(e.render=M),N!=null&&(e.inheritAttrs=N),x&&(e.components=x),G&&(e.directives=G)}function Al(e,t,n=Se){B(e)&&(e=cr(e));for(const r in e){const s=e[r];let i;Z(s)?"default"in s?i=bt(s.from||r,s.default,!0):i=bt(s.from||r):i=bt(s),pe(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[r]=i}}function Qr(e,t,n){xe(B(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function yi(e,t,n,r){const s=r.includes(".")?Ii(n,r):()=>n[r];if(ie(e)){const i=t[e];W(i)&&Me(s,i)}else if(W(e))Me(s,e.bind(n));else if(Z(e))if(B(e))e.forEach(i=>yi(i,t,n,r));else{const i=W(e.handler)?e.handler.bind(n):t[e.handler];W(i)&&Me(s,i,e)}}function Or(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!s.length&&!n&&!r?c=t:(c={},s.length&&s.forEach(u=>pn(c,u,o,!0)),pn(c,t,o)),Z(t)&&i.set(t,c),c}function pn(e,t,n,r=!1){const{mixins:s,extends:i}=t;i&&pn(e,i,n,!0),s&&s.forEach(o=>pn(e,o,n,!0));for(const o in t)if(!(r&&o==="expose")){const l=Rl[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Rl={data:Zr,props:es,emits:es,methods:Tt,computed:Tt,beforeCreate:ge,created:ge,beforeMount:ge,mounted:ge,beforeUpdate:ge,updated:ge,beforeDestroy:ge,beforeUnmount:ge,destroyed:ge,unmounted:ge,activated:ge,deactivated:ge,errorCaptured:ge,serverPrefetch:ge,components:Tt,directives:Tt,watch:Ll,provide:Zr,inject:Ol};function Zr(e,t){return t?e?function(){return le(W(e)?e.call(this,this):e,W(t)?t.call(this,this):t)}:t:e}function Ol(e,t){return Tt(cr(e),cr(t))}function cr(e){if(B(e)){const t={};for(let n=0;n1)return n&&W(t)?t.call(r&&r.proxy):t}}const vi={},bi=()=>Object.create(vi),wi=e=>Object.getPrototypeOf(e)===vi;function Nl(e,t,n,r=!1){const s={},i=bi();e.propsDefaults=Object.create(null),Ei(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);n?e.props=r?s:Xo(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function Fl(e,t,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,l=J(s),[c]=e.propsOptions;let u=!1;if((r||o>0)&&!(o&16)){if(o&8){const d=e.vnode.dynamicProps;for(let h=0;h{c=!0;const[y,E]=Ci(h,t,!0);le(o,y),E&&l.push(...E)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!c)return Z(e)&&r.set(e,gt),gt;if(B(i))for(let d=0;d-1,E[1]=P<0||A-1||Y(E,"default"))&&l.push(h)}}}const u=[o,l];return Z(e)&&r.set(e,u),u}function ts(e){return e[0]!=="$"&&!yt(e)}function ns(e){return e===null?"null":typeof e=="function"?e.name||"":typeof e=="object"&&e.constructor&&e.constructor.name||""}function rs(e,t){return ns(e)===ns(t)}function ss(e,t){return B(t)?t.findIndex(n=>rs(n,e)):W(t)&&rs(t,e)?0:-1}const Si=e=>e[0]==="_"||e==="$stable",Lr=e=>B(e)?e.map(Ae):[Ae(e)],$l=(e,t,n)=>{if(t._n)return t;const r=fl((...s)=>Lr(t(...s)),n);return r._c=!1,r},xi=(e,t,n)=>{const r=e._ctx;for(const s in e){if(Si(s))continue;const i=e[s];if(W(i))t[s]=$l(s,i,r);else if(i!=null){const o=Lr(i);t[s]=()=>o}}},Ti=(e,t)=>{const n=Lr(t);e.slots.default=()=>n},Hl=(e,t)=>{const n=e.slots=bi();if(e.vnode.shapeFlag&32){const r=t._;r?(le(n,t),Vs(n,"_",r,!0)):xi(t,n)}else t&&Ti(e,t)},jl=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,o=te;if(r.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:(le(s,t),!n&&l===1&&delete s._):(i=!t.$stable,xi(t,s)),o=t}else t&&(Ti(e,t),o={default:1});if(i)for(const l in s)!Si(l)&&o[l]==null&&delete s[l]};function gn(e,t,n,r,s=!1){if(B(e)){e.forEach((y,E)=>gn(y,t&&(B(t)?t[E]:t),n,r,s));return}if(vt(r)&&!s)return;const i=r.shapeFlag&4?Pr(r.component):r.el,o=s?null:i,{i:l,r:c}=e,u=t&&t.r,d=l.refs===te?l.refs={}:l.refs,h=l.setupState;if(u!=null&&u!==c&&(ie(u)?(d[u]=null,Y(h,u)&&(h[u]=null)):pe(u)&&(u.value=null)),W(c))Xe(c,l,12,[o,d]);else{const y=ie(c),E=pe(c);if(y||E){const A=()=>{if(e.f){const P=y?Y(h,c)?h[c]:d[c]:c.value;s?B(P)&&gr(P,i):B(P)?P.includes(i)||P.push(i):y?(d[c]=[i],Y(h,c)&&(h[c]=d[c])):(c.value=[i],e.k&&(d[e.k]=c.value))}else y?(d[c]=o,Y(h,c)&&(h[c]=o)):E&&(c.value=o,e.k&&(d[e.k]=o))};o?(A.id=-1,ye(A,n)):A()}}}let is=!1;const pt=()=>{is||(console.error("Hydration completed but contains mismatches."),is=!0)},Vl=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Dl=e=>e.namespaceURI.includes("MathML"),Jt=e=>{if(Vl(e))return"svg";if(Dl(e))return"mathml"},Qt=e=>e.nodeType===8;function Ul(e){const{mt:t,p:n,o:{patchProp:r,createText:s,nextSibling:i,parentNode:o,remove:l,insert:c,createComment:u}}=e,d=(g,m)=>{if(!m.hasChildNodes()){n(null,g,m),dn(),m._vnode=g;return}h(m.firstChild,g,null,null,null),dn(),m._vnode=g},h=(g,m,M,O,K,U=!1)=>{U=U||!!m.dynamicChildren;const I=Qt(g)&&g.data==="[",w=()=>P(g,m,M,O,K,I),{type:N,ref:x,shapeFlag:G,patchFlag:ne}=m;let ce=g.nodeType;m.el=g,ne===-2&&(U=!1,m.dynamicChildren=null);let j=null;switch(N){case wt:ce!==3?m.children===""?(c(m.el=s(""),o(g),g),j=g):j=w():(g.data!==m.children&&(pt(),g.data=m.children),j=i(g));break;case me:D(g)?(j=i(g),q(m.el=g.content.firstChild,g,M)):ce!==8||I?j=w():j=i(g);break;case It:if(I&&(g=i(g),ce=g.nodeType),ce===1||ce===3){j=g;const X=!m.children.length;for(let H=0;H{U=U||!!m.dynamicChildren;const{type:I,props:w,patchFlag:N,shapeFlag:x,dirs:G,transition:ne}=m,ce=I==="input"||I==="option";if(ce||N!==-1){G&&Ie(m,null,M,"created");let j=!1;if(D(g)){j=Ai(O,ne)&&M&&M.vnode.props&&M.vnode.props.appear;const H=g.content.firstChild;j&&ne.beforeEnter(H),q(H,g,M),m.el=g=H}if(x&16&&!(w&&(w.innerHTML||w.textContent))){let H=E(g.firstChild,m,g,M,O,K,U);for(;H;){pt();const Fe=H;H=H.nextSibling,l(Fe)}}else x&8&&g.textContent!==m.children&&(pt(),g.textContent=m.children);if(w)if(ce||!U||N&48)for(const H in w)(ce&&(H.endsWith("value")||H==="indeterminate")||Vt(H)&&!yt(H)||H[0]===".")&&r(g,H,null,w[H],void 0,void 0,M);else w.onClick&&r(g,"onClick",null,w.onClick,void 0,void 0,M);let X;(X=w&&w.onVnodeBeforeMount)&&Ce(X,M,m),G&&Ie(m,null,M,"beforeMount"),((X=w&&w.onVnodeMounted)||G||j)&&pi(()=>{X&&Ce(X,M,m),j&&ne.enter(g),G&&Ie(m,null,M,"mounted")},O)}return g.nextSibling},E=(g,m,M,O,K,U,I)=>{I=I||!!m.dynamicChildren;const w=m.children,N=w.length;for(let x=0;x{const{slotScopeIds:I}=m;I&&(K=K?K.concat(I):I);const w=o(g),N=E(i(g),m,w,M,O,K,U);return N&&Qt(N)&&N.data==="]"?i(m.anchor=N):(pt(),c(m.anchor=u("]"),w,N),N)},P=(g,m,M,O,K,U)=>{if(pt(),m.el=null,U){const N=$(g);for(;;){const x=i(g);if(x&&x!==N)l(x);else break}}const I=i(g),w=o(g);return l(g),n(null,m,w,I,M,O,Jt(w),K),I},$=(g,m="[",M="]")=>{let O=0;for(;g;)if(g=i(g),g&&Qt(g)&&(g.data===m&&O++,g.data===M)){if(O===0)return i(g);O--}return g},q=(g,m,M)=>{const O=m.parentNode;O&&O.replaceChild(g,m);let K=M;for(;K;)K.vnode.el===m&&(K.vnode.el=K.subTree.el=g),K=K.parent},D=g=>g.nodeType===1&&g.tagName.toLowerCase()==="template";return[d,h]}const ye=pi;function Bl(e){return Kl(e,Ul)}function Kl(e,t){const n=Ds();n.__VUE__=!0;const{insert:r,remove:s,patchProp:i,createElement:o,createText:l,createComment:c,setText:u,setElementText:d,parentNode:h,nextSibling:y,setScopeId:E=Se,insertStaticContent:A}=e,P=(a,f,p,_=null,v=null,S=null,R=void 0,C=null,T=!!f.dynamicChildren)=>{if(a===f)return;a&&!lt(a,f)&&(_=Wt(a),Oe(a,v,S,!0),a=null),f.patchFlag===-2&&(T=!1,f.dynamicChildren=null);const{type:b,ref:L,shapeFlag:V}=f;switch(b){case wt:$(a,f,p,_);break;case me:q(a,f,p,_);break;case It:a==null&&D(f,p,_,R);break;case _e:x(a,f,p,_,v,S,R,C,T);break;default:V&1?M(a,f,p,_,v,S,R,C,T):V&6?G(a,f,p,_,v,S,R,C,T):(V&64||V&128)&&b.process(a,f,p,_,v,S,R,C,T,dt)}L!=null&&v&&gn(L,a&&a.ref,S,f||a,!f)},$=(a,f,p,_)=>{if(a==null)r(f.el=l(f.children),p,_);else{const v=f.el=a.el;f.children!==a.children&&u(v,f.children)}},q=(a,f,p,_)=>{a==null?r(f.el=c(f.children||""),p,_):f.el=a.el},D=(a,f,p,_)=>{[a.el,a.anchor]=A(a.children,f,p,_,a.el,a.anchor)},g=({el:a,anchor:f},p,_)=>{let v;for(;a&&a!==f;)v=y(a),r(a,p,_),a=v;r(f,p,_)},m=({el:a,anchor:f})=>{let p;for(;a&&a!==f;)p=y(a),s(a),a=p;s(f)},M=(a,f,p,_,v,S,R,C,T)=>{f.type==="svg"?R="svg":f.type==="math"&&(R="mathml"),a==null?O(f,p,_,v,S,R,C,T):I(a,f,v,S,R,C,T)},O=(a,f,p,_,v,S,R,C)=>{let T,b;const{props:L,shapeFlag:V,transition:F,dirs:k}=a;if(T=a.el=o(a.type,S,L&&L.is,L),V&8?d(T,a.children):V&16&&U(a.children,T,null,_,v,Un(a,S),R,C),k&&Ie(a,null,_,"created"),K(T,a,a.scopeId,R,_),L){for(const ee in L)ee!=="value"&&!yt(ee)&&i(T,ee,null,L[ee],S,a.children,_,v,$e);"value"in L&&i(T,"value",null,L.value,S),(b=L.onVnodeBeforeMount)&&Ce(b,_,a)}k&&Ie(a,null,_,"beforeMount");const z=Ai(v,F);z&&F.beforeEnter(T),r(T,f,p),((b=L&&L.onVnodeMounted)||z||k)&&ye(()=>{b&&Ce(b,_,a),z&&F.enter(T),k&&Ie(a,null,_,"mounted")},v)},K=(a,f,p,_,v)=>{if(p&&E(a,p),_)for(let S=0;S<_.length;S++)E(a,_[S]);if(v){let S=v.subTree;if(f===S){const R=v.vnode;K(a,R,R.scopeId,R.slotScopeIds,v.parent)}}},U=(a,f,p,_,v,S,R,C,T=0)=>{for(let b=T;b{const C=f.el=a.el;let{patchFlag:T,dynamicChildren:b,dirs:L}=f;T|=a.patchFlag&16;const V=a.props||te,F=f.props||te;let k;if(p&&nt(p,!1),(k=F.onVnodeBeforeUpdate)&&Ce(k,p,f,a),L&&Ie(f,a,p,"beforeUpdate"),p&&nt(p,!0),b?w(a.dynamicChildren,b,C,p,_,Un(f,v),S):R||H(a,f,C,null,p,_,Un(f,v),S,!1),T>0){if(T&16)N(C,f,V,F,p,_,v);else if(T&2&&V.class!==F.class&&i(C,"class",null,F.class,v),T&4&&i(C,"style",V.style,F.style,v),T&8){const z=f.dynamicProps;for(let ee=0;ee{k&&Ce(k,p,f,a),L&&Ie(f,a,p,"updated")},_)},w=(a,f,p,_,v,S,R)=>{for(let C=0;C{if(p!==_){if(p!==te)for(const C in p)!yt(C)&&!(C in _)&&i(a,C,p[C],null,R,f.children,v,S,$e);for(const C in _){if(yt(C))continue;const T=_[C],b=p[C];T!==b&&C!=="value"&&i(a,C,b,T,R,f.children,v,S,$e)}"value"in _&&i(a,"value",p.value,_.value,R)}},x=(a,f,p,_,v,S,R,C,T)=>{const b=f.el=a?a.el:l(""),L=f.anchor=a?a.anchor:l("");let{patchFlag:V,dynamicChildren:F,slotScopeIds:k}=f;k&&(C=C?C.concat(k):k),a==null?(r(b,p,_),r(L,p,_),U(f.children||[],p,L,v,S,R,C,T)):V>0&&V&64&&F&&a.dynamicChildren?(w(a.dynamicChildren,F,p,v,S,R,C),(f.key!=null||v&&f===v.subTree)&&Ri(a,f,!0)):H(a,f,p,L,v,S,R,C,T)},G=(a,f,p,_,v,S,R,C,T)=>{f.slotScopeIds=C,a==null?f.shapeFlag&512?v.ctx.activate(f,p,_,R,T):ne(f,p,_,v,S,R,T):ce(a,f,T)},ne=(a,f,p,_,v,S,R)=>{const C=a.component=lc(a,_,v);if(Ut(a)&&(C.ctx.renderer=dt),cc(C),C.asyncDep){if(v&&v.registerDep(C,j,R),!a.el){const T=C.subTree=se(me);q(null,T,f,p)}}else j(C,a,f,p,v,S,R)},ce=(a,f,p)=>{const _=f.component=a.component;if(pl(a,f,p))if(_.asyncDep&&!_.asyncResolved){X(_,f,p);return}else _.next=f,ll(_.update),_.effect.dirty=!0,_.update();else f.el=a.el,_.vnode=f},j=(a,f,p,_,v,S,R)=>{const C=()=>{if(a.isMounted){let{next:L,bu:V,u:F,parent:k,vnode:z}=a;{const ht=Oi(a);if(ht){L&&(L.el=z.el,X(a,L,R)),ht.asyncDep.then(()=>{a.isUnmounted||C()});return}}let ee=L,Q;nt(a,!1),L?(L.el=z.el,X(a,L,R)):L=z,V&&$n(V),(Q=L.props&&L.props.onVnodeBeforeUpdate)&&Ce(Q,k,L,z),nt(a,!0);const ae=jn(a),Te=a.subTree;a.subTree=ae,P(Te,ae,h(Te.el),Wt(Te),a,v,S),L.el=ae.el,ee===null&&gl(a,ae.el),F&&ye(F,v),(Q=L.props&&L.props.onVnodeUpdated)&&ye(()=>Ce(Q,k,L,z),v)}else{let L;const{el:V,props:F}=f,{bm:k,m:z,parent:ee}=a,Q=vt(f);if(nt(a,!1),k&&$n(k),!Q&&(L=F&&F.onVnodeBeforeMount)&&Ce(L,ee,f),nt(a,!0),V&&Fn){const ae=()=>{a.subTree=jn(a),Fn(V,a.subTree,a,v,null)};Q?f.type.__asyncLoader().then(()=>!a.isUnmounted&&ae()):ae()}else{const ae=a.subTree=jn(a);P(null,ae,p,_,a,v,S),f.el=ae.el}if(z&&ye(z,v),!Q&&(L=F&&F.onVnodeMounted)){const ae=f;ye(()=>Ce(L,ee,ae),v)}(f.shapeFlag&256||ee&&vt(ee.vnode)&&ee.vnode.shapeFlag&256)&&a.a&&ye(a.a,v),a.isMounted=!0,f=p=_=null}},T=a.effect=new vr(C,Se,()=>Tn(b),a.scope),b=a.update=()=>{T.dirty&&T.run()};b.id=a.uid,nt(a,!0),b()},X=(a,f,p)=>{f.component=a;const _=a.vnode.props;a.vnode=f,a.next=null,Fl(a,f.props,_,p),jl(a,f.children,p),et(),zr(a),Ve()},H=(a,f,p,_,v,S,R,C,T=!1)=>{const b=a&&a.children,L=a?a.shapeFlag:0,V=f.children,{patchFlag:F,shapeFlag:k}=f;if(F>0){if(F&128){kt(b,V,p,_,v,S,R,C,T);return}else if(F&256){Fe(b,V,p,_,v,S,R,C,T);return}}k&8?(L&16&&$e(b,v,S),V!==b&&d(p,V)):L&16?k&16?kt(b,V,p,_,v,S,R,C,T):$e(b,v,S,!0):(L&8&&d(p,""),k&16&&U(V,p,_,v,S,R,C,T))},Fe=(a,f,p,_,v,S,R,C,T)=>{a=a||gt,f=f||gt;const b=a.length,L=f.length,V=Math.min(b,L);let F;for(F=0;FL?$e(a,v,S,!0,!1,V):U(f,p,_,v,S,R,C,T,V)},kt=(a,f,p,_,v,S,R,C,T)=>{let b=0;const L=f.length;let V=a.length-1,F=L-1;for(;b<=V&&b<=F;){const k=a[b],z=f[b]=T?Ge(f[b]):Ae(f[b]);if(lt(k,z))P(k,z,p,null,v,S,R,C,T);else break;b++}for(;b<=V&&b<=F;){const k=a[V],z=f[F]=T?Ge(f[F]):Ae(f[F]);if(lt(k,z))P(k,z,p,null,v,S,R,C,T);else break;V--,F--}if(b>V){if(b<=F){const k=F+1,z=kF)for(;b<=V;)Oe(a[b],v,S,!0),b++;else{const k=b,z=b,ee=new Map;for(b=z;b<=F;b++){const be=f[b]=T?Ge(f[b]):Ae(f[b]);be.key!=null&&ee.set(be.key,b)}let Q,ae=0;const Te=F-z+1;let ht=!1,Hr=0;const St=new Array(Te);for(b=0;b=Te){Oe(be,v,S,!0);continue}let Le;if(be.key!=null)Le=ee.get(be.key);else for(Q=z;Q<=F;Q++)if(St[Q-z]===0&<(be,f[Q])){Le=Q;break}Le===void 0?Oe(be,v,S,!0):(St[Le-z]=b+1,Le>=Hr?Hr=Le:ht=!0,P(be,f[Le],p,null,v,S,R,C,T),ae++)}const jr=ht?kl(St):gt;for(Q=jr.length-1,b=Te-1;b>=0;b--){const be=z+b,Le=f[be],Vr=be+1{const{el:S,type:R,transition:C,children:T,shapeFlag:b}=a;if(b&6){tt(a.component.subTree,f,p,_);return}if(b&128){a.suspense.move(f,p,_);return}if(b&64){R.move(a,f,p,dt);return}if(R===_e){r(S,f,p);for(let V=0;VC.enter(S),v);else{const{leave:V,delayLeave:F,afterLeave:k}=C,z=()=>r(S,f,p),ee=()=>{V(S,()=>{z(),k&&k()})};F?F(S,z,ee):ee()}else r(S,f,p)},Oe=(a,f,p,_=!1,v=!1)=>{const{type:S,props:R,ref:C,children:T,dynamicChildren:b,shapeFlag:L,patchFlag:V,dirs:F,memoIndex:k}=a;if(V===-2&&(v=!1),C!=null&&gn(C,null,p,a,!0),k!=null&&(f.renderCache[k]=void 0),L&256){f.ctx.deactivate(a);return}const z=L&1&&F,ee=!vt(a);let Q;if(ee&&(Q=R&&R.onVnodeBeforeUnmount)&&Ce(Q,f,a),L&6)fo(a.component,p,_);else{if(L&128){a.suspense.unmount(p,_);return}z&&Ie(a,null,f,"beforeUnmount"),L&64?a.type.remove(a,f,p,dt,_):b&&(S!==_e||V>0&&V&64)?$e(b,f,p,!1,!0):(S===_e&&V&384||!v&&L&16)&&$e(T,f,p),_&&Fr(a)}(ee&&(Q=R&&R.onVnodeUnmounted)||z)&&ye(()=>{Q&&Ce(Q,f,a),z&&Ie(a,null,f,"unmounted")},p)},Fr=a=>{const{type:f,el:p,anchor:_,transition:v}=a;if(f===_e){uo(p,_);return}if(f===It){m(a);return}const S=()=>{s(p),v&&!v.persisted&&v.afterLeave&&v.afterLeave()};if(a.shapeFlag&1&&v&&!v.persisted){const{leave:R,delayLeave:C}=v,T=()=>R(p,S);C?C(a.el,S,T):T()}else S()},uo=(a,f)=>{let p;for(;a!==f;)p=y(a),s(a),a=p;s(f)},fo=(a,f,p)=>{const{bum:_,scope:v,update:S,subTree:R,um:C,m:T,a:b}=a;os(T),os(b),_&&$n(_),v.stop(),S&&(S.active=!1,Oe(R,a,f,p)),C&&ye(C,f),ye(()=>{a.isUnmounted=!0},f),f&&f.pendingBranch&&!f.isUnmounted&&a.asyncDep&&!a.asyncResolved&&a.suspenseId===f.pendingId&&(f.deps--,f.deps===0&&f.resolve())},$e=(a,f,p,_=!1,v=!1,S=0)=>{for(let R=S;Ra.shapeFlag&6?Wt(a.component.subTree):a.shapeFlag&128?a.suspense.next():y(a.anchor||a.el);let Mn=!1;const $r=(a,f,p)=>{a==null?f._vnode&&Oe(f._vnode,null,null,!0):P(f._vnode||null,a,f,null,null,null,p),Mn||(Mn=!0,zr(),dn(),Mn=!1),f._vnode=a},dt={p:P,um:Oe,m:tt,r:Fr,mt:ne,mc:U,pc:H,pbc:w,n:Wt,o:e};let Nn,Fn;return t&&([Nn,Fn]=t(dt)),{render:$r,hydrate:Nn,createApp:Pl($r,Nn)}}function Un({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function nt({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Ai(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ri(e,t,n=!1){const r=e.children,s=t.children;if(B(r)&&B(s))for(let i=0;i>1,e[n[l]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function Oi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Oi(t)}function os(e){if(e)for(let t=0;tbt(Wl);function Li(e,t){return In(e,null,t)}function Ja(e,t){return In(e,null,{flush:"post"})}const Zt={};function Me(e,t,n){return In(e,t,n)}function In(e,t,{immediate:n,deep:r,flush:s,once:i,onTrack:o,onTrigger:l}=te){if(t&&i){const O=t;t=(...K)=>{O(...K),M()}}const c=ue,u=O=>r===!0?O:ot(O,r===!1?1:void 0);let d,h=!1,y=!1;if(pe(e)?(d=()=>e.value,h=fn(e)):At(e)?(d=()=>u(e),h=!0):B(e)?(y=!0,h=e.some(O=>At(O)||fn(O)),d=()=>e.map(O=>{if(pe(O))return O.value;if(At(O))return u(O);if(W(O))return Xe(O,c,2)})):W(e)?t?d=()=>Xe(e,c,2):d=()=>(E&&E(),xe(e,c,3,[A])):d=Se,t&&r){const O=d;d=()=>ot(O())}let E,A=O=>{E=g.onStop=()=>{Xe(O,c,4),E=g.onStop=void 0}},P;if(Kt)if(A=Se,t?n&&xe(t,c,3,[d(),y?[]:void 0,A]):d(),s==="sync"){const O=ql();P=O.__watcherHandles||(O.__watcherHandles=[])}else return Se;let $=y?new Array(e.length).fill(Zt):Zt;const q=()=>{if(!(!g.active||!g.dirty))if(t){const O=g.run();(r||h||(y?O.some((K,U)=>Je(K,$[U])):Je(O,$)))&&(E&&E(),xe(t,c,3,[O,$===Zt?void 0:y&&$[0]===Zt?[]:$,A]),$=O)}else g.run()};q.allowRecurse=!!t;let D;s==="sync"?D=q:s==="post"?D=()=>ye(q,c&&c.suspense):(q.pre=!0,c&&(q.id=c.uid),D=()=>Tn(q));const g=new vr(d,Se,D),m=Ks(),M=()=>{g.stop(),m&&gr(m.effects,g)};return t?n?q():$=g.run():s==="post"?ye(g.run.bind(g),c&&c.suspense):g.run(),P&&P.push(M),M}function Gl(e,t,n){const r=this.proxy,s=ie(e)?e.includes(".")?Ii(r,e):()=>r[e]:e.bind(r,r);let i;W(t)?i=t:(i=t.handler,n=t);const o=Bt(this),l=In(s,i.bind(r),n);return o(),l}function Ii(e,t){const n=t.split(".");return()=>{let r=e;for(let s=0;s{ot(r,t,n)});else if(js(e)){for(const r in e)ot(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&ot(e[r],t,n)}return e}const Ut=e=>e.type.__isKeepAlive;function zl(e,t){Pi(e,"a",t)}function Xl(e,t){Pi(e,"da",t)}function Pi(e,t,n=ue){const r=e.__wdc||(e.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(On(t,r,n),n){let s=n.parent;for(;s&&s.parent;)Ut(s.parent.vnode)&&Yl(r,t,n,s),s=s.parent}}function Yl(e,t,n,r){const s=On(t,e,r,!0);Ln(()=>{gr(r[t],s)},n)}const qe=Symbol("_leaveCb"),en=Symbol("_enterCb");function Jl(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ct(()=>{e.isMounted=!0}),gi(()=>{e.isUnmounting=!0}),e}const Ee=[Function,Array],Mi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ee,onEnter:Ee,onAfterEnter:Ee,onEnterCancelled:Ee,onBeforeLeave:Ee,onLeave:Ee,onAfterLeave:Ee,onLeaveCancelled:Ee,onBeforeAppear:Ee,onAppear:Ee,onAfterAppear:Ee,onAppearCancelled:Ee},Ni=e=>{const t=e.subTree;return t.component?Ni(t.component):t},Ql={name:"BaseTransition",props:Mi,setup(e,{slots:t}){const n=Pn(),r=Jl();return()=>{const s=t.default&&$i(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1){for(const y of s)if(y.type!==me){i=y;break}}const o=J(e),{mode:l}=o;if(r.isLeaving)return Bn(i);const c=ls(i);if(!c)return Bn(i);let u=ur(c,o,r,n,y=>u=y);mn(c,u);const d=n.subTree,h=d&&ls(d);if(h&&h.type!==me&&!lt(c,h)&&Ni(n).type!==me){const y=ur(h,o,r,n);if(mn(h,y),l==="out-in"&&c.type!==me)return r.isLeaving=!0,y.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Bn(i);l==="in-out"&&c.type!==me&&(y.delayLeave=(E,A,P)=>{const $=Fi(r,h);$[String(h.key)]=h,E[qe]=()=>{A(),E[qe]=void 0,delete u.delayedLeave},u.delayedLeave=P})}return i}}},Zl=Ql;function Fi(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ur(e,t,n,r,s){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:c,onEnter:u,onAfterEnter:d,onEnterCancelled:h,onBeforeLeave:y,onLeave:E,onAfterLeave:A,onLeaveCancelled:P,onBeforeAppear:$,onAppear:q,onAfterAppear:D,onAppearCancelled:g}=t,m=String(e.key),M=Fi(n,e),O=(I,w)=>{I&&xe(I,r,9,w)},K=(I,w)=>{const N=w[1];O(I,w),B(I)?I.every(x=>x.length<=1)&&N():I.length<=1&&N()},U={mode:o,persisted:l,beforeEnter(I){let w=c;if(!n.isMounted)if(i)w=$||c;else return;I[qe]&&I[qe](!0);const N=M[m];N&<(e,N)&&N.el[qe]&&N.el[qe](),O(w,[I])},enter(I){let w=u,N=d,x=h;if(!n.isMounted)if(i)w=q||u,N=D||d,x=g||h;else return;let G=!1;const ne=I[en]=ce=>{G||(G=!0,ce?O(x,[I]):O(N,[I]),U.delayedLeave&&U.delayedLeave(),I[en]=void 0)};w?K(w,[I,ne]):ne()},leave(I,w){const N=String(e.key);if(I[en]&&I[en](!0),n.isUnmounting)return w();O(y,[I]);let x=!1;const G=I[qe]=ne=>{x||(x=!0,w(),ne?O(P,[I]):O(A,[I]),I[qe]=void 0,M[N]===e&&delete M[N])};M[N]=e,E?K(E,[I,G]):G()},clone(I){const w=ur(I,t,n,r,s);return s&&s(w),w}};return U}function Bn(e){if(Ut(e))return e=Qe(e),e.children=null,e}function ls(e){if(!Ut(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&W(n.default))return n.default()}}function mn(e,t){e.shapeFlag&6&&e.component?mn(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function $i(e,t=!1,n){let r=[],s=0;for(let i=0;i1)for(let i=0;ie.__isTeleport,_e=Symbol.for("v-fgt"),wt=Symbol.for("v-txt"),me=Symbol.for("v-cmt"),It=Symbol.for("v-stc"),Pt=[];let Re=null;function Hi(e=!1){Pt.push(Re=e?null:[])}function tc(){Pt.pop(),Re=Pt[Pt.length-1]||null}let Ht=1;function cs(e){Ht+=e}function ji(e){return e.dynamicChildren=Ht>0?Re||gt:null,tc(),Ht>0&&Re&&Re.push(e),e}function Qa(e,t,n,r,s,i){return ji(Ui(e,t,n,r,s,i,!0))}function Vi(e,t,n,r,s){return ji(se(e,t,n,r,s,!0))}function yn(e){return e?e.__v_isVNode===!0:!1}function lt(e,t){return e.type===t.type&&e.key===t.key}const Di=({key:e})=>e??null,ln=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ie(e)||pe(e)||W(e)?{i:he,r:e,k:t,f:!!n}:e:null);function Ui(e,t=null,n=null,r=0,s=null,i=e===_e?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Di(t),ref:t&&ln(t),scopeId:Rn,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:s,dynamicChildren:null,appContext:null,ctx:he};return l?(Ir(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=ie(n)?8:16),Ht>0&&!o&&Re&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Re.push(c),c}const se=nc;function nc(e,t=null,n=null,r=0,s=null,i=!1){if((!e||e===di)&&(e=me),yn(e)){const l=Qe(e,t,!0);return n&&Ir(l,n),Ht>0&&!i&&Re&&(l.shapeFlag&6?Re[Re.indexOf(e)]=l:Re.push(l)),l.patchFlag=-2,l}if(dc(e)&&(e=e.__vccOpts),t){t=rc(t);let{class:l,style:c}=t;l&&!ie(l)&&(t.class=_r(l)),Z(c)&&(ti(c)&&!B(c)&&(c=le({},c)),t.style=yr(c))}const o=ie(e)?1:ml(e)?128:ec(e)?64:Z(e)?4:W(e)?2:0;return Ui(e,t,n,r,s,o,i,!0)}function rc(e){return e?ti(e)||wi(e)?le({},e):e:null}function Qe(e,t,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:l,transition:c}=e,u=t?sc(s||{},t):s,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Di(u),ref:t&&t.ref?n&&i?B(i)?i.concat(ln(t)):[i,ln(t)]:ln(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==_e?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Qe(e.ssContent),ssFallback:e.ssFallback&&Qe(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&mn(d,c.clone(d)),d}function Bi(e=" ",t=0){return se(wt,null,e,t)}function Za(e,t){const n=se(It,null,e);return n.staticCount=t,n}function eu(e="",t=!1){return t?(Hi(),Vi(me,null,e)):se(me,null,e)}function Ae(e){return e==null||typeof e=="boolean"?se(me):B(e)?se(_e,null,e.slice()):typeof e=="object"?Ge(e):se(wt,null,String(e))}function Ge(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Qe(e)}function Ir(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(B(t))n=16;else if(typeof t=="object")if(r&65){const s=t.default;s&&(s._c&&(s._d=!1),Ir(e,s()),s._c&&(s._d=!0));return}else{n=32;const s=t._;!s&&!wi(t)?t._ctx=he:s===3&&he&&(he.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else W(t)?(t={default:t,_ctx:he},n=32):(t=String(t),r&64?(n=16,t=[Bi(t)]):n=8);e.children=t,e.shapeFlag|=n}function sc(...e){const t={};for(let n=0;nue||he;let _n,fr;{const e=Ds(),t=(n,r)=>{let s;return(s=e[n])||(s=e[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};_n=t("__VUE_INSTANCE_SETTERS__",n=>ue=n),fr=t("__VUE_SSR_SETTERS__",n=>Kt=n)}const Bt=e=>{const t=ue;return _n(e),e.scope.on(),()=>{e.scope.off(),_n(t)}},as=()=>{ue&&ue.scope.off(),_n(null)};function Ki(e){return e.vnode.shapeFlag&4}let Kt=!1;function cc(e,t=!1){t&&fr(t);const{props:n,children:r}=e.vnode,s=Ki(e);Nl(e,n,s,t),Hl(e,r);const i=s?ac(e,t):void 0;return t&&fr(!1),i}function ac(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Sl);const{setup:r}=n;if(r){const s=e.setupContext=r.length>1?Wi(e):null,i=Bt(e);et();const o=Xe(r,e,0,[e.props,s]);if(Ve(),i(),$s(o)){if(o.then(as,as),t)return o.then(l=>{us(e,l,t)}).catch(l=>{Dt(l,e,0)});e.asyncDep=o}else us(e,o,t)}else ki(e,t)}function us(e,t,n){W(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Z(t)&&(e.setupState=oi(t)),ki(e,n)}let fs;function ki(e,t,n){const r=e.type;if(!e.render){if(!t&&fs&&!r.render){const s=r.template||Or(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:c}=r,u=le(le({isCustomElement:i,delimiters:l},o),c);r.render=fs(s,u)}}e.render=r.render||Se}{const s=Bt(e);et();try{Tl(e)}finally{Ve(),s()}}}const uc={get(e,t){return ve(e,"get",""),e[t]}};function Wi(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,uc),slots:e.slots,emit:e.emit,expose:t}}function Pr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(oi(on(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ot)return Ot[n](e)},has(t,n){return n in t||n in Ot}})):e.proxy}function fc(e,t=!0){return W(e)?e.displayName||e.name:e.name||t&&e.__name}function dc(e){return W(e)&&"__vccOpts"in e}const re=(e,t)=>Yo(e,t,Kt);function dr(e,t,n){const r=arguments.length;return r===2?Z(t)&&!B(t)?yn(t)?se(e,null,[t]):se(e,t):se(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&yn(n)&&(n=[n]),se(e,t,n))}const hc="3.4.30";/** +* @vue/runtime-dom v3.4.30 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const pc="http://www.w3.org/2000/svg",gc="http://www.w3.org/1998/Math/MathML",He=typeof document<"u"?document:null,ds=He&&He.createElement("template"),mc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?He.createElementNS(pc,e):t==="mathml"?He.createElementNS(gc,e):n?He.createElement(e,{is:n}):He.createElement(e);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>He.createTextNode(e),createComment:e=>He.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>He.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const o=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{ds.innerHTML=r==="svg"?`${e}`:r==="mathml"?`${e}`:e;const l=ds.content;if(r==="svg"||r==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ke="transition",xt="animation",jt=Symbol("_vtc"),qi=(e,{slots:t})=>dr(Zl,yc(e),t);qi.displayName="Transition";const Gi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};qi.props=le({},Mi,Gi);const rt=(e,t=[])=>{B(e)?e.forEach(n=>n(...t)):e&&e(...t)},hs=e=>e?B(e)?e.some(t=>t.length>1):e.length>1:!1;function yc(e){const t={};for(const x in e)x in Gi||(t[x]=e[x]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:u=o,appearToClass:d=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:y=`${n}-leave-active`,leaveToClass:E=`${n}-leave-to`}=e,A=_c(s),P=A&&A[0],$=A&&A[1],{onBeforeEnter:q,onEnter:D,onEnterCancelled:g,onLeave:m,onLeaveCancelled:M,onBeforeAppear:O=q,onAppear:K=D,onAppearCancelled:U=g}=t,I=(x,G,ne)=>{st(x,G?d:l),st(x,G?u:o),ne&&ne()},w=(x,G)=>{x._isLeaving=!1,st(x,h),st(x,E),st(x,y),G&&G()},N=x=>(G,ne)=>{const ce=x?K:D,j=()=>I(G,x,ne);rt(ce,[G,j]),ps(()=>{st(G,x?c:i),ke(G,x?d:l),hs(ce)||gs(G,r,P,j)})};return le(t,{onBeforeEnter(x){rt(q,[x]),ke(x,i),ke(x,o)},onBeforeAppear(x){rt(O,[x]),ke(x,c),ke(x,u)},onEnter:N(!1),onAppear:N(!0),onLeave(x,G){x._isLeaving=!0;const ne=()=>w(x,G);ke(x,h),ke(x,y),wc(),ps(()=>{x._isLeaving&&(st(x,h),ke(x,E),hs(m)||gs(x,r,$,ne))}),rt(m,[x,ne])},onEnterCancelled(x){I(x,!1),rt(g,[x])},onAppearCancelled(x){I(x,!0),rt(U,[x])},onLeaveCancelled(x){w(x),rt(M,[x])}})}function _c(e){if(e==null)return null;if(Z(e))return[Kn(e.enter),Kn(e.leave)];{const t=Kn(e);return[t,t]}}function Kn(e){return vo(e)}function ke(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[jt]||(e[jt]=new Set)).add(t)}function st(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[jt];n&&(n.delete(t),n.size||(e[jt]=void 0))}function ps(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let vc=0;function gs(e,t,n,r){const s=e._endId=++vc,i=()=>{s===e._endId&&r()};if(n)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=bc(e,t);if(!o)return r();const u=o+"end";let d=0;const h=()=>{e.removeEventListener(u,y),i()},y=E=>{E.target===e&&++d>=c&&h()};setTimeout(()=>{d(n[A]||"").split(", "),s=r(`${Ke}Delay`),i=r(`${Ke}Duration`),o=ms(s,i),l=r(`${xt}Delay`),c=r(`${xt}Duration`),u=ms(l,c);let d=null,h=0,y=0;t===Ke?o>0&&(d=Ke,h=o,y=i.length):t===xt?u>0&&(d=xt,h=u,y=c.length):(h=Math.max(o,u),d=h>0?o>u?Ke:xt:null,y=d?d===Ke?i.length:c.length:0);const E=d===Ke&&/\b(transform|all)(,|$)/.test(r(`${Ke}Property`).toString());return{type:d,timeout:h,propCount:y,hasTransform:E}}function ms(e,t){for(;e.lengthys(n)+ys(e[r])))}function ys(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function wc(){return document.body.offsetHeight}function Ec(e,t,n){const r=e[jt];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const _s=Symbol("_vod"),Cc=Symbol("_vsh"),Sc=Symbol(""),xc=/(^|;)\s*display\s*:/;function Tc(e,t,n){const r=e.style,s=ie(n);let i=!1;if(n&&!s){if(t)if(ie(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&cn(r,l,"")}else for(const o in t)n[o]==null&&cn(r,o,"");for(const o in n)o==="display"&&(i=!0),cn(r,o,n[o])}else if(s){if(t!==n){const o=r[Sc];o&&(n+=";"+o),r.cssText=n,i=xc.test(n)}}else t&&e.removeAttribute("style");_s in e&&(e[_s]=i?r.display:"",e[Cc]&&(r.display="none"))}const vs=/\s*!important$/;function cn(e,t,n){if(B(n))n.forEach(r=>cn(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Ac(e,t);vs.test(n)?e.setProperty(ft(r),n.replace(vs,""),"important"):e[r]=n}}const bs=["Webkit","Moz","ms"],kn={};function Ac(e,t){const n=kn[t];if(n)return n;let r=Ne(t);if(r!=="filter"&&r in e)return kn[t]=r;r=wn(r);for(let s=0;sWn||(Mc.then(()=>Wn=0),Wn=Date.now());function Fc(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;xe($c(r,n.value),t,5,[r])};return n.value=e,n.attached=Nc(),n}function $c(e,t){if(B(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const xs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Hc=(e,t,n,r,s,i,o,l,c)=>{const u=s==="svg";t==="class"?Ec(e,r,u):t==="style"?Tc(e,n,r):Vt(t)?pr(t)||Ic(e,t,n,r,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):jc(e,t,r,u))?(Rc(e,t,r,i,o,l,c),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Es(e,t,r,u,o,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Es(e,t,r,u))};function jc(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&xs(t)&&W(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return xs(t)&&ie(n)?!1:t in e}const Vc=["ctrl","shift","alt","meta"],Dc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Vc.some(n=>e[`${n}Key`]&&!t.includes(n))},tu=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=ft(s.key);if(t.some(o=>o===i||Uc[o]===i))return e(s)})},Bc=le({patchProp:Hc},mc);let qn,Ts=!1;function Kc(){return qn=Ts?qn:Bl(Bc),Ts=!0,qn}const ru=(...e)=>{const t=Kc().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=Wc(r);if(s)return n(s,!0,kc(s))},t};function kc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Wc(e){return ie(e)?document.querySelector(e):e}const su=(e,t)=>{const n=e.__vccOpts||e;for(const[r,s]of t)n[r]=s;return n},qc="modulepreload",Gc=function(e){return"/"+e},As={},iu=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),o=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.all(n.map(l=>{if(l=Gc(l),l in As)return;As[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":qc,c||(d.as="script",d.crossOrigin=""),d.href=l,o&&d.setAttribute("nonce",o),document.head.appendChild(d),c)return new Promise((h,y)=>{d.addEventListener("load",h),d.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${l}`)))})}))}return s.then(()=>t()).catch(i=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i})},zc=window.__VP_SITE_DATA__;function Mr(e){return Ks()?(Ro(e),!0):!1}function Ye(e){return typeof e=="function"?e():ii(e)}const zi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Xc=Object.prototype.toString,Yc=e=>Xc.call(e)==="[object Object]",Xi=()=>{},Rs=Jc();function Jc(){var e,t;return zi&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Qc(e,t){function n(...r){return new Promise((s,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(s).catch(i)})}return n}const Yi=e=>e();function Zc(e=Yi){const t=oe(!0);function n(){t.value=!1}function r(){t.value=!0}const s=(...i)=>{t.value&&e(...i)};return{isActive:Sn(t),pause:n,resume:r,eventFilter:s}}function ea(e){return Pn()}function Ji(...e){if(e.length!==1)return rl(...e);const t=e[0];return typeof t=="function"?Sn(el(()=>({get:t,set:Xi}))):oe(t)}function ta(e,t,n={}){const{eventFilter:r=Yi,...s}=n;return Me(e,Qc(r,t),s)}function na(e,t,n={}){const{eventFilter:r,...s}=n,{eventFilter:i,pause:o,resume:l,isActive:c}=Zc(r);return{stop:ta(e,t,{...s,eventFilter:i}),pause:o,resume:l,isActive:c}}function Nr(e,t=!0,n){ea()?Ct(e,n):t?e():xn(e)}function Qi(e){var t;const n=Ye(e);return(t=n==null?void 0:n.$el)!=null?t:n}const De=zi?window:void 0;function Et(...e){let t,n,r,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,s]=e,t=De):[t,n,r,s]=e,!t)return Xi;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const i=[],o=()=>{i.forEach(d=>d()),i.length=0},l=(d,h,y,E)=>(d.addEventListener(h,y,E),()=>d.removeEventListener(h,y,E)),c=Me(()=>[Qi(t),Ye(s)],([d,h])=>{if(o(),!d)return;const y=Yc(h)?{...h}:h;i.push(...n.flatMap(E=>r.map(A=>l(d,E,A,y))))},{immediate:!0,flush:"post"}),u=()=>{c(),o()};return Mr(u),u}function ra(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function ou(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:s=De,eventName:i="keydown",passive:o=!1,dedupe:l=!1}=r,c=ra(t);return Et(s,i,d=>{d.repeat&&Ye(l)||c(d)&&n(d)},o)}function sa(){const e=oe(!1),t=Pn();return t&&Ct(()=>{e.value=!0},t),e}function ia(e){const t=sa();return re(()=>(t.value,!!e()))}function Zi(e,t={}){const{window:n=De}=t,r=ia(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let s;const i=oe(!1),o=u=>{i.value=u.matches},l=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",o):s.removeListener(o))},c=Li(()=>{r.value&&(l(),s=n.matchMedia(Ye(e)),"addEventListener"in s?s.addEventListener("change",o):s.addListener(o),i.value=s.matches)});return Mr(()=>{c(),l(),s=void 0}),i}const tn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},nn="__vueuse_ssr_handlers__",oa=la();function la(){return nn in tn||(tn[nn]=tn[nn]||{}),tn[nn]}function eo(e,t){return oa[e]||t}function ca(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const aa={boolean:{read:e=>e==="true",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()}},Os="vueuse-storage";function ua(e,t,n,r={}){var s;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:h=De,eventFilter:y,onError:E=w=>{console.error(w)},initOnMounted:A}=r,P=(d?ri:oe)(typeof t=="function"?t():t);if(!n)try{n=eo("getDefaultStorage",()=>{var w;return(w=De)==null?void 0:w.localStorage})()}catch(w){E(w)}if(!n)return P;const $=Ye(t),q=ca($),D=(s=r.serializer)!=null?s:aa[q],{pause:g,resume:m}=na(P,()=>O(P.value),{flush:i,deep:o,eventFilter:y});h&&l&&Nr(()=>{Et(h,"storage",U),Et(h,Os,I),A&&U()}),A||U();function M(w,N){h&&h.dispatchEvent(new CustomEvent(Os,{detail:{key:e,oldValue:w,newValue:N,storageArea:n}}))}function O(w){try{const N=n.getItem(e);if(w==null)M(N,null),n.removeItem(e);else{const x=D.write(w);N!==x&&(n.setItem(e,x),M(N,x))}}catch(N){E(N)}}function K(w){const N=w?w.newValue:n.getItem(e);if(N==null)return c&&$!=null&&n.setItem(e,D.write($)),$;if(!w&&u){const x=D.read(N);return typeof u=="function"?u(x,$):q==="object"&&!Array.isArray(x)?{...$,...x}:x}else return typeof N!="string"?N:D.read(N)}function U(w){if(!(w&&w.storageArea!==n)){if(w&&w.key==null){P.value=$;return}if(!(w&&w.key!==e)){g();try{(w==null?void 0:w.newValue)!==D.write(P.value)&&(P.value=K(w))}catch(N){E(N)}finally{w?xn(m):m()}}}}function I(w){U(w.detail)}return P}function to(e){return Zi("(prefers-color-scheme: dark)",e)}function fa(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:s=De,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:u,disableTransition:d=!0}=e,h={auto:"",light:"light",dark:"dark",...e.modes||{}},y=to({window:s}),E=re(()=>y.value?"dark":"light"),A=c||(o==null?Ji(r):ua(o,r,i,{window:s,listenToStorageChanges:l})),P=re(()=>A.value==="auto"?E.value:A.value),$=eo("updateHTMLAttrs",(m,M,O)=>{const K=typeof m=="string"?s==null?void 0:s.document.querySelector(m):Qi(m);if(!K)return;let U;if(d&&(U=s.document.createElement("style"),U.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),s.document.head.appendChild(U)),M==="class"){const I=O.split(/\s/g);Object.values(h).flatMap(w=>(w||"").split(/\s/g)).filter(Boolean).forEach(w=>{I.includes(w)?K.classList.add(w):K.classList.remove(w)})}else K.setAttribute(M,O);d&&(s.getComputedStyle(U).opacity,document.head.removeChild(U))});function q(m){var M;$(t,n,(M=h[m])!=null?M:m)}function D(m){e.onChanged?e.onChanged(m,q):q(m)}Me(P,D,{flush:"post",immediate:!0}),Nr(()=>D(P.value));const g=re({get(){return u?A.value:P.value},set(m){A.value=m}});try{return Object.assign(g,{store:A,system:E,state:P})}catch{return g}}function da(e={}){const{valueDark:t="dark",valueLight:n="",window:r=De}=e,s=fa({...e,onChanged:(l,c)=>{var u;e.onChanged?(u=e.onChanged)==null||u.call(e,l==="dark",c,l):c(l)},modes:{dark:t,light:n}}),i=re(()=>s.system?s.system.value:to({window:r}).value?"dark":"light");return re({get(){return s.value==="dark"},set(l){const c=l?"dark":"light";i.value===c?s.value="auto":s.value=c}})}function Gn(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function no(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const zn=new WeakMap;function lu(e,t=!1){const n=oe(t);let r=null,s="";Me(Ji(e),l=>{const c=Gn(Ye(l));if(c){const u=c;if(zn.get(u)||zn.set(u,u.style.overflow),u.style.overflow!=="hidden"&&(s=u.style.overflow),u.style.overflow==="hidden")return n.value=!0;if(n.value)return u.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=Gn(Ye(e));!l||n.value||(Rs&&(r=Et(l,"touchmove",c=>{ha(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},o=()=>{const l=Gn(Ye(e));!l||!n.value||(Rs&&(r==null||r()),l.style.overflow=s,zn.delete(l),n.value=!1)};return Mr(o),re({get(){return n.value},set(l){l?i():o()}})}function cu(e={}){const{window:t=De,behavior:n="auto"}=e;if(!t)return{x:oe(0),y:oe(0)};const r=oe(t.scrollX),s=oe(t.scrollY),i=re({get(){return r.value},set(l){scrollTo({left:l,behavior:n})}}),o=re({get(){return s.value},set(l){scrollTo({top:l,behavior:n})}});return Et(t,"scroll",()=>{r.value=t.scrollX,s.value=t.scrollY},{capture:!1,passive:!0}),{x:i,y:o}}function au(e={}){const{window:t=De,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:i=!0}=e,o=oe(n),l=oe(r),c=()=>{t&&(i?(o.value=t.innerWidth,l.value=t.innerHeight):(o.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight))};if(c(),Nr(c),Et("resize",c,{passive:!0}),s){const u=Zi("(orientation: portrait)");Me(u,()=>c())}return{width:o,height:l}}var Xn={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1},Yn={};const ro=/^(?:[a-z]+:|\/\/)/i,pa="vitepress-theme-appearance",ga=/#.*$/,ma=/[?#].*$/,ya=/(?:(^|\/)index)?\.(?:md|html)$/,fe=typeof document<"u",so={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function _a(e,t,n=!1){if(t===void 0)return!1;if(e=Ls(`/${e}`),n)return new RegExp(t).test(e);if(Ls(t)!==e)return!1;const r=t.match(ga);return r?(fe?location.hash:"")===r[0]:!0}function Ls(e){return decodeURI(e).replace(ma,"").replace(ya,"$1")}function va(e){return ro.test(e)}function ba(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!va(n)&&_a(t,`/${n}/`,!0))||"root"}function wa(e,t){var r,s,i,o,l,c,u;const n=ba(e,t);return Object.assign({},e,{localeIndex:n,lang:((r=e.locales[n])==null?void 0:r.lang)??e.lang,dir:((s=e.locales[n])==null?void 0:s.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:oo(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(u=e.locales[n])==null?void 0:u.themeConfig}})}function io(e,t){const n=t.title||e.title,r=t.titleTemplate??e.titleTemplate;if(typeof r=="string"&&r.includes(":title"))return r.replace(/:title/g,n);const s=Ea(e.title,r);return n===s.slice(3)?n:`${n}${s}`}function Ea(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function Ca(e,t){const[n,r]=t;if(n!=="meta")return!1;const s=Object.entries(r)[0];return s==null?!1:e.some(([i,o])=>i===n&&o[s[0]]===s[1])}function oo(e,t){return[...e.filter(n=>!Ca(t,n)),...t]}const Sa=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,xa=/^[a-z]:/i;function Is(e){const t=xa.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Sa,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const Jn=new Set;function Ta(e){if(Jn.size===0){const n=typeof process=="object"&&(Yn==null?void 0:Yn.VITE_EXTRA_EXTENSIONS)||(Xn==null?void 0:Xn.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(r=>Jn.add(r))}const t=e.split(".").pop();return t==null||!Jn.has(t.toLowerCase())}const Aa=Symbol(),ut=ri(zc);function uu(e){const t=re(()=>wa(ut.value,e.data.relativePath)),n=t.value.appearance,r=n==="force-dark"?oe(!0):n?da({storageKey:pa,initialValue:()=>typeof n=="string"?n:"auto",...typeof n=="object"?n:{}}):oe(!1),s=oe(fe?location.hash:"");return fe&&window.addEventListener("hashchange",()=>{s.value=location.hash}),Me(()=>e.data,()=>{s.value=fe?location.hash:""}),{site:t,theme:re(()=>t.value.themeConfig),page:re(()=>e.data),frontmatter:re(()=>e.data.frontmatter),params:re(()=>e.data.params),lang:re(()=>t.value.lang),dir:re(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:re(()=>t.value.localeIndex||"root"),title:re(()=>io(t.value,e.data)),description:re(()=>e.data.description||t.value.description),isDark:r,hash:re(()=>s.value)}}function Ra(){const e=bt(Aa);if(!e)throw new Error("vitepress data not properly injected in app");return e}function Oa(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function Ps(e){return ro.test(e)||!e.startsWith("/")?e:Oa(ut.value.base,e)}function La(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),fe){const n="/";t=Is(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let r=__VP_HASH_MAP__[t.toLowerCase()];if(r||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",r=__VP_HASH_MAP__[t.toLowerCase()]),!r)return null;t=`${n}assets/${t}.${r}.js`}else t=`./${Is(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let an=[];function fu(e){an.push(e),Ln(()=>{an=an.filter(t=>t!==e)})}function Ia(){let e=ut.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=Ms(e,n);else if(Array.isArray(e))for(const r of e){const s=Ms(r,n);if(s){t=s;break}}return t}function Ms(e,t){const n=document.querySelector(e);if(!n)return 0;const r=n.getBoundingClientRect().bottom;return r<0?0:r+t}const Pa=Symbol(),lo="http://a.com",Ma=()=>({path:"/",component:null,data:so});function du(e,t){const n=Cn(Ma()),r={route:n,go:s};async function s(l=fe?location.href:"/"){var c,u;l=Qn(l),await((c=r.onBeforeRouteChange)==null?void 0:c.call(r,l))!==!1&&(fe&&l!==Qn(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await o(l),await((u=r.onAfterRouteChanged)==null?void 0:u.call(r,l)))}let i=null;async function o(l,c=0,u=!1){var y;if(await((y=r.onBeforePageLoad)==null?void 0:y.call(r,l))===!1)return;const d=new URL(l,lo),h=i=d.pathname;try{let E=await e(h);if(!E)throw new Error(`Page not found: ${h}`);if(i===h){i=null;const{default:A,__pageData:P}=E;if(!A)throw new Error(`Invalid route component: ${A}`);n.path=fe?h:Ps(h),n.component=on(A),n.data=on(P),fe&&xn(()=>{let $=ut.value.base+P.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!ut.value.cleanUrls&&!$.endsWith("/")&&($+=".html"),$!==d.pathname&&(d.pathname=$,l=$+d.search+d.hash,history.replaceState({},"",l)),d.hash&&!c){let q=null;try{q=document.getElementById(decodeURIComponent(d.hash).slice(1))}catch(D){console.warn(D)}if(q){Ns(q,d.hash);return}}window.scrollTo(0,c)})}}catch(E){if(!/fetch|Page not found/.test(E.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(E),!u)try{const A=await fetch(ut.value.base+"hashmap.json");window.__VP_HASH_MAP__=await A.json(),await o(l,c,!0);return}catch{}if(i===h){i=null,n.path=fe?h:Ps(h),n.component=t?on(t):null;const A=fe?h.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={...so,relativePath:A}}}}return fe&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.target.closest("button"))return;const u=l.target.closest("a");if(u&&!u.closest(".vp-raw")&&(u instanceof SVGElement||!u.download)){const{target:d}=u,{href:h,origin:y,pathname:E,hash:A,search:P}=new URL(u.href instanceof SVGAnimatedString?u.href.animVal:u.href,u.baseURI),$=new URL(location.href);!l.ctrlKey&&!l.shiftKey&&!l.altKey&&!l.metaKey&&!d&&y===$.origin&&Ta(E)&&(l.preventDefault(),E===$.pathname&&P===$.search?(A!==$.hash&&(history.pushState({},"",h),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:$.href,newURL:h}))),A?Ns(u,A,u.classList.contains("header-anchor")):window.scrollTo(0,0)):s(h))}},{capture:!0}),window.addEventListener("popstate",async l=>{var c;l.state!==null&&(await o(Qn(location.href),l.state&&l.state.scrollPosition||0),(c=r.onAfterRouteChanged)==null||c.call(r,location.href))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),r}function Na(){const e=bt(Pa);if(!e)throw new Error("useRouter() is called without provider.");return e}function co(){return Na().route}function Ns(e,t,n=!1){let r=null;try{r=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(s){console.warn(s)}if(r){let s=function(){!n||Math.abs(o-window.scrollY)>window.innerHeight?window.scrollTo(0,o):window.scrollTo({left:0,top:o,behavior:"smooth"})};const i=parseInt(window.getComputedStyle(r).paddingTop,10),o=window.scrollY+r.getBoundingClientRect().top-Ia()+i;requestAnimationFrame(s)}}function Qn(e){const t=new URL(e,lo);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),ut.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const Zn=()=>an.forEach(e=>e()),hu=Rr({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=co(),{site:n}=Ra();return()=>dr(e.as,n.value.contentProps??{style:{position:"relative"}},[t.component?dr(t.component,{onVnodeMounted:Zn,onVnodeUpdated:Zn,onVnodeUnmounted:Zn}):"404 Page Not Found"])}}),pu=Rr({setup(e,{slots:t}){const n=oe(!1);return Ct(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function gu(){fe&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const r=(n=t.parentElement)==null?void 0:n.parentElement;if(!r)return;const s=Array.from(r.querySelectorAll("input")).indexOf(t);if(s<0)return;const i=r.querySelector(".blocks");if(!i)return;const o=Array.from(i.children).find(u=>u.classList.contains("active"));if(!o)return;const l=i.children[s];if(!l||o===l)return;o.classList.remove("active"),l.classList.add("active");const c=r==null?void 0:r.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function mu(){if(fe){const e=new WeakMap;window.addEventListener("click",t=>{var r;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const s=n.parentElement,i=(r=n.nextElementSibling)==null?void 0:r.nextElementSibling;if(!s||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(s.className),l=[".vp-copy-ignore",".diff.remove"],c=i.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(d=>d.remove());let u=c.textContent||"";o&&(u=u.replace(/^ *(\$|>) /gm,"").trim()),Fa(u).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const d=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,d)})}})}}async function Fa(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const r=document.getSelection(),s=r?r.rangeCount>0&&r.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),s&&(r.removeAllRanges(),r.addRange(s)),n&&n.focus()}}function yu(e,t){let n=!0,r=[];const s=i=>{if(n){n=!1,i.forEach(l=>{const c=er(l);for(const u of document.head.children)if(u.isEqualNode(c)){r.push(u);return}});return}const o=i.map(er);r.forEach((l,c)=>{const u=o.findIndex(d=>d==null?void 0:d.isEqualNode(l??null));u!==-1?delete o[u]:(l==null||l.remove(),delete r[c])}),o.forEach(l=>l&&document.head.appendChild(l)),r=[...r,...o].filter(Boolean)};Li(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[],u=io(o,i);u!==document.title&&(document.title=u);const d=l||o.description;let h=document.querySelector("meta[name=description]");h?h.getAttribute("content")!==d&&h.setAttribute("content",d):er(["meta",{name:"description",content:d}]),s(oo(o.head,Ha(c)))})}function er([e,t,n]){const r=document.createElement(e);for(const s in t)r.setAttribute(s,t[s]);return n&&(r.innerHTML=n),e==="script"&&!t.async&&(r.async=!1),r}function $a(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function Ha(e){return e.filter(t=>!$a(t))}const tr=new Set,ao=()=>document.createElement("link"),ja=e=>{const t=ao();t.rel="prefetch",t.href=e,document.head.appendChild(t)},Va=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let rn;const Da=fe&&(rn=ao())&&rn.relList&&rn.relList.supports&&rn.relList.supports("prefetch")?ja:Va;function _u(){if(!fe||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const r=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!tr.has(c)){tr.add(c);const u=La(c);u&&Da(u)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{hostname:o,pathname:l}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||i.target!=="_blank"&&o===location.hostname&&(l!==location.pathname?n.observe(i):tr.add(l))})})};Ct(r);const s=co();Me(()=>s.path,r),Ln(()=>{n&&n.disconnect()})}export{nu as $,Ja as A,vl as B,Ia as C,ka as D,qa as E,_e as F,ri as G,fu as H,se as I,Wa as J,ro as K,co as L,sc as M,bt as N,au as O,yr as P,ou as Q,xn as R,cu as S,qi as T,fe as U,Sn as V,Ga as W,iu as X,lu as Y,Ml as Z,su as _,Bi as a,Xa as a0,tu as a1,Ya as a2,dr as a3,Za as a4,yu as a5,Pa as a6,uu as a7,Aa as a8,hu as a9,pu as aa,ut as ab,ru as ac,du as ad,La as ae,_u as af,mu as ag,gu as ah,Na as ai,Vi as b,Qa as c,Rr as d,eu as e,Ta as f,Ps as g,re as h,va as i,Ui as j,ii as k,Ka as l,_a as m,_r as n,Hi as o,Ba as p,Zi as q,za as r,oe as s,Ua as t,Ra as u,Me as v,fl as w,Li as x,Ct as y,Ln as z}; diff --git a/assets/chunks/qrcode.59c44dde.js b/assets/chunks/qrcode.59c44dde.js deleted file mode 100644 index ebc7c0a8..00000000 --- a/assets/chunks/qrcode.59c44dde.js +++ /dev/null @@ -1 +0,0 @@ -const s="/assets/qrcode.0a61500e.png";export{s as _}; diff --git a/assets/chunks/qrcode.CZOxHFH-.js b/assets/chunks/qrcode.CZOxHFH-.js new file mode 100644 index 00000000..ffafd68a --- /dev/null +++ b/assets/chunks/qrcode.CZOxHFH-.js @@ -0,0 +1 @@ +const s="/assets/qrcode.b_bFVwtg.png";export{s as _}; diff --git a/assets/chunks/theme.DAaY-8e0.js b/assets/chunks/theme.DAaY-8e0.js new file mode 100644 index 00000000..d6a3cffa --- /dev/null +++ b/assets/chunks/theme.DAaY-8e0.js @@ -0,0 +1,2 @@ +const __vite__fileDeps=["assets/chunks/VPAlgoliaSearchBox.BRY8HxQs.js","assets/chunks/framework.BmdFiWrL.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +import{d as _,o as a,c,r as l,n as M,a as D,t as T,b,w as d,e as f,T as pe,_ as k,u as Ge,i as je,f as ze,g as he,h as $,j as v,k as r,p as B,l as H,m as z,q as ce,s as N,v as j,x as Z,y as W,z as x,A as Pe,B as Ke,C as qe,D as K,F as C,E,G as Le,H as ee,I as m,J as R,K as Ve,L as te,M as Y,N as oe,O as Re,P as Se,Q as We,R as Je,S as we,U as se,V as Ye,W as Xe,X as Qe,Y as Ie,Z as Te,$ as Ze,a0 as xe,a1 as et,a2 as tt,a3 as ie}from"./framework.BmdFiWrL.js";const ot=_({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(o){return(e,t)=>(a(),c("span",{class:M(["VPBadge",e.type])},[l(e.$slots,"default",{},()=>[D(T(e.text),1)])],2))}}),st={key:0,class:"VPBackdrop"},nt=_({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(o){return(e,t)=>(a(),b(pe,{name:"fade"},{default:d(()=>[e.show?(a(),c("div",st)):f("",!0)]),_:1}))}}),at=k(nt,[["__scopeId","data-v-c79a1216"]]),S=Ge;function rt(o,e){let t,n=!1;return()=>{t&&clearTimeout(t),n?t=setTimeout(o,e):(o(),(n=!0)&&setTimeout(()=>n=!1,e))}}function ue(o){return/^\//.test(o)?o:`/${o}`}function fe(o){const{pathname:e,search:t,hash:n,protocol:s}=new URL(o,"http://a.com");if(je(o)||o.startsWith("#")||!s.startsWith("http")||!ze(e))return o;const{site:i}=S(),u=e.endsWith("/")||e.endsWith(".html")?o:o.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,i.value.cleanUrls?"":".html")}${t}${n}`);return he(u)}function J({correspondingLink:o=!1}={}){const{site:e,localeIndex:t,page:n,theme:s,hash:i}=S(),u=$(()=>{var p,g;return{label:(p=e.value.locales[t.value])==null?void 0:p.label,link:((g=e.value.locales[t.value])==null?void 0:g.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:$(()=>Object.entries(e.value.locales).flatMap(([p,g])=>u.value.label===g.label?[]:{text:g.label,link:it(g.link||(p==="root"?"/":`/${p}/`),s.value.i18nRouting!==!1&&o,n.value.relativePath.slice(u.value.link.length-1),!e.value.cleanUrls)+i.value})),currentLang:u}}function it(o,e,t,n){return e?o.replace(/\/$/,"")+ue(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,n?".html":"")):o}const lt=o=>(B("data-v-d6be1790"),o=o(),H(),o),ct={class:"NotFound"},ut={class:"code"},dt={class:"title"},vt=lt(()=>v("div",{class:"divider"},null,-1)),pt={class:"quote"},ht={class:"action"},ft=["href","aria-label"],_t=_({__name:"NotFound",setup(o){const{theme:e}=S(),{currentLang:t}=J();return(n,s)=>{var i,u,h,p,g;return a(),c("div",ct,[v("p",ut,T(((i=r(e).notFound)==null?void 0:i.code)??"404"),1),v("h1",dt,T(((u=r(e).notFound)==null?void 0:u.title)??"PAGE NOT FOUND"),1),vt,v("blockquote",pt,T(((h=r(e).notFound)==null?void 0:h.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),v("div",ht,[v("a",{class:"link",href:r(he)(r(t).link),"aria-label":((p=r(e).notFound)==null?void 0:p.linkLabel)??"go to home"},T(((g=r(e).notFound)==null?void 0:g.linkText)??"Take me home"),9,ft)])])}}}),mt=k(_t,[["__scopeId","data-v-d6be1790"]]);function Ne(o,e){if(Array.isArray(o))return X(o);if(o==null)return[];e=ue(e);const t=Object.keys(o).sort((s,i)=>i.split("/").length-s.split("/").length).find(s=>e.startsWith(ue(s))),n=t?o[t]:[];return Array.isArray(n)?X(n):X(n.items,n.base)}function kt(o){const e=[];let t=0;for(const n in o){const s=o[n];if(s.items){t=e.push(s);continue}e[t]||e.push({items:[]}),e[t].items.push(s)}return e}function bt(o){const e=[];function t(n){for(const s of n)s.text&&s.link&&e.push({text:s.text,link:s.link,docFooterText:s.docFooterText}),s.items&&t(s.items)}return t(o),e}function de(o,e){return Array.isArray(e)?e.some(t=>de(o,t)):z(o,e.link)?!0:e.items?de(o,e.items):!1}function X(o,e){return[...o].map(t=>{const n={...t},s=n.base||e;return s&&n.link&&(n.link=s+n.link),n.items&&(n.items=X(n.items,s)),n})}function O(){const{frontmatter:o,page:e,theme:t}=S(),n=ce("(min-width: 960px)"),s=N(!1),i=$(()=>{const A=t.value.sidebar,I=e.value.relativePath;return A?Ne(A,I):[]}),u=N(i.value);j(i,(A,I)=>{JSON.stringify(A)!==JSON.stringify(I)&&(u.value=i.value)});const h=$(()=>o.value.sidebar!==!1&&u.value.length>0&&o.value.layout!=="home"),p=$(()=>g?o.value.aside==null?t.value.aside==="left":o.value.aside==="left":!1),g=$(()=>o.value.layout==="home"?!1:o.value.aside!=null?!!o.value.aside:t.value.aside!==!1),V=$(()=>h.value&&n.value),y=$(()=>h.value?kt(u.value):[]);function P(){s.value=!0}function w(){s.value=!1}function L(){s.value?w():P()}return{isOpen:s,sidebar:u,sidebarGroups:y,hasSidebar:h,hasAside:g,leftAside:p,isSidebarEnabled:V,open:P,close:w,toggle:L}}function $t(o,e){let t;Z(()=>{t=o.value?document.activeElement:void 0}),W(()=>{window.addEventListener("keyup",n)}),x(()=>{window.removeEventListener("keyup",n)});function n(s){s.key==="Escape"&&o.value&&(e(),t==null||t.focus())}}function gt(o){const{page:e,hash:t}=S(),n=N(!1),s=$(()=>o.value.collapsed!=null),i=$(()=>!!o.value.link),u=N(!1),h=()=>{u.value=z(e.value.relativePath,o.value.link)};j([e,o,t],h),W(h);const p=$(()=>u.value?!0:o.value.items?de(e.value.relativePath,o.value.items):!1),g=$(()=>!!(o.value.items&&o.value.items.length));Z(()=>{n.value=!!(s.value&&o.value.collapsed)}),Pe(()=>{(u.value||p.value)&&(n.value=!1)});function V(){s.value&&(n.value=!n.value)}return{collapsed:n,collapsible:s,isLink:i,isActiveLink:u,hasActiveLink:p,hasChildren:g,toggle:V}}function yt(){const{hasSidebar:o}=O(),e=ce("(min-width: 960px)"),t=ce("(min-width: 1280px)");return{isAsideEnabled:$(()=>!t.value&&!e.value?!1:o.value?t.value:e.value)}}const ve=[];function Me(o){return typeof o.outline=="object"&&!Array.isArray(o.outline)&&o.outline.label||o.outlineTitle||"On this page"}function _e(o){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const n=Number(t.tagName[1]);return{element:t,title:Pt(t),link:"#"+t.id,level:n}});return Lt(e,o)}function Pt(o){let e="";for(const t of o.childNodes)if(t.nodeType===1){if(t.classList.contains("VPBadge")||t.classList.contains("header-anchor")||t.classList.contains("ignore-header"))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function Lt(o,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[n,s]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;o=o.filter(u=>u.level>=n&&u.level<=s),ve.length=0;for(const{element:u,link:h}of o)ve.push({element:u,link:h});const i=[];e:for(let u=0;u=0;p--){const g=o[p];if(g.level{requestAnimationFrame(i),window.addEventListener("scroll",n)}),Ke(()=>{u(location.hash)}),x(()=>{window.removeEventListener("scroll",n)});function i(){if(!t.value)return;const h=window.scrollY,p=window.innerHeight,g=document.body.offsetHeight,V=Math.abs(h+p-g)<1,y=ve.map(({element:w,link:L})=>({link:L,top:St(w)})).filter(({top:w})=>!Number.isNaN(w)).sort((w,L)=>w.top-L.top);if(!y.length){u(null);return}if(h<1){u(null);return}if(V){u(y[y.length-1].link);return}let P=null;for(const{link:w,top:L}of y){if(L>h+qe()+4)break;P=w}u(P)}function u(h){s&&s.classList.remove("active"),h==null?s=null:s=o.value.querySelector(`a[href="${decodeURIComponent(h)}"]`);const p=s;p?(p.classList.add("active"),e.value.style.top=p.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function St(o){let e=0;for(;o!==document.body;){if(o===null)return NaN;e+=o.offsetTop,o=o.offsetParent}return e}const wt=["href","title"],It=_({__name:"VPDocOutlineItem",props:{headers:{},root:{type:Boolean}},setup(o){function e({target:t}){const n=t.href.split("#")[1],s=document.getElementById(decodeURIComponent(n));s==null||s.focus({preventScroll:!0})}return(t,n)=>{const s=K("VPDocOutlineItem",!0);return a(),c("ul",{class:M(["VPDocOutlineItem",t.root?"root":"nested"])},[(a(!0),c(C,null,E(t.headers,({children:i,link:u,title:h})=>(a(),c("li",null,[v("a",{class:"outline-link",href:u,onClick:e,title:h},T(h),9,wt),i!=null&&i.length?(a(),b(s,{key:0,headers:i},null,8,["headers"])):f("",!0)]))),256))],2)}}}),Ae=k(It,[["__scopeId","data-v-b933a997"]]),Tt={class:"content"},Nt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},Mt=_({__name:"VPDocAsideOutline",setup(o){const{frontmatter:e,theme:t}=S(),n=Le([]);ee(()=>{n.value=_e(e.value.outline??t.value.outline)});const s=N(),i=N();return Vt(s,i),(u,h)=>(a(),c("nav",{"aria-labelledby":"doc-outline-aria-label",class:M(["VPDocAsideOutline",{"has-outline":n.value.length>0}]),ref_key:"container",ref:s},[v("div",Tt,[v("div",{class:"outline-marker",ref_key:"marker",ref:i},null,512),v("div",Nt,T(r(Me)(r(t))),1),m(Ae,{headers:n.value,root:!0},null,8,["headers"])])],2))}}),At=k(Mt,[["__scopeId","data-v-a5bbad30"]]),Ct={class:"VPDocAsideCarbonAds"},Bt=_({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(o){const e=()=>null;return(t,n)=>(a(),c("div",Ct,[m(r(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),Ht=o=>(B("data-v-3f215769"),o=o(),H(),o),Et={class:"VPDocAside"},Ft=Ht(()=>v("div",{class:"spacer"},null,-1)),Dt=_({__name:"VPDocAside",setup(o){const{theme:e}=S();return(t,n)=>(a(),c("div",Et,[l(t.$slots,"aside-top",{},void 0,!0),l(t.$slots,"aside-outline-before",{},void 0,!0),m(At),l(t.$slots,"aside-outline-after",{},void 0,!0),Ft,l(t.$slots,"aside-ads-before",{},void 0,!0),r(e).carbonAds?(a(),b(Bt,{key:0,"carbon-ads":r(e).carbonAds},null,8,["carbon-ads"])):f("",!0),l(t.$slots,"aside-ads-after",{},void 0,!0),l(t.$slots,"aside-bottom",{},void 0,!0)]))}}),Ot=k(Dt,[["__scopeId","data-v-3f215769"]]);function Ut(){const{theme:o,page:e}=S();return $(()=>{const{text:t="Edit this page",pattern:n=""}=o.value.editLink||{};let s;return typeof n=="function"?s=n(e.value):s=n.replace(/:path/g,e.value.filePath),{url:s,text:t}})}function Gt(){const{page:o,theme:e,frontmatter:t}=S();return $(()=>{var g,V,y,P,w,L,A,I;const n=Ne(e.value.sidebar,o.value.relativePath),s=bt(n),i=jt(s,U=>U.link.replace(/[?#].*$/,"")),u=i.findIndex(U=>z(o.value.relativePath,U.link)),h=((g=e.value.docFooter)==null?void 0:g.prev)===!1&&!t.value.prev||t.value.prev===!1,p=((V=e.value.docFooter)==null?void 0:V.next)===!1&&!t.value.next||t.value.next===!1;return{prev:h?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((y=i[u-1])==null?void 0:y.docFooterText)??((P=i[u-1])==null?void 0:P.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((w=i[u-1])==null?void 0:w.link)},next:p?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??((L=i[u+1])==null?void 0:L.docFooterText)??((A=i[u+1])==null?void 0:A.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((I=i[u+1])==null?void 0:I.link)}}})}function jt(o,e){const t=new Set;return o.filter(n=>{const s=e(n);return t.has(s)?!1:t.add(s)})}const F=_({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(o){const e=o,t=$(()=>e.tag??(e.href?"a":"span")),n=$(()=>e.href&&Ve.test(e.href)||e.target==="_blank");return(s,i)=>(a(),b(R(t.value),{class:M(["VPLink",{link:s.href,"vp-external-link-icon":n.value,"no-icon":s.noIcon}]),href:s.href?r(fe)(s.href):void 0,target:s.target??(n.value?"_blank":void 0),rel:s.rel??(n.value?"noreferrer":void 0)},{default:d(()=>[l(s.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),zt={class:"VPLastUpdated"},Kt=["datetime"],qt=_({__name:"VPDocFooterLastUpdated",setup(o){const{theme:e,page:t,frontmatter:n,lang:s}=S(),i=$(()=>new Date(n.value.lastUpdated??t.value.lastUpdated)),u=$(()=>i.value.toISOString()),h=N("");return W(()=>{Z(()=>{var p,g,V;h.value=new Intl.DateTimeFormat((g=(p=e.value.lastUpdated)==null?void 0:p.formatOptions)!=null&&g.forceLocale?s.value:void 0,((V=e.value.lastUpdated)==null?void 0:V.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(i.value)})}),(p,g)=>{var V;return a(),c("p",zt,[D(T(((V=r(e).lastUpdated)==null?void 0:V.text)||r(e).lastUpdatedText||"Last updated")+": ",1),v("time",{datetime:u.value},T(h.value),9,Kt)])}}}),Rt=k(qt,[["__scopeId","data-v-7e05ebdb"]]),Ce=o=>(B("data-v-d4a0bba5"),o=o(),H(),o),Wt={key:0,class:"VPDocFooter"},Jt={key:0,class:"edit-info"},Yt={key:0,class:"edit-link"},Xt=Ce(()=>v("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),Qt={key:1,class:"last-updated"},Zt={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},xt=Ce(()=>v("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),eo={class:"pager"},to=["innerHTML"],oo=["innerHTML"],so={class:"pager"},no=["innerHTML"],ao=["innerHTML"],ro=_({__name:"VPDocFooter",setup(o){const{theme:e,page:t,frontmatter:n}=S(),s=Ut(),i=Gt(),u=$(()=>e.value.editLink&&n.value.editLink!==!1),h=$(()=>t.value.lastUpdated&&n.value.lastUpdated!==!1),p=$(()=>u.value||h.value||i.value.prev||i.value.next);return(g,V)=>{var y,P,w,L;return p.value?(a(),c("footer",Wt,[l(g.$slots,"doc-footer-before",{},void 0,!0),u.value||h.value?(a(),c("div",Jt,[u.value?(a(),c("div",Yt,[m(F,{class:"edit-link-button",href:r(s).url,"no-icon":!0},{default:d(()=>[Xt,D(" "+T(r(s).text),1)]),_:1},8,["href"])])):f("",!0),h.value?(a(),c("div",Qt,[m(Rt)])):f("",!0)])):f("",!0),(y=r(i).prev)!=null&&y.link||(P=r(i).next)!=null&&P.link?(a(),c("nav",Zt,[xt,v("div",eo,[(w=r(i).prev)!=null&&w.link?(a(),b(F,{key:0,class:"pager-link prev",href:r(i).prev.link},{default:d(()=>{var A;return[v("span",{class:"desc",innerHTML:((A=r(e).docFooter)==null?void 0:A.prev)||"Previous page"},null,8,to),v("span",{class:"title",innerHTML:r(i).prev.text},null,8,oo)]}),_:1},8,["href"])):f("",!0)]),v("div",so,[(L=r(i).next)!=null&&L.link?(a(),b(F,{key:0,class:"pager-link next",href:r(i).next.link},{default:d(()=>{var A;return[v("span",{class:"desc",innerHTML:((A=r(e).docFooter)==null?void 0:A.next)||"Next page"},null,8,no),v("span",{class:"title",innerHTML:r(i).next.text},null,8,ao)]}),_:1},8,["href"])):f("",!0)])])):f("",!0)])):f("",!0)}}}),io=k(ro,[["__scopeId","data-v-d4a0bba5"]]),lo=o=>(B("data-v-39a288b8"),o=o(),H(),o),co={class:"container"},uo=lo(()=>v("div",{class:"aside-curtain"},null,-1)),vo={class:"aside-container"},po={class:"aside-content"},ho={class:"content"},fo={class:"content-container"},_o={class:"main"},mo=_({__name:"VPDoc",setup(o){const{theme:e}=S(),t=te(),{hasSidebar:n,hasAside:s,leftAside:i}=O(),u=$(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(h,p)=>{const g=K("Content");return a(),c("div",{class:M(["VPDoc",{"has-sidebar":r(n),"has-aside":r(s)}])},[l(h.$slots,"doc-top",{},void 0,!0),v("div",co,[r(s)?(a(),c("div",{key:0,class:M(["aside",{"left-aside":r(i)}])},[uo,v("div",vo,[v("div",po,[m(Ot,null,{"aside-top":d(()=>[l(h.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":d(()=>[l(h.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":d(()=>[l(h.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":d(()=>[l(h.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":d(()=>[l(h.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":d(()=>[l(h.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):f("",!0),v("div",ho,[v("div",fo,[l(h.$slots,"doc-before",{},void 0,!0),v("main",_o,[m(g,{class:M(["vp-doc",[u.value,r(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),m(io,null,{"doc-footer-before":d(()=>[l(h.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),l(h.$slots,"doc-after",{},void 0,!0)])])]),l(h.$slots,"doc-bottom",{},void 0,!0)],2)}}}),ko=k(mo,[["__scopeId","data-v-39a288b8"]]),bo=_({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(o){const e=o,t=$(()=>e.href&&Ve.test(e.href)),n=$(()=>e.tag||e.href?"a":"button");return(s,i)=>(a(),b(R(n.value),{class:M(["VPButton",[s.size,s.theme]]),href:s.href?r(fe)(s.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:d(()=>[D(T(s.text),1)]),_:1},8,["class","href","target","rel"]))}}),$o=k(bo,[["__scopeId","data-v-cad61b99"]]),go=["src","alt"],yo=_({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(o){return(e,t)=>{const n=K("VPImage",!0);return e.image?(a(),c(C,{key:0},[typeof e.image=="string"||"src"in e.image?(a(),c("img",Y({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:r(he)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,go)):(a(),c(C,{key:1},[m(n,Y({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),m(n,Y({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):f("",!0)}}}),Q=k(yo,[["__scopeId","data-v-8426fc1a"]]),Po=o=>(B("data-v-303bb580"),o=o(),H(),o),Lo={class:"container"},Vo={class:"main"},So={key:0,class:"name"},wo=["innerHTML"],Io=["innerHTML"],To=["innerHTML"],No={key:0,class:"actions"},Mo={key:0,class:"image"},Ao={class:"image-container"},Co=Po(()=>v("div",{class:"image-bg"},null,-1)),Bo=_({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(o){const e=oe("hero-image-slot-exists");return(t,n)=>(a(),c("div",{class:M(["VPHero",{"has-image":t.image||r(e)}])},[v("div",Lo,[v("div",Vo,[l(t.$slots,"home-hero-info-before",{},void 0,!0),l(t.$slots,"home-hero-info",{},()=>[t.name?(a(),c("h1",So,[v("span",{innerHTML:t.name,class:"clip"},null,8,wo)])):f("",!0),t.text?(a(),c("p",{key:1,innerHTML:t.text,class:"text"},null,8,Io)):f("",!0),t.tagline?(a(),c("p",{key:2,innerHTML:t.tagline,class:"tagline"},null,8,To)):f("",!0)],!0),l(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(a(),c("div",No,[(a(!0),c(C,null,E(t.actions,s=>(a(),c("div",{key:s.link,class:"action"},[m($o,{tag:"a",size:"medium",theme:s.theme,text:s.text,href:s.link,target:s.target,rel:s.rel},null,8,["theme","text","href","target","rel"])]))),128))])):f("",!0),l(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||r(e)?(a(),c("div",Mo,[v("div",Ao,[Co,l(t.$slots,"home-hero-image",{},()=>[t.image?(a(),b(Q,{key:0,class:"image-src",image:t.image},null,8,["image"])):f("",!0)],!0)])])):f("",!0)])],2))}}),Ho=k(Bo,[["__scopeId","data-v-303bb580"]]),Eo=_({__name:"VPHomeHero",setup(o){const{frontmatter:e}=S();return(t,n)=>r(e).hero?(a(),b(Ho,{key:0,class:"VPHomeHero",name:r(e).hero.name,text:r(e).hero.text,tagline:r(e).hero.tagline,image:r(e).hero.image,actions:r(e).hero.actions},{"home-hero-info-before":d(()=>[l(t.$slots,"home-hero-info-before")]),"home-hero-info":d(()=>[l(t.$slots,"home-hero-info")]),"home-hero-info-after":d(()=>[l(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":d(()=>[l(t.$slots,"home-hero-actions-after")]),"home-hero-image":d(()=>[l(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):f("",!0)}}),Fo=o=>(B("data-v-a3976bdc"),o=o(),H(),o),Do={class:"box"},Oo={key:0,class:"icon"},Uo=["innerHTML"],Go=["innerHTML"],jo=["innerHTML"],zo={key:4,class:"link-text"},Ko={class:"link-text-value"},qo=Fo(()=>v("span",{class:"vpi-arrow-right link-text-icon"},null,-1)),Ro=_({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(o){return(e,t)=>(a(),b(F,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:d(()=>[v("article",Do,[typeof e.icon=="object"&&e.icon.wrap?(a(),c("div",Oo,[m(Q,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(a(),b(Q,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(a(),c("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Uo)):f("",!0),v("h2",{class:"title",innerHTML:e.title},null,8,Go),e.details?(a(),c("p",{key:3,class:"details",innerHTML:e.details},null,8,jo)):f("",!0),e.linkText?(a(),c("div",zo,[v("p",Ko,[D(T(e.linkText)+" ",1),qo])])):f("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),Wo=k(Ro,[["__scopeId","data-v-a3976bdc"]]),Jo={key:0,class:"VPFeatures"},Yo={class:"container"},Xo={class:"items"},Qo=_({__name:"VPFeatures",props:{features:{}},setup(o){const e=o,t=$(()=>{const n=e.features.length;if(n){if(n===2)return"grid-2";if(n===3)return"grid-3";if(n%3===0)return"grid-6";if(n>3)return"grid-4"}else return});return(n,s)=>n.features?(a(),c("div",Jo,[v("div",Yo,[v("div",Xo,[(a(!0),c(C,null,E(n.features,i=>(a(),c("div",{key:i.title,class:M(["item",[t.value]])},[m(Wo,{icon:i.icon,title:i.title,details:i.details,link:i.link,"link-text":i.linkText,rel:i.rel,target:i.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):f("",!0)}}),Zo=k(Qo,[["__scopeId","data-v-a6181336"]]),xo=_({__name:"VPHomeFeatures",setup(o){const{frontmatter:e}=S();return(t,n)=>r(e).features?(a(),b(Zo,{key:0,class:"VPHomeFeatures",features:r(e).features},null,8,["features"])):f("",!0)}}),es=_({__name:"VPHomeContent",setup(o){const{width:e}=Re({initialWidth:0,includeScrollbar:!1});return(t,n)=>(a(),c("div",{class:"vp-doc container",style:Se(r(e)?{"--vp-offset":`calc(50% - ${r(e)/2}px)`}:{})},[l(t.$slots,"default",{},void 0,!0)],4))}}),ts=k(es,[["__scopeId","data-v-8e2d4988"]]),os={class:"VPHome"},ss=_({__name:"VPHome",setup(o){const{frontmatter:e}=S();return(t,n)=>{const s=K("Content");return a(),c("div",os,[l(t.$slots,"home-hero-before",{},void 0,!0),m(Eo,null,{"home-hero-info-before":d(()=>[l(t.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":d(()=>[l(t.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":d(()=>[l(t.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":d(()=>[l(t.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":d(()=>[l(t.$slots,"home-hero-image",{},void 0,!0)]),_:3}),l(t.$slots,"home-hero-after",{},void 0,!0),l(t.$slots,"home-features-before",{},void 0,!0),m(xo),l(t.$slots,"home-features-after",{},void 0,!0),r(e).markdownStyles!==!1?(a(),b(ts,{key:0},{default:d(()=>[m(s)]),_:1})):(a(),b(s,{key:1}))])}}}),ns=k(ss,[["__scopeId","data-v-686f80a6"]]),as={},rs={class:"VPPage"};function is(o,e){const t=K("Content");return a(),c("div",rs,[l(o.$slots,"page-top"),m(t),l(o.$slots,"page-bottom")])}const ls=k(as,[["render",is]]),cs=_({__name:"VPContent",setup(o){const{page:e,frontmatter:t}=S(),{hasSidebar:n}=O();return(s,i)=>(a(),c("div",{class:M(["VPContent",{"has-sidebar":r(n),"is-home":r(t).layout==="home"}]),id:"VPContent"},[r(e).isNotFound?l(s.$slots,"not-found",{key:0},()=>[m(mt)],!0):r(t).layout==="page"?(a(),b(ls,{key:1},{"page-top":d(()=>[l(s.$slots,"page-top",{},void 0,!0)]),"page-bottom":d(()=>[l(s.$slots,"page-bottom",{},void 0,!0)]),_:3})):r(t).layout==="home"?(a(),b(ns,{key:2},{"home-hero-before":d(()=>[l(s.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":d(()=>[l(s.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":d(()=>[l(s.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":d(()=>[l(s.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":d(()=>[l(s.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":d(()=>[l(s.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":d(()=>[l(s.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":d(()=>[l(s.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":d(()=>[l(s.$slots,"home-features-after",{},void 0,!0)]),_:3})):r(t).layout&&r(t).layout!=="doc"?(a(),b(R(r(t).layout),{key:3})):(a(),b(ko,{key:4},{"doc-top":d(()=>[l(s.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":d(()=>[l(s.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":d(()=>[l(s.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":d(()=>[l(s.$slots,"doc-before",{},void 0,!0)]),"doc-after":d(()=>[l(s.$slots,"doc-after",{},void 0,!0)]),"aside-top":d(()=>[l(s.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":d(()=>[l(s.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":d(()=>[l(s.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":d(()=>[l(s.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":d(()=>[l(s.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":d(()=>[l(s.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),us=k(cs,[["__scopeId","data-v-1428d186"]]),ds={class:"container"},vs=["innerHTML"],ps=["innerHTML"],hs=_({__name:"VPFooter",setup(o){const{theme:e,frontmatter:t}=S(),{hasSidebar:n}=O();return(s,i)=>r(e).footer&&r(t).footer!==!1?(a(),c("footer",{key:0,class:M(["VPFooter",{"has-sidebar":r(n)}])},[v("div",ds,[r(e).footer.message?(a(),c("p",{key:0,class:"message",innerHTML:r(e).footer.message},null,8,vs)):f("",!0),r(e).footer.copyright?(a(),c("p",{key:1,class:"copyright",innerHTML:r(e).footer.copyright},null,8,ps)):f("",!0)])],2)):f("",!0)}}),fs=k(hs,[["__scopeId","data-v-e315a0ad"]]);function _s(){const{theme:o,frontmatter:e}=S(),t=Le([]),n=$(()=>t.value.length>0);return ee(()=>{t.value=_e(e.value.outline??o.value.outline)}),{headers:t,hasLocalNav:n}}const ms=o=>(B("data-v-17a5e62e"),o=o(),H(),o),ks={class:"menu-text"},bs=ms(()=>v("span",{class:"vpi-chevron-right icon"},null,-1)),$s={class:"header"},gs={class:"outline"},ys=_({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(o){const e=o,{theme:t}=S(),n=N(!1),s=N(0),i=N(),u=N();function h(y){var P;(P=i.value)!=null&&P.contains(y.target)||(n.value=!1)}j(n,y=>{if(y){document.addEventListener("click",h);return}document.removeEventListener("click",h)}),We("Escape",()=>{n.value=!1}),ee(()=>{n.value=!1});function p(){n.value=!n.value,s.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function g(y){y.target.classList.contains("outline-link")&&(u.value&&(u.value.style.transition="none"),Je(()=>{n.value=!1}))}function V(){n.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(y,P)=>(a(),c("div",{class:"VPLocalNavOutlineDropdown",style:Se({"--vp-vh":s.value+"px"}),ref_key:"main",ref:i},[y.headers.length>0?(a(),c("button",{key:0,onClick:p,class:M({open:n.value})},[v("span",ks,T(r(Me)(r(t))),1),bs],2)):(a(),c("button",{key:1,onClick:V},T(r(t).returnToTopLabel||"Return to top"),1)),m(pe,{name:"flyout"},{default:d(()=>[n.value?(a(),c("div",{key:0,ref_key:"items",ref:u,class:"items",onClick:g},[v("div",$s,[v("a",{class:"top-link",href:"#",onClick:V},T(r(t).returnToTopLabel||"Return to top"),1)]),v("div",gs,[m(Ae,{headers:y.headers},null,8,["headers"])])],512)):f("",!0)]),_:1})],4))}}),Ps=k(ys,[["__scopeId","data-v-17a5e62e"]]),Ls=o=>(B("data-v-a6f0e41e"),o=o(),H(),o),Vs={class:"container"},Ss=["aria-expanded"],ws=Ls(()=>v("span",{class:"vpi-align-left menu-icon"},null,-1)),Is={class:"menu-text"},Ts=_({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(o){const{theme:e,frontmatter:t}=S(),{hasSidebar:n}=O(),{headers:s}=_s(),{y:i}=we(),u=N(0);W(()=>{u.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),ee(()=>{s.value=_e(t.value.outline??e.value.outline)});const h=$(()=>s.value.length===0),p=$(()=>h.value&&!n.value),g=$(()=>({VPLocalNav:!0,"has-sidebar":n.value,empty:h.value,fixed:p.value}));return(V,y)=>r(t).layout!=="home"&&(!p.value||r(i)>=u.value)?(a(),c("div",{key:0,class:M(g.value)},[v("div",Vs,[r(n)?(a(),c("button",{key:0,class:"menu","aria-expanded":V.open,"aria-controls":"VPSidebarNav",onClick:y[0]||(y[0]=P=>V.$emit("open-menu"))},[ws,v("span",Is,T(r(e).sidebarMenuLabel||"Menu"),1)],8,Ss)):f("",!0),m(Ps,{headers:r(s),navHeight:u.value},null,8,["headers","navHeight"])])],2)):f("",!0)}}),Ns=k(Ts,[["__scopeId","data-v-a6f0e41e"]]);function Ms(){const o=N(!1);function e(){o.value=!0,window.addEventListener("resize",s)}function t(){o.value=!1,window.removeEventListener("resize",s)}function n(){o.value?t():e()}function s(){window.outerWidth>=768&&t()}const i=te();return j(()=>i.path,t),{isScreenOpen:o,openScreen:e,closeScreen:t,toggleScreen:n}}const As={},Cs={class:"VPSwitch",type:"button",role:"switch"},Bs={class:"check"},Hs={key:0,class:"icon"};function Es(o,e){return a(),c("button",Cs,[v("span",Bs,[o.$slots.default?(a(),c("span",Hs,[l(o.$slots,"default",{},void 0,!0)])):f("",!0)])])}const Fs=k(As,[["render",Es],["__scopeId","data-v-1d5665e3"]]),Be=o=>(B("data-v-d1f28634"),o=o(),H(),o),Ds=Be(()=>v("span",{class:"vpi-sun sun"},null,-1)),Os=Be(()=>v("span",{class:"vpi-moon moon"},null,-1)),Us=_({__name:"VPSwitchAppearance",setup(o){const{isDark:e,theme:t}=S(),n=oe("toggle-appearance",()=>{e.value=!e.value}),s=$(()=>e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme");return(i,u)=>(a(),b(Fs,{title:s.value,class:"VPSwitchAppearance","aria-checked":r(e),onClick:r(n)},{default:d(()=>[Ds,Os]),_:1},8,["title","aria-checked","onClick"]))}}),me=k(Us,[["__scopeId","data-v-d1f28634"]]),Gs={key:0,class:"VPNavBarAppearance"},js=_({__name:"VPNavBarAppearance",setup(o){const{site:e}=S();return(t,n)=>r(e).appearance&&r(e).appearance!=="force-dark"?(a(),c("div",Gs,[m(me)])):f("",!0)}}),zs=k(js,[["__scopeId","data-v-e6aabb21"]]),ke=N();let He=!1,le=0;function Ks(o){const e=N(!1);if(se){!He&&qs(),le++;const t=j(ke,n=>{var s,i,u;n===o.el.value||(s=o.el.value)!=null&&s.contains(n)?(e.value=!0,(i=o.onFocus)==null||i.call(o)):(e.value=!1,(u=o.onBlur)==null||u.call(o))});x(()=>{t(),le--,le||Rs()})}return Ye(e)}function qs(){document.addEventListener("focusin",Ee),He=!0,ke.value=document.activeElement}function Rs(){document.removeEventListener("focusin",Ee)}function Ee(){ke.value=document.activeElement}const Ws={class:"VPMenuLink"},Js=_({__name:"VPMenuLink",props:{item:{}},setup(o){const{page:e}=S();return(t,n)=>(a(),c("div",Ws,[m(F,{class:M({active:r(z)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel},{default:d(()=>[D(T(t.item.text),1)]),_:1},8,["class","href","target","rel"])]))}}),ne=k(Js,[["__scopeId","data-v-43f1e123"]]),Ys={class:"VPMenuGroup"},Xs={key:0,class:"title"},Qs=_({__name:"VPMenuGroup",props:{text:{},items:{}},setup(o){return(e,t)=>(a(),c("div",Ys,[e.text?(a(),c("p",Xs,T(e.text),1)):f("",!0),(a(!0),c(C,null,E(e.items,n=>(a(),c(C,null,["link"in n?(a(),b(ne,{key:0,item:n},null,8,["item"])):f("",!0)],64))),256))]))}}),Zs=k(Qs,[["__scopeId","data-v-69e747b5"]]),xs={class:"VPMenu"},en={key:0,class:"items"},tn=_({__name:"VPMenu",props:{items:{}},setup(o){return(e,t)=>(a(),c("div",xs,[e.items?(a(),c("div",en,[(a(!0),c(C,null,E(e.items,n=>(a(),c(C,{key:n.text},["link"in n?(a(),b(ne,{key:0,item:n},null,8,["item"])):(a(),b(Zs,{key:1,text:n.text,items:n.items},null,8,["text","items"]))],64))),128))])):f("",!0),l(e.$slots,"default",{},void 0,!0)]))}}),on=k(tn,[["__scopeId","data-v-e7ea1737"]]),sn=o=>(B("data-v-b6c34ac9"),o=o(),H(),o),nn=["aria-expanded","aria-label"],an={key:0,class:"text"},rn=["innerHTML"],ln=sn(()=>v("span",{class:"vpi-chevron-down text-icon"},null,-1)),cn={key:1,class:"vpi-more-horizontal icon"},un={class:"menu"},dn=_({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(o){const e=N(!1),t=N();Ks({el:t,onBlur:n});function n(){e.value=!1}return(s,i)=>(a(),c("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:i[1]||(i[1]=u=>e.value=!0),onMouseleave:i[2]||(i[2]=u=>e.value=!1)},[v("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":s.label,onClick:i[0]||(i[0]=u=>e.value=!e.value)},[s.button||s.icon?(a(),c("span",an,[s.icon?(a(),c("span",{key:0,class:M([s.icon,"option-icon"])},null,2)):f("",!0),s.button?(a(),c("span",{key:1,innerHTML:s.button},null,8,rn)):f("",!0),ln])):(a(),c("span",cn))],8,nn),v("div",un,[m(on,{items:s.items},{default:d(()=>[l(s.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),be=k(dn,[["__scopeId","data-v-b6c34ac9"]]),vn=["href","aria-label","innerHTML"],pn=_({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(o){const e=o,t=$(()=>typeof e.icon=="object"?e.icon.svg:``);return(n,s)=>(a(),c("a",{class:"VPSocialLink no-icon",href:n.link,"aria-label":n.ariaLabel??(typeof n.icon=="string"?n.icon:""),target:"_blank",rel:"noopener",innerHTML:t.value},null,8,vn))}}),hn=k(pn,[["__scopeId","data-v-eee4e7cb"]]),fn={class:"VPSocialLinks"},_n=_({__name:"VPSocialLinks",props:{links:{}},setup(o){return(e,t)=>(a(),c("div",fn,[(a(!0),c(C,null,E(e.links,({link:n,icon:s,ariaLabel:i})=>(a(),b(hn,{key:n,icon:s,link:n,ariaLabel:i},null,8,["icon","link","ariaLabel"]))),128))]))}}),$e=k(_n,[["__scopeId","data-v-7bc22406"]]),mn={key:0,class:"group translations"},kn={class:"trans-title"},bn={key:1,class:"group"},$n={class:"item appearance"},gn={class:"label"},yn={class:"appearance-action"},Pn={key:2,class:"group"},Ln={class:"item social-links"},Vn=_({__name:"VPNavBarExtra",setup(o){const{site:e,theme:t}=S(),{localeLinks:n,currentLang:s}=J({correspondingLink:!0}),i=$(()=>n.value.length&&s.value.label||e.value.appearance||t.value.socialLinks);return(u,h)=>i.value?(a(),b(be,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:d(()=>[r(n).length&&r(s).label?(a(),c("div",mn,[v("p",kn,T(r(s).label),1),(a(!0),c(C,null,E(r(n),p=>(a(),b(ne,{key:p.link,item:p},null,8,["item"]))),128))])):f("",!0),r(e).appearance&&r(e).appearance!=="force-dark"?(a(),c("div",bn,[v("div",$n,[v("p",gn,T(r(t).darkModeSwitchLabel||"Appearance"),1),v("div",yn,[m(me)])])])):f("",!0),r(t).socialLinks?(a(),c("div",Pn,[v("div",Ln,[m($e,{class:"social-links-list",links:r(t).socialLinks},null,8,["links"])])])):f("",!0)]),_:1})):f("",!0)}}),Sn=k(Vn,[["__scopeId","data-v-d0bd9dde"]]),wn=o=>(B("data-v-e5dd9c1c"),o=o(),H(),o),In=["aria-expanded"],Tn=wn(()=>v("span",{class:"container"},[v("span",{class:"top"}),v("span",{class:"middle"}),v("span",{class:"bottom"})],-1)),Nn=[Tn],Mn=_({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(o){return(e,t)=>(a(),c("button",{type:"button",class:M(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=n=>e.$emit("click"))},Nn,10,In))}}),An=k(Mn,[["__scopeId","data-v-e5dd9c1c"]]),Cn=["innerHTML"],Bn=_({__name:"VPNavBarMenuLink",props:{item:{}},setup(o){const{page:e}=S();return(t,n)=>(a(),b(F,{class:M({VPNavBarMenuLink:!0,active:r(z)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,noIcon:t.item.noIcon,target:t.item.target,rel:t.item.rel,tabindex:"0"},{default:d(()=>[v("span",{innerHTML:t.item.text},null,8,Cn)]),_:1},8,["class","href","noIcon","target","rel"]))}}),Hn=k(Bn,[["__scopeId","data-v-9c663999"]]),En=_({__name:"VPNavBarMenuGroup",props:{item:{}},setup(o){const e=o,{page:t}=S(),n=i=>"link"in i?z(t.value.relativePath,i.link,!!e.item.activeMatch):i.items.some(n),s=$(()=>n(e.item));return(i,u)=>(a(),b(be,{class:M({VPNavBarMenuGroup:!0,active:r(z)(r(t).relativePath,i.item.activeMatch,!!i.item.activeMatch)||s.value}),button:i.item.text,items:i.item.items},null,8,["class","button","items"]))}}),Fn=o=>(B("data-v-7f418b0f"),o=o(),H(),o),Dn={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},On=Fn(()=>v("span",{id:"main-nav-aria-label",class:"visually-hidden"},"Main Navigation",-1)),Un=_({__name:"VPNavBarMenu",setup(o){const{theme:e}=S();return(t,n)=>r(e).nav?(a(),c("nav",Dn,[On,(a(!0),c(C,null,E(r(e).nav,s=>(a(),c(C,{key:s.text},["link"in s?(a(),b(Hn,{key:0,item:s},null,8,["item"])):(a(),b(En,{key:1,item:s},null,8,["item"]))],64))),128))])):f("",!0)}}),Gn=k(Un,[["__scopeId","data-v-7f418b0f"]]);function jn(o){const{localeIndex:e,theme:t}=S();function n(s){var L,A,I;const i=s.split("."),u=(L=t.value.search)==null?void 0:L.options,h=u&&typeof u=="object",p=h&&((I=(A=u.locales)==null?void 0:A[e.value])==null?void 0:I.translations)||null,g=h&&u.translations||null;let V=p,y=g,P=o;const w=i.pop();for(const U of i){let G=null;const q=P==null?void 0:P[U];q&&(G=P=q);const ae=y==null?void 0:y[U];ae&&(G=y=ae);const re=V==null?void 0:V[U];re&&(G=V=re),q||(P=G),ae||(y=G),re||(V=G)}return(V==null?void 0:V[w])??(y==null?void 0:y[w])??(P==null?void 0:P[w])??""}return n}const zn=["aria-label"],Kn={class:"DocSearch-Button-Container"},qn=v("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1),Rn={class:"DocSearch-Button-Placeholder"},Wn=v("span",{class:"DocSearch-Button-Keys"},[v("kbd",{class:"DocSearch-Button-Key"}),v("kbd",{class:"DocSearch-Button-Key"},"K")],-1),ge=_({__name:"VPNavBarSearchButton",setup(o){const t=jn({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(n,s)=>(a(),c("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":r(t)("button.buttonAriaLabel")},[v("span",Kn,[qn,v("span",Rn,T(r(t)("button.buttonText")),1)]),Wn],8,zn))}}),Jn={class:"VPNavBarSearch"},Yn={id:"local-search"},Xn={key:1,id:"docsearch"},Qn=_({__name:"VPNavBarSearch",setup(o){const e=()=>null,t=Xe(()=>Qe(()=>import("./VPAlgoliaSearchBox.BRY8HxQs.js"),__vite__mapDeps([0,1]))),{theme:n}=S(),s=N(!1),i=N(!1),u=()=>{const P="VPAlgoliaPreconnect";(window.requestIdleCallback||setTimeout)(()=>{var A;const L=document.createElement("link");L.id=P,L.rel="preconnect",L.href=`https://${(((A=n.value.search)==null?void 0:A.options)??n.value.algolia).appId}-dsn.algolia.net`,L.crossOrigin="",document.head.appendChild(L)})};W(()=>{u();const P=L=>{(L.key.toLowerCase()==="k"&&(L.metaKey||L.ctrlKey)||!g(L)&&L.key==="/")&&(L.preventDefault(),h(),w())},w=()=>{window.removeEventListener("keydown",P)};window.addEventListener("keydown",P),x(w)});function h(){s.value||(s.value=!0,setTimeout(p,16))}function p(){const P=new Event("keydown");P.key="k",P.metaKey=!0,window.dispatchEvent(P),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||p()},16)}function g(P){const w=P.target,L=w.tagName;return w.isContentEditable||L==="INPUT"||L==="SELECT"||L==="TEXTAREA"}const V=N(!1),y="algolia";return(P,w)=>{var L;return a(),c("div",Jn,[r(y)==="local"?(a(),c(C,{key:0},[V.value?(a(),b(r(e),{key:0,onClose:w[0]||(w[0]=A=>V.value=!1)})):f("",!0),v("div",Yn,[m(ge,{onClick:w[1]||(w[1]=A=>V.value=!0)})])],64)):r(y)==="algolia"?(a(),c(C,{key:1},[s.value?(a(),b(r(t),{key:0,algolia:((L=r(n).search)==null?void 0:L.options)??r(n).algolia,onVnodeBeforeMount:w[2]||(w[2]=A=>i.value=!0)},null,8,["algolia"])):f("",!0),i.value?f("",!0):(a(),c("div",Xn,[m(ge,{onClick:h})]))],64)):f("",!0)])}}}),Zn=_({__name:"VPNavBarSocialLinks",setup(o){const{theme:e}=S();return(t,n)=>r(e).socialLinks?(a(),b($e,{key:0,class:"VPNavBarSocialLinks",links:r(e).socialLinks},null,8,["links"])):f("",!0)}}),xn=k(Zn,[["__scopeId","data-v-0394ad82"]]),ea=["href","rel","target"],ta={key:1},oa={key:2},sa=_({__name:"VPNavBarTitle",setup(o){const{site:e,theme:t}=S(),{hasSidebar:n}=O(),{currentLang:s}=J(),i=$(()=>{var p;return typeof t.value.logoLink=="string"?t.value.logoLink:(p=t.value.logoLink)==null?void 0:p.link}),u=$(()=>{var p;return typeof t.value.logoLink=="string"||(p=t.value.logoLink)==null?void 0:p.rel}),h=$(()=>{var p;return typeof t.value.logoLink=="string"||(p=t.value.logoLink)==null?void 0:p.target});return(p,g)=>(a(),c("div",{class:M(["VPNavBarTitle",{"has-sidebar":r(n)}])},[v("a",{class:"title",href:i.value??r(fe)(r(s).link),rel:u.value,target:h.value},[l(p.$slots,"nav-bar-title-before",{},void 0,!0),r(t).logo?(a(),b(Q,{key:0,class:"logo",image:r(t).logo},null,8,["image"])):f("",!0),r(t).siteTitle?(a(),c("span",ta,T(r(t).siteTitle),1)):r(t).siteTitle===void 0?(a(),c("span",oa,T(r(e).title),1)):f("",!0),l(p.$slots,"nav-bar-title-after",{},void 0,!0)],8,ea)],2))}}),na=k(sa,[["__scopeId","data-v-ab179fa1"]]),aa={class:"items"},ra={class:"title"},ia=_({__name:"VPNavBarTranslations",setup(o){const{theme:e}=S(),{localeLinks:t,currentLang:n}=J({correspondingLink:!0});return(s,i)=>r(t).length&&r(n).label?(a(),b(be,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:r(e).langMenuLabel||"Change language"},{default:d(()=>[v("div",aa,[v("p",ra,T(r(n).label),1),(a(!0),c(C,null,E(r(t),u=>(a(),b(ne,{key:u.link,item:u},null,8,["item"]))),128))])]),_:1},8,["label"])):f("",!0)}}),la=k(ia,[["__scopeId","data-v-88af2de4"]]),ca=o=>(B("data-v-ccf7ddec"),o=o(),H(),o),ua={class:"wrapper"},da={class:"container"},va={class:"title"},pa={class:"content"},ha={class:"content-body"},fa=ca(()=>v("div",{class:"divider"},[v("div",{class:"divider-line"})],-1)),_a=_({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(o){const{y:e}=we(),{hasSidebar:t}=O(),{frontmatter:n}=S(),s=N({});return Pe(()=>{s.value={"has-sidebar":t.value,home:n.value.layout==="home",top:e.value===0}}),(i,u)=>(a(),c("div",{class:M(["VPNavBar",s.value])},[v("div",ua,[v("div",da,[v("div",va,[m(na,null,{"nav-bar-title-before":d(()=>[l(i.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":d(()=>[l(i.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),v("div",pa,[v("div",ha,[l(i.$slots,"nav-bar-content-before",{},void 0,!0),m(Qn,{class:"search"}),m(Gn,{class:"menu"}),m(la,{class:"translations"}),m(zs,{class:"appearance"}),m(xn,{class:"social-links"}),m(Sn,{class:"extra"}),l(i.$slots,"nav-bar-content-after",{},void 0,!0),m(An,{class:"hamburger",active:i.isScreenOpen,onClick:u[0]||(u[0]=h=>i.$emit("toggle-screen"))},null,8,["active"])])])])]),fa],2))}}),ma=k(_a,[["__scopeId","data-v-ccf7ddec"]]),ka={key:0,class:"VPNavScreenAppearance"},ba={class:"text"},$a=_({__name:"VPNavScreenAppearance",setup(o){const{site:e,theme:t}=S();return(n,s)=>r(e).appearance&&r(e).appearance!=="force-dark"?(a(),c("div",ka,[v("p",ba,T(r(t).darkModeSwitchLabel||"Appearance"),1),m(me)])):f("",!0)}}),ga=k($a,[["__scopeId","data-v-2d7af913"]]),ya=_({__name:"VPNavScreenMenuLink",props:{item:{}},setup(o){const e=oe("close-screen");return(t,n)=>(a(),b(F,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:r(e),innerHTML:t.item.text},null,8,["href","target","rel","onClick","innerHTML"]))}}),Pa=k(ya,[["__scopeId","data-v-7f31e1f6"]]),La=_({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(o){const e=oe("close-screen");return(t,n)=>(a(),b(F,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:r(e)},{default:d(()=>[D(T(t.item.text),1)]),_:1},8,["href","target","rel","onClick"]))}}),Fe=k(La,[["__scopeId","data-v-19976ae1"]]),Va={class:"VPNavScreenMenuGroupSection"},Sa={key:0,class:"title"},wa=_({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(o){return(e,t)=>(a(),c("div",Va,[e.text?(a(),c("p",Sa,T(e.text),1)):f("",!0),(a(!0),c(C,null,E(e.items,n=>(a(),b(Fe,{key:n.text,item:n},null,8,["item"]))),128))]))}}),Ia=k(wa,[["__scopeId","data-v-8133b170"]]),Ta=o=>(B("data-v-ff6087d4"),o=o(),H(),o),Na=["aria-controls","aria-expanded"],Ma=["innerHTML"],Aa=Ta(()=>v("span",{class:"vpi-plus button-icon"},null,-1)),Ca=["id"],Ba={key:1,class:"group"},Ha=_({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(o){const e=o,t=N(!1),n=$(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function s(){t.value=!t.value}return(i,u)=>(a(),c("div",{class:M(["VPNavScreenMenuGroup",{open:t.value}])},[v("button",{class:"button","aria-controls":n.value,"aria-expanded":t.value,onClick:s},[v("span",{class:"button-text",innerHTML:i.text},null,8,Ma),Aa],8,Na),v("div",{id:n.value,class:"items"},[(a(!0),c(C,null,E(i.items,h=>(a(),c(C,{key:h.text},["link"in h?(a(),c("div",{key:h.text,class:"item"},[m(Fe,{item:h},null,8,["item"])])):(a(),c("div",Ba,[m(Ia,{text:h.text,items:h.items},null,8,["text","items"])]))],64))),128))],8,Ca)],2))}}),Ea=k(Ha,[["__scopeId","data-v-ff6087d4"]]),Fa={key:0,class:"VPNavScreenMenu"},Da=_({__name:"VPNavScreenMenu",setup(o){const{theme:e}=S();return(t,n)=>r(e).nav?(a(),c("nav",Fa,[(a(!0),c(C,null,E(r(e).nav,s=>(a(),c(C,{key:s.text},["link"in s?(a(),b(Pa,{key:0,item:s},null,8,["item"])):(a(),b(Ea,{key:1,text:s.text||"",items:s.items},null,8,["text","items"]))],64))),128))])):f("",!0)}}),Oa=_({__name:"VPNavScreenSocialLinks",setup(o){const{theme:e}=S();return(t,n)=>r(e).socialLinks?(a(),b($e,{key:0,class:"VPNavScreenSocialLinks",links:r(e).socialLinks},null,8,["links"])):f("",!0)}}),De=o=>(B("data-v-858fe1a4"),o=o(),H(),o),Ua=De(()=>v("span",{class:"vpi-languages icon lang"},null,-1)),Ga=De(()=>v("span",{class:"vpi-chevron-down icon chevron"},null,-1)),ja={class:"list"},za=_({__name:"VPNavScreenTranslations",setup(o){const{localeLinks:e,currentLang:t}=J({correspondingLink:!0}),n=N(!1);function s(){n.value=!n.value}return(i,u)=>r(e).length&&r(t).label?(a(),c("div",{key:0,class:M(["VPNavScreenTranslations",{open:n.value}])},[v("button",{class:"title",onClick:s},[Ua,D(" "+T(r(t).label)+" ",1),Ga]),v("ul",ja,[(a(!0),c(C,null,E(r(e),h=>(a(),c("li",{key:h.link,class:"item"},[m(F,{class:"link",href:h.link},{default:d(()=>[D(T(h.text),1)]),_:2},1032,["href"])]))),128))])],2)):f("",!0)}}),Ka=k(za,[["__scopeId","data-v-858fe1a4"]]),qa={class:"container"},Ra=_({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(o){const e=N(null),t=Ie(se?document.body:null);return(n,s)=>(a(),b(pe,{name:"fade",onEnter:s[0]||(s[0]=i=>t.value=!0),onAfterLeave:s[1]||(s[1]=i=>t.value=!1)},{default:d(()=>[n.open?(a(),c("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[v("div",qa,[l(n.$slots,"nav-screen-content-before",{},void 0,!0),m(Da,{class:"menu"}),m(Ka,{class:"translations"}),m(ga,{class:"appearance"}),m(Oa,{class:"social-links"}),l(n.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):f("",!0)]),_:3}))}}),Wa=k(Ra,[["__scopeId","data-v-cc5739dd"]]),Ja={key:0,class:"VPNav"},Ya=_({__name:"VPNav",setup(o){const{isScreenOpen:e,closeScreen:t,toggleScreen:n}=Ms(),{frontmatter:s}=S(),i=$(()=>s.value.navbar!==!1);return Te("close-screen",t),Z(()=>{se&&document.documentElement.classList.toggle("hide-nav",!i.value)}),(u,h)=>i.value?(a(),c("header",Ja,[m(ma,{"is-screen-open":r(e),onToggleScreen:r(n)},{"nav-bar-title-before":d(()=>[l(u.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":d(()=>[l(u.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":d(()=>[l(u.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":d(()=>[l(u.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),m(Wa,{open:r(e)},{"nav-screen-content-before":d(()=>[l(u.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":d(()=>[l(u.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):f("",!0)}}),Xa=k(Ya,[["__scopeId","data-v-ae24b3ad"]]),Oe=o=>(B("data-v-b8d55f3b"),o=o(),H(),o),Qa=["role","tabindex"],Za=Oe(()=>v("div",{class:"indicator"},null,-1)),xa=Oe(()=>v("span",{class:"vpi-chevron-right caret-icon"},null,-1)),er=[xa],tr={key:1,class:"items"},or=_({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(o){const e=o,{collapsed:t,collapsible:n,isLink:s,isActiveLink:i,hasActiveLink:u,hasChildren:h,toggle:p}=gt($(()=>e.item)),g=$(()=>h.value?"section":"div"),V=$(()=>s.value?"a":"div"),y=$(()=>h.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),P=$(()=>s.value?void 0:"button"),w=$(()=>[[`level-${e.depth}`],{collapsible:n.value},{collapsed:t.value},{"is-link":s.value},{"is-active":i.value},{"has-active":u.value}]);function L(I){"key"in I&&I.key!=="Enter"||!e.item.link&&p()}function A(){e.item.link&&p()}return(I,U)=>{const G=K("VPSidebarItem",!0);return a(),b(R(g.value),{class:M(["VPSidebarItem",w.value])},{default:d(()=>[I.item.text?(a(),c("div",Y({key:0,class:"item",role:P.value},xe(I.item.items?{click:L,keydown:L}:{},!0),{tabindex:I.item.items&&0}),[Za,I.item.link?(a(),b(F,{key:0,tag:V.value,class:"link",href:I.item.link,rel:I.item.rel,target:I.item.target},{default:d(()=>[(a(),b(R(y.value),{class:"text",innerHTML:I.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(a(),b(R(y.value),{key:1,class:"text",innerHTML:I.item.text},null,8,["innerHTML"])),I.item.collapsed!=null&&I.item.items&&I.item.items.length?(a(),c("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:A,onKeydown:Ze(A,["enter"]),tabindex:"0"},er,32)):f("",!0)],16,Qa)):f("",!0),I.item.items&&I.item.items.length?(a(),c("div",tr,[I.depth<5?(a(!0),c(C,{key:0},E(I.item.items,q=>(a(),b(G,{key:q.text,item:q,depth:I.depth+1},null,8,["item","depth"]))),128)):f("",!0)])):f("",!0)]),_:1},8,["class"])}}}),sr=k(or,[["__scopeId","data-v-b8d55f3b"]]),Ue=o=>(B("data-v-575e6a36"),o=o(),H(),o),nr=Ue(()=>v("div",{class:"curtain"},null,-1)),ar={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},rr=Ue(()=>v("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),ir=_({__name:"VPSidebar",props:{open:{type:Boolean}},setup(o){const{sidebarGroups:e,hasSidebar:t}=O(),n=o,s=N(null),i=Ie(se?document.body:null);return j([n,s],()=>{var u;n.open?(i.value=!0,(u=s.value)==null||u.focus()):i.value=!1},{immediate:!0,flush:"post"}),(u,h)=>r(t)?(a(),c("aside",{key:0,class:M(["VPSidebar",{open:u.open}]),ref_key:"navEl",ref:s,onClick:h[0]||(h[0]=et(()=>{},["stop"]))},[nr,v("nav",ar,[rr,l(u.$slots,"sidebar-nav-before",{},void 0,!0),(a(!0),c(C,null,E(r(e),p=>(a(),c("div",{key:p.text,class:"group"},[m(sr,{item:p,depth:0},null,8,["item"])]))),128)),l(u.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):f("",!0)}}),lr=k(ir,[["__scopeId","data-v-575e6a36"]]),cr=_({__name:"VPSkipLink",setup(o){const e=te(),t=N();j(()=>e.path,()=>t.value.focus());function n({target:s}){const i=document.getElementById(decodeURIComponent(s.hash).slice(1));if(i){const u=()=>{i.removeAttribute("tabindex"),i.removeEventListener("blur",u)};i.setAttribute("tabindex","-1"),i.addEventListener("blur",u),i.focus(),window.scrollTo(0,0)}}return(s,i)=>(a(),c(C,null,[v("span",{ref_key:"backToTop",ref:t,tabindex:"-1"},null,512),v("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:n}," Skip to content ")],64))}}),ur=k(cr,[["__scopeId","data-v-0f60ec36"]]),dr=_({__name:"Layout",setup(o){const{isOpen:e,open:t,close:n}=O(),s=te();j(()=>s.path,n),$t(e,n);const{frontmatter:i}=S(),u=tt(),h=$(()=>!!u["home-hero-image"]);return Te("hero-image-slot-exists",h),(p,g)=>{const V=K("Content");return r(i).layout!==!1?(a(),c("div",{key:0,class:M(["Layout",r(i).pageClass])},[l(p.$slots,"layout-top",{},void 0,!0),m(ur),m(at,{class:"backdrop",show:r(e),onClick:r(n)},null,8,["show","onClick"]),m(Xa,null,{"nav-bar-title-before":d(()=>[l(p.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":d(()=>[l(p.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":d(()=>[l(p.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":d(()=>[l(p.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":d(()=>[l(p.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":d(()=>[l(p.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),m(Ns,{open:r(e),onOpenMenu:r(t)},null,8,["open","onOpenMenu"]),m(lr,{open:r(e)},{"sidebar-nav-before":d(()=>[l(p.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":d(()=>[l(p.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),m(us,null,{"page-top":d(()=>[l(p.$slots,"page-top",{},void 0,!0)]),"page-bottom":d(()=>[l(p.$slots,"page-bottom",{},void 0,!0)]),"not-found":d(()=>[l(p.$slots,"not-found",{},void 0,!0)]),"home-hero-before":d(()=>[l(p.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":d(()=>[l(p.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":d(()=>[l(p.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":d(()=>[l(p.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":d(()=>[l(p.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":d(()=>[l(p.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":d(()=>[l(p.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":d(()=>[l(p.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":d(()=>[l(p.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":d(()=>[l(p.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":d(()=>[l(p.$slots,"doc-before",{},void 0,!0)]),"doc-after":d(()=>[l(p.$slots,"doc-after",{},void 0,!0)]),"doc-top":d(()=>[l(p.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":d(()=>[l(p.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":d(()=>[l(p.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":d(()=>[l(p.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":d(()=>[l(p.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":d(()=>[l(p.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":d(()=>[l(p.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":d(()=>[l(p.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),m(fs),l(p.$slots,"layout-bottom",{},void 0,!0)],2)):(a(),b(V,{key:1}))}}}),vr=k(dr,[["__scopeId","data-v-5d98c3a5"]]),ye={Layout:vr,enhanceApp:({app:o})=>{o.component("Badge",ot)}},pr={data(){return{show:!1}},mounted(){this.show=navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i)}},hr={key:0,class:"wwads-cn wwads-horizontal","data-id":"296"};function fr(o,e,t,n,s,i){return s.show?(a(),c("div",hr)):f("",!0)}const _r=k(pr,[["render",fr]]),mr={},kr={class:"wwads-cn wwads-vertical","data-id":"296",style:{"margin-bottom":"20px"}};function br(o,e){return a(),c("div",kr)}const $r=k(mr,[["render",br]]),yr={...ye,Layout(){return ie(ye.Layout,null,{"doc-top":()=>ie(_r),"aside-top":()=>ie($r)})}};export{yr as R,S as u}; diff --git a/assets/chunks/theme.ccb07a11.js b/assets/chunks/theme.ccb07a11.js deleted file mode 100644 index 2f256a54..00000000 --- a/assets/chunks/theme.ccb07a11.js +++ /dev/null @@ -1,7 +0,0 @@ -import{d as g,o as a,c as l,r as c,n as C,a as A,t as V,_ as f,u as tt,b as i,e as nt,f as He,g as st,h as L,i as ot,j as at,w as j,k as Q,l as $,m as rt,p as F,q as it,P as lt,s as he,v as K,x as ee,y as le,z as u,F as M,A as y,B as v,T as fe,C as m,D as R,E as se,G as h,H as ze,I as ct,J as ut,K as U,L as De,M as Fe,N as x,O as H,Q as z,R as dt,S as Ne,U as me,V as oe,W as _t,X as J,Y as vt,Z as ge,$ as pt,a0 as ht,a1 as ft,a2 as mt,a3 as gt}from"./framework.44fd0451.js";const yt=g({__name:"VPBadge",props:{text:{},type:{}},setup(n){return(e,t)=>(a(),l("span",{class:C(["VPBadge",e.type??"tip"])},[c(e.$slots,"default",{},()=>[A(V(e.text),1)],!0)],2))}});const bt=f(yt,[["__scopeId","data-v-350d3852"]]),w=tt;function Oe(n){return ot()?(at(n),!0):!1}function Ge(n){return typeof n=="function"?n():i(n)}const $t=typeof window<"u",Re=()=>{};function kt(...n){if(n.length!==1)return nt(...n);const e=n[0];return typeof e=="function"?He(st(()=>({get:e,set:Re}))):L(e)}function Pt(n){var e;const t=Ge(n);return(e=t==null?void 0:t.$el)!=null?e:t}const ye=$t?window:void 0;function Vt(...n){let e,t,o,s;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,o,s]=n,e=ye):[e,t,o,s]=n,!e)return Re;Array.isArray(t)||(t=[t]),Array.isArray(o)||(o=[o]);const r=[],d=()=>{r.forEach(T=>T()),r.length=0},p=(T,I,B,S)=>(T.addEventListener(I,B,S),()=>T.removeEventListener(I,B,S)),_=j(()=>[Pt(e),Ge(s)],([T,I])=>{d(),T&&r.push(...t.flatMap(B=>o.map(S=>p(T,B,S,I))))},{immediate:!0,flush:"post"}),k=()=>{_(),d()};return Oe(k),k}function wt(){const n=L(!1);return rt()&&F(()=>{n.value=!0}),n}function St(n){const e=wt();return $(()=>(e.value,!!n()))}function _e(n,e={}){const{window:t=ye}=e,o=St(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let s;const r=L(!1),d=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",p):s.removeListener(p))},p=()=>{o.value&&(d(),s=t.matchMedia(kt(n).value),r.value=!!(s!=null&&s.matches),s&&("addEventListener"in s?s.addEventListener("change",p):s.addListener(p)))};return Q(p),Oe(()=>d()),r}function Ue({window:n=ye}={}){if(!n)return{x:L(0),y:L(0)};const e=L(n.scrollX),t=L(n.scrollY);return Vt(n,"scroll",()=>{e.value=n.scrollX,t.value=n.scrollY},{capture:!1,passive:!0}),{x:e,y:t}}function Lt(n,e){let t,o=!1;return()=>{t&&clearTimeout(t),o?t=setTimeout(n,e):(n(),o=!0,setTimeout(()=>{o=!1},e))}}function ve(n){return/^\//.test(n)?n:`/${n}`}function Z(n){if(it(n))return n.replace(lt,"");const{site:e}=w(),{pathname:t,search:o,hash:s}=new URL(n,"http://example.com"),r=t.endsWith("/")||t.endsWith(".html")?n:n.replace(/(?:(^\.+)\/)?.*$/,`$1${t.replace(/(\.md)?$/,e.value.cleanUrls?"":".html")}${o}${s}`);return he(r)}function qe(n,e){if(Array.isArray(n))return n;if(n==null)return[];e=ve(e);const t=Object.keys(n).sort((o,s)=>s.split("/").length-o.split("/").length).find(o=>e.startsWith(ve(o)));return t?n[t]:[]}function Mt(n){const e=[];let t=0;for(const o in n){const s=n[o];if(s.items){t=e.push(s);continue}e[t]||e.push({items:[]}),e[t].items.push(s)}return e}function Ct(n){const e=[];function t(o){for(const s of o)s.text&&s.link&&e.push({text:s.text,link:s.link}),s.items&&t(s.items)}return t(n),e}function pe(n,e){return Array.isArray(e)?e.some(t=>pe(n,t)):K(n,e.link)?!0:e.items?pe(n,e.items):!1}function D(){const n=ee(),{theme:e,frontmatter:t}=w(),o=_e("(min-width: 960px)"),s=L(!1),r=$(()=>{const P=e.value.sidebar,N=n.data.relativePath;return P?qe(P,N):[]}),d=$(()=>t.value.sidebar!==!1&&r.value.length>0&&t.value.layout!=="home"),p=$(()=>_?t.value.aside==null?e.value.aside==="left":t.value.aside==="left":!1),_=$(()=>t.value.layout==="home"?!1:t.value.aside!=null?!!t.value.aside:e.value.aside!==!1),k=$(()=>d.value&&o.value),T=$(()=>d.value?Mt(r.value):[]);function I(){s.value=!0}function B(){s.value=!1}function S(){s.value?B():I()}return{isOpen:s,sidebar:r,sidebarGroups:T,hasSidebar:d,hasAside:_,leftAside:p,isSidebarEnabled:k,open:I,close:B,toggle:S}}function It(n,e){let t;Q(()=>{t=n.value?document.activeElement:void 0}),F(()=>{window.addEventListener("keyup",o)}),le(()=>{window.removeEventListener("keyup",o)});function o(s){s.key==="Escape"&&n.value&&(e(),t==null||t.focus())}}function Bt(n){const{page:e}=w(),t=L(!1),o=$(()=>n.value.collapsed!=null),s=$(()=>!!n.value.link),r=$(()=>K(e.value.relativePath,n.value.link)),d=$(()=>r.value?!0:n.value.items?pe(e.value.relativePath,n.value.items):!1),p=$(()=>!!(n.value.items&&n.value.items.length));Q(()=>{t.value=!!(o.value&&n.value.collapsed)}),Q(()=>{(r.value||d.value)&&(t.value=!1)});function _(){o.value&&(t.value=!t.value)}return{collapsed:t,collapsible:o,isLink:s,isActiveLink:r,hasActiveLink:d,hasChildren:p,toggle:_}}const Tt=g({__name:"VPSkipLink",setup(n){const e=ee(),t=L();j(()=>e.path,()=>t.value.focus());function o({target:s}){const r=document.querySelector(decodeURIComponent(s.hash));if(r){const d=()=>{r.removeAttribute("tabindex"),r.removeEventListener("blur",d)};r.setAttribute("tabindex","-1"),r.addEventListener("blur",d),r.focus(),window.scrollTo(0,0)}}return(s,r)=>(a(),l(M,null,[u("span",{ref_key:"backToTop",ref:t,tabindex:"-1"},null,512),u("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:o}," Skip to content ")],64))}});const Nt=f(Tt,[["__scopeId","data-v-b8b11faa"]]),At={key:0,class:"VPBackdrop"},xt=g({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(n){return(e,t)=>(a(),y(fe,{name:"fade"},{default:v(()=>[e.show?(a(),l("div",At)):m("",!0)]),_:1}))}});const Et=f(xt,[["__scopeId","data-v-c79a1216"]]);function Ht(){const n=L(!1);function e(){n.value=!0,window.addEventListener("resize",s)}function t(){n.value=!1,window.removeEventListener("resize",s)}function o(){n.value?t():e()}function s(){window.outerWidth>=768&&t()}const r=ee();return j(()=>r.path,t),{isScreenOpen:n,openScreen:e,closeScreen:t,toggleScreen:o}}function te({removeCurrent:n=!0,correspondingLink:e=!1}={}){const{site:t,localeIndex:o,page:s,theme:r}=w(),d=$(()=>{var _,k;return{label:(_=t.value.locales[o.value])==null?void 0:_.label,link:((k=t.value.locales[o.value])==null?void 0:k.link)||(o.value==="root"?"/":`/${o.value}/`)}});return{localeLinks:$(()=>Object.entries(t.value.locales).flatMap(([_,k])=>n&&d.value.label===k.label?[]:{text:k.label,link:zt(k.link||(_==="root"?"/":`/${_}/`),r.value.i18nRouting!==!1&&e,s.value.relativePath.slice(d.value.link.length-1),!t.value.cleanUrls)})),currentLang:d}}function zt(n,e,t,o){return e?n.replace(/\/$/,"")+ve(t.replace(/(^|\/)?index.md$/,"$1").replace(/\.md$/,o?".html":"")):n}const Dt=["src","alt"],Ft={inheritAttrs:!1},Ot=g({...Ft,__name:"VPImage",props:{image:{},alt:{}},setup(n){return(e,t)=>{const o=R("VPImage",!0);return e.image?(a(),l(M,{key:0},[typeof e.image=="string"||"src"in e.image?(a(),l("img",se({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:i(he)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,Dt)):(a(),l(M,{key:1},[h(o,se({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),h(o,se({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):m("",!0)}}});const be=f(Ot,[["__scopeId","data-v-6db2186b"]]),Gt=["href"],Rt=g({__name:"VPNavBarTitle",setup(n){const{site:e,theme:t}=w(),{hasSidebar:o}=D(),{currentLang:s}=te();return(r,d)=>(a(),l("div",{class:C(["VPNavBarTitle",{"has-sidebar":i(o)}])},[u("a",{class:"title",href:i(Z)(i(s).link)},[c(r.$slots,"nav-bar-title-before",{},void 0,!0),i(t).logo?(a(),y(be,{key:0,class:"logo",image:i(t).logo},null,8,["image"])):m("",!0),i(t).siteTitle?(a(),l(M,{key:1},[A(V(i(t).siteTitle),1)],64)):i(t).siteTitle===void 0?(a(),l(M,{key:2},[A(V(i(e).title),1)],64)):m("",!0),c(r.$slots,"nav-bar-title-after",{},void 0,!0)],8,Gt)],2))}});const Ut=f(Rt,[["__scopeId","data-v-4d981103"]]);const qt={type:"button",class:"DocSearch DocSearch-Button","aria-label":"Search"},jt={class:"DocSearch-Button-Container"},Kt=u("svg",{class:"DocSearch-Search-Icon",width:"20",height:"20",viewBox:"0 0 20 20","aria-label":"search icon"},[u("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none","fill-rule":"evenodd","stroke-linecap":"round","stroke-linejoin":"round"})],-1),Wt={class:"DocSearch-Button-Placeholder"},Yt=u("span",{class:"DocSearch-Button-Keys"},[u("kbd",{class:"DocSearch-Button-Key"}),u("kbd",{class:"DocSearch-Button-Key"},"K")],-1),Ae=g({__name:"VPNavBarSearchButton",props:{placeholder:{}},setup(n){return(e,t)=>(a(),l("button",qt,[u("span",jt,[Kt,u("span",Wt,V(e.placeholder),1)]),Yt]))}});const Xt={id:"local-search"},Qt={key:1,id:"docsearch"},Jt=g({__name:"VPNavBarSearch",setup(n){const e=()=>null,t=ct(()=>ut(()=>import("./VPAlgoliaSearchBox.0c29092b.js"),["assets/chunks/VPAlgoliaSearchBox.0c29092b.js","assets/chunks/framework.44fd0451.js"])),{theme:o,localeIndex:s}=w(),r=L(!1),d=$(()=>{var N,b,E,ne,W,Be,Te;const P=((N=o.value.search)==null?void 0:N.options)??o.value.algolia;return((W=(ne=(E=(b=P==null?void 0:P.locales)==null?void 0:b[s.value])==null?void 0:E.translations)==null?void 0:ne.button)==null?void 0:W.buttonText)||((Te=(Be=P==null?void 0:P.translations)==null?void 0:Be.button)==null?void 0:Te.buttonText)||"Search"}),p=()=>{const P="VPAlgoliaPreconnect";(window.requestIdleCallback||setTimeout)(()=>{var E;const b=document.createElement("link");b.id=P,b.rel="preconnect",b.href=`https://${(((E=o.value.search)==null?void 0:E.options)??o.value.algolia).appId}-dsn.algolia.net`,b.crossOrigin="",document.head.appendChild(b)})};F(()=>{p();const P=b=>{(b.key.toLowerCase()==="k"&&(b.metaKey||b.ctrlKey)||!T(b)&&b.key==="/")&&(b.preventDefault(),_(),N())},N=()=>{window.removeEventListener("keydown",P)};window.addEventListener("keydown",P),le(N)});function _(){r.value||(r.value=!0,setTimeout(k,16))}function k(){const P=new Event("keydown");P.key="k",P.metaKey=!0,window.dispatchEvent(P),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||k()},16)}function T(P){const N=P.target,b=N.tagName;return N.isContentEditable||b==="INPUT"||b==="SELECT"||b==="TEXTAREA"}const I=L(!1),B=L("'Meta'");F(()=>{B.value=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?"'⌘'":"'Ctrl'"});const S="algolia";return(P,N)=>{var b;return a(),l("div",{class:"VPNavBarSearch",style:ze({"--vp-meta-key":B.value})},[i(S)==="local"?(a(),l(M,{key:0},[I.value?(a(),y(i(e),{key:0,placeholder:d.value,onClose:N[0]||(N[0]=E=>I.value=!1)},null,8,["placeholder"])):m("",!0),u("div",Xt,[h(Ae,{placeholder:d.value,onClick:N[1]||(N[1]=E=>I.value=!0)},null,8,["placeholder"])])],64)):i(S)==="algolia"?(a(),l(M,{key:1},[r.value?(a(),y(i(t),{key:0,algolia:((b=i(o).search)==null?void 0:b.options)??i(o).algolia},null,8,["algolia"])):(a(),l("div",Qt,[h(Ae,{placeholder:d.value,onClick:_},null,8,["placeholder"])]))],64)):m("",!0)],4)}}});const Zt={},en={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",height:"24px",viewBox:"0 0 24 24",width:"24px"},tn=u("path",{d:"M0 0h24v24H0V0z",fill:"none"},null,-1),nn=u("path",{d:"M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z"},null,-1),sn=[tn,nn];function on(n,e){return a(),l("svg",en,sn)}const an=f(Zt,[["render",on]]),rn=g({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(n){const e=n,t=$(()=>e.tag??e.href?"a":"span"),o=$(()=>e.href&&De.test(e.href));return(s,r)=>(a(),y(U(t.value),{class:C(["VPLink",{link:s.href}]),href:s.href?i(Z)(s.href):void 0,target:s.target||(o.value?"_blank":void 0),rel:s.rel||(o.value?"noreferrer":void 0)},{default:v(()=>[c(s.$slots,"default",{},void 0,!0),o.value&&!s.noIcon?(a(),y(an,{key:0,class:"icon"})):m("",!0)]),_:3},8,["class","href","target","rel"]))}});const O=f(rn,[["__scopeId","data-v-8f4dc553"]]),ln=g({__name:"VPNavBarMenuLink",props:{item:{}},setup(n){const{page:e}=w();return(t,o)=>(a(),y(O,{class:C({VPNavBarMenuLink:!0,active:i(K)(i(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,tabindex:"0"},{default:v(()=>[A(V(t.item.text),1)]),_:1},8,["class","href","target","rel"]))}});const cn=f(ln,[["__scopeId","data-v-5e623618"]]),$e=L();let je=!1,de=0;function un(n){const e=L(!1);if(Fe){!je&&dn(),de++;const t=j($e,o=>{var s,r,d;o===n.el.value||(s=n.el.value)!=null&&s.contains(o)?(e.value=!0,(r=n.onFocus)==null||r.call(n)):(e.value=!1,(d=n.onBlur)==null||d.call(n))});le(()=>{t(),de--,de||_n()})}return He(e)}function dn(){document.addEventListener("focusin",Ke),je=!0,$e.value=document.activeElement}function _n(){document.removeEventListener("focusin",Ke)}function Ke(){$e.value=document.activeElement}const vn={},pn={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},hn=u("path",{d:"M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"},null,-1),fn=[hn];function mn(n,e){return a(),l("svg",pn,fn)}const We=f(vn,[["render",mn]]),gn={},yn={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},bn=u("circle",{cx:"12",cy:"12",r:"2"},null,-1),$n=u("circle",{cx:"19",cy:"12",r:"2"},null,-1),kn=u("circle",{cx:"5",cy:"12",r:"2"},null,-1),Pn=[bn,$n,kn];function Vn(n,e){return a(),l("svg",yn,Pn)}const wn=f(gn,[["render",Vn]]),Sn={class:"VPMenuLink"},Ln=g({__name:"VPMenuLink",props:{item:{}},setup(n){const{page:e}=w();return(t,o)=>(a(),l("div",Sn,[h(O,{class:C({active:i(K)(i(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel},{default:v(()=>[A(V(t.item.text),1)]),_:1},8,["class","href","target","rel"])]))}});const ce=f(Ln,[["__scopeId","data-v-2f2cfafc"]]),Mn={class:"VPMenuGroup"},Cn={key:0,class:"title"},In=g({__name:"VPMenuGroup",props:{text:{},items:{}},setup(n){return(e,t)=>(a(),l("div",Mn,[e.text?(a(),l("p",Cn,V(e.text),1)):m("",!0),(a(!0),l(M,null,x(e.items,o=>(a(),l(M,null,["link"in o?(a(),y(ce,{key:0,item:o},null,8,["item"])):m("",!0)],64))),256))]))}});const Bn=f(In,[["__scopeId","data-v-69e747b5"]]),Tn={class:"VPMenu"},Nn={key:0,class:"items"},An=g({__name:"VPMenu",props:{items:{}},setup(n){return(e,t)=>(a(),l("div",Tn,[e.items?(a(),l("div",Nn,[(a(!0),l(M,null,x(e.items,o=>(a(),l(M,{key:o.text},["link"in o?(a(),y(ce,{key:0,item:o},null,8,["item"])):(a(),y(Bn,{key:1,text:o.text,items:o.items},null,8,["text","items"]))],64))),128))])):m("",!0),c(e.$slots,"default",{},void 0,!0)]))}});const xn=f(An,[["__scopeId","data-v-e7ea1737"]]),En=["aria-expanded","aria-label"],Hn={key:0,class:"text"},zn={class:"menu"},Dn=g({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(n){const e=L(!1),t=L();un({el:t,onBlur:o});function o(){e.value=!1}return(s,r)=>(a(),l("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:r[1]||(r[1]=d=>e.value=!0),onMouseleave:r[2]||(r[2]=d=>e.value=!1)},[u("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":s.label,onClick:r[0]||(r[0]=d=>e.value=!e.value)},[s.button||s.icon?(a(),l("span",Hn,[s.icon?(a(),y(U(s.icon),{key:0,class:"option-icon"})):m("",!0),A(" "+V(s.button)+" ",1),h(We,{class:"text-icon"})])):(a(),y(wn,{key:1,class:"icon"}))],8,En),u("div",zn,[h(xn,{items:s.items},{default:v(()=>[c(s.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}});const ke=f(Dn,[["__scopeId","data-v-764effdf"]]),Fn=g({__name:"VPNavBarMenuGroup",props:{item:{}},setup(n){const{page:e}=w();return(t,o)=>(a(),y(ke,{class:C({VPNavBarMenuGroup:!0,active:i(K)(i(e).relativePath,t.item.activeMatch,!!t.item.activeMatch)}),button:t.item.text,items:t.item.items},null,8,["class","button","items"]))}}),On=n=>(H("data-v-7f418b0f"),n=n(),z(),n),Gn={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},Rn=On(()=>u("span",{id:"main-nav-aria-label",class:"visually-hidden"},"Main Navigation",-1)),Un=g({__name:"VPNavBarMenu",setup(n){const{theme:e}=w();return(t,o)=>i(e).nav?(a(),l("nav",Gn,[Rn,(a(!0),l(M,null,x(i(e).nav,s=>(a(),l(M,{key:s.text},["link"in s?(a(),y(cn,{key:0,item:s},null,8,["item"])):(a(),y(Fn,{key:1,item:s},null,8,["item"]))],64))),128))])):m("",!0)}});const qn=f(Un,[["__scopeId","data-v-7f418b0f"]]),jn={},Kn={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},Wn=u("path",{d:"M0 0h24v24H0z",fill:"none"},null,-1),Yn=u("path",{d:" M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z ",class:"css-c4d79v"},null,-1),Xn=[Wn,Yn];function Qn(n,e){return a(),l("svg",Kn,Xn)}const Ye=f(jn,[["render",Qn]]),Jn={class:"items"},Zn={class:"title"},es=g({__name:"VPNavBarTranslations",setup(n){const{theme:e}=w(),{localeLinks:t,currentLang:o}=te({correspondingLink:!0});return(s,r)=>i(t).length&&i(o).label?(a(),y(ke,{key:0,class:"VPNavBarTranslations",icon:Ye,label:i(e).langMenuLabel||"Change language"},{default:v(()=>[u("div",Jn,[u("p",Zn,V(i(o).label),1),(a(!0),l(M,null,x(i(t),d=>(a(),y(ce,{key:d.link,item:d},null,8,["item"]))),128))])]),_:1},8,["label"])):m("",!0)}});const ts=f(es,[["__scopeId","data-v-74abcbb9"]]);const ns={},ss={class:"VPSwitch",type:"button",role:"switch"},os={class:"check"},as={key:0,class:"icon"};function rs(n,e){return a(),l("button",ss,[u("span",os,[n.$slots.default?(a(),l("span",as,[c(n.$slots,"default",{},void 0,!0)])):m("",!0)])])}const is=f(ns,[["render",rs],["__scopeId","data-v-f3c41672"]]),ls={},cs={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},us=dt('',9),ds=[us];function _s(n,e){return a(),l("svg",cs,ds)}const vs=f(ls,[["render",_s]]),ps={},hs={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},fs=u("path",{d:"M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"},null,-1),ms=[fs];function gs(n,e){return a(),l("svg",hs,ms)}const ys=f(ps,[["render",gs]]),bs=g({__name:"VPSwitchAppearance",setup(n){const{site:e,isDark:t}=w(),o=L(!1),s=Fe?r():()=>{};F(()=>{o.value=document.documentElement.classList.contains("dark")});function r(){const d=window.matchMedia("(prefers-color-scheme: dark)"),p=document.documentElement.classList;let _=localStorage.getItem(Ne),k=e.value.appearance==="dark"&&_==null||(_==="auto"||_==null?d.matches:_==="dark");d.onchange=B=>{_==="auto"&&I(k=B.matches)};function T(){I(k=!k),_=k?d.matches?"auto":"dark":d.matches?"light":"auto",localStorage.setItem(Ne,_)}function I(B){const S=document.createElement("style");S.type="text/css",S.appendChild(document.createTextNode(`:not(.VPSwitchAppearance):not(.VPSwitchAppearance *) { - -webkit-transition: none !important; - -moz-transition: none !important; - -o-transition: none !important; - -ms-transition: none !important; - transition: none !important; -}`)),document.head.appendChild(S),o.value=B,p[B?"add":"remove"]("dark"),window.getComputedStyle(S).opacity,document.head.removeChild(S)}return T}return j(o,d=>{t.value=d}),(d,p)=>(a(),y(is,{title:"toggle dark mode",class:"VPSwitchAppearance","aria-checked":o.value,onClick:i(s)},{default:v(()=>[h(vs,{class:"sun"}),h(ys,{class:"moon"})]),_:1},8,["aria-checked","onClick"]))}});const Pe=f(bs,[["__scopeId","data-v-82b282f1"]]),$s={key:0,class:"VPNavBarAppearance"},ks=g({__name:"VPNavBarAppearance",setup(n){const{site:e}=w();return(t,o)=>i(e).appearance?(a(),l("div",$s,[h(Pe)])):m("",!0)}});const Ps=f(ks,[["__scopeId","data-v-f6a63727"]]),Vs={discord:'Discord',facebook:'Facebook',github:'GitHub',instagram:'Instagram',linkedin:'LinkedIn',mastodon:'Mastodon',slack:'Slack',twitter:'Twitter',youtube:'YouTube'},ws=["href","aria-label","innerHTML"],Ss=g({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(n){const e=n,t=$(()=>typeof e.icon=="object"?e.icon.svg:Vs[e.icon]);return(o,s)=>(a(),l("a",{class:"VPSocialLink",href:o.link,"aria-label":o.ariaLabel??(typeof o.icon=="string"?o.icon:""),target:"_blank",rel:"noopener",innerHTML:t.value},null,8,ws))}});const Ls=f(Ss,[["__scopeId","data-v-36371990"]]),Ms={class:"VPSocialLinks"},Cs=g({__name:"VPSocialLinks",props:{links:{}},setup(n){return(e,t)=>(a(),l("div",Ms,[(a(!0),l(M,null,x(e.links,({link:o,icon:s,ariaLabel:r})=>(a(),y(Ls,{key:o,icon:s,link:o,ariaLabel:r},null,8,["icon","link","ariaLabel"]))),128))]))}});const Ve=f(Cs,[["__scopeId","data-v-7bc22406"]]),Is=g({__name:"VPNavBarSocialLinks",setup(n){const{theme:e}=w();return(t,o)=>i(e).socialLinks?(a(),y(Ve,{key:0,class:"VPNavBarSocialLinks",links:i(e).socialLinks},null,8,["links"])):m("",!0)}});const Bs=f(Is,[["__scopeId","data-v-0394ad82"]]),Ts={key:0,class:"group translations"},Ns={class:"trans-title"},As={key:1,class:"group"},xs={class:"item appearance"},Es={class:"label"},Hs={class:"appearance-action"},zs={key:2,class:"group"},Ds={class:"item social-links"},Fs=g({__name:"VPNavBarExtra",setup(n){const{site:e,theme:t}=w(),{localeLinks:o,currentLang:s}=te({correspondingLink:!0}),r=$(()=>o.value.length&&s.value.label||e.value.appearance||t.value.socialLinks);return(d,p)=>r.value?(a(),y(ke,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:v(()=>[i(o).length&&i(s).label?(a(),l("div",Ts,[u("p",Ns,V(i(s).label),1),(a(!0),l(M,null,x(i(o),_=>(a(),y(ce,{key:_.link,item:_},null,8,["item"]))),128))])):m("",!0),i(e).appearance?(a(),l("div",As,[u("div",xs,[u("p",Es,V(i(t).darkModeSwitchLabel||"Appearance"),1),u("div",Hs,[h(Pe)])])])):m("",!0),i(t).socialLinks?(a(),l("div",zs,[u("div",Ds,[h(Ve,{class:"social-links-list",links:i(t).socialLinks},null,8,["links"])])])):m("",!0)]),_:1})):m("",!0)}});const Os=f(Fs,[["__scopeId","data-v-40855f84"]]),Gs=n=>(H("data-v-e5dd9c1c"),n=n(),z(),n),Rs=["aria-expanded"],Us=Gs(()=>u("span",{class:"container"},[u("span",{class:"top"}),u("span",{class:"middle"}),u("span",{class:"bottom"})],-1)),qs=[Us],js=g({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(n){return(e,t)=>(a(),l("button",{type:"button",class:C(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=o=>e.$emit("click"))},qs,10,Rs))}});const Ks=f(js,[["__scopeId","data-v-e5dd9c1c"]]),Ws=n=>(H("data-v-7683ced7"),n=n(),z(),n),Ys={class:"container"},Xs={class:"title"},Qs={class:"content"},Js=Ws(()=>u("div",{class:"curtain"},null,-1)),Zs={class:"content-body"},eo=g({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(n){const{y:e}=Ue(),{hasSidebar:t}=D(),o=$(()=>({"has-sidebar":t.value,fill:e.value>0}));return(s,r)=>(a(),l("div",{class:C(["VPNavBar",o.value])},[u("div",Ys,[u("div",Xs,[h(Ut,null,{"nav-bar-title-before":v(()=>[c(s.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[c(s.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),u("div",Qs,[Js,u("div",Zs,[c(s.$slots,"nav-bar-content-before",{},void 0,!0),h(Jt,{class:"search"}),h(qn,{class:"menu"}),h(ts,{class:"translations"}),h(Ps,{class:"appearance"}),h(Bs,{class:"social-links"}),h(Os,{class:"extra"}),c(s.$slots,"nav-bar-content-after",{},void 0,!0),h(Ks,{class:"hamburger",active:s.isScreenOpen,onClick:r[0]||(r[0]=d=>s.$emit("toggle-screen"))},null,8,["active"])])])])],2))}});const to=f(eo,[["__scopeId","data-v-7683ced7"]]);function no(n){if(Array.isArray(n)){for(var e=0,t=Array(n.length);e1),q=[],re=!1,Se=-1,Y=void 0,G=void 0,X=void 0,Xe=function(e){return q.some(function(t){return!!(t.options.allowTouchMove&&t.options.allowTouchMove(e))})},ie=function(e){var t=e||window.event;return Xe(t.target)||t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)},so=function(e){if(X===void 0){var t=!!e&&e.reserveScrollBarGap===!0,o=window.innerWidth-document.documentElement.clientWidth;if(t&&o>0){var s=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);X=document.body.style.paddingRight,document.body.style.paddingRight=s+o+"px"}}Y===void 0&&(Y=document.body.style.overflow,document.body.style.overflow="hidden")},oo=function(){X!==void 0&&(document.body.style.paddingRight=X,X=void 0),Y!==void 0&&(document.body.style.overflow=Y,Y=void 0)},ao=function(){return window.requestAnimationFrame(function(){if(G===void 0){G={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var e=window,t=e.scrollY,o=e.scrollX,s=e.innerHeight;document.body.style.position="fixed",document.body.style.top=-t,document.body.style.left=-o,setTimeout(function(){return window.requestAnimationFrame(function(){var r=s-window.innerHeight;r&&t>=s&&(document.body.style.top=-(t+r))})},300)}})},ro=function(){if(G!==void 0){var e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);document.body.style.position=G.position,document.body.style.top=G.top,document.body.style.left=G.left,window.scrollTo(t,e),G=void 0}},io=function(e){return e?e.scrollHeight-e.scrollTop<=e.clientHeight:!1},lo=function(e,t){var o=e.targetTouches[0].clientY-Se;return Xe(e.target)?!1:t&&t.scrollTop===0&&o>0||io(t)&&o<0?ie(e):(e.stopPropagation(),!0)},Qe=function(e,t){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!q.some(function(s){return s.targetElement===e})){var o={targetElement:e,options:t||{}};q=[].concat(no(q),[o]),ae?ao():so(t),ae&&(e.ontouchstart=function(s){s.targetTouches.length===1&&(Se=s.targetTouches[0].clientY)},e.ontouchmove=function(s){s.targetTouches.length===1&&lo(s,e)},re||(document.addEventListener("touchmove",ie,we?{passive:!1}:void 0),re=!0))}},Je=function(){ae&&(q.forEach(function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null}),re&&(document.removeEventListener("touchmove",ie,we?{passive:!1}:void 0),re=!1),Se=-1),ae?ro():oo(),q=[]};const co=g({__name:"VPNavScreenMenuLink",props:{item:{}},setup(n){const e=me("close-screen");return(t,o)=>(a(),y(O,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:i(e)},{default:v(()=>[A(V(t.item.text),1)]),_:1},8,["href","target","rel","onClick"]))}});const uo=f(co,[["__scopeId","data-v-30be0acb"]]),_o={},vo={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},po=u("path",{d:"M18.9,10.9h-6v-6c0-0.6-0.4-1-1-1s-1,0.4-1,1v6h-6c-0.6,0-1,0.4-1,1s0.4,1,1,1h6v6c0,0.6,0.4,1,1,1s1-0.4,1-1v-6h6c0.6,0,1-0.4,1-1S19.5,10.9,18.9,10.9z"},null,-1),ho=[po];function fo(n,e){return a(),l("svg",vo,ho)}const mo=f(_o,[["render",fo]]),go=g({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(n){const e=me("close-screen");return(t,o)=>(a(),y(O,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:i(e)},{default:v(()=>[A(V(t.item.text),1)]),_:1},8,["href","target","rel","onClick"]))}});const Ze=f(go,[["__scopeId","data-v-6656c42a"]]),yo={class:"VPNavScreenMenuGroupSection"},bo={key:0,class:"title"},$o=g({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(n){return(e,t)=>(a(),l("div",yo,[e.text?(a(),l("p",bo,V(e.text),1)):m("",!0),(a(!0),l(M,null,x(e.items,o=>(a(),y(Ze,{key:o.text,item:o},null,8,["item"]))),128))]))}});const ko=f($o,[["__scopeId","data-v-8133b170"]]),Po=["aria-controls","aria-expanded"],Vo={class:"button-text"},wo=["id"],So={key:1,class:"group"},Lo=g({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(n){const e=n,t=L(!1),o=$(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function s(){t.value=!t.value}return(r,d)=>(a(),l("div",{class:C(["VPNavScreenMenuGroup",{open:t.value}])},[u("button",{class:"button","aria-controls":o.value,"aria-expanded":t.value,onClick:s},[u("span",Vo,V(r.text),1),h(mo,{class:"button-icon"})],8,Po),u("div",{id:o.value,class:"items"},[(a(!0),l(M,null,x(r.items,p=>(a(),l(M,{key:p.text},["link"in p?(a(),l("div",{key:p.text,class:"item"},[h(Ze,{item:p},null,8,["item"])])):(a(),l("div",So,[h(ko,{text:p.text,items:p.items},null,8,["text","items"])]))],64))),128))],8,wo)],2))}});const Mo=f(Lo,[["__scopeId","data-v-338a1689"]]),Co={key:0,class:"VPNavScreenMenu"},Io=g({__name:"VPNavScreenMenu",setup(n){const{theme:e}=w();return(t,o)=>i(e).nav?(a(),l("nav",Co,[(a(!0),l(M,null,x(i(e).nav,s=>(a(),l(M,{key:s.text},["link"in s?(a(),y(uo,{key:0,item:s},null,8,["item"])):(a(),y(Mo,{key:1,text:s.text||"",items:s.items},null,8,["text","items"]))],64))),128))])):m("",!0)}}),Bo={key:0,class:"VPNavScreenAppearance"},To={class:"text"},No=g({__name:"VPNavScreenAppearance",setup(n){const{site:e,theme:t}=w();return(o,s)=>i(e).appearance?(a(),l("div",Bo,[u("p",To,V(i(t).darkModeSwitchLabel||"Appearance"),1),h(Pe)])):m("",!0)}});const Ao=f(No,[["__scopeId","data-v-add8f686"]]),xo={class:"list"},Eo=g({__name:"VPNavScreenTranslations",setup(n){const{localeLinks:e,currentLang:t}=te({correspondingLink:!0}),o=L(!1);function s(){o.value=!o.value}return(r,d)=>i(e).length&&i(t).label?(a(),l("div",{key:0,class:C(["VPNavScreenTranslations",{open:o.value}])},[u("button",{class:"title",onClick:s},[h(Ye,{class:"icon lang"}),A(" "+V(i(t).label)+" ",1),h(We,{class:"icon chevron"})]),u("ul",xo,[(a(!0),l(M,null,x(i(e),p=>(a(),l("li",{key:p.link,class:"item"},[h(O,{class:"link",href:p.link},{default:v(()=>[A(V(p.text),1)]),_:2},1032,["href"])]))),128))])],2)):m("",!0)}});const Ho=f(Eo,[["__scopeId","data-v-d72aa483"]]),zo=g({__name:"VPNavScreenSocialLinks",setup(n){const{theme:e}=w();return(t,o)=>i(e).socialLinks?(a(),y(Ve,{key:0,class:"VPNavScreenSocialLinks",links:i(e).socialLinks},null,8,["links"])):m("",!0)}}),Do={class:"container"},Fo=g({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(n){const e=L(null);function t(){Qe(e.value,{reserveScrollBarGap:!0})}function o(){Je()}return(s,r)=>(a(),y(fe,{name:"fade",onEnter:t,onAfterLeave:o},{default:v(()=>[s.open?(a(),l("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e},[u("div",Do,[c(s.$slots,"nav-screen-content-before",{},void 0,!0),h(Io,{class:"menu"}),h(Ho,{class:"translations"}),h(Ao,{class:"appearance"}),h(zo,{class:"social-links"}),c(s.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):m("",!0)]),_:3}))}});const Oo=f(Fo,[["__scopeId","data-v-724636ae"]]),Go={class:"VPNav"},Ro=g({__name:"VPNav",setup(n){const{isScreenOpen:e,closeScreen:t,toggleScreen:o}=Ht();return oe("close-screen",t),(s,r)=>(a(),l("header",Go,[h(to,{"is-screen-open":i(e),onToggleScreen:i(o)},{"nav-bar-title-before":v(()=>[c(s.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[c(s.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":v(()=>[c(s.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":v(()=>[c(s.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),h(Oo,{open:i(e)},{"nav-screen-content-before":v(()=>[c(s.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":v(()=>[c(s.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])]))}});const Uo=f(Ro,[["__scopeId","data-v-7e5bc4a5"]]);function qo(){const{hasSidebar:n}=D(),e=_e("(min-width: 960px)"),t=_e("(min-width: 1280px)");return{isAsideEnabled:$(()=>!t.value&&!e.value?!1:n.value?t.value:e.value)}}const jo=71;function Le(n){return typeof n.outline=="object"&&!Array.isArray(n.outline)&&n.outline.label||n.outlineTitle||"On this page"}function Me(n){const e=[...document.querySelectorAll(".VPDoc h2,h3,h4,h5,h6")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const o=Number(t.tagName[1]);return{title:Ko(t),link:"#"+t.id,level:o}});return Wo(e,n)}function Ko(n){let e="";for(const t of n.childNodes)if(t.nodeType===1){if(t.classList.contains("VPBadge")||t.classList.contains("header-anchor"))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function Wo(n,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[o,s]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;n=n.filter(d=>d.level>=o&&d.level<=s);const r=[];e:for(let d=0;d=0;_--){const k=n[_];if(k.level{requestAnimationFrame(r),window.addEventListener("scroll",o)}),_t(()=>{d(location.hash)}),le(()=>{window.removeEventListener("scroll",o)});function r(){if(!t.value)return;const p=[].slice.call(n.value.querySelectorAll(".outline-link")),_=[].slice.call(document.querySelectorAll(".content .header-anchor")).filter(S=>p.some(P=>P.hash===S.hash&&S.offsetParent!==null)),k=window.scrollY,T=window.innerHeight,I=document.body.offsetHeight,B=Math.abs(k+T-I)<1;if(_.length&&B){d(_[_.length-1].hash);return}for(let S=0;S<_.length;S++){const P=_[S],N=_[S+1],[b,E]=Xo(S,P,N);if(b){d(E);return}}}function d(p){s&&s.classList.remove("active"),p!==null&&(s=n.value.querySelector(`a[href="${decodeURIComponent(p)}"]`));const _=s;_?(_.classList.add("active"),e.value.style.top=_.offsetTop+33+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function Ee(n){return n.parentElement.offsetTop-jo}function Xo(n,e,t){const o=window.scrollY;return n===0&&o===0?[!0,null]:o{const s=R("VPDocOutlineItem",!0);return a(),l("ul",{class:C(t.root?"root":"nested")},[(a(!0),l(M,null,x(t.headers,({children:r,link:d,title:p})=>(a(),l("li",null,[u("a",{class:"outline-link",href:d,onClick:e,title:p},V(p),9,Qo),r!=null&&r.length?(a(),y(s,{key:0,headers:r},null,8,["headers"])):m("",!0)]))),256))],2)}}});const Ce=f(Jo,[["__scopeId","data-v-9a431c33"]]),Zo={},ea={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},ta=u("path",{d:"M9,19c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l5.3-5.3L8.3,6.7c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4l-6,6C9.5,18.9,9.3,19,9,19z"},null,-1),na=[ta];function sa(n,e){return a(),l("svg",ea,na)}const Ie=f(Zo,[["render",sa]]),oa=g({__name:"VPLocalNavOutlineDropdown",props:{headers:{}},setup(n){const{theme:e}=w(),t=L(!1),o=L(0),s=L();J(()=>{t.value=!1});function r(){t.value=!t.value,o.value=window.innerHeight+Math.min(window.scrollY-64,0)}function d(_){_.target.classList.contains("outline-link")&&(s.value&&(s.value.style.transition="none"),vt(()=>{t.value=!1}))}function p(){t.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(_,k)=>(a(),l("div",{class:"VPLocalNavOutlineDropdown",style:ze({"--vp-vh":o.value+"px"})},[_.headers.length>0?(a(),l("button",{key:0,onClick:r,class:C({open:t.value})},[A(V(i(Le)(i(e)))+" ",1),h(Ie,{class:"icon"})],2)):(a(),l("button",{key:1,onClick:p},V(i(e).returnToTopLabel||"Return to top"),1)),h(fe,{name:"flyout"},{default:v(()=>[t.value?(a(),l("div",{key:0,ref_key:"items",ref:s,class:"items",onClick:d},[u("a",{class:"top-link",href:"#",onClick:p},V(i(e).returnToTopLabel||"Return to top"),1),h(Ce,{headers:_.headers},null,8,["headers"])],512)):m("",!0)]),_:1})],4))}});const aa=f(oa,[["__scopeId","data-v-687955bc"]]),ra={},ia={xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",viewBox:"0 0 24 24"},la=u("path",{d:"M17,11H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,11,17,11z"},null,-1),ca=u("path",{d:"M21,7H3C2.4,7,2,6.6,2,6s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,7,21,7z"},null,-1),ua=u("path",{d:"M21,15H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h18c0.6,0,1,0.4,1,1S21.6,15,21,15z"},null,-1),da=u("path",{d:"M17,19H3c-0.6,0-1-0.4-1-1s0.4-1,1-1h14c0.6,0,1,0.4,1,1S17.6,19,17,19z"},null,-1),_a=[la,ca,ua,da];function va(n,e){return a(),l("svg",ia,_a)}const pa=f(ra,[["render",va]]),ha=["aria-expanded"],fa={class:"menu-text"},ma=g({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(n){const{theme:e,frontmatter:t}=w(),{hasSidebar:o}=D(),{y:s}=Ue(),r=ge([]);J(()=>{r.value=Me(t.value.outline??e.value.outline)});const d=$(()=>r.value.length===0&&!o.value),p=$(()=>({VPLocalNav:!0,fixed:d.value,"reached-top":s.value>=64}));return(_,k)=>i(t).layout!=="home"&&(!d.value||i(s)>=64)?(a(),l("div",{key:0,class:C(p.value)},[i(o)?(a(),l("button",{key:0,class:"menu","aria-expanded":_.open,"aria-controls":"VPSidebarNav",onClick:k[0]||(k[0]=T=>_.$emit("open-menu"))},[h(pa,{class:"menu-icon"}),u("span",fa,V(i(e).sidebarMenuLabel||"Menu"),1)],8,ha)):m("",!0),h(aa,{headers:r.value},null,8,["headers"])],2)):m("",!0)}});const ga=f(ma,[["__scopeId","data-v-9074c407"]]),ya=n=>(H("data-v-c4656e6d"),n=n(),z(),n),ba=["role","tabindex"],$a=ya(()=>u("div",{class:"indicator"},null,-1)),ka=["onKeydown"],Pa={key:1,class:"items"},Va=g({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(n){const e=n,{collapsed:t,collapsible:o,isLink:s,isActiveLink:r,hasActiveLink:d,hasChildren:p,toggle:_}=Bt($(()=>e.item)),k=$(()=>p.value?"section":"div"),T=$(()=>s.value?"a":"div"),I=$(()=>p.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),B=$(()=>s.value?void 0:"button"),S=$(()=>[[`level-${e.depth}`],{collapsible:o.value},{collapsed:t.value},{"is-link":s.value},{"is-active":r.value},{"has-active":d.value}]);function P(b){"key"in b&&b.key!=="Enter"||!e.item.link&&_()}function N(){e.item.link&&_()}return(b,E)=>{const ne=R("VPSidebarItem",!0);return a(),y(U(k.value),{class:C(["VPSidebarItem",S.value])},{default:v(()=>[b.item.text?(a(),l("div",se({key:0,class:"item",role:B.value},ht(b.item.items?{click:P,keydown:P}:{},!0),{tabindex:b.item.items&&0}),[$a,b.item.link?(a(),y(O,{key:0,tag:T.value,class:"link",href:b.item.link},{default:v(()=>[(a(),y(U(I.value),{class:"text",innerHTML:b.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href"])):(a(),y(U(I.value),{key:1,class:"text",innerHTML:b.item.text},null,8,["innerHTML"])),b.item.collapsed!=null?(a(),l("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:N,onKeydown:pt(N,["enter"]),tabindex:"0"},[h(Ie,{class:"caret-icon"})],40,ka)):m("",!0)],16,ba)):m("",!0),b.item.items&&b.item.items.length?(a(),l("div",Pa,[b.depth<5?(a(!0),l(M,{key:0},x(b.item.items,W=>(a(),y(ne,{key:W.text,item:W,depth:b.depth+1},null,8,["item","depth"]))),128)):m("",!0)])):m("",!0)]),_:1},8,["class"])}}});const wa=f(Va,[["__scopeId","data-v-c4656e6d"]]),et=n=>(H("data-v-af16598e"),n=n(),z(),n),Sa=et(()=>u("div",{class:"curtain"},null,-1)),La={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},Ma=et(()=>u("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),Ca=g({__name:"VPSidebar",props:{open:{type:Boolean}},setup(n){const e=n,{sidebarGroups:t,hasSidebar:o}=D();let s=L(null);function r(){Qe(s.value,{reserveScrollBarGap:!0})}function d(){Je()}return ft(async()=>{var p;e.open?(r(),(p=s.value)==null||p.focus()):d()}),(p,_)=>i(o)?(a(),l("aside",{key:0,class:C(["VPSidebar",{open:p.open}]),ref_key:"navEl",ref:s,onClick:_[0]||(_[0]=mt(()=>{},["stop"]))},[Sa,u("nav",La,[Ma,c(p.$slots,"sidebar-nav-before",{},void 0,!0),(a(!0),l(M,null,x(i(t),k=>(a(),l("div",{key:k.text,class:"group"},[h(wa,{item:k,depth:0},null,8,["item"])]))),128)),c(p.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):m("",!0)}});const Ia=f(Ca,[["__scopeId","data-v-af16598e"]]),Ba={},Ta={class:"VPPage"};function Na(n,e){const t=R("Content");return a(),l("div",Ta,[c(n.$slots,"page-top"),h(t),c(n.$slots,"page-bottom")])}const Aa=f(Ba,[["render",Na]]),xa=g({__name:"VPButton",props:{tag:{},size:{},theme:{},text:{},href:{}},setup(n){const e=n,t=$(()=>[e.size??"medium",e.theme??"brand"]),o=$(()=>e.href&&De.test(e.href)),s=$(()=>e.tag?e.tag:e.href?"a":"button");return(r,d)=>(a(),y(U(s.value),{class:C(["VPButton",t.value]),href:r.href?i(Z)(r.href):void 0,target:o.value?"_blank":void 0,rel:o.value?"noreferrer":void 0},{default:v(()=>[A(V(r.text),1)]),_:1},8,["class","href","target","rel"]))}});const Ea=f(xa,[["__scopeId","data-v-567ba664"]]),Ha=n=>(H("data-v-fd2650d5"),n=n(),z(),n),za={class:"container"},Da={class:"main"},Fa={key:0,class:"name"},Oa={class:"clip"},Ga={key:1,class:"text"},Ra={key:2,class:"tagline"},Ua={key:0,class:"actions"},qa={key:0,class:"image"},ja={class:"image-container"},Ka=Ha(()=>u("div",{class:"image-bg"},null,-1)),Wa=g({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(n){const e=me("hero-image-slot-exists");return(t,o)=>(a(),l("div",{class:C(["VPHero",{"has-image":t.image||i(e)}])},[u("div",za,[u("div",Da,[c(t.$slots,"home-hero-info",{},()=>[t.name?(a(),l("h1",Fa,[u("span",Oa,V(t.name),1)])):m("",!0),t.text?(a(),l("p",Ga,V(t.text),1)):m("",!0),t.tagline?(a(),l("p",Ra,V(t.tagline),1)):m("",!0)],!0),t.actions?(a(),l("div",Ua,[(a(!0),l(M,null,x(t.actions,s=>(a(),l("div",{key:s.link,class:"action"},[h(Ea,{tag:"a",size:"medium",theme:s.theme,text:s.text,href:s.link},null,8,["theme","text","href"])]))),128))])):m("",!0)]),t.image||i(e)?(a(),l("div",qa,[u("div",ja,[Ka,c(t.$slots,"home-hero-image",{},()=>[t.image?(a(),y(be,{key:0,class:"image-src",image:t.image},null,8,["image"])):m("",!0)],!0)])])):m("",!0)])],2))}});const Ya=f(Wa,[["__scopeId","data-v-fd2650d5"]]),Xa=g({__name:"VPHomeHero",setup(n){const{frontmatter:e}=w();return(t,o)=>i(e).hero?(a(),y(Ya,{key:0,class:"VPHomeHero",name:i(e).hero.name,text:i(e).hero.text,tagline:i(e).hero.tagline,image:i(e).hero.image,actions:i(e).hero.actions},{"home-hero-info":v(()=>[c(t.$slots,"home-hero-info")]),"home-hero-image":v(()=>[c(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):m("",!0)}}),Qa={},Ja={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Za=u("path",{d:"M19.9,12.4c0.1-0.2,0.1-0.5,0-0.8c-0.1-0.1-0.1-0.2-0.2-0.3l-7-7c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l5.3,5.3H5c-0.6,0-1,0.4-1,1s0.4,1,1,1h11.6l-5.3,5.3c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3l7-7C19.8,12.6,19.9,12.5,19.9,12.4z"},null,-1),er=[Za];function tr(n,e){return a(),l("svg",Ja,er)}const nr=f(Qa,[["render",tr]]),sr={class:"box"},or=["innerHTML"],ar=["innerHTML"],rr=["innerHTML"],ir={key:3,class:"link-text"},lr={class:"link-text-value"},cr=g({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{}},setup(n){return(e,t)=>(a(),y(O,{class:"VPFeature",href:e.link,"no-icon":!0},{default:v(()=>[u("article",sr,[typeof e.icon=="object"?(a(),y(be,{key:0,image:e.icon,alt:e.icon.alt,height:e.icon.height,width:e.icon.width},null,8,["image","alt","height","width"])):e.icon?(a(),l("div",{key:1,class:"icon",innerHTML:e.icon},null,8,or)):m("",!0),u("h2",{class:"title",innerHTML:e.title},null,8,ar),e.details?(a(),l("p",{key:2,class:"details",innerHTML:e.details},null,8,rr)):m("",!0),e.linkText?(a(),l("div",ir,[u("p",lr,[A(V(e.linkText)+" ",1),h(nr,{class:"link-text-icon"})])])):m("",!0)])]),_:1},8,["href"]))}});const ur=f(cr,[["__scopeId","data-v-837f6cca"]]),dr={key:0,class:"VPFeatures"},_r={class:"container"},vr={class:"items"},pr=g({__name:"VPFeatures",props:{features:{}},setup(n){const e=n,t=$(()=>{const o=e.features.length;if(o){if(o===2)return"grid-2";if(o===3)return"grid-3";if(o%3===0)return"grid-6";if(o>3)return"grid-4"}else return});return(o,s)=>o.features?(a(),l("div",dr,[u("div",_r,[u("div",vr,[(a(!0),l(M,null,x(o.features,r=>(a(),l("div",{key:r.title,class:C(["item",[t.value]])},[h(ur,{icon:r.icon,title:r.title,details:r.details,link:r.link,"link-text":r.linkText},null,8,["icon","title","details","link","link-text"])],2))),128))])])])):m("",!0)}});const hr=f(pr,[["__scopeId","data-v-ba861f23"]]),fr=g({__name:"VPHomeFeatures",setup(n){const{frontmatter:e}=w();return(t,o)=>i(e).features?(a(),y(hr,{key:0,class:"VPHomeFeatures",features:i(e).features},null,8,["features"])):m("",!0)}}),mr={class:"VPHome"},gr=g({__name:"VPHome",setup(n){return(e,t)=>{const o=R("Content");return a(),l("div",mr,[c(e.$slots,"home-hero-before",{},void 0,!0),h(Xa,null,{"home-hero-info":v(()=>[c(e.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-image":v(()=>[c(e.$slots,"home-hero-image",{},void 0,!0)]),_:3}),c(e.$slots,"home-hero-after",{},void 0,!0),c(e.$slots,"home-features-before",{},void 0,!0),h(fr),c(e.$slots,"home-features-after",{},void 0,!0),h(o)])}}});const yr=f(gr,[["__scopeId","data-v-d82743a8"]]),br=n=>(H("data-v-ff0f39c8"),n=n(),z(),n),$r={class:"content"},kr={class:"outline-title"},Pr={"aria-labelledby":"doc-outline-aria-label"},Vr=br(()=>u("span",{class:"visually-hidden",id:"doc-outline-aria-label"}," Table of Contents for current page ",-1)),wr=g({__name:"VPDocAsideOutline",setup(n){const{frontmatter:e,theme:t}=w(),o=ge([]);J(()=>{o.value=Me(e.value.outline??t.value.outline)});const s=L(),r=L();return Yo(s,r),(d,p)=>(a(),l("div",{class:C(["VPDocAsideOutline",{"has-outline":o.value.length>0}]),ref_key:"container",ref:s},[u("div",$r,[u("div",{class:"outline-marker",ref_key:"marker",ref:r},null,512),u("div",kr,V(i(Le)(i(t))),1),u("nav",Pr,[Vr,h(Ce,{headers:o.value,root:!0},null,8,["headers"])])])],2))}});const Sr=f(wr,[["__scopeId","data-v-ff0f39c8"]]),Lr={class:"VPDocAsideCarbonAds"},Mr=g({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(n){const e=()=>null;return(t,o)=>(a(),l("div",Lr,[h(i(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),Cr=n=>(H("data-v-3f215769"),n=n(),z(),n),Ir={class:"VPDocAside"},Br=Cr(()=>u("div",{class:"spacer"},null,-1)),Tr=g({__name:"VPDocAside",setup(n){const{theme:e}=w();return(t,o)=>(a(),l("div",Ir,[c(t.$slots,"aside-top",{},void 0,!0),c(t.$slots,"aside-outline-before",{},void 0,!0),h(Sr),c(t.$slots,"aside-outline-after",{},void 0,!0),Br,c(t.$slots,"aside-ads-before",{},void 0,!0),i(e).carbonAds?(a(),y(Mr,{key:0,"carbon-ads":i(e).carbonAds},null,8,["carbon-ads"])):m("",!0),c(t.$slots,"aside-ads-after",{},void 0,!0),c(t.$slots,"aside-bottom",{},void 0,!0)]))}});const Nr=f(Tr,[["__scopeId","data-v-3f215769"]]);function Ar(){const{theme:n,page:e}=w();return $(()=>{const{text:t="Edit this page",pattern:o=""}=n.value.editLink||{};let s;return typeof o=="function"?s=o(e.value):s=o.replace(/:path/g,e.value.filePath),{url:s,text:t}})}function xr(){const{page:n,theme:e,frontmatter:t}=w();return $(()=>{var _,k,T,I,B,S;const o=qe(e.value.sidebar,n.value.relativePath),s=Ct(o),r=s.findIndex(P=>K(n.value.relativePath,P.link)),d=((_=e.value.docFooter)==null?void 0:_.prev)===!1&&!t.value.prev||t.value.prev===!1,p=((k=e.value.docFooter)==null?void 0:k.next)===!1&&!t.value.next||t.value.next===!1;return{prev:d?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((T=s[r-1])==null?void 0:T.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((I=s[r-1])==null?void 0:I.link)},next:p?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??((B=s[r+1])==null?void 0:B.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((S=s[r+1])==null?void 0:S.link)}}})}const Er={},Hr={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},zr=u("path",{d:"M18,23H4c-1.7,0-3-1.3-3-3V6c0-1.7,1.3-3,3-3h7c0.6,0,1,0.4,1,1s-0.4,1-1,1H4C3.4,5,3,5.4,3,6v14c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1v-7c0-0.6,0.4-1,1-1s1,0.4,1,1v7C21,21.7,19.7,23,18,23z"},null,-1),Dr=u("path",{d:"M8,17c-0.3,0-0.5-0.1-0.7-0.3C7,16.5,6.9,16.1,7,15.8l1-4c0-0.2,0.1-0.3,0.3-0.5l9.5-9.5c1.2-1.2,3.2-1.2,4.4,0c1.2,1.2,1.2,3.2,0,4.4l-9.5,9.5c-0.1,0.1-0.3,0.2-0.5,0.3l-4,1C8.2,17,8.1,17,8,17zM9.9,12.5l-0.5,2.1l2.1-0.5l9.3-9.3c0.4-0.4,0.4-1.1,0-1.6c-0.4-0.4-1.2-0.4-1.6,0l0,0L9.9,12.5z M18.5,2.5L18.5,2.5L18.5,2.5z"},null,-1),Fr=[zr,Dr];function Or(n,e){return a(),l("svg",Hr,Fr)}const Gr=f(Er,[["render",Or]]),Rr={class:"VPLastUpdated"},Ur=["datetime"],qr=g({__name:"VPDocFooterLastUpdated",setup(n){const{theme:e,page:t,lang:o}=w(),s=$(()=>new Date(t.value.lastUpdated)),r=$(()=>s.value.toISOString()),d=L("");return F(()=>{Q(()=>{d.value=s.value.toLocaleString(o.value)})}),(p,_)=>(a(),l("p",Rr,[A(V(i(e).lastUpdatedText||"Last updated")+": ",1),u("time",{datetime:r.value},V(d.value),9,Ur)]))}});const jr=f(qr,[["__scopeId","data-v-7b3ebfe1"]]),Kr={key:0,class:"VPDocFooter"},Wr={key:0,class:"edit-info"},Yr={key:0,class:"edit-link"},Xr={key:1,class:"last-updated"},Qr={key:1,class:"prev-next"},Jr={class:"pager"},Zr=["href"],ei=["innerHTML"],ti=["innerHTML"],ni=["href"],si=["innerHTML"],oi=["innerHTML"],ai=g({__name:"VPDocFooter",setup(n){const{theme:e,page:t,frontmatter:o}=w(),s=Ar(),r=xr(),d=$(()=>e.value.editLink&&o.value.editLink!==!1),p=$(()=>t.value.lastUpdated&&o.value.lastUpdated!==!1),_=$(()=>d.value||p.value||r.value.prev||r.value.next);return(k,T)=>{var I,B,S,P,N,b,E;return _.value?(a(),l("footer",Kr,[c(k.$slots,"doc-footer-before",{},void 0,!0),d.value||p.value?(a(),l("div",Wr,[d.value?(a(),l("div",Yr,[h(O,{class:"edit-link-button",href:i(s).url,"no-icon":!0},{default:v(()=>[h(Gr,{class:"edit-link-icon","aria-label":"edit icon"}),A(" "+V(i(s).text),1)]),_:1},8,["href"])])):m("",!0),p.value?(a(),l("div",Xr,[h(jr)])):m("",!0)])):m("",!0),(I=i(r).prev)!=null&&I.link||(B=i(r).next)!=null&&B.link?(a(),l("div",Qr,[u("div",Jr,[(S=i(r).prev)!=null&&S.link?(a(),l("a",{key:0,class:"pager-link prev",href:i(Z)(i(r).prev.link)},[u("span",{class:"desc",innerHTML:((P=i(e).docFooter)==null?void 0:P.prev)||"Previous page"},null,8,ei),u("span",{class:"title",innerHTML:i(r).prev.text},null,8,ti)],8,Zr)):m("",!0)]),u("div",{class:C(["pager",{"has-prev":(N=i(r).prev)==null?void 0:N.link}])},[(b=i(r).next)!=null&&b.link?(a(),l("a",{key:0,class:"pager-link next",href:i(Z)(i(r).next.link)},[u("span",{class:"desc",innerHTML:((E=i(e).docFooter)==null?void 0:E.next)||"Next page"},null,8,si),u("span",{class:"title",innerHTML:i(r).next.text},null,8,oi)],8,ni)):m("",!0)],2)])):m("",!0)])):m("",!0)}}});const ri=f(ai,[["__scopeId","data-v-face870a"]]),ii={key:0,class:"VPDocOutlineDropdown"},li={key:0,class:"items"},ci=g({__name:"VPDocOutlineDropdown",setup(n){const{frontmatter:e,theme:t}=w(),o=L(!1);J(()=>{o.value=!1});const s=ge([]);return J(()=>{s.value=Me(e.value.outline??t.value.outline)}),(r,d)=>s.value.length>0?(a(),l("div",ii,[u("button",{onClick:d[0]||(d[0]=p=>o.value=!o.value),class:C({open:o.value})},[A(V(i(Le)(i(t)))+" ",1),h(Ie,{class:"icon"})],2),o.value?(a(),l("div",li,[h(Ce,{headers:s.value},null,8,["headers"])])):m("",!0)])):m("",!0)}});const ui=f(ci,[["__scopeId","data-v-2edece88"]]),di=n=>(H("data-v-c4b0d3cf"),n=n(),z(),n),_i={class:"container"},vi=di(()=>u("div",{class:"aside-curtain"},null,-1)),pi={class:"aside-container"},hi={class:"aside-content"},fi={class:"content"},mi={class:"content-container"},gi={class:"main"},yi=g({__name:"VPDoc",setup(n){const e=ee(),{hasSidebar:t,hasAside:o,leftAside:s}=D(),r=$(()=>e.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(d,p)=>{const _=R("Content");return a(),l("div",{class:C(["VPDoc",{"has-sidebar":i(t),"has-aside":i(o)}])},[c(d.$slots,"doc-top",{},void 0,!0),u("div",_i,[i(o)?(a(),l("div",{key:0,class:C(["aside",{"left-aside":i(s)}])},[vi,u("div",pi,[u("div",hi,[h(Nr,null,{"aside-top":v(()=>[c(d.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":v(()=>[c(d.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":v(()=>[c(d.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[c(d.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[c(d.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[c(d.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):m("",!0),u("div",fi,[u("div",mi,[c(d.$slots,"doc-before",{},void 0,!0),h(ui),u("main",gi,[h(_,{class:C(["vp-doc",r.value])},null,8,["class"])]),h(ri,null,{"doc-footer-before":v(()=>[c(d.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),c(d.$slots,"doc-after",{},void 0,!0)])])]),c(d.$slots,"doc-bottom",{},void 0,!0)],2)}}});const bi=f(yi,[["__scopeId","data-v-c4b0d3cf"]]),ue=n=>(H("data-v-c70503b8"),n=n(),z(),n),$i={class:"NotFound"},ki=ue(()=>u("p",{class:"code"},"404",-1)),Pi=ue(()=>u("h1",{class:"title"},"PAGE NOT FOUND",-1)),Vi=ue(()=>u("div",{class:"divider"},null,-1)),wi=ue(()=>u("blockquote",{class:"quote"}," But if you don't change your direction, and if you keep looking, you may end up where you are heading. ",-1)),Si={class:"action"},Li=["href"],Mi=g({__name:"NotFound",setup(n){const{site:e}=w(),{localeLinks:t}=te({removeCurrent:!1}),o=L("/");return F(()=>{var r;const s=window.location.pathname.replace(e.value.base,"").replace(/(^.*?\/).*$/,"/$1");t.value.length&&(o.value=((r=t.value.find(({link:d})=>d.startsWith(s)))==null?void 0:r.link)||t.value[0].link)}),(s,r)=>(a(),l("div",$i,[ki,Pi,Vi,wi,u("div",Si,[u("a",{class:"link",href:i(he)(o.value),"aria-label":"go to home"}," Take me home ",8,Li)])]))}});const Ci=f(Mi,[["__scopeId","data-v-c70503b8"]]),Ii=g({__name:"VPContent",setup(n){const{page:e,frontmatter:t}=w(),{hasSidebar:o}=D();return(s,r)=>(a(),l("div",{class:C(["VPContent",{"has-sidebar":i(o),"is-home":i(t).layout==="home"}]),id:"VPContent"},[i(e).isNotFound?c(s.$slots,"not-found",{key:0},()=>[h(Ci)],!0):i(t).layout==="page"?(a(),y(Aa,{key:1},{"page-top":v(()=>[c(s.$slots,"page-top",{},void 0,!0)]),"page-bottom":v(()=>[c(s.$slots,"page-bottom",{},void 0,!0)]),_:3})):i(t).layout==="home"?(a(),y(yr,{key:2},{"home-hero-before":v(()=>[c(s.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info":v(()=>[c(s.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-image":v(()=>[c(s.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":v(()=>[c(s.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":v(()=>[c(s.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":v(()=>[c(s.$slots,"home-features-after",{},void 0,!0)]),_:3})):(a(),y(bi,{key:3},{"doc-top":v(()=>[c(s.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":v(()=>[c(s.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":v(()=>[c(s.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":v(()=>[c(s.$slots,"doc-before",{},void 0,!0)]),"doc-after":v(()=>[c(s.$slots,"doc-after",{},void 0,!0)]),"aside-top":v(()=>[c(s.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":v(()=>[c(s.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[c(s.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[c(s.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[c(s.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":v(()=>[c(s.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}});const Bi=f(Ii,[["__scopeId","data-v-a494bd1d"]]),Ti={class:"container"},Ni=["innerHTML"],Ai=["innerHTML"],xi=g({__name:"VPFooter",setup(n){const{theme:e}=w(),{hasSidebar:t}=D();return(o,s)=>i(e).footer?(a(),l("footer",{key:0,class:C(["VPFooter",{"has-sidebar":i(t)}])},[u("div",Ti,[i(e).footer.message?(a(),l("p",{key:0,class:"message",innerHTML:i(e).footer.message},null,8,Ni)):m("",!0),i(e).footer.copyright?(a(),l("p",{key:1,class:"copyright",innerHTML:i(e).footer.copyright},null,8,Ai)):m("",!0)])],2)):m("",!0)}});const Ei=f(xi,[["__scopeId","data-v-f7fc41f4"]]),Hi={key:0,class:"Layout"},zi=g({__name:"Layout",setup(n){const{isOpen:e,open:t,close:o}=D(),s=ee();j(()=>s.path,o),It(e,o),oe("close-sidebar",o),oe("is-sidebar-open",e);const{frontmatter:r}=w(),d=gt(),p=$(()=>!!d["home-hero-image"]);return oe("hero-image-slot-exists",p),(_,k)=>{const T=R("Content");return i(r).layout!==!1?(a(),l("div",Hi,[c(_.$slots,"layout-top",{},void 0,!0),h(Nt),h(Et,{class:"backdrop",show:i(e),onClick:i(o)},null,8,["show","onClick"]),h(Uo,null,{"nav-bar-title-before":v(()=>[c(_.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[c(_.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":v(()=>[c(_.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":v(()=>[c(_.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":v(()=>[c(_.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":v(()=>[c(_.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),h(ga,{open:i(e),onOpenMenu:i(t)},null,8,["open","onOpenMenu"]),h(Ia,{open:i(e)},{"sidebar-nav-before":v(()=>[c(_.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":v(()=>[c(_.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),h(Bi,null,{"page-top":v(()=>[c(_.$slots,"page-top",{},void 0,!0)]),"page-bottom":v(()=>[c(_.$slots,"page-bottom",{},void 0,!0)]),"not-found":v(()=>[c(_.$slots,"not-found",{},void 0,!0)]),"home-hero-before":v(()=>[c(_.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info":v(()=>[c(_.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-image":v(()=>[c(_.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":v(()=>[c(_.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":v(()=>[c(_.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":v(()=>[c(_.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":v(()=>[c(_.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":v(()=>[c(_.$slots,"doc-before",{},void 0,!0)]),"doc-after":v(()=>[c(_.$slots,"doc-after",{},void 0,!0)]),"doc-top":v(()=>[c(_.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":v(()=>[c(_.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":v(()=>[c(_.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":v(()=>[c(_.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":v(()=>[c(_.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[c(_.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[c(_.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[c(_.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),h(Ei),c(_.$slots,"layout-bottom",{},void 0,!0)])):(a(),y(T,{key:1}))}}});const Di=f(zi,[["__scopeId","data-v-b2cf3e0b"]]);const Oi={Layout:Di,enhanceApp:({app:n})=>{n.component("Badge",bt)}};export{Oi as t,w as u}; diff --git a/assets/developer_index.md.3bf4b5d9.js b/assets/developer_index.md.DFC7O4If.js similarity index 76% rename from assets/developer_index.md.3bf4b5d9.js rename to assets/developer_index.md.DFC7O4If.js index 70ae7d1a..576203ce 100644 --- a/assets/developer_index.md.3bf4b5d9.js +++ b/assets/developer_index.md.DFC7O4If.js @@ -1 +1 @@ -import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"哪吒监控","titleTemplate":"开发手册","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"开发手册","hero":{"name":"开发手册","text":"哪吒监控开发手册","tagline":"我们欢迎你提出高质量的Pull Request,帮助哪吒监控变得更好!","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"开始使用 →","link":"/developer/theme"}]}},"headers":[],"relativePath":"developer/index.md","filePath":"developer/index.md","lastUpdated":1718495592000}'),r={name:"developer/index.md"};function n(o,s,i,d,l,c){return t(),a("div")}const h=e(r,[["render",n]]);export{m as __pageData,h as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"哪吒监控","titleTemplate":"开发手册","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"开发手册","hero":{"name":"开发手册","text":"哪吒监控开发手册","tagline":"我们欢迎你提出高质量的Pull Request,帮助哪吒监控变得更好!","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"开始使用 →","link":"/developer/theme"}]}},"headers":[],"relativePath":"developer/index.md","filePath":"developer/index.md","lastUpdated":1719239024000}'),r={name:"developer/index.md"};function n(o,s,i,d,l,c){return a(),t("div")}const h=e(r,[["render",n]]);export{m as __pageData,h as default}; diff --git a/assets/developer_index.md.3bf4b5d9.lean.js b/assets/developer_index.md.DFC7O4If.lean.js similarity index 76% rename from assets/developer_index.md.3bf4b5d9.lean.js rename to assets/developer_index.md.DFC7O4If.lean.js index 70ae7d1a..576203ce 100644 --- a/assets/developer_index.md.3bf4b5d9.lean.js +++ b/assets/developer_index.md.DFC7O4If.lean.js @@ -1 +1 @@ -import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"哪吒监控","titleTemplate":"开发手册","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"开发手册","hero":{"name":"开发手册","text":"哪吒监控开发手册","tagline":"我们欢迎你提出高质量的Pull Request,帮助哪吒监控变得更好!","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"开始使用 →","link":"/developer/theme"}]}},"headers":[],"relativePath":"developer/index.md","filePath":"developer/index.md","lastUpdated":1718495592000}'),r={name:"developer/index.md"};function n(o,s,i,d,l,c){return t(),a("div")}const h=e(r,[["render",n]]);export{m as __pageData,h as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"哪吒监控","titleTemplate":"开发手册","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"开发手册","hero":{"name":"开发手册","text":"哪吒监控开发手册","tagline":"我们欢迎你提出高质量的Pull Request,帮助哪吒监控变得更好!","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"开始使用 →","link":"/developer/theme"}]}},"headers":[],"relativePath":"developer/index.md","filePath":"developer/index.md","lastUpdated":1719239024000}'),r={name:"developer/index.md"};function n(o,s,i,d,l,c){return a(),t("div")}const h=e(r,[["render",n]]);export{m as __pageData,h as default}; diff --git a/assets/developer_l10n.md.DlMPJ4AL.js b/assets/developer_l10n.md.DlMPJ4AL.js new file mode 100644 index 00000000..d94f8584 --- /dev/null +++ b/assets/developer_l10n.md.DlMPJ4AL.js @@ -0,0 +1 @@ +import{_ as e,c as o,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1719239024000}'),l={name:"developer/l10n.md"},r=t('

哪吒监控的 Dashboard 已经添加本地化,支持多个语言,你可以在开发新功能时遵循以下步骤来支持本地化

介绍

  1. 你可以直接使用 /resource/l10n/zh-CN.toml 中已有的文本配置来替换新功能中的文本
  2. 如果新功能中有新增文本,请参考 zh-CN.toml 的配置文本,将新文本拉取到 zh-CN.toml 等其他语言的配置文件中,并添加翻译

新本地化文本的添加

  1. /resource/l10n/ 中添加新的语言文本配置
  2. 在新的语言文本配置中拉取其他语言已有的文本配置
  3. 为新的语言文本配置添加翻译
',5),c=[r];function d(n,i,s,_,h,p){return a(),o("div",null,c)}const f=e(l,[["render",d]]);export{u as __pageData,f as default}; diff --git a/assets/developer_l10n.md.DlMPJ4AL.lean.js b/assets/developer_l10n.md.DlMPJ4AL.lean.js new file mode 100644 index 00000000..b6717c88 --- /dev/null +++ b/assets/developer_l10n.md.DlMPJ4AL.lean.js @@ -0,0 +1 @@ +import{_ as e,c as o,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1719239024000}'),l={name:"developer/l10n.md"},r=t("",5),c=[r];function d(n,i,s,_,h,p){return a(),o("div",null,c)}const f=e(l,[["render",d]]);export{u as __pageData,f as default}; diff --git a/assets/developer_l10n.md.f1206383.js b/assets/developer_l10n.md.f1206383.js deleted file mode 100644 index 390d6c81..00000000 --- a/assets/developer_l10n.md.f1206383.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1718495592000}'),l={name:"developer/l10n.md"},r=t('

哪吒监控的 Dashboard 已经添加本地化,支持多个语言,你可以在开发新功能时遵循以下步骤来支持本地化

介绍

  1. 你可以直接使用 /resource/l10n/zh-CN.toml 中已有的文本配置来替换新功能中的文本
  2. 如果新功能中有新增文本,请参考 zh-CN.toml 的配置文本,将新文本拉取到 zh-CN.toml 等其他语言的配置文件中,并添加翻译

新本地化文本的添加

  1. /resource/l10n/ 中添加新的语言文本配置
  2. 在新的语言文本配置中拉取其他语言已有的文本配置
  3. 为新的语言文本配置添加翻译
',5),c=[r];function d(n,i,s,_,h,p){return o(),a("div",null,c)}const f=e(l,[["render",d]]);export{u as __pageData,f as default}; diff --git a/assets/developer_l10n.md.f1206383.lean.js b/assets/developer_l10n.md.f1206383.lean.js deleted file mode 100644 index c77710cb..00000000 --- a/assets/developer_l10n.md.f1206383.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/l10n.md","filePath":"developer/l10n.md","lastUpdated":1718495592000}'),l={name:"developer/l10n.md"},r=t("",5),c=[r];function d(n,i,s,_,h,p){return o(),a("div",null,c)}const f=e(l,[["render",d]]);export{u as __pageData,f as default}; diff --git a/assets/developer_theme.md.67a964df.js b/assets/developer_theme.md.67a964df.js deleted file mode 100644 index a29b7f2e..00000000 --- a/assets/developer_theme.md.67a964df.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/theme.md","filePath":"developer/theme.md","lastUpdated":1718495592000}'),c={name:"developer/theme.md"},l=t('

哪吒主题开发环境

哪吒面板提供了主题开发环境,你可以使用它来创建新的哪吒监控主题

WARNING

请注意: 此开发环境仅支持 dashboard v0.13.16 及更新版本。

使用说明

  1. 克隆此仓库到本地
  2. 修改 data/config.yaml 中的 Oauth2 配置(回调连接可以填 http://localhost
  3. 运行 docker-compose up
  4. 开始开发
  5. 主题制作完成之后可以将 theme-custom 放置到服务器上的 /opt/nezha/dashboard/theme-custom 位置

FAQ

  • 如果不能使用 80 端口,在 docker-compose.yaml 中修改配置。
',7),d=[l];function r(s,i,h,n,m,_){return o(),a("div",null,d)}const f=e(c,[["render",r]]);export{u as __pageData,f as default}; diff --git a/assets/developer_theme.md.67a964df.lean.js b/assets/developer_theme.md.67a964df.lean.js deleted file mode 100644 index 249a3d31..00000000 --- a/assets/developer_theme.md.67a964df.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/theme.md","filePath":"developer/theme.md","lastUpdated":1718495592000}'),c={name:"developer/theme.md"},l=t("",7),d=[l];function r(s,i,h,n,m,_){return o(),a("div",null,d)}const f=e(c,[["render",r]]);export{u as __pageData,f as default}; diff --git a/assets/developer_theme.md.DpFToTun.js b/assets/developer_theme.md.DpFToTun.js new file mode 100644 index 00000000..dc6c1584 --- /dev/null +++ b/assets/developer_theme.md.DpFToTun.js @@ -0,0 +1 @@ +import{_ as e,c as a,o,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/theme.md","filePath":"developer/theme.md","lastUpdated":1719239024000}'),c={name:"developer/theme.md"},l=t('

哪吒主题开发环境

哪吒面板提供了主题开发环境,你可以使用它来创建新的哪吒监控主题

WARNING

请注意: 此开发环境仅支持 dashboard v0.13.16 及更新版本。

使用说明

  1. 克隆此仓库到本地
  2. 修改 data/config.yaml 中的 Oauth2 配置(回调连接可以填 http://localhost
  3. 运行 docker-compose up
  4. 开始开发
  5. 主题制作完成之后可以将 theme-custom 放置到服务器上的 /opt/nezha/dashboard/theme-custom 位置

FAQ

  • 如果不能使用 80 端口,在 docker-compose.yaml 中修改配置。
',7),d=[l];function r(s,i,h,n,m,_){return o(),a("div",null,d)}const f=e(c,[["render",r]]);export{u as __pageData,f as default}; diff --git a/assets/developer_theme.md.DpFToTun.lean.js b/assets/developer_theme.md.DpFToTun.lean.js new file mode 100644 index 00000000..5a7dc626 --- /dev/null +++ b/assets/developer_theme.md.DpFToTun.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,o,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"developer/theme.md","filePath":"developer/theme.md","lastUpdated":1719239024000}'),c={name:"developer/theme.md"},l=t("",7),d=[l];function r(s,i,h,n,m,_){return o(),a("div",null,d)}const f=e(c,[["render",r]]);export{u as __pageData,f as default}; diff --git a/assets/en_US_case_case1.md.4LkFrC_x.js b/assets/en_US_case_case1.md.4LkFrC_x.js new file mode 100644 index 00000000..8b8dcbf3 --- /dev/null +++ b/assets/en_US_case_case1.md.4LkFrC_x.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as r,a4 as o}from"./chunks/framework.BmdFiWrL.js";const d=JSON.parse('{"title":"Build your own Telegram bot to query server information","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case1.md","filePath":"en_US/case/case1.md","lastUpdated":1719239024000}'),a={name:"en_US/case/case1.md"},n=o('

Build your own Telegram bot to query server information

Contributors:

Project: nezha_api_tgbot (Chinese)

Mirror backup, non-real-time update: nezha_api_tgbot (Chinese)

The bot can request server status information from the Dashboard through the API, and then send the information to the user.
You can build this bot to easily view the current status of a given server without opening the Dashboard.

',6),i=[n];function s(h,_,l,u,c,p){return r(),t("div",null,i)}const m=e(a,[["render",s]]);export{d as __pageData,m as default}; diff --git a/assets/en_US_case_case1.md.4LkFrC_x.lean.js b/assets/en_US_case_case1.md.4LkFrC_x.lean.js new file mode 100644 index 00000000..0c99a26b --- /dev/null +++ b/assets/en_US_case_case1.md.4LkFrC_x.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as r,a4 as o}from"./chunks/framework.BmdFiWrL.js";const d=JSON.parse('{"title":"Build your own Telegram bot to query server information","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case1.md","filePath":"en_US/case/case1.md","lastUpdated":1719239024000}'),a={name:"en_US/case/case1.md"},n=o("",6),i=[n];function s(h,_,l,u,c,p){return r(),t("div",null,i)}const m=e(a,[["render",s]]);export{d as __pageData,m as default}; diff --git a/assets/en_US_case_case1.md.a1eac32f.js b/assets/en_US_case_case1.md.a1eac32f.js deleted file mode 100644 index 97432cf5..00000000 --- a/assets/en_US_case_case1.md.a1eac32f.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as r,R as o}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"Build your own Telegram bot to query server information","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case1.md","filePath":"en_US/case/case1.md","lastUpdated":1718495592000}'),a={name:"en_US/case/case1.md"},n=o('

Build your own Telegram bot to query server information

Contributors:

Project: nezha_api_tgbot (Chinese)

Mirror backup, non-real-time update: nezha_api_tgbot (Chinese)

The bot can request server status information from the Dashboard through the API, and then send the information to the user.
You can build this bot to easily view the current status of a given server without opening the Dashboard.

',6),i=[n];function s(h,_,l,u,c,p){return t(),r("div",null,i)}const m=e(a,[["render",s]]);export{d as __pageData,m as default}; diff --git a/assets/en_US_case_case1.md.a1eac32f.lean.js b/assets/en_US_case_case1.md.a1eac32f.lean.js deleted file mode 100644 index 71ad713e..00000000 --- a/assets/en_US_case_case1.md.a1eac32f.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as r,R as o}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"Build your own Telegram bot to query server information","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case1.md","filePath":"en_US/case/case1.md","lastUpdated":1718495592000}'),a={name:"en_US/case/case1.md"},n=o("",6),i=[n];function s(h,_,l,u,c,p){return t(),r("div",null,i)}const m=e(a,[["render",s]]);export{d as __pageData,m as default}; diff --git a/assets/en_US_case_case2.md.31035400.js b/assets/en_US_case_case2.md.31035400.js deleted file mode 100644 index c5b6f46d..00000000 --- a/assets/en_US_case_case2.md.31035400.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e}from"./chunks/qrcode.59c44dde.js";import{_ as t,o as r,c as o,R as s}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"Use Siri to run shortcut to check server status in iOS/MacOS","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case2.md","filePath":"en_US/case/case2.md","lastUpdated":1718495592000}'),a={name:"en_US/case/case2.md"},c=s('

Use Siri to run shortcut to check server status in iOS/MacOS

Current Version:V1.0 (Chinese)
Contributor:

Get shortcut command

Scan the following QR code with your iPhone or iPad to get the shortcut

coode


MacOS users please visit here to get the shortcut

How to use

  • After getting the shortcut, open and edit the shortcut
  • Fill in Dashboard URL, API Token, Server ID in the three text boxes
  • Save the edit and test run, if you can get the result, the setting is correct.
  • Modify the name of the shortcut, such as: Server Status, then you can use Siri command: "Hey Siri, Server Status" to get the server status.

WARNING

Each shortcut can only monitor one server, if you need to monitor more than one server, please copy this shortcut several times and configure them separately, then modify the shortcut name separately, such as; Server 1 Status, Server 2 Status, etc.

',8),i=[c];function h(n,u,l,d,m,_){return r(),o("div",null,i)}const b=t(a,[["render",h]]);export{f as __pageData,b as default}; diff --git a/assets/en_US_case_case2.md.31035400.lean.js b/assets/en_US_case_case2.md.31035400.lean.js deleted file mode 100644 index 5ef34f29..00000000 --- a/assets/en_US_case_case2.md.31035400.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e}from"./chunks/qrcode.59c44dde.js";import{_ as t,o as r,c as o,R as s}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"Use Siri to run shortcut to check server status in iOS/MacOS","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case2.md","filePath":"en_US/case/case2.md","lastUpdated":1718495592000}'),a={name:"en_US/case/case2.md"},c=s("",8),i=[c];function h(n,u,l,d,m,_){return r(),o("div",null,i)}const b=t(a,[["render",h]]);export{f as __pageData,b as default}; diff --git a/assets/en_US_case_case2.md.CtI6yc_M.js b/assets/en_US_case_case2.md.CtI6yc_M.js new file mode 100644 index 00000000..81bd3b18 --- /dev/null +++ b/assets/en_US_case_case2.md.CtI6yc_M.js @@ -0,0 +1 @@ +import{_ as e}from"./chunks/qrcode.CZOxHFH-.js";import{_ as t,c as r,o,a4 as s}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Use Siri to run shortcut to check server status in iOS/MacOS","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case2.md","filePath":"en_US/case/case2.md","lastUpdated":1719239024000}'),a={name:"en_US/case/case2.md"},c=s('

Use Siri to run shortcut to check server status in iOS/MacOS

Current Version:V1.0 (Chinese)
Contributor:

Get shortcut command

Scan the following QR code with your iPhone or iPad to get the shortcut

coode


MacOS users please visit here to get the shortcut

How to use

  • After getting the shortcut, open and edit the shortcut
  • Fill in Dashboard URL, API Token, Server ID in the three text boxes
  • Save the edit and test run, if you can get the result, the setting is correct.
  • Modify the name of the shortcut, such as: Server Status, then you can use Siri command: "Hey Siri, Server Status" to get the server status.

WARNING

Each shortcut can only monitor one server, if you need to monitor more than one server, please copy this shortcut several times and configure them separately, then modify the shortcut name separately, such as; Server 1 Status, Server 2 Status, etc.

',8),i=[c];function h(n,u,l,d,m,_){return o(),r("div",null,i)}const b=t(a,[["render",h]]);export{f as __pageData,b as default}; diff --git a/assets/en_US_case_case2.md.CtI6yc_M.lean.js b/assets/en_US_case_case2.md.CtI6yc_M.lean.js new file mode 100644 index 00000000..93c19828 --- /dev/null +++ b/assets/en_US_case_case2.md.CtI6yc_M.lean.js @@ -0,0 +1 @@ +import{_ as e}from"./chunks/qrcode.CZOxHFH-.js";import{_ as t,c as r,o,a4 as s}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Use Siri to run shortcut to check server status in iOS/MacOS","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case2.md","filePath":"en_US/case/case2.md","lastUpdated":1719239024000}'),a={name:"en_US/case/case2.md"},c=s("",8),i=[c];function h(n,u,l,d,m,_){return o(),r("div",null,i)}const b=t(a,[["render",h]]);export{f as __pageData,b as default}; diff --git a/assets/en_US_case_case3.md.DCEb-lOe.js b/assets/en_US_case_case3.md.DCEb-lOe.js new file mode 100644 index 00000000..1f8623aa --- /dev/null +++ b/assets/en_US_case_case3.md.DCEb-lOe.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as r,a4 as a}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Build your own server status query Telegram bot with multi-language and multi-user support","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case3.md","filePath":"en_US/case/case3.md","lastUpdated":1719239024000}'),d={name:"en_US/case/case3.md"},i=a('

Build your own server status query Telegram bot with multi-language and multi-user support

Contributor:

GitHub project: nezha_telegram_bot(English is already supported)

Mirror backup, non-real-time update : nezha_telegram_bot(English is already supported)

Features

  • [x] Support Chinese/English multi-language switch
  • [x] Support tag statistics (CPU, disk, memory, upstream and downstream speed, traffic statistics, etc.)
  • [x] Support real-time refresh of single server data
  • [x] Support keyboard interactive query
  • [x] Support query by command
  • [x] Support adding bot to group, privacy protection of bot replies in group chat
  • [x] Support bot messages automatic deletion in group chat within 20 seconds
  • [x] Support docker deployment

Commands list

CommandDescriptionPrivate chat only
startGetting started with the keyboard main menu✔️
helphelp message
addAdd Nezha monitoring url link and token✔️
urlAdd Nezha monitoring url link✔️
tokenAdd Nezha monitoring token✔️
infoGet saved Nezha monitoring url link and token✔️
deleteDelete saved Nezha monitoring url link and token✔️
idAdd an integer id after the command to query the information of a single server (refresh button only available in private chat)
allQuery statistics for all servers
searchSearch for keywords in server names (multiple keywords supported, split by spaces)
',9),o=[i];function s(l,n,u,h,p,m){return r(),e("div",null,o)}const _=t(d,[["render",s]]);export{g as __pageData,_ as default}; diff --git a/assets/en_US_case_case3.md.DCEb-lOe.lean.js b/assets/en_US_case_case3.md.DCEb-lOe.lean.js new file mode 100644 index 00000000..43e0eba7 --- /dev/null +++ b/assets/en_US_case_case3.md.DCEb-lOe.lean.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as r,a4 as a}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Build your own server status query Telegram bot with multi-language and multi-user support","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case3.md","filePath":"en_US/case/case3.md","lastUpdated":1719239024000}'),d={name:"en_US/case/case3.md"},i=a("",9),o=[i];function s(l,n,u,h,p,m){return r(),e("div",null,o)}const _=t(d,[["render",s]]);export{g as __pageData,_ as default}; diff --git a/assets/en_US_case_case3.md.d0600eda.js b/assets/en_US_case_case3.md.d0600eda.js deleted file mode 100644 index 05766814..00000000 --- a/assets/en_US_case_case3.md.d0600eda.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,o as e,c as r,R as a}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Build your own server status query Telegram bot with multi-language and multi-user support","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case3.md","filePath":"en_US/case/case3.md","lastUpdated":1718495592000}'),d={name:"en_US/case/case3.md"},i=a('

Build your own server status query Telegram bot with multi-language and multi-user support

Contributor:

GitHub project: nezha_telegram_bot(English is already supported)

Mirror backup, non-real-time update : nezha_telegram_bot(English is already supported)

Features

  • [x] Support Chinese/English multi-language switch
  • [x] Support tag statistics (CPU, disk, memory, upstream and downstream speed, traffic statistics, etc.)
  • [x] Support real-time refresh of single server data
  • [x] Support keyboard interactive query
  • [x] Support query by command
  • [x] Support adding bot to group, privacy protection of bot replies in group chat
  • [x] Support bot messages automatic deletion in group chat within 20 seconds
  • [x] Support docker deployment

Commands list

CommandDescriptionPrivate chat only
startGetting started with the keyboard main menu✔️
helphelp message
addAdd Nezha monitoring url link and token✔️
urlAdd Nezha monitoring url link✔️
tokenAdd Nezha monitoring token✔️
infoGet saved Nezha monitoring url link and token✔️
deleteDelete saved Nezha monitoring url link and token✔️
idAdd an integer id after the command to query the information of a single server (refresh button only available in private chat)
allQuery statistics for all servers
searchSearch for keywords in server names (multiple keywords supported, split by spaces)
',9),o=[i];function s(l,n,u,h,p,m){return e(),r("div",null,o)}const _=t(d,[["render",s]]);export{g as __pageData,_ as default}; diff --git a/assets/en_US_case_case3.md.d0600eda.lean.js b/assets/en_US_case_case3.md.d0600eda.lean.js deleted file mode 100644 index ecdbfd4b..00000000 --- a/assets/en_US_case_case3.md.d0600eda.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,o as e,c as r,R as a}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Build your own server status query Telegram bot with multi-language and multi-user support","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case3.md","filePath":"en_US/case/case3.md","lastUpdated":1718495592000}'),d={name:"en_US/case/case3.md"},i=a("",9),o=[i];function s(l,n,u,h,p,m){return e(),r("div",null,o)}const _=t(d,[["render",s]]);export{g as __pageData,_ as default}; diff --git a/assets/en_US_case_case4.md.Bq6rZxKf.js b/assets/en_US_case_case4.md.Bq6rZxKf.js new file mode 100644 index 00000000..29382e3c --- /dev/null +++ b/assets/en_US_case_case4.md.Bq6rZxKf.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a4 as r}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Fake-agent, monitoring data cheater","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case4.md","filePath":"en_US/case/case4.md","lastUpdated":1719239024000}'),n={name:"en_US/case/case4.md"},o=r('

Fake-agent, monitoring data cheater

Contributor:

GitHub project: fake-nezha-agent(Chinese)
Mirror backup, non-real-time update :fake-nezha-agent(Chinese)

You can modify the monitoring data uploaded to Dashboard by the Agent
Use it for cheating 😈

',5),i=[o];function s(c,h,_,d,f,l){return t(),a("div",null,i)}const m=e(n,[["render",s]]);export{g as __pageData,m as default}; diff --git a/assets/en_US_case_case4.md.Bq6rZxKf.lean.js b/assets/en_US_case_case4.md.Bq6rZxKf.lean.js new file mode 100644 index 00000000..be719975 --- /dev/null +++ b/assets/en_US_case_case4.md.Bq6rZxKf.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a4 as r}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Fake-agent, monitoring data cheater","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case4.md","filePath":"en_US/case/case4.md","lastUpdated":1719239024000}'),n={name:"en_US/case/case4.md"},o=r("",5),i=[o];function s(c,h,_,d,f,l){return t(),a("div",null,i)}const m=e(n,[["render",s]]);export{g as __pageData,m as default}; diff --git a/assets/en_US_case_case4.md.cd2a9c57.js b/assets/en_US_case_case4.md.cd2a9c57.js deleted file mode 100644 index 8c93d071..00000000 --- a/assets/en_US_case_case4.md.cd2a9c57.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as a,c as t,R as r}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Fake-agent, monitoring data cheater","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case4.md","filePath":"en_US/case/case4.md","lastUpdated":1718495592000}'),n={name:"en_US/case/case4.md"},o=r('

Fake-agent, monitoring data cheater

Contributor:

GitHub project: fake-nezha-agent(Chinese)
Mirror backup, non-real-time update :fake-nezha-agent(Chinese)

You can modify the monitoring data uploaded to Dashboard by the Agent
Use it for cheating 😈

',5),i=[o];function s(c,h,_,d,f,l){return a(),t("div",null,i)}const m=e(n,[["render",s]]);export{g as __pageData,m as default}; diff --git a/assets/en_US_case_case4.md.cd2a9c57.lean.js b/assets/en_US_case_case4.md.cd2a9c57.lean.js deleted file mode 100644 index 86104e13..00000000 --- a/assets/en_US_case_case4.md.cd2a9c57.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as a,c as t,R as r}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Fake-agent, monitoring data cheater","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case4.md","filePath":"en_US/case/case4.md","lastUpdated":1718495592000}'),n={name:"en_US/case/case4.md"},o=r("",5),i=[o];function s(c,h,_,d,f,l){return a(),t("div",null,i)}const m=e(n,[["render",s]]);export{g as __pageData,m as default}; diff --git a/assets/en_US_case_case5.md.XqwZ8iKk.js b/assets/en_US_case_case5.md.XqwZ8iKk.js new file mode 100644 index 00000000..76305492 --- /dev/null +++ b/assets/en_US_case_case5.md.XqwZ8iKk.js @@ -0,0 +1,47 @@ +import{_ as e,c as a,o as t,a4 as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Nezha server over Argo tunnel","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case5.md","filePath":"en_US/case/case5.md","lastUpdated":1719239024000}'),s={name:"en_US/case/case5.md"},o=n(`

Nezha server over Argo tunnel

Contributors:

GitHub project: Argo-Nezha-Service-Container

Mirror backup (not live update): Argo-Nezha-Service-Container


Catalog


Project Features.

  • Wider scope of application --- As long as there is a network connection, Nezha server can be installed, such as LXC, OpenVZ VPS, Nas Virtual Machine, Container PaaS, etc.
  • Argo tunnel breaks through the restriction of requiring a public network portal --- The traditional Nezha requires two public network ports, one for panel visiting and the other for client reporting, this project uses Cloudflare Argo tunnels and uses intranet tunneling.
  • IPv4 / v6 with higher flexibility --- The traditional Nezha needs to deal with IPv4/v6 compatibility between server and client, and also needs to resolve mismatches through tools such as warp. However, this project does not need to consider these issues at all, and can be docked arbitrarily, which is much more convenient and easy!
  • One Argo tunnel for multiple domains and protocols --- Create an intranet-penetrating Argo tunnel for three domains (hostname) and protocols, which can be used for panel access (http), client reporting (tcp) and ssh (optional).
  • GrpcWebProxy reverse proxy gRPC data port --- with a certificate for tls termination, then Argo's tunnel configuration with https service pointing to this reverse proxy, enable http2 back to the source, grpc(nezha)->GrpcWebProxy->h2(argo)->cf cdn edge->agent
  • Daily automatic backup --- every day at 04:00 BST, the entire Nezha panel folder is automatically backed up to a designated private github repository, including panel themes, panel settings, probe data and tunnel information, the backup retains nearly 5 days of data; the content is so important that it must be placed in the private repository.
  • Automatic daily panel update -- the latest official panel version is automatically detected every day at 4:00 BST, and updated when there is an upgrade.
  • Manual/automatic restore backup --- check the content of online restore file once a minute, and restore immediately when there is any update.
  • Default built-in local probes --- can easily monitor their own server information
  • More secure data --- Argo Tunnel uses TLS encrypted communication to securely transmit application traffic to the Cloudflare network, improving application security and reliability. In addition, Argo Tunnel protects against network threats such as IP leaks and DDoS attacks.
image

Prepare variables to be used

  • Visit the Cloudflare website, select the domain name you want to use, and turn on the network option to turn the gRPC switch on.
image

Add https:// to the beginning of the panel's domain name and /oauth2/callback to the end of the callback address.

imageimageimageimageimage

How to get Argo authentication: json or token

Argo tunnel authentication methods include json and token, use one of the two methods. The former is recommended because the script will handle all the Argo tunnel parameters and paths, while the latter needs to be set manually on the Cloudflare website and is prone to errors.

(Methods 1 - Json):

Easily get Argo tunnel json information through Cloudflare Json Generation Network: https://fscarmen.cloudflare.now.cc

image

(Methods 2 - Token): Manually generate Argo tunnel token information via Cloudflare website.

Go to the cf website: https://dash.cloudflare.com/

  • Go to zero trust and generate token tunnel and message.
  • The data path 443/https is proto.
  • ssh path 22/ssh for < client id >.
imageimageimageimageimageimageimage

PaaS Deployment Example

Image fscarmen/argo-nezha:latest, supports amd64 and arm64 architectures.

Variables used

Variable NameRequiredRemarks
GH_USERYesgithub username for panel admin authorization
GH_CLIENTIDyesapply on github
GH_CLIENTSECRETyesapply on github
GH_BACKUP_USERNoThe github username for backing up Nezha's server-side database on github, if not filled in, it is the same as the account GH_USER for panel management authorization
GH_REPONoThe github repository for backing up Nezha's server-side database files on github
GH_EMAILNogithub's mailbox for git push backups to remote repositories
GH_PATNogithub's PAT
ARGO_AUTHYesArgo Json from https://fscarmen.cloudflare.now.cc
Argo token from Cloudflare official website
ARGO_DOMAINYesArgo domain

Koyeb

Deploy to Koyeb

imageimageimageimageimage

VPS Deployment Method 1 --- docker

  • Note: ARGO_DOMAIN= must be followed by single quotes, which cannot be removed.
  • If the VPS is IPv6 only, please install WARP IPv4 or dual-stack first: https://github.com/fscarmen/warp
  • The backup directory is the dashboard folder in the current path.

docker deployment

docker run -dit \\
+           --name nezha_dashboard \\
+           --pull always \\
+           --restart always \\
+           -e GH_USER=<fill in github username> \\
+           -e GH_EMAIL=<fill in github email> \\
+           -e GH_PAT=<fill in the obtained> \\
+           -e GH_REPO=<fill in customized> \\
+           -e GH_CLIENTID=<fill in acquired> \\
+           -e GH_CLIENTSECRET=<fill in acquired> \\
+           -e ARGO_AUTH='<Fill in the fetched Argo json or token>' \\
+           -e ARGO_DOMAIN=<fill in customized> \\
+           -e GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank> \\
+           fscarmen/argo-nezha

docker-compose deployment

version: '3.8'
+services.
+    argo-nezha.
+        image: fscarmen/argo-nezha
+        --pull always
+        container_name: nezha_dashboard
+        restart: always
+        environment:
+            - GH_USER=<fill in github username>
+            - GH_EMAIL=<fill in your github email>
+            - GH_PAT=<<fill in obtained>
+            - GH_REPO=<fill in customized>
+            - GH_CLIENTID=<fill in obtained>
+            - GH_CLIENTSECRET=<fill in fetched>
+            - ARGO_AUTH='<Fill in the fetched Argo json or token>'
+            - ARGO_DOMAIN=<fill in customized>
+            - GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank>

VPS Deployment Method 2 --- hosts

bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)

Client Access

Transfer via gRPC, no additional configuration required. Use the installation method given in the panel, for example

curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent data.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls

SSH access

<filepath>/cloudflared access ssh --hostname ssh.seals.nom.za/<GH_CLIENTID>
imageimageimage

Manually backing up your data

Method 1: Change the contents of the README.md file in the Github backup repository to backup

image

Method 2: After ssh, run /dashboard/backup.sh for container version; /opt/nezha/dashboard/backup.sh for VPS host version.

Automatically restore backups

  • Change the name of the file to be restored to README.md in the github backup repository, the timer service will check for updates every minute and record the last synchronized filename in the local /dbfile to compare with the online file content.

The following is an example of restoring a file with the name dashboard-2023-04-23-13:08:37.tar.gz.

! image

Manually restore the backup

  • ssh into the container and run, tar.gz filename from the github backup repository, format: dashboard-2023-04-22-21:42:10.tar.gz
bash /dashboard/restore.sh <filename>
image

Migrating data

  • Backup the /dashboard folder of the original Nezha and zip it up to dashboard.tar.gz file.
tar czvf dashboard.tar.gz /dashboard
  • Download the file and put it into a private repository, the name of the repository should be exactly the same as <GH_REPO>, and edit the contents of README.md of the repository to dashboard.tar.gz.
  • Deploy the new Nezha in this project, and fill in the variables completely. After the deployment is done, the auto-restore script will check every minute, and will restore automatically if it finds any new content, the whole process will take about 3 minutes.

Main catalog files and descriptions

/dashboard/
+|-- app                  # Nezha panel main program
+|-- argo.json            # Argo tunnel json file, which records information about using the tunnel.
+|-- argo.yml             # Argo tunnel yml file, used for streaming web, gRPC and ssh protocols under a single tunnel with different domains.
+|-- backup.sh            # Backup data scripts
+|-- restore.sh           # Restore backup scripts
+|-- dbfile               # Record the name of the latest restore or backup file
+|-- resource             # Folders of information on panel themes, languages, flags, etc.
+|-- data
+|   |-- config.yaml      # Configuration for the Nezha panel, e.g. Github OAuth2 / gRPC domain / port / TLS enabled or not.
+|   \`-- sqlite.db        # SQLite database file that records all severs and cron settings for the panel.
+|-- entrypoint.sh        # The main script, which is executed after the container is run.
+|-- nezha.csr            # SSL/TLS certificate signing request
+|-- nezha.key            # Private key information for SSL/TLS certificate.
+|-- nezha.pem            # SSL/TLS certificate file.
+|-- cloudflared          # Cloudflare Argo tunnel main program.
+|-- grpcwebproxy         # gRPC reverse proxy main program.
+\`-- nezha-agent          # Nezha client, used to monitor the localhost.

Acknowledgements for articles and projects by

Disclaimer

  • This program is only for learning and understanding, non-profit purposes, please delete within 24 hours after downloading, not for any commercial purposes, text, data and images are copyrighted, if reproduced must indicate the source.
  • Use of this program is subject to the deployment disclaimer. Use of this program must follow the deployment of the server location, the country and the user's country laws and regulations, the author of the program is not responsible for any misconduct of the user.
`,89),r=[o];function i(l,c,h,d,p,u){return t(),a("div",null,r)}const f=e(s,[["render",i]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_case_case5.md.XqwZ8iKk.lean.js b/assets/en_US_case_case5.md.XqwZ8iKk.lean.js new file mode 100644 index 00000000..c367212e --- /dev/null +++ b/assets/en_US_case_case5.md.XqwZ8iKk.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a4 as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Nezha server over Argo tunnel","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case5.md","filePath":"en_US/case/case5.md","lastUpdated":1719239024000}'),s={name:"en_US/case/case5.md"},o=n("",89),r=[o];function i(l,c,h,d,p,u){return t(),a("div",null,r)}const f=e(s,[["render",i]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_case_case5.md.f8b87ece.js b/assets/en_US_case_case5.md.f8b87ece.js deleted file mode 100644 index 3544150a..00000000 --- a/assets/en_US_case_case5.md.f8b87ece.js +++ /dev/null @@ -1,47 +0,0 @@ -import{_ as e,o as a,c as t,R as s}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Nezha server over Argo tunnel","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case5.md","filePath":"en_US/case/case5.md","lastUpdated":1718495592000}'),n={name:"en_US/case/case5.md"},o=s(`

Nezha server over Argo tunnel

Contributors:

GitHub project: Argo-Nezha-Service-Container

Mirror backup (not live update): Argo-Nezha-Service-Container


Catalog


Project Features.

  • Wider scope of application --- As long as there is a network connection, Nezha server can be installed, such as LXC, OpenVZ VPS, Nas Virtual Machine, Container PaaS, etc.
  • Argo tunnel breaks through the restriction of requiring a public network portal --- The traditional Nezha requires two public network ports, one for panel visiting and the other for client reporting, this project uses Cloudflare Argo tunnels and uses intranet tunneling.
  • IPv4 / v6 with higher flexibility --- The traditional Nezha needs to deal with IPv4/v6 compatibility between server and client, and also needs to resolve mismatches through tools such as warp. However, this project does not need to consider these issues at all, and can be docked arbitrarily, which is much more convenient and easy!
  • One Argo tunnel for multiple domains and protocols --- Create an intranet-penetrating Argo tunnel for three domains (hostname) and protocols, which can be used for panel access (http), client reporting (tcp) and ssh (optional).
  • GrpcWebProxy reverse proxy gRPC data port --- with a certificate for tls termination, then Argo's tunnel configuration with https service pointing to this reverse proxy, enable http2 back to the source, grpc(nezha)->GrpcWebProxy->h2(argo)->cf cdn edge->agent
  • Daily automatic backup --- every day at 04:00 BST, the entire Nezha panel folder is automatically backed up to a designated private github repository, including panel themes, panel settings, probe data and tunnel information, the backup retains nearly 5 days of data; the content is so important that it must be placed in the private repository.
  • Automatic daily panel update -- the latest official panel version is automatically detected every day at 4:00 BST, and updated when there is an upgrade.
  • Manual/automatic restore backup --- check the content of online restore file once a minute, and restore immediately when there is any update.
  • Default built-in local probes --- can easily monitor their own server information
  • More secure data --- Argo Tunnel uses TLS encrypted communication to securely transmit application traffic to the Cloudflare network, improving application security and reliability. In addition, Argo Tunnel protects against network threats such as IP leaks and DDoS attacks.
image

Prepare variables to be used

  • Visit the Cloudflare website, select the domain name you want to use, and turn on the network option to turn the gRPC switch on.
image

Add https:// to the beginning of the panel's domain name and /oauth2/callback to the end of the callback address.

imageimageimageimageimage

How to get Argo authentication: json or token

Argo tunnel authentication methods include json and token, use one of the two methods. The former is recommended because the script will handle all the Argo tunnel parameters and paths, while the latter needs to be set manually on the Cloudflare website and is prone to errors.

(Methods 1 - Json):

Easily get Argo tunnel json information through Cloudflare Json Generation Network: https://fscarmen.cloudflare.now.cc

image

(Methods 2 - Token): Manually generate Argo tunnel token information via Cloudflare website.

Go to the cf website: https://dash.cloudflare.com/

  • Go to zero trust and generate token tunnel and message.
  • The data path 443/https is proto.
  • ssh path 22/ssh for < client id >.
imageimageimageimageimageimageimage

PaaS Deployment Example

Image fscarmen/argo-nezha:latest, supports amd64 and arm64 architectures.

Variables used

Variable NameRequiredRemarks
GH_USERYesgithub username for panel admin authorization
GH_CLIENTIDyesapply on github
GH_CLIENTSECRETyesapply on github
GH_BACKUP_USERNoThe github username for backing up Nezha's server-side database on github, if not filled in, it is the same as the account GH_USER for panel management authorization
GH_REPONoThe github repository for backing up Nezha's server-side database files on github
GH_EMAILNogithub's mailbox for git push backups to remote repositories
GH_PATNogithub's PAT
ARGO_AUTHYesArgo Json from https://fscarmen.cloudflare.now.cc
Argo token from Cloudflare official website
ARGO_DOMAINYesArgo domain

Koyeb

Deploy to Koyeb

imageimageimageimageimage

VPS Deployment Method 1 --- docker

  • Note: ARGO_DOMAIN= must be followed by single quotes, which cannot be removed.
  • If the VPS is IPv6 only, please install WARP IPv4 or dual-stack first: https://github.com/fscarmen/warp
  • The backup directory is the dashboard folder in the current path.

docker deployment

docker run -dit \\
-           --name nezha_dashboard \\
-           --pull always \\
-           --restart always \\
-           -e GH_USER=<fill in github username> \\
-           -e GH_EMAIL=<fill in github email> \\
-           -e GH_PAT=<fill in the obtained> \\
-           -e GH_REPO=<fill in customized> \\
-           -e GH_CLIENTID=<fill in acquired> \\
-           -e GH_CLIENTSECRET=<fill in acquired> \\
-           -e ARGO_AUTH='<Fill in the fetched Argo json or token>' \\
-           -e ARGO_DOMAIN=<fill in customized> \\
-           -e GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank> \\
-           fscarmen/argo-nezha

docker-compose deployment

version: '3.8'
-services.
-    argo-nezha.
-        image: fscarmen/argo-nezha
-        --pull always
-        container_name: nezha_dashboard
-        restart: always
-        environment:
-            - GH_USER=<fill in github username>
-            - GH_EMAIL=<fill in your github email>
-            - GH_PAT=<<fill in obtained>
-            - GH_REPO=<fill in customized>
-            - GH_CLIENTID=<fill in obtained>
-            - GH_CLIENTSECRET=<fill in fetched>
-            - ARGO_AUTH='<Fill in the fetched Argo json or token>'
-            - ARGO_DOMAIN=<fill in customized>
-            - GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank>

VPS Deployment Method 2 --- hosts

bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)

Client Access

Transfer via gRPC, no additional configuration required. Use the installation method given in the panel, for example

curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent data.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls

SSH access

<filepath>/cloudflared access ssh --hostname ssh.seals.nom.za/<GH_CLIENTID>
imageimageimage

Manually backing up your data

Method 1: Change the contents of the README.md file in the Github backup repository to backup

image

Method 2: After ssh, run /dashboard/backup.sh for container version; /opt/nezha/dashboard/backup.sh for VPS host version.

Automatically restore backups

  • Change the name of the file to be restored to README.md in the github backup repository, the timer service will check for updates every minute and record the last synchronized filename in the local /dbfile to compare with the online file content.

The following is an example of restoring a file with the name dashboard-2023-04-23-13:08:37.tar.gz.

! image

Manually restore the backup

  • ssh into the container and run, tar.gz filename from the github backup repository, format: dashboard-2023-04-22-21:42:10.tar.gz
bash /dashboard/restore.sh <filename>
image

Migrating data

  • Backup the /dashboard folder of the original Nezha and zip it up to dashboard.tar.gz file.
tar czvf dashboard.tar.gz /dashboard
  • Download the file and put it into a private repository, the name of the repository should be exactly the same as <GH_REPO>, and edit the contents of README.md of the repository to dashboard.tar.gz.
  • Deploy the new Nezha in this project, and fill in the variables completely. After the deployment is done, the auto-restore script will check every minute, and will restore automatically if it finds any new content, the whole process will take about 3 minutes.

Main catalog files and descriptions

/dashboard/
-|-- app                  # Nezha panel main program
-|-- argo.json            # Argo tunnel json file, which records information about using the tunnel.
-|-- argo.yml             # Argo tunnel yml file, used for streaming web, gRPC and ssh protocols under a single tunnel with different domains.
-|-- backup.sh            # Backup data scripts
-|-- restore.sh           # Restore backup scripts
-|-- dbfile               # Record the name of the latest restore or backup file
-|-- resource             # Folders of information on panel themes, languages, flags, etc.
-|-- data
-|   |-- config.yaml      # Configuration for the Nezha panel, e.g. Github OAuth2 / gRPC domain / port / TLS enabled or not.
-|   \`-- sqlite.db        # SQLite database file that records all severs and cron settings for the panel.
-|-- entrypoint.sh        # The main script, which is executed after the container is run.
-|-- nezha.csr            # SSL/TLS certificate signing request
-|-- nezha.key            # Private key information for SSL/TLS certificate.
-|-- nezha.pem            # SSL/TLS certificate file.
-|-- cloudflared          # Cloudflare Argo tunnel main program.
-|-- grpcwebproxy         # gRPC reverse proxy main program.
-\`-- nezha-agent          # Nezha client, used to monitor the localhost.

Acknowledgements for articles and projects by

Disclaimer

  • This program is only for learning and understanding, non-profit purposes, please delete within 24 hours after downloading, not for any commercial purposes, text, data and images are copyrighted, if reproduced must indicate the source.
  • Use of this program is subject to the deployment disclaimer. Use of this program must follow the deployment of the server location, the country and the user's country laws and regulations, the author of the program is not responsible for any misconduct of the user.
`,89),r=[o];function l(i,c,h,p,d,u){return a(),t("div",null,r)}const f=e(n,[["render",l]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_case_case5.md.f8b87ece.lean.js b/assets/en_US_case_case5.md.f8b87ece.lean.js deleted file mode 100644 index 71a8b3eb..00000000 --- a/assets/en_US_case_case5.md.f8b87ece.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as a,c as t,R as s}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Nezha server over Argo tunnel","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/case/case5.md","filePath":"en_US/case/case5.md","lastUpdated":1718495592000}'),n={name:"en_US/case/case5.md"},o=s("",89),r=[o];function l(i,c,h,p,d,u){return a(),t("div",null,r)}const f=e(n,[["render",l]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_case_index.md.f86af56c.js b/assets/en_US_case_index.md.CSf_yv3T.js similarity index 85% rename from assets/en_US_case_index.md.f86af56c.js rename to assets/en_US_case_index.md.CSf_yv3T.js index 75eba5fa..1a82f168 100644 --- a/assets/en_US_case_index.md.f86af56c.js +++ b/assets/en_US_case_index.md.CSf_yv3T.js @@ -1 +1 @@ -import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Community Project","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Community Project","hero":{"name":"Nezha Monitoring","text":"Community Project","tagline":"Nezha Monitoring has benefited from various projects contributed by the community, which have provided it with additional extensions.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Learn More →","link":"/en_US/case/case1"}]},"features":[{"title":"Submit a project","details":"We welcome you to submit your own project. Please join the Telegram group to contact the administrator for further information."},{"title":"Important Notes","details":"All projects are contributed by community members. Please be aware that the Nezha Monitoring Team cannot assume responsibility for community projects, including but not limited to warranty, availability, security, etc."}]},"headers":[],"relativePath":"en_US/case/index.md","filePath":"en_US/case/index.md","lastUpdated":1718495592000}'),o={name:"en_US/case/index.md"};function i(n,r,s,c,m,l){return t(),a("div")}const h=e(o,[["render",i]]);export{u as __pageData,h as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Community Project","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Community Project","hero":{"name":"Nezha Monitoring","text":"Community Project","tagline":"Nezha Monitoring has benefited from various projects contributed by the community, which have provided it with additional extensions.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Learn More →","link":"/en_US/case/case1"}]},"features":[{"title":"Submit a project","details":"We welcome you to submit your own project. Please join the Telegram group to contact the administrator for further information."},{"title":"Important Notes","details":"All projects are contributed by community members. Please be aware that the Nezha Monitoring Team cannot assume responsibility for community projects, including but not limited to warranty, availability, security, etc."}]},"headers":[],"relativePath":"en_US/case/index.md","filePath":"en_US/case/index.md","lastUpdated":1719239024000}'),o={name:"en_US/case/index.md"};function i(n,r,s,c,m,l){return a(),t("div")}const h=e(o,[["render",i]]);export{u as __pageData,h as default}; diff --git a/assets/en_US_case_index.md.f86af56c.lean.js b/assets/en_US_case_index.md.CSf_yv3T.lean.js similarity index 85% rename from assets/en_US_case_index.md.f86af56c.lean.js rename to assets/en_US_case_index.md.CSf_yv3T.lean.js index 75eba5fa..1a82f168 100644 --- a/assets/en_US_case_index.md.f86af56c.lean.js +++ b/assets/en_US_case_index.md.CSf_yv3T.lean.js @@ -1 +1 @@ -import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Community Project","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Community Project","hero":{"name":"Nezha Monitoring","text":"Community Project","tagline":"Nezha Monitoring has benefited from various projects contributed by the community, which have provided it with additional extensions.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Learn More →","link":"/en_US/case/case1"}]},"features":[{"title":"Submit a project","details":"We welcome you to submit your own project. Please join the Telegram group to contact the administrator for further information."},{"title":"Important Notes","details":"All projects are contributed by community members. Please be aware that the Nezha Monitoring Team cannot assume responsibility for community projects, including but not limited to warranty, availability, security, etc."}]},"headers":[],"relativePath":"en_US/case/index.md","filePath":"en_US/case/index.md","lastUpdated":1718495592000}'),o={name:"en_US/case/index.md"};function i(n,r,s,c,m,l){return t(),a("div")}const h=e(o,[["render",i]]);export{u as __pageData,h as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Community Project","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Community Project","hero":{"name":"Nezha Monitoring","text":"Community Project","tagline":"Nezha Monitoring has benefited from various projects contributed by the community, which have provided it with additional extensions.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Learn More →","link":"/en_US/case/case1"}]},"features":[{"title":"Submit a project","details":"We welcome you to submit your own project. Please join the Telegram group to contact the administrator for further information."},{"title":"Important Notes","details":"All projects are contributed by community members. Please be aware that the Nezha Monitoring Team cannot assume responsibility for community projects, including but not limited to warranty, availability, security, etc."}]},"headers":[],"relativePath":"en_US/case/index.md","filePath":"en_US/case/index.md","lastUpdated":1719239024000}'),o={name:"en_US/case/index.md"};function i(n,r,s,c,m,l){return a(),t("div")}const h=e(o,[["render",i]]);export{u as __pageData,h as default}; diff --git a/assets/en_US_developer_index.md.127deb01.js b/assets/en_US_developer_index.md.DdHbANMq.js similarity index 75% rename from assets/en_US_developer_index.md.127deb01.js rename to assets/en_US_developer_index.md.DdHbANMq.js index 9fc3649c..b4207eb1 100644 --- a/assets/en_US_developer_index.md.127deb01.js +++ b/assets/en_US_developer_index.md.DdHbANMq.js @@ -1 +1 @@ -import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const c=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Development Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Development Manual","hero":{"name":"Development Manual","text":"Nezha Monitoring Development Manual.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Start Now →","link":"/en_US/developer/theme"}]}},"headers":[],"relativePath":"en_US/developer/index.md","filePath":"en_US/developer/index.md","lastUpdated":1718495592000}'),n={name:"en_US/developer/index.md"};function o(r,i,l,s,p,d){return t(),a("div")}const _=e(n,[["render",o]]);export{c as __pageData,_ as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Development Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Development Manual","hero":{"name":"Development Manual","text":"Nezha Monitoring Development Manual.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Start Now →","link":"/en_US/developer/theme"}]}},"headers":[],"relativePath":"en_US/developer/index.md","filePath":"en_US/developer/index.md","lastUpdated":1719239024000}'),n={name:"en_US/developer/index.md"};function o(r,i,l,s,p,d){return a(),t("div")}const _=e(n,[["render",o]]);export{c as __pageData,_ as default}; diff --git a/assets/en_US_developer_index.md.127deb01.lean.js b/assets/en_US_developer_index.md.DdHbANMq.lean.js similarity index 75% rename from assets/en_US_developer_index.md.127deb01.lean.js rename to assets/en_US_developer_index.md.DdHbANMq.lean.js index 9fc3649c..b4207eb1 100644 --- a/assets/en_US_developer_index.md.127deb01.lean.js +++ b/assets/en_US_developer_index.md.DdHbANMq.lean.js @@ -1 +1 @@ -import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const c=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Development Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Development Manual","hero":{"name":"Development Manual","text":"Nezha Monitoring Development Manual.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Start Now →","link":"/en_US/developer/theme"}]}},"headers":[],"relativePath":"en_US/developer/index.md","filePath":"en_US/developer/index.md","lastUpdated":1718495592000}'),n={name:"en_US/developer/index.md"};function o(r,i,l,s,p,d){return t(),a("div")}const _=e(n,[["render",o]]);export{c as __pageData,_ as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"Development Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"Development Manual","hero":{"name":"Development Manual","text":"Nezha Monitoring Development Manual.","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Start Now →","link":"/en_US/developer/theme"}]}},"headers":[],"relativePath":"en_US/developer/index.md","filePath":"en_US/developer/index.md","lastUpdated":1719239024000}'),n={name:"en_US/developer/index.md"};function o(r,i,l,s,p,d){return a(),t("div")}const _=e(n,[["render",o]]);export{c as __pageData,_ as default}; diff --git a/assets/en_US_developer_l10n.md.C-79vxLb.js b/assets/en_US_developer_l10n.md.C-79vxLb.js new file mode 100644 index 00000000..fcfcf29d --- /dev/null +++ b/assets/en_US_developer_l10n.md.C-79vxLb.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/l10n.md","filePath":"en_US/developer/l10n.md","lastUpdated":1719239024000}'),o={name:"en_US/developer/l10n.md"},i=n('

Nezha Monitoring's Dashboard has added localization to support multiple languages, and you can follow these steps to support localization when developing new features

Introduction

  1. You can directly use the text configuration already available in /resource/l10n/en-US.toml to replace the text in the new feature.
  2. If there is new text in the new feature, please refer to the configuration text in en-US.toml, pull the new text into the configuration files of other languages such as en-US.toml, and add translations.

Adding a new localized text file

  1. Add a new language text configuration in /resource/l10n/.
  2. Pull existing text configurations from other languages in the new language text configuration.
  3. Add translations for the new language text configuration.
',5),l=[i];function r(d,c,s,u,h,f){return a(),t("div",null,l)}const p=e(o,[["render",r]]);export{g as __pageData,p as default}; diff --git a/assets/en_US_developer_l10n.md.C-79vxLb.lean.js b/assets/en_US_developer_l10n.md.C-79vxLb.lean.js new file mode 100644 index 00000000..35ad02c8 --- /dev/null +++ b/assets/en_US_developer_l10n.md.C-79vxLb.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/l10n.md","filePath":"en_US/developer/l10n.md","lastUpdated":1719239024000}'),o={name:"en_US/developer/l10n.md"},i=n("",5),l=[i];function r(d,c,s,u,h,f){return a(),t("div",null,l)}const p=e(o,[["render",r]]);export{g as __pageData,p as default}; diff --git a/assets/en_US_developer_l10n.md.d15efbb3.js b/assets/en_US_developer_l10n.md.d15efbb3.js deleted file mode 100644 index 92975023..00000000 --- a/assets/en_US_developer_l10n.md.d15efbb3.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a,R as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/l10n.md","filePath":"en_US/developer/l10n.md","lastUpdated":1718495592000}'),o={name:"en_US/developer/l10n.md"},i=n('

Nezha Monitoring's Dashboard has added localization to support multiple languages, and you can follow these steps to support localization when developing new features

Introduction

  1. You can directly use the text configuration already available in /resource/l10n/en-US.toml to replace the text in the new feature.
  2. If there is new text in the new feature, please refer to the configuration text in en-US.toml, pull the new text into the configuration files of other languages such as en-US.toml, and add translations.

Adding a new localized text file

  1. Add a new language text configuration in /resource/l10n/.
  2. Pull existing text configurations from other languages in the new language text configuration.
  3. Add translations for the new language text configuration.
',5),l=[i];function r(d,c,s,u,h,f){return t(),a("div",null,l)}const p=e(o,[["render",r]]);export{g as __pageData,p as default}; diff --git a/assets/en_US_developer_l10n.md.d15efbb3.lean.js b/assets/en_US_developer_l10n.md.d15efbb3.lean.js deleted file mode 100644 index 11e74164..00000000 --- a/assets/en_US_developer_l10n.md.d15efbb3.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a,R as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/l10n.md","filePath":"en_US/developer/l10n.md","lastUpdated":1718495592000}'),o={name:"en_US/developer/l10n.md"},i=n("",5),l=[i];function r(d,c,s,u,h,f){return t(),a("div",null,l)}const p=e(o,[["render",r]]);export{g as __pageData,p as default}; diff --git a/assets/en_US_developer_theme.md.8e6bceb7.js b/assets/en_US_developer_theme.md.8e6bceb7.js deleted file mode 100644 index b7fbb03f..00000000 --- a/assets/en_US_developer_theme.md.8e6bceb7.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/theme.md","filePath":"en_US/developer/theme.md","lastUpdated":1718495592000}'),n={name:"en_US/developer/theme.md"},c=a('

Nezha Theme Development Environment

Nezha Monitoring provides a theme development environment that you can use to create new Nezha Monitoring themes

WARNING

Please note: This development environment only supports dashboard v0.13.16 and newer versions.

How to use

  1. Clone this repository to local
  2. Modify the Oauth2 configuration in data/config.yaml(The callback connection can be filled with http://localhost
  3. Run docker-compose up
  4. Start development
  5. Once the theme has been created, you can place theme-custom in /opt/nezha/dashboard/theme-custom on the server

FAQ

  • If you can't use port 80, change the configuration in docker-compose.yaml.
',7),r=[c];function l(i,h,d,s,m,p){return o(),t("div",null,r)}const v=e(n,[["render",l]]);export{_ as __pageData,v as default}; diff --git a/assets/en_US_developer_theme.md.8e6bceb7.lean.js b/assets/en_US_developer_theme.md.8e6bceb7.lean.js deleted file mode 100644 index 3cc153e5..00000000 --- a/assets/en_US_developer_theme.md.8e6bceb7.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/theme.md","filePath":"en_US/developer/theme.md","lastUpdated":1718495592000}'),n={name:"en_US/developer/theme.md"},c=a("",7),r=[c];function l(i,h,d,s,m,p){return o(),t("div",null,r)}const v=e(n,[["render",l]]);export{_ as __pageData,v as default}; diff --git a/assets/en_US_developer_theme.md.DsiXMVZ4.js b/assets/en_US_developer_theme.md.DsiXMVZ4.js new file mode 100644 index 00000000..ef17aa1e --- /dev/null +++ b/assets/en_US_developer_theme.md.DsiXMVZ4.js @@ -0,0 +1 @@ +import{_ as e,c as o,o as t,a4 as a}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/theme.md","filePath":"en_US/developer/theme.md","lastUpdated":1719239024000}'),n={name:"en_US/developer/theme.md"},c=a('

Nezha Theme Development Environment

Nezha Monitoring provides a theme development environment that you can use to create new Nezha Monitoring themes

WARNING

Please note: This development environment only supports dashboard v0.13.16 and newer versions.

How to use

  1. Clone this repository to local
  2. Modify the Oauth2 configuration in data/config.yaml(The callback connection can be filled with http://localhost
  3. Run docker-compose up
  4. Start development
  5. Once the theme has been created, you can place theme-custom in /opt/nezha/dashboard/theme-custom on the server

FAQ

  • If you can't use port 80, change the configuration in docker-compose.yaml.
',7),r=[c];function l(i,h,d,s,m,p){return t(),o("div",null,r)}const v=e(n,[["render",l]]);export{_ as __pageData,v as default}; diff --git a/assets/en_US_developer_theme.md.DsiXMVZ4.lean.js b/assets/en_US_developer_theme.md.DsiXMVZ4.lean.js new file mode 100644 index 00000000..e1b03264 --- /dev/null +++ b/assets/en_US_developer_theme.md.DsiXMVZ4.lean.js @@ -0,0 +1 @@ +import{_ as e,c as o,o as t,a4 as a}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/developer/theme.md","filePath":"en_US/developer/theme.md","lastUpdated":1719239024000}'),n={name:"en_US/developer/theme.md"},c=a("",7),r=[c];function l(i,h,d,s,m,p){return t(),o("div",null,r)}const v=e(n,[["render",l]]);export{_ as __pageData,v as default}; diff --git a/assets/en_US_guide_agent.md.7264295e.js b/assets/en_US_guide_agent.md.7264295e.js deleted file mode 100644 index 9d3084a6..00000000 --- a/assets/en_US_guide_agent.md.7264295e.js +++ /dev/null @@ -1,144 +0,0 @@ -import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const h=JSON.parse('{"title":"Install Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/agent.md","filePath":"en_US/guide/agent.md","lastUpdated":1718495592000}'),o={name:"en_US/guide/agent.md"},e=l(`

Install Agent

This document will introduce how to install the Agent on the monitored server and connect it to the Dashboard.

TIP

The repository for Agent binaries can be found at: https://github.com/nezhahq/agent/releases

One-Click Installation of the Agent

Nezha Monitoring supports one-click installation of the Agent on both Windows and Linux. By following the steps in this document, you can easily deploy it on your server.

Preparation

You need to set up a communication domain in the admin panel in advance, and this domain should not be connected to a CDN. This document uses the example communication domain “data.example.com”.
Go to the settings page in the admin panel, fill in the communication domain in the “Non-CDN Dashboard Server Domain/IP” field, and click "Save".

One-Click Installation on Linux (Ubuntu, Debian, CentOS)

  1. First, add a server in the admin panel.
  2. Click the green Linux icon button next to the newly added server and copy the one-click installation command.
  3. Run the copied installation command on the monitored server, and wait for the installation to complete. Then, check if the server is online in the Dashboard home page.

One-Click Installation on Windows

  1. First, add a server in the admin panel.
  2. Click the green Windows icon button next to the newly added server and copy the one-click installation command.
  3. Go to the Windows server, run PowerShell, and execute the copied installation command in PowerShell.
  4. If you encounter a prompt to "change execution policy," choose Y.
  5. Wait for the installation to complete, then check if the server is online in the Dashboard home page.

WARNING

If you encounter errors when running the one-click installation command in PowerShell, try the Manual Installation of the Agent on Windows below.

Other Ways to Install the Agent

Installing the Agent on Linux (Ubuntu, Debian, CentOS)

Click to expand/collapse
  1. First, add a server in the admin panel.
  2. Run the script on the monitored server:
bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
  1. Select “Install monitoring Agent.”
  2. Enter the communication domain, such as "data.example.com".
  3. Enter the dashboard communication port (gRPC port), default is 5555.
  4. Enter the Agent secret, which is generated when you add a server in the admin panel and can be found on the “Servers” page in the admin panel.
  5. Wait for the installation to complete, then check if the server is online in the Dashboard home page.

Installing the Agent on Other Linux Distributions (e.g., Alpine using Openrc)

Click to expand/collapse

This section is contributed by unknown0054.

  1. Modify SERVER, SECRET, TLS, and execute in the shell:
shell
cat >/etc/init.d/nezha-agent<< EOF
-#!/sbin/openrc-run
-SERVER="" # Dashboard domain ip:port
-SECRET="" # SECRET
-TLS="" # Enable TLS if yes "--tls", leave empty if no
-NZ_BASE_PATH="/opt/nezha"
-NZ_AGENT_PATH="\${NZ_BASE_PATH}/agent"
-pidfile="/run/\${RC_SVCNAME}.pid"
-command="/opt/nezha/agent/nezha-agent"
-command_args="-s \${SERVER} -p \${SECRET} \${TLS}"
-command_background=true
-depend() {
-  need net
-}
-checkconfig() {
-  GITHUB_URL="github.com"
-  if [ ! -f "\${NZ_AGENT_PATH}/nezha-agent" ]; then
-    if [[ $(uname -m | grep 'x86_64') != "" ]]; then
-      os_arch="amd64"
-    elif [[ $(uname -m | grep 'i386\\|i686') != "" ]]; then
-      os_arch="386"
-    elif [[ $(uname -m | grep 'aarch64\\|armv8b\\|armv8l') != "" ]]; then
-      os_arch="arm64"
-    elif [[ $(uname -m | grep 'arm') != "" ]]; then
-      os_arch="arm"
-    elif [[ $(uname -m | grep 's390x') != "" ]]; then
-      os_arch="s390x"
-    elif [[ $(uname -m | grep 'riscv64') != "" ]]; then
-      os_arch="riscv64"
-    fi
-    local version=$(curl -m 10 -sL "https://api.github.com/repos/nezhahq/agent/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\\"//g;s/,//g;s/ //g')
-    if [ ! -n "$version" ]; then
-      version=$(curl -m 10 -sL "https://fastly.jsdelivr.net/gh/nezhahq/agent/" | grep "option\\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\\/agent@/v/g')
-    fi
-    if [ ! -n "$version" ]; then
-      version=$(curl -m 10 -sL "https://gcore.jsdelivr.net/gh/nezhahq/agent/" | grep "option\\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\\/agent@/v/g')
-    fi
-    if [ ! -n "$version" ]; then
-      echo -e "Failed to get the version number. Please check if the server can connect to https://api.github.com/repos/nezhahq/agent/releases/latest"
-      return 0
-    else
-      echo -e "The latest version is: \${version}"
-    fi
-    wget -t 2 -T 10 -O nezha-agent_linux_\${os_arch}.zip https://\${GITHUB_URL}/nezhahq/agent/releases/download/\${version}/nezha-agent_linux_\${os_arch}.zip >/dev/null 2>&1
-    if [[ $? != 0 ]]; then
-      echo -e "Failed to download Release. Please check if the server can connect to \${GITHUB_URL}"
-      return 0
-    fi
-    mkdir -p $NZ_AGENT_PATH
-    chmod 755 -R $NZ_AGENT_PATH
-    unzip -qo nezha-agent_linux_\${os_arch}.zip && mv nezha-agent $NZ_AGENT_PATH && rm -rf nezha-agent_linux_\${os_arch}.zip README.md
-  fi
-  if [ ! -x "\${NZ_AGENT_PATH}/nezha-agent" ]; then
-    chmod +x \${NZ_AGENT_PATH}/nezha-agent
-  fi
-}
-start_pre() {
-  if [ "\${RC_CMD}" != "restart" ]; then
-    checkconfig || return $?
-  fi
-}
-EOF
  1. Add execute permissions
shell
chmod +x /etc/init.d/nezha-agent
  1. Start Nezha-Agent
shell
rc-service nezha-agent start
  1. Add to startup
shell
rc-update add nezha-agent

Manual Installation of the Agent on Windows

Installing the Agent on Synology DSM

Click to expand/collapse
sh
# Agent path
-EXEC="/PATH/TO/nezha-agent"
-# Log path
-LOG="\${EXEC}.log"
-# Additional execution parameters, can be empty
-ARGS=""
-# Nezha server gRPC address
-SERVER="HOST_OR_IP:gRPC_PORT"
-# The secret key obtained in the previous step
-SECRET="APP_SECRET"
-# User running the service, *strongly recommended to use non-root user*
-RUN_USER="nezha"
-
-# Write to systemd service file
-cat << EOF > /usr/lib/systemd/system/nezha.service
-[Unit]
-Description=Nezha Agent Service
-After=network.target
-
-[Service]
-Type=simple
-ExecStart=/bin/nohup \${EXEC} \${ARGS} -s \${SERVER} -p \${SECRET} &>> \${LOG} &
-ExecStop=ps -fe |grep nezha-agent|awk '{print \\$2}'|xargs kill
-User=\${RUN_USER}
-
-Restart=on-abort
-
-[Install]
-WantedBy=multi-user.target
-EOF
-
-# Reload service
-systemctl daemon-reload
-# Start service
-systemctl start nezha
-# Enable service startup
-systemctl enable nezha

‼️ Modify the corresponding information before running the above commands with the root account to complete the installation.

Installing the Agent on macOS

Click to expand/collapse

This section is adapted from Mitsea Blog with the author's permission

WARNING

If you are prompted "macOS cannot verify this app" during installation, manually allow the program to run in System Settings.

  1. First, add a server in the admin panel.
  2. Go to the Release page to download the Agent binary file. Choose to download the darwin amd64 or arm64 Agent according to your CPU architecture. Download the amd64 version for Intel CPU, or the arm64 version for Apple Silicon. After downloading, unzip the Agent binary file, such as unzipping it to the Downloads folder.
  3. Create a file named nezha_agent.plist and save it with the following content:
xml
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>KeepAlive</key>
- <true/>
- <key>Label</key>
- <string>nezha_agent</string>
- <key>Program</key>
- <string>Modify the path to the Agent binary file here, such as: /Users/123/Downloads/nezha-agent</string>
- <key>ProgramArguments</key>
- <array>
-  <string>Modify the path to the Agent binary file here, same as above</string>
-  <string>--password</string>
-  <string>The communication secret, such as: 529664783eeb23cc25</string>
-  <string>--server</string>
-  <string>The communication URL and gRPC port, such as: data.example.com:5555</string>
- </array>
- <key>RunAtLoad</key>
- <true/>
-</dict>
-</plist>
  1. Load the plist file into launchd using the following command in Terminal, make sure to replace the file path:
shell
launchctl load /Users/123/Desktop/nezha_agent.plist
  1. Start the process:
shell
launchctl start nezha_agent
  1. Check if the process is running:
shell
launchctl list | grep nezha_agent
  1. Stop the process and remove it:
shell
launchctl stop nezha_agent
shell
launchctl remove nezha_agent

Installing the Agent on macOS Using Homebrew

Click to expand/collapse

This section is adapted from 🐿️松鼠收集🌰 with the author's permission

WARNING

Please be sure to add environment variables before installing nezha-agent through Homebrew! Homebrew creates the service-required plist file during software installation, and if you add the environment variables after installation, it will fail to start due to missing parameters.

  1. Add environment variables:
shell
echo 'export HOMEBREW_NEZHA_AGENT_PASSWORD="Communication key, obtained from the service page"' >> ~/.zshrc
-echo 'export HOMEBREW_NEZHA_AGENT_SERVER="Your server and port, format your.domain:5555 "' >> ~/.zshrc
-source ~/.zshrc
  1. Install Nezha Agent:

DANGER

Note that this Homebrew repository is maintained by a third party and is unrelated to Nezha Monitoring. The Nezha project team does not endorse this repository's usability, security, etc. Please evaluate the risks yourself before using!

Since it has not yet been submitted to the Homebrew Core official library, it is temporarily placed in the third-party Homebrew repository maintained by the author of the blog:

shell
brew install brewforge/chinese/nezha-agent
  1. Start Nezha Agent service through Homebrew:
shell
brew services start nezha-agent
  1. Check the service status:
shell
brew services info nezha-agent
  1. Stop the service:
shell
brew services stop nezha-agent
  1. Uninstall Nezha Agent:
shell
brew rm nezha-agent
  1. If there is an error, first check the environment variables:
shell
echo $HOMEBREW_NEZHA_AGENT_PASSWORD
-echo $HOMEBREW_NEZHA_AGENT_SERVER
  1. If the environment variables are configured correctly, try reinstalling:
shell
brew services stop nezha-agent
-brew reinstall nezha-agent
-brew services start nezha-agent
  1. If the issue persists, submit a issue to the third-party Homebrew repository.

Installing the Agent on OpenWRT

Click to expand/collapse

How to solve installation difficulties and issues in one step?

How to enable autostart on older OpenWRT/LEDE?

How to enable autostart on newer OpenWRT? Contributor: @艾斯德斯

  • First, download the corresponding binary from the release, unzip the zip package, and place it in /root.
  • Run chmod +x /root/nezha-agent to grant execution permission, then create /etc/init.d/nezha-service:
shell
#!/bin/sh /etc/rc.common
-
-START=99
-USE_PROCD=1
-
-start_service() {
- procd_open_instance
- procd_set_param command /root/nezha-agent -s Dashboard communication domain:port -p Key -d
- procd_set_param respawn
- procd_close_instance
-}
-
-stop_service() {
-  killall nezha-agent
-}
-
-restart() {
- stop
- sleep 2
- start
-}
  • Run chmod +x /etc/init.d/nezha-service to grant execution permission.
  • Start the service: /etc/init.d/nezha-service enable && /etc/init.d/nezha-service start

Does the Agent Have a Docker Image?

The Agent does not currently have a Docker image.
The design philosophy of the Agent is opposite to that of the Dashboard. While the Dashboard should minimally impact the server, the Agent needs to execute monitoring services and run commands within the server.
Running the Agent inside a container can still perform monitoring tasks, but features like WebShell will not function properly, so no Docker image is provided.

`,29),p=[e];function t(r,c,i,y,D,C){return n(),a("div",null,p)}const d=s(o,[["render",t]]);export{h as __pageData,d as default}; diff --git a/assets/en_US_guide_agent.md.7264295e.lean.js b/assets/en_US_guide_agent.md.7264295e.lean.js deleted file mode 100644 index 52b0eb90..00000000 --- a/assets/en_US_guide_agent.md.7264295e.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const h=JSON.parse('{"title":"Install Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/agent.md","filePath":"en_US/guide/agent.md","lastUpdated":1718495592000}'),o={name:"en_US/guide/agent.md"},e=l("",29),p=[e];function t(r,c,i,y,D,C){return n(),a("div",null,p)}const d=s(o,[["render",t]]);export{h as __pageData,d as default}; diff --git a/assets/en_US_guide_agent.md.XjTB7cBt.js b/assets/en_US_guide_agent.md.XjTB7cBt.js new file mode 100644 index 00000000..23eb218d --- /dev/null +++ b/assets/en_US_guide_agent.md.XjTB7cBt.js @@ -0,0 +1,144 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"Install Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/agent.md","filePath":"en_US/guide/agent.md","lastUpdated":1719239024000}'),t={name:"en_US/guide/agent.md"},e=n(`

Install Agent

This document will introduce how to install the Agent on the monitored server and connect it to the Dashboard.

TIP

The repository for Agent binaries can be found at: https://github.com/nezhahq/agent/releases

One-Click Installation of the Agent

Nezha Monitoring supports one-click installation of the Agent on both Windows and Linux. By following the steps in this document, you can easily deploy it on your server.

Preparation

You need to set up a communication domain in the admin panel in advance, and this domain should not be connected to a CDN. This document uses the example communication domain “data.example.com”.
Go to the settings page in the admin panel, fill in the communication domain in the “Non-CDN Dashboard Server Domain/IP” field, and click "Save".

One-Click Installation on Linux (Ubuntu, Debian, CentOS)

  1. First, add a server in the admin panel.
  2. Click the green Linux icon button next to the newly added server and copy the one-click installation command.
  3. Run the copied installation command on the monitored server, and wait for the installation to complete. Then, check if the server is online in the Dashboard home page.

One-Click Installation on Windows

  1. First, add a server in the admin panel.
  2. Click the green Windows icon button next to the newly added server and copy the one-click installation command.
  3. Go to the Windows server, run PowerShell, and execute the copied installation command in PowerShell.
  4. If you encounter a prompt to "change execution policy," choose Y.
  5. Wait for the installation to complete, then check if the server is online in the Dashboard home page.

WARNING

If you encounter errors when running the one-click installation command in PowerShell, try the Manual Installation of the Agent on Windows below.

Other Ways to Install the Agent

Installing the Agent on Linux (Ubuntu, Debian, CentOS)

Click to expand/collapse
  1. First, add a server in the admin panel.
  2. Run the script on the monitored server:
bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
  1. Select “Install monitoring Agent.”
  2. Enter the communication domain, such as "data.example.com".
  3. Enter the dashboard communication port (gRPC port), default is 5555.
  4. Enter the Agent secret, which is generated when you add a server in the admin panel and can be found on the “Servers” page in the admin panel.
  5. Wait for the installation to complete, then check if the server is online in the Dashboard home page.

Installing the Agent on Other Linux Distributions (e.g., Alpine using Openrc)

Click to expand/collapse

This section is contributed by unknown0054.

  1. Modify SERVER, SECRET, TLS, and execute in the shell:
shell
cat >/etc/init.d/nezha-agent<< EOF
+#!/sbin/openrc-run
+SERVER="" # Dashboard domain ip:port
+SECRET="" # SECRET
+TLS="" # Enable TLS if yes "--tls", leave empty if no
+NZ_BASE_PATH="/opt/nezha"
+NZ_AGENT_PATH="\${NZ_BASE_PATH}/agent"
+pidfile="/run/\${RC_SVCNAME}.pid"
+command="/opt/nezha/agent/nezha-agent"
+command_args="-s \${SERVER} -p \${SECRET} \${TLS}"
+command_background=true
+depend() {
+  need net
+}
+checkconfig() {
+  GITHUB_URL="github.com"
+  if [ ! -f "\${NZ_AGENT_PATH}/nezha-agent" ]; then
+    if [[ $(uname -m | grep 'x86_64') != "" ]]; then
+      os_arch="amd64"
+    elif [[ $(uname -m | grep 'i386\\|i686') != "" ]]; then
+      os_arch="386"
+    elif [[ $(uname -m | grep 'aarch64\\|armv8b\\|armv8l') != "" ]]; then
+      os_arch="arm64"
+    elif [[ $(uname -m | grep 'arm') != "" ]]; then
+      os_arch="arm"
+    elif [[ $(uname -m | grep 's390x') != "" ]]; then
+      os_arch="s390x"
+    elif [[ $(uname -m | grep 'riscv64') != "" ]]; then
+      os_arch="riscv64"
+    fi
+    local version=$(curl -m 10 -sL "https://api.github.com/repos/nezhahq/agent/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\\"//g;s/,//g;s/ //g')
+    if [ ! -n "$version" ]; then
+      version=$(curl -m 10 -sL "https://fastly.jsdelivr.net/gh/nezhahq/agent/" | grep "option\\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\\/agent@/v/g')
+    fi
+    if [ ! -n "$version" ]; then
+      version=$(curl -m 10 -sL "https://gcore.jsdelivr.net/gh/nezhahq/agent/" | grep "option\\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\\/agent@/v/g')
+    fi
+    if [ ! -n "$version" ]; then
+      echo -e "Failed to get the version number. Please check if the server can connect to https://api.github.com/repos/nezhahq/agent/releases/latest"
+      return 0
+    else
+      echo -e "The latest version is: \${version}"
+    fi
+    wget -t 2 -T 10 -O nezha-agent_linux_\${os_arch}.zip https://\${GITHUB_URL}/nezhahq/agent/releases/download/\${version}/nezha-agent_linux_\${os_arch}.zip >/dev/null 2>&1
+    if [[ $? != 0 ]]; then
+      echo -e "Failed to download Release. Please check if the server can connect to \${GITHUB_URL}"
+      return 0
+    fi
+    mkdir -p $NZ_AGENT_PATH
+    chmod 755 -R $NZ_AGENT_PATH
+    unzip -qo nezha-agent_linux_\${os_arch}.zip && mv nezha-agent $NZ_AGENT_PATH && rm -rf nezha-agent_linux_\${os_arch}.zip README.md
+  fi
+  if [ ! -x "\${NZ_AGENT_PATH}/nezha-agent" ]; then
+    chmod +x \${NZ_AGENT_PATH}/nezha-agent
+  fi
+}
+start_pre() {
+  if [ "\${RC_CMD}" != "restart" ]; then
+    checkconfig || return $?
+  fi
+}
+EOF
  1. Add execute permissions
shell
chmod +x /etc/init.d/nezha-agent
  1. Start Nezha-Agent
shell
rc-service nezha-agent start
  1. Add to startup
shell
rc-update add nezha-agent

Manual Installation of the Agent on Windows

Installing the Agent on Synology DSM

Click to expand/collapse
sh
# Agent path
+EXEC="/PATH/TO/nezha-agent"
+# Log path
+LOG="\${EXEC}.log"
+# Additional execution parameters, can be empty
+ARGS=""
+# Nezha server gRPC address
+SERVER="HOST_OR_IP:gRPC_PORT"
+# The secret key obtained in the previous step
+SECRET="APP_SECRET"
+# User running the service, *strongly recommended to use non-root user*
+RUN_USER="nezha"
+
+# Write to systemd service file
+cat << EOF > /usr/lib/systemd/system/nezha.service
+[Unit]
+Description=Nezha Agent Service
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/bin/nohup \${EXEC} \${ARGS} -s \${SERVER} -p \${SECRET} &>> \${LOG} &
+ExecStop=ps -fe |grep nezha-agent|awk '{print \\$2}'|xargs kill
+User=\${RUN_USER}
+
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
+EOF
+
+# Reload service
+systemctl daemon-reload
+# Start service
+systemctl start nezha
+# Enable service startup
+systemctl enable nezha

‼️ Modify the corresponding information before running the above commands with the root account to complete the installation.

Installing the Agent on macOS

Click to expand/collapse

This section is adapted from Mitsea Blog with the author's permission

WARNING

If you are prompted "macOS cannot verify this app" during installation, manually allow the program to run in System Settings.

  1. First, add a server in the admin panel.
  2. Go to the Release page to download the Agent binary file. Choose to download the darwin amd64 or arm64 Agent according to your CPU architecture. Download the amd64 version for Intel CPU, or the arm64 version for Apple Silicon. After downloading, unzip the Agent binary file, such as unzipping it to the Downloads folder.
  3. Create a file named nezha_agent.plist and save it with the following content:
xml
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>KeepAlive</key>
+ <true/>
+ <key>Label</key>
+ <string>nezha_agent</string>
+ <key>Program</key>
+ <string>Modify the path to the Agent binary file here, such as: /Users/123/Downloads/nezha-agent</string>
+ <key>ProgramArguments</key>
+ <array>
+  <string>Modify the path to the Agent binary file here, same as above</string>
+  <string>--password</string>
+  <string>The communication secret, such as: 529664783eeb23cc25</string>
+  <string>--server</string>
+  <string>The communication URL and gRPC port, such as: data.example.com:5555</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+</dict>
+</plist>
  1. Load the plist file into launchd using the following command in Terminal, make sure to replace the file path:
shell
launchctl load /Users/123/Desktop/nezha_agent.plist
  1. Start the process:
shell
launchctl start nezha_agent
  1. Check if the process is running:
shell
launchctl list | grep nezha_agent
  1. Stop the process and remove it:
shell
launchctl stop nezha_agent
shell
launchctl remove nezha_agent

Installing the Agent on macOS Using Homebrew

Click to expand/collapse

This section is adapted from 🐿️松鼠收集🌰 with the author's permission

WARNING

Please be sure to add environment variables before installing nezha-agent through Homebrew! Homebrew creates the service-required plist file during software installation, and if you add the environment variables after installation, it will fail to start due to missing parameters.

  1. Add environment variables:
shell
echo 'export HOMEBREW_NEZHA_AGENT_PASSWORD="Communication key, obtained from the service page"' >> ~/.zshrc
+echo 'export HOMEBREW_NEZHA_AGENT_SERVER="Your server and port, format your.domain:5555 "' >> ~/.zshrc
+source ~/.zshrc
  1. Install Nezha Agent:

DANGER

Note that this Homebrew repository is maintained by a third party and is unrelated to Nezha Monitoring. The Nezha project team does not endorse this repository's usability, security, etc. Please evaluate the risks yourself before using!

Since it has not yet been submitted to the Homebrew Core official library, it is temporarily placed in the third-party Homebrew repository maintained by the author of the blog:

shell
brew install brewforge/chinese/nezha-agent
  1. Start Nezha Agent service through Homebrew:
shell
brew services start nezha-agent
  1. Check the service status:
shell
brew services info nezha-agent
  1. Stop the service:
shell
brew services stop nezha-agent
  1. Uninstall Nezha Agent:
shell
brew rm nezha-agent
  1. If there is an error, first check the environment variables:
shell
echo $HOMEBREW_NEZHA_AGENT_PASSWORD
+echo $HOMEBREW_NEZHA_AGENT_SERVER
  1. If the environment variables are configured correctly, try reinstalling:
shell
brew services stop nezha-agent
+brew reinstall nezha-agent
+brew services start nezha-agent
  1. If the issue persists, submit a issue to the third-party Homebrew repository.

Installing the Agent on OpenWRT

Click to expand/collapse

How to solve installation difficulties and issues in one step?

How to enable autostart on older OpenWRT/LEDE?

How to enable autostart on newer OpenWRT? Contributor: @艾斯德斯

  • First, download the corresponding binary from the release, unzip the zip package, and place it in /root.
  • Run chmod +x /root/nezha-agent to grant execution permission, then create /etc/init.d/nezha-service:
shell
#!/bin/sh /etc/rc.common
+
+START=99
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /root/nezha-agent -s Dashboard communication domain:port -p Key -d
+ procd_set_param respawn
+ procd_close_instance
+}
+
+stop_service() {
+  killall nezha-agent
+}
+
+restart() {
+ stop
+ sleep 2
+ start
+}
  • Run chmod +x /etc/init.d/nezha-service to grant execution permission.
  • Start the service: /etc/init.d/nezha-service enable && /etc/init.d/nezha-service start

Does the Agent Have a Docker Image?

The Agent does not currently have a Docker image.
The design philosophy of the Agent is opposite to that of the Dashboard. While the Dashboard should minimally impact the server, the Agent needs to execute monitoring services and run commands within the server.
Running the Agent inside a container can still perform monitoring tasks, but features like WebShell will not function properly, so no Docker image is provided.

`,29),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const E=s(t,[["render",h]]);export{c as __pageData,E as default}; diff --git a/assets/en_US_guide_agent.md.XjTB7cBt.lean.js b/assets/en_US_guide_agent.md.XjTB7cBt.lean.js new file mode 100644 index 00000000..a19a99e5 --- /dev/null +++ b/assets/en_US_guide_agent.md.XjTB7cBt.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"Install Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/agent.md","filePath":"en_US/guide/agent.md","lastUpdated":1719239024000}'),t={name:"en_US/guide/agent.md"},e=n("",29),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const E=s(t,[["render",h]]);export{c as __pageData,E as default}; diff --git a/assets/en_US_guide_agentq.md.8251e9de.js b/assets/en_US_guide_agentq.md.8251e9de.js deleted file mode 100644 index 97c31415..00000000 --- a/assets/en_US_guide_agentq.md.8251e9de.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a,R as n}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"Frequently Asked Questions about the Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/agentq.md","filePath":"en_US/guide/agentq.md","lastUpdated":1718495592000}'),i={name:"en_US/guide/agentq.md"},o=n('

Frequently Asked Questions about the Agent

The IP Displayed in the Admin Panel is Different from the Actual Agent IP?

Please refer to Dashboard Related - Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?. This will not be repeated here.

Errors During One-Click Script Installation

curl: Failed to connect to raw.githubusercontent.com......

This mostly occurs on servers in mainland China. Currently, the one-click script fetches the installation script directly from Github. You may try several times, or manually install the Agent. Additionally, you can find third-party Github acceleration services or mirrors and set them in the one-click installation script.

sudo: command not found

Please manually install sudo first, for example, in Ubuntu:

shell
apt install sudo
',9),s=[o];function l(r,c,d,h,u,p){return t(),a("div",null,s)}const g=e(i,[["render",l]]);export{f as __pageData,g as default}; diff --git a/assets/en_US_guide_agentq.md.8251e9de.lean.js b/assets/en_US_guide_agentq.md.8251e9de.lean.js deleted file mode 100644 index 9dff2df8..00000000 --- a/assets/en_US_guide_agentq.md.8251e9de.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a,R as n}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"Frequently Asked Questions about the Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/agentq.md","filePath":"en_US/guide/agentq.md","lastUpdated":1718495592000}'),i={name:"en_US/guide/agentq.md"},o=n("",9),s=[o];function l(r,c,d,h,u,p){return t(),a("div",null,s)}const g=e(i,[["render",l]]);export{f as __pageData,g as default}; diff --git a/assets/en_US_guide_agentq.md.BKmzind8.js b/assets/en_US_guide_agentq.md.BKmzind8.js new file mode 100644 index 00000000..055340ef --- /dev/null +++ b/assets/en_US_guide_agentq.md.BKmzind8.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Frequently Asked Questions about the Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/agentq.md","filePath":"en_US/guide/agentq.md","lastUpdated":1719239024000}'),i={name:"en_US/guide/agentq.md"},s=n('

Frequently Asked Questions about the Agent

The IP Displayed in the Admin Panel is Different from the Actual Agent IP?

Please refer to Dashboard Related - Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?. This will not be repeated here.

Errors During One-Click Script Installation

curl: Failed to connect to raw.githubusercontent.com......

This mostly occurs on servers in mainland China. Currently, the one-click script fetches the installation script directly from Github. You may try several times, or manually install the Agent. Additionally, you can find third-party Github acceleration services or mirrors and set them in the one-click installation script.

sudo: command not found

Please manually install sudo first, for example, in Ubuntu:

shell
apt install sudo
',9),o=[s];function r(l,d,h,c,u,p){return a(),t("div",null,o)}const g=e(i,[["render",r]]);export{f as __pageData,g as default}; diff --git a/assets/en_US_guide_agentq.md.BKmzind8.lean.js b/assets/en_US_guide_agentq.md.BKmzind8.lean.js new file mode 100644 index 00000000..c7c45c22 --- /dev/null +++ b/assets/en_US_guide_agentq.md.BKmzind8.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Frequently Asked Questions about the Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/agentq.md","filePath":"en_US/guide/agentq.md","lastUpdated":1719239024000}'),i={name:"en_US/guide/agentq.md"},s=n("",9),o=[s];function r(l,d,h,c,u,p){return a(),t("div",null,o)}const g=e(i,[["render",r]]);export{f as __pageData,g as default}; diff --git a/assets/en_US_guide_api.md.9f430ab7.js b/assets/en_US_guide_api.md.9f430ab7.js deleted file mode 100644 index 01681826..00000000 --- a/assets/en_US_guide_api.md.9f430ab7.js +++ /dev/null @@ -1,138 +0,0 @@ -import{_ as s,o as a,c as n,R as o}from"./chunks/framework.44fd0451.js";const i=JSON.parse('{"title":"API Interface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/api.md","filePath":"en_US/guide/api.md","lastUpdated":1718495592000}'),l={name:"en_US/guide/api.md"},p=o(`

API Interface

Nezha Monitoring supports querying the status information of Agents using the API interface

Creating a Token

Nezha Monitoring's API interface allows for Token authentication and Cookies authentication. To create a new Token, go to the admin panel, click on the avatar in the top right corner, select "API Token," and enter the Token management page. Click "Add Token", add a custom note, and click "Add".

To delete a Token, select the corresponding Token and click the delete icon on the right.

WARNING

Tokens are the authentication credentials for the API interface. They are critical to the security of your Dashboard's information, so do not share your Token with others.

Authentication Method

Ensure the request header contains Authorization: Token for authentication.

Token authentication method:

Request Headers:
-Authorization: Token

Usage Instructions

WARNING

Negative timestamps in the following examples represent 0000-00-00. This currently indicates that the Agent has never reported since the Dashboard went online, but it is not recommended to use the positive or negative value to determine the status.

TIP

The request method is GET, and the response format is JSON.

Get Server List

Request:

GET /api/v1/server/list?tag=

Parameters:

  • tag (optional): ServerTag is the server group. Provide this parameter to query only servers in that group.

Example response:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653014667,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1"
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": ""
-        }
-    ]
-}

Get Server Details

Request:

GET /api/v1/server/details?id=&tag=

Parameters:

  • id (optional): ServerID, multiple IDs separated by commas. Provide this parameter to query the server corresponding to that ID and ignore the tag parameter.
  • tag (optional): ServerTag, provide this parameter to query only servers in that group.

Example response:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653015042,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1",
-            "host": {
-                "Platform": "darwin",
-                "PlatformVersion": "12.3.1",
-                "CPU": [
-                    "Apple M1 Pro 1 Physical Core"
-                ],
-                "MemTotal": 17179869184,
-                "DiskTotal": 2473496842240,
-                "SwapTotal": 0,
-                "Arch": "arm64",
-                "Virtualization": "",
-                "BootTime": 1652683962,
-                "CountryCode": "hk",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 17.33,
-                "MemUsed": 14013841408,
-                "SwapUsed": 0,
-                "DiskUsed": 2335048912896,
-                "NetInTransfer": 2710273234,
-                "NetOutTransfer": 695454765,
-                "NetInSpeed": 10806,
-                "NetOutSpeed": 5303,
-                "Uptime": 331080,
-                "Load1": 5.23,
-                "Load5": 4.87,
-                "Load15": 3.99,
-                "TcpConnCount": 195,
-                "UdpConnCount": 70,
-                "ProcessCount": 437
-            }
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": "",
-            "host": {
-                "Platform": "",
-                "PlatformVersion": "",
-                "CPU": null,
-                "MemTotal": 0,
-                "DiskTotal": 0,
-                "SwapTotal": 0,
-                "Arch": "",
-                "Virtualization": "",
-                "BootTime": 0,
-                "CountryCode": "",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 0,
-                "MemUsed": 0,
-                "SwapUsed": 0,
-                "DiskUsed": 0,
-                "NetInTransfer": 0,
-                "NetOutTransfer": 0,
-                "NetInSpeed": 0,
-                "NetOutSpeed": 0,
-                "Uptime": 0,
-                "Load1": 0,
-                "Load5": 0,
-                "Load15": 0,
-                "TcpConnCount": 0,
-                "UdpConnCount": 0,
-                "ProcessCount": 0
-            }
-        }
-    ]
-}

Usage Examples

Get All Server Information

python
import requests
-
-url = "http://your-dashboard/api/v1/server/list"
-headers = {
-    "Authorization": "your_token"
-}
-
-response = requests.get(url, headers=headers)
-data = response.json()
-
-for server in data['result']:
-    print(f"Server Name: {server['name']}, Last Active: {server['last_active']}, IP: {server['valid_ip']}")

Get Specific Server Details

python
import requests
-
-server_id = 1  # Replace with your server ID
-url = f"http://your-dashboard/api/v1/server/details?id={server_id}"
-headers = {
-    "Authorization": "your_token"
-}
-
-response = requests.get(url, headers=headers)
-data = response.json()
-
-server = data['result'][0]
-print(f"Server Name: {server['name']}")
-print(f"CPU Usage: {server['status']['CPU']}%")
-print(f"Memory Used: {server['status']['MemUsed']} bytes")
-print(f"Disk Used: {server['status']['DiskUsed']} bytes")
-print(f"Network In Speed: {server['status']['NetInSpeed']} bytes/s")
-print(f"Network Out Speed: {server['status']['NetOutSpeed']} bytes/s")

With the above example code, you can easily obtain and process server status information, enabling automated monitoring and management.

`,33),e=[p];function t(D,r,c,F,y,C){return a(),n("div",null,e)}const u=s(l,[["render",t]]);export{i as __pageData,u as default}; diff --git a/assets/en_US_guide_api.md.9f430ab7.lean.js b/assets/en_US_guide_api.md.9f430ab7.lean.js deleted file mode 100644 index 127beb10..00000000 --- a/assets/en_US_guide_api.md.9f430ab7.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as a,c as n,R as o}from"./chunks/framework.44fd0451.js";const i=JSON.parse('{"title":"API Interface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/api.md","filePath":"en_US/guide/api.md","lastUpdated":1718495592000}'),l={name:"en_US/guide/api.md"},p=o("",33),e=[p];function t(D,r,c,F,y,C){return a(),n("div",null,e)}const u=s(l,[["render",t]]);export{i as __pageData,u as default}; diff --git a/assets/en_US_guide_api.md.DlwwVGvY.js b/assets/en_US_guide_api.md.DlwwVGvY.js new file mode 100644 index 00000000..850359c2 --- /dev/null +++ b/assets/en_US_guide_api.md.DlwwVGvY.js @@ -0,0 +1,138 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"API Interface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/api.md","filePath":"en_US/guide/api.md","lastUpdated":1719239024000}'),t={name:"en_US/guide/api.md"},h=n(`

API Interface

Nezha Monitoring supports querying the status information of Agents using the API interface

Creating a Token

Nezha Monitoring's API interface allows for Token authentication and Cookies authentication. To create a new Token, go to the admin panel, click on the avatar in the top right corner, select "API Token," and enter the Token management page. Click "Add Token", add a custom note, and click "Add".

To delete a Token, select the corresponding Token and click the delete icon on the right.

WARNING

Tokens are the authentication credentials for the API interface. They are critical to the security of your Dashboard's information, so do not share your Token with others.

Authentication Method

Ensure the request header contains Authorization: Token for authentication.

Token authentication method:

Request Headers:
+Authorization: Token

Usage Instructions

WARNING

Negative timestamps in the following examples represent 0000-00-00. This currently indicates that the Agent has never reported since the Dashboard went online, but it is not recommended to use the positive or negative value to determine the status.

TIP

The request method is GET, and the response format is JSON.

Get Server List

Request:

GET /api/v1/server/list?tag=

Parameters:

  • tag (optional): ServerTag is the server group. Provide this parameter to query only servers in that group.

Example response:

json
{
+    "code": 0,
+    "message": "success",
+    "result": [
+        {
+            "id": 1,
+            "name": "Server1",
+            "tag": "Tag1",
+            "last_active": 1653014667,
+            "ipv4": "1.1.1.1",
+            "ipv6": "",
+            "valid_ip": "1.1.1.1"
+        },
+        {
+            "id": 2,
+            "name": "Server2",
+            "tag": "Tag2",
+            "last_active": -62135596800,
+            "ipv4": "",
+            "ipv6": "",
+            "valid_ip": ""
+        }
+    ]
+}

Get Server Details

Request:

GET /api/v1/server/details?id=&tag=

Parameters:

  • id (optional): ServerID, multiple IDs separated by commas. Provide this parameter to query the server corresponding to that ID and ignore the tag parameter.
  • tag (optional): ServerTag, provide this parameter to query only servers in that group.

Example response:

json
{
+    "code": 0,
+    "message": "success",
+    "result": [
+        {
+            "id": 1,
+            "name": "Server1",
+            "tag": "Tag1",
+            "last_active": 1653015042,
+            "ipv4": "1.1.1.1",
+            "ipv6": "",
+            "valid_ip": "1.1.1.1",
+            "host": {
+                "Platform": "darwin",
+                "PlatformVersion": "12.3.1",
+                "CPU": [
+                    "Apple M1 Pro 1 Physical Core"
+                ],
+                "MemTotal": 17179869184,
+                "DiskTotal": 2473496842240,
+                "SwapTotal": 0,
+                "Arch": "arm64",
+                "Virtualization": "",
+                "BootTime": 1652683962,
+                "CountryCode": "hk",
+                "Version": ""
+            },
+            "status": {
+                "CPU": 17.33,
+                "MemUsed": 14013841408,
+                "SwapUsed": 0,
+                "DiskUsed": 2335048912896,
+                "NetInTransfer": 2710273234,
+                "NetOutTransfer": 695454765,
+                "NetInSpeed": 10806,
+                "NetOutSpeed": 5303,
+                "Uptime": 331080,
+                "Load1": 5.23,
+                "Load5": 4.87,
+                "Load15": 3.99,
+                "TcpConnCount": 195,
+                "UdpConnCount": 70,
+                "ProcessCount": 437
+            }
+        },
+        {
+            "id": 2,
+            "name": "Server2",
+            "tag": "Tag2",
+            "last_active": -62135596800,
+            "ipv4": "",
+            "ipv6": "",
+            "valid_ip": "",
+            "host": {
+                "Platform": "",
+                "PlatformVersion": "",
+                "CPU": null,
+                "MemTotal": 0,
+                "DiskTotal": 0,
+                "SwapTotal": 0,
+                "Arch": "",
+                "Virtualization": "",
+                "BootTime": 0,
+                "CountryCode": "",
+                "Version": ""
+            },
+            "status": {
+                "CPU": 0,
+                "MemUsed": 0,
+                "SwapUsed": 0,
+                "DiskUsed": 0,
+                "NetInTransfer": 0,
+                "NetOutTransfer": 0,
+                "NetInSpeed": 0,
+                "NetOutSpeed": 0,
+                "Uptime": 0,
+                "Load1": 0,
+                "Load5": 0,
+                "Load15": 0,
+                "TcpConnCount": 0,
+                "UdpConnCount": 0,
+                "ProcessCount": 0
+            }
+        }
+    ]
+}

Usage Examples

Get All Server Information

python
import requests
+
+url = "http://your-dashboard/api/v1/server/list"
+headers = {
+    "Authorization": "your_token"
+}
+
+response = requests.get(url, headers=headers)
+data = response.json()
+
+for server in data['result']:
+    print(f"Server Name: {server['name']}, Last Active: {server['last_active']}, IP: {server['valid_ip']}")

Get Specific Server Details

python
import requests
+
+server_id = 1  # Replace with your server ID
+url = f"http://your-dashboard/api/v1/server/details?id={server_id}"
+headers = {
+    "Authorization": "your_token"
+}
+
+response = requests.get(url, headers=headers)
+data = response.json()
+
+server = data['result'][0]
+print(f"Server Name: {server['name']}")
+print(f"CPU Usage: {server['status']['CPU']}%")
+print(f"Memory Used: {server['status']['MemUsed']} bytes")
+print(f"Disk Used: {server['status']['DiskUsed']} bytes")
+print(f"Network In Speed: {server['status']['NetInSpeed']} bytes/s")
+print(f"Network Out Speed: {server['status']['NetOutSpeed']} bytes/s")

With the above example code, you can easily obtain and process server status information, enabling automated monitoring and management.

`,33),k=[h];function p(l,e,E,r,d,o){return a(),i("div",null,k)}const y=s(t,[["render",p]]);export{F as __pageData,y as default}; diff --git a/assets/en_US_guide_api.md.DlwwVGvY.lean.js b/assets/en_US_guide_api.md.DlwwVGvY.lean.js new file mode 100644 index 00000000..462adcea --- /dev/null +++ b/assets/en_US_guide_api.md.DlwwVGvY.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"API Interface","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/api.md","filePath":"en_US/guide/api.md","lastUpdated":1719239024000}'),t={name:"en_US/guide/api.md"},h=n("",33),k=[h];function p(l,e,E,r,d,o){return a(),i("div",null,k)}const y=s(t,[["render",p]]);export{F as __pageData,y as default}; diff --git a/assets/en_US_guide_dashboard.md.54205e0c.js b/assets/en_US_guide_dashboard.md.54205e0c.js deleted file mode 100644 index dc984e72..00000000 --- a/assets/en_US_guide_dashboard.md.54205e0c.js +++ /dev/null @@ -1,21 +0,0 @@ -import{_ as a,o as e,c as s,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"Install Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/dashboard.md","filePath":"en_US/guide/dashboard.md","lastUpdated":1718495592000}'),t={name:"en_US/guide/dashboard.md"},n=o(`

Install Dashboard

Preparation

To set up Nezha Monitoring, you need:

  1. A server with public internet access, with firewall and security policies allowing traffic on ports 8008 and 5555. These ports are necessary for accessing and receiving data. A server with a single core and 512MB of RAM is sufficient for most use cases.
  2. A domain with an A record set to point to your Dashboard server IP.

TIP

If you want to use a CDN, prepare two domains: one configured with CDN for public access (CDN must support WebSocket protocol), and another domain not using CDN for communication between the Agent and Dashboard.

This document uses "dashboard.example.com" and "data.example.com" as example domains.

  1. A Github account (or Gitlab, Gitee).

This document uses the aaPanel for reverse proxying the Dashboard as an example. As future versions change, some features may change their entry points. This document is for reference only.

WARNING

This project does not depend on the aaPanel; you can choose any server panel you prefer or manually install Nginx or Caddy to configure SSL and reverse proxy.
If you do not need to use ports 80 and 443 to access the Dashboard, you can directly use the installation script to install and run Nezha Monitoring without installing Nginx.

Obtaining Github Client ID and Secret

Nezha Monitoring uses Github, Gitlab, or Gitee as admin accounts.

  1. First, create an OAuth application. For Github, log in to Github, open Github OAuth Apps, and select "OAuth Apps" -> "New OAuth App".
    Application name - Fill in as you like.
    Homepage URL - Fill in with the domain for accessing the dashboard, such as "http://dashboard.example.com" (your domain).
    Authorization callback URL - Fill in with the callback address, such as "http://dashboard.example.com/oauth2/callback" (don't forget /oauth2/callback).
  2. Click “Register application”.
  3. Save the Client ID on the page, then click “Generate a new client secret” to create a new Client Secret, which will be displayed only once, please keep it safe.

Using Cloudflare Access as OAuth2 Provider

If you encounter issues using Github, Gitlab, or Gitee as admin login, consider switching to using Cloudflare Access as the OAuth2 provider.

Creating a SaaS-OIDC Application

  1. Go to Zero Trust Dashboard and log in with your Cloudflare account.
  2. My Team -> Users -> <specific user> -> Get User ID and save it.
  3. Access -> Application -> Add an Application.
  4. Choose SaaS, enter a custom application name in Application (e.g., nezha), select OIDC, and click Add application.
  5. Select Scopes: openid, email, profile, groups.
  6. Fill in your callback address in Redirect URLs, such as https://dashboard.example.com/oauth2/callback.
  7. Save the Client ID, Client Secret, and Issuer address (protocol and domain part), e.g., https://xxxxx.cloudflareaccess.com.

If using this method, after installing the Dashboard, modify the configuration file /opt/nezha/dashboard/data/config.yaml, and change the Endpoint configuration to the Issuer address saved earlier, e.g., https://xxxxx.cloudflareaccess.com, and restart the Dashboard.

Installing the Dashboard on the Server

Run the installation script on the dashboard server:

bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

After Docker installation completes, enter the following values:

  • OAuth provider - choose one from github, cloudflare, gitlab, gitee.
  • Client ID - the previously saved Client ID.
  • Client Secret - the previously saved Client Secret.
  • Username - the username/User ID from the OAuth provider.
  • Site title - custom site title.
  • Access port - public access port, customizable, default is 8008.
  • Agent communication port - port for Agent and Dashboard communication, default is 5555.

After inputting the values, wait for the image to be pulled.
When the installation completes, you can access the dashboard by visiting your domain and port number, such as “http://dashboard.example.com:8008”.

In the future, if you need to run the script again, run:

bash
./nezha.sh

to open the management script.

Configuring Reverse Proxy

Create a new site in the aaPanel, with the domain filled in as the public access domain, such as “http://dashboard.example.com”. Then click “Settings” to enter the site settings options, select “Reverse Proxy” - “New Reverse Proxy”.

Customize a proxy name and fill in http://127.0.0.1 in the "Target URL" below, then click “Save”.

Open the “Configuration File” on the right side of the newly created reverse proxy and replace the configuration file with the following content:

nginx
#PROXY-START/
-location / {
-    proxy_pass http://127.0.0.1:8008;
-    proxy_set_header Host $http_host;
-    proxy_set_header Upgrade $http_upgrade;
-}
-location ~ ^/(ws|terminal/.+)$  {
-    proxy_pass http://127.0.0.1:8008;
-    proxy_http_version 1.1;
-    proxy_set_header Upgrade $http_upgrade;
-    proxy_set_header Connection "Upgrade";
-    proxy_set_header Host $http_host;
-}
-#PROXY-END/

Click “Save”.
Now you should be able to access the dashboard directly using the domain, such as “http://dashboard.example.com”.

Additional Content:

CaddyServer v1 (v2 does not require special configuration):

caddy
proxy /ws http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}
-proxy /terminal/* http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}

Configuring SSL in the aaPanel

First, temporarily disable the reverse proxy.
Like configuring SSL certificates for other websites, enter the “SSL” in the site settings, and you can choose to automatically apply for a Let’s Encrypt certificate or manually configure an existing certificate.
After completing the SSL settings, go back to Github OAuth Apps and edit the previously created OAuth application. Change all the domain parts in "Homepage URL" and "Authorization callback URL" from http to https, such as "https://dashboard.example.com" and "https://dashboard.example.com/oauth2/callback". Failing to change this may result in being unable to log in to the admin panel.

Updating the Dashboard

Run the script ./nezha.sh, and select to restart and update the dashboard.

`,38),l=[n];function r(i,c,p,d,h,u){return e(),s("div",null,l)}const C=a(t,[["render",r]]);export{y as __pageData,C as default}; diff --git a/assets/en_US_guide_dashboard.md.54205e0c.lean.js b/assets/en_US_guide_dashboard.md.54205e0c.lean.js deleted file mode 100644 index 03d6a9aa..00000000 --- a/assets/en_US_guide_dashboard.md.54205e0c.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as e,c as s,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"Install Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/dashboard.md","filePath":"en_US/guide/dashboard.md","lastUpdated":1718495592000}'),t={name:"en_US/guide/dashboard.md"},n=o("",38),l=[n];function r(i,c,p,d,h,u){return e(),s("div",null,l)}const C=a(t,[["render",r]]);export{y as __pageData,C as default}; diff --git a/assets/en_US_guide_dashboard.md.CqJk3SZj.js b/assets/en_US_guide_dashboard.md.CqJk3SZj.js new file mode 100644 index 00000000..cef31c1b --- /dev/null +++ b/assets/en_US_guide_dashboard.md.CqJk3SZj.js @@ -0,0 +1,21 @@ +import{_ as a,c as e,o as s,a4 as t}from"./chunks/framework.BmdFiWrL.js";const k=JSON.parse('{"title":"Install Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/dashboard.md","filePath":"en_US/guide/dashboard.md","lastUpdated":1719239024000}'),i={name:"en_US/guide/dashboard.md"},n=t(`

Install Dashboard

Preparation

To set up Nezha Monitoring, you need:

  1. A server with public internet access, with firewall and security policies allowing traffic on ports 8008 and 5555. These ports are necessary for accessing and receiving data. A server with a single core and 512MB of RAM is sufficient for most use cases.
  2. A domain with an A record set to point to your Dashboard server IP.

TIP

If you want to use a CDN, prepare two domains: one configured with CDN for public access (CDN must support WebSocket protocol), and another domain not using CDN for communication between the Agent and Dashboard.

This document uses "dashboard.example.com" and "data.example.com" as example domains.

  1. A Github account (or Gitlab, Gitee).

This document uses the aaPanel for reverse proxying the Dashboard as an example. As future versions change, some features may change their entry points. This document is for reference only.

WARNING

This project does not depend on the aaPanel; you can choose any server panel you prefer or manually install Nginx or Caddy to configure SSL and reverse proxy.
If you do not need to use ports 80 and 443 to access the Dashboard, you can directly use the installation script to install and run Nezha Monitoring without installing Nginx.

Obtaining Github Client ID and Secret

Nezha Monitoring uses Github, Gitlab, or Gitee as admin accounts.

  1. First, create an OAuth application. For Github, log in to Github, open Github OAuth Apps, and select "OAuth Apps" -> "New OAuth App".
    Application name - Fill in as you like.
    Homepage URL - Fill in with the domain for accessing the dashboard, such as "http://dashboard.example.com" (your domain).
    Authorization callback URL - Fill in with the callback address, such as "http://dashboard.example.com/oauth2/callback" (don't forget /oauth2/callback).
  2. Click “Register application”.
  3. Save the Client ID on the page, then click “Generate a new client secret” to create a new Client Secret, which will be displayed only once, please keep it safe.

Using Cloudflare Access as OAuth2 Provider

If you encounter issues using Github, Gitlab, or Gitee as admin login, consider switching to using Cloudflare Access as the OAuth2 provider.

Creating a SaaS-OIDC Application

  1. Go to Zero Trust Dashboard and log in with your Cloudflare account.
  2. My Team -> Users -> <specific user> -> Get User ID and save it.
  3. Access -> Application -> Add an Application.
  4. Choose SaaS, enter a custom application name in Application (e.g., nezha), select OIDC, and click Add application.
  5. Select Scopes: openid, email, profile, groups.
  6. Fill in your callback address in Redirect URLs, such as https://dashboard.example.com/oauth2/callback.
  7. Save the Client ID, Client Secret, and Issuer address (protocol and domain part), e.g., https://xxxxx.cloudflareaccess.com.

If using this method, after installing the Dashboard, modify the configuration file /opt/nezha/dashboard/data/config.yaml, and change the Endpoint configuration to the Issuer address saved earlier, e.g., https://xxxxx.cloudflareaccess.com, and restart the Dashboard.

Installing the Dashboard on the Server

Run the installation script on the dashboard server:

bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

After Docker installation completes, enter the following values:

  • OAuth provider - choose one from github, cloudflare, gitlab, gitee.
  • Client ID - the previously saved Client ID.
  • Client Secret - the previously saved Client Secret.
  • Username - the username/User ID from the OAuth provider.
  • Site title - custom site title.
  • Access port - public access port, customizable, default is 8008.
  • Agent communication port - port for Agent and Dashboard communication, default is 5555.

After inputting the values, wait for the image to be pulled.
When the installation completes, you can access the dashboard by visiting your domain and port number, such as “http://dashboard.example.com:8008”.

In the future, if you need to run the script again, run:

bash
./nezha.sh

to open the management script.

Configuring Reverse Proxy

Create a new site in the aaPanel, with the domain filled in as the public access domain, such as “http://dashboard.example.com”. Then click “Settings” to enter the site settings options, select “Reverse Proxy” - “New Reverse Proxy”.

Customize a proxy name and fill in http://127.0.0.1 in the "Target URL" below, then click “Save”.

Open the “Configuration File” on the right side of the newly created reverse proxy and replace the configuration file with the following content:

nginx
#PROXY-START/
+location / {
+    proxy_pass http://127.0.0.1:8008;
+    proxy_set_header Host $http_host;
+    proxy_set_header Upgrade $http_upgrade;
+}
+location ~ ^/(ws|terminal/.+)$  {
+    proxy_pass http://127.0.0.1:8008;
+    proxy_http_version 1.1;
+    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection "Upgrade";
+    proxy_set_header Host $http_host;
+}
+#PROXY-END/

Click “Save”.
Now you should be able to access the dashboard directly using the domain, such as “http://dashboard.example.com”.

Additional Content:

CaddyServer v1 (v2 does not require special configuration):

caddy
proxy /ws http://ip:8008 {
+    websocket
+    header_upstream -Origin
+}
+proxy /terminal/* http://ip:8008 {
+    websocket
+    header_upstream -Origin
+}

Configuring SSL in the aaPanel

First, temporarily disable the reverse proxy.
Like configuring SSL certificates for other websites, enter the “SSL” in the site settings, and you can choose to automatically apply for a Let’s Encrypt certificate or manually configure an existing certificate.
After completing the SSL settings, go back to Github OAuth Apps and edit the previously created OAuth application. Change all the domain parts in "Homepage URL" and "Authorization callback URL" from http to https, such as "https://dashboard.example.com" and "https://dashboard.example.com/oauth2/callback". Failing to change this may result in being unable to log in to the admin panel.

Updating the Dashboard

Run the script ./nezha.sh, and select to restart and update the dashboard.

`,38),o=[n];function r(l,h,d,p,c,u){return s(),e("div",null,o)}const b=a(i,[["render",r]]);export{k as __pageData,b as default}; diff --git a/assets/en_US_guide_dashboard.md.CqJk3SZj.lean.js b/assets/en_US_guide_dashboard.md.CqJk3SZj.lean.js new file mode 100644 index 00000000..f262963e --- /dev/null +++ b/assets/en_US_guide_dashboard.md.CqJk3SZj.lean.js @@ -0,0 +1 @@ +import{_ as a,c as e,o as s,a4 as t}from"./chunks/framework.BmdFiWrL.js";const k=JSON.parse('{"title":"Install Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/dashboard.md","filePath":"en_US/guide/dashboard.md","lastUpdated":1719239024000}'),i={name:"en_US/guide/dashboard.md"},n=t("",38),o=[n];function r(l,h,d,p,c,u){return s(),e("div",null,o)}const b=a(i,[["render",r]]);export{k as __pageData,b as default}; diff --git a/assets/en_US_guide_dashboardq.md.7302f04b.js b/assets/en_US_guide_dashboardq.md.7302f04b.js deleted file mode 100644 index a21a1248..00000000 --- a/assets/en_US_guide_dashboardq.md.7302f04b.js +++ /dev/null @@ -1,10 +0,0 @@ -import{_ as a,o as e,c as t,R as o}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"Frequently Asked Questions about the Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/dashboardq.md","filePath":"en_US/guide/dashboardq.md","lastUpdated":1718495592000}'),s={name:"en_US/guide/dashboardq.md"},n=o(`

Frequently Asked Questions about the Dashboard

Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?

First, let's explain how the IP displayed in the Admin panel is obtained: The Agent periodically requests IP-API to get IP information and reports it to the Dashboard. The currently used IP-API can be viewed here: myip.go.
If you find that the IP displayed in the Admin panel is different from the IP provided by your service provider, it is most likely that the service provider has given you an entry IP, but the Agent is testing your exit IP. This issue can also occur with multi-line servers and IPLC private lines.

TIP

For example, a common scenario is that the service provider gives you a high-defense server. To meet both high defense and low network interruption rate goals, the IP provided may be a mapped high-defense IP rather than your server's real exit IP.

You can also test the exit IP on the Agent server by running the following commands:

shell
curl https://ipapi.co/ip/
-curl ip.sb
-curl ip-api.com

Forgot or Deleted Viewing Password

Please view or edit the /opt/nezha/dashboard/data/config.yaml file.
The password is located under the site-viewpassword item.

Dashboard Installation/Restart/Update Failure: iptables ......

First, try restarting Docker before proceeding:

shell
systemctl status docker
-systemctl restart docker
-systemctl status docker

After restarting, try reinstalling the Dashboard.
If iptables errors persist, consider disabling or removing iptables.
This issue might also be related to the kernel, so switching to the official kernel can be another solution.

Dashboard Restart Failure: Invalid hostPort: nz_site_port

If this issue occurs, you can modify the configuration via the installation script or directly edit the /opt/nezha/dashboard/docker-compose.yaml file.

Dashboard Layout Error, CSS Resources Not Loading

If the Dashboard page layout is incorrect, it's usually due to missing or inaccessible CSS files.
To resolve this, try restarting and updating the Dashboard first.
If the problem persists after updating, the issue may be due to inappropriate configurations in your vhost file. You can edit the Nginx vhost file or use the aaPanel to:

  1. Find the site configured during Dashboard installation in Websites and click Settings on the right.

  2. Select Configuration File and remove the following lines:

    nginx
    location ~ .*\\.(js|css)?$
    -    {
    -        expires      12h;
    -        error_log /dev/null;
    -        access_log /dev/null;
    -    }
  3. Save the configuration, clear the browser, Nginx, and CDN caches, and refresh the page to see if it returns to normal.

Dashboard Cannot Start: panic: Unable to find the configured DDNS provider...

The value entered for the DDNS provider is incorrect. Currently, only webhook, cloudflare, tencentcloud, and dummy are supported.

Dashboard DDNS Update Crash: panic: interface conversion: interface {} is nil, not []interface {}

The entered DDNS AccessID or AccessSecret is incorrect.

Network Monitoring Page Shows: server monitor history not found

This error indicates that no TCP-Ping or ICMP-Ping type monitoring has been set in the services page or monitoring data has not yet been generated.
If it has been set up, wait for some time and then check again.

What to do if /terminal or /ws can't connect properly after enabling HTTPS?

This is often due to an incomplete certificate. Add the -d parameter to the agent run command. If the log contains x509:certificate signed by unknown authority, replacing with a complete certificate will solve the problem.

What if I'm not satisfied with the data modification/addition functionality provided by the dashboard and want to modify/add data myself?

Common in scenarios like batch adding Agents, you can directly modify the database.
Note that not everything in the database can be modified; incorrect modifications can lead to data corruption and inability to start the Dashboard. Do not modify the database casually!

DANGER

Again, do not modify the database casually!

If you need to modify data in the database, stop the dashboard container first.
The database type is sqlite3, located at /opt/nezha/dashboard/data/sqlite.db. Backup before modifying.

Will the Dashboard automatically update?

Agents typically update automatically, but the Dashboard does not and requires manual updates.

`,31),i=[n];function r(l,d,c,p,h,u){return e(),t("div",null,i)}const y=a(s,[["render",r]]);export{f as __pageData,y as default}; diff --git a/assets/en_US_guide_dashboardq.md.7302f04b.lean.js b/assets/en_US_guide_dashboardq.md.7302f04b.lean.js deleted file mode 100644 index d911b213..00000000 --- a/assets/en_US_guide_dashboardq.md.7302f04b.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as e,c as t,R as o}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"Frequently Asked Questions about the Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/dashboardq.md","filePath":"en_US/guide/dashboardq.md","lastUpdated":1718495592000}'),s={name:"en_US/guide/dashboardq.md"},n=o("",31),i=[n];function r(l,d,c,p,h,u){return e(),t("div",null,i)}const y=a(s,[["render",r]]);export{f as __pageData,y as default}; diff --git a/assets/en_US_guide_dashboardq.md.B7tjvTgj.js b/assets/en_US_guide_dashboardq.md.B7tjvTgj.js new file mode 100644 index 00000000..e031ab58 --- /dev/null +++ b/assets/en_US_guide_dashboardq.md.B7tjvTgj.js @@ -0,0 +1,10 @@ +import{_ as a,c as e,o as t,a4 as i}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Frequently Asked Questions about the Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/dashboardq.md","filePath":"en_US/guide/dashboardq.md","lastUpdated":1719239024000}'),s={name:"en_US/guide/dashboardq.md"},o=i(`

Frequently Asked Questions about the Dashboard

Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?

First, let's explain how the IP displayed in the Admin panel is obtained: The Agent periodically requests IP-API to get IP information and reports it to the Dashboard. The currently used IP-API can be viewed here: myip.go.
If you find that the IP displayed in the Admin panel is different from the IP provided by your service provider, it is most likely that the service provider has given you an entry IP, but the Agent is testing your exit IP. This issue can also occur with multi-line servers and IPLC private lines.

TIP

For example, a common scenario is that the service provider gives you a high-defense server. To meet both high defense and low network interruption rate goals, the IP provided may be a mapped high-defense IP rather than your server's real exit IP.

You can also test the exit IP on the Agent server by running the following commands:

shell
curl https://ipapi.co/ip/
+curl ip.sb
+curl ip-api.com

Forgot or Deleted Viewing Password

Please view or edit the /opt/nezha/dashboard/data/config.yaml file.
The password is located under the site-viewpassword item.

Dashboard Installation/Restart/Update Failure: iptables ......

First, try restarting Docker before proceeding:

shell
systemctl status docker
+systemctl restart docker
+systemctl status docker

After restarting, try reinstalling the Dashboard.
If iptables errors persist, consider disabling or removing iptables.
This issue might also be related to the kernel, so switching to the official kernel can be another solution.

Dashboard Restart Failure: Invalid hostPort: nz_site_port

If this issue occurs, you can modify the configuration via the installation script or directly edit the /opt/nezha/dashboard/docker-compose.yaml file.

Dashboard Layout Error, CSS Resources Not Loading

If the Dashboard page layout is incorrect, it's usually due to missing or inaccessible CSS files.
To resolve this, try restarting and updating the Dashboard first.
If the problem persists after updating, the issue may be due to inappropriate configurations in your vhost file. You can edit the Nginx vhost file or use the aaPanel to:

  1. Find the site configured during Dashboard installation in Websites and click Settings on the right.

  2. Select Configuration File and remove the following lines:

    nginx
    location ~ .*\\.(js|css)?$
    +    {
    +        expires      12h;
    +        error_log /dev/null;
    +        access_log /dev/null;
    +    }
  3. Save the configuration, clear the browser, Nginx, and CDN caches, and refresh the page to see if it returns to normal.

Dashboard Cannot Start: panic: Unable to find the configured DDNS provider...

The value entered for the DDNS provider is incorrect. Currently, only webhook, cloudflare, tencentcloud, and dummy are supported.

Dashboard DDNS Update Crash: panic: interface conversion: interface {} is nil, not []interface {}

The entered DDNS AccessID or AccessSecret is incorrect.

Network Monitoring Page Shows: server monitor history not found

This error indicates that no TCP-Ping or ICMP-Ping type monitoring has been set in the services page or monitoring data has not yet been generated.
If it has been set up, wait for some time and then check again.

What to do if /terminal or /ws can't connect properly after enabling HTTPS?

This is often due to an incomplete certificate. Add the -d parameter to the agent run command. If the log contains x509:certificate signed by unknown authority, replacing with a complete certificate will solve the problem.

What if I'm not satisfied with the data modification/addition functionality provided by the dashboard and want to modify/add data myself?

Common in scenarios like batch adding Agents, you can directly modify the database.
Note that not everything in the database can be modified; incorrect modifications can lead to data corruption and inability to start the Dashboard. Do not modify the database casually!

DANGER

Again, do not modify the database casually!

If you need to modify data in the database, stop the dashboard container first.
The database type is sqlite3, located at /opt/nezha/dashboard/data/sqlite.db. Backup before modifying.

Will the Dashboard automatically update?

Agents typically update automatically, but the Dashboard does not and requires manual updates.

`,31),n=[o];function r(d,h,l,c,p,u){return t(),e("div",null,n)}const f=a(s,[["render",r]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_guide_dashboardq.md.B7tjvTgj.lean.js b/assets/en_US_guide_dashboardq.md.B7tjvTgj.lean.js new file mode 100644 index 00000000..194d6919 --- /dev/null +++ b/assets/en_US_guide_dashboardq.md.B7tjvTgj.lean.js @@ -0,0 +1 @@ +import{_ as a,c as e,o as t,a4 as i}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Frequently Asked Questions about the Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/dashboardq.md","filePath":"en_US/guide/dashboardq.md","lastUpdated":1719239024000}'),s={name:"en_US/guide/dashboardq.md"},o=i("",31),n=[o];function r(d,h,l,c,p,u){return t(),e("div",null,n)}const f=a(s,[["render",r]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_guide_loginq.md.0a8a1bec.js b/assets/en_US_guide_loginq.md.0a8a1bec.js deleted file mode 100644 index 85aee8c8..00000000 --- a/assets/en_US_guide_loginq.md.0a8a1bec.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"Frequently Asked Questions about logging into the Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/loginq.md","filePath":"en_US/guide/loginq.md","lastUpdated":1718495592000}'),i={name:"en_US/guide/loginq.md"},n=a('

Frequently Asked Questions about logging into the Dashboard

Stuck Page/Connection Refused/Long Response Time After Login Callback

These issues can manifest in various ways, but ultimately the browser cannot display correctly after login.

  1. Your server cannot connect to Github/Gitee, which is most common when configuring Github on servers in mainland China. You may try several times or switch to Cloudflare Access.
  2. You have configured the callback address incorrectly. Ensure that your callback address is correct and that both the port and protocol are accurate!
  3. An unknown error occurred on the Dashboard. You can use a script to check the logs.

TIP

What is a protocol? In the browser, the string that ends your domain with :// is the protocol, usually http or https. Since there may be multiple protocol+domain+port combinations available for accessing the Dashboard in a normal deployment, make sure to choose the most appropriate one as the callback.

How to Check if My Callback Address is Wrong?

Ensure that the protocol+domain+port displayed in the browser before login and after the callback are consistent.
Ensure that your path is /oauth2/callback, all in lowercase.

Errors After Logging into the Admin Panel

  1. Clear cookies and log in again, or try a different browser.
  2. Check the callback address to ensure it is correct and that both the port and protocol are accurate! The address initiating the request must be in the same domain as the callback address, with the port, protocol, and domain (or IP) all matching.

lookup xxx

The container DNS resolution failed, usually due to modified iptables configurations.
It is recommended to restart Docker first, sudo systemctl restart docker, then restart the Dashboard using the script.
If the lookup error persists, check if there are other tools controlling iptables, such as firewall.
This issue might also be related to the kernel, so try switching to the official kernel.

Invalid authorization method, or the login callback address is invalid, expired, or has been revoked

This issue appears only when using Gitee login, and the reason is unclear. Switching to GitHub is recommended.

oauth2: server response missing access_token

This could be caused by various factors, most likely a network issue. Check your network and try again.
If unresolved, switching to Github or another method is recommended.

The user is not an admin of this site and cannot log in

You logged in with the wrong account or configured the wrong username. Note that the username is not an email, and you can use a script to modify it.
For Cloudflare Access users, note that your username is not an email but a User ID.

dial tcp xxx:443 i/o timeout

This is a network issue. Try restarting Docker first, sudo systemctl restart docker, then restart the Dashboard using the script.
If you are configuring Github login on a server in mainland China, switching to Cloudflare Access is recommended to avoid network interference.

net/http: TLS handshake timeout

Same as above.

',22),r=[n];function s(l,h,c,d,u,g){return o(),t("div",null,r)}const b=e(i,[["render",s]]);export{m as __pageData,b as default}; diff --git a/assets/en_US_guide_loginq.md.0a8a1bec.lean.js b/assets/en_US_guide_loginq.md.0a8a1bec.lean.js deleted file mode 100644 index b3818cbe..00000000 --- a/assets/en_US_guide_loginq.md.0a8a1bec.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o,c as t,R as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"Frequently Asked Questions about logging into the Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/loginq.md","filePath":"en_US/guide/loginq.md","lastUpdated":1718495592000}'),i={name:"en_US/guide/loginq.md"},n=a("",22),r=[n];function s(l,h,c,d,u,g){return o(),t("div",null,r)}const b=e(i,[["render",s]]);export{m as __pageData,b as default}; diff --git a/assets/en_US_guide_loginq.md.Cz5kBrac.js b/assets/en_US_guide_loginq.md.Cz5kBrac.js new file mode 100644 index 00000000..bca0e73a --- /dev/null +++ b/assets/en_US_guide_loginq.md.Cz5kBrac.js @@ -0,0 +1 @@ +import{_ as e,c as o,o as t,a4 as a}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Frequently Asked Questions about logging into the Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/loginq.md","filePath":"en_US/guide/loginq.md","lastUpdated":1719239024000}'),i={name:"en_US/guide/loginq.md"},n=a('

Frequently Asked Questions about logging into the Dashboard

Stuck Page/Connection Refused/Long Response Time After Login Callback

These issues can manifest in various ways, but ultimately the browser cannot display correctly after login.

  1. Your server cannot connect to Github/Gitee, which is most common when configuring Github on servers in mainland China. You may try several times or switch to Cloudflare Access.
  2. You have configured the callback address incorrectly. Ensure that your callback address is correct and that both the port and protocol are accurate!
  3. An unknown error occurred on the Dashboard. You can use a script to check the logs.

TIP

What is a protocol? In the browser, the string that ends your domain with :// is the protocol, usually http or https. Since there may be multiple protocol+domain+port combinations available for accessing the Dashboard in a normal deployment, make sure to choose the most appropriate one as the callback.

How to Check if My Callback Address is Wrong?

Ensure that the protocol+domain+port displayed in the browser before login and after the callback are consistent.
Ensure that your path is /oauth2/callback, all in lowercase.

Errors After Logging into the Admin Panel

  1. Clear cookies and log in again, or try a different browser.
  2. Check the callback address to ensure it is correct and that both the port and protocol are accurate! The address initiating the request must be in the same domain as the callback address, with the port, protocol, and domain (or IP) all matching.

lookup xxx

The container DNS resolution failed, usually due to modified iptables configurations.
It is recommended to restart Docker first, sudo systemctl restart docker, then restart the Dashboard using the script.
If the lookup error persists, check if there are other tools controlling iptables, such as firewall.
This issue might also be related to the kernel, so try switching to the official kernel.

Invalid authorization method, or the login callback address is invalid, expired, or has been revoked

This issue appears only when using Gitee login, and the reason is unclear. Switching to GitHub is recommended.

oauth2: server response missing access_token

This could be caused by various factors, most likely a network issue. Check your network and try again.
If unresolved, switching to Github or another method is recommended.

The user is not an admin of this site and cannot log in

You logged in with the wrong account or configured the wrong username. Note that the username is not an email, and you can use a script to modify it.
For Cloudflare Access users, note that your username is not an email but a User ID.

dial tcp xxx:443 i/o timeout

This is a network issue. Try restarting Docker first, sudo systemctl restart docker, then restart the Dashboard using the script.
If you are configuring Github login on a server in mainland China, switching to Cloudflare Access is recommended to avoid network interference.

net/http: TLS handshake timeout

Same as above.

',22),r=[n];function s(l,h,c,d,u,g){return t(),o("div",null,r)}const b=e(i,[["render",s]]);export{m as __pageData,b as default}; diff --git a/assets/en_US_guide_loginq.md.Cz5kBrac.lean.js b/assets/en_US_guide_loginq.md.Cz5kBrac.lean.js new file mode 100644 index 00000000..5fd272bd --- /dev/null +++ b/assets/en_US_guide_loginq.md.Cz5kBrac.lean.js @@ -0,0 +1 @@ +import{_ as e,c as o,o as t,a4 as a}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Frequently Asked Questions about logging into the Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/loginq.md","filePath":"en_US/guide/loginq.md","lastUpdated":1719239024000}'),i={name:"en_US/guide/loginq.md"},n=a("",22),r=[n];function s(l,h,c,d,u,g){return t(),o("div",null,r)}const b=e(i,[["render",s]]);export{m as __pageData,b as default}; diff --git a/assets/en_US_guide_notifications.md.0c956c41.js b/assets/en_US_guide_notifications.md.0c956c41.js deleted file mode 100644 index a34ad324..00000000 --- a/assets/en_US_guide_notifications.md.0c956c41.js +++ /dev/null @@ -1,40 +0,0 @@ -import{_ as o,o as s,c as a,R as e}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"Notification Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/notifications.md","filePath":"en_US/guide/notifications.md","lastUpdated":1718495592000}'),n={name:"en_US/guide/notifications.md"},t=e(`

Notification Configuration

Nezha Monitoring supports monitoring server load, CPU, memory, disk, traffic, monthly traffic, process count, and connection count, and sending notifications when user-defined thresholds are reached.

Flexible Notification Methods

  • In Dashboard messages, the placeholder #DATETIME# represents the timestamp of the event. When the notification is triggered, the Dashboard automatically replaces #DATETIME# with the actual event time.
  • #NEZHA# is a placeholder for Dashboard messages, and the Dashboard automatically replaces the placeholder with the actual message when the notification is triggered.
  • The body content is in JSON format: When the request type is FORM, the value is in key:value form, and placeholders can be placed inside value. The placeholders will be automatically replaced during notification. When the request type is JSON, only simple string replacement is performed before being submitted to the URL.
  • Placeholders can also be placed inside the URL, and simple string replacement will be performed during the request.

Refer to the following notification method examples, and you can also flexibly set the push method according to your needs.

Bark Example

Click to expand/collapse
  • Name: Bark

  • URL structure: /:key/:body or /:key/:title/:body or /:key/:category/:title/:body

  • Request Method: GET

  • Request Type: Default

  • Body: Empty

  • Name: Bark

  • URL structure: /push

  • Request Method: POST

  • Request Type: form

  • Body: {"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":"https://xxxxxxxx/nz.png"}

Slack Example Contributor: @白歌

Click to expand/collapse

URL Parameter Acquisition Instructions

Prepare your Slack Workspace in advance and create an App for this Workspace. If you have not created one, you can create an App at Slack API.

After creating the App, you need to add an Incoming Webhook to the App. In the App's settings page, find Incoming Webhooks, enable Activate Incoming Webhooks, and at the bottom of the page, find and click Add New Webhook to Workspace, choose a Channel, and click Allow. After creating, you will get a Webhook URL, which you will use to replace the example URL below.

Telegram Example Contributor: @白歌

Click to expand/collapse

URL Parameter Acquisition Instructions

Create a bot in Telegram and get the bot's token and your Telegram user ID.

The token and user ID are alphanumeric strings. You can get your user ID by chatting with @userinfobot on Telegram. Create a bot by chatting with @BotFather, and you will get the bot's token.

Replace botXXXXXX with your bot token and YYYYYY with your user ID in the URL below. Note that you need to chat with the bot first, otherwise the bot cannot send messages to you.

Email Notification Example - Outlook Contributor: @白歌

Click to expand/collapse

Note: SendCloud has a daily free email sending limit. This is just an example. You can choose a paid service or other similar free services. The usage method is similar.

URL Parameter Acquisition Instructions

This example uses SendCloud as the email service. You need to register an account on SendCloud, create a sender email, and then obtain the APIUSER and APIKEY here.

Replace <replaceAPIUSER> and <replaceAPIKEY> in the example URL below with your APIUSER and APIKEY, and replace <customSenderEmail> and <customRecipientEmail> with any sender and recipient email addresses.

  • Name: MS Mail Notification
  • URL:https://graph.microsoft.com/v1.0/me/microsoft.graph.sendMail
  • Request method: POST
  • Request type: JSON
  • Header: {"Content-type":"application/json", "Authorization":"Bearer {Token}"}
  • Body:
    json
    {
    -  "message": {
    -      "subject": "Server Status Notification",
    -      "body": {
    -      "contentType": "Text",
    -      "content": "#NEZHA#"
    -      },
    -      "toRecipients": [
    -        {
    -          "emailAddress": {
    -              "address": "ADDRESS FOR RECEVING EMAILS"
    -              }
    -        }
    -      ]
    -  }
    -}

DingTalk Group Bot Configuration Example

Click to expand/collapse

URL Parameter Acquisition Instructions

Create a bot in DingTalk in advance and get the bot's token.

The bot URL is obtained after creating a bot in the DingTalk group - Manage Bot - Create Bot. Choose custom keywords for the security method, and the Body content value must contain these keywords.

WeChat Work Group Bot Example Contributor: @ChowRex

Click to expand/collapse

Supported placeholders list

json
{
-    "content": "#NEZHA#",
-    "ServerName": "#SERVER.NAME#",
-    "ServerIP": "#SERVER.IP#",
-    "ServerIPV4": "#SERVER.IPV4#",
-    "ServerIPV6": "#SERVER.IPV6#",
-    "CPU": "#SERVER.CPU#",
-    "MEM": "#SERVER.MEM#",
-    "SWAP": "#SERVER.SWAP#",
-    "DISK": "#SERVER.DISK#",
-    "NetInSpeed": "#SERVER.NETINSPEED#",
-    "NetOutSpeed": "#SERVER.NETOUTSPEED#",
-    "TransferIn": "#SERVER.TRANSFERIN#",
-    "TranferOut": "#SERVER.TRANSFEROUT#",
-    "Load1": "#SERVER.LOAD1#",
-    "Load5": "#SERVER.LOAD5#",
-    "Load15": "#SERVER.LOAD15#",
-    "TCP_CONN_COUNT": "#SERVER.TCPCONNCOUNT",  # invalid
-    "UDP_CONN_COUNT": "#SERVER.UDPCONNCOUNT",  # invalid
-}

This document is NOT available in English.

Group Bot Configuration Instructions - Document - WeChat Work Developer Center

  • Name: WeChat Work Group Bot
  • URL: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY
  • Request Method: POST
  • Request Type: JSON
  • Body:
    json
    {
    -    "msgtype": "markdown",
    -    "markdown": {
    -        "content": "# Nezha Notification\\n\\n\\"#NEZHA#\\"\\n\\n> Name: \\"#SERVER.NAME#\\"\\n> IP: \\"#SERVER.IP#\\"\\n> IPv4: \\"#SERVER.IPV4#\\"\\nIPv6: \\"#SERVER.IPV6#\\"\\n> CPU: \\"#SERVER.CPU#\\"\\n> Memory: \\"#SERVER.MEM#\\"\\n> Swap: \\"#SERVER.SWAP#\\"\\n> Disk: \\"#SERVER.DISK#\\"\\n> Upload Speed: \\"#SERVER.NETINSPEED#\\"\\n> Download Speed: \\"#SERVER.NETOUTSPEED#\\"\\n> Total Upload: \\"#SERVER.TRANSFERIN#\\"\\n> Total Download: \\"#SERVER.TRANSFEROUT#\\"\\n> Load1: \\"#SERVER.LOAD1#\\"\\n> Load5: \\"#SERVER.LOAD5#\\"\\n> Load15: \\"#SERVER.LOAD15#\\"\\n> TCP Connection Count: \\"#SERVER.TCPCONNCOUNT\\"\\n> UDP Connection Count: \\"#SERVER.UDPCONNCOUNT\\"\\n\\n"
    -    }
    -}

You can remove or add relevant information as needed.

Notification Rule Explanation

Basic Rules

  • type: You can choose one or more types. If multiple types are selected in one rule, all selected types must be satisfied to trigger a notification (refer to the examples below)
    • cpu, memory, swap, disk
    • net_in_speed inbound network speed, net_out_speed outbound network speed, net_all_speed total network speed, transfer_in inbound traffic, transfer_out outbound traffic, transfer_all total traffic
    • offline offline monitoring
    • load1, load5, load15 load
    • process_count process count (currently resource-intensive due to thread count, not supported temporarily)
    • tcp_conn_count, udp_conn_count connection count
  • duration: Duration in seconds. An notification is triggered if 30% or more of the samples exceed the threshold within this duration (to prevent data spikes).
  • min or max:
    • For traffic and network speed, the unit is bytes (1KB = 1024B, 1MB = 1024 * 1024B)
    • For memory, disk, and CPU, the unit is percentage
    • No need to set this for offline monitoring
  • cover:
    • 0 monitors all servers, use ignore to exclude specific servers
    • 1 ignores all servers, use ignore to monitor specific servers
      Example: [{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
  • ignore: Select specific servers to exclude, used with cover, content is server ID and boolean value, e.g., {"1": true, "2": false}

Complete Examples:

Add an offline notification:

  • Name: Offline Notification
  • Rule: [{"Type":"offline","Duration":10}]
  • Enabled: √

Add an notification for CPU usage exceeding 50% for 10 seconds and memory usage below 20% for 20 seconds:

  • Name: CPU+Memory
  • Rule: [{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
  • Enabled: √

Send notifications for specific servers to specific notification groups:

Scenario example:
There are 4 servers (1, 2, 3, 4) and two notification groups (A, B).
Notify group A if servers 1 and 2 are offline for 10 minutes.
Notify group B if servers 3 and 4 are offline for 10 minutes.

First, set up notification groups A and B, then add two notification rules:

Rule 1:

  • Name: 1, 2 Offline, Send to Notification Group A
  • Rule: [{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]
  • Notification Group: A
  • Enabled: √

Rule 2:

  • Name: 3, 4 Offline, Send to Notification Group B
  • Rule: [{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]
  • Notification Group: B
  • Enabled: √

Flexibly using parameters can make your notification function fully utilized

Special: Any Cycle Traffic notification

Can be used for monthly traffic monitoring

  • type:
    • transfer_in_cycle inbound traffic during the cycle
    • transfer_out_cycle outbound traffic during the cycle
    • transfer_all_cycle total traffic during the cycle
  • cycle_start: The start date of the statistical cycle (can be the start date of your server billing cycle). The time format is RFC3339, e.g., Beijing time is 2022-01-11T08:00:00.00+08:00
  • cycle_interval: The number of statistical cycle units (e.g., if the cycle unit is days, and this value is 7, it means statistics are collected every 7 days)
  • cycle_unit: Statistical cycle unit, default is hour, optional (hour, day, week, month, year)
  • min/max, cover, ignore refer to basic rule configuration

Example:

For servers with IDs 3 and 4 (defined in ignore), if the monthly outbound traffic exceeds 1TB starting from the 1st of each month, send an notification:

json
[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]

Notification Trigger Modes

  • Always Trigger: A notification is triggered every time the Agent reports a status that matches the notification rule.
  • Single Trigger: A notification is triggered only once when the status changes, such as from normal to abnormal or from abnormal to normal.

Set Tasks to Execute on notifications

If you need to execute a task while sending an notification message, you can set this item.

  • Task on Notification: The task to be executed when the notification status changes from "normal" to "event". The task should be set in the tasks page in advance.
  • Task on Recovery: The task to be executed when the notification status changes from "event" to "normal". The task should be set in the tasks page in advance.
`,44),l=[t];function p(r,c,i,u,D,y){return s(),a("div",null,l)}const C=o(n,[["render",p]]);export{F as __pageData,C as default}; diff --git a/assets/en_US_guide_notifications.md.0c956c41.lean.js b/assets/en_US_guide_notifications.md.0c956c41.lean.js deleted file mode 100644 index db6c2cc8..00000000 --- a/assets/en_US_guide_notifications.md.0c956c41.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o,o as s,c as a,R as e}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"Notification Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/notifications.md","filePath":"en_US/guide/notifications.md","lastUpdated":1718495592000}'),n={name:"en_US/guide/notifications.md"},t=e("",44),l=[t];function p(r,c,i,u,D,y){return s(),a("div",null,l)}const C=o(n,[["render",p]]);export{F as __pageData,C as default}; diff --git a/assets/en_US_guide_notifications.md.BFN9G5FT.js b/assets/en_US_guide_notifications.md.BFN9G5FT.js new file mode 100644 index 00000000..a6a6a33f --- /dev/null +++ b/assets/en_US_guide_notifications.md.BFN9G5FT.js @@ -0,0 +1,40 @@ +import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.BmdFiWrL.js";const E=JSON.parse('{"title":"Notification Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/notifications.md","filePath":"en_US/guide/notifications.md","lastUpdated":1719239024000}'),e={name:"en_US/guide/notifications.md"},n=a(`

Notification Configuration

Nezha Monitoring supports monitoring server load, CPU, memory, disk, traffic, monthly traffic, process count, and connection count, and sending notifications when user-defined thresholds are reached.

Flexible Notification Methods

  • In Dashboard messages, the placeholder #DATETIME# represents the timestamp of the event. When the notification is triggered, the Dashboard automatically replaces #DATETIME# with the actual event time.
  • #NEZHA# is a placeholder for Dashboard messages, and the Dashboard automatically replaces the placeholder with the actual message when the notification is triggered.
  • The body content is in JSON format: When the request type is FORM, the value is in key:value form, and placeholders can be placed inside value. The placeholders will be automatically replaced during notification. When the request type is JSON, only simple string replacement is performed before being submitted to the URL.
  • Placeholders can also be placed inside the URL, and simple string replacement will be performed during the request.

Refer to the following notification method examples, and you can also flexibly set the push method according to your needs.

Bark Example

Click to expand/collapse
  • Name: Bark

  • URL structure: /:key/:body or /:key/:title/:body or /:key/:category/:title/:body

  • Request Method: GET

  • Request Type: Default

  • Body: Empty

  • Name: Bark

  • URL structure: /push

  • Request Method: POST

  • Request Type: form

  • Body: {"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":"https://xxxxxxxx/nz.png"}

Slack Example Contributor: @白歌

Click to expand/collapse

URL Parameter Acquisition Instructions

Prepare your Slack Workspace in advance and create an App for this Workspace. If you have not created one, you can create an App at Slack API.

After creating the App, you need to add an Incoming Webhook to the App. In the App's settings page, find Incoming Webhooks, enable Activate Incoming Webhooks, and at the bottom of the page, find and click Add New Webhook to Workspace, choose a Channel, and click Allow. After creating, you will get a Webhook URL, which you will use to replace the example URL below.

Telegram Example Contributor: @白歌

Click to expand/collapse

URL Parameter Acquisition Instructions

Create a bot in Telegram and get the bot's token and your Telegram user ID.

The token and user ID are alphanumeric strings. You can get your user ID by chatting with @userinfobot on Telegram. Create a bot by chatting with @BotFather, and you will get the bot's token.

Replace botXXXXXX with your bot token and YYYYYY with your user ID in the URL below. Note that you need to chat with the bot first, otherwise the bot cannot send messages to you.

Email Notification Example - Outlook Contributor: @白歌

Click to expand/collapse

Note: SendCloud has a daily free email sending limit. This is just an example. You can choose a paid service or other similar free services. The usage method is similar.

URL Parameter Acquisition Instructions

This example uses SendCloud as the email service. You need to register an account on SendCloud, create a sender email, and then obtain the APIUSER and APIKEY here.

Replace <replaceAPIUSER> and <replaceAPIKEY> in the example URL below with your APIUSER and APIKEY, and replace <customSenderEmail> and <customRecipientEmail> with any sender and recipient email addresses.

  • Name: MS Mail Notification
  • URL:https://graph.microsoft.com/v1.0/me/microsoft.graph.sendMail
  • Request method: POST
  • Request type: JSON
  • Header: {"Content-type":"application/json", "Authorization":"Bearer {Token}"}
  • Body:
    json
    {
    +  "message": {
    +      "subject": "Server Status Notification",
    +      "body": {
    +      "contentType": "Text",
    +      "content": "#NEZHA#"
    +      },
    +      "toRecipients": [
    +        {
    +          "emailAddress": {
    +              "address": "ADDRESS FOR RECEVING EMAILS"
    +              }
    +        }
    +      ]
    +  }
    +}

DingTalk Group Bot Configuration Example

Click to expand/collapse

URL Parameter Acquisition Instructions

Create a bot in DingTalk in advance and get the bot's token.

The bot URL is obtained after creating a bot in the DingTalk group - Manage Bot - Create Bot. Choose custom keywords for the security method, and the Body content value must contain these keywords.

WeChat Work Group Bot Example Contributor: @ChowRex

Click to expand/collapse

Supported placeholders list

json
{
+    "content": "#NEZHA#",
+    "ServerName": "#SERVER.NAME#",
+    "ServerIP": "#SERVER.IP#",
+    "ServerIPV4": "#SERVER.IPV4#",
+    "ServerIPV6": "#SERVER.IPV6#",
+    "CPU": "#SERVER.CPU#",
+    "MEM": "#SERVER.MEM#",
+    "SWAP": "#SERVER.SWAP#",
+    "DISK": "#SERVER.DISK#",
+    "NetInSpeed": "#SERVER.NETINSPEED#",
+    "NetOutSpeed": "#SERVER.NETOUTSPEED#",
+    "TransferIn": "#SERVER.TRANSFERIN#",
+    "TranferOut": "#SERVER.TRANSFEROUT#",
+    "Load1": "#SERVER.LOAD1#",
+    "Load5": "#SERVER.LOAD5#",
+    "Load15": "#SERVER.LOAD15#",
+    "TCP_CONN_COUNT": "#SERVER.TCPCONNCOUNT",  # invalid
+    "UDP_CONN_COUNT": "#SERVER.UDPCONNCOUNT",  # invalid
+}

This document is NOT available in English.

Group Bot Configuration Instructions - Document - WeChat Work Developer Center

  • Name: WeChat Work Group Bot
  • URL: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY
  • Request Method: POST
  • Request Type: JSON
  • Body:
    json
    {
    +    "msgtype": "markdown",
    +    "markdown": {
    +        "content": "# Nezha Notification\\n\\n\\"#NEZHA#\\"\\n\\n> Name: \\"#SERVER.NAME#\\"\\n> IP: \\"#SERVER.IP#\\"\\n> IPv4: \\"#SERVER.IPV4#\\"\\nIPv6: \\"#SERVER.IPV6#\\"\\n> CPU: \\"#SERVER.CPU#\\"\\n> Memory: \\"#SERVER.MEM#\\"\\n> Swap: \\"#SERVER.SWAP#\\"\\n> Disk: \\"#SERVER.DISK#\\"\\n> Upload Speed: \\"#SERVER.NETINSPEED#\\"\\n> Download Speed: \\"#SERVER.NETOUTSPEED#\\"\\n> Total Upload: \\"#SERVER.TRANSFERIN#\\"\\n> Total Download: \\"#SERVER.TRANSFEROUT#\\"\\n> Load1: \\"#SERVER.LOAD1#\\"\\n> Load5: \\"#SERVER.LOAD5#\\"\\n> Load15: \\"#SERVER.LOAD15#\\"\\n> TCP Connection Count: \\"#SERVER.TCPCONNCOUNT\\"\\n> UDP Connection Count: \\"#SERVER.UDPCONNCOUNT\\"\\n\\n"
    +    }
    +}

You can remove or add relevant information as needed.

Notification Rule Explanation

Basic Rules

  • type: You can choose one or more types. If multiple types are selected in one rule, all selected types must be satisfied to trigger a notification (refer to the examples below)
    • cpu, memory, swap, disk
    • net_in_speed inbound network speed, net_out_speed outbound network speed, net_all_speed total network speed, transfer_in inbound traffic, transfer_out outbound traffic, transfer_all total traffic
    • offline offline monitoring
    • load1, load5, load15 load
    • process_count process count (currently resource-intensive due to thread count, not supported temporarily)
    • tcp_conn_count, udp_conn_count connection count
  • duration: Duration in seconds. An notification is triggered if 30% or more of the samples exceed the threshold within this duration (to prevent data spikes).
  • min or max:
    • For traffic and network speed, the unit is bytes (1KB = 1024B, 1MB = 1024 * 1024B)
    • For memory, disk, and CPU, the unit is percentage
    • No need to set this for offline monitoring
  • cover:
    • 0 monitors all servers, use ignore to exclude specific servers
    • 1 ignores all servers, use ignore to monitor specific servers
      Example: [{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
  • ignore: Select specific servers to exclude, used with cover, content is server ID and boolean value, e.g., {"1": true, "2": false}

Complete Examples:

Add an offline notification:

  • Name: Offline Notification
  • Rule: [{"Type":"offline","Duration":10}]
  • Enabled: √

Add an notification for CPU usage exceeding 50% for 10 seconds and memory usage below 20% for 20 seconds:

  • Name: CPU+Memory
  • Rule: [{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
  • Enabled: √

Send notifications for specific servers to specific notification groups:

Scenario example:
There are 4 servers (1, 2, 3, 4) and two notification groups (A, B).
Notify group A if servers 1 and 2 are offline for 10 minutes.
Notify group B if servers 3 and 4 are offline for 10 minutes.

First, set up notification groups A and B, then add two notification rules:

Rule 1:

  • Name: 1, 2 Offline, Send to Notification Group A
  • Rule: [{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]
  • Notification Group: A
  • Enabled: √

Rule 2:

  • Name: 3, 4 Offline, Send to Notification Group B
  • Rule: [{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]
  • Notification Group: B
  • Enabled: √

Flexibly using parameters can make your notification function fully utilized

Special: Any Cycle Traffic notification

Can be used for monthly traffic monitoring

  • type:
    • transfer_in_cycle inbound traffic during the cycle
    • transfer_out_cycle outbound traffic during the cycle
    • transfer_all_cycle total traffic during the cycle
  • cycle_start: The start date of the statistical cycle (can be the start date of your server billing cycle). The time format is RFC3339, e.g., Beijing time is 2022-01-11T08:00:00.00+08:00
  • cycle_interval: The number of statistical cycle units (e.g., if the cycle unit is days, and this value is 7, it means statistics are collected every 7 days)
  • cycle_unit: Statistical cycle unit, default is hour, optional (hour, day, week, month, year)
  • min/max, cover, ignore refer to basic rule configuration

Example:

For servers with IDs 3 and 4 (defined in ignore), if the monthly outbound traffic exceeds 1TB starting from the 1st of each month, send an notification:

json
[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]

Notification Trigger Modes

  • Always Trigger: A notification is triggered every time the Agent reports a status that matches the notification rule.
  • Single Trigger: A notification is triggered only once when the status changes, such as from normal to abnormal or from abnormal to normal.

Set Tasks to Execute on notifications

If you need to execute a task while sending an notification message, you can set this item.

  • Task on Notification: The task to be executed when the notification status changes from "normal" to "event". The task should be set in the tasks page in advance.
  • Task on Recovery: The task to be executed when the notification status changes from "event" to "normal". The task should be set in the tasks page in advance.
`,44),o=[n];function l(h,r,p,k,d,u){return t(),s("div",null,o)}const g=i(e,[["render",l]]);export{E as __pageData,g as default}; diff --git a/assets/en_US_guide_notifications.md.BFN9G5FT.lean.js b/assets/en_US_guide_notifications.md.BFN9G5FT.lean.js new file mode 100644 index 00000000..96149235 --- /dev/null +++ b/assets/en_US_guide_notifications.md.BFN9G5FT.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,o as t,a4 as a}from"./chunks/framework.BmdFiWrL.js";const E=JSON.parse('{"title":"Notification Configuration","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/notifications.md","filePath":"en_US/guide/notifications.md","lastUpdated":1719239024000}'),e={name:"en_US/guide/notifications.md"},n=a("",44),o=[n];function l(h,r,p,k,d,u){return t(),s("div",null,o)}const g=i(e,[["render",l]]);export{E as __pageData,g as default}; diff --git a/assets/en_US_guide_q2.md.BPMhVFbw.js b/assets/en_US_guide_q2.md.BPMhVFbw.js new file mode 100644 index 00000000..72a4eb29 --- /dev/null +++ b/assets/en_US_guide_q2.md.BPMhVFbw.js @@ -0,0 +1 @@ +import{_ as e,c as t,o,a4 as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Agent Startup/Online Troubleshooting Process","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q2.md","filePath":"en_US/guide/q2.md","lastUpdated":1719239024000}'),r={name:"en_US/guide/q2.md"},a=n('

Agent Startup/Online Troubleshooting Process

  1. Directly execute /opt/nezha/agent/nezha-agent -s DashboardIP or non-CDN domain:RPCPort -p AgentKey -d to check if the logs indicate timeouts due to DNS or poor network conditions.
  2. Use nc -v Domain/IP RPCPort or telnet Domain/IP RPCPort to check for network issues, inspect the inbound and outbound firewalls of the local machine and the panel server. If you cannot determine the issue, you can use the port checking tool provided by https://port.ping.pe/.
  3. If the above steps indicate no issues but the Agent still does not go online correctly, try disabling SELinux. How to disable SELinux?
',2),s=[a];function i(c,l,d,h,p,u){return o(),t("div",null,s)}const f=e(r,[["render",i]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_guide_q2.md.BPMhVFbw.lean.js b/assets/en_US_guide_q2.md.BPMhVFbw.lean.js new file mode 100644 index 00000000..b264f042 --- /dev/null +++ b/assets/en_US_guide_q2.md.BPMhVFbw.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o,a4 as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Agent Startup/Online Troubleshooting Process","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q2.md","filePath":"en_US/guide/q2.md","lastUpdated":1719239024000}'),r={name:"en_US/guide/q2.md"},a=n("",2),s=[a];function i(c,l,d,h,p,u){return o(),t("div",null,s)}const f=e(r,[["render",i]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_guide_q2.md.ba9d6542.js b/assets/en_US_guide_q2.md.ba9d6542.js deleted file mode 100644 index a5d23ab5..00000000 --- a/assets/en_US_guide_q2.md.ba9d6542.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as o,R as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Agent Startup/Online Troubleshooting Process","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q2.md","filePath":"en_US/guide/q2.md","lastUpdated":1718495592000}'),r={name:"en_US/guide/q2.md"},a=n('

Agent Startup/Online Troubleshooting Process

  1. Directly execute /opt/nezha/agent/nezha-agent -s DashboardIP or non-CDN domain:RPCPort -p AgentKey -d to check if the logs indicate timeouts due to DNS or poor network conditions.
  2. Use nc -v Domain/IP RPCPort or telnet Domain/IP RPCPort to check for network issues, inspect the inbound and outbound firewalls of the local machine and the panel server. If you cannot determine the issue, you can use the port checking tool provided by https://port.ping.pe/.
  3. If the above steps indicate no issues but the Agent still does not go online correctly, try disabling SELinux. How to disable SELinux?
',2),s=[a];function i(c,l,d,h,p,u){return t(),o("div",null,s)}const f=e(r,[["render",i]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_guide_q2.md.ba9d6542.lean.js b/assets/en_US_guide_q2.md.ba9d6542.lean.js deleted file mode 100644 index 6dd80e11..00000000 --- a/assets/en_US_guide_q2.md.ba9d6542.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as o,R as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Agent Startup/Online Troubleshooting Process","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q2.md","filePath":"en_US/guide/q2.md","lastUpdated":1718495592000}'),r={name:"en_US/guide/q2.md"},a=n("",2),s=[a];function i(c,l,d,h,p,u){return t(),o("div",null,s)}const f=e(r,[["render",i]]);export{g as __pageData,f as default}; diff --git a/assets/en_US_guide_q3.md.636a4fb5.js b/assets/en_US_guide_q3.md.636a4fb5.js deleted file mode 100644 index 1b8da428..00000000 --- a/assets/en_US_guide_q3.md.636a4fb5.js +++ /dev/null @@ -1,74 +0,0 @@ -import{_ as s,o as n,c as a,R as o}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"Reverse Proxy gRPC Port (Supports Cloudflare CDN)","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q3.md","filePath":"en_US/guide/q3.md","lastUpdated":1718495592000}'),l={name:"en_US/guide/q3.md"},p=o(`

Reverse Proxy gRPC Port (Supports Cloudflare CDN)

Using Nginx or Caddy to reverse proxy gRPC

  • Nginx Configuration
nginx
server {
-    listen 443 ssl http2;
-    listen [::]:443 ssl http2;
-    server_name data.example.com; # Your domain that the Agent uses to connect to the Dashboard
-
-    ssl_certificate          /data/letsencrypt/fullchain.pem; # Path to your domain certificate
-    ssl_certificate_key      /data/letsencrypt/key.pem;       # Path to your domain private key
-    ssl_stapling on;
-    ssl_session_timeout 1d;
-    ssl_session_cache shared:SSL:10m; # This might conflict with other configuration files; comment it out if there are conflicts
-    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
-
-    underscores_in_headers on;
-
-    keepalive_time 24h;
-    keepalive_requests 100000;
-    keepalive_timeout 120s;
-
-    location / {
-        grpc_read_timeout 300s;
-        grpc_send_timeout 300s;
-        grpc_socket_keepalive on;
-        grpc_pass grpc://grpcservers;
-    }
-}
-
-upstream grpcservers {
-    server localhost:5555;
-    keepalive 512;
-}
  • Caddy Configuration
data.example.com:443 { # Your domain that the Agent uses to connect to the Dashboard
-    reverse_proxy {
-        to localhost:5555
-        transport http {
-            versions h2c 2
-        }
-    }
-}

Dashboard Configuration

  • First, log in to the Dashboard and go to the settings page. In the Non-CDN Dashboard server domain/IP field, enter the domain configured in Nginx or Caddy in the previous step, for example, data.example.com, and save it.
  • Then, on the Dashboard server, open the /opt/nezha/dashboard/data/config.yaml file. Modify proxygrpcport to the port that Nginx or Caddy is listening to, for example, 443. Since we enabled SSL/TLS in Nginx or Caddy, set tls to true. After making these changes, restart the Dashboard.

Agent Configuration

  • Log in to the Dashboard management backend, copy the one-click installation command, and execute it on the corresponding server to reinstall the agent.

Enabling Cloudflare CDN (Optional)

According to Cloudflare gRPC requirements: gRPC services must listen on port 443 and must support TLS and HTTP/2. So, to enable CDN, you must use port 443 when configuring Nginx or Caddy to reverse proxy gRPC and configure the certificate (Caddy will automatically apply and configure the certificate).

  • Log in to Cloudflare, select the domain you are using. Go to the Network tab and turn on the gRPC switch. Then, go to the DNS tab, find the DNS record for the domain configured in Nginx or Caddy to reverse proxy gRPC, and enable the CDN by clicking the orange cloud.

After enabling gRPC, it might not be available immediately, and you may need to wait for a while. You can use curl and nezha-agent -d to verify:

bash
localhost:~/agent# curl -H "content-type: application/grpc+proto" -H "authorization: Bearer test" https://xxx.xxx.ovh -v 
-* processing: https://xxx.xxx.ovh
-*   Trying [2606:4700:3035::ac43:8bed]:443...
-* Connected to xxx.xxx.ovh (2606:4700:3035::ac43:8bed) port 443
-# ... SSL info
-* using HTTP/2
-* h2 [:method: GET]
-* h2 [:scheme: https]
-* h2 [:authority: xxx.xxx.ovh]
-* h2 [:path: /]
-* h2 [user-agent: curl/8.2.1]
-* h2 [accept: */*]
-* Using Stream ID: 1
-> GET / HTTP/2
-> Host: xxx.xxx.ovh
-> User-Agent: curl/8.4.0
-> Accept: */*
-> content-type: application/grpc+proto
-> authorization: Bearer test
-> 
-< HTTP/2 405 
-< date: Wed, 20 Dec 2023 08:56:27 GMT
-< content-type: application/grpc+proto
-< cf-ray: 8386ac12dabd5ddc-HKG
-< cf-cache-status: DYNAMIC
-< grpc-message: Received a HEADERS frame with :method "GET" which should be POST
-< grpc-status: 13
-< report-to: {"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=%2BTjgJvXWyRF11nUOYx9Lq7UDC1xOYBLtjvWrdjVJQIqu9YqnFJeZFran2KRs6zabQc%2BLV8AubNqYRYDb7hQAZe6bglmVz0wQjrb0tNovYf%2B59SAp%2BQfZnH%2BAFDydNT95ZCmTPnKgWetcwQiUfXU%3D"}],"group":"cf-nel","max_age":604800}
-< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
-< vary: Accept-Encoding
-< server: cloudflare
-< alt-svc: h3=":443"; ma=86400
-< 
-* Connection #0 to host xxx.xxx.ovh left intact
-localhost:~/agent# /opt/nezha/agent/nezha-agent -s nezha.xxx.xxx:443 -p YOUR_KEY --tls -d
-NEZHA@2023-12-20 05:14:00>> 检查更新: 0.15.14
-NEZHA@2023-12-20 05:14:01>> 上报系统信息失败: rpc error: code = Unknown desc = EOF # You need to modify the GRPCHost and TLS options in the Dashboard /opt/nezha/dashboard/data/config.yaml
-NEZHA@2023-12-20 05:14:01>> Error to close connection ...
`,15),e=[p];function t(c,r,D,C,y,i){return n(),a("div",null,e)}const d=s(l,[["render",t]]);export{A as __pageData,d as default}; diff --git a/assets/en_US_guide_q3.md.636a4fb5.lean.js b/assets/en_US_guide_q3.md.636a4fb5.lean.js deleted file mode 100644 index 6de1c0b7..00000000 --- a/assets/en_US_guide_q3.md.636a4fb5.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as n,c as a,R as o}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"Reverse Proxy gRPC Port (Supports Cloudflare CDN)","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q3.md","filePath":"en_US/guide/q3.md","lastUpdated":1718495592000}'),l={name:"en_US/guide/q3.md"},p=o("",15),e=[p];function t(c,r,D,C,y,i){return n(),a("div",null,e)}const d=s(l,[["render",t]]);export{A as __pageData,d as default}; diff --git a/assets/en_US_guide_q3.md.CC66i-vY.js b/assets/en_US_guide_q3.md.CC66i-vY.js new file mode 100644 index 00000000..cc9066fc --- /dev/null +++ b/assets/en_US_guide_q3.md.CC66i-vY.js @@ -0,0 +1,74 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const E=JSON.parse('{"title":"Reverse Proxy gRPC Port (Supports Cloudflare CDN)","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q3.md","filePath":"en_US/guide/q3.md","lastUpdated":1719239024000}'),t={name:"en_US/guide/q3.md"},l=n(`

Reverse Proxy gRPC Port (Supports Cloudflare CDN)

Using Nginx or Caddy to reverse proxy gRPC

  • Nginx Configuration
nginx
server {
+    listen 443 ssl http2;
+    listen [::]:443 ssl http2;
+    server_name data.example.com; # Your domain that the Agent uses to connect to the Dashboard
+
+    ssl_certificate          /data/letsencrypt/fullchain.pem; # Path to your domain certificate
+    ssl_certificate_key      /data/letsencrypt/key.pem;       # Path to your domain private key
+    ssl_stapling on;
+    ssl_session_timeout 1d;
+    ssl_session_cache shared:SSL:10m; # This might conflict with other configuration files; comment it out if there are conflicts
+    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
+
+    underscores_in_headers on;
+
+    keepalive_time 24h;
+    keepalive_requests 100000;
+    keepalive_timeout 120s;
+
+    location / {
+        grpc_read_timeout 300s;
+        grpc_send_timeout 300s;
+        grpc_socket_keepalive on;
+        grpc_pass grpc://grpcservers;
+    }
+}
+
+upstream grpcservers {
+    server localhost:5555;
+    keepalive 512;
+}
  • Caddy Configuration
data.example.com:443 { # Your domain that the Agent uses to connect to the Dashboard
+    reverse_proxy {
+        to localhost:5555
+        transport http {
+            versions h2c 2
+        }
+    }
+}

Dashboard Configuration

  • First, log in to the Dashboard and go to the settings page. In the Non-CDN Dashboard server domain/IP field, enter the domain configured in Nginx or Caddy in the previous step, for example, data.example.com, and save it.
  • Then, on the Dashboard server, open the /opt/nezha/dashboard/data/config.yaml file. Modify proxygrpcport to the port that Nginx or Caddy is listening to, for example, 443. Since we enabled SSL/TLS in Nginx or Caddy, set tls to true. After making these changes, restart the Dashboard.

Agent Configuration

  • Log in to the Dashboard management backend, copy the one-click installation command, and execute it on the corresponding server to reinstall the agent.

Enabling Cloudflare CDN (Optional)

According to Cloudflare gRPC requirements: gRPC services must listen on port 443 and must support TLS and HTTP/2. So, to enable CDN, you must use port 443 when configuring Nginx or Caddy to reverse proxy gRPC and configure the certificate (Caddy will automatically apply and configure the certificate).

  • Log in to Cloudflare, select the domain you are using. Go to the Network tab and turn on the gRPC switch. Then, go to the DNS tab, find the DNS record for the domain configured in Nginx or Caddy to reverse proxy gRPC, and enable the CDN by clicking the orange cloud.

After enabling gRPC, it might not be available immediately, and you may need to wait for a while. You can use curl and nezha-agent -d to verify:

bash
localhost:~/agent# curl -H "content-type: application/grpc+proto" -H "authorization: Bearer test" https://xxx.xxx.ovh -v 
+* processing: https://xxx.xxx.ovh
+*   Trying [2606:4700:3035::ac43:8bed]:443...
+* Connected to xxx.xxx.ovh (2606:4700:3035::ac43:8bed) port 443
+# ... SSL info
+* using HTTP/2
+* h2 [:method: GET]
+* h2 [:scheme: https]
+* h2 [:authority: xxx.xxx.ovh]
+* h2 [:path: /]
+* h2 [user-agent: curl/8.2.1]
+* h2 [accept: */*]
+* Using Stream ID: 1
+> GET / HTTP/2
+> Host: xxx.xxx.ovh
+> User-Agent: curl/8.4.0
+> Accept: */*
+> content-type: application/grpc+proto
+> authorization: Bearer test
+> 
+< HTTP/2 405 
+< date: Wed, 20 Dec 2023 08:56:27 GMT
+< content-type: application/grpc+proto
+< cf-ray: 8386ac12dabd5ddc-HKG
+< cf-cache-status: DYNAMIC
+< grpc-message: Received a HEADERS frame with :method "GET" which should be POST
+< grpc-status: 13
+< report-to: {"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=%2BTjgJvXWyRF11nUOYx9Lq7UDC1xOYBLtjvWrdjVJQIqu9YqnFJeZFran2KRs6zabQc%2BLV8AubNqYRYDb7hQAZe6bglmVz0wQjrb0tNovYf%2B59SAp%2BQfZnH%2BAFDydNT95ZCmTPnKgWetcwQiUfXU%3D"}],"group":"cf-nel","max_age":604800}
+< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
+< vary: Accept-Encoding
+< server: cloudflare
+< alt-svc: h3=":443"; ma=86400
+< 
+* Connection #0 to host xxx.xxx.ovh left intact
+localhost:~/agent# /opt/nezha/agent/nezha-agent -s nezha.xxx.xxx:443 -p YOUR_KEY --tls -d
+NEZHA@2023-12-20 05:14:00>> 检查更新: 0.15.14
+NEZHA@2023-12-20 05:14:01>> 上报系统信息失败: rpc error: code = Unknown desc = EOF # You need to modify the GRPCHost and TLS options in the Dashboard /opt/nezha/dashboard/data/config.yaml
+NEZHA@2023-12-20 05:14:01>> Error to close connection ...
`,15),p=[l];function e(h,k,r,d,o,g){return a(),i("div",null,p)}const y=s(t,[["render",e]]);export{E as __pageData,y as default}; diff --git a/assets/en_US_guide_q3.md.CC66i-vY.lean.js b/assets/en_US_guide_q3.md.CC66i-vY.lean.js new file mode 100644 index 00000000..cf01b1b8 --- /dev/null +++ b/assets/en_US_guide_q3.md.CC66i-vY.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const E=JSON.parse('{"title":"Reverse Proxy gRPC Port (Supports Cloudflare CDN)","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q3.md","filePath":"en_US/guide/q3.md","lastUpdated":1719239024000}'),t={name:"en_US/guide/q3.md"},l=n("",15),p=[l];function e(h,k,r,d,o,g){return a(),i("div",null,p)}const y=s(t,[["render",e]]);export{E as __pageData,y as default}; diff --git a/assets/en_US_guide_q4.md.688e36aa.js b/assets/en_US_guide_q4.md.688e36aa.js deleted file mode 100644 index 65dff7e6..00000000 --- a/assets/en_US_guide_q4.md.688e36aa.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as i,c as o,z as e,a as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Real-Time Channel Disconnection/Online Terminal Connection Failure","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q4.md","filePath":"en_US/guide/q4.md","lastUpdated":1718495592000}'),t={name:"en_US/guide/q4.md"},r=e("h1",{id:"real-time-channel-disconnection-online-terminal-connection-failure",tabindex:"-1"},[n("Real-Time Channel Disconnection/Online Terminal Connection Failure "),e("a",{class:"header-anchor",href:"#real-time-channel-disconnection-online-terminal-connection-failure","aria-label":'Permalink to "Real-Time Channel Disconnection/Online Terminal Connection Failure"'},"​")],-1),l=e("ul",null,[e("li",null,"If you are using a CDN, ensure that the CDN provider offers WebSocket services and that WebSocket is enabled."),e("li",null,[n("Confirm that your reverse proxy rules have special configurations for the "),e("code",null,"/ws"),n(" and "),e("code",null,"/terminal"),n(" paths. You can "),e("a",{href:"/en_US/guide/dashboard.html#configure-reverse-proxy"},"click here"),n(" to view the reverse proxy configuration.")])],-1),c=[r,l];function s(d,u,h,m,_,f){return i(),o("div",null,c)}const v=a(t,[["render",s]]);export{g as __pageData,v as default}; diff --git a/assets/en_US_guide_q4.md.688e36aa.lean.js b/assets/en_US_guide_q4.md.688e36aa.lean.js deleted file mode 100644 index 65dff7e6..00000000 --- a/assets/en_US_guide_q4.md.688e36aa.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as i,c as o,z as e,a as n}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Real-Time Channel Disconnection/Online Terminal Connection Failure","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q4.md","filePath":"en_US/guide/q4.md","lastUpdated":1718495592000}'),t={name:"en_US/guide/q4.md"},r=e("h1",{id:"real-time-channel-disconnection-online-terminal-connection-failure",tabindex:"-1"},[n("Real-Time Channel Disconnection/Online Terminal Connection Failure "),e("a",{class:"header-anchor",href:"#real-time-channel-disconnection-online-terminal-connection-failure","aria-label":'Permalink to "Real-Time Channel Disconnection/Online Terminal Connection Failure"'},"​")],-1),l=e("ul",null,[e("li",null,"If you are using a CDN, ensure that the CDN provider offers WebSocket services and that WebSocket is enabled."),e("li",null,[n("Confirm that your reverse proxy rules have special configurations for the "),e("code",null,"/ws"),n(" and "),e("code",null,"/terminal"),n(" paths. You can "),e("a",{href:"/en_US/guide/dashboard.html#configure-reverse-proxy"},"click here"),n(" to view the reverse proxy configuration.")])],-1),c=[r,l];function s(d,u,h,m,_,f){return i(),o("div",null,c)}const v=a(t,[["render",s]]);export{g as __pageData,v as default}; diff --git a/assets/en_US_guide_q4.md.CMem165Z.js b/assets/en_US_guide_q4.md.CMem165Z.js new file mode 100644 index 00000000..d1b8273f --- /dev/null +++ b/assets/en_US_guide_q4.md.CMem165Z.js @@ -0,0 +1 @@ +import{_ as a,c as i,o,j as e,a as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Real-Time Channel Disconnection/Online Terminal Connection Failure","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q4.md","filePath":"en_US/guide/q4.md","lastUpdated":1719239024000}'),t={name:"en_US/guide/q4.md"},r=e("h1",{id:"real-time-channel-disconnection-online-terminal-connection-failure",tabindex:"-1"},[n("Real-Time Channel Disconnection/Online Terminal Connection Failure "),e("a",{class:"header-anchor",href:"#real-time-channel-disconnection-online-terminal-connection-failure","aria-label":'Permalink to "Real-Time Channel Disconnection/Online Terminal Connection Failure"'},"​")],-1),l=e("ul",null,[e("li",null,"If you are using a CDN, ensure that the CDN provider offers WebSocket services and that WebSocket is enabled."),e("li",null,[n("Confirm that your reverse proxy rules have special configurations for the "),e("code",null,"/ws"),n(" and "),e("code",null,"/terminal"),n(" paths. You can "),e("a",{href:"/en_US/guide/dashboard.html#configure-reverse-proxy"},"click here"),n(" to view the reverse proxy configuration.")])],-1),c=[r,l];function s(d,u,h,m,_,f){return o(),i("div",null,c)}const v=a(t,[["render",s]]);export{g as __pageData,v as default}; diff --git a/assets/en_US_guide_q4.md.CMem165Z.lean.js b/assets/en_US_guide_q4.md.CMem165Z.lean.js new file mode 100644 index 00000000..d1b8273f --- /dev/null +++ b/assets/en_US_guide_q4.md.CMem165Z.lean.js @@ -0,0 +1 @@ +import{_ as a,c as i,o,j as e,a as n}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Real-Time Channel Disconnection/Online Terminal Connection Failure","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q4.md","filePath":"en_US/guide/q4.md","lastUpdated":1719239024000}'),t={name:"en_US/guide/q4.md"},r=e("h1",{id:"real-time-channel-disconnection-online-terminal-connection-failure",tabindex:"-1"},[n("Real-Time Channel Disconnection/Online Terminal Connection Failure "),e("a",{class:"header-anchor",href:"#real-time-channel-disconnection-online-terminal-connection-failure","aria-label":'Permalink to "Real-Time Channel Disconnection/Online Terminal Connection Failure"'},"​")],-1),l=e("ul",null,[e("li",null,"If you are using a CDN, ensure that the CDN provider offers WebSocket services and that WebSocket is enabled."),e("li",null,[n("Confirm that your reverse proxy rules have special configurations for the "),e("code",null,"/ws"),n(" and "),e("code",null,"/terminal"),n(" paths. You can "),e("a",{href:"/en_US/guide/dashboard.html#configure-reverse-proxy"},"click here"),n(" to view the reverse proxy configuration.")])],-1),c=[r,l];function s(d,u,h,m,_,f){return o(),i("div",null,c)}const v=a(t,[["render",s]]);export{g as __pageData,v as default}; diff --git a/assets/en_US_guide_q5.md.060bf29f.js b/assets/en_US_guide_q5.md.060bf29f.js deleted file mode 100644 index 8b3c2168..00000000 --- a/assets/en_US_guide_q5.md.060bf29f.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"How to Perform Data Migration and Backup Recovery?","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q5.md","filePath":"en_US/guide/q5.md","lastUpdated":1718495592000}'),r={name:"en_US/guide/q5.md"},n=t('

How to Perform Data Migration and Backup Recovery?

  1. Run the one-click script and choose Stop Dashboard.
  2. On the old server, package the /opt/nezha folder, copy it to the same location in the new environment, and extract it.
  3. In the new server, run the one-click script and choose Start Dashboard.
',2),c=[n];function i(d,s,_,l,h,p){return o(),a("div",null,c)}const f=e(r,[["render",i]]);export{u as __pageData,f as default}; diff --git a/assets/en_US_guide_q5.md.060bf29f.lean.js b/assets/en_US_guide_q5.md.060bf29f.lean.js deleted file mode 100644 index 5d011dbc..00000000 --- a/assets/en_US_guide_q5.md.060bf29f.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"How to Perform Data Migration and Backup Recovery?","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q5.md","filePath":"en_US/guide/q5.md","lastUpdated":1718495592000}'),r={name:"en_US/guide/q5.md"},n=t("",2),c=[n];function i(d,s,_,l,h,p){return o(),a("div",null,c)}const f=e(r,[["render",i]]);export{u as __pageData,f as default}; diff --git a/assets/en_US_guide_q5.md.RcBGWcbM.js b/assets/en_US_guide_q5.md.RcBGWcbM.js new file mode 100644 index 00000000..9d5864e3 --- /dev/null +++ b/assets/en_US_guide_q5.md.RcBGWcbM.js @@ -0,0 +1 @@ +import{_ as e,c as o,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"How to Perform Data Migration and Backup Recovery?","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q5.md","filePath":"en_US/guide/q5.md","lastUpdated":1719239024000}'),r={name:"en_US/guide/q5.md"},n=t('

How to Perform Data Migration and Backup Recovery?

  1. Run the one-click script and choose Stop Dashboard.
  2. On the old server, package the /opt/nezha folder, copy it to the same location in the new environment, and extract it.
  3. In the new server, run the one-click script and choose Start Dashboard.
',2),c=[n];function i(d,s,_,l,h,p){return a(),o("div",null,c)}const f=e(r,[["render",i]]);export{u as __pageData,f as default}; diff --git a/assets/en_US_guide_q5.md.RcBGWcbM.lean.js b/assets/en_US_guide_q5.md.RcBGWcbM.lean.js new file mode 100644 index 00000000..c019a4eb --- /dev/null +++ b/assets/en_US_guide_q5.md.RcBGWcbM.lean.js @@ -0,0 +1 @@ +import{_ as e,c as o,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"How to Perform Data Migration and Backup Recovery?","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q5.md","filePath":"en_US/guide/q5.md","lastUpdated":1719239024000}'),r={name:"en_US/guide/q5.md"},n=t("",2),c=[n];function i(d,s,_,l,h,p){return a(),o("div",null,c)}const f=e(r,[["render",i]]);export{u as __pageData,f as default}; diff --git a/assets/en_US_guide_q6.md.2b98fb0c.js b/assets/en_US_guide_q6.md.2b98fb0c.js deleted file mode 100644 index 5630757b..00000000 --- a/assets/en_US_guide_q6.md.2b98fb0c.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,o as e,c as o,R as i}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"How to Reset Traffic Statistics Monthly?","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q6.md","filePath":"en_US/guide/q6.md","lastUpdated":1718495592000}'),a={name:"en_US/guide/q6.md"},s=i('

How to Reset Traffic Statistics Monthly?

The traffic statistics on the homepage reset every time the server restarts. To achieve a monthly reset of the traffic counter, you can do the following:

  1. Go to the Notification page in the management panel.
  2. Refer to this document to create a monthly traffic notification.
  3. Return to the homepage and go to the Services page, where you can see the monthly traffic statistics. The statistics here will not reset when the server restarts.

TIP

This method allows you to set any period, including but not limited to hourly, daily, weekly, monthly, or yearly traffic statistics reset, offering great flexibility!

',4),c=[s];function r(n,l,h,f,d,_){return e(),o("div",null,c)}const u=t(a,[["render",r]]);export{p as __pageData,u as default}; diff --git a/assets/en_US_guide_q6.md.2b98fb0c.lean.js b/assets/en_US_guide_q6.md.2b98fb0c.lean.js deleted file mode 100644 index f6901d17..00000000 --- a/assets/en_US_guide_q6.md.2b98fb0c.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,o as e,c as o,R as i}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"How to Reset Traffic Statistics Monthly?","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q6.md","filePath":"en_US/guide/q6.md","lastUpdated":1718495592000}'),a={name:"en_US/guide/q6.md"},s=i("",4),c=[s];function r(n,l,h,f,d,_){return e(),o("div",null,c)}const u=t(a,[["render",r]]);export{p as __pageData,u as default}; diff --git a/assets/en_US_guide_q6.md.CYZ4lxRg.js b/assets/en_US_guide_q6.md.CYZ4lxRg.js new file mode 100644 index 00000000..5c28747b --- /dev/null +++ b/assets/en_US_guide_q6.md.CYZ4lxRg.js @@ -0,0 +1 @@ +import{_ as t,c as e,o,a4 as i}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"How to Reset Traffic Statistics Monthly?","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q6.md","filePath":"en_US/guide/q6.md","lastUpdated":1719239024000}'),a={name:"en_US/guide/q6.md"},s=i('

How to Reset Traffic Statistics Monthly?

The traffic statistics on the homepage reset every time the server restarts. To achieve a monthly reset of the traffic counter, you can do the following:

  1. Go to the Notification page in the management panel.
  2. Refer to this document to create a monthly traffic notification.
  3. Return to the homepage and go to the Services page, where you can see the monthly traffic statistics. The statistics here will not reset when the server restarts.

TIP

This method allows you to set any period, including but not limited to hourly, daily, weekly, monthly, or yearly traffic statistics reset, offering great flexibility!

',4),c=[s];function r(n,l,h,f,d,_){return o(),e("div",null,c)}const u=t(a,[["render",r]]);export{p as __pageData,u as default}; diff --git a/assets/en_US_guide_q6.md.CYZ4lxRg.lean.js b/assets/en_US_guide_q6.md.CYZ4lxRg.lean.js new file mode 100644 index 00000000..d366bdcc --- /dev/null +++ b/assets/en_US_guide_q6.md.CYZ4lxRg.lean.js @@ -0,0 +1 @@ +import{_ as t,c as e,o,a4 as i}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"How to Reset Traffic Statistics Monthly?","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q6.md","filePath":"en_US/guide/q6.md","lastUpdated":1719239024000}'),a={name:"en_US/guide/q6.md"},s=i("",4),c=[s];function r(n,l,h,f,d,_){return o(),e("div",null,c)}const u=t(a,[["render",r]]);export{p as __pageData,u as default}; diff --git a/assets/en_US_guide_q7.md.6cc217f4.js b/assets/en_US_guide_q7.md.6cc217f4.js deleted file mode 100644 index f14a9576..00000000 --- a/assets/en_US_guide_q7.md.6cc217f4.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as o,R as n}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"Custom Agent Monitoring Projects","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q7.md","filePath":"en_US/guide/q7.md","lastUpdated":1718495592000}'),a={name:"en_US/guide/q7.md"},s=n('

Custom Agent Monitoring Projects

Customizing Monitored Network Interfaces and Disk Partitions

Execute the following command to select custom network interfaces and partitions, then restart the Agent for the changes to take effect:

bash
/opt/nezha/agent/nezha-agent edit

Other Runtime Parameters

To view the supported parameters, execute:

bash
./nezha-agent --help

If you installed the Agent using the one-click script, you can edit /etc/systemd/system/nezha-agent.service and add the following parameters at the end of the ExecStart= line:

  • --report-delay: Controls the interval for reporting system information. The default is 1 second. You can set it to 3 to further reduce the agent's system resource usage (configuration range: 1-4).
  • --skip-conn: Does not monitor connection counts. Recommended for servers with high connection density or high CPU usage.
  • --skip-procs: Does not monitor process counts, which can also reduce Agent resource usage.
  • --disable-auto-update: Disables automatic updates for the Agent (security feature).
  • --disable-force-update: Disables forced updates for the Agent (security feature).
  • --disable-command-execute: Disables the execution of scheduled tasks and the opening of the online terminal on the Agent (security feature).
  • --tls: Enables SSL/TLS encryption (required if you use nginx to reverse proxy the Agent's gRPC connection and nginx has SSL/TLS enabled).
',9),i=[s];function r(c,d,l,p,u,h){return t(),o("div",null,i)}const f=e(a,[["render",r]]);export{m as __pageData,f as default}; diff --git a/assets/en_US_guide_q7.md.6cc217f4.lean.js b/assets/en_US_guide_q7.md.6cc217f4.lean.js deleted file mode 100644 index 8a0ebbdd..00000000 --- a/assets/en_US_guide_q7.md.6cc217f4.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as o,R as n}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"Custom Agent Monitoring Projects","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q7.md","filePath":"en_US/guide/q7.md","lastUpdated":1718495592000}'),a={name:"en_US/guide/q7.md"},s=n("",9),i=[s];function r(c,d,l,p,u,h){return t(),o("div",null,i)}const f=e(a,[["render",r]]);export{m as __pageData,f as default}; diff --git a/assets/en_US_guide_q7.md.UsLVXz4r.js b/assets/en_US_guide_q7.md.UsLVXz4r.js new file mode 100644 index 00000000..cf35a64a --- /dev/null +++ b/assets/en_US_guide_q7.md.UsLVXz4r.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Custom Agent Monitoring Projects","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q7.md","filePath":"en_US/guide/q7.md","lastUpdated":1719239024000}'),s={name:"en_US/guide/q7.md"},n=o('

Custom Agent Monitoring Projects

Customizing Monitored Network Interfaces and Disk Partitions

Execute the following command to select custom network interfaces and partitions, then restart the Agent for the changes to take effect:

bash
/opt/nezha/agent/nezha-agent edit

Other Runtime Parameters

To view the supported parameters, execute:

bash
./nezha-agent --help

If you installed the Agent using the one-click script, you can edit /etc/systemd/system/nezha-agent.service and add the following parameters at the end of the ExecStart= line:

  • --report-delay: Controls the interval for reporting system information. The default is 1 second. You can set it to 3 to further reduce the agent's system resource usage (configuration range: 1-4).
  • --skip-conn: Does not monitor connection counts. Recommended for servers with high connection density or high CPU usage.
  • --skip-procs: Does not monitor process counts, which can also reduce Agent resource usage.
  • --disable-auto-update: Disables automatic updates for the Agent (security feature).
  • --disable-force-update: Disables forced updates for the Agent (security feature).
  • --disable-command-execute: Disables the execution of scheduled tasks and the opening of the online terminal on the Agent (security feature).
  • --tls: Enables SSL/TLS encryption (required if you use nginx to reverse proxy the Agent's gRPC connection and nginx has SSL/TLS enabled).
',9),i=[n];function r(c,d,l,h,u,p){return a(),t("div",null,i)}const f=e(s,[["render",r]]);export{m as __pageData,f as default}; diff --git a/assets/en_US_guide_q7.md.UsLVXz4r.lean.js b/assets/en_US_guide_q7.md.UsLVXz4r.lean.js new file mode 100644 index 00000000..2e587a2a --- /dev/null +++ b/assets/en_US_guide_q7.md.UsLVXz4r.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Custom Agent Monitoring Projects","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q7.md","filePath":"en_US/guide/q7.md","lastUpdated":1719239024000}'),s={name:"en_US/guide/q7.md"},n=o("",9),i=[n];function r(c,d,l,h,u,p){return a(),t("div",null,i)}const f=e(s,[["render",r]]);export{m as __pageData,f as default}; diff --git a/assets/en_US_guide_q8.md.BLA1wvwL.js b/assets/en_US_guide_q8.md.BLA1wvwL.js new file mode 100644 index 00000000..d56c427e --- /dev/null +++ b/assets/en_US_guide_q8.md.BLA1wvwL.js @@ -0,0 +1,6 @@ +import{_ as e,c as a,o as i,a4 as t}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Cloudflare Access OAuth2 Configuration","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q8.md","filePath":"en_US/guide/q8.md","lastUpdated":1719239024000}'),o={name:"en_US/guide/q8.md"},c=t(`

Cloudflare Access OAuth2 Configuration

If you encounter issues logging in as an administrator using Github, Gitlab, or Gitee, you may consider switching to Cloudflare Access as the OAuth2 provider.

Example Configuration:

yaml
Oauth2:
+  Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
+  ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
+  ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
+  Endpoint: "https://xxxxx.cloudflareaccess.com"
+  Type: cloudflare

Configuration Description:

ParameterRetrieval Method
AdminMy Team -> Users -> <specific user> -> User ID
ClientID/ClientSecretAccess -> Application -> Add an Application
-> SaaS -> OIDC
EndpointAccess -> Application -> Application URL -> Only keep the protocol and domain, no path

Creating a SaaS-OIDC Application

Go to Zero Trust Dashboard: https://one.dash.cloudflare.com

  1. My Team -> Users -> <specific user> -> Get User ID and save it;
  2. Access -> Application -> Add an Application;
  3. Select SaaS, enter a custom application name (e.g., nezha) in Application, select OIDC, and click Add application;
  4. In Scopes, select openid, email, profile, groups;
  5. Fill in your CallBack URL in Redirect URLs, such as https://dashboard.example.com/oauth2/callback;
  6. Record the Client ID, Client Secret, and the protocol and domain part of the Issuer URL, such as https://xxxxx.cloudflareaccess.com;
  7. Edit the Dashboard configuration file (usually located at /opt/nezha/dashboard/data/config.yaml), modify the Oauth2 configuration according to the example configuration, and restart the Dashboard service.

Authentication Policy Configuration

After completing the Dashboard setup, you also need to configure the authentication policy in the Zero Trust Dashboard: Access -> Applications -> <application name> -> Policies. You can choose from over ten SSO authentication methods, including email OTP verification, hardware key verification, etc. For detailed configuration, please refer to the Cloudflare Zero Trust documentation.

`,11),s=[c];function n(d,l,r,h,p,u){return i(),a("div",null,s)}const k=e(o,[["render",n]]);export{f as __pageData,k as default}; diff --git a/assets/en_US_guide_q8.md.BLA1wvwL.lean.js b/assets/en_US_guide_q8.md.BLA1wvwL.lean.js new file mode 100644 index 00000000..0d872008 --- /dev/null +++ b/assets/en_US_guide_q8.md.BLA1wvwL.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as i,a4 as t}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Cloudflare Access OAuth2 Configuration","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q8.md","filePath":"en_US/guide/q8.md","lastUpdated":1719239024000}'),o={name:"en_US/guide/q8.md"},c=t("",11),s=[c];function n(d,l,r,h,p,u){return i(),a("div",null,s)}const k=e(o,[["render",n]]);export{f as __pageData,k as default}; diff --git a/assets/en_US_guide_q8.md.d9a53a36.js b/assets/en_US_guide_q8.md.d9a53a36.js deleted file mode 100644 index 83f84474..00000000 --- a/assets/en_US_guide_q8.md.d9a53a36.js +++ /dev/null @@ -1,6 +0,0 @@ -import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Cloudflare Access OAuth2 Configuration","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q8.md","filePath":"en_US/guide/q8.md","lastUpdated":1718495592000}'),c={name:"en_US/guide/q8.md"},n=t(`

Cloudflare Access OAuth2 Configuration

If you encounter issues logging in as an administrator using Github, Gitlab, or Gitee, you may consider switching to Cloudflare Access as the OAuth2 provider.

Example Configuration:

yaml
Oauth2:
-  Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
-  ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
-  ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
-  Endpoint: "https://xxxxx.cloudflareaccess.com"
-  Type: cloudflare

Configuration Description:

ParameterRetrieval Method
AdminMy Team -> Users -> <specific user> -> User ID
ClientID/ClientSecretAccess -> Application -> Add an Application
-> SaaS -> OIDC
EndpointAccess -> Application -> Application URL -> Only keep the protocol and domain, no path

Creating a SaaS-OIDC Application

Go to Zero Trust Dashboard: https://one.dash.cloudflare.com

  1. My Team -> Users -> <specific user> -> Get User ID and save it;
  2. Access -> Application -> Add an Application;
  3. Select SaaS, enter a custom application name (e.g., nezha) in Application, select OIDC, and click Add application;
  4. In Scopes, select openid, email, profile, groups;
  5. Fill in your CallBack URL in Redirect URLs, such as https://dashboard.example.com/oauth2/callback;
  6. Record the Client ID, Client Secret, and the protocol and domain part of the Issuer URL, such as https://xxxxx.cloudflareaccess.com;
  7. Edit the Dashboard configuration file (usually located at /opt/nezha/dashboard/data/config.yaml), modify the Oauth2 configuration according to the example configuration, and restart the Dashboard service.

Authentication Policy Configuration

After completing the Dashboard setup, you also need to configure the authentication policy in the Zero Trust Dashboard: Access -> Applications -> <application name> -> Policies. You can choose from over ten SSO authentication methods, including email OTP verification, hardware key verification, etc. For detailed configuration, please refer to the Cloudflare Zero Trust documentation.

`,11),s=[n];function i(l,d,r,p,u,h){return o(),a("div",null,s)}const C=e(c,[["render",i]]);export{g as __pageData,C as default}; diff --git a/assets/en_US_guide_q8.md.d9a53a36.lean.js b/assets/en_US_guide_q8.md.d9a53a36.lean.js deleted file mode 100644 index 3479d824..00000000 --- a/assets/en_US_guide_q8.md.d9a53a36.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o,c as a,R as t}from"./chunks/framework.44fd0451.js";const g=JSON.parse('{"title":"Cloudflare Access OAuth2 Configuration","description":"","frontmatter":{},"headers":[],"relativePath":"en_US/guide/q8.md","filePath":"en_US/guide/q8.md","lastUpdated":1718495592000}'),c={name:"en_US/guide/q8.md"},n=t("",11),s=[n];function i(l,d,r,p,u,h){return o(),a("div",null,s)}const C=e(c,[["render",i]]);export{g as __pageData,C as default}; diff --git a/assets/en_US_guide_servers.md.C6ttJH3B.js b/assets/en_US_guide_servers.md.C6ttJH3B.js new file mode 100644 index 00000000..903fa229 --- /dev/null +++ b/assets/en_US_guide_servers.md.C6ttJH3B.js @@ -0,0 +1,26 @@ +import{_ as i,c as e,o as s,a4 as a}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Server Management","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/servers.md","filePath":"en_US/guide/servers.md","lastUpdated":1719239024000}'),n={name:"en_US/guide/servers.md"},t=a(`

Server Management

Introduction

The server section is responsible for managing Agents, forming the most fundamental part of Nezha monitoring and serving as the basis for other functionalities.

Adding a Server

The first step is to add a server, where you can customize the name, group, sorting, and notes.
Servers in the same group will be displayed together in supported themes. Notes will only be visible in the Admin Panel, so there's no need to worry about leaking information.

Installing the Agent

Please refer to the previous section on installing the Agent.
It is recommended to use the one-click installation. After configuring the parameters, click the corresponding system icon in the one-click installation column of the server to copy the installation command and execute it on the respective server.

Forced Update

Agent update-related parameters include --disable-auto-update and --disable-force-update as described in Custom Agent Monitoring Projects.
By default, the Agent will update automatically without intervention. However, if the user disables automatic updates, you can select specific servers for a forced update.
The forced update will not work if disable-force-update is enabled.

Data Columns

  • Version: Records the current version of the Agent.
  • Hide from Guests: When true, guests cannot see this server in the Dashboard.
  • Enable DDNS: When true, if the server IP changes, the Dashboard will automatically update the DNS records.
  • DDNS Domain: The DDNS domain configured for this server.
  • Secret: The secret/key used for configuring the Agent, which is used to verify communication between the Agent and the Dashboard.
  • One-Click Install: Click the corresponding system button to copy the command and execute it on the server for a one-click installation.
  • Management: Connects to WebShell, modifies server configuration, or deletes the server.

WebSSH Terminal

This is WebShell; the feature will not work if disable-command-execute is enabled.
It is available for both Linux and Windows and supports Ctrl+Shift+V for pasting.
If the connection fails, refer to Real-Time Channel Disconnection/Online Terminal Connection Failure.
Note that in the WebSSH terminal function, the Agent connects to the public access domain via WebSocket, not through gRPC.

DDNS Functionality

The DDNS functionality is suitable for servers with dynamic IPs. When the Agent reports a new IP, the Dashboard will automatically update the DNS records based on the configuration.

Why Use Nezha Monitoring's DDNS Functionality?

  • Centralized management of DDNS settings instead of deploying a DDNS service on each server.
  • Confidential information is only stored on the Dashboard server, preventing leakage.

Configuration Instructions

Currently, the DDNS functionality supports two configuration forms: single configuration and multiple configurations. If single configuration is used, all Agent servers will use the same configuration to update DDNS. If multiple configurations are used, each server can be assigned a specific configuration to update DDNS, offering greater flexibility.

Single Configuration

yaml
DDNS:
+  Enable: true
+  Provider: "webhook"
+  AccessID: ""
+  AccessSecret: ""
+  WebhookMethod: ""
+  WebhookURL: ""
+  WebhookRequestBody: ""
+  WebhookHeaders: ""
+  MaxRetries: 3
+  Profiles: null
  • Enable: Boolean value to enable or disable the DDNS functionality.
  • Provider: The name of the DDNS provider; currently supports webhook, cloudflare, and tencentcloud.
  • AccessID: Token ID for the DDNS provider; only applicable to the tencentcloud provider.
  • AccessSecret: Token Secret for the DDNS provider; only applicable to the cloudflare and tencentcloud providers.
  • WebhookMethod: The request method for the webhook, such as GET or POST; only applicable to the webhook provider.
  • WebhookURL: The request URL for the webhook; only applicable to the webhook provider.
  • WebhookRequestBody: The request body for the webhook; only applicable to the webhook provider.
  • WebhookHeaders: The request headers for the webhook; only applicable to the webhook provider.
  • MaxRetries: The number of retry attempts when a request fails.
  • Profiles: Multi-configuration settings; ignored in single configuration settings.

The WebhookURL, WebhookRequestBody, and WebhookHeaders can include the following parameters:

  • {ip}: The current IP of the server.
  • {domain}: The DDNS domain.
  • {type}: The IP type, which could be "ipv4" or "ipv6".
  • {access_id}: Credential 1.
  • {access_secret}: Credential 2.

Example Configuration:

yaml
WebhookHeaders: |
+    a:{access_id}
+    b:{access_secret}
+WebhookRequestBody: '{"domain": "{domain}", "ip": "{ip}", "type": "{type}"}'

Multiple Configurations

When using multiple configurations, leave the DDNS.Provider value empty. If DDNS.Provider is not empty, the multiple configuration settings will be ignored.

yaml
DDNS:
+  Enable: true
+  MaxRetries: 3
+  Profiles:
+    example:
+      Provider: ""
+      AccessID: ""
+      AccessSecret: ""
+      WebhookMethod: ""
+      WebhookURL: ""
+      WebhookRequestBody: ""
+      WebhookHeaders: ""
  • Profiles: Multi-configuration settings.
  • example: Can be replaced with any string as the DDNS configuration name.

Other options can be referenced from the Single Configuration section.

Dashboard Configuration

After modifying the configuration file, you also need to modify the server settings in the Dashboard for the DDNS to take effect.

DDNS related options:

  • Enable DDNS: Enable the DDNS functionality for this server.
  • Enable DDNS IPv4: Enable IPv4 parsing when updating DDNS records.
  • Enable DDNS IPv6: Enable IPv6 parsing when updating DDNS records.
  • DDNS Domain: The domain the record points to.
  • DDNS Configuration: The DDNS configuration name to use in multiple configurations.

WARNING

When you modify the configuration and save it in the Dashboard settings, it will populate the default configuration options in config.yaml, and both single and multiple configurations will exist in the DDNS section.

  • To use single configuration, configure DDNS.Provider and ignore the Profiles options.
  • To use multiple configurations, leave DDNS.Provider empty. If DDNS.Provider is not empty, the multiple configuration settings will be ignored.

Viewing Logs

In the Dashboard logs, you can see the relevant logs for the DDNS functionality. When configured correctly, there will be corresponding log entries when updating DNS records.

shell
dashboard_1  | 2024/03/16 23:16:25 NEZHA>> 正在尝试更新域名(ddns.example.com)DDNS(1/3) # Attempting to update domain (ddns.example.com) DDNS (1/3)
+dashboard_1  | 2024/03/16 23:16:28 NEZHA>> 尝试更新域名(ddns.example.com)DDNS成功 # Successfully updated domain (ddns.example.com) DDNS
`,39),o=[t];function l(h,r,d,p,c,k){return s(),e("div",null,o)}const E=i(n,[["render",l]]);export{g as __pageData,E as default}; diff --git a/assets/en_US_guide_servers.md.C6ttJH3B.lean.js b/assets/en_US_guide_servers.md.C6ttJH3B.lean.js new file mode 100644 index 00000000..6f4c5729 --- /dev/null +++ b/assets/en_US_guide_servers.md.C6ttJH3B.lean.js @@ -0,0 +1 @@ +import{_ as i,c as e,o as s,a4 as a}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Server Management","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/servers.md","filePath":"en_US/guide/servers.md","lastUpdated":1719239024000}'),n={name:"en_US/guide/servers.md"},t=a("",39),o=[t];function l(h,r,d,p,c,k){return s(),e("div",null,o)}const E=i(n,[["render",l]]);export{g as __pageData,E as default}; diff --git a/assets/en_US_guide_servers.md.fa2a7a63.js b/assets/en_US_guide_servers.md.fa2a7a63.js deleted file mode 100644 index 0f1a2cec..00000000 --- a/assets/en_US_guide_servers.md.fa2a7a63.js +++ /dev/null @@ -1,26 +0,0 @@ -import{_ as e,o,c as s,R as n}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"Server Management","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/servers.md","filePath":"en_US/guide/servers.md","lastUpdated":1718495592000}'),a={name:"en_US/guide/servers.md"},l=n(`

Server Management

Introduction

The server section is responsible for managing Agents, forming the most fundamental part of Nezha monitoring and serving as the basis for other functionalities.

Adding a Server

The first step is to add a server, where you can customize the name, group, sorting, and notes.
Servers in the same group will be displayed together in supported themes. Notes will only be visible in the Admin Panel, so there's no need to worry about leaking information.

Installing the Agent

Please refer to the previous section on installing the Agent.
It is recommended to use the one-click installation. After configuring the parameters, click the corresponding system icon in the one-click installation column of the server to copy the installation command and execute it on the respective server.

Forced Update

Agent update-related parameters include --disable-auto-update and --disable-force-update as described in Custom Agent Monitoring Projects.
By default, the Agent will update automatically without intervention. However, if the user disables automatic updates, you can select specific servers for a forced update.
The forced update will not work if disable-force-update is enabled.

Data Columns

  • Version: Records the current version of the Agent.
  • Hide from Guests: When true, guests cannot see this server in the Dashboard.
  • Enable DDNS: When true, if the server IP changes, the Dashboard will automatically update the DNS records.
  • DDNS Domain: The DDNS domain configured for this server.
  • Secret: The secret/key used for configuring the Agent, which is used to verify communication between the Agent and the Dashboard.
  • One-Click Install: Click the corresponding system button to copy the command and execute it on the server for a one-click installation.
  • Management: Connects to WebShell, modifies server configuration, or deletes the server.

WebSSH Terminal

This is WebShell; the feature will not work if disable-command-execute is enabled.
It is available for both Linux and Windows and supports Ctrl+Shift+V for pasting.
If the connection fails, refer to Real-Time Channel Disconnection/Online Terminal Connection Failure.
Note that in the WebSSH terminal function, the Agent connects to the public access domain via WebSocket, not through gRPC.

DDNS Functionality

The DDNS functionality is suitable for servers with dynamic IPs. When the Agent reports a new IP, the Dashboard will automatically update the DNS records based on the configuration.

Why Use Nezha Monitoring's DDNS Functionality?

  • Centralized management of DDNS settings instead of deploying a DDNS service on each server.
  • Confidential information is only stored on the Dashboard server, preventing leakage.

Configuration Instructions

Currently, the DDNS functionality supports two configuration forms: single configuration and multiple configurations. If single configuration is used, all Agent servers will use the same configuration to update DDNS. If multiple configurations are used, each server can be assigned a specific configuration to update DDNS, offering greater flexibility.

Single Configuration

yaml
DDNS:
-  Enable: true
-  Provider: "webhook"
-  AccessID: ""
-  AccessSecret: ""
-  WebhookMethod: ""
-  WebhookURL: ""
-  WebhookRequestBody: ""
-  WebhookHeaders: ""
-  MaxRetries: 3
-  Profiles: null
  • Enable: Boolean value to enable or disable the DDNS functionality.
  • Provider: The name of the DDNS provider; currently supports webhook, cloudflare, and tencentcloud.
  • AccessID: Token ID for the DDNS provider; only applicable to the tencentcloud provider.
  • AccessSecret: Token Secret for the DDNS provider; only applicable to the cloudflare and tencentcloud providers.
  • WebhookMethod: The request method for the webhook, such as GET or POST; only applicable to the webhook provider.
  • WebhookURL: The request URL for the webhook; only applicable to the webhook provider.
  • WebhookRequestBody: The request body for the webhook; only applicable to the webhook provider.
  • WebhookHeaders: The request headers for the webhook; only applicable to the webhook provider.
  • MaxRetries: The number of retry attempts when a request fails.
  • Profiles: Multi-configuration settings; ignored in single configuration settings.

The WebhookURL, WebhookRequestBody, and WebhookHeaders can include the following parameters:

  • {ip}: The current IP of the server.
  • {domain}: The DDNS domain.
  • {type}: The IP type, which could be "ipv4" or "ipv6".
  • {access_id}: Credential 1.
  • {access_secret}: Credential 2.

Example Configuration:

yaml
WebhookHeaders: |
-    a:{access_id}
-    b:{access_secret}
-WebhookRequestBody: '{"domain": "{domain}", "ip": "{ip}", "type": "{type}"}'

Multiple Configurations

When using multiple configurations, leave the DDNS.Provider value empty. If DDNS.Provider is not empty, the multiple configuration settings will be ignored.

yaml
DDNS:
-  Enable: true
-  MaxRetries: 3
-  Profiles:
-    example:
-      Provider: ""
-      AccessID: ""
-      AccessSecret: ""
-      WebhookMethod: ""
-      WebhookURL: ""
-      WebhookRequestBody: ""
-      WebhookHeaders: ""
  • Profiles: Multi-configuration settings.
  • example: Can be replaced with any string as the DDNS configuration name.

Other options can be referenced from the Single Configuration section.

Dashboard Configuration

After modifying the configuration file, you also need to modify the server settings in the Dashboard for the DDNS to take effect.

DDNS related options:

  • Enable DDNS: Enable the DDNS functionality for this server.
  • Enable DDNS IPv4: Enable IPv4 parsing when updating DDNS records.
  • Enable DDNS IPv6: Enable IPv6 parsing when updating DDNS records.
  • DDNS Domain: The domain the record points to.
  • DDNS Configuration: The DDNS configuration name to use in multiple configurations.

WARNING

When you modify the configuration and save it in the Dashboard settings, it will populate the default configuration options in config.yaml, and both single and multiple configurations will exist in the DDNS section.

  • To use single configuration, configure DDNS.Provider and ignore the Profiles options.
  • To use multiple configurations, leave DDNS.Provider empty. If DDNS.Provider is not empty, the multiple configuration settings will be ignored.

Viewing Logs

In the Dashboard logs, you can see the relevant logs for the DDNS functionality. When configured correctly, there will be corresponding log entries when updating DNS records.

shell
dashboard_1  | 2024/03/16 23:16:25 NEZHA>> 正在尝试更新域名(ddns.example.com)DDNS(1/3) # Attempting to update domain (ddns.example.com) DDNS (1/3)
-dashboard_1  | 2024/03/16 23:16:28 NEZHA>> 尝试更新域名(ddns.example.com)DDNS成功 # Successfully updated domain (ddns.example.com) DDNS
`,39),t=[l];function i(r,c,p,d,u,h){return o(),s("div",null,t)}const g=e(a,[["render",i]]);export{y as __pageData,g as default}; diff --git a/assets/en_US_guide_servers.md.fa2a7a63.lean.js b/assets/en_US_guide_servers.md.fa2a7a63.lean.js deleted file mode 100644 index 3d67faa8..00000000 --- a/assets/en_US_guide_servers.md.fa2a7a63.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o,c as s,R as n}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"Server Management","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/servers.md","filePath":"en_US/guide/servers.md","lastUpdated":1718495592000}'),a={name:"en_US/guide/servers.md"},l=n("",39),t=[l];function i(r,c,p,d,u,h){return o(),s("div",null,t)}const g=e(a,[["render",i]]);export{y as __pageData,g as default}; diff --git a/assets/en_US_guide_services.md.DlWdTpu5.js b/assets/en_US_guide_services.md.DlWdTpu5.js new file mode 100644 index 00000000..ca8abf53 --- /dev/null +++ b/assets/en_US_guide_services.md.DlWdTpu5.js @@ -0,0 +1 @@ +import{_ as e,c as t,o,a4 as i}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Service Monitoring","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/services.md","filePath":"en_US/guide/services.md","lastUpdated":1719239024000}'),n={name:"en_US/guide/services.md"},a=i('

Service Monitoring

The Services section is where you set up monitoring for external websites or servers using Agents.
Configured service monitors can be viewed on the "Services" page of the homepage, displaying the availability monitoring results for the past 30 days.

How to Use

To add a new monitor, go to the "Services" page in the Admin Panel and click "Add Monitor."

When adding a new service monitor, you need to set the following parameters:

  • Name: Customize a name.

  • Type: Select a monitor type. Nezha Monitoring currently supports three types: "HTTP-GET," "ICMP-Ping," and "TCP-Ping."

  • Target: Depending on the type you choose, the method for setting the target differs:

    • HTTP-GET: For this type, you should enter a URL as the target, including http:// or https://. If your target URL is https://, the SSL certificate of that URL will also be monitored. Notifications will be triggered when the SSL certificate expires or changes. Example: https://example.com.
    • ICMP-Ping: For this type, you should enter a domain name or IP without a port number. Example: 1.1.1.1 or example.com.
    • TCP-Ping: For this type, you should enter a domain name or IP with a port number. Example: 1.1.1.1:80 or example.com:22.
  • Request Interval: Set the interval in seconds at which the Agent requests the target.

  • Coverage: Select a rule to determine which Agents will request the target.

  • Specific Servers: Used in conjunction with the coverage scope, select Agents within the rule to exclude.

  • Notification Group: Choose the notification methods you have already set up on the "Notification" page. Click here for more details.

  • Enable Fault Notification: Choose whether to receive fault notifications for the target as needed. The default is unchecked.

After setting it up, click "Add." Wait a moment and go to the "Services" page on the homepage to view the monitoring results.

Latency Change Notification

Nezha Monitoring can monitor and record the latency between the Agent and the target server, sending notifications when there are significant changes. This feature helps you monitor if the server's network route has changed.

  • Enable Latency Notifications: When enabled, Notification will be sent if the latency from the Agent to the target server is greater than the Maximum Latency or less than the Minimum Latency.

Trigger Tasks on Notification

If you need to execute tasks when service monitoring Notification are triggered, you can check "Enable Trigger Tasks" and select the pre-configured trigger tasks in "Task on Notification" and "Task on Recovery."

Network Latency Chart

The TCP-Ping and ICMP-Ping monitoring types set in the Services page will automatically enable the monitoring chart feature. On the "Network" page of the homepage, you can view historical network latency charts. The data in the charts is based on the latency from the Agent to the target server. You can click the Agent's name to toggle the chart display. In the chart, you can uncheck the target server's name to hide or show the corresponding data.

Managing Monitors

To manage existing service monitors, go to the "Services" page in the Admin Panel. Select a monitor configuration and click the icons on the right to edit or delete it.

',16),r=[a];function s(c,h,l,g,d,u){return o(),t("div",null,r)}const f=e(n,[["render",s]]);export{m as __pageData,f as default}; diff --git a/assets/en_US_guide_services.md.DlWdTpu5.lean.js b/assets/en_US_guide_services.md.DlWdTpu5.lean.js new file mode 100644 index 00000000..71b5b43f --- /dev/null +++ b/assets/en_US_guide_services.md.DlWdTpu5.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o,a4 as i}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Service Monitoring","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/services.md","filePath":"en_US/guide/services.md","lastUpdated":1719239024000}'),n={name:"en_US/guide/services.md"},a=i("",16),r=[a];function s(c,h,l,g,d,u){return o(),t("div",null,r)}const f=e(n,[["render",s]]);export{m as __pageData,f as default}; diff --git a/assets/en_US_guide_services.md.b9e22be7.js b/assets/en_US_guide_services.md.b9e22be7.js deleted file mode 100644 index 0bc6dbd2..00000000 --- a/assets/en_US_guide_services.md.b9e22be7.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as o,R as i}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"Service Monitoring","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/services.md","filePath":"en_US/guide/services.md","lastUpdated":1718495592000}'),n={name:"en_US/guide/services.md"},a=i('

Service Monitoring

The Services section is where you set up monitoring for external websites or servers using Agents.
Configured service monitors can be viewed on the "Services" page of the homepage, displaying the availability monitoring results for the past 30 days.

How to Use

To add a new monitor, go to the "Services" page in the Admin Panel and click "Add Monitor."

When adding a new service monitor, you need to set the following parameters:

  • Name: Customize a name.

  • Type: Select a monitor type. Nezha Monitoring currently supports three types: "HTTP-GET," "ICMP-Ping," and "TCP-Ping."

  • Target: Depending on the type you choose, the method for setting the target differs:

    • HTTP-GET: For this type, you should enter a URL as the target, including http:// or https://. If your target URL is https://, the SSL certificate of that URL will also be monitored. Notifications will be triggered when the SSL certificate expires or changes. Example: https://example.com.
    • ICMP-Ping: For this type, you should enter a domain name or IP without a port number. Example: 1.1.1.1 or example.com.
    • TCP-Ping: For this type, you should enter a domain name or IP with a port number. Example: 1.1.1.1:80 or example.com:22.
  • Request Interval: Set the interval in seconds at which the Agent requests the target.

  • Coverage: Select a rule to determine which Agents will request the target.

  • Specific Servers: Used in conjunction with the coverage scope, select Agents within the rule to exclude.

  • Notification Group: Choose the notification methods you have already set up on the "Notification" page. Click here for more details.

  • Enable Fault Notification: Choose whether to receive fault notifications for the target as needed. The default is unchecked.

After setting it up, click "Add." Wait a moment and go to the "Services" page on the homepage to view the monitoring results.

Latency Change Notification

Nezha Monitoring can monitor and record the latency between the Agent and the target server, sending notifications when there are significant changes. This feature helps you monitor if the server's network route has changed.

  • Enable Latency Notifications: When enabled, Notification will be sent if the latency from the Agent to the target server is greater than the Maximum Latency or less than the Minimum Latency.

Trigger Tasks on Notification

If you need to execute tasks when service monitoring Notification are triggered, you can check "Enable Trigger Tasks" and select the pre-configured trigger tasks in "Task on Notification" and "Task on Recovery."

Network Latency Chart

The TCP-Ping and ICMP-Ping monitoring types set in the Services page will automatically enable the monitoring chart feature. On the "Network" page of the homepage, you can view historical network latency charts. The data in the charts is based on the latency from the Agent to the target server. You can click the Agent's name to toggle the chart display. In the chart, you can uncheck the target server's name to hide or show the corresponding data.

Managing Monitors

To manage existing service monitors, go to the "Services" page in the Admin Panel. Select a monitor configuration and click the icons on the right to edit or delete it.

',16),r=[a];function s(c,h,l,g,d,u){return t(),o("div",null,r)}const f=e(n,[["render",s]]);export{m as __pageData,f as default}; diff --git a/assets/en_US_guide_services.md.b9e22be7.lean.js b/assets/en_US_guide_services.md.b9e22be7.lean.js deleted file mode 100644 index 7d7d7db9..00000000 --- a/assets/en_US_guide_services.md.b9e22be7.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as o,R as i}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"Service Monitoring","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/services.md","filePath":"en_US/guide/services.md","lastUpdated":1718495592000}'),n={name:"en_US/guide/services.md"},a=i("",16),r=[a];function s(c,h,l,g,d,u){return t(),o("div",null,r)}const f=e(n,[["render",s]]);export{m as __pageData,f as default}; diff --git a/assets/en_US_guide_settings.md.9aa8066d.js b/assets/en_US_guide_settings.md.9aa8066d.js deleted file mode 100644 index 0d87d70d..00000000 --- a/assets/en_US_guide_settings.md.9aa8066d.js +++ /dev/null @@ -1,311 +0,0 @@ -import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"Settings","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/settings.md","filePath":"en_US/guide/settings.md","lastUpdated":1718495592000}'),p={name:"en_US/guide/settings.md"},o=l(`

Settings

Site Title

You can customize the site title in this section.

Administrator List

  • If you have changed your Github, Gitlab, or Gitee username, you need to update it here to avoid login issues. Separate multiple usernames with commas: user1,user2.
  • To change the administrator account, go to /opt/nezha/dashboard/data/config.yaml and reset the new administrator Client ID and Client Secret.

Theme

Select the theme for the homepage and admin panel here. If a theme that already exists is not in the options, update the Dashboard.
Before enabling the Custom theme, ensure you have installed the custom theme; otherwise, the Dashboard will not display correctly after enabling this option.

Language

Nezha Monitoring currently supports the following languages:

  • Simplified Chinese (简体中文)
  • Traditional Chinese (繁體中文)
  • English
  • Spanish (Español)

We welcome corrections to translations or contributions of more languages.

Custom Code (style, script)

You can modify the LOGO, adjust colors, add beautification code, and add statistical code here.

WARNING

Custom code only affects the visitor homepage, not the admin panel. Due to differences in code between themes, if you need to modify the content in the admin panel, please modify the theme files in Docker.

Example of Changing Progress Bar Color, Background Image, Navigation Bar, etc., in the Default Theme

Click to expand/collapse
html
<style>
-/* Screen adaptation */
-@media only screen and (min-width: 1200px) {
-    .ui.container {
-    width: 80% !important;
-}
-}
-
-@media only screen and (max-width: 767px) {
-    .ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) {
-        margin-top: 0.4em !important;
-    }
-}
-
-/* Overall icons */
-i.icon {
-    color: #000;
-    width: 1.2em !important;
-}
-
-/* Background image */
-body {
-    content: " " !important;
-    background: fixed !important;
-    z-index: -1 !important;
-    top: 0 !important;
-    right: 0 !important;
-    bottom: 0 !important;
-    left: 0 !important;
-    background-position: top !important;
-    background-repeat: no-repeat !important;
-    background-size: cover !important;
-    background-image: url(https://backgroud.img) !important;
-    font-family: Arial,Helvetica,sans-serif !important;
-}
-
-/* Navigation bar */
-.ui.large.menu {
-    border: 0 !important;
-    border-radius: 0px !important;
-    background-color: rgba(255, 255, 255, 55%) !important;
-}
-
-/* Homepage buttons */
-.ui.menu .active.item {
-    background-color: transparent !important;
-}
-
-/* Navigation bar dropdown */
-.ui.dropdown .menu {
-    border: 0 !important;
-    border-radius: 0 !important;
-    background-color: rgba(255, 255, 255, 80%) !important;
-}
-
-/* Login button */
-.nezha-primary-btn {
-    background-color: transparent !important;
-    color: #000 !important;
-}
-
-/* Large card */
-#app .ui.fluid.accordion {
-    background-color: #fbfbfb26 !important;
-    border-radius: 0.4rem !important;
-}
-
-/* Small card */
-.ui.four.cards>.card {
-    border-radius: 0.6rem !important;
-    background-color: #fafafaa3 !important;
-}
-
-.status.cards .wide.column {
-    padding-top: 0 !important;
-    padding-bottom: 0 !important;
-    height: 3.3rem !important;
-}
-
-.status.cards .three.wide.column {
-    padding-right: 0rem !important;
-}
-
-.status.cards .wide.column:nth-child(1) {
-    margin-top: 2rem !important;
-}
-
-.status.cards .wide.column:nth-child(2) {
-    margin-top: 2rem !important;
-}
-
-.status.cards .description {
-    padding-bottom: 0 !important;
-}
-
-/* Server name */
-.status.cards .flag {
-    margin-right: 0.5rem !important;
-}
-
-/* Popup card icon */
-.status.cards .header > .info.icon {
-    margin-right: 0 !important;
-}
-
-.nezha-secondary-font {
-    color: #2175ba !important;
-}
-
-/* Upload/download */
-.status.cards .outline.icon {
-    margin-right: 1px !important;
-}
-
-i.arrow.alternate.circle.down.outline.icon {
-    color: #2175ba !important;
-}
-
-i.arrow.alternate.circle.up.outline.icon {
-    color: red !important;
-}
-
-/* Popup card small arrow */
-.ui.right.center.popup {
-    margin: -3px 0 0 0.914286em !important;
-    -webkit-transform-origin: left 50% !important;
-    transform-origin: left 50% !important;
-}
-
-.ui.bottom.left.popup {
-    margin-left: 1px !important;
-    margin-top: 3px !important;
-}
-
-.ui.top.left.popup {
-    margin-left: 0 !important;
-    margin-bottom: 10px !important;
-}
-
-.ui.top.right.popup {
-    margin-right: 0 !important;
-    margin-bottom: 8px !important;
-}
-
-.ui.left.center.popup {
-    margin: -3px .91428571em 0 0 !important;
-    -webkit-transform-origin: right 50% !important;
-    transform-origin: right 50% !important;
-}
-
-.ui.right.center.popup:before,
-.ui.left.center.popup:before {
-    border: 0px solid #fafafaeb !important;
-    background: #fafafaeb !important;
-}
-
-.ui.top.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
-
-.ui.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
-
-.ui.bottom.left.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.bottom.right.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
-
-.ui.top.left.popup:before {
-    border-radius: 0 !重要;
-    border: 1px solid transparent !重要;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
-
-.ui.top.right.popup:before {
-    border-radius: 0 !重要;
-    border: 1px solid transparent !重要;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
-
-.ui.left.center.popup:before {
-    border-radius: 0 !重要;
-    border: 1px solid transparent !重要;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
-
-/* Popup card */
-.status.cards .ui.content.popup {
-    min-width: 20rem !重要;
-    line-height: 2rem !重要;
-    border-radius: 5px !重要;
-    border: 1px solid transparent !重要;
-    background-color: #fafafaeb !重要;
-    font-family: Arial,Helvetica,sans-serif !重要;
-}
-
-.ui.content {
-    margin: 0 !重要;
-    padding: 1em !重要;
-}
-
-/* Service page */
-.ui
-
-.table {
-    background: RGB(225,225,225,0.6) !重要;
-}
-
-.ui.table thead th {
-    background: transparent !重要;
-}
-
-/* Service page progress bar */
-.service-status .good {
-    background-color: #2175ba !重要;
-}
-
-.service-status .danger {
-    background-color: red !重要;
-}
-
-.service-status .warning {
-    background-color: orange !重要;
-}
-
-/* Copyright */
-.ui.inverted.segment, .ui.primary.inverted.segment {
-    color: #000 !重要;
-    font-weight: bold !重要;
-    background-color: #fafafaa3 !重要;
-}
-</style>
-
-<!--Logo and Copyright-->
-<script>
-window.onload = function(){
-var avatar=document.querySelector(".item img")
-var footer=document.querySelector("div.is-size-7")
-footer.innerHTML="Copyright info"
-footer.style.visibility="visible"
-avatar.src="https:/img.src"
-avatar.style.visibility="visible"
-}
-</script>
Click to expand/collapse
html
<style>
-.ui.fine.progress> .progress-bar {
-  background-color: #00a7d0 !important;
-}
-</style>
-
-<script>
-window.onload = function(){
-  var avatar = document.querySelector("img");
-  var footer = document.querySelector("div.footer-container");
-  footer.innerHTML = "©2021 Your Name & Powered by Your Name";
-  footer.style.visibility = "visible";
-  avatar.src = "Your Image URL";
-  avatar.style.visibility = "visible";
-}
-</script>
Click to expand/collapse
html
<style>
-.right.menu>a {
-  visibility: hidden;
-}
-.footer .is-size-7 {
-  visibility: hidden;
-}
-.item img {
-  visibility: hidden;
-}
-</style>
-<script>
-window.onload = function() {
-  var avatar = document.querySelector(".item img");
-  var footer = document.querySelector("div.is-size-7");
-  footer.innerHTML = "Powered by Your Name";
-  footer.style.visibility = "visible";
-  avatar.src = "Your Square Logo URL";
-  avatar.style.visibility = "visible";
-}
-</script>

Example of Changing Background Image in Hotaru Theme

Click to expand/collapse
html
<style>
-.hotaru-cover {
-   background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
-}
-</style>

View Password

If you don't want to display your Dashboard directly to visitors, you can set a view password here. After setting the password, visitors need to enter the password to access the homepage.

Non-CDN Dashboard Server Domain/IP

This setting is a prerequisite for using the one-click script to install the Agent. For details, please see here.

IP Change Notifications

If you want to receive notifications when a server's IP changes, you can set it up here.

Coverage

Select a rule to determine which servers to monitor. Choose according to your needs.

Specific Servers

Set exclusions for the selected rule in conjunction with the coverage scope.

Send Notifications to a Specific Notification Group

Choose a notification method, which should be set up in advance on the "Notification" page.

WARNING

Notifications take effect after enabling this setting.

Show Full IP Address in Notifications

IP change notifications hide the full IP by default. If you don't want to hide it, check "Show Full IP Address in Notification."

Disable Homepage Theme Switching

By default, the Dashboard allows visitors to change the theme. This feature only affects individual visitors and does not affect the theme set by the administrator in the admin panel. If you don't want visitors to switch themes, check this option.

`,39),e=[o];function t(r,c,F,D,y,C){return a(),n("div",null,e)}const B=s(p,[["render",t]]);export{A as __pageData,B as default}; diff --git a/assets/en_US_guide_settings.md.9aa8066d.lean.js b/assets/en_US_guide_settings.md.9aa8066d.lean.js deleted file mode 100644 index 333be844..00000000 --- a/assets/en_US_guide_settings.md.9aa8066d.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"Settings","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/settings.md","filePath":"en_US/guide/settings.md","lastUpdated":1718495592000}'),p={name:"en_US/guide/settings.md"},o=l("",39),e=[o];function t(r,c,F,D,y,C){return a(),n("div",null,e)}const B=s(p,[["render",t]]);export{A as __pageData,B as default}; diff --git a/assets/en_US_guide_settings.md.wx4ZCmxQ.js b/assets/en_US_guide_settings.md.wx4ZCmxQ.js new file mode 100644 index 00000000..7c7fce77 --- /dev/null +++ b/assets/en_US_guide_settings.md.wx4ZCmxQ.js @@ -0,0 +1,311 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"Settings","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/settings.md","filePath":"en_US/guide/settings.md","lastUpdated":1719239024000}'),h={name:"en_US/guide/settings.md"},k=n(`

Settings

Site Title

You can customize the site title in this section.

Administrator List

  • If you have changed your Github, Gitlab, or Gitee username, you need to update it here to avoid login issues. Separate multiple usernames with commas: user1,user2.
  • To change the administrator account, go to /opt/nezha/dashboard/data/config.yaml and reset the new administrator Client ID and Client Secret.

Theme

Select the theme for the homepage and admin panel here. If a theme that already exists is not in the options, update the Dashboard.
Before enabling the Custom theme, ensure you have installed the custom theme; otherwise, the Dashboard will not display correctly after enabling this option.

Language

Nezha Monitoring currently supports the following languages:

  • Simplified Chinese (简体中文)
  • Traditional Chinese (繁體中文)
  • English
  • Spanish (Español)

We welcome corrections to translations or contributions of more languages.

Custom Code (style, script)

You can modify the LOGO, adjust colors, add beautification code, and add statistical code here.

WARNING

Custom code only affects the visitor homepage, not the admin panel. Due to differences in code between themes, if you need to modify the content in the admin panel, please modify the theme files in Docker.

Example of Changing Progress Bar Color, Background Image, Navigation Bar, etc., in the Default Theme

Click to expand/collapse
html
<style>
+/* Screen adaptation */
+@media only screen and (min-width: 1200px) {
+    .ui.container {
+    width: 80% !important;
+}
+}
+
+@media only screen and (max-width: 767px) {
+    .ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) {
+        margin-top: 0.4em !important;
+    }
+}
+
+/* Overall icons */
+i.icon {
+    color: #000;
+    width: 1.2em !important;
+}
+
+/* Background image */
+body {
+    content: " " !important;
+    background: fixed !important;
+    z-index: -1 !important;
+    top: 0 !important;
+    right: 0 !important;
+    bottom: 0 !important;
+    left: 0 !important;
+    background-position: top !important;
+    background-repeat: no-repeat !important;
+    background-size: cover !important;
+    background-image: url(https://backgroud.img) !important;
+    font-family: Arial,Helvetica,sans-serif !important;
+}
+
+/* Navigation bar */
+.ui.large.menu {
+    border: 0 !important;
+    border-radius: 0px !important;
+    background-color: rgba(255, 255, 255, 55%) !important;
+}
+
+/* Homepage buttons */
+.ui.menu .active.item {
+    background-color: transparent !important;
+}
+
+/* Navigation bar dropdown */
+.ui.dropdown .menu {
+    border: 0 !important;
+    border-radius: 0 !important;
+    background-color: rgba(255, 255, 255, 80%) !important;
+}
+
+/* Login button */
+.nezha-primary-btn {
+    background-color: transparent !important;
+    color: #000 !important;
+}
+
+/* Large card */
+#app .ui.fluid.accordion {
+    background-color: #fbfbfb26 !important;
+    border-radius: 0.4rem !important;
+}
+
+/* Small card */
+.ui.four.cards>.card {
+    border-radius: 0.6rem !important;
+    background-color: #fafafaa3 !important;
+}
+
+.status.cards .wide.column {
+    padding-top: 0 !important;
+    padding-bottom: 0 !important;
+    height: 3.3rem !important;
+}
+
+.status.cards .three.wide.column {
+    padding-right: 0rem !important;
+}
+
+.status.cards .wide.column:nth-child(1) {
+    margin-top: 2rem !important;
+}
+
+.status.cards .wide.column:nth-child(2) {
+    margin-top: 2rem !important;
+}
+
+.status.cards .description {
+    padding-bottom: 0 !important;
+}
+
+/* Server name */
+.status.cards .flag {
+    margin-right: 0.5rem !important;
+}
+
+/* Popup card icon */
+.status.cards .header > .info.icon {
+    margin-right: 0 !important;
+}
+
+.nezha-secondary-font {
+    color: #2175ba !important;
+}
+
+/* Upload/download */
+.status.cards .outline.icon {
+    margin-right: 1px !important;
+}
+
+i.arrow.alternate.circle.down.outline.icon {
+    color: #2175ba !important;
+}
+
+i.arrow.alternate.circle.up.outline.icon {
+    color: red !important;
+}
+
+/* Popup card small arrow */
+.ui.right.center.popup {
+    margin: -3px 0 0 0.914286em !important;
+    -webkit-transform-origin: left 50% !important;
+    transform-origin: left 50% !important;
+}
+
+.ui.bottom.left.popup {
+    margin-left: 1px !important;
+    margin-top: 3px !important;
+}
+
+.ui.top.left.popup {
+    margin-left: 0 !important;
+    margin-bottom: 10px !important;
+}
+
+.ui.top.right.popup {
+    margin-right: 0 !important;
+    margin-bottom: 8px !important;
+}
+
+.ui.left.center.popup {
+    margin: -3px .91428571em 0 0 !important;
+    -webkit-transform-origin: right 50% !important;
+    transform-origin: right 50% !important;
+}
+
+.ui.right.center.popup:before,
+.ui.left.center.popup:before {
+    border: 0px solid #fafafaeb !important;
+    background: #fafafaeb !important;
+}
+
+.ui.top.popup:before {
+    border-color: #fafafaeb transparent transparent !important;
+}
+
+.ui.popup:before {
+    border-color: #fafafaeb transparent transparent !important;
+}
+
+.ui.bottom.left.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !important;
+    background: #fafafaeb !important;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
+}
+
+.ui.bottom.right.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !重要;
+    background: #fafafaeb !重要
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
+}
+
+.ui.top.left.popup:before {
+    border-radius: 0 !重要;
+    border: 1px solid transparent !重要;
+    border-color: #fafafaeb transparent transparent !重要;
+    background: #fafafaeb !重要;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
+}
+
+.ui.top.right.popup:before {
+    border-radius: 0 !重要;
+    border: 1px solid transparent !重要;
+    border-color: #fafafaeb transparent transparent !重要;
+    background: #fafafaeb !重要;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
+}
+
+.ui.left.center.popup:before {
+    border-radius: 0 !重要;
+    border: 1px solid transparent !重要;
+    border-color: #fafafaeb transparent transparent !重要;
+    background: #fafafaeb !重要;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
+}
+
+/* Popup card */
+.status.cards .ui.content.popup {
+    min-width: 20rem !重要;
+    line-height: 2rem !重要;
+    border-radius: 5px !重要;
+    border: 1px solid transparent !重要;
+    background-color: #fafafaeb !重要;
+    font-family: Arial,Helvetica,sans-serif !重要;
+}
+
+.ui.content {
+    margin: 0 !重要;
+    padding: 1em !重要;
+}
+
+/* Service page */
+.ui
+
+.table {
+    background: RGB(225,225,225,0.6) !重要;
+}
+
+.ui.table thead th {
+    background: transparent !重要;
+}
+
+/* Service page progress bar */
+.service-status .good {
+    background-color: #2175ba !重要;
+}
+
+.service-status .danger {
+    background-color: red !重要;
+}
+
+.service-status .warning {
+    background-color: orange !重要;
+}
+
+/* Copyright */
+.ui.inverted.segment, .ui.primary.inverted.segment {
+    color: #000 !重要;
+    font-weight: bold !重要;
+    background-color: #fafafaa3 !重要;
+}
+</style>
+
+<!--Logo and Copyright-->
+<script>
+window.onload = function(){
+var avatar=document.querySelector(".item img")
+var footer=document.querySelector("div.is-size-7")
+footer.innerHTML="Copyright info"
+footer.style.visibility="visible"
+avatar.src="https:/img.src"
+avatar.style.visibility="visible"
+}
+</script>
Click to expand/collapse
html
<style>
+.ui.fine.progress> .progress-bar {
+  background-color: #00a7d0 !important;
+}
+</style>
+
+<script>
+window.onload = function(){
+  var avatar = document.querySelector("img");
+  var footer = document.querySelector("div.footer-container");
+  footer.innerHTML = "©2021 Your Name & Powered by Your Name";
+  footer.style.visibility = "visible";
+  avatar.src = "Your Image URL";
+  avatar.style.visibility = "visible";
+}
+</script>
Click to expand/collapse
html
<style>
+.right.menu>a {
+  visibility: hidden;
+}
+.footer .is-size-7 {
+  visibility: hidden;
+}
+.item img {
+  visibility: hidden;
+}
+</style>
+<script>
+window.onload = function() {
+  var avatar = document.querySelector(".item img");
+  var footer = document.querySelector("div.is-size-7");
+  footer.innerHTML = "Powered by Your Name";
+  footer.style.visibility = "visible";
+  avatar.src = "Your Square Logo URL";
+  avatar.style.visibility = "visible";
+}
+</script>

Example of Changing Background Image in Hotaru Theme

Click to expand/collapse
html
<style>
+.hotaru-cover {
+   background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
+}
+</style>

View Password

If you don't want to display your Dashboard directly to visitors, you can set a view password here. After setting the password, visitors need to enter the password to access the homepage.

Non-CDN Dashboard Server Domain/IP

This setting is a prerequisite for using the one-click script to install the Agent. For details, please see here.

IP Change Notifications

If you want to receive notifications when a server's IP changes, you can set it up here.

Coverage

Select a rule to determine which servers to monitor. Choose according to your needs.

Specific Servers

Set exclusions for the selected rule in conjunction with the coverage scope.

Send Notifications to a Specific Notification Group

Choose a notification method, which should be set up in advance on the "Notification" page.

WARNING

Notifications take effect after enabling this setting.

Show Full IP Address in Notifications

IP change notifications hide the full IP by default. If you don't want to hide it, check "Show Full IP Address in Notification."

Disable Homepage Theme Switching

By default, the Dashboard allows visitors to change the theme. This feature only affects individual visitors and does not affect the theme set by the administrator in the admin panel. If you don't want visitors to switch themes, check this option.

`,39),l=[k];function t(p,e,r,E,d,g){return a(),i("div",null,l)}const o=s(h,[["render",t]]);export{F as __pageData,o as default}; diff --git a/assets/en_US_guide_settings.md.wx4ZCmxQ.lean.js b/assets/en_US_guide_settings.md.wx4ZCmxQ.lean.js new file mode 100644 index 00000000..fb759076 --- /dev/null +++ b/assets/en_US_guide_settings.md.wx4ZCmxQ.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"Settings","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/settings.md","filePath":"en_US/guide/settings.md","lastUpdated":1719239024000}'),h={name:"en_US/guide/settings.md"},k=n("",39),l=[k];function t(p,e,r,E,d,g){return a(),i("div",null,l)}const o=s(h,[["render",t]]);export{F as __pageData,o as default}; diff --git a/assets/en_US_guide_tasks.md.9c66a854.js b/assets/en_US_guide_tasks.md.9c66a854.js deleted file mode 100644 index 07cad425..00000000 --- a/assets/en_US_guide_tasks.md.9c66a854.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as o,R as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"Task Management","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/tasks.md","filePath":"en_US/guide/tasks.md","lastUpdated":1718495592000}'),n={name:"en_US/guide/tasks.md"},s=a('

Task Management

In the Tasks section, you can set up scheduled tasks, trigger tasks, and batch execute tasks on multiple servers.

Nezha Monitoring supports pushing commands to Agents for execution. This feature is highly flexible and can be used for regular backups using tools like restic or rclone, periodically restarting a service to reset network connections, or executing a task when an notification is triggered, such as running a script when CPU usage is high for an extended period.

How to Use

Go to the "Tasks" page in the admin panel and click "Add Scheduled Task." When adding a scheduled task, you need to fill in the following parameters:

  • Name: Customize a task name.

  • Task Type: Choose the type of task.

    • Scheduled Task: Executes periodically according to the schedule set below.
    • Trigger Task: Only executed when triggered by an API call or notification rule, runs once per trigger.
  • Schedule: Set the schedule time (not enable when using trigger task type). The time format is * * * * * *, corresponding to second minute hour day month weekday. For more details, see Cron Expression Format.
    For example: 0 0 3 * * * means "3 AM every day."

  • Command: Set the command to execute, similar to writing Shell/Bat scripts, but it's recommended not to use new lines; connect multiple commands with && or &.
    For example, to schedule a reboot, you can enter reboot here.

  • Coverage and Specific Servers: Select rules to determine which Agents execute the scheduled task, similar to the settings on the "Services" page. When using the trigger task type, you can choose "executed by the triggered server."

  • Notification Group: Choose the notification methods you have set up on the "Notifications" page. Click here for more details.

  • Send Success Notification: Check this option to trigger a notification upon successful task execution.

Managing Tasks

To manage existing scheduled tasks, go to the "Tasks" page in the admin panel. For each task configuration, the three icons on the right are:

  • Execute Immediately: Click to ignore the scheduled time and execute the task immediately.
  • Edit: Click to modify the task configuration.
  • Delete: Delete the scheduled task.

Frequently Asked Questions

  1. Command not found error
    If a command fails to run with a "command not found" error, it may be a PATH environment variable issue. On Linux servers, you can add source ~/.bashrc at the beginning of the command or use the absolute path to execute the command.
',11),i=[s];function r(c,l,d,u,h,g){return t(),o("div",null,i)}const k=e(n,[["render",r]]);export{p as __pageData,k as default}; diff --git a/assets/en_US_guide_tasks.md.9c66a854.lean.js b/assets/en_US_guide_tasks.md.9c66a854.lean.js deleted file mode 100644 index 467cfb0a..00000000 --- a/assets/en_US_guide_tasks.md.9c66a854.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as o,R as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"Task Management","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/tasks.md","filePath":"en_US/guide/tasks.md","lastUpdated":1718495592000}'),n={name:"en_US/guide/tasks.md"},s=a("",11),i=[s];function r(c,l,d,u,h,g){return t(),o("div",null,i)}const k=e(n,[["render",r]]);export{p as __pageData,k as default}; diff --git a/assets/en_US_guide_tasks.md.DSlKW8HO.js b/assets/en_US_guide_tasks.md.DSlKW8HO.js new file mode 100644 index 00000000..364fdec5 --- /dev/null +++ b/assets/en_US_guide_tasks.md.DSlKW8HO.js @@ -0,0 +1 @@ +import{_ as e,c as t,o,a4 as a}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"Task Management","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/tasks.md","filePath":"en_US/guide/tasks.md","lastUpdated":1719239024000}'),n={name:"en_US/guide/tasks.md"},s=a('

Task Management

In the Tasks section, you can set up scheduled tasks, trigger tasks, and batch execute tasks on multiple servers.

Nezha Monitoring supports pushing commands to Agents for execution. This feature is highly flexible and can be used for regular backups using tools like restic or rclone, periodically restarting a service to reset network connections, or executing a task when an notification is triggered, such as running a script when CPU usage is high for an extended period.

How to Use

Go to the "Tasks" page in the admin panel and click "Add Scheduled Task." When adding a scheduled task, you need to fill in the following parameters:

  • Name: Customize a task name.

  • Task Type: Choose the type of task.

    • Scheduled Task: Executes periodically according to the schedule set below.
    • Trigger Task: Only executed when triggered by an API call or notification rule, runs once per trigger.
  • Schedule: Set the schedule time (not enable when using trigger task type). The time format is * * * * * *, corresponding to second minute hour day month weekday. For more details, see Cron Expression Format.
    For example: 0 0 3 * * * means "3 AM every day."

  • Command: Set the command to execute, similar to writing Shell/Bat scripts, but it's recommended not to use new lines; connect multiple commands with && or &.
    For example, to schedule a reboot, you can enter reboot here.

  • Coverage and Specific Servers: Select rules to determine which Agents execute the scheduled task, similar to the settings on the "Services" page. When using the trigger task type, you can choose "executed by the triggered server."

  • Notification Group: Choose the notification methods you have set up on the "Notifications" page. Click here for more details.

  • Send Success Notification: Check this option to trigger a notification upon successful task execution.

Managing Tasks

To manage existing scheduled tasks, go to the "Tasks" page in the admin panel. For each task configuration, the three icons on the right are:

  • Execute Immediately: Click to ignore the scheduled time and execute the task immediately.
  • Edit: Click to modify the task configuration.
  • Delete: Delete the scheduled task.

Frequently Asked Questions

  1. Command not found error
    If a command fails to run with a "command not found" error, it may be a PATH environment variable issue. On Linux servers, you can add source ~/.bashrc at the beginning of the command or use the absolute path to execute the command.
',11),i=[s];function r(c,l,d,u,h,g){return o(),t("div",null,i)}const k=e(n,[["render",r]]);export{p as __pageData,k as default}; diff --git a/assets/en_US_guide_tasks.md.DSlKW8HO.lean.js b/assets/en_US_guide_tasks.md.DSlKW8HO.lean.js new file mode 100644 index 00000000..74a93235 --- /dev/null +++ b/assets/en_US_guide_tasks.md.DSlKW8HO.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o,a4 as a}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"Task Management","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en_US/guide/tasks.md","filePath":"en_US/guide/tasks.md","lastUpdated":1719239024000}'),n={name:"en_US/guide/tasks.md"},s=a("",11),i=[s];function r(c,l,d,u,h,g){return o(),t("div",null,i)}const k=e(n,[["render",r]]);export{p as __pageData,k as default}; diff --git a/assets/en_US_index.md.483599a8.js b/assets/en_US_index.md.wm6LXN_f.js similarity index 88% rename from assets/en_US_index.md.483599a8.js rename to assets/en_US_index.md.wm6LXN_f.js index 40300567..29d0c5a0 100644 --- a/assets/en_US_index.md.483599a8.js +++ b/assets/en_US_index.md.wm6LXN_f.js @@ -1 +1 @@ -import{_ as t,o as e,c as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"User Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"User Manual","hero":{"name":"Nezha Monitoring","text":"Open-source, lightweight, and easy-to-use server monitoring and operation tool","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Preview","link":"https://ops.naibahq.com"},{"theme":"alt","text":"Get Started →","link":"en_US/guide/dashboard"}]},"features":[{"title":"One-Click Installation","details":"Supports one-click installation of the Dashboard and Agent services, making it easy to operate. Compatible with mainstream systems, including Linux, Windows, macOS, OpenWRT, and Synology."},{"title":"Real-Time Monitoring","details":"Supports monitoring the status of multiple servers simultaneously, providing historical network status and latency charts, monitoring webpage and port availability, and SSL certificate status. Supports alerts for status such as faults and traffic, with notifications via Telegram, email, Slack, and more."},{"title":"Easy Operations","details":"Provides an API to get server status, supports WebSSH, DDNS, and traffic monitoring. Allows setting up scheduled and triggered tasks and executing server tasks in batches."}]},"headers":[],"relativePath":"en_US/index.md","filePath":"en_US/index.md","lastUpdated":1718495592000}'),i={name:"en_US/index.md"};function n(s,o,r,l,d,c){return e(),a("div")}const u=t(i,[["render",n]]);export{m as __pageData,u as default}; +import{_ as t,c as e,o as a}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"User Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"User Manual","hero":{"name":"Nezha Monitoring","text":"Open-source, lightweight, and easy-to-use server monitoring and operation tool","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Preview","link":"https://ops.naibahq.com"},{"theme":"alt","text":"Get Started →","link":"en_US/guide/dashboard"}]},"features":[{"title":"One-Click Installation","details":"Supports one-click installation of the Dashboard and Agent services, making it easy to operate. Compatible with mainstream systems, including Linux, Windows, macOS, OpenWRT, and Synology."},{"title":"Real-Time Monitoring","details":"Supports monitoring the status of multiple servers simultaneously, providing historical network status and latency charts, monitoring webpage and port availability, and SSL certificate status. Supports alerts for status such as faults and traffic, with notifications via Telegram, email, Slack, and more."},{"title":"Easy Operations","details":"Provides an API to get server status, supports WebSSH, DDNS, and traffic monitoring. Allows setting up scheduled and triggered tasks and executing server tasks in batches."}]},"headers":[],"relativePath":"en_US/index.md","filePath":"en_US/index.md","lastUpdated":1719239024000}'),i={name:"en_US/index.md"};function n(s,o,r,l,d,c){return a(),e("div")}const u=t(i,[["render",n]]);export{m as __pageData,u as default}; diff --git a/assets/en_US_index.md.483599a8.lean.js b/assets/en_US_index.md.wm6LXN_f.lean.js similarity index 88% rename from assets/en_US_index.md.483599a8.lean.js rename to assets/en_US_index.md.wm6LXN_f.lean.js index 40300567..29d0c5a0 100644 --- a/assets/en_US_index.md.483599a8.lean.js +++ b/assets/en_US_index.md.wm6LXN_f.lean.js @@ -1 +1 @@ -import{_ as t,o as e,c as a}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"User Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"User Manual","hero":{"name":"Nezha Monitoring","text":"Open-source, lightweight, and easy-to-use server monitoring and operation tool","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Preview","link":"https://ops.naibahq.com"},{"theme":"alt","text":"Get Started →","link":"en_US/guide/dashboard"}]},"features":[{"title":"One-Click Installation","details":"Supports one-click installation of the Dashboard and Agent services, making it easy to operate. Compatible with mainstream systems, including Linux, Windows, macOS, OpenWRT, and Synology."},{"title":"Real-Time Monitoring","details":"Supports monitoring the status of multiple servers simultaneously, providing historical network status and latency charts, monitoring webpage and port availability, and SSL certificate status. Supports alerts for status such as faults and traffic, with notifications via Telegram, email, Slack, and more."},{"title":"Easy Operations","details":"Provides an API to get server status, supports WebSSH, DDNS, and traffic monitoring. Allows setting up scheduled and triggered tasks and executing server tasks in batches."}]},"headers":[],"relativePath":"en_US/index.md","filePath":"en_US/index.md","lastUpdated":1718495592000}'),i={name:"en_US/index.md"};function n(s,o,r,l,d,c){return e(),a("div")}const u=t(i,[["render",n]]);export{m as __pageData,u as default}; +import{_ as t,c as e,o as a}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Nezha Monitoring","titleTemplate":"User Manual","description":"","frontmatter":{"layout":"home","title":"Nezha Monitoring","titleTemplate":"User Manual","hero":{"name":"Nezha Monitoring","text":"Open-source, lightweight, and easy-to-use server monitoring and operation tool","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"Preview","link":"https://ops.naibahq.com"},{"theme":"alt","text":"Get Started →","link":"en_US/guide/dashboard"}]},"features":[{"title":"One-Click Installation","details":"Supports one-click installation of the Dashboard and Agent services, making it easy to operate. Compatible with mainstream systems, including Linux, Windows, macOS, OpenWRT, and Synology."},{"title":"Real-Time Monitoring","details":"Supports monitoring the status of multiple servers simultaneously, providing historical network status and latency charts, monitoring webpage and port availability, and SSL certificate status. Supports alerts for status such as faults and traffic, with notifications via Telegram, email, Slack, and more."},{"title":"Easy Operations","details":"Provides an API to get server status, supports WebSSH, DDNS, and traffic monitoring. Allows setting up scheduled and triggered tasks and executing server tasks in batches."}]},"headers":[],"relativePath":"en_US/index.md","filePath":"en_US/index.md","lastUpdated":1719239024000}'),i={name:"en_US/index.md"};function n(s,o,r,l,d,c){return a(),e("div")}const u=t(i,[["render",n]]);export{m as __pageData,u as default}; diff --git a/assets/guide_agent.md.ca60d73d.js b/assets/guide_agent.md.ca60d73d.js deleted file mode 100644 index a56f4b7f..00000000 --- a/assets/guide_agent.md.ca60d73d.js +++ /dev/null @@ -1,145 +0,0 @@ -import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"安装 Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agent.md","filePath":"guide/agent.md","lastUpdated":1718495592000}'),p={name:"guide/agent.md"},o=l(`

安装 Agent

哪吒监控的被控端服务被称为 Agent,本文档将介绍如何在被控端服务器上安装 Agent,并与 Dashboard 连接。

TIP

Agent 二进制文件仓库地址为:https://github.com/nezhahq/agent/releases

一键安装 Agent

哪吒监控支持在 Windows 和 Linux 上一键安装 Agent。遵循本文档的步骤,你可以很轻松地在服务器上部署它。

准备工作

你需要提前在管理面板中设置好通信域名,此域名不可以接入 CDN。本文档以示例通信域名 “data.example.com” 为例。
进入后台管理面板,转到“设置”页,在“未接入 CDN 的面板服务器域名/IP”项中填入通信域名,然后点击"保存"。

在 Linux 中一键安装 (Ubuntu、Debian、CentOS)

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Linux 图标按钮,复制一键安装命令。
  3. 在被控端服务器中运行复制的一键安装命令,等待安装完成后返回到 Dashboard 主页查看服务器是否上线。

在 Windows 中一键安装

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Windows 图标按钮,复制一键安装命令。
  3. 进入 Windows 服务器,运行 PowerShell,在 PowerShell 中运行复制的安装命令。
  4. 如遇到确认「执行策略变更」请选择 Y。
  5. 等待安装完成后返回 Dashboard 主页查看服务器是否上线。

WARNING

如果在 PowerShell 中运行一键安装命令时遇到错误,请尝试下方的在 Windows 中手动安装 Agent

其他方式安装 Agent

在 Linux 中安装 Agent (Ubuntu、Debian、CentOS)

点击展开/收起
  1. 首先在管理面板中添加一台服务器。
  2. 在被控服务器中,运行脚本(位于中国大陆的服务器请使用镜像):
bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

如果你的被控服务器位于中国大陆,可以使用镜像:

bash
curl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
  1. 选择“安装监控 Agent”。
  2. 输入通信域名,如:”data.example.com“。
  3. 输入面板通信端口(gRPC 端口),默认为 5555。
  4. 输入 Agent 密钥,Agent 密钥在管理面板中添加服务器时生成,可以在管理面板中的“服务器”页中找到。
  5. 等待安装完成后返回 Dashboard 主页查看服务器是否上线。

在其他 Linux 发行版(如 Alpine 使用 Openrc)中安装 Agent

点击展开/收起

本节内容由 unknown0054 贡献。

  1. 修改 SERVER、SECRET、TLS,然后在 shell 中执行:
shell
cat >/etc/init.d/nezha-agent<< EOF
-#!/sbin/openrc-run
-SERVER="" # Dashboard 地址 ip:port
-SECRET="" # SECRET
-TLS="" # 是否启用 TLS,是 "--tls" ,否留空
-NZ_BASE_PATH="/opt/nezha"
-NZ_AGENT_PATH="\${NZ_BASE_PATH}/agent"
-pidfile="/run/\${RC_SVCNAME}.pid"
-command="/opt/nezha/agent/nezha-agent"
-command_args="-s \${SERVER} -p \${SECRET} \${TLS}"
-command_background=true
-depend() {
-  need net
-}
-checkconfig() {
-  GITHUB_URL="github.com"
-  if [ ! -f "\${NZ_AGENT_PATH}/nezha-agent" ]; then
-    if [[ $(uname -m | grep 'x86_64') != "" ]]; then
-      os_arch="amd64"
-    elif [[ $(uname -m | grep 'i386\\|i686') != "" ]]; then
-      os_arch="386"
-    elif [[ $(uname -m | grep 'aarch64\\|armv8b\\|armv8l') != "" ]]; then
-      os_arch="arm64"
-    elif [[ $(uname -m | grep 'arm') != "" ]]; then
-      os_arch="arm"
-    elif [[ $(uname -m | grep 's390x') != "" ]]; then
-      os_arch="s390x"
-    elif [[ $(uname -m | grep 'riscv64') != "" ]]; then
-      os_arch="riscv64"
-    fi
-    local version=$(curl -m 10 -sL "https://api.github.com/repos/nezhahq/agent/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\\"//g;s/,//g;s/ //g')
-    if [ ! -n "$version" ]; then
-      version=$(curl -m 10 -sL "https://fastly.jsdelivr.net/gh/nezhahq/agent/" | grep "option\\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\\/agent@/v/g')
-    fi
-    if [ ! -n "$version" ]; then
-      version=$(curl -m 10 -sL "https://gcore.jsdelivr.net/gh/nezhahq/agent/" | grep "option\\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\\/agent@/v/g')
-    fi
-    if [ ! -n "$version" ]; then
-      echo -e "获取版本号失败,请检查本机能否链接 https://api.github.com/repos/nezhahq/agent/releases/latest"
-      return 0
-    else
-      echo -e "当前最新版本为: \${version}"
-    fi
-    wget -t 2 -T 10 -O nezha-agent_linux_\${os_arch}.zip https://\${GITHUB_URL}/nezhahq/agent/releases/download/\${version}/nezha-agent_linux_\${os_arch}.zip >/dev/null 2>&1
-    if [[ $? != 0 ]]; then
-      echo -e "Release 下载失败,请检查本机能否连接 \${GITHUB_URL}\${plain}"
-      return 0
-    fi
-    mkdir -p $NZ_AGENT_PATH
-    chmod 755 -R $NZ_AGENT_PATH
-    unzip -qo nezha-agent_linux_\${os_arch}.zip && mv nezha-agent $NZ_AGENT_PATH && rm -rf nezha-agent_linux_\${os_arch}.zip README.md
-  fi
-  if [ ! -x "\${NZ_AGENT_PATH}/nezha-agent" ]; then
-    chmod +x \${NZ_AGENT_PATH}/nezha-agent
-  fi
-}
-start_pre() {
-  if [ "\${RC_CMD}" != "restart" ]; then
-    checkconfig || return $?
-  fi
-}
-EOF
  1. 增加运行权限
shell
chmod +x /etc/init.d/nezha-agent
  1. 运行 Nezha-Agent
shell
rc-service nezha-agent start
  1. 添加开机自启动
shell
rc-update add nezha-agent

在 Windows 中手动安装 Agent

在群晖 DSM 中安装 Agent

点击展开/收起
sh
# Agent 路径
-EXEC="/PATH/TO/nezha-agent"
-# 日志路径地址
-LOG="\${EXEC}.log"
-# 额外执行参数, 可留空
-ARGS=""
-# 哪吒服务端 gRPC 地址
-SERVER="HOST_OR_IP:gRPC_PORT"
-# 上一步获取的主机密钥
-SECRET="APP_SECRET"
-# 运行服务的用户名, *强烈建议使用非root用户执行*
-RUN_USER="nezha"
-
-# 写入到 systemd 服务文件
-cat << EOF > /usr/lib/systemd/system/nezha.service
-[Unit]
-Description=Nezha Agent Service
-After=network.target
-
-[Service]
-Type=simple
-ExecStart=/bin/nohup \${EXEC} \${ARGS} -s \${SERVER} -p \${SECRET} &>> \${LOG} &
-ExecStop=ps -fe |grep nezha-agent|awk '{print \\$2}'|xargs kill
-User=\${RUN_USER
-
-}
-Restart=on-abort
-
-[Install]
-WantedBy=multi-user.target
-EOF
-
-# 重载服务
-systemctl daemon-reload
-# 启动服务
-systemctl start nezha
-# 服务自启动
-systemctl enable nezha

‼️修改对应信息后‼️
使用 root 账号执行上述命令即可安装完成。

在 macOS 中安装 Agent

点击展开/收起

本节内容改编自 Mitsea Blog,改编已获得原作者授权

WARNING

安装过程中如提示“macOS 无法验证此 app“,请前往系统设置手动允许程序运行。

  1. 首先在管理面板中添加一台服务器。
  2. 前往 Release 页下载 Agent 二进制文件,根据 CPU 架构选择下载 darwin amd64 还是 arm64 的 Agent。
    如 Intel CPU 下载 amd64,Apple Silicon 下载 arm64 版本。下载完成后解压 Agent 二进制文件,如解压到下载文件夹。
  3. 新建一个名为 nezha_agent.plist 的文件并保存,修改文件内容如下:
xml
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>KeepAlive</key>
- <true/>
- <key>Label</key>
- <string>nezha_agent</string>
- <key>Program</key>
- <string>在这里修改 Agent 二进制文件的的路径,如:/Users/123/Downloads/nezha-agent</string>
- <key>ProgramArguments</key>
- <array>
-  <string>在这里修改 Agent 二进制文件的的路径,同上</string>
-  <string>--password</string>
-  <string>通信密钥,如:529664783eeb23cc25</string>
-  <string>--server</string>
-  <string>通信网址和 gRPC 端口,如:data.example.com:5555</string>
- </array>
- <key>RunAtLoad</key>
- <true/>
-</dict>
-</plist>
  1. 在 Terminal 中使用下面的命令加载 plist 文件到 launchd 里,注意替换文件路径
shell
launchctl load /Users/123/Desktop/nezha_agent.plist
  1. 启动进程:
shell
launchctl start nezha_agent
  1. 检查进程是否运行:
shell
launchctl list | grep nezha_agent
  1. 停止进程并移除:
shell
launchctl stop nezha_agent
shell
launchctl remove nezha_agent

在 macOS 中使用 Homebrew 安装 Agent

点击展开/收起

本节内容改编自 🐿️松鼠收集🌰,改编已获得原作者授权

WARNING

请务必先添加环境变量,再通过 Homebrew 安装 nezha-agent! 因 Homebrew 在软件安装时创建服务所需 plist 文件,若先安装再添加环境变量,会因缺少参数而启动失败。

  1. 添加环境变量:
shell
echo 'export HOMEBREW_NEZHA_AGENT_PASSWORD="通信密钥,在服务页面获取"' >> ~/.zshrc
-echo 'export HOMEBREW_NEZHA_AGENT_SERVER="你的服务器和端口,格式 your.domain:5555 "' >> ~/.zshrc
-source ~/.zshrc
  1. 安装 Nezha Agent:

DANGER

请注意,此 Homebrew 仓库由第三方维护,与哪吒监控无关。 Nezha 项目组不对该仓库的可用性和安全性等方面作出背书。在使用前,请自行评估风险!

由于暂未提交到 Homebrew Core 官方库,暂时放在上述博客作者参与维护的 第三方 Homebrew 仓库 中:

shell
brew install brewforge/chinese/nezha-agent
  1. 通过 Homebrew 启动 Nezha Agent 服务:
shell
brew services start nezha-agent
  1. 检查服务状态:
shell
brew services info nezha-agent
  1. 停止服务:
shell
brew services stop nezha-agent
  1. 卸载 Nezha Agent:
shell
brew rm nezha-agent
  1. 报错时先检查环境变量:
shell
echo $HOMEBREW_NEZHA_AGENT_PASSWORD
-echo $HOMEBREW_NEZHA_AGENT_SERVER
  1. 若环境变量配置正确,再尝试重装:
shell
brew services stop nezha-agent
-brew reinstall nezha-agent
-brew services start nezha-agent
  1. 若仍未解决,请前往上述 第三方 Homebrew 仓库 提交 issue。

在 OpenWRT 中安装 Agent

点击展开/收起

如何一步到位,解决安装过程中的疑难杂症?

如何使旧版 OpenWRT/LEDE 自启动?

如何使新版 OpenWRT 自启动? 贡献者:@艾斯德斯

  • 首先在 release 下载对应的二进制解压 zip 包后放置到 /root
  • 运行 chmod +x /root/nezha-agent 赋予执行权限,然后创建 /etc/init.d/nezha-service
shell
#!/bin/sh /etc/rc.common
-
-START=99
-USE_PROCD=1
-
-start_service() {
- procd_open_instance
- procd_set_param command /root/nezha-agent -s 面板通信地址:端口 -p 秘钥 -d
- procd_set_param respawn
- procd_close_instance
-}
-
-stop_service() {
-  killall nezha-agent
-}
-
-restart() {
- stop
- sleep 2
- start
-}
  • 运行 chmod +x /etc/init.d/nezha-service 赋予执行权限。
  • 启动服务: /etc/init.d/nezha-service enable && /etc/init.d/nezha-service start

Agent 有 Docker 镜像吗?

Agent 目前没有推出 Docker 镜像。
Agent 的设计思路和 Dashboard 相反,Dashboard 要尽可能不影响宿主机工作,但 Agent 则需要在宿主机中执行监控服务和运行命令。
将 Agent 放入容器中确实可以继续执行监控任务,但 WebShell 等功能无法正常运行,因此不提供 Docker 镜像。

`,29),e=[o];function t(c,r,D,y,C,i){return a(),n("div",null,e)}const h=s(p,[["render",t]]);export{A as __pageData,h as default}; diff --git a/assets/guide_agent.md.ca60d73d.lean.js b/assets/guide_agent.md.ca60d73d.lean.js deleted file mode 100644 index 5d90d994..00000000 --- a/assets/guide_agent.md.ca60d73d.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"安装 Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agent.md","filePath":"guide/agent.md","lastUpdated":1718495592000}'),p={name:"guide/agent.md"},o=l("",29),e=[o];function t(c,r,D,y,C,i){return a(),n("div",null,e)}const h=s(p,[["render",t]]);export{A as __pageData,h as default}; diff --git a/assets/guide_agent.md.rsLi-_uD.js b/assets/guide_agent.md.rsLi-_uD.js new file mode 100644 index 00000000..2a5aa0d9 --- /dev/null +++ b/assets/guide_agent.md.rsLi-_uD.js @@ -0,0 +1,145 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const o=JSON.parse('{"title":"安装 Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agent.md","filePath":"guide/agent.md","lastUpdated":1719239024000}'),t={name:"guide/agent.md"},l=n(`

安装 Agent

哪吒监控的被控端服务被称为 Agent,本文档将介绍如何在被控端服务器上安装 Agent,并与 Dashboard 连接。

TIP

Agent 二进制文件仓库地址为:https://github.com/nezhahq/agent/releases

一键安装 Agent

哪吒监控支持在 Windows 和 Linux 上一键安装 Agent。遵循本文档的步骤,你可以很轻松地在服务器上部署它。

准备工作

你需要提前在管理面板中设置好通信域名,此域名不可以接入 CDN。本文档以示例通信域名 “data.example.com” 为例。
进入后台管理面板,转到“设置”页,在“未接入 CDN 的面板服务器域名/IP”项中填入通信域名,然后点击"保存"。

在 Linux 中一键安装 (Ubuntu、Debian、CentOS)

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Linux 图标按钮,复制一键安装命令。
  3. 在被控端服务器中运行复制的一键安装命令,等待安装完成后返回到 Dashboard 主页查看服务器是否上线。

在 Windows 中一键安装

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Windows 图标按钮,复制一键安装命令。
  3. 进入 Windows 服务器,运行 PowerShell,在 PowerShell 中运行复制的安装命令。
  4. 如遇到确认「执行策略变更」请选择 Y。
  5. 等待安装完成后返回 Dashboard 主页查看服务器是否上线。

WARNING

如果在 PowerShell 中运行一键安装命令时遇到错误,请尝试下方的在 Windows 中手动安装 Agent

其他方式安装 Agent

在 Linux 中安装 Agent (Ubuntu、Debian、CentOS)

点击展开/收起
  1. 首先在管理面板中添加一台服务器。
  2. 在被控服务器中,运行脚本(位于中国大陆的服务器请使用镜像):
bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

如果你的被控服务器位于中国大陆,可以使用镜像:

bash
curl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
  1. 选择“安装监控 Agent”。
  2. 输入通信域名,如:”data.example.com“。
  3. 输入面板通信端口(gRPC 端口),默认为 5555。
  4. 输入 Agent 密钥,Agent 密钥在管理面板中添加服务器时生成,可以在管理面板中的“服务器”页中找到。
  5. 等待安装完成后返回 Dashboard 主页查看服务器是否上线。

在其他 Linux 发行版(如 Alpine 使用 Openrc)中安装 Agent

点击展开/收起

本节内容由 unknown0054 贡献。

  1. 修改 SERVER、SECRET、TLS,然后在 shell 中执行:
shell
cat >/etc/init.d/nezha-agent<< EOF
+#!/sbin/openrc-run
+SERVER="" # Dashboard 地址 ip:port
+SECRET="" # SECRET
+TLS="" # 是否启用 TLS,是 "--tls" ,否留空
+NZ_BASE_PATH="/opt/nezha"
+NZ_AGENT_PATH="\${NZ_BASE_PATH}/agent"
+pidfile="/run/\${RC_SVCNAME}.pid"
+command="/opt/nezha/agent/nezha-agent"
+command_args="-s \${SERVER} -p \${SECRET} \${TLS}"
+command_background=true
+depend() {
+  need net
+}
+checkconfig() {
+  GITHUB_URL="github.com"
+  if [ ! -f "\${NZ_AGENT_PATH}/nezha-agent" ]; then
+    if [[ $(uname -m | grep 'x86_64') != "" ]]; then
+      os_arch="amd64"
+    elif [[ $(uname -m | grep 'i386\\|i686') != "" ]]; then
+      os_arch="386"
+    elif [[ $(uname -m | grep 'aarch64\\|armv8b\\|armv8l') != "" ]]; then
+      os_arch="arm64"
+    elif [[ $(uname -m | grep 'arm') != "" ]]; then
+      os_arch="arm"
+    elif [[ $(uname -m | grep 's390x') != "" ]]; then
+      os_arch="s390x"
+    elif [[ $(uname -m | grep 'riscv64') != "" ]]; then
+      os_arch="riscv64"
+    fi
+    local version=$(curl -m 10 -sL "https://api.github.com/repos/nezhahq/agent/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\\"//g;s/,//g;s/ //g')
+    if [ ! -n "$version" ]; then
+      version=$(curl -m 10 -sL "https://fastly.jsdelivr.net/gh/nezhahq/agent/" | grep "option\\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\\/agent@/v/g')
+    fi
+    if [ ! -n "$version" ]; then
+      version=$(curl -m 10 -sL "https://gcore.jsdelivr.net/gh/nezhahq/agent/" | grep "option\\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\\/agent@/v/g')
+    fi
+    if [ ! -n "$version" ]; then
+      echo -e "获取版本号失败,请检查本机能否链接 https://api.github.com/repos/nezhahq/agent/releases/latest"
+      return 0
+    else
+      echo -e "当前最新版本为: \${version}"
+    fi
+    wget -t 2 -T 10 -O nezha-agent_linux_\${os_arch}.zip https://\${GITHUB_URL}/nezhahq/agent/releases/download/\${version}/nezha-agent_linux_\${os_arch}.zip >/dev/null 2>&1
+    if [[ $? != 0 ]]; then
+      echo -e "Release 下载失败,请检查本机能否连接 \${GITHUB_URL}\${plain}"
+      return 0
+    fi
+    mkdir -p $NZ_AGENT_PATH
+    chmod 755 -R $NZ_AGENT_PATH
+    unzip -qo nezha-agent_linux_\${os_arch}.zip && mv nezha-agent $NZ_AGENT_PATH && rm -rf nezha-agent_linux_\${os_arch}.zip README.md
+  fi
+  if [ ! -x "\${NZ_AGENT_PATH}/nezha-agent" ]; then
+    chmod +x \${NZ_AGENT_PATH}/nezha-agent
+  fi
+}
+start_pre() {
+  if [ "\${RC_CMD}" != "restart" ]; then
+    checkconfig || return $?
+  fi
+}
+EOF
  1. 增加运行权限
shell
chmod +x /etc/init.d/nezha-agent
  1. 运行 Nezha-Agent
shell
rc-service nezha-agent start
  1. 添加开机自启动
shell
rc-update add nezha-agent

在 Windows 中手动安装 Agent

在群晖 DSM 中安装 Agent

点击展开/收起
sh
# Agent 路径
+EXEC="/PATH/TO/nezha-agent"
+# 日志路径地址
+LOG="\${EXEC}.log"
+# 额外执行参数, 可留空
+ARGS=""
+# 哪吒服务端 gRPC 地址
+SERVER="HOST_OR_IP:gRPC_PORT"
+# 上一步获取的主机密钥
+SECRET="APP_SECRET"
+# 运行服务的用户名, *强烈建议使用非root用户执行*
+RUN_USER="nezha"
+
+# 写入到 systemd 服务文件
+cat << EOF > /usr/lib/systemd/system/nezha.service
+[Unit]
+Description=Nezha Agent Service
+After=network.target
+
+[Service]
+Type=simple
+ExecStart=/bin/nohup \${EXEC} \${ARGS} -s \${SERVER} -p \${SECRET} &>> \${LOG} &
+ExecStop=ps -fe |grep nezha-agent|awk '{print \\$2}'|xargs kill
+User=\${RUN_USER
+
+}
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
+EOF
+
+# 重载服务
+systemctl daemon-reload
+# 启动服务
+systemctl start nezha
+# 服务自启动
+systemctl enable nezha

‼️修改对应信息后‼️
使用 root 账号执行上述命令即可安装完成。

在 macOS 中安装 Agent

点击展开/收起

本节内容改编自 Mitsea Blog,改编已获得原作者授权

WARNING

安装过程中如提示“macOS 无法验证此 app“,请前往系统设置手动允许程序运行。

  1. 首先在管理面板中添加一台服务器。
  2. 前往 Release 页下载 Agent 二进制文件,根据 CPU 架构选择下载 darwin amd64 还是 arm64 的 Agent。
    如 Intel CPU 下载 amd64,Apple Silicon 下载 arm64 版本。下载完成后解压 Agent 二进制文件,如解压到下载文件夹。
  3. 新建一个名为 nezha_agent.plist 的文件并保存,修改文件内容如下:
xml
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>KeepAlive</key>
+ <true/>
+ <key>Label</key>
+ <string>nezha_agent</string>
+ <key>Program</key>
+ <string>在这里修改 Agent 二进制文件的的路径,如:/Users/123/Downloads/nezha-agent</string>
+ <key>ProgramArguments</key>
+ <array>
+  <string>在这里修改 Agent 二进制文件的的路径,同上</string>
+  <string>--password</string>
+  <string>通信密钥,如:529664783eeb23cc25</string>
+  <string>--server</string>
+  <string>通信网址和 gRPC 端口,如:data.example.com:5555</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+</dict>
+</plist>
  1. 在 Terminal 中使用下面的命令加载 plist 文件到 launchd 里,注意替换文件路径
shell
launchctl load /Users/123/Desktop/nezha_agent.plist
  1. 启动进程:
shell
launchctl start nezha_agent
  1. 检查进程是否运行:
shell
launchctl list | grep nezha_agent
  1. 停止进程并移除:
shell
launchctl stop nezha_agent
shell
launchctl remove nezha_agent

在 macOS 中使用 Homebrew 安装 Agent

点击展开/收起

本节内容改编自 🐿️松鼠收集🌰,改编已获得原作者授权

WARNING

请务必先添加环境变量,再通过 Homebrew 安装 nezha-agent! 因 Homebrew 在软件安装时创建服务所需 plist 文件,若先安装再添加环境变量,会因缺少参数而启动失败。

  1. 添加环境变量:
shell
echo 'export HOMEBREW_NEZHA_AGENT_PASSWORD="通信密钥,在服务页面获取"' >> ~/.zshrc
+echo 'export HOMEBREW_NEZHA_AGENT_SERVER="你的服务器和端口,格式 your.domain:5555 "' >> ~/.zshrc
+source ~/.zshrc
  1. 安装 Nezha Agent:

DANGER

请注意,此 Homebrew 仓库由第三方维护,与哪吒监控无关。 Nezha 项目组不对该仓库的可用性和安全性等方面作出背书。在使用前,请自行评估风险!

由于暂未提交到 Homebrew Core 官方库,暂时放在上述博客作者参与维护的 第三方 Homebrew 仓库 中:

shell
brew install brewforge/chinese/nezha-agent
  1. 通过 Homebrew 启动 Nezha Agent 服务:
shell
brew services start nezha-agent
  1. 检查服务状态:
shell
brew services info nezha-agent
  1. 停止服务:
shell
brew services stop nezha-agent
  1. 卸载 Nezha Agent:
shell
brew rm nezha-agent
  1. 报错时先检查环境变量:
shell
echo $HOMEBREW_NEZHA_AGENT_PASSWORD
+echo $HOMEBREW_NEZHA_AGENT_SERVER
  1. 若环境变量配置正确,再尝试重装:
shell
brew services stop nezha-agent
+brew reinstall nezha-agent
+brew services start nezha-agent
  1. 若仍未解决,请前往上述 第三方 Homebrew 仓库 提交 issue。

在 OpenWRT 中安装 Agent

点击展开/收起

如何一步到位,解决安装过程中的疑难杂症?

如何使旧版 OpenWRT/LEDE 自启动?

如何使新版 OpenWRT 自启动? 贡献者:@艾斯德斯

  • 首先在 release 下载对应的二进制解压 zip 包后放置到 /root
  • 运行 chmod +x /root/nezha-agent 赋予执行权限,然后创建 /etc/init.d/nezha-service
shell
#!/bin/sh /etc/rc.common
+
+START=99
+USE_PROCD=1
+
+start_service() {
+ procd_open_instance
+ procd_set_param command /root/nezha-agent -s 面板通信地址:端口 -p 秘钥 -d
+ procd_set_param respawn
+ procd_close_instance
+}
+
+stop_service() {
+  killall nezha-agent
+}
+
+restart() {
+ stop
+ sleep 2
+ start
+}
  • 运行 chmod +x /etc/init.d/nezha-service 赋予执行权限。
  • 启动服务: /etc/init.d/nezha-service enable && /etc/init.d/nezha-service start

Agent 有 Docker 镜像吗?

Agent 目前没有推出 Docker 镜像。
Agent 的设计思路和 Dashboard 相反,Dashboard 要尽可能不影响宿主机工作,但 Agent 则需要在宿主机中执行监控服务和运行命令。
将 Agent 放入容器中确实可以继续执行监控任务,但 WebShell 等功能无法正常运行,因此不提供 Docker 镜像。

`,29),h=[l];function e(p,k,r,g,d,F){return a(),i("div",null,h)}const c=s(t,[["render",e]]);export{o as __pageData,c as default}; diff --git a/assets/guide_agent.md.rsLi-_uD.lean.js b/assets/guide_agent.md.rsLi-_uD.lean.js new file mode 100644 index 00000000..eb9136cb --- /dev/null +++ b/assets/guide_agent.md.rsLi-_uD.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const o=JSON.parse('{"title":"安装 Agent","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agent.md","filePath":"guide/agent.md","lastUpdated":1719239024000}'),t={name:"guide/agent.md"},l=n("",29),h=[l];function e(p,k,r,g,d,F){return a(),i("div",null,h)}const c=s(t,[["render",e]]);export{o as __pageData,c as default}; diff --git a/assets/guide_agentq.md.FPZHBF1_.js b/assets/guide_agentq.md.FPZHBF1_.js new file mode 100644 index 00000000..0aa226dd --- /dev/null +++ b/assets/guide_agentq.md.FPZHBF1_.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a4 as n}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Agent 常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agentq.md","filePath":"guide/agentq.md","lastUpdated":1719239024000}'),o={name:"guide/agentq.md"},i=n('

Agent 常见问题

后台显示的 IP 和 Agent 实际 IP 不一致?

请查看 Dashboard 相关-为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?。在此不再赘述。

一键脚本安装时出错

curl: Failed to connect to raw.githubusercontent.com......

多出现在中国大陆的服务器中,目前一键脚本只从 Github 直接获取安装脚本,您可以多尝试几次,或者手动安装 Agent。另外,也可以自行寻找第三方 Github 加速服务或者镜像,并在一键安装脚本中设置。

sudo: command not found

请先手动安装 sudo,例如在 Ubuntu 中:

shell
apt install sudo
',9),s=[i];function d(r,l,c,h,u,p){return e(),t("div",null,s)}const _=a(o,[["render",d]]);export{m as __pageData,_ as default}; diff --git a/assets/guide_agentq.md.FPZHBF1_.lean.js b/assets/guide_agentq.md.FPZHBF1_.lean.js new file mode 100644 index 00000000..e2ed37c6 --- /dev/null +++ b/assets/guide_agentq.md.FPZHBF1_.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a4 as n}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"Agent 常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agentq.md","filePath":"guide/agentq.md","lastUpdated":1719239024000}'),o={name:"guide/agentq.md"},i=n("",9),s=[i];function d(r,l,c,h,u,p){return e(),t("div",null,s)}const _=a(o,[["render",d]]);export{m as __pageData,_ as default}; diff --git a/assets/guide_agentq.md.a7c6d5c4.js b/assets/guide_agentq.md.a7c6d5c4.js deleted file mode 100644 index b99fce8e..00000000 --- a/assets/guide_agentq.md.a7c6d5c4.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as e,c as t,R as n}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"Agent 常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agentq.md","filePath":"guide/agentq.md","lastUpdated":1718495592000}'),o={name:"guide/agentq.md"},s=n('

Agent 常见问题

后台显示的 IP 和 Agent 实际 IP 不一致?

请查看 Dashboard 相关-为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?。在此不再赘述。

一键脚本安装时出错

curl: Failed to connect to raw.githubusercontent.com......

多出现在中国大陆的服务器中,目前一键脚本只从 Github 直接获取安装脚本,您可以多尝试几次,或者手动安装 Agent。另外,也可以自行寻找第三方 Github 加速服务或者镜像,并在一键安装脚本中设置。

sudo: command not found

请先手动安装 sudo,例如在 Ubuntu 中:

shell
apt install sudo
',9),l=[s];function r(c,i,d,u,h,p){return e(),t("div",null,l)}const _=a(o,[["render",r]]);export{m as __pageData,_ as default}; diff --git a/assets/guide_agentq.md.a7c6d5c4.lean.js b/assets/guide_agentq.md.a7c6d5c4.lean.js deleted file mode 100644 index fe8aebc2..00000000 --- a/assets/guide_agentq.md.a7c6d5c4.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as e,c as t,R as n}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"Agent 常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/agentq.md","filePath":"guide/agentq.md","lastUpdated":1718495592000}'),o={name:"guide/agentq.md"},s=n("",9),l=[s];function r(c,i,d,u,h,p){return e(),t("div",null,l)}const _=a(o,[["render",r]]);export{m as __pageData,_ as default}; diff --git a/assets/guide_api.md.8b2774bf.js b/assets/guide_api.md.8b2774bf.js deleted file mode 100644 index c51b204c..00000000 --- a/assets/guide_api.md.8b2774bf.js +++ /dev/null @@ -1,138 +0,0 @@ -import{_ as s,o as n,c as a,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"API 接口","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/api.md","filePath":"guide/api.md","lastUpdated":1718495592000}'),l={name:"guide/api.md"},p=o(`

API 接口

哪吒监控支持使用 API 接口查询面板中 Agent 的状态信息

创建 Token

哪吒面板的 API 接口允许使用 Token 认证与 Cookies 认证。要新建一个 Token,在进入管理面板后,点击右上角的头像,选择 “API Token”,进入 Token 管理页面。点击 “API Token”,自定义备注后,点击 “添加”。

如需删除一个 Token,请选择相应的 Token,点击右侧的删除图标。

WARNING

Token 是 API 接口的鉴权凭据,它对你的面板的信息安全非常重要,请不要泄漏你的 Token 给他人。

认证方式

确保在请求头中包含 Authorization: Token 进行身份认证。

Token 认证方式:

Request Headers:
-Authorization: Token

使用说明

WARNING

下面示例中的负数时间戳为(0000-00-00),目前表示 Dashboard 上线后该 Agent 从未汇报过,但不建议用正负性判断状态。

TIP

请求方式为 GET,返回格式为 JSON

获取服务器列表

请求:

GET /api/v1/server/list?tag=

参数:

  • tag(可选):ServerTag 是服务器的分组,提供此参数则仅查询该分组中的服务器。

返回示例:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653014667,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1"
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": ""
-        }
-    ]
-}

获取服务器详情

请求:

GET /api/v1/server/details?id=&tag=

参数:

  • id(可选):ServerID,多个 ID 以逗号分隔,提供此参数则查询该 ID 对应的服务器,同时无视 tag 参数。
  • tag(可选):ServerTag,提供此参数则仅查询该分组下的服务器。

返回示例:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653015042,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1",
-            "host": {
-                "Platform": "darwin",
-                "PlatformVersion": "12.3.1",
-                "CPU": [
-                    "Apple M1 Pro 1 Physical Core"
-                ],
-                "MemTotal": 17179869184,
-                "DiskTotal": 2473496842240,
-                "SwapTotal": 0,
-                "Arch": "arm64",
-                "Virtualization": "",
-                "BootTime": 1652683962,
-                "CountryCode": "hk",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 17.33,
-                "MemUsed": 14013841408,
-                "SwapUsed": 0,
-                "DiskUsed": 2335048912896,
-                "NetInTransfer": 2710273234,
-                "NetOutTransfer": 695454765,
-                "NetInSpeed": 10806,
-                "NetOutSpeed": 5303,
-                "Uptime": 331080,
-                "Load1": 5.23,
-                "Load5": 4.87,
-                "Load15": 3.99,
-                "TcpConnCount": 195,
-                "UdpConnCount": 70,
-                "ProcessCount": 437
-            }
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": "",
-            "host": {
-                "Platform": "",
-                "PlatformVersion": "",
-                "CPU": null,
-                "MemTotal": 0,
-                "DiskTotal": 0,
-                "SwapTotal": 0,
-                "Arch": "",
-                "Virtualization": "",
-                "BootTime": 0,
-                "CountryCode": "",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 0,
-                "MemUsed": 0,
-                "SwapUsed": 0,
-                "DiskUsed": 0,
-                "NetInTransfer": 0,
-                "NetOutTransfer": 0,
-                "NetInSpeed": 0,
-                "NetOutSpeed": 0,
-                "Uptime": 0,
-                "Load1": 0,
-                "Load5": 0,
-                "Load15": 0,
-                "TcpConnCount": 0,
-                "UdpConnCount": 0,
-                "ProcessCount": 0
-            }
-        }
-    ]
-}

使用案例

获取所有服务器信息

python
import requests
-
-url = "http://your-dashboard/api/v1/server/list"
-headers = {
-    "Authorization": "your_token"
-}
-
-response = requests.get(url, headers=headers)
-data = response.json()
-
-for server in data['result']:
-    print(f"Server Name: {server['name']}, Last Active: {server['last_active']}, IP: {server['valid_ip']}")

获取特定服务器详情

python
import requests
-
-server_id = 1  # 替换为你的服务器ID
-url = f"http://your-dashboard/api/v1/server/details?id={server_id}"
-headers = {
-    "Authorization": "your_token"
-}
-
-response = requests.get(url, headers=headers)
-data = response.json()
-
-server = data['result'][0]
-print(f"Server Name: {server['name']}")
-print(f"CPU Usage: {server['status']['CPU']}%")
-print(f"Memory Used: {server['status']['MemUsed']} bytes")
-print(f"Disk Used: {server['status']['DiskUsed']} bytes")
-print(f"Network In Speed: {server['status']['NetInSpeed']} bytes/s")
-print(f"Network Out Speed: {server['status']['NetOutSpeed']} bytes/s")

通过以上示例代码,可以轻松获取和处理服务器的状态信息,从而实现自动化监控和管理。

`,33),t=[p];function e(D,F,c,r,y,C){return n(),a("div",null,t)}const i=s(l,[["render",e]]);export{u as __pageData,i as default}; diff --git a/assets/guide_api.md.8b2774bf.lean.js b/assets/guide_api.md.8b2774bf.lean.js deleted file mode 100644 index 4a5cdbcc..00000000 --- a/assets/guide_api.md.8b2774bf.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as n,c as a,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"API 接口","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/api.md","filePath":"guide/api.md","lastUpdated":1718495592000}'),l={name:"guide/api.md"},p=o("",33),t=[p];function e(D,F,c,r,y,C){return n(),a("div",null,t)}const i=s(l,[["render",e]]);export{u as __pageData,i as default}; diff --git a/assets/guide_api.md.BqAGPlfh.js b/assets/guide_api.md.BqAGPlfh.js new file mode 100644 index 00000000..6612be7c --- /dev/null +++ b/assets/guide_api.md.BqAGPlfh.js @@ -0,0 +1,138 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const y=JSON.parse('{"title":"API 接口","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/api.md","filePath":"guide/api.md","lastUpdated":1719239024000}'),h={name:"guide/api.md"},t=n(`

API 接口

哪吒监控支持使用 API 接口查询面板中 Agent 的状态信息

创建 Token

哪吒面板的 API 接口允许使用 Token 认证与 Cookies 认证。要新建一个 Token,在进入管理面板后,点击右上角的头像,选择 “API Token”,进入 Token 管理页面。点击 “API Token”,自定义备注后,点击 “添加”。

如需删除一个 Token,请选择相应的 Token,点击右侧的删除图标。

WARNING

Token 是 API 接口的鉴权凭据,它对你的面板的信息安全非常重要,请不要泄漏你的 Token 给他人。

认证方式

确保在请求头中包含 Authorization: Token 进行身份认证。

Token 认证方式:

Request Headers:
+Authorization: Token

使用说明

WARNING

下面示例中的负数时间戳为(0000-00-00),目前表示 Dashboard 上线后该 Agent 从未汇报过,但不建议用正负性判断状态。

TIP

请求方式为 GET,返回格式为 JSON

获取服务器列表

请求:

GET /api/v1/server/list?tag=

参数:

  • tag(可选):ServerTag 是服务器的分组,提供此参数则仅查询该分组中的服务器。

返回示例:

json
{
+    "code": 0,
+    "message": "success",
+    "result": [
+        {
+            "id": 1,
+            "name": "Server1",
+            "tag": "Tag1",
+            "last_active": 1653014667,
+            "ipv4": "1.1.1.1",
+            "ipv6": "",
+            "valid_ip": "1.1.1.1"
+        },
+        {
+            "id": 2,
+            "name": "Server2",
+            "tag": "Tag2",
+            "last_active": -62135596800,
+            "ipv4": "",
+            "ipv6": "",
+            "valid_ip": ""
+        }
+    ]
+}

获取服务器详情

请求:

GET /api/v1/server/details?id=&tag=

参数:

  • id(可选):ServerID,多个 ID 以逗号分隔,提供此参数则查询该 ID 对应的服务器,同时无视 tag 参数。
  • tag(可选):ServerTag,提供此参数则仅查询该分组下的服务器。

返回示例:

json
{
+    "code": 0,
+    "message": "success",
+    "result": [
+        {
+            "id": 1,
+            "name": "Server1",
+            "tag": "Tag1",
+            "last_active": 1653015042,
+            "ipv4": "1.1.1.1",
+            "ipv6": "",
+            "valid_ip": "1.1.1.1",
+            "host": {
+                "Platform": "darwin",
+                "PlatformVersion": "12.3.1",
+                "CPU": [
+                    "Apple M1 Pro 1 Physical Core"
+                ],
+                "MemTotal": 17179869184,
+                "DiskTotal": 2473496842240,
+                "SwapTotal": 0,
+                "Arch": "arm64",
+                "Virtualization": "",
+                "BootTime": 1652683962,
+                "CountryCode": "hk",
+                "Version": ""
+            },
+            "status": {
+                "CPU": 17.33,
+                "MemUsed": 14013841408,
+                "SwapUsed": 0,
+                "DiskUsed": 2335048912896,
+                "NetInTransfer": 2710273234,
+                "NetOutTransfer": 695454765,
+                "NetInSpeed": 10806,
+                "NetOutSpeed": 5303,
+                "Uptime": 331080,
+                "Load1": 5.23,
+                "Load5": 4.87,
+                "Load15": 3.99,
+                "TcpConnCount": 195,
+                "UdpConnCount": 70,
+                "ProcessCount": 437
+            }
+        },
+        {
+            "id": 2,
+            "name": "Server2",
+            "tag": "Tag2",
+            "last_active": -62135596800,
+            "ipv4": "",
+            "ipv6": "",
+            "valid_ip": "",
+            "host": {
+                "Platform": "",
+                "PlatformVersion": "",
+                "CPU": null,
+                "MemTotal": 0,
+                "DiskTotal": 0,
+                "SwapTotal": 0,
+                "Arch": "",
+                "Virtualization": "",
+                "BootTime": 0,
+                "CountryCode": "",
+                "Version": ""
+            },
+            "status": {
+                "CPU": 0,
+                "MemUsed": 0,
+                "SwapUsed": 0,
+                "DiskUsed": 0,
+                "NetInTransfer": 0,
+                "NetOutTransfer": 0,
+                "NetInSpeed": 0,
+                "NetOutSpeed": 0,
+                "Uptime": 0,
+                "Load1": 0,
+                "Load5": 0,
+                "Load15": 0,
+                "TcpConnCount": 0,
+                "UdpConnCount": 0,
+                "ProcessCount": 0
+            }
+        }
+    ]
+}

使用案例

获取所有服务器信息

python
import requests
+
+url = "http://your-dashboard/api/v1/server/list"
+headers = {
+    "Authorization": "your_token"
+}
+
+response = requests.get(url, headers=headers)
+data = response.json()
+
+for server in data['result']:
+    print(f"Server Name: {server['name']}, Last Active: {server['last_active']}, IP: {server['valid_ip']}")

获取特定服务器详情

python
import requests
+
+server_id = 1  # 替换为你的服务器ID
+url = f"http://your-dashboard/api/v1/server/details?id={server_id}"
+headers = {
+    "Authorization": "your_token"
+}
+
+response = requests.get(url, headers=headers)
+data = response.json()
+
+server = data['result'][0]
+print(f"Server Name: {server['name']}")
+print(f"CPU Usage: {server['status']['CPU']}%")
+print(f"Memory Used: {server['status']['MemUsed']} bytes")
+print(f"Disk Used: {server['status']['DiskUsed']} bytes")
+print(f"Network In Speed: {server['status']['NetInSpeed']} bytes/s")
+print(f"Network Out Speed: {server['status']['NetOutSpeed']} bytes/s")

通过以上示例代码,可以轻松获取和处理服务器的状态信息,从而实现自动化监控和管理。

`,33),k=[t];function p(l,E,e,r,d,g){return a(),i("div",null,k)}const o=s(h,[["render",p]]);export{y as __pageData,o as default}; diff --git a/assets/guide_api.md.BqAGPlfh.lean.js b/assets/guide_api.md.BqAGPlfh.lean.js new file mode 100644 index 00000000..b531fa6e --- /dev/null +++ b/assets/guide_api.md.BqAGPlfh.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const y=JSON.parse('{"title":"API 接口","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/api.md","filePath":"guide/api.md","lastUpdated":1719239024000}'),h={name:"guide/api.md"},t=n("",33),k=[t];function p(l,E,e,r,d,g){return a(),i("div",null,k)}const o=s(h,[["render",p]]);export{y as __pageData,o as default}; diff --git a/assets/guide_dashboard.md.83e865a5.js b/assets/guide_dashboard.md.83e865a5.js deleted file mode 100644 index 4bbde01f..00000000 --- a/assets/guide_dashboard.md.83e865a5.js +++ /dev/null @@ -1,21 +0,0 @@ -import{_ as a,o as s,c as e,R as o}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"安装 Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1718495592000}'),l={name:"guide/dashboard.md"},n=o(`

安装 Dashboard

准备工作

搭建一个哪吒监控,你需要:

  1. 一台可以连接公网的服务器,防火墙和安全策略需要放行 8008 和 5555 端口,否则会无法访问和无法接收数据。单核 512MB 内存的服务器配置就足以满足大多数使用场景。
  2. 一个已经设置好 A 记录,指向 Dashboard 服务器 IP 的域名。

TIP

如果你想使用 CDN,请准备两个域名,一个配置好 CDN 用作公开访问,CDN 需要支持 WebSocket 协议;另一个域名不要使用 CDN,用作 Agent 端与 Dashboard 的通信。

本文档分别以 "dashboard.example.com" 和 "data.example.com" 两个域名来演示。

  1. 一个 Github 账号(或:Gitlab、Gitee)。

本文档将以宝塔面板反代 Dashboard 的过程作为示范,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考。

WARNING

本项目并不依赖宝塔,你可以选择使用你喜欢的任何服务器面板,或手动安装 Nginx 或 Caddy 来配置 SSL 和反代。
如果你认为没有必要使用 80、443 端口来访问 Dashboard,你甚至不需要安装 Nginx 就可以直接使用安装脚本安装并运行哪吒监控。

获取 Github 的 Client ID 和密钥

哪吒监控接入 Github、Gitlab、Gitee 作为后台管理员账号。

  1. 首先我们需要新建一个验证应用,以 Github 为例,登录 Github 后,打开 https://github.com/settings/developers,依次选择“OAuth Apps” - “New OAuth App”。
    Application name - 随意填写。
    Homepage URL - 填写面板的访问域名,如:"http://dashboard.example.com"(你的域名)。
    Authorization callback URL - 填写回调地址,如:"http://dashboard.example.com/oauth2/callback"(不要忘记/oauth2/callback)。
  2. 点击 “Register application”。
  3. 保存页面中的 Client ID,然后点击 “Generate a new client secret“,创建一个新的 Client Secret,新建的密钥仅会显示一次,请妥善保存

使用 Cloudflare Access 作为 OAuth2 提供方

位于中国大陆的用户可能无法直接连接 Github,如您在使用 Github、Gitlab、Gitee 作为管理员账户登录时遇到问题,可以优先考虑切换 使用 Cloudflare Access 作为 OAuth2 提供方 作为登录方式。

新建 SaaS-OIDC 应用流程

  1. 前往 Zero Trust Dashboard,使用 Cloudflare 账号登录。
  2. My Team -> Users -> <具体用户> -> 获取 User ID 并保存。
  3. Access -> Application -> Add an Application
  4. 选择 SaaS,在 Application 中输入自定义的应用名称(例如 nezha),选择 OIDC 后点击 Add application
  5. Scopes 选择 openid, email, profile, groups
  6. Redirect URLs 填写你的 callback 地址,例如 https://dashboard.example.com/oauth2/callback
  7. 保存 Client IDClient SecretIssuer 地址中协议与域名的部分,例如 https://xxxxx.cloudflareaccess.com

如使用此方式,安装 Dashboard 完成后,需要修改配置文件 /opt/nezha/dashboard/data/config.yaml,将 Endpoint 配置修改为之前保存的 Issuer 地址,例如 https://xxxxx.cloudflareaccess.com,保存后需重启 Dashboard。

在服务器中安装 Dashboard

在面板服务器中,运行安装脚本:

bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

如果你的面板服务器位于中国大陆,可以使用镜像:

bash
curl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh

等待 Docker 安装完毕后,分别输入以下值:

  • OAuth提供商 - github、cloudflare、gitlab、gitee 中选择一个。
  • Client ID - 之前保存的 Client ID。
  • Client Secret - 之前保存的 Client Secret。
  • 用户名 - OAuth 提供商中的用户名/User ID。
  • 站点标题 - 自定义站点标题。
  • 访问端口 - 公开访问端口,可自定义,默认 8008。
  • Agent的通信端口 - Agent 与 Dashboard 的通信端口,默认 5555。

输入完成后,等待拉取镜像。
安装结束后,如果一切正常,此时你可以访问域名+端口号,如 “http://dashboard.example.com:8008” 来查看面板。

将来如果需要再次运行脚本,可以运行:

bash
./nezha.sh

来打开管理脚本。

配置反向代理

在宝塔面板中新建一个站点,域名填写公开访问域名,如 “http://dashboard.example.com“ ,然后点击“设置”进入站点设置选项,选择“反向代理” - “新建反向代理”。

自定义一个代理名称,在下方“目标 URL”中填入 http://127.0.0.1 然后点击“保存”。

打开刚刚新建的反向代理右边的“配置文件”,将配置文件替换为以下内容:

nginx
#PROXY-START/
-location / {
-    proxy_pass http://127.0.0.1:8008;
-    proxy_set_header Host $http_host;
-    proxy_set_header      Upgrade $http_upgrade;
-}
-location ~ ^/(ws|terminal/.+)$  {
-    proxy_pass http://127.0.0.1:8008;
-    proxy_http_version 1.1;
-    proxy_set_header Upgrade $http_upgrade;
-    proxy_set_header Connection "Upgrade";
-    proxy_set_header Host $http_host;
-}
-#PROXY-END/

点击“保存”。
现在,你应该可以直接使用域名,如:“http://dashboard.example.com“ 来访问面板了。

扩展内容:

CaddyServer v1(v2 无需特别配置):

caddy
proxy /ws http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}
-proxy /terminal/* http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}

在宝塔面板中配置 SSL

首先,先暂时关闭反向代理。
正如在其他网站中配置 SSL 证书一样,进入站点设置中的 “SSL”,你可以选择自动申请 Let´s Encrypt 证书或手动配置已有的证书。
完成 SSL 的设置后,你需要回到 https://github.com/settings/developers ,编辑之前创建的验证应用程序,将之前我们填入的 "Homepage URL" 和 "Authorization callback URL" 中的域名全部从 http 改为 https,如:"https://dashboard.example.com" 和 "https://dashboard.example.com/oauth2/callback" ,不更改此项可能会导致你无法登录面板后台

更新 Dashboard

运行脚本 ./nezha.sh ,选择重启面板并更新。

`,40),t=[n];function p(c,r,d,i,h,C){return s(),e("div",null,t)}const y=a(l,[["render",p]]);export{A as __pageData,y as default}; diff --git a/assets/guide_dashboard.md.83e865a5.lean.js b/assets/guide_dashboard.md.83e865a5.lean.js deleted file mode 100644 index 8a983f2e..00000000 --- a/assets/guide_dashboard.md.83e865a5.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as s,c as e,R as o}from"./chunks/framework.44fd0451.js";const A=JSON.parse('{"title":"安装 Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1718495592000}'),l={name:"guide/dashboard.md"},n=o("",40),t=[n];function p(c,r,d,i,h,C){return s(),e("div",null,t)}const y=a(l,[["render",p]]);export{A as __pageData,y as default}; diff --git a/assets/guide_dashboard.md.C6o-Roy3.js b/assets/guide_dashboard.md.C6o-Roy3.js new file mode 100644 index 00000000..08839e67 --- /dev/null +++ b/assets/guide_dashboard.md.C6o-Roy3.js @@ -0,0 +1,21 @@ +import{_ as a,c as s,o as e,a4 as i}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"安装 Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1719239024000}'),t={name:"guide/dashboard.md"},l=i(`

安装 Dashboard

准备工作

搭建一个哪吒监控,你需要:

  1. 一台可以连接公网的服务器,防火墙和安全策略需要放行 8008 和 5555 端口,否则会无法访问和无法接收数据。单核 512MB 内存的服务器配置就足以满足大多数使用场景。
  2. 一个已经设置好 A 记录,指向 Dashboard 服务器 IP 的域名。

TIP

如果你想使用 CDN,请准备两个域名,一个配置好 CDN 用作公开访问,CDN 需要支持 WebSocket 协议;另一个域名不要使用 CDN,用作 Agent 端与 Dashboard 的通信。

本文档分别以 "dashboard.example.com" 和 "data.example.com" 两个域名来演示。

  1. 一个 Github 账号(或:Gitlab、Gitee)。

本文档将以宝塔面板反代 Dashboard 的过程作为示范,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考。

WARNING

本项目并不依赖宝塔,你可以选择使用你喜欢的任何服务器面板,或手动安装 Nginx 或 Caddy 来配置 SSL 和反代。
如果你认为没有必要使用 80、443 端口来访问 Dashboard,你甚至不需要安装 Nginx 就可以直接使用安装脚本安装并运行哪吒监控。

获取 Github 的 Client ID 和密钥

哪吒监控接入 Github、Gitlab、Gitee 作为后台管理员账号。

  1. 首先我们需要新建一个验证应用,以 Github 为例,登录 Github 后,打开 https://github.com/settings/developers,依次选择“OAuth Apps” - “New OAuth App”。
    Application name - 随意填写。
    Homepage URL - 填写面板的访问域名,如:"http://dashboard.example.com"(你的域名)。
    Authorization callback URL - 填写回调地址,如:"http://dashboard.example.com/oauth2/callback"(不要忘记/oauth2/callback)。
  2. 点击 “Register application”。
  3. 保存页面中的 Client ID,然后点击 “Generate a new client secret“,创建一个新的 Client Secret,新建的密钥仅会显示一次,请妥善保存

使用 Cloudflare Access 作为 OAuth2 提供方

位于中国大陆的用户可能无法直接连接 Github,如您在使用 Github、Gitlab、Gitee 作为管理员账户登录时遇到问题,可以优先考虑切换 使用 Cloudflare Access 作为 OAuth2 提供方 作为登录方式。

新建 SaaS-OIDC 应用流程

  1. 前往 Zero Trust Dashboard,使用 Cloudflare 账号登录。
  2. My Team -> Users -> <具体用户> -> 获取 User ID 并保存。
  3. Access -> Application -> Add an Application
  4. 选择 SaaS,在 Application 中输入自定义的应用名称(例如 nezha),选择 OIDC 后点击 Add application
  5. Scopes 选择 openid, email, profile, groups
  6. Redirect URLs 填写你的 callback 地址,例如 https://dashboard.example.com/oauth2/callback
  7. 保存 Client IDClient SecretIssuer 地址中协议与域名的部分,例如 https://xxxxx.cloudflareaccess.com

如使用此方式,安装 Dashboard 完成后,需要修改配置文件 /opt/nezha/dashboard/data/config.yaml,将 Endpoint 配置修改为之前保存的 Issuer 地址,例如 https://xxxxx.cloudflareaccess.com,保存后需重启 Dashboard。

在服务器中安装 Dashboard

在面板服务器中,运行安装脚本:

bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

如果你的面板服务器位于中国大陆,可以使用镜像:

bash
curl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh

等待 Docker 安装完毕后,分别输入以下值:

  • OAuth提供商 - github、cloudflare、gitlab、gitee 中选择一个。
  • Client ID - 之前保存的 Client ID。
  • Client Secret - 之前保存的 Client Secret。
  • 用户名 - OAuth 提供商中的用户名/User ID。
  • 站点标题 - 自定义站点标题。
  • 访问端口 - 公开访问端口,可自定义,默认 8008。
  • Agent的通信端口 - Agent 与 Dashboard 的通信端口,默认 5555。

输入完成后,等待拉取镜像。
安装结束后,如果一切正常,此时你可以访问域名+端口号,如 “http://dashboard.example.com:8008” 来查看面板。

将来如果需要再次运行脚本,可以运行:

bash
./nezha.sh

来打开管理脚本。

配置反向代理

在宝塔面板中新建一个站点,域名填写公开访问域名,如 “http://dashboard.example.com“ ,然后点击“设置”进入站点设置选项,选择“反向代理” - “新建反向代理”。

自定义一个代理名称,在下方“目标 URL”中填入 http://127.0.0.1 然后点击“保存”。

打开刚刚新建的反向代理右边的“配置文件”,将配置文件替换为以下内容:

nginx
#PROXY-START/
+location / {
+    proxy_pass http://127.0.0.1:8008;
+    proxy_set_header Host $http_host;
+    proxy_set_header      Upgrade $http_upgrade;
+}
+location ~ ^/(ws|terminal/.+)$  {
+    proxy_pass http://127.0.0.1:8008;
+    proxy_http_version 1.1;
+    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection "Upgrade";
+    proxy_set_header Host $http_host;
+}
+#PROXY-END/

点击“保存”。
现在,你应该可以直接使用域名,如:“http://dashboard.example.com“ 来访问面板了。

扩展内容:

CaddyServer v1(v2 无需特别配置):

caddy
proxy /ws http://ip:8008 {
+    websocket
+    header_upstream -Origin
+}
+proxy /terminal/* http://ip:8008 {
+    websocket
+    header_upstream -Origin
+}

在宝塔面板中配置 SSL

首先,先暂时关闭反向代理。
正如在其他网站中配置 SSL 证书一样,进入站点设置中的 “SSL”,你可以选择自动申请 Let´s Encrypt 证书或手动配置已有的证书。
完成 SSL 的设置后,你需要回到 https://github.com/settings/developers ,编辑之前创建的验证应用程序,将之前我们填入的 "Homepage URL" 和 "Authorization callback URL" 中的域名全部从 http 改为 https,如:"https://dashboard.example.com" 和 "https://dashboard.example.com/oauth2/callback" ,不更改此项可能会导致你无法登录面板后台

更新 Dashboard

运行脚本 ./nezha.sh ,选择重启面板并更新。

`,40),h=[l];function n(p,o,d,r,c,k){return e(),s("div",null,h)}const u=a(t,[["render",n]]);export{b as __pageData,u as default}; diff --git a/assets/guide_dashboard.md.C6o-Roy3.lean.js b/assets/guide_dashboard.md.C6o-Roy3.lean.js new file mode 100644 index 00000000..cec3eb19 --- /dev/null +++ b/assets/guide_dashboard.md.C6o-Roy3.lean.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as e,a4 as i}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"安装 Dashboard","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboard.md","filePath":"guide/dashboard.md","lastUpdated":1719239024000}'),t={name:"guide/dashboard.md"},l=i("",40),h=[l];function n(p,o,d,r,c,k){return e(),s("div",null,h)}const u=a(t,[["render",n]]);export{b as __pageData,u as default}; diff --git a/assets/guide_dashboardq.md.dd22b797.js b/assets/guide_dashboardq.md.dd22b797.js deleted file mode 100644 index 372a2428..00000000 --- a/assets/guide_dashboardq.md.dd22b797.js +++ /dev/null @@ -1,10 +0,0 @@ -import{_ as a,o as s,c as e,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"Dashboard 常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1718495592000}'),n={name:"guide/dashboardq.md"},t=o(`

Dashboard 常见问题

为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?

首先解释管理面板中显示的IP是怎么得到的:Agent 会每隔一段时间请求一遍 IP-API,获取到 IP 信息后上报到 Dashboard,目前使用的 IP-API 可在此查看:myip.go
如您发现管理面板中显示的 IP 和服务商提供给您的 IP 不一致,最大的可能是服务商给您的是入口 IP,但 Agent 测试的是您的出口 IP。这个问题也可能会出现在多线服务器和 IPLC 专线中。

TIP

举个简单也十分常见的例子,服务商给您提供的是一台高防服务器,为了同时满足高防和低网络中断率的目标,提供给您的 IP 可能是经过映射后的高防 IP 而并非您服务器的真实出口 IP。

您也可以在 Agent 服务器中运行以下命令测试出口 IP:

shell
curl https://ipapi.co/ip/
-curl ip.sb
-curl ip-api.com

忘记查看密码\\删除查看密码

请查看或编辑 /opt/nezha/dashboard/data/config.yaml 文件。
密码位于 site-viewpassword 项中。

面板安装/重启/更新失败: iptables ......

首先尝试重启 Docker 再操作:

shell
systemctl status docker
-systemctl restart docker
-systemctl status docker

重启后尝试重新安装面板。
若依然出现 iptables... 等错误,则考虑直接关闭 iptables 甚至移除 iptables。
这个问题也可能与内核有关,也可以尝试更换官方内核。

面板重启失败:Invalid hostPort: nz_site_port 等

如出现此问题,可以通过安装脚本修改配置,或者直接修改 /opt/nezha/dashboard/docker-compose.yaml 文件。

面板布局错误、CSS 资源无法被加载

如果出现 Dashboard 页面布局错误,通常是 CSS 文件丢失或无法被加载。
出现此类错误,可以先尝试 重启并更新面板
如果更新面板后问题没有得到解决,那么可能是你的 vhost 配置文件内有不适用的配置,你可以编辑 Nginx 的 vhost 文件或在宝塔面板内:

  1. 网站 中找到安装 Dashboard 时配置的站点,点击右侧 设置

  2. 选择 配置文件,删除配置文件中的:

    nginx
    location ~ .*\\.(js|css)?$
    -    {
    -        expires      12h;
    -        error_log /dev/null;
    -        access_log /dev/null;
    -    }
  3. 保存配置,并清空浏览器、Nginx、CDN 中的缓存,此时刷新页面应恢复正常。

面板无法启动:panic: 无法找到配置的 DDNS 提供者...

填入的 DDNS provider 的值有误,目前仅支持 webhookcloudflaretencentclouddummy

面板更新 DDNS 崩溃:panic: interface conversion: interface {} is nil, not []interface {}

填入的 DDNS AccessIDAccessSecret 有误。

打开网络监控页显示:server monitor history not found

出现此错误说明没有在服务页中设置 TCP-Ping 和 ICMP-Ping 类型的监控或者监控数据还未生成。
如已经设置完毕,可以等待一段时间后再查看。

启用 HTTPS 后 /terminal 或 /ws 不能正常连接

常常是由于证书不完整造成的,请在 agent 运行参数中添加 -d,若 log 中有 x509:certificate signed by unknown authority,更换完整证书则可解决该问题。

对面板提供的数据修改/增加功能不满意,想要修改/增加数据

常见于批量新建 Agent 等需求中,可以直接修改数据库。
请注意,数据库中并非什么都可以修改,错误的修改会导致数据混乱无法启动 Dashboard,请勿随意修改数据库!

DANGER

再重复一遍,请勿随意修改数据库!

如需要在数据库中修改数据,请先停止面板容器再修改。
数据库类型是 sqlite3,位于 /opt/nezha/dashboard/data/sqlite.db,修改前请备份。

Dashboard 会自动更新吗?

Agent 通常情况下会自动更新,但 Dashboard 并不会,需要手动更新。

`,31),l=[t];function r(p,c,i,d,h,b){return s(),e("div",null,l)}const u=a(n,[["render",r]]);export{y as __pageData,u as default}; diff --git a/assets/guide_dashboardq.md.dd22b797.lean.js b/assets/guide_dashboardq.md.dd22b797.lean.js deleted file mode 100644 index 915055db..00000000 --- a/assets/guide_dashboardq.md.dd22b797.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as s,c as e,R as o}from"./chunks/framework.44fd0451.js";const y=JSON.parse('{"title":"Dashboard 常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1718495592000}'),n={name:"guide/dashboardq.md"},t=o("",31),l=[t];function r(p,c,i,d,h,b){return s(),e("div",null,l)}const u=a(n,[["render",r]]);export{y as __pageData,u as default}; diff --git a/assets/guide_dashboardq.md.h1t88GdR.js b/assets/guide_dashboardq.md.h1t88GdR.js new file mode 100644 index 00000000..809a212d --- /dev/null +++ b/assets/guide_dashboardq.md.h1t88GdR.js @@ -0,0 +1,10 @@ +import{_ as a,c as s,o as i,a4 as e}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Dashboard 常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1719239024000}'),t={name:"guide/dashboardq.md"},n=e(`

Dashboard 常见问题

为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?

首先解释管理面板中显示的IP是怎么得到的:Agent 会每隔一段时间请求一遍 IP-API,获取到 IP 信息后上报到 Dashboard,目前使用的 IP-API 可在此查看:myip.go
如您发现管理面板中显示的 IP 和服务商提供给您的 IP 不一致,最大的可能是服务商给您的是入口 IP,但 Agent 测试的是您的出口 IP。这个问题也可能会出现在多线服务器和 IPLC 专线中。

TIP

举个简单也十分常见的例子,服务商给您提供的是一台高防服务器,为了同时满足高防和低网络中断率的目标,提供给您的 IP 可能是经过映射后的高防 IP 而并非您服务器的真实出口 IP。

您也可以在 Agent 服务器中运行以下命令测试出口 IP:

shell
curl https://ipapi.co/ip/
+curl ip.sb
+curl ip-api.com

忘记查看密码\\删除查看密码

请查看或编辑 /opt/nezha/dashboard/data/config.yaml 文件。
密码位于 site-viewpassword 项中。

面板安装/重启/更新失败: iptables ......

首先尝试重启 Docker 再操作:

shell
systemctl status docker
+systemctl restart docker
+systemctl status docker

重启后尝试重新安装面板。
若依然出现 iptables... 等错误,则考虑直接关闭 iptables 甚至移除 iptables。
这个问题也可能与内核有关,也可以尝试更换官方内核。

面板重启失败:Invalid hostPort: nz_site_port 等

如出现此问题,可以通过安装脚本修改配置,或者直接修改 /opt/nezha/dashboard/docker-compose.yaml 文件。

面板布局错误、CSS 资源无法被加载

如果出现 Dashboard 页面布局错误,通常是 CSS 文件丢失或无法被加载。
出现此类错误,可以先尝试 重启并更新面板
如果更新面板后问题没有得到解决,那么可能是你的 vhost 配置文件内有不适用的配置,你可以编辑 Nginx 的 vhost 文件或在宝塔面板内:

  1. 网站 中找到安装 Dashboard 时配置的站点,点击右侧 设置

  2. 选择 配置文件,删除配置文件中的:

    nginx
    location ~ .*\\.(js|css)?$
    +    {
    +        expires      12h;
    +        error_log /dev/null;
    +        access_log /dev/null;
    +    }
  3. 保存配置,并清空浏览器、Nginx、CDN 中的缓存,此时刷新页面应恢复正常。

面板无法启动:panic: 无法找到配置的 DDNS 提供者...

填入的 DDNS provider 的值有误,目前仅支持 webhookcloudflaretencentclouddummy

面板更新 DDNS 崩溃:panic: interface conversion: interface {} is nil, not []interface {}

填入的 DDNS AccessIDAccessSecret 有误。

打开网络监控页显示:server monitor history not found

出现此错误说明没有在服务页中设置 TCP-Ping 和 ICMP-Ping 类型的监控或者监控数据还未生成。
如已经设置完毕,可以等待一段时间后再查看。

启用 HTTPS 后 /terminal 或 /ws 不能正常连接

常常是由于证书不完整造成的,请在 agent 运行参数中添加 -d,若 log 中有 x509:certificate signed by unknown authority,更换完整证书则可解决该问题。

对面板提供的数据修改/增加功能不满意,想要修改/增加数据

常见于批量新建 Agent 等需求中,可以直接修改数据库。
请注意,数据库中并非什么都可以修改,错误的修改会导致数据混乱无法启动 Dashboard,请勿随意修改数据库!

DANGER

再重复一遍,请勿随意修改数据库!

如需要在数据库中修改数据,请先停止面板容器再修改。
数据库类型是 sqlite3,位于 /opt/nezha/dashboard/data/sqlite.db,修改前请备份。

Dashboard 会自动更新吗?

Agent 通常情况下会自动更新,但 Dashboard 并不会,需要手动更新。

`,31),o=[n];function l(r,h,d,p,c,k){return i(),s("div",null,o)}const u=a(t,[["render",l]]);export{g as __pageData,u as default}; diff --git a/assets/guide_dashboardq.md.h1t88GdR.lean.js b/assets/guide_dashboardq.md.h1t88GdR.lean.js new file mode 100644 index 00000000..f0d41b68 --- /dev/null +++ b/assets/guide_dashboardq.md.h1t88GdR.lean.js @@ -0,0 +1 @@ +import{_ as a,c as s,o as i,a4 as e}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"Dashboard 常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/dashboardq.md","filePath":"guide/dashboardq.md","lastUpdated":1719239024000}'),t={name:"guide/dashboardq.md"},n=e("",31),o=[n];function l(r,h,d,p,c,k){return i(),s("div",null,o)}const u=a(t,[["render",l]]);export{g as __pageData,u as default}; diff --git a/assets/guide_loginq.md.0dEC8Tty.js b/assets/guide_loginq.md.0dEC8Tty.js new file mode 100644 index 00000000..8ec62ded --- /dev/null +++ b/assets/guide_loginq.md.0dEC8Tty.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a4 as o}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"登录常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/loginq.md","filePath":"guide/loginq.md","lastUpdated":1719239024000}'),r={name:"guide/loginq.md"},i=o('

登录常见问题

登录回调后页面卡住\\拒绝连接\\响应时间过长

还有其他一些表现形式,总之登录后浏览器无法正常显示。

  1. 您的服务器无法连接到 Github/Gitee,最常见于国内服务器配置 Github 情况下,可以考虑多尝试几次或者切换到 Cloudflare Access。
  2. 您配置错了回调地址,确保您的回调地址正确且端口与协议均正确!
  3. Dashboard 发生未知错误,您可以使用脚本查看日志。

TIP

什么是协议? 在浏览器中,您的域名以 :// 结尾的字符串即为协议,通常为 httphttps 两种。由于正常部署情况下面板可能有多种协议+域名+端口组合均可访问,请务必选一个最合适的作为回调。

如何检查我的回调地址是否错误?

请确保登录前浏览器显示的协议+域名+端口和登录后跳转到的协议+域名+端口一致。
请确保您的路径为 /oauth2/callback全部小写

登录后面板报错

  1. 清理 cookies 后重新登录,或换个浏览器。
  2. 检查回调地址,确保您的回调地址正确且端口与协议均正确!发起请求的地址需要和回调地址处于同域,端口、协议和域名(或IP)都需要一致。

lookup xxx

容器 DNS 解析失败,多数情况下为修改了 iptables 相关配置。
建议先重启 docker,sudo systemctl restart docker,再使用脚本重启面板。
仍然出现 lookup 错误建议查看是否有其他控制 iptables 的工具,如宝塔防火墙等。
这个问题也可能与内核有关系,请尝试更换官方内核。

授权方式无效,或者登录回调地址无效、过期或已被撤销

只出现在 Gitee 登录方式中,原因不明,建议更换到 GitHub。

oauth2: server response missing access_token

可能由多种因素引起,最大可能性是网络问题,建议检查网络后重试。
无法解决的话建议更换 Github 等。

该用户不是本站点管理员,无法登录

您登陆错了账号或者配置错了用户名,注意用户名不是邮箱,可使用脚本修改。
Cloudflare Access 用户请注意,您的用户名不是邮箱,而是 User ID。

dial tcp xxx:443 i/o timeout

网络问题,可先重启 Docker,sudo systemctl restart docker,再使用脚本重启面板。
如为国内服务器配置 Github 登陆方式,则建议切换到 Cloudflare Access 以避免网络干扰。

net/http: TLS handshake timeout

同上。

',22),s=[i];function l(n,c,h,d,p,u){return t(),a("div",null,s)}const k=e(r,[["render",l]]);export{m as __pageData,k as default}; diff --git a/assets/guide_loginq.md.0dEC8Tty.lean.js b/assets/guide_loginq.md.0dEC8Tty.lean.js new file mode 100644 index 00000000..8530fa9e --- /dev/null +++ b/assets/guide_loginq.md.0dEC8Tty.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a4 as o}from"./chunks/framework.BmdFiWrL.js";const m=JSON.parse('{"title":"登录常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/loginq.md","filePath":"guide/loginq.md","lastUpdated":1719239024000}'),r={name:"guide/loginq.md"},i=o("",22),s=[i];function l(n,c,h,d,p,u){return t(),a("div",null,s)}const k=e(r,[["render",l]]);export{m as __pageData,k as default}; diff --git a/assets/guide_loginq.md.b615efd0.js b/assets/guide_loginq.md.b615efd0.js deleted file mode 100644 index cf3bd966..00000000 --- a/assets/guide_loginq.md.b615efd0.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as a,c as t,R as o}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"登录常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/loginq.md","filePath":"guide/loginq.md","lastUpdated":1718495592000}'),r={name:"guide/loginq.md"},i=o('

登录常见问题

登录回调后页面卡住\\拒绝连接\\响应时间过长

还有其他一些表现形式,总之登录后浏览器无法正常显示。

  1. 您的服务器无法连接到 Github/Gitee,最常见于国内服务器配置 Github 情况下,可以考虑多尝试几次或者切换到 Cloudflare Access。
  2. 您配置错了回调地址,确保您的回调地址正确且端口与协议均正确!
  3. Dashboard 发生未知错误,您可以使用脚本查看日志。

TIP

什么是协议? 在浏览器中,您的域名以 :// 结尾的字符串即为协议,通常为 httphttps 两种。由于正常部署情况下面板可能有多种协议+域名+端口组合均可访问,请务必选一个最合适的作为回调。

如何检查我的回调地址是否错误?

请确保登录前浏览器显示的协议+域名+端口和登录后跳转到的协议+域名+端口一致。
请确保您的路径为 /oauth2/callback全部小写

登录后面板报错

  1. 清理 cookies 后重新登录,或换个浏览器。
  2. 检查回调地址,确保您的回调地址正确且端口与协议均正确!发起请求的地址需要和回调地址处于同域,端口、协议和域名(或IP)都需要一致。

lookup xxx

容器 DNS 解析失败,多数情况下为修改了 iptables 相关配置。
建议先重启 docker,sudo systemctl restart docker,再使用脚本重启面板。
仍然出现 lookup 错误建议查看是否有其他控制 iptables 的工具,如宝塔防火墙等。
这个问题也可能与内核有关系,请尝试更换官方内核。

授权方式无效,或者登录回调地址无效、过期或已被撤销

只出现在 Gitee 登录方式中,原因不明,建议更换到 GitHub。

oauth2: server response missing access_token

可能由多种因素引起,最大可能性是网络问题,建议检查网络后重试。
无法解决的话建议更换 Github 等。

该用户不是本站点管理员,无法登录

您登陆错了账号或者配置错了用户名,注意用户名不是邮箱,可使用脚本修改。
Cloudflare Access 用户请注意,您的用户名不是邮箱,而是 User ID。

dial tcp xxx:443 i/o timeout

网络问题,可先重启 Docker,sudo systemctl restart docker,再使用脚本重启面板。
如为国内服务器配置 Github 登陆方式,则建议切换到 Cloudflare Access 以避免网络干扰。

net/http: TLS handshake timeout

同上。

',22),s=[i];function l(n,c,h,d,p,u){return a(),t("div",null,s)}const k=e(r,[["render",l]]);export{m as __pageData,k as default}; diff --git a/assets/guide_loginq.md.b615efd0.lean.js b/assets/guide_loginq.md.b615efd0.lean.js deleted file mode 100644 index c3db29d9..00000000 --- a/assets/guide_loginq.md.b615efd0.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as a,c as t,R as o}from"./chunks/framework.44fd0451.js";const m=JSON.parse('{"title":"登录常见问题","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/loginq.md","filePath":"guide/loginq.md","lastUpdated":1718495592000}'),r={name:"guide/loginq.md"},i=o("",22),s=[i];function l(n,c,h,d,p,u){return a(),t("div",null,s)}const k=e(r,[["render",l]]);export{m as __pageData,k as default}; diff --git a/assets/guide_notifications.md.b99b360d.js b/assets/guide_notifications.md.b99b360d.js deleted file mode 100644 index 9b1f3ce6..00000000 --- a/assets/guide_notifications.md.b99b360d.js +++ /dev/null @@ -1,28 +0,0 @@ -import{_ as o,o as s,c as a,R as l}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"通知设置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/notifications.md","filePath":"guide/notifications.md","lastUpdated":1718495592000}'),n={name:"guide/notifications.md"},t=l(`

通知设置

哪吒监控支持对服务器的负载、CPU、内存、硬盘、流量、月流量、进程数、连接数进行监控,并在达到用户设定的阈值时发送告警通知。

灵活的通知方式

  • 在面板消息中,占位符 #DATETIME# 代表事件发生的时间戳。当通知被触发时,面板会自动将 #DATETIME# 替换为事件的实际时间。
  • #NEZHA# 是面板消息占位符,面板触发通知时会自动用实际消息替换占位符。
  • Body 内容是 JSON 格式的:当请求类型为 FORM 时,值为 key:value 的形式,value 里面可放置占位符,通知时会自动替换。当请求类型为 JSON 时 只会简单进行字符串替换后直接提交到 URL
  • URL 里面也可放置占位符,请求时会进行简单的字符串替换。

请参考以下的通知方式示例,也可以根据自己的需求灵活设置推送方式。

Bark 示例

点击展开/收起
  • 名称:Bark

  • URL 组成: /:key/:body or /:key/:title/:body or /:key/:category/:title/:body

  • 请求方式: GET

  • 请求类型: 默认

  • Body: 空

  • 名称:Bark

  • URL 组成: /push

  • 请求方式: POST

  • 请求类型: form

  • Body: {"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":"https://xxxxxxxx/nz.png"}

Slack 示例 贡献者:@白歌

点击展开/收起

URL 参数获取说明

请提前准备好 Slack 的 Workspace 并为这个 Workspace 创建一个 App。如果你还没有创建,可以在 Slack API 创建一个 App。

创建完成 App 后,需要为这个 App 添加一个 Incoming Webhook。在 App 的设置页面中找到 Incoming Webhooks,将 Activate Incoming Webhooks 勾选为 ON,在页面下方找到并点击 Add New Webhook to Workspace,选择一个 Channel,然后点击允许。完成创建后,你会得到一个 Webhook URL,使用这个 URL 替换下方的示例 URL。

Server 酱示例

点击展开/收起

Server 酱进阶

  • 名称:Server 酱

  • URL:https://sc.ftqq.com/SCUrandomkeys.send

  • 请求方式: POST

  • 请求类型: FORM

  • Body:

    json
    {
    -  "title": "#SERVER.NAME#",
    -  "desp": "**#NEZHA#\\n\\n平均负载: \\"#SERVER.LOAD1#\\",\\"#SERVER.LOAD5#\\",\\"#SERVER.LOAD15#\\"\\n\\n## [点击访问面板](https://你的面板域名)\\n\\n![logo](https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg)"
    -}

    展示

Telegram 示例 贡献者:@白歌

点击展开/收起

URL 参数获取说明

请提前在 Telegram 中创建一个机器人,获取到机器人的 token 和你的 Telegram 用户 ID。

机器人的 token 和用户 ID 都是数字和字母的组合,可以在 Telegram 中与 @userinfobot 对话获取自己的用户 ID。与 @BotFather 对话,输入命令 /newbot 创建一个机器人,创建完成后可以获得机器人的 token。

得到的 token 和用户 ID 都是字符串,可以直接拼接到 URL 中,如下所示,将其中的 botXXXXXX 替换为你的机器人 token,将 YYYYYY 替换为你的用户 ID。注意,你需要先与机器人对话,否则机器人无法发送消息给你。

wxpusher 示例

需要提前关注你的应用

点击展开/收起

邮件通知示例 - SendCloud 贡献者:@白歌

点击展开/收起

注意:SendCloud 有每日免费发送邮件限额限制,这里仅作示例,你可以选择付费服务或其他类似的免费服务,使用方法类似。

URL 参数获取说明

该示例使用 SendCloud 作为发信服务,需提前在 SendCloud 注册账号,创建发件邮箱,然后在这里获取 APIUSER 和 APIKEY。

替换示例 URL 中的 <替换APIUSER><替换APIKEY> 为自己的 APIUSER 和 APIKEY,替换 URL 中的 <自定义发件邮箱><自定义收件邮箱> 为任意的的发件邮箱和收件邮箱。

  • 名称:邮件告警
  • URL:https://api.sendcloud.net/apiv2/mail/send?apiUser=<替换APIUSER>&apiKey=<替换APIKEY>&from=<自定义发件邮箱>&fromName=Nezha&to=<自定义收件邮箱>&subject=Nezha-Notification&html=#NEZHA#
  • 请求方式: POST
  • 请求类型: JSON
  • Header: 留空
  • Body: 留空

钉钉群机器人配置 示例

点击展开/收起

URL 参数获取说明

请提前在钉钉中创建一个机器人,获取到机器人的 token。

机器人 URL 在钉钉群 - 管理机器人 - 创建机器人后获取,安全方式选择自定义关键词,Body 中 content 值内需包含该关键词。

企业微信群机器人 示例 贡献者:@ChowRex

点击展开/收起

支持的占位符一览

json
{
-    "content": "#NEZHA#",
-    "ServerName": "#SERVER.NAME#",
-    "ServerIP": "#SERVER.IP#",
-    "ServerIPV4": "#SERVER.IPV4#",
-    "ServerIPV6": "#SERVER.IPV6#",
-    "CPU": "#SERVER.CPU#",
-    "MEM": "#SERVER.MEM#",
-    "SWAP": "#SERVER.SWAP#",
-    "DISK": "#SERVER.DISK#",
-    "NetInSpeed": "#SERVER.NETINSPEED#",
-    "NetOutSpeed": "#SERVER.NETOUTSPEED#",
-    "TransferIn": "#SERVER.TRANSFERIN#",
-    "TranferOut": "#SERVER.TRANSFEROUT#",
-    "Load1": "#SERVER.LOAD1#",
-    "Load5": "#SERVER.LOAD5#",
-    "Load15": "#SERVER.LOAD15#",
-    "TCP_CONN_COUNT": "#SERVER.TCPCONNCOUNT",  # 无效
-    "UDP_CONN_COUNT": "#SERVER.UDPCONNCOUNT",  # 无效
-}

群机器人配置说明 - 文档 - 企业微信开发者中心

  • 名称:企业微信群机器人
  • URL:https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY
  • 请求方式: POST
  • 请求类型: JSON
  • Body:
    json
    {
    -    "msgtype": "markdown",
    -    "markdown": {
    -        "content": "# 哪吒通知消息\\n\\n\\"#NEZHA#\\"\\n\\n> 名称: \\"#SERVER.NAME#\\"\\n> IP: \\"#SERVER.IP#\\"\\n> IPv4: \\"#SERVER.IPV4#\\"\\n> IPv6: \\"#SERVER.IPV6#\\"\\n> CPU: \\"#SERVER.CPU#\\"\\n> 内存: \\"#SERVER.MEM#\\"\\n> 交换分区: \\"#SERVER.SWAP#\\"\\n> 存储: \\"#SERVER.DISK#\\"\\n> 实时上传速度: \\"#SERVER.NETINSPEED#\\"\\n> 实时下载速度: \\"#SERVER.NETOUTSPEED#\\"\\n> 总上传: \\"#SERVER.TRANSFERIN#\\"\\n> 总下载: \\"#SERVER.TRANSFEROUT#\\"\\n> 1分钟内负载: \\"#SERVER.LOAD1#\\"\\n> 5分钟内负载: \\"#SERVER.LOAD5#\\"\\n> 15分钟内负载: \\"#SERVER.LOAD15#\\"\\n> TCP连接数: \\"#SERVER.TCPCONNCOUNT\\"\\n> UDP连接数: \\"#SERVER.UDPCONNCOUNT\\"\\n\\n"
    -    }
    -}

根据需求删减相关内容信息即可。

通知效果

飞书群机器人配置 示例 贡献者:@eya46

点击展开/收起

URL 参数获取说明

机器人 URL 通过飞书群 - 群机器人 - 添加机器人 - 自定义机器人(webhook)创建后获取。

告警规则说明

基本规则

  • type:可选取一个或多个类型,如在一个规则中选择了多个类型,需要同时满足所有选择的类型才会触发通知(可参考后面的示例)
    • cpumemoryswapdisk
    • net_in_speed 入站网速、net_out_speed 出站网速、net_all_speed 双向网速、transfer_in 入站流量、transfer_out 出站流量、transfer_all 双向流量
    • offline 离线监控
    • load1load5load15 负载
    • process_count 进程数(目前取线程数占用资源太多,暂时不支持)
    • tcp_conn_countudp_conn_count 连接数
  • duration:持续数秒,数秒内采样记录 30% 以上触发阈值才会告警(防数据插针)
  • minmax
    • 流量、网速类单位为字节(1KB=1024B,1MB=1024*1024B)
    • 内存、硬盘、CPU 以占用百分比计数
    • 离线监控无需设置此项
  • cover
    • 0 监控所有服务器,通过 ignore 忽略特定服务器
    • 1 忽略所有服务器,通过 ignore 监控特定服务器
      例如:[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
  • ignore:选择忽略特定服务器,搭配 cover 使用,内容为服务器 ID 和布尔值,例如:{"1": true, "2": false}

完整示例:

添加一个离线告警:

  • 名称:离线通知
  • 规则:[{"Type":"offline","Duration":10}]
  • 启用:√

添加一个监控 CPU 持续 10 秒超过 50% 内存持续 20 秒占用低于 20% 的告警:

  • 名称:CPU+内存
  • 规则:[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
  • 启用:√

将特定的服务器通知发送到特定的通知分组:

示例场景:
有 1、2、3、4 四台服务器和 A、B 两个不同的通知组。
1、2 这两台服务器掉线十分钟后给通知组 A 发送通知。
3、4 这两台服务器掉线十分钟后给通知组 B 发送通知。

首先你需要先设置好 A、B 两个通知组,然后添加两条告警规则:

规则一:

  • 名称:1、2 离线,发送给通知组 A
  • 规则:[{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]
  • 通知方式组:A
  • 启用:√

规则二:

  • 名称:3、4 离线,发送给通知组 B
  • 规则:[{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]
  • 通知方式组:B
  • 启用:√

灵活使用参数可以让你的告警功能被充分使用

特殊:任意周期流量告警

可以用作月流量监控

  • type
    • transfer_in_cycle 周期内的入站流量
    • transfer_out_cycle 周期内的出站流量
    • transfer_all_cycle 周期内双向流量的和
  • cycle_start:统计周期开始日期(可以是你机器计费周期的开始日期),时间格式为 RFC3339,例如北京时间为 2022-01-11T08:00:00.00+08:00
  • cycle_interval:统计周期单位的数量(例如,周期单位为天,该值为 7,则代表每隔 7 天统计一次)
  • cycle_unit:统计周期单位,默认 hour,可选(hour, day, week, month, year
  • min/maxcoverignore 参考基本规则配置

示例:

ID 为 3 和 4 的服务器(ignore 里面定义),以每月 1 号为统计周期,周期内统计的出站月流量达到 1TB 时告警:

json
[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]

通知触发模式

  • 始终触发:每当 Agent 上报的状态符合告警的规则时,都会触发一次通知。
  • 单次触发:仅状态改变时触发一次通知,如从正常状态改变为异常状态,或异常状态恢复为正常状态。

设置告警时执行任务

如果需要在发出告警消息的同时执行某项任务,可以设置此项目。

  • 告警时触发任务:当告警状态符合从“正常”变更为“事件”时,所要执行的任务,任务应提前在任务页设置。
  • 恢复时触发任务:当告警状态符合从“事件”恢复为“正常”时,所要执行的任务,任务应提前在任务页设置。
`,51),e=[t];function p(r,c,D,i,u,y){return s(),a("div",null,e)}const q=o(n,[["render",p]]);export{d as __pageData,q as default}; diff --git a/assets/guide_notifications.md.b99b360d.lean.js b/assets/guide_notifications.md.b99b360d.lean.js deleted file mode 100644 index 405d9167..00000000 --- a/assets/guide_notifications.md.b99b360d.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o,o as s,c as a,R as l}from"./chunks/framework.44fd0451.js";const d=JSON.parse('{"title":"通知设置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/notifications.md","filePath":"guide/notifications.md","lastUpdated":1718495592000}'),n={name:"guide/notifications.md"},t=l("",51),e=[t];function p(r,c,D,i,u,y){return s(),a("div",null,e)}const q=o(n,[["render",p]]);export{d as __pageData,q as default}; diff --git a/assets/guide_notifications.md.uDxrpArB.js b/assets/guide_notifications.md.uDxrpArB.js new file mode 100644 index 00000000..21098b2c --- /dev/null +++ b/assets/guide_notifications.md.uDxrpArB.js @@ -0,0 +1,28 @@ +import{_ as i,c as s,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"通知设置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/notifications.md","filePath":"guide/notifications.md","lastUpdated":1719239024000}'),l={name:"guide/notifications.md"},e=t(`

通知设置

哪吒监控支持对服务器的负载、CPU、内存、硬盘、流量、月流量、进程数、连接数进行监控,并在达到用户设定的阈值时发送告警通知。

灵活的通知方式

  • 在面板消息中,占位符 #DATETIME# 代表事件发生的时间戳。当通知被触发时,面板会自动将 #DATETIME# 替换为事件的实际时间。
  • #NEZHA# 是面板消息占位符,面板触发通知时会自动用实际消息替换占位符。
  • Body 内容是 JSON 格式的:当请求类型为 FORM 时,值为 key:value 的形式,value 里面可放置占位符,通知时会自动替换。当请求类型为 JSON 时 只会简单进行字符串替换后直接提交到 URL
  • URL 里面也可放置占位符,请求时会进行简单的字符串替换。

请参考以下的通知方式示例,也可以根据自己的需求灵活设置推送方式。

Bark 示例

点击展开/收起
  • 名称:Bark

  • URL 组成: /:key/:body or /:key/:title/:body or /:key/:category/:title/:body

  • 请求方式: GET

  • 请求类型: 默认

  • Body: 空

  • 名称:Bark

  • URL 组成: /push

  • 请求方式: POST

  • 请求类型: form

  • Body: {"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":"https://xxxxxxxx/nz.png"}

Slack 示例 贡献者:@白歌

点击展开/收起

URL 参数获取说明

请提前准备好 Slack 的 Workspace 并为这个 Workspace 创建一个 App。如果你还没有创建,可以在 Slack API 创建一个 App。

创建完成 App 后,需要为这个 App 添加一个 Incoming Webhook。在 App 的设置页面中找到 Incoming Webhooks,将 Activate Incoming Webhooks 勾选为 ON,在页面下方找到并点击 Add New Webhook to Workspace,选择一个 Channel,然后点击允许。完成创建后,你会得到一个 Webhook URL,使用这个 URL 替换下方的示例 URL。

Server 酱示例

点击展开/收起

Server 酱进阶

  • 名称:Server 酱

  • URL:https://sc.ftqq.com/SCUrandomkeys.send

  • 请求方式: POST

  • 请求类型: FORM

  • Body:

    json
    {
    +  "title": "#SERVER.NAME#",
    +  "desp": "**#NEZHA#\\n\\n平均负载: \\"#SERVER.LOAD1#\\",\\"#SERVER.LOAD5#\\",\\"#SERVER.LOAD15#\\"\\n\\n## [点击访问面板](https://你的面板域名)\\n\\n![logo](https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg)"
    +}

    展示

Telegram 示例 贡献者:@白歌

点击展开/收起

URL 参数获取说明

请提前在 Telegram 中创建一个机器人,获取到机器人的 token 和你的 Telegram 用户 ID。

机器人的 token 和用户 ID 都是数字和字母的组合,可以在 Telegram 中与 @userinfobot 对话获取自己的用户 ID。与 @BotFather 对话,输入命令 /newbot 创建一个机器人,创建完成后可以获得机器人的 token。

得到的 token 和用户 ID 都是字符串,可以直接拼接到 URL 中,如下所示,将其中的 botXXXXXX 替换为你的机器人 token,将 YYYYYY 替换为你的用户 ID。注意,你需要先与机器人对话,否则机器人无法发送消息给你。

wxpusher 示例

需要提前关注你的应用

点击展开/收起

邮件通知示例 - SendCloud 贡献者:@白歌

点击展开/收起

注意:SendCloud 有每日免费发送邮件限额限制,这里仅作示例,你可以选择付费服务或其他类似的免费服务,使用方法类似。

URL 参数获取说明

该示例使用 SendCloud 作为发信服务,需提前在 SendCloud 注册账号,创建发件邮箱,然后在这里获取 APIUSER 和 APIKEY。

替换示例 URL 中的 <替换APIUSER><替换APIKEY> 为自己的 APIUSER 和 APIKEY,替换 URL 中的 <自定义发件邮箱><自定义收件邮箱> 为任意的的发件邮箱和收件邮箱。

  • 名称:邮件告警
  • URL:https://api.sendcloud.net/apiv2/mail/send?apiUser=<替换APIUSER>&apiKey=<替换APIKEY>&from=<自定义发件邮箱>&fromName=Nezha&to=<自定义收件邮箱>&subject=Nezha-Notification&html=#NEZHA#
  • 请求方式: POST
  • 请求类型: JSON
  • Header: 留空
  • Body: 留空

钉钉群机器人配置 示例

点击展开/收起

URL 参数获取说明

请提前在钉钉中创建一个机器人,获取到机器人的 token。

机器人 URL 在钉钉群 - 管理机器人 - 创建机器人后获取,安全方式选择自定义关键词,Body 中 content 值内需包含该关键词。

企业微信群机器人 示例 贡献者:@ChowRex

点击展开/收起

支持的占位符一览

json
{
+    "content": "#NEZHA#",
+    "ServerName": "#SERVER.NAME#",
+    "ServerIP": "#SERVER.IP#",
+    "ServerIPV4": "#SERVER.IPV4#",
+    "ServerIPV6": "#SERVER.IPV6#",
+    "CPU": "#SERVER.CPU#",
+    "MEM": "#SERVER.MEM#",
+    "SWAP": "#SERVER.SWAP#",
+    "DISK": "#SERVER.DISK#",
+    "NetInSpeed": "#SERVER.NETINSPEED#",
+    "NetOutSpeed": "#SERVER.NETOUTSPEED#",
+    "TransferIn": "#SERVER.TRANSFERIN#",
+    "TranferOut": "#SERVER.TRANSFEROUT#",
+    "Load1": "#SERVER.LOAD1#",
+    "Load5": "#SERVER.LOAD5#",
+    "Load15": "#SERVER.LOAD15#",
+    "TCP_CONN_COUNT": "#SERVER.TCPCONNCOUNT",  # 无效
+    "UDP_CONN_COUNT": "#SERVER.UDPCONNCOUNT",  # 无效
+}

群机器人配置说明 - 文档 - 企业微信开发者中心

  • 名称:企业微信群机器人
  • URL:https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY
  • 请求方式: POST
  • 请求类型: JSON
  • Body:
    json
    {
    +    "msgtype": "markdown",
    +    "markdown": {
    +        "content": "# 哪吒通知消息\\n\\n\\"#NEZHA#\\"\\n\\n> 名称: \\"#SERVER.NAME#\\"\\n> IP: \\"#SERVER.IP#\\"\\n> IPv4: \\"#SERVER.IPV4#\\"\\n> IPv6: \\"#SERVER.IPV6#\\"\\n> CPU: \\"#SERVER.CPU#\\"\\n> 内存: \\"#SERVER.MEM#\\"\\n> 交换分区: \\"#SERVER.SWAP#\\"\\n> 存储: \\"#SERVER.DISK#\\"\\n> 实时上传速度: \\"#SERVER.NETINSPEED#\\"\\n> 实时下载速度: \\"#SERVER.NETOUTSPEED#\\"\\n> 总上传: \\"#SERVER.TRANSFERIN#\\"\\n> 总下载: \\"#SERVER.TRANSFEROUT#\\"\\n> 1分钟内负载: \\"#SERVER.LOAD1#\\"\\n> 5分钟内负载: \\"#SERVER.LOAD5#\\"\\n> 15分钟内负载: \\"#SERVER.LOAD15#\\"\\n> TCP连接数: \\"#SERVER.TCPCONNCOUNT\\"\\n> UDP连接数: \\"#SERVER.UDPCONNCOUNT\\"\\n\\n"
    +    }
    +}

根据需求删减相关内容信息即可。

通知效果

飞书群机器人配置 示例 贡献者:@eya46

点击展开/收起

URL 参数获取说明

机器人 URL 通过飞书群 - 群机器人 - 添加机器人 - 自定义机器人(webhook)创建后获取。

告警规则说明

基本规则

  • type:可选取一个或多个类型,如在一个规则中选择了多个类型,需要同时满足所有选择的类型才会触发通知(可参考后面的示例)
    • cpumemoryswapdisk
    • net_in_speed 入站网速、net_out_speed 出站网速、net_all_speed 双向网速、transfer_in 入站流量、transfer_out 出站流量、transfer_all 双向流量
    • offline 离线监控
    • load1load5load15 负载
    • process_count 进程数(目前取线程数占用资源太多,暂时不支持)
    • tcp_conn_countudp_conn_count 连接数
  • duration:持续数秒,数秒内采样记录 30% 以上触发阈值才会告警(防数据插针)
  • minmax
    • 流量、网速类单位为字节(1KB=1024B,1MB=1024*1024B)
    • 内存、硬盘、CPU 以占用百分比计数
    • 离线监控无需设置此项
  • cover
    • 0 监控所有服务器,通过 ignore 忽略特定服务器
    • 1 忽略所有服务器,通过 ignore 监控特定服务器
      例如:[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
  • ignore:选择忽略特定服务器,搭配 cover 使用,内容为服务器 ID 和布尔值,例如:{"1": true, "2": false}

完整示例:

添加一个离线告警:

  • 名称:离线通知
  • 规则:[{"Type":"offline","Duration":10}]
  • 启用:√

添加一个监控 CPU 持续 10 秒超过 50% 内存持续 20 秒占用低于 20% 的告警:

  • 名称:CPU+内存
  • 规则:[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
  • 启用:√

将特定的服务器通知发送到特定的通知分组:

示例场景:
有 1、2、3、4 四台服务器和 A、B 两个不同的通知组。
1、2 这两台服务器掉线十分钟后给通知组 A 发送通知。
3、4 这两台服务器掉线十分钟后给通知组 B 发送通知。

首先你需要先设置好 A、B 两个通知组,然后添加两条告警规则:

规则一:

  • 名称:1、2 离线,发送给通知组 A
  • 规则:[{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]
  • 通知方式组:A
  • 启用:√

规则二:

  • 名称:3、4 离线,发送给通知组 B
  • 规则:[{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]
  • 通知方式组:B
  • 启用:√

灵活使用参数可以让你的告警功能被充分使用

特殊:任意周期流量告警

可以用作月流量监控

  • type
    • transfer_in_cycle 周期内的入站流量
    • transfer_out_cycle 周期内的出站流量
    • transfer_all_cycle 周期内双向流量的和
  • cycle_start:统计周期开始日期(可以是你机器计费周期的开始日期),时间格式为 RFC3339,例如北京时间为 2022-01-11T08:00:00.00+08:00
  • cycle_interval:统计周期单位的数量(例如,周期单位为天,该值为 7,则代表每隔 7 天统计一次)
  • cycle_unit:统计周期单位,默认 hour,可选(hour, day, week, month, year
  • min/maxcoverignore 参考基本规则配置

示例:

ID 为 3 和 4 的服务器(ignore 里面定义),以每月 1 号为统计周期,周期内统计的出站月流量达到 1TB 时告警:

json
[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]

通知触发模式

  • 始终触发:每当 Agent 上报的状态符合告警的规则时,都会触发一次通知。
  • 单次触发:仅状态改变时触发一次通知,如从正常状态改变为异常状态,或异常状态恢复为正常状态。

设置告警时执行任务

如果需要在发出告警消息的同时执行某项任务,可以设置此项目。

  • 告警时触发任务:当告警状态符合从“正常”变更为“事件”时,所要执行的任务,任务应提前在任务页设置。
  • 恢复时触发任务:当告警状态符合从“事件”恢复为“正常”时,所要执行的任务,任务应提前在任务页设置。
`,51),n=[e];function h(o,k,p,r,d,u){return a(),s("div",null,n)}const g=i(l,[["render",h]]);export{c as __pageData,g as default}; diff --git a/assets/guide_notifications.md.uDxrpArB.lean.js b/assets/guide_notifications.md.uDxrpArB.lean.js new file mode 100644 index 00000000..8b6d51cd --- /dev/null +++ b/assets/guide_notifications.md.uDxrpArB.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,o as a,a4 as t}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"通知设置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/notifications.md","filePath":"guide/notifications.md","lastUpdated":1719239024000}'),l={name:"guide/notifications.md"},e=t("",51),n=[e];function h(o,k,p,r,d,u){return a(),s("div",null,n)}const g=i(l,[["render",h]]);export{c as __pageData,g as default}; diff --git a/assets/guide_q1.md.C5KPuqP_.js b/assets/guide_q1.md.C5KPuqP_.js new file mode 100644 index 00000000..30ffab10 --- /dev/null +++ b/assets/guide_q1.md.C5KPuqP_.js @@ -0,0 +1,46 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"反向代理 Telegram Bot API","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q1.md","filePath":"guide/q1.md","lastUpdated":1719239024000}'),l={name:"guide/q1.md"},p=n(`

反向代理 Telegram Bot API

如果你的 Dashboard 服务器无法访问 Telegram Bot API,但你依然想使用 Telegram 来推送通知,你可以尝试使用反向代理的方式解决这个问题。

准备工作

这里介绍使用你自己的服务器进行反代的方法。你也可以选择使用 Cloudflare 的 Workers 进行反代,但可能对于中国大陆的用户来说网络连通性依然不佳。

要搭建一个 Telegram Bot API 反代,你需要准备以下内容:

  1. 一个可以连接 Telegram Bot API 服务器(并安装好 Nginx)。
  2. 一个域名(提前申请 SSL 证书)。

NGINX 配置

编辑 Nginx 配置文件,在 http{} 中添加如下配置:

nginx
# HTTP 强制跳转到 HTTPS
+server {
+    listen 80;
+    listen [::]:80;
+    server_name <yourDomainName>;
+
+    # 强制 HTTPS
+    return 301 https://$server_name$request_uri;
+}
+
+# HTTPS 配置
+server {
+    listen 443 ssl;
+    listen [::]:443 ssl;
+    server_name <yourDomainName>;
+
+    # SSL 证书路径
+    ssl_certificate </path/to/your/server.pem>;
+    ssl_certificate_key </path/to/your/server.key>;
+
+    # Root 非必要
+    root /var/www/tgbot/;
+
+    # 必须配置 DNS,否则会报 502 错误
+    resolver 8.8.8.8;
+
+    # 以 /bot 开头的请求会被正则匹配
+    location ~* ^/bot {
+        proxy_buffering off;
+        proxy_pass  https://api.telegram.org$request_uri;
+        proxy_http_version 1.1;
+    }
+
+    # Root 非必要,主要用于确认服务器状态。也可以改为 return 403
+    location / {
+        try_files $uri $uri /index.html;
+    }
+
+    # 错误日志
+    error_log /var/log/tg.log error;
+}
  • yourDomainName:你准备的域名
  • ssl_certificate:SSL 证书路径
  • ssl_certificate_key:SSL 证书路径

使用方式

执行 systemctl restart nginx 重启 Nginx。然后在 Nezha 中将原来的 https://api.telegram.org/ 替换为 https://<yourDomainName>/,即可正常推送消息。

防止盗用

配置防火墙以防止他人盗用你的反代服务:

  • serverIp:Agent 的 IP 地址。根据你的系统选择适用的命令,ufwiptables 均可。
bash
# Ubuntu
+ufw allow proto tcp from <serverIp> to any port 443
+
+# CentOS
+iptables -I INPUT -p tcp --dport 443 -j DROP
+iptables -I INPUT -s <serverIp> -p tcp --dport 443 -j ACCEPT

通过以上配置,可以有效防止未经授权的访问。

`,17),t=[p];function h(e,k,r,d,g,o){return a(),i("div",null,t)}const y=s(l,[["render",h]]);export{c as __pageData,y as default}; diff --git a/assets/guide_q1.md.C5KPuqP_.lean.js b/assets/guide_q1.md.C5KPuqP_.lean.js new file mode 100644 index 00000000..abf3ab1a --- /dev/null +++ b/assets/guide_q1.md.C5KPuqP_.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const c=JSON.parse('{"title":"反向代理 Telegram Bot API","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q1.md","filePath":"guide/q1.md","lastUpdated":1719239024000}'),l={name:"guide/q1.md"},p=n("",17),t=[p];function h(e,k,r,d,g,o){return a(),i("div",null,t)}const y=s(l,[["render",h]]);export{c as __pageData,y as default}; diff --git a/assets/guide_q1.md.aa6954ab.js b/assets/guide_q1.md.aa6954ab.js deleted file mode 100644 index 2f8289d8..00000000 --- a/assets/guide_q1.md.aa6954ab.js +++ /dev/null @@ -1,46 +0,0 @@ -import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"反向代理 Telegram Bot API","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q1.md","filePath":"guide/q1.md","lastUpdated":1718495592000}'),p={name:"guide/q1.md"},o=l(`

反向代理 Telegram Bot API

如果你的 Dashboard 服务器无法访问 Telegram Bot API,但你依然想使用 Telegram 来推送通知,你可以尝试使用反向代理的方式解决这个问题。

准备工作

这里介绍使用你自己的服务器进行反代的方法。你也可以选择使用 Cloudflare 的 Workers 进行反代,但可能对于中国大陆的用户来说网络连通性依然不佳。

要搭建一个 Telegram Bot API 反代,你需要准备以下内容:

  1. 一个可以连接 Telegram Bot API 服务器(并安装好 Nginx)。
  2. 一个域名(提前申请 SSL 证书)。

NGINX 配置

编辑 Nginx 配置文件,在 http{} 中添加如下配置:

nginx
# HTTP 强制跳转到 HTTPS
-server {
-    listen 80;
-    listen [::]:80;
-    server_name <yourDomainName>;
-
-    # 强制 HTTPS
-    return 301 https://$server_name$request_uri;
-}
-
-# HTTPS 配置
-server {
-    listen 443 ssl;
-    listen [::]:443 ssl;
-    server_name <yourDomainName>;
-
-    # SSL 证书路径
-    ssl_certificate </path/to/your/server.pem>;
-    ssl_certificate_key </path/to/your/server.key>;
-
-    # Root 非必要
-    root /var/www/tgbot/;
-
-    # 必须配置 DNS,否则会报 502 错误
-    resolver 8.8.8.8;
-
-    # 以 /bot 开头的请求会被正则匹配
-    location ~* ^/bot {
-        proxy_buffering off;
-        proxy_pass  https://api.telegram.org$request_uri;
-        proxy_http_version 1.1;
-    }
-
-    # Root 非必要,主要用于确认服务器状态。也可以改为 return 403
-    location / {
-        try_files $uri $uri /index.html;
-    }
-
-    # 错误日志
-    error_log /var/log/tg.log error;
-}
  • yourDomainName:你准备的域名
  • ssl_certificate:SSL 证书路径
  • ssl_certificate_key:SSL 证书路径

使用方式

执行 systemctl restart nginx 重启 Nginx。然后在 Nezha 中将原来的 https://api.telegram.org/ 替换为 https://<yourDomainName>/,即可正常推送消息。

防止盗用

配置防火墙以防止他人盗用你的反代服务:

  • serverIp:Agent 的 IP 地址。根据你的系统选择适用的命令,ufwiptables 均可。
bash
# Ubuntu
-ufw allow proto tcp from <serverIp> to any port 443
-
-# CentOS
-iptables -I INPUT -p tcp --dport 443 -j DROP
-iptables -I INPUT -s <serverIp> -p tcp --dport 443 -j ACCEPT

通过以上配置,可以有效防止未经授权的访问。

`,17),e=[o];function t(c,r,C,y,D,A){return a(),n("div",null,e)}const d=s(p,[["render",t]]);export{F as __pageData,d as default}; diff --git a/assets/guide_q1.md.aa6954ab.lean.js b/assets/guide_q1.md.aa6954ab.lean.js deleted file mode 100644 index 6e74c7d7..00000000 --- a/assets/guide_q1.md.aa6954ab.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const F=JSON.parse('{"title":"反向代理 Telegram Bot API","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q1.md","filePath":"guide/q1.md","lastUpdated":1718495592000}'),p={name:"guide/q1.md"},o=l("",17),e=[o];function t(c,r,C,y,D,A){return a(),n("div",null,e)}const d=s(p,[["render",t]]);export{F as __pageData,d as default}; diff --git a/assets/guide_q2.md.524813bc.js b/assets/guide_q2.md.524813bc.js deleted file mode 100644 index 60673c02..00000000 --- a/assets/guide_q2.md.524813bc.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"Agent 启动/上线 问题自检流程","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q2.md","filePath":"guide/q2.md","lastUpdated":1718495592000}'),n={name:"guide/q2.md"},r=o('

Agent 启动/上线 问题自检流程

  1. 直接执行 /opt/nezha/agent/nezha-agent -s 面板IP或非CDN域名:面板RPC端口 -p Agent密钥 -d 查看日志是否是因为 DNS、网络不佳导致超时(timeout)
  2. nc -v 域名/IP 面板RPC端口 或者 telnet 域名/IP 面板RPC端口 来检验是否是网络问题,检查本机与面板服务器的出入站防火墙,如果无法判断问题可借助 https://port.ping.pe/ 提供的端口检查工具进行检测。
  3. 如果上面步骤检测正常,Agent 依然没有正常上线,请尝试关闭 SELinux,如何关闭 SELinux?
',2),i=[r];function c(s,_,d,l,p,g){return t(),a("div",null,i)}const u=e(n,[["render",c]]);export{f as __pageData,u as default}; diff --git a/assets/guide_q2.md.524813bc.lean.js b/assets/guide_q2.md.524813bc.lean.js deleted file mode 100644 index dd56d96c..00000000 --- a/assets/guide_q2.md.524813bc.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const f=JSON.parse('{"title":"Agent 启动/上线 问题自检流程","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q2.md","filePath":"guide/q2.md","lastUpdated":1718495592000}'),n={name:"guide/q2.md"},r=o("",2),i=[r];function c(s,_,d,l,p,g){return t(),a("div",null,i)}const u=e(n,[["render",c]]);export{f as __pageData,u as default}; diff --git a/assets/guide_q2.md.DVtou8cF.js b/assets/guide_q2.md.DVtou8cF.js new file mode 100644 index 00000000..38244f87 --- /dev/null +++ b/assets/guide_q2.md.DVtou8cF.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Agent 启动/上线 问题自检流程","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q2.md","filePath":"guide/q2.md","lastUpdated":1719239024000}'),n={name:"guide/q2.md"},r=o('

Agent 启动/上线 问题自检流程

  1. 直接执行 /opt/nezha/agent/nezha-agent -s 面板IP或非CDN域名:面板RPC端口 -p Agent密钥 -d 查看日志是否是因为 DNS、网络不佳导致超时(timeout)
  2. nc -v 域名/IP 面板RPC端口 或者 telnet 域名/IP 面板RPC端口 来检验是否是网络问题,检查本机与面板服务器的出入站防火墙,如果无法判断问题可借助 https://port.ping.pe/ 提供的端口检查工具进行检测。
  3. 如果上面步骤检测正常,Agent 依然没有正常上线,请尝试关闭 SELinux,如何关闭 SELinux?
',2),i=[r];function c(s,_,d,l,p,g){return a(),t("div",null,i)}const u=e(n,[["render",c]]);export{f as __pageData,u as default}; diff --git a/assets/guide_q2.md.DVtou8cF.lean.js b/assets/guide_q2.md.DVtou8cF.lean.js new file mode 100644 index 00000000..38002bb2 --- /dev/null +++ b/assets/guide_q2.md.DVtou8cF.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const f=JSON.parse('{"title":"Agent 启动/上线 问题自检流程","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q2.md","filePath":"guide/q2.md","lastUpdated":1719239024000}'),n={name:"guide/q2.md"},r=o("",2),i=[r];function c(s,_,d,l,p,g){return a(),t("div",null,i)}const u=e(n,[["render",c]]);export{f as __pageData,u as default}; diff --git a/assets/guide_q3.md.17434cbd.js b/assets/guide_q3.md.17434cbd.js deleted file mode 100644 index a05a40f9..00000000 --- a/assets/guide_q3.md.17434cbd.js +++ /dev/null @@ -1,74 +0,0 @@ -import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const i=JSON.parse('{"title":"反向代理 gRPC 端口(支持 Cloudflare CDN)","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q3.md","filePath":"guide/q3.md","lastUpdated":1718495592000}'),p={name:"guide/q3.md"},o=l(`

反向代理 gRPC 端口(支持 Cloudflare CDN)

使用 Nginx 或者 Caddy 反向代理 gRPC

  • Nginx 配置
nginx
server {
-    listen 443 ssl http2;
-    listen [::]:443 ssl http2;
-    server_name data.example.com; # 你的 Agent 连接 Dashboard 的域名
-
-    ssl_certificate          /data/letsencrypt/fullchain.pem; # 你的域名证书路径
-    ssl_certificate_key      /data/letsencrypt/key.pem;       # 你的域名私钥路径
-    ssl_stapling on;
-    ssl_session_timeout 1d;
-    ssl_session_cache shared:SSL:10m; # 此项可能会和其他配置文件冲突,如冲突请注释此项
-    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
-
-    underscores_in_headers on;
-
-    keepalive_time 24h;
-    keepalive_requests 100000;
-    keepalive_timeout 120s;
-
-    location / {
-        grpc_read_timeout 300s;
-        grpc_send_timeout 300s;
-        grpc_socket_keepalive on;
-        grpc_pass grpc://grpcservers;
-    }
-}
-
-upstream grpcservers {
-    server localhost:5555;
-    keepalive 512;
-}
  • Caddy 配置
data.example.com:443 { # 你的 Agent 连接 Dashboard 的域名
-    reverse_proxy {
-        to localhost:5555
-        transport http {
-            versions h2c 2
-        }
-    }
-}

Dashboard 面板端配置

  • 首先登录面板进入管理后台 打开设置页面,在 未接入CDN的面板服务器域名/IP 中填入上一步在 Nginx 或 Caddy 中配置的域名 比如 data.example.com ,并保存。
  • 然后在面板服务器中,打开 /opt/nezha/dashboard/data/config.yaml 文件,将 proxygrpcport 修改为 Nginx 或 Caddy 监听的端口,比如上一步设置的 443 ;因为我们在 Nginx 或 Caddy 中开启了 SSL/TLS,所以需要将 tls 设置为 true ;修改完成后重启面板。

Agent 端配置

  • 登录面板管理后台,复制一键安装命令,在对应的服务器上面执行一键安装命令重新安装 agent 端即可。

开启 Cloudflare CDN(可选)

根据 Cloudflare gRPC 的要求:gRPC 服务必须侦听 443 端口 且必须支持 TLS 和 HTTP/2。 所以如果需要开启 CDN,必须在配置 Nginx 或者 Caddy 反向代理 gRPC 时使用 443 端口,并配置证书(Caddy 会自动申请并配置证书)。

  • 登录 Cloudflare,选择使用的域名。打开 网络 选项将 gRPC 开关打开,打开 DNS 选项,找到 Nginx 或 Caddy 反代 gRPC 配置的域名的解析记录,打开橙色云启用 CDN。

开启gRPC后,可能不能立即可用,需要等待一段时间。具体可通过curl和使用nezha-agent -d来验证:

bash
localhost:~/agent# curl -H "content-type: application/grpc+proto" -H "authorization: Bearer test" https://xxx.xxx.ovh -v 
-* processing: https://xxx.xxx.ovh
-*   Trying [2606:4700:3035::ac43:8bed]:443...
-* Connected to xxx.xxx.ovh (2606:4700:3035::ac43:8bed) port 443
-# ... SSL info
-* using HTTP/2
-* h2 [:method: GET]
-* h2 [:scheme: https]
-* h2 [:authority: xxx.xxx.ovh]
-* h2 [:path: /]
-* h2 [user-agent: curl/8.2.1]
-* h2 [accept: */*]
-* Using Stream ID: 1
-> GET / HTTP/2
-> Host: xxx.xxx.ovh
-> User-Agent: curl/8.4.0
-> Accept: */*
-> content-type: application/grpc+proto
-> authorization: Bearer test
-> 
-< HTTP/2 405 
-< date: Wed, 20 Dec 2023 08:56:27 GMT
-< content-type: application/grpc+proto
-< cf-ray: 8386ac12dabd5ddc-HKG
-< cf-cache-status: DYNAMIC
-< grpc-message: Received a HEADERS frame with :method "GET" which should be POST
-< grpc-status: 13
-< report-to: {"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=%2BTjgJvXWyRF11nUOYx9Lq7UDC1xOYBLtjvWrdjVJQIqu9YqnFJeZFran2KRs6zabQc%2BLV8AubNqYRYDb7hQAZe6bglmVz0wQjrb0tNovYf%2B59SAp%2BQfZnH%2BAFDydNT95ZCmTPnKgWetcwQiUfXU%3D"}],"group":"cf-nel","max_age":604800}
-< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
-< vary: Accept-Encoding
-< server: cloudflare
-< alt-svc: h3=":443"; ma=86400
-< 
-* Connection #0 to host xxx.xxx.ovh left intact
-localhost:~/agent# /opt/nezha/agent/nezha-agent -s nezha.xxx.xxx:443 -p YOUR_KEY --tls -d
-NEZHA@2023-12-20 05:14:00>> 检查更新: 0.15.14
-NEZHA@2023-12-20 05:14:01>> 上报系统信息失败: rpc error: code = Unknown desc = EOF # 需要修改主控端 /opt/nezha/dashboard/data/config.yaml的 GRPCHost 和 TLS 选项
-NEZHA@2023-12-20 05:14:01>> Error to close connection ...
`,15),e=[o];function t(c,r,D,C,y,F){return n(),a("div",null,e)}const d=s(p,[["render",t]]);export{i as __pageData,d as default}; diff --git a/assets/guide_q3.md.17434cbd.lean.js b/assets/guide_q3.md.17434cbd.lean.js deleted file mode 100644 index 7ce0eb9d..00000000 --- a/assets/guide_q3.md.17434cbd.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as n,c as a,R as l}from"./chunks/framework.44fd0451.js";const i=JSON.parse('{"title":"反向代理 gRPC 端口(支持 Cloudflare CDN)","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q3.md","filePath":"guide/q3.md","lastUpdated":1718495592000}'),p={name:"guide/q3.md"},o=l("",15),e=[o];function t(c,r,D,C,y,F){return n(),a("div",null,e)}const d=s(p,[["render",t]]);export{i as __pageData,d as default}; diff --git a/assets/guide_q3.md.CQNdJrKk.js b/assets/guide_q3.md.CQNdJrKk.js new file mode 100644 index 00000000..23211017 --- /dev/null +++ b/assets/guide_q3.md.CQNdJrKk.js @@ -0,0 +1,74 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const o=JSON.parse('{"title":"反向代理 gRPC 端口(支持 Cloudflare CDN)","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q3.md","filePath":"guide/q3.md","lastUpdated":1719239024000}'),l={name:"guide/q3.md"},p=n(`

反向代理 gRPC 端口(支持 Cloudflare CDN)

使用 Nginx 或者 Caddy 反向代理 gRPC

  • Nginx 配置
nginx
server {
+    listen 443 ssl http2;
+    listen [::]:443 ssl http2;
+    server_name data.example.com; # 你的 Agent 连接 Dashboard 的域名
+
+    ssl_certificate          /data/letsencrypt/fullchain.pem; # 你的域名证书路径
+    ssl_certificate_key      /data/letsencrypt/key.pem;       # 你的域名私钥路径
+    ssl_stapling on;
+    ssl_session_timeout 1d;
+    ssl_session_cache shared:SSL:10m; # 此项可能会和其他配置文件冲突,如冲突请注释此项
+    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
+
+    underscores_in_headers on;
+
+    keepalive_time 24h;
+    keepalive_requests 100000;
+    keepalive_timeout 120s;
+
+    location / {
+        grpc_read_timeout 300s;
+        grpc_send_timeout 300s;
+        grpc_socket_keepalive on;
+        grpc_pass grpc://grpcservers;
+    }
+}
+
+upstream grpcservers {
+    server localhost:5555;
+    keepalive 512;
+}
  • Caddy 配置
data.example.com:443 { # 你的 Agent 连接 Dashboard 的域名
+    reverse_proxy {
+        to localhost:5555
+        transport http {
+            versions h2c 2
+        }
+    }
+}

Dashboard 面板端配置

  • 首先登录面板进入管理后台 打开设置页面,在 未接入CDN的面板服务器域名/IP 中填入上一步在 Nginx 或 Caddy 中配置的域名 比如 data.example.com ,并保存。
  • 然后在面板服务器中,打开 /opt/nezha/dashboard/data/config.yaml 文件,将 proxygrpcport 修改为 Nginx 或 Caddy 监听的端口,比如上一步设置的 443 ;因为我们在 Nginx 或 Caddy 中开启了 SSL/TLS,所以需要将 tls 设置为 true ;修改完成后重启面板。

Agent 端配置

  • 登录面板管理后台,复制一键安装命令,在对应的服务器上面执行一键安装命令重新安装 agent 端即可。

开启 Cloudflare CDN(可选)

根据 Cloudflare gRPC 的要求:gRPC 服务必须侦听 443 端口 且必须支持 TLS 和 HTTP/2。 所以如果需要开启 CDN,必须在配置 Nginx 或者 Caddy 反向代理 gRPC 时使用 443 端口,并配置证书(Caddy 会自动申请并配置证书)。

  • 登录 Cloudflare,选择使用的域名。打开 网络 选项将 gRPC 开关打开,打开 DNS 选项,找到 Nginx 或 Caddy 反代 gRPC 配置的域名的解析记录,打开橙色云启用 CDN。

开启gRPC后,可能不能立即可用,需要等待一段时间。具体可通过curl和使用nezha-agent -d来验证:

bash
localhost:~/agent# curl -H "content-type: application/grpc+proto" -H "authorization: Bearer test" https://xxx.xxx.ovh -v 
+* processing: https://xxx.xxx.ovh
+*   Trying [2606:4700:3035::ac43:8bed]:443...
+* Connected to xxx.xxx.ovh (2606:4700:3035::ac43:8bed) port 443
+# ... SSL info
+* using HTTP/2
+* h2 [:method: GET]
+* h2 [:scheme: https]
+* h2 [:authority: xxx.xxx.ovh]
+* h2 [:path: /]
+* h2 [user-agent: curl/8.2.1]
+* h2 [accept: */*]
+* Using Stream ID: 1
+> GET / HTTP/2
+> Host: xxx.xxx.ovh
+> User-Agent: curl/8.4.0
+> Accept: */*
+> content-type: application/grpc+proto
+> authorization: Bearer test
+> 
+< HTTP/2 405 
+< date: Wed, 20 Dec 2023 08:56:27 GMT
+< content-type: application/grpc+proto
+< cf-ray: 8386ac12dabd5ddc-HKG
+< cf-cache-status: DYNAMIC
+< grpc-message: Received a HEADERS frame with :method "GET" which should be POST
+< grpc-status: 13
+< report-to: {"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=%2BTjgJvXWyRF11nUOYx9Lq7UDC1xOYBLtjvWrdjVJQIqu9YqnFJeZFran2KRs6zabQc%2BLV8AubNqYRYDb7hQAZe6bglmVz0wQjrb0tNovYf%2B59SAp%2BQfZnH%2BAFDydNT95ZCmTPnKgWetcwQiUfXU%3D"}],"group":"cf-nel","max_age":604800}
+< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
+< vary: Accept-Encoding
+< server: cloudflare
+< alt-svc: h3=":443"; ma=86400
+< 
+* Connection #0 to host xxx.xxx.ovh left intact
+localhost:~/agent# /opt/nezha/agent/nezha-agent -s nezha.xxx.xxx:443 -p YOUR_KEY --tls -d
+NEZHA@2023-12-20 05:14:00>> 检查更新: 0.15.14
+NEZHA@2023-12-20 05:14:01>> 上报系统信息失败: rpc error: code = Unknown desc = EOF # 需要修改主控端 /opt/nezha/dashboard/data/config.yaml的 GRPCHost 和 TLS 选项
+NEZHA@2023-12-20 05:14:01>> Error to close connection ...
`,15),t=[p];function h(k,e,d,r,g,E){return a(),i("div",null,t)}const y=s(l,[["render",h]]);export{o as __pageData,y as default}; diff --git a/assets/guide_q3.md.CQNdJrKk.lean.js b/assets/guide_q3.md.CQNdJrKk.lean.js new file mode 100644 index 00000000..7e010e6b --- /dev/null +++ b/assets/guide_q3.md.CQNdJrKk.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const o=JSON.parse('{"title":"反向代理 gRPC 端口(支持 Cloudflare CDN)","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q3.md","filePath":"guide/q3.md","lastUpdated":1719239024000}'),l={name:"guide/q3.md"},p=n("",15),t=[p];function h(k,e,d,r,g,E){return a(),i("div",null,t)}const y=s(l,[["render",h]]);export{o as __pageData,y as default}; diff --git a/assets/guide_q4.md.51315641.js b/assets/guide_q4.md.51315641.js deleted file mode 100644 index 238d3bf4..00000000 --- a/assets/guide_q4.md.51315641.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o,c as s,z as e,a as t}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"实时通道断开/在线终端连接失败","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q4.md","filePath":"guide/q4.md","lastUpdated":1718495592000}'),l={name:"guide/q4.md"},d=e("h1",{id:"实时通道断开-在线终端连接失败",tabindex:"-1"},[t("实时通道断开/在线终端连接失败 "),e("a",{class:"header-anchor",href:"#实时通道断开-在线终端连接失败","aria-label":'Permalink to "实时通道断开/在线终端连接失败"'},"​")],-1),n=e("ul",null,[e("li",null,"如果你使用了 CDN,请确认 CDN 服务商提供 WebSocket 服务,并且已开启 WebSocket。"),e("li",null,[t("确认你的反代规则中针对 "),e("code",null,"/ws"),t(", "),e("code",null,"/terminal"),t(" 路径的 WebSocket 进行了特别配置,你可以 "),e("a",{href:"/guide/dashboard.html#配置反向代理"},"点击这里"),t(" 查看反向代理配置。")])],-1),r=[d,n];function c(i,_,u,h,m,p){return o(),s("div",null,r)}const k=a(l,[["render",c]]);export{b as __pageData,k as default}; diff --git a/assets/guide_q4.md.51315641.lean.js b/assets/guide_q4.md.51315641.lean.js deleted file mode 100644 index 238d3bf4..00000000 --- a/assets/guide_q4.md.51315641.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o,c as s,z as e,a as t}from"./chunks/framework.44fd0451.js";const b=JSON.parse('{"title":"实时通道断开/在线终端连接失败","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q4.md","filePath":"guide/q4.md","lastUpdated":1718495592000}'),l={name:"guide/q4.md"},d=e("h1",{id:"实时通道断开-在线终端连接失败",tabindex:"-1"},[t("实时通道断开/在线终端连接失败 "),e("a",{class:"header-anchor",href:"#实时通道断开-在线终端连接失败","aria-label":'Permalink to "实时通道断开/在线终端连接失败"'},"​")],-1),n=e("ul",null,[e("li",null,"如果你使用了 CDN,请确认 CDN 服务商提供 WebSocket 服务,并且已开启 WebSocket。"),e("li",null,[t("确认你的反代规则中针对 "),e("code",null,"/ws"),t(", "),e("code",null,"/terminal"),t(" 路径的 WebSocket 进行了特别配置,你可以 "),e("a",{href:"/guide/dashboard.html#配置反向代理"},"点击这里"),t(" 查看反向代理配置。")])],-1),r=[d,n];function c(i,_,u,h,m,p){return o(),s("div",null,r)}const k=a(l,[["render",c]]);export{b as __pageData,k as default}; diff --git a/assets/guide_q4.md.Bwi-wIzP.js b/assets/guide_q4.md.Bwi-wIzP.js new file mode 100644 index 00000000..9f6e9d37 --- /dev/null +++ b/assets/guide_q4.md.Bwi-wIzP.js @@ -0,0 +1 @@ +import{_ as a,c as o,o as s,j as e,a as t}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"实时通道断开/在线终端连接失败","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q4.md","filePath":"guide/q4.md","lastUpdated":1719239024000}'),l={name:"guide/q4.md"},d=e("h1",{id:"实时通道断开-在线终端连接失败",tabindex:"-1"},[t("实时通道断开/在线终端连接失败 "),e("a",{class:"header-anchor",href:"#实时通道断开-在线终端连接失败","aria-label":'Permalink to "实时通道断开/在线终端连接失败"'},"​")],-1),n=e("ul",null,[e("li",null,"如果你使用了 CDN,请确认 CDN 服务商提供 WebSocket 服务,并且已开启 WebSocket。"),e("li",null,[t("确认你的反代规则中针对 "),e("code",null,"/ws"),t(", "),e("code",null,"/terminal"),t(" 路径的 WebSocket 进行了特别配置,你可以 "),e("a",{href:"/guide/dashboard.html#配置反向代理"},"点击这里"),t(" 查看反向代理配置。")])],-1),r=[d,n];function c(i,_,u,h,m,p){return s(),o("div",null,r)}const k=a(l,[["render",c]]);export{b as __pageData,k as default}; diff --git a/assets/guide_q4.md.Bwi-wIzP.lean.js b/assets/guide_q4.md.Bwi-wIzP.lean.js new file mode 100644 index 00000000..9f6e9d37 --- /dev/null +++ b/assets/guide_q4.md.Bwi-wIzP.lean.js @@ -0,0 +1 @@ +import{_ as a,c as o,o as s,j as e,a as t}from"./chunks/framework.BmdFiWrL.js";const b=JSON.parse('{"title":"实时通道断开/在线终端连接失败","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q4.md","filePath":"guide/q4.md","lastUpdated":1719239024000}'),l={name:"guide/q4.md"},d=e("h1",{id:"实时通道断开-在线终端连接失败",tabindex:"-1"},[t("实时通道断开/在线终端连接失败 "),e("a",{class:"header-anchor",href:"#实时通道断开-在线终端连接失败","aria-label":'Permalink to "实时通道断开/在线终端连接失败"'},"​")],-1),n=e("ul",null,[e("li",null,"如果你使用了 CDN,请确认 CDN 服务商提供 WebSocket 服务,并且已开启 WebSocket。"),e("li",null,[t("确认你的反代规则中针对 "),e("code",null,"/ws"),t(", "),e("code",null,"/terminal"),t(" 路径的 WebSocket 进行了特别配置,你可以 "),e("a",{href:"/guide/dashboard.html#配置反向代理"},"点击这里"),t(" 查看反向代理配置。")])],-1),r=[d,n];function c(i,_,u,h,m,p){return s(),o("div",null,r)}const k=a(l,[["render",c]]);export{b as __pageData,k as default}; diff --git a/assets/guide_q5.md.CApD4PGd.js b/assets/guide_q5.md.CApD4PGd.js new file mode 100644 index 00000000..15e0f846 --- /dev/null +++ b/assets/guide_q5.md.CApD4PGd.js @@ -0,0 +1 @@ +import{_ as a,c as l,o,j as e,a as t}from"./chunks/framework.BmdFiWrL.js";const x=JSON.parse('{"title":"如何进行数据迁移、备份恢复?","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q5.md","filePath":"guide/q5.md","lastUpdated":1719239024000}'),n={name:"guide/q5.md"},s=e("h1",{id:"如何进行数据迁移、备份恢复",tabindex:"-1"},[t("如何进行数据迁移、备份恢复? "),e("a",{class:"header-anchor",href:"#如何进行数据迁移、备份恢复","aria-label":'Permalink to "如何进行数据迁移、备份恢复?"'},"​")],-1),d=e("ol",null,[e("li",null,[t("先运行一键脚本,选择 "),e("code",null,"停止面板")]),e("li",null,[t("在旧服务器中打包 "),e("code",null,"/opt/nezha"),t(" 文件夹,复制到新服务器相同位置解压")]),e("li",null,[t("在新服务器中运行一键脚本,选择 "),e("code",null,"启动面板")])],-1),c=[s,d];function r(i,_,u,p,h,m){return o(),l("div",null,c)}const g=a(n,[["render",r]]);export{x as __pageData,g as default}; diff --git a/assets/guide_q5.md.CApD4PGd.lean.js b/assets/guide_q5.md.CApD4PGd.lean.js new file mode 100644 index 00000000..15e0f846 --- /dev/null +++ b/assets/guide_q5.md.CApD4PGd.lean.js @@ -0,0 +1 @@ +import{_ as a,c as l,o,j as e,a as t}from"./chunks/framework.BmdFiWrL.js";const x=JSON.parse('{"title":"如何进行数据迁移、备份恢复?","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q5.md","filePath":"guide/q5.md","lastUpdated":1719239024000}'),n={name:"guide/q5.md"},s=e("h1",{id:"如何进行数据迁移、备份恢复",tabindex:"-1"},[t("如何进行数据迁移、备份恢复? "),e("a",{class:"header-anchor",href:"#如何进行数据迁移、备份恢复","aria-label":'Permalink to "如何进行数据迁移、备份恢复?"'},"​")],-1),d=e("ol",null,[e("li",null,[t("先运行一键脚本,选择 "),e("code",null,"停止面板")]),e("li",null,[t("在旧服务器中打包 "),e("code",null,"/opt/nezha"),t(" 文件夹,复制到新服务器相同位置解压")]),e("li",null,[t("在新服务器中运行一键脚本,选择 "),e("code",null,"启动面板")])],-1),c=[s,d];function r(i,_,u,p,h,m){return o(),l("div",null,c)}const g=a(n,[["render",r]]);export{x as __pageData,g as default}; diff --git a/assets/guide_q5.md.fda1ace4.js b/assets/guide_q5.md.fda1ace4.js deleted file mode 100644 index 68e4b785..00000000 --- a/assets/guide_q5.md.fda1ace4.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as l,c as o,z as e,a as t}from"./chunks/framework.44fd0451.js";const x=JSON.parse('{"title":"如何进行数据迁移、备份恢复?","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q5.md","filePath":"guide/q5.md","lastUpdated":1718495592000}'),n={name:"guide/q5.md"},s=e("h1",{id:"如何进行数据迁移、备份恢复",tabindex:"-1"},[t("如何进行数据迁移、备份恢复? "),e("a",{class:"header-anchor",href:"#如何进行数据迁移、备份恢复","aria-label":'Permalink to "如何进行数据迁移、备份恢复?"'},"​")],-1),d=e("ol",null,[e("li",null,[t("先运行一键脚本,选择 "),e("code",null,"停止面板")]),e("li",null,[t("在旧服务器中打包 "),e("code",null,"/opt/nezha"),t(" 文件夹,复制到新服务器相同位置解压")]),e("li",null,[t("在新服务器中运行一键脚本,选择 "),e("code",null,"启动面板")])],-1),c=[s,d];function r(i,_,u,p,h,m){return l(),o("div",null,c)}const g=a(n,[["render",r]]);export{x as __pageData,g as default}; diff --git a/assets/guide_q5.md.fda1ace4.lean.js b/assets/guide_q5.md.fda1ace4.lean.js deleted file mode 100644 index 68e4b785..00000000 --- a/assets/guide_q5.md.fda1ace4.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,o as l,c as o,z as e,a as t}from"./chunks/framework.44fd0451.js";const x=JSON.parse('{"title":"如何进行数据迁移、备份恢复?","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q5.md","filePath":"guide/q5.md","lastUpdated":1718495592000}'),n={name:"guide/q5.md"},s=e("h1",{id:"如何进行数据迁移、备份恢复",tabindex:"-1"},[t("如何进行数据迁移、备份恢复? "),e("a",{class:"header-anchor",href:"#如何进行数据迁移、备份恢复","aria-label":'Permalink to "如何进行数据迁移、备份恢复?"'},"​")],-1),d=e("ol",null,[e("li",null,[t("先运行一键脚本,选择 "),e("code",null,"停止面板")]),e("li",null,[t("在旧服务器中打包 "),e("code",null,"/opt/nezha"),t(" 文件夹,复制到新服务器相同位置解压")]),e("li",null,[t("在新服务器中运行一键脚本,选择 "),e("code",null,"启动面板")])],-1),c=[s,d];function r(i,_,u,p,h,m){return l(),o("div",null,c)}const g=a(n,[["render",r]]);export{x as __pageData,g as default}; diff --git a/assets/guide_q6.md.D9InDAD2.js b/assets/guide_q6.md.D9InDAD2.js new file mode 100644 index 00000000..a9bbbdb8 --- /dev/null +++ b/assets/guide_q6.md.D9InDAD2.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"如何每月重置流量统计?","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q6.md","filePath":"guide/q6.md","lastUpdated":1719239024000}'),i={name:"guide/q6.md"},c=o('

如何每月重置流量统计?

主页中的流量统计每次服务器重启时都会重置,如果要实现每月重置一次流量计数,可以这样实现:

  1. 进入管理面板的 告警
  2. 参考这篇文档,创建一个月流量告警
  3. 返回主页,在 服务 页中就可以看到月流量统计了,这里的统计数据不会因为服务器重启而重置

TIP

此方式可以设置任何周期,包括且不限于每小时/每天/每周/每月/每年重置流量统计,非常灵活!

',4),s=[c];function d(l,_,r,n,p,h){return a(),t("div",null,s)}const f=e(i,[["render",d]]);export{u as __pageData,f as default}; diff --git a/assets/guide_q6.md.D9InDAD2.lean.js b/assets/guide_q6.md.D9InDAD2.lean.js new file mode 100644 index 00000000..c71db844 --- /dev/null +++ b/assets/guide_q6.md.D9InDAD2.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"如何每月重置流量统计?","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q6.md","filePath":"guide/q6.md","lastUpdated":1719239024000}'),i={name:"guide/q6.md"},c=o("",4),s=[c];function d(l,_,r,n,p,h){return a(),t("div",null,s)}const f=e(i,[["render",d]]);export{u as __pageData,f as default}; diff --git a/assets/guide_q6.md.a63ae0d3.js b/assets/guide_q6.md.a63ae0d3.js deleted file mode 100644 index f937ba6e..00000000 --- a/assets/guide_q6.md.a63ae0d3.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"如何每月重置流量统计?","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q6.md","filePath":"guide/q6.md","lastUpdated":1718495592000}'),i={name:"guide/q6.md"},c=o('

如何每月重置流量统计?

主页中的流量统计每次服务器重启时都会重置,如果要实现每月重置一次流量计数,可以这样实现:

  1. 进入管理面板的 告警
  2. 参考这篇文档,创建一个月流量告警
  3. 返回主页,在 服务 页中就可以看到月流量统计了,这里的统计数据不会因为服务器重启而重置

TIP

此方式可以设置任何周期,包括且不限于每小时/每天/每周/每月/每年重置流量统计,非常灵活!

',4),s=[c];function d(l,_,r,n,p,h){return t(),a("div",null,s)}const f=e(i,[["render",d]]);export{u as __pageData,f as default}; diff --git a/assets/guide_q6.md.a63ae0d3.lean.js b/assets/guide_q6.md.a63ae0d3.lean.js deleted file mode 100644 index 5f9377c7..00000000 --- a/assets/guide_q6.md.a63ae0d3.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"如何每月重置流量统计?","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q6.md","filePath":"guide/q6.md","lastUpdated":1718495592000}'),i={name:"guide/q6.md"},c=o("",4),s=[c];function d(l,_,r,n,p,h){return t(),a("div",null,s)}const f=e(i,[["render",d]]);export{u as __pageData,f as default}; diff --git a/assets/guide_q7.md.9c08febc.js b/assets/guide_q7.md.9c08febc.js deleted file mode 100644 index 37c4453d..00000000 --- a/assets/guide_q7.md.9c08febc.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as a,c as t,R as s}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"自定义 Agent 监控项目","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q7.md","filePath":"guide/q7.md","lastUpdated":1718495592000}'),n={name:"guide/q7.md"},o=s('

自定义 Agent 监控项目

自定义监控的网卡和硬盘分区

执行以下命令来选择自定义的网卡和分区,然后重启 Agent 即可生效:

bash
/opt/nezha/agent/nezha-agent edit

其他运行参数

通过执行以下命令查看支持的参数:

bash
./nezha-agent --help

如果你使用了一键脚本安装 Agent,可以编辑 /etc/systemd/system/nezha-agent.service,在 ExecStart= 这一行的末尾加上以下参数:

  • --report-delay:控制系统信息上报的间隔,默认为 1 秒,可以设置为 3 来进一步降低 agent 端系统资源占用(配置区间 1-4)。
  • --skip-conn:不监控连接数,推荐在机场/连接密集型服务器或CPU占用较高的服务器上设置。
  • --skip-procs:不监控进程数,也可以降低 Agent 占用。
  • --disable-auto-update:禁止 自动更新 Agent(安全特性)。
  • --disable-force-update:禁止 强制更新 Agent(安全特性)。
  • --disable-command-execute:禁止在 Agent 上执行定时任务、打开在线终端(安全特性)。
  • --tls:启用 SSL/TLS 加密(使用 nginx 反向代理 Agent 的 grpc 连接,并且 nginx 开启 SSL/TLS 时,需要启用该项配置)。
',9),l=[o];function c(i,d,p,r,g,h){return a(),t("div",null,l)}const m=e(n,[["render",c]]);export{u as __pageData,m as default}; diff --git a/assets/guide_q7.md.9c08febc.lean.js b/assets/guide_q7.md.9c08febc.lean.js deleted file mode 100644 index 88da9945..00000000 --- a/assets/guide_q7.md.9c08febc.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as a,c as t,R as s}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"自定义 Agent 监控项目","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q7.md","filePath":"guide/q7.md","lastUpdated":1718495592000}'),n={name:"guide/q7.md"},o=s("",9),l=[o];function c(i,d,p,r,g,h){return a(),t("div",null,l)}const m=e(n,[["render",c]]);export{u as __pageData,m as default}; diff --git a/assets/guide_q7.md.DyaEbK7v.js b/assets/guide_q7.md.DyaEbK7v.js new file mode 100644 index 00000000..2f6383d6 --- /dev/null +++ b/assets/guide_q7.md.DyaEbK7v.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a4 as s}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"自定义 Agent 监控项目","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q7.md","filePath":"guide/q7.md","lastUpdated":1719239024000}'),i={name:"guide/q7.md"},n=s('

自定义 Agent 监控项目

自定义监控的网卡和硬盘分区

执行以下命令来选择自定义的网卡和分区,然后重启 Agent 即可生效:

bash
/opt/nezha/agent/nezha-agent edit

其他运行参数

通过执行以下命令查看支持的参数:

bash
./nezha-agent --help

如果你使用了一键脚本安装 Agent,可以编辑 /etc/systemd/system/nezha-agent.service,在 ExecStart= 这一行的末尾加上以下参数:

  • --report-delay:控制系统信息上报的间隔,默认为 1 秒,可以设置为 3 来进一步降低 agent 端系统资源占用(配置区间 1-4)。
  • --skip-conn:不监控连接数,推荐在机场/连接密集型服务器或CPU占用较高的服务器上设置。
  • --skip-procs:不监控进程数,也可以降低 Agent 占用。
  • --disable-auto-update:禁止 自动更新 Agent(安全特性)。
  • --disable-force-update:禁止 强制更新 Agent(安全特性)。
  • --disable-command-execute:禁止在 Agent 上执行定时任务、打开在线终端(安全特性)。
  • --tls:启用 SSL/TLS 加密(使用 nginx 反向代理 Agent 的 grpc 连接,并且 nginx 开启 SSL/TLS 时,需要启用该项配置)。
',9),o=[n];function d(l,c,p,h,r,g){return t(),a("div",null,o)}const k=e(i,[["render",d]]);export{_ as __pageData,k as default}; diff --git a/assets/guide_q7.md.DyaEbK7v.lean.js b/assets/guide_q7.md.DyaEbK7v.lean.js new file mode 100644 index 00000000..ed404180 --- /dev/null +++ b/assets/guide_q7.md.DyaEbK7v.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a4 as s}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"自定义 Agent 监控项目","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q7.md","filePath":"guide/q7.md","lastUpdated":1719239024000}'),i={name:"guide/q7.md"},n=s("",9),o=[n];function d(l,c,p,h,r,g){return t(),a("div",null,o)}const k=e(i,[["render",d]]);export{_ as __pageData,k as default}; diff --git a/assets/guide_q8.md.107876e2.js b/assets/guide_q8.md.107876e2.js deleted file mode 100644 index 9ee7a8ac..00000000 --- a/assets/guide_q8.md.107876e2.js +++ /dev/null @@ -1,6 +0,0 @@ -import{_ as e,o as a,c as o,R as c}from"./chunks/framework.44fd0451.js";const D=JSON.parse('{"title":"使用 Cloudflare Access 作为 OAuth2 提供方","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q8.md","filePath":"guide/q8.md","lastUpdated":1718495592000}'),s={name:"guide/q8.md"},t=c(`

使用 Cloudflare Access 作为 OAuth2 提供方

相较于 Github,Cloudflare Access 对于中国大陆用户更加友好。如您当前使用 Github、Gitlab、Gitee 作为管理员账户登录时遇到问题,您可以考虑切换 Cloudflare Access 作为 OAuth2 提供方

示例配置:

yaml
Oauth2:
-  Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
-  ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
-  ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
-  Endpoint: "https://xxxxx.cloudflareaccess.com"
-  Type: cloudflare

配置说明:

参数获取方式
AdminMy Team -> Users -> <具体用户> -> User ID
ClientID/ClientSecretAccess -> Application -> Add an Application
-> SaaS -> OIDC
EndpointAccess -> Application -> Application URL -> 只保留协议+域名的部分,路径不需要

新建 SaaS-OIDC 应用流程

前往 Zero Trust Dashboard: https://one.dash.cloudflare.com

  1. My Team -> Users -> <具体用户> -> 获取 User ID 并保存;
  2. Access -> Application -> Add an Application;
  3. 选择 SaaS,在 Application 中输入自定义的应用名称(例如 nezha),选择 OIDC后点击 Add application;
  4. Scopes 选择 openid, email, profile, groups;
  5. Redirect URLs 填写你的 CallBack 地址,例如 https://dashboard.example.com/oauth2/callback;
  6. 记录 Client IDClient SecretIssuer 地址中协议与域名的部分,例如 https://xxxxx.cloudflareaccess.com
  7. 编辑 Dashboard 配置文件(通常在/opt/nezha/dashboard/data/config.yaml),参考示例配置修改 Oauth2 配置,并重启 Dashboard 服务

身份验证策略配置

在完成 Dashboard 的设置后,您还需要在 Zero Trust Dashboard 中 Access-> Applications -> <应用名> -> Policies 配置验证策略。您可以选择包括邮件OTP验证、硬件密钥验证、等十多种 SSO 验证方式,详细配置请参考 Cloudflare Zero Trust 文档

`,11),l=[t];function d(n,r,p,i,h,u){return a(),o("div",null,l)}const C=e(s,[["render",d]]);export{D as __pageData,C as default}; diff --git a/assets/guide_q8.md.107876e2.lean.js b/assets/guide_q8.md.107876e2.lean.js deleted file mode 100644 index ccb01455..00000000 --- a/assets/guide_q8.md.107876e2.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as a,c as o,R as c}from"./chunks/framework.44fd0451.js";const D=JSON.parse('{"title":"使用 Cloudflare Access 作为 OAuth2 提供方","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q8.md","filePath":"guide/q8.md","lastUpdated":1718495592000}'),s={name:"guide/q8.md"},t=c("",11),l=[t];function d(n,r,p,i,h,u){return a(),o("div",null,l)}const C=e(s,[["render",d]]);export{D as __pageData,C as default}; diff --git a/assets/guide_q8.md.CXLLAZ7L.js b/assets/guide_q8.md.CXLLAZ7L.js new file mode 100644 index 00000000..dc3ce3bd --- /dev/null +++ b/assets/guide_q8.md.CXLLAZ7L.js @@ -0,0 +1,6 @@ +import{_ as e,c as a,o as s,a4 as t}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"使用 Cloudflare Access 作为 OAuth2 提供方","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q8.md","filePath":"guide/q8.md","lastUpdated":1719239024000}'),d={name:"guide/q8.md"},c=t(`

使用 Cloudflare Access 作为 OAuth2 提供方

相较于 Github,Cloudflare Access 对于中国大陆用户更加友好。如您当前使用 Github、Gitlab、Gitee 作为管理员账户登录时遇到问题,您可以考虑切换 Cloudflare Access 作为 OAuth2 提供方

示例配置:

yaml
Oauth2:
+  Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
+  ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
+  ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
+  Endpoint: "https://xxxxx.cloudflareaccess.com"
+  Type: cloudflare

配置说明:

参数获取方式
AdminMy Team -> Users -> <具体用户> -> User ID
ClientID/ClientSecretAccess -> Application -> Add an Application
-> SaaS -> OIDC
EndpointAccess -> Application -> Application URL -> 只保留协议+域名的部分,路径不需要

新建 SaaS-OIDC 应用流程

前往 Zero Trust Dashboard: https://one.dash.cloudflare.com

  1. My Team -> Users -> <具体用户> -> 获取 User ID 并保存;
  2. Access -> Application -> Add an Application;
  3. 选择 SaaS,在 Application 中输入自定义的应用名称(例如 nezha),选择 OIDC后点击 Add application;
  4. Scopes 选择 openid, email, profile, groups;
  5. Redirect URLs 填写你的 CallBack 地址,例如 https://dashboard.example.com/oauth2/callback;
  6. 记录 Client IDClient SecretIssuer 地址中协议与域名的部分,例如 https://xxxxx.cloudflareaccess.com
  7. 编辑 Dashboard 配置文件(通常在/opt/nezha/dashboard/data/config.yaml),参考示例配置修改 Oauth2 配置,并重启 Dashboard 服务

身份验证策略配置

在完成 Dashboard 的设置后,您还需要在 Zero Trust Dashboard 中 Access-> Applications -> <应用名> -> Policies 配置验证策略。您可以选择包括邮件OTP验证、硬件密钥验证、等十多种 SSO 验证方式,详细配置请参考 Cloudflare Zero Trust 文档

`,11),o=[c];function i(l,n,r,h,p,k){return s(),a("div",null,o)}const b=e(d,[["render",i]]);export{g as __pageData,b as default}; diff --git a/assets/guide_q8.md.CXLLAZ7L.lean.js b/assets/guide_q8.md.CXLLAZ7L.lean.js new file mode 100644 index 00000000..a66840dc --- /dev/null +++ b/assets/guide_q8.md.CXLLAZ7L.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as s,a4 as t}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"使用 Cloudflare Access 作为 OAuth2 提供方","description":"","frontmatter":{},"headers":[],"relativePath":"guide/q8.md","filePath":"guide/q8.md","lastUpdated":1719239024000}'),d={name:"guide/q8.md"},c=t("",11),o=[c];function i(l,n,r,h,p,k){return s(),a("div",null,o)}const b=e(d,[["render",i]]);export{g as __pageData,b as default}; diff --git a/assets/guide_servers.md.971f5a47.js b/assets/guide_servers.md.971f5a47.js deleted file mode 100644 index 0ee40953..00000000 --- a/assets/guide_servers.md.971f5a47.js +++ /dev/null @@ -1,26 +0,0 @@ -import{_ as s,o as a,c as o,R as e}from"./chunks/framework.44fd0451.js";const C=JSON.parse('{"title":"服务器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/servers.md","filePath":"guide/servers.md","lastUpdated":1718495592000}'),l={name:"guide/servers.md"},n=e(`

服务器

介绍

服务器区域负责管理 Agent,是哪吒探针中最基础的区域,也是其他功能的基础。

新增服务器

第一步是新增服务器,可以自定义名称、分组、排序和备注。
拥有相同分组的服务器会在受支持的主题中划分到一起进行显示,备注仅会在后台显示,无需担心泄露信息。

安装 Agent

请参考前文安装 Agent
推荐使用一键安装,即配置好参数后,点击服务器一键安装列上的对应的系统图标即可复制安装命令,在相应服务器上进行安装。

强制更新

Agent 更新相关的参数是 自定义 Agent 监控项目 中的 --disable-auto-update--disable-force-update
默认情况下,Agent 会自动更新,无需干预。但当用户关闭自动更新后,也可以选中指定服务器进行强制更新。
disable-force-update 开启时此功能不生效。

数据列

  • 版本号:记录 Agent 当前版本。
  • 对游客隐藏:为 True 时,游客在面板中无法查看到此服务器。
  • 启用 DDNS:为 True 时,当该服务器 IP 发生变化,Dashboard 会自动更新 DNS 记录。
  • DDNS 域名:为该服务器配置的 DDNS 域名。
  • 密钥:即 secret/key,配置 Agent 时会用到,用于验证 Agent 与 Dashboard 的通信。
  • 一键安装:点击相应的系统按钮,复制命令到服务器执行即可一键安装。
  • 管理:分别为连接 WebShell,修改服务器配置,删除服务器。

在线终端

即 WebShell,disable-command-execute 开启时此功能不生效。
Linux 和 Windows 均可用,可使用 Ctrl+Shift+V 粘贴。
连接失败请参考实时通道断开/在线终端连接失败
注意在线终端功能中,Agent 也是通过 WebSocket 连接到公开访问域名,而非通过 gRPC 交互。

DDNS 功能

DDNS 功能适用于使用动态 IP 的服务器,当 Agent 上报了一个新的 IP,Dashboard 会根据配置自动更新 DNS 记录。

为什么我要使用哪吒监控的 DDNS 功能?

  • 方便集中管理 DDNS 设置,而不是在每台服务器上都部署一个 DDNS 服务。
  • 仅在面板服务器上保存您的机密信息,防止外泄。

配置说明

目前 DDNS 功能支持两种形式的配置:单配置和多配置。如使用单配置,则所有 Agent 服务器都使用相同的配置更新 DDNS;如使用多配置,则可为每台服务器指定一个配置更新 DDNS,灵活性更强。

单配置

yaml
DDNS:
-  Enable: true
-  Provider: "webhook"
-  AccessID: ""
-  AccessSecret: ""
-  WebhookMethod: ""
-  WebhookURL: ""
-  WebhookRequestBody: ""
-  WebhookHeaders: ""
-  MaxRetries: 3
-  Profiles: null
  • Enable:布尔值,选择是否开启 DDNS 功能。
  • Provider:DDNS 供应商的名称;目前支持 webhookcloudflare 以及 tencentcloud
  • AccessID:DDNS 供应商的令牌 ID;仅适用于供应商 tencentcloud
  • AccessSecret:DDNS 供应商的令牌 Secret;仅适用于供应商 cloudflaretencentcloud
  • WebhookMethod:Webhook 的请求方法。例如 GETPOST 等;仅适用于供应商 webhook
  • WebhookURL:Webhook 的请求地址;仅适用于供应商 webhook
  • WebhookRequestBody:Webhook 的请求体;仅适用于供应商 webhook
  • WebhookHeaders:Webhook 的请求头;仅适用于供应商 webhook
  • MaxRetries:当请求失败时,重试请求的次数。
  • Profiles:多配置设定;在单配置设定中,此项忽略。

WebhookURLWebhookRequestBody 以及 WebhookHeaders 可以包含以下参数:

  • {ip}:主机当前 IP。
  • {domain}:ddns 域名。
  • {type}:IP 类型,可能为 "ipv4" 和 "ipv6"。
  • {access_id}:凭据 1。
  • {access_secret}:凭据 2。

配置示例:

yaml
WebhookHeaders: |
-    a:{access_id}
-    b:{access_secret}
-WebhookRequestBody: '{"domain": "{domain}", "ip": "{ip}", "type": "{type}"}'

多配置

当使用多配置时,请将 DDNS.Provider 留空。如 DDNS.Provider 的值不为空,多配置设定将被忽略。

yaml
DDNS:
-  Enable: true
-  MaxRetries: 3
-  Profiles:
-    example:
-      Provider: ""
-      AccessID: ""
-      AccessSecret: ""
-      WebhookMethod: ""
-      WebhookURL: ""
-      WebhookRequestBody: ""
-      WebhookHeaders: ""
  • Profiles:多配置设定。
  • example:可替换为 DDNS 配置名,可填任意字符串。

其它选项请参考单配置段。

Dashboard 配置

修改配置文件后,还需要在 Dashboard 中修改服务器设置才能使 DDNS 生效。

DDNS 相关选项说明:

  • 启用 DDNS:为此服务器启用 DDNS 功能。
  • 启用 DDNS IPv4:更新 DDNS 记录时,启用 IPv4 解析。
  • 启用 DDNS IPv6:更新 DDNS 记录时,启用 IPv6 解析。
  • DDNS 域名:记录指向的域名。
  • DDNS 配置:在多配置情况下,要使用的 DDNS 配置名。

WARNING

在 Dashboard 设置中修改配置并保存时,会在 config.yaml 中填入默认配置选项,此时 DDNS 段中会同时存在单配置和多配置。

  • 如需使用单配置,请配置 DDNS.Provider,并忽略 Profiles 选项相关内容。
  • 如需使用多配置,请将 DDNS.Provider 留空。如 DDNS.Provider 的值不为空,多配置设定将被忽略。

查看日志

在 Dashboard 的日志中,可以看到 DDNS 功能的相关日志,配置正确时,更新 DNS 记录时会有相应的日志记录。

shell
dashboard_1  | 2024/03/16 23:16:25 NEZHA>> 正在尝试更新域名(ddns.example.com)DDNS(1/3)
-dashboard_1  | 2024/03/16 23:16:28 NEZHA>> 尝试更新域名(ddns.example.com)DDNS成功
`,39),p=[n];function c(t,r,D,d,i,y){return a(),o("div",null,p)}const h=s(l,[["render",c]]);export{C as __pageData,h as default}; diff --git a/assets/guide_servers.md.971f5a47.lean.js b/assets/guide_servers.md.971f5a47.lean.js deleted file mode 100644 index 620ca62b..00000000 --- a/assets/guide_servers.md.971f5a47.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as a,c as o,R as e}from"./chunks/framework.44fd0451.js";const C=JSON.parse('{"title":"服务器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/servers.md","filePath":"guide/servers.md","lastUpdated":1718495592000}'),l={name:"guide/servers.md"},n=e("",39),p=[n];function c(t,r,D,d,i,y){return a(),o("div",null,p)}const h=s(l,[["render",c]]);export{C as __pageData,h as default}; diff --git a/assets/guide_servers.md.DDv3konh.js b/assets/guide_servers.md.DDv3konh.js new file mode 100644 index 00000000..69e30f80 --- /dev/null +++ b/assets/guide_servers.md.DDv3konh.js @@ -0,0 +1,26 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"服务器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/servers.md","filePath":"guide/servers.md","lastUpdated":1719239024000}'),l={name:"guide/servers.md"},h=e(`

服务器

介绍

服务器区域负责管理 Agent,是哪吒探针中最基础的区域,也是其他功能的基础。

新增服务器

第一步是新增服务器,可以自定义名称、分组、排序和备注。
拥有相同分组的服务器会在受支持的主题中划分到一起进行显示,备注仅会在后台显示,无需担心泄露信息。

安装 Agent

请参考前文安装 Agent
推荐使用一键安装,即配置好参数后,点击服务器一键安装列上的对应的系统图标即可复制安装命令,在相应服务器上进行安装。

强制更新

Agent 更新相关的参数是 自定义 Agent 监控项目 中的 --disable-auto-update--disable-force-update
默认情况下,Agent 会自动更新,无需干预。但当用户关闭自动更新后,也可以选中指定服务器进行强制更新。
disable-force-update 开启时此功能不生效。

数据列

  • 版本号:记录 Agent 当前版本。
  • 对游客隐藏:为 True 时,游客在面板中无法查看到此服务器。
  • 启用 DDNS:为 True 时,当该服务器 IP 发生变化,Dashboard 会自动更新 DNS 记录。
  • DDNS 域名:为该服务器配置的 DDNS 域名。
  • 密钥:即 secret/key,配置 Agent 时会用到,用于验证 Agent 与 Dashboard 的通信。
  • 一键安装:点击相应的系统按钮,复制命令到服务器执行即可一键安装。
  • 管理:分别为连接 WebShell,修改服务器配置,删除服务器。

在线终端

即 WebShell,disable-command-execute 开启时此功能不生效。
Linux 和 Windows 均可用,可使用 Ctrl+Shift+V 粘贴。
连接失败请参考实时通道断开/在线终端连接失败
注意在线终端功能中,Agent 也是通过 WebSocket 连接到公开访问域名,而非通过 gRPC 交互。

DDNS 功能

DDNS 功能适用于使用动态 IP 的服务器,当 Agent 上报了一个新的 IP,Dashboard 会根据配置自动更新 DNS 记录。

为什么我要使用哪吒监控的 DDNS 功能?

  • 方便集中管理 DDNS 设置,而不是在每台服务器上都部署一个 DDNS 服务。
  • 仅在面板服务器上保存您的机密信息,防止外泄。

配置说明

目前 DDNS 功能支持两种形式的配置:单配置和多配置。如使用单配置,则所有 Agent 服务器都使用相同的配置更新 DDNS;如使用多配置,则可为每台服务器指定一个配置更新 DDNS,灵活性更强。

单配置

yaml
DDNS:
+  Enable: true
+  Provider: "webhook"
+  AccessID: ""
+  AccessSecret: ""
+  WebhookMethod: ""
+  WebhookURL: ""
+  WebhookRequestBody: ""
+  WebhookHeaders: ""
+  MaxRetries: 3
+  Profiles: null
  • Enable:布尔值,选择是否开启 DDNS 功能。
  • Provider:DDNS 供应商的名称;目前支持 webhookcloudflare 以及 tencentcloud
  • AccessID:DDNS 供应商的令牌 ID;仅适用于供应商 tencentcloud
  • AccessSecret:DDNS 供应商的令牌 Secret;仅适用于供应商 cloudflaretencentcloud
  • WebhookMethod:Webhook 的请求方法。例如 GETPOST 等;仅适用于供应商 webhook
  • WebhookURL:Webhook 的请求地址;仅适用于供应商 webhook
  • WebhookRequestBody:Webhook 的请求体;仅适用于供应商 webhook
  • WebhookHeaders:Webhook 的请求头;仅适用于供应商 webhook
  • MaxRetries:当请求失败时,重试请求的次数。
  • Profiles:多配置设定;在单配置设定中,此项忽略。

WebhookURLWebhookRequestBody 以及 WebhookHeaders 可以包含以下参数:

  • {ip}:主机当前 IP。
  • {domain}:ddns 域名。
  • {type}:IP 类型,可能为 "ipv4" 和 "ipv6"。
  • {access_id}:凭据 1。
  • {access_secret}:凭据 2。

配置示例:

yaml
WebhookHeaders: |
+    a:{access_id}
+    b:{access_secret}
+WebhookRequestBody: '{"domain": "{domain}", "ip": "{ip}", "type": "{type}"}'

多配置

当使用多配置时,请将 DDNS.Provider 留空。如 DDNS.Provider 的值不为空,多配置设定将被忽略。

yaml
DDNS:
+  Enable: true
+  MaxRetries: 3
+  Profiles:
+    example:
+      Provider: ""
+      AccessID: ""
+      AccessSecret: ""
+      WebhookMethod: ""
+      WebhookURL: ""
+      WebhookRequestBody: ""
+      WebhookHeaders: ""
  • Profiles:多配置设定。
  • example:可替换为 DDNS 配置名,可填任意字符串。

其它选项请参考单配置段。

Dashboard 配置

修改配置文件后,还需要在 Dashboard 中修改服务器设置才能使 DDNS 生效。

DDNS 相关选项说明:

  • 启用 DDNS:为此服务器启用 DDNS 功能。
  • 启用 DDNS IPv4:更新 DDNS 记录时,启用 IPv4 解析。
  • 启用 DDNS IPv6:更新 DDNS 记录时,启用 IPv6 解析。
  • DDNS 域名:记录指向的域名。
  • DDNS 配置:在多配置情况下,要使用的 DDNS 配置名。

WARNING

在 Dashboard 设置中修改配置并保存时,会在 config.yaml 中填入默认配置选项,此时 DDNS 段中会同时存在单配置和多配置。

  • 如需使用单配置,请配置 DDNS.Provider,并忽略 Profiles 选项相关内容。
  • 如需使用多配置,请将 DDNS.Provider 留空。如 DDNS.Provider 的值不为空,多配置设定将被忽略。

查看日志

在 Dashboard 的日志中,可以看到 DDNS 功能的相关日志,配置正确时,更新 DNS 记录时会有相应的日志记录。

shell
dashboard_1  | 2024/03/16 23:16:25 NEZHA>> 正在尝试更新域名(ddns.example.com)DDNS(1/3)
+dashboard_1  | 2024/03/16 23:16:28 NEZHA>> 尝试更新域名(ddns.example.com)DDNS成功
`,39),t=[h];function n(d,o,k,p,r,c){return a(),i("div",null,t)}const u=s(l,[["render",n]]);export{g as __pageData,u as default}; diff --git a/assets/guide_servers.md.DDv3konh.lean.js b/assets/guide_servers.md.DDv3konh.lean.js new file mode 100644 index 00000000..441ef03a --- /dev/null +++ b/assets/guide_servers.md.DDv3konh.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as e}from"./chunks/framework.BmdFiWrL.js";const g=JSON.parse('{"title":"服务器","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/servers.md","filePath":"guide/servers.md","lastUpdated":1719239024000}'),l={name:"guide/servers.md"},h=e("",39),t=[h];function n(d,o,k,p,r,c){return a(),i("div",null,t)}const u=s(l,[["render",n]]);export{g as __pageData,u as default}; diff --git a/assets/guide_services.md.BHZuB3ts.js b/assets/guide_services.md.BHZuB3ts.js new file mode 100644 index 00000000..9c146939 --- /dev/null +++ b/assets/guide_services.md.BHZuB3ts.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"服务监控","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/services.md","filePath":"guide/services.md","lastUpdated":1719239024000}'),r={name:"guide/services.md"},i=o('

服务监控

服务区域是设置 Agent 监控外部网站或服务器的功能设置区
设置好的服务监控可以在主页中的“服务”页查看过去 30 天的可用性监控结果

使用方法

如需新增一个监控,可以进入管理面板中的“服务”页,点击“添加监控”。

新增一个服务监控时,你需要设置以下参数:

  • 名称:自定义一个名称。

  • 类型:选择一个监控类型。目前哪吒监控支持三种监控类型,分别是“HTTP-GET”、“ICMP-Ping”和“TCP-Ping”。

  • 目标:根据你选择的类型不同,目标的设置方法也不同:

    • HTTP-GET:选择此类型时,你应输入一个 URL 作为目标,URL 需添加 http://https://如果你的目标 URL 是 https://,将会同时监控该 URL 的 SSL 证书,当 SSL 证书到期或发生变更,会触发提醒。例如:https://example.com
    • ICMP-Ping:选择此类型时,你应输入一个域名或 IP,不含端口号。例如:1.1.1.1 或 example.com。
    • TCP-Ping:选择此类型时,你应输入一个域名或 IP 并包含端口号。例如:1.1.1.1:80 或 example.com:22。
  • 请求间隔:设定 Agent 每次请求目标的时间间隔,以秒为单位。

  • 覆盖范围:选择一条规则来确定要使用哪些 Agent 来请求目标。

  • 特定服务器:配合覆盖范围使用,选择规则内需要排除的 Agent。

  • 通知方式组:选择你已经在“告警”页设置好的通知方式,点击这里了解详情。

  • 启用故障通知:根据需要选择是否接收目标故障通知,默认为不勾选。

设置完成后,点击“添加”即可。稍等片刻前往主页的“服务”页查看监控结果。

延迟变化告警

哪吒监控可以监测并统计 Agent 到目标服务器之间的延迟,在发生较大变化的情况下发送通知。利用此功能可以帮助你监控服务器的线路是否发生了变化。

  • 启用延迟通知:开启时,当 Agent 至目标服务器的延迟大于最高延迟或小于最低延迟时,将会发送告警通知。

告警时触发任务

如果你需要在服务监控告警触发时执行一些任务,可以勾选“启用触发任务”,并在“告警时触发任务”和“恢复时触发任务”中选择你已经提前设置好的触发任务。

网络延迟图表

在服务页中设置的 TCP-Ping 和 ICMP-Ping 类型的监控都会自动启用监控图表功能。在主页的“网络”页中,你可以查看历史网络延迟监控图表。图表中的数据是根据 Agent 到目标服务器的延迟统计而来,你可以点击 Agent 的名称来切换图表。在图表中,可以取消勾选目标服务器的名称来隐藏或显示对应的数据。

管理监控

如需对已有的服务监控进行管理,可以前往管理面板中的“服务”页。选择一条监控配置,点击右侧的图标进行编辑或删除。

',16),n=[i];function l(s,c,d,p,g,h){return a(),t("div",null,n)}const P=e(r,[["render",l]]);export{_ as __pageData,P as default}; diff --git a/assets/guide_services.md.BHZuB3ts.lean.js b/assets/guide_services.md.BHZuB3ts.lean.js new file mode 100644 index 00000000..4e495d93 --- /dev/null +++ b/assets/guide_services.md.BHZuB3ts.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a4 as o}from"./chunks/framework.BmdFiWrL.js";const _=JSON.parse('{"title":"服务监控","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/services.md","filePath":"guide/services.md","lastUpdated":1719239024000}'),r={name:"guide/services.md"},i=o("",16),n=[i];function l(s,c,d,p,g,h){return a(),t("div",null,n)}const P=e(r,[["render",l]]);export{_ as __pageData,P as default}; diff --git a/assets/guide_services.md.adf6490e.js b/assets/guide_services.md.adf6490e.js deleted file mode 100644 index 9cebb2b1..00000000 --- a/assets/guide_services.md.adf6490e.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"服务监控","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/services.md","filePath":"guide/services.md","lastUpdated":1718495592000}'),r={name:"guide/services.md"},i=o('

服务监控

服务区域是设置 Agent 监控外部网站或服务器的功能设置区
设置好的服务监控可以在主页中的“服务”页查看过去 30 天的可用性监控结果

使用方法

如需新增一个监控,可以进入管理面板中的“服务”页,点击“添加监控”。

新增一个服务监控时,你需要设置以下参数:

  • 名称:自定义一个名称。

  • 类型:选择一个监控类型。目前哪吒监控支持三种监控类型,分别是“HTTP-GET”、“ICMP-Ping”和“TCP-Ping”。

  • 目标:根据你选择的类型不同,目标的设置方法也不同:

    • HTTP-GET:选择此类型时,你应输入一个 URL 作为目标,URL 需添加 http://https://如果你的目标 URL 是 https://,将会同时监控该 URL 的 SSL 证书,当 SSL 证书到期或发生变更,会触发提醒。例如:https://example.com
    • ICMP-Ping:选择此类型时,你应输入一个域名或 IP,不含端口号。例如:1.1.1.1 或 example.com。
    • TCP-Ping:选择此类型时,你应输入一个域名或 IP 并包含端口号。例如:1.1.1.1:80 或 example.com:22。
  • 请求间隔:设定 Agent 每次请求目标的时间间隔,以秒为单位。

  • 覆盖范围:选择一条规则来确定要使用哪些 Agent 来请求目标。

  • 特定服务器:配合覆盖范围使用,选择规则内需要排除的 Agent。

  • 通知方式组:选择你已经在“告警”页设置好的通知方式,点击这里了解详情。

  • 启用故障通知:根据需要选择是否接收目标故障通知,默认为不勾选。

设置完成后,点击“添加”即可。稍等片刻前往主页的“服务”页查看监控结果。

延迟变化告警

哪吒监控可以监测并统计 Agent 到目标服务器之间的延迟,在发生较大变化的情况下发送通知。利用此功能可以帮助你监控服务器的线路是否发生了变化。

  • 启用延迟通知:开启时,当 Agent 至目标服务器的延迟大于最高延迟或小于最低延迟时,将会发送告警通知。

告警时触发任务

如果你需要在服务监控告警触发时执行一些任务,可以勾选“启用触发任务”,并在“告警时触发任务”和“恢复时触发任务”中选择你已经提前设置好的触发任务。

网络延迟图表

在服务页中设置的 TCP-Ping 和 ICMP-Ping 类型的监控都会自动启用监控图表功能。在主页的“网络”页中,你可以查看历史网络延迟监控图表。图表中的数据是根据 Agent 到目标服务器的延迟统计而来,你可以点击 Agent 的名称来切换图表。在图表中,可以取消勾选目标服务器的名称来隐藏或显示对应的数据。

管理监控

如需对已有的服务监控进行管理,可以前往管理面板中的“服务”页。选择一条监控配置,点击右侧的图标进行编辑或删除。

',16),n=[i];function l(s,c,d,p,g,h){return t(),a("div",null,n)}const P=e(r,[["render",l]]);export{_ as __pageData,P as default}; diff --git a/assets/guide_services.md.adf6490e.lean.js b/assets/guide_services.md.adf6490e.lean.js deleted file mode 100644 index a1dc029b..00000000 --- a/assets/guide_services.md.adf6490e.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,o as t,c as a,R as o}from"./chunks/framework.44fd0451.js";const _=JSON.parse('{"title":"服务监控","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/services.md","filePath":"guide/services.md","lastUpdated":1718495592000}'),r={name:"guide/services.md"},i=o("",16),n=[i];function l(s,c,d,p,g,h){return t(),a("div",null,n)}const P=e(r,[["render",l]]);export{_ as __pageData,P as default}; diff --git a/assets/guide_settings.md.DnOHC6ho.js b/assets/guide_settings.md.DnOHC6ho.js new file mode 100644 index 00000000..5bd6f986 --- /dev/null +++ b/assets/guide_settings.md.DnOHC6ho.js @@ -0,0 +1,309 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"设置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/settings.md","filePath":"guide/settings.md","lastUpdated":1719239024000}'),h={name:"guide/settings.md"},k=n(`

设置

站点标题

你可以在此项中自定义站点标题。

管理员列表

  • 如果你修改了自己的 Github、Gitlab 或 Gitee 的用户名,需要在此项中同步修改,否则无法登录。多个用户请用逗号隔开:user1,user2
  • 如需更改管理员账户,请前往 /opt/nezha/dashboard/data/config.yaml,重新设置新的管理员 Client IDClient Secret

界面主题

在这里选择主页和管理界面主题,如果选项中没有某个已存在的主题,请更新面板。
启用 Custom 主题前,你需要提前安装自定义主题,否则启用该项后,面板将无法正常显示。

Language

哪吒监控目前支持以下语言:

  • 简体中文
  • 繁體中文
  • English
  • Español

我们欢迎您对翻译进行勘误或贡献更多语言。

自定义代码 (style, script)

可以在此修改 LOGO、修改色调、添加美化代码和统计代码等。

WARNING

自定义代码仅在游客首页生效,管理面板不生效。由于不同主题的代码不同,如确需修改管理面板中的内容,请修改 Docker 中的主题文件。

默认主题更改进度条颜色、背景图片、导航栏等效果示例

点击展开/收起
html
<style>
+/* 屏幕适配 */
+@media only screen and (min-width: 1200px) {
+    .ui.container {
+    width: 80% !important;
+}
+}
+
+@media only screen and (max-width: 767px) {
+    .ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) {
+        margin-top: 0.4em !important;
+    }
+}
+
+/* 整体图标 */
+i.icon {
+    color: #000;
+    width: 1.2em !important;
+}
+
+/* 背景图片 */
+body {
+    content: " " !important;
+    background: fixed !important;
+    z-index: -1 !important;
+    top: 0 !important;
+    right: 0 !important;
+    bottom: 0 !important;
+    left: 0 !important;
+    background-position: top !important;
+    background-repeat: no-repeat !important;
+    background-size: cover !important;
+    background-image: url(https://backgroud.img) !important;
+    font-family: Arial,Helvetica,sans-serif !important;
+}
+
+/* 导航栏 */
+.ui.large.menu {
+    border: 0 !important;
+    border-radius: 0px !important;
+    background-color: rgba(255, 255, 255, 55%) !important;
+}
+
+/* 首页按钮 */
+.ui.menu .active.item {
+    background-color: transparent !important;
+}
+
+/* 导航栏下拉框 */
+.ui.dropdown .menu {
+    border: 0 !important;
+    border-radius: 0 !important;
+    background-color: rgba(255, 255, 255, 80%) !important;
+}
+
+/* 登录按钮 */
+.nezha-primary-btn {
+    background-color: transparent !important;
+    color: #000 !important;
+}
+
+/* 大卡片 */
+#app .ui.fluid.accordion {
+    background-color: #fbfbfb26 !important;
+    border-radius: 0.4rem !important;
+}
+
+/* 小卡片 */
+.ui.four.cards>.card {
+    border-radius: 0.6rem !important;
+    background-color: #fafafaa3 !important;
+}
+
+.status.cards .wide.column {
+    padding-top: 0 !important;
+    padding-bottom: 0 !important;
+    height: 3.3rem !important;
+}
+
+.status.cards .three.wide.column {
+    padding-right: 0rem !important;
+}
+
+.status.cards .wide.column:nth-child(1) {
+    margin-top: 2rem !important;
+}
+
+.status.cards .wide.column:nth-child(2) {
+    margin-top: 2rem !important;
+}
+
+.status.cards .description {
+    padding-bottom: 0 !important;
+}
+
+/* 服务器名 */
+.status.cards .flag {
+    margin-right: 0.5rem !important;
+}
+
+/* 弹出卡片图标 */
+.status.cards .header > .info.icon {
+    margin-right: 0 !important;
+}
+
+.nezha-secondary-font {
+    color: #2175ba !important;
+}
+
+/* 上传下载 */
+.status.cards .outline.icon {
+    margin-right: 1px !important;
+}
+
+i.arrow.alternate.circle.down.outline.icon {
+    color: #2175ba !important;
+}
+
+i.arrow.alternate.circle.up.outline.icon {
+    color: red !important;
+}
+
+/* 弹出卡片小箭头 */
+.ui.right.center.popup {
+    margin: -3px 0 0 0.914286em !important;
+    -webkit-transform-origin: left 50% !important;
+    transform-origin: left 50% !important;
+}
+
+.ui.bottom.left.popup {
+    margin-left: 1px !important;
+    margin-top: 3px !important;
+}
+
+.ui.top.left.popup {
+    margin-left: 0 !important;
+    margin-bottom: 10px !important;
+}
+
+.ui.top.right.popup {
+    margin-right: 0 !important;
+    margin-bottom: 8px !important;
+}
+
+.ui.left.center.popup {
+    margin: -3px .91428571em 0 0 !important;
+    -webkit-transform-origin: right 50% !important;
+    transform-origin: right 50% !important;
+}
+
+.ui.right.center.popup:before,
+.ui.left.center.popup:before {
+    border: 0px solid #fafafaeb !important;
+    background: #fafafaeb !important;
+}
+
+.ui.top.popup:before {
+    border-color: #fafafaeb transparent transparent !important;
+}
+
+.ui.popup:before {
+    border-color: #fafafaeb transparent transparent !important;
+}
+
+.ui.bottom.left.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !important;
+    background: #fafafaeb !important;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
+}
+
+.ui.bottom.right.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !important;
+    background: #fafafaeb !important
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
+}
+
+.ui.top.left.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !important;
+    background: #fafafaeb !important;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
+}
+
+.ui.top.right.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !important;
+    background: #fafafaeb !important;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
+}
+
+.ui.left.center.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !important;
+    background: #fafafaeb !important;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
+}
+
+/* 弹出卡片 */
+.status.cards .ui.content.popup {
+    min-width: 20rem !important;
+    line-height: 2rem !important;
+    border-radius: 5px !important;
+    border: 1px solid transparent !important;
+    background-color: #fafafaeb !important;
+    font-family: Arial,Helvetica,sans-serif !important;
+}
+
+.ui.content {
+    margin: 0 !important;
+    padding: 1em !important;
+}
+
+/* 服务页 */
+.ui.table {
+    background: RGB(225,225,225,0.6) !important;
+}
+
+.ui.table thead th {
+    background: transparent !important;
+}
+
+/* 服务页进度条 */
+.service-status .good {
+    background-color: #2175ba !important;
+}
+
+.service-status .danger {
+    background-color: red !important;
+}
+
+.service-status .warning {
+    background-color: orange !important;
+}
+
+/* 版权 */
+.ui.inverted.segment, .ui.primary.inverted.segment {
+    color: #000 !important;
+    font-weight: bold !important;
+    background-color: #fafafaa3 !important;
+}
+</style>
+
+<!--Logo和版权-->
+<script>
+window.onload = function(){
+var avatar=document.querySelector(".item img")
+var footer=document.querySelector("div.is-size-7")
+footer.innerHTML="Copyright info"
+footer.style.visibility="visible"
+avatar.src="https:/img.src"
+avatar.style.visibility="visible"
+}
+</script>

DayNight 主题更改进度条颜色、修改页脚示例(来自 @hyt-allen-xu @tech-fever

点击展开/收起
html
<style>
+.ui.fine.progress> .progress-bar {
+  background-color: #00a7d0 !important;
+}
+</style>
+
+<script>
+window.onload = function(){
+  var avatar = document.querySelector("img");
+  var footer = document.querySelector("div.footer-container");
+  footer.innerHTML = "©2021 你的名字 & Powered by 你的名字";
+  footer.style.visibility = "visible";
+  avatar.src = "你的图片连接";
+  avatar.style.visibility = "visible";
+}
+</script>

默认主题修改 LOGO、修改页脚示例(来自 @iLay1678

点击展开/收起
html
<style>
+.right.menu>a {
+  visibility: hidden;
+}
+.footer .is-size-7 {
+  visibility: hidden;
+}
+.item img {
+  visibility: hidden;
+}
+</style>
+<script>
+window.onload = function() {
+  var avatar = document.querySelector(".item img");
+  var footer = document.querySelector("div.is-size-7");
+  footer.innerHTML = "Powered by 你的名字";
+  footer.style.visibility = "visible";
+  avatar.src = "你的方形 logo 地址";
+  avatar.style.visibility = "visible";
+}
+</script>

hotaru 主题更改背景图片示例

点击展开/收起
html
<style>
+.hotaru-cover {
+   background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
+}
+</style>

前台查看密码

如果你不想向游客直接展示你的 Dashboard,可以在这里设置一个查看密码。设置密码后,需要输入密码才可以访问主页。

未接入 CDN 的面板服务器域名/IP

此项设置是使用一键脚本安装 Agent 的前提,详情请查看这里

IP 变更提醒

如果你希望当某个服务器的 IP 发生变更时收到通知,可以在这里进行设置。

覆盖范围

在这里选择一条规则,来确定需要监控哪些服务器,可以根据自己的需求进行选择。

特定服务器

配合覆盖范围的设置,在这里设置选定规则的排除项。

提醒发送至指定的通知分组

选择通知方式,通知方式请提前在“告警”页内设置。

WARNING

设置完成后,勾选启用时,通知生效

通知中显示完整 IP 地址

IP 变更通知默认隐藏完整 IP,如果你不希望隐藏,可以勾选“通知信息中显示完整 IP 地址”。

禁止主页切换主题

Dashboard 默认启用允许访客修改显示主题的功能,此功能只会影响单一访客,不会影响管理员在后台设置的启用主题。如果你不希望访客切换主题,可以勾选此项。

`,39),p=[k];function l(t,e,E,r,d,g){return a(),i("div",null,p)}const C=s(h,[["render",l]]);export{F as __pageData,C as default}; diff --git a/assets/guide_settings.md.DnOHC6ho.lean.js b/assets/guide_settings.md.DnOHC6ho.lean.js new file mode 100644 index 00000000..4d082c91 --- /dev/null +++ b/assets/guide_settings.md.DnOHC6ho.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a4 as n}from"./chunks/framework.BmdFiWrL.js";const F=JSON.parse('{"title":"设置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/settings.md","filePath":"guide/settings.md","lastUpdated":1719239024000}'),h={name:"guide/settings.md"},k=n("",39),p=[k];function l(t,e,E,r,d,g){return a(),i("div",null,p)}const C=s(h,[["render",l]]);export{F as __pageData,C as default}; diff --git a/assets/guide_settings.md.c86c3d25.js b/assets/guide_settings.md.c86c3d25.js deleted file mode 100644 index 13f23010..00000000 --- a/assets/guide_settings.md.c86c3d25.js +++ /dev/null @@ -1,309 +0,0 @@ -import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const i=JSON.parse('{"title":"设置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/settings.md","filePath":"guide/settings.md","lastUpdated":1718495592000}'),p={name:"guide/settings.md"},o=l(`

设置

站点标题

你可以在此项中自定义站点标题。

管理员列表

  • 如果你修改了自己的 Github、Gitlab 或 Gitee 的用户名,需要在此项中同步修改,否则无法登录。多个用户请用逗号隔开:user1,user2
  • 如需更改管理员账户,请前往 /opt/nezha/dashboard/data/config.yaml,重新设置新的管理员 Client IDClient Secret

界面主题

在这里选择主页和管理界面主题,如果选项中没有某个已存在的主题,请更新面板。
启用 Custom 主题前,你需要提前安装自定义主题,否则启用该项后,面板将无法正常显示。

Language

哪吒监控目前支持以下语言:

  • 简体中文
  • 繁體中文
  • English
  • Español

我们欢迎您对翻译进行勘误或贡献更多语言。

自定义代码 (style, script)

可以在此修改 LOGO、修改色调、添加美化代码和统计代码等。

WARNING

自定义代码仅在游客首页生效,管理面板不生效。由于不同主题的代码不同,如确需修改管理面板中的内容,请修改 Docker 中的主题文件。

默认主题更改进度条颜色、背景图片、导航栏等效果示例

点击展开/收起
html
<style>
-/* 屏幕适配 */
-@media only screen and (min-width: 1200px) {
-    .ui.container {
-    width: 80% !important;
-}
-}
-
-@media only screen and (max-width: 767px) {
-    .ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) {
-        margin-top: 0.4em !important;
-    }
-}
-
-/* 整体图标 */
-i.icon {
-    color: #000;
-    width: 1.2em !important;
-}
-
-/* 背景图片 */
-body {
-    content: " " !important;
-    background: fixed !important;
-    z-index: -1 !important;
-    top: 0 !important;
-    right: 0 !important;
-    bottom: 0 !important;
-    left: 0 !important;
-    background-position: top !important;
-    background-repeat: no-repeat !important;
-    background-size: cover !important;
-    background-image: url(https://backgroud.img) !important;
-    font-family: Arial,Helvetica,sans-serif !important;
-}
-
-/* 导航栏 */
-.ui.large.menu {
-    border: 0 !important;
-    border-radius: 0px !important;
-    background-color: rgba(255, 255, 255, 55%) !important;
-}
-
-/* 首页按钮 */
-.ui.menu .active.item {
-    background-color: transparent !important;
-}
-
-/* 导航栏下拉框 */
-.ui.dropdown .menu {
-    border: 0 !important;
-    border-radius: 0 !important;
-    background-color: rgba(255, 255, 255, 80%) !important;
-}
-
-/* 登录按钮 */
-.nezha-primary-btn {
-    background-color: transparent !important;
-    color: #000 !important;
-}
-
-/* 大卡片 */
-#app .ui.fluid.accordion {
-    background-color: #fbfbfb26 !important;
-    border-radius: 0.4rem !important;
-}
-
-/* 小卡片 */
-.ui.four.cards>.card {
-    border-radius: 0.6rem !important;
-    background-color: #fafafaa3 !important;
-}
-
-.status.cards .wide.column {
-    padding-top: 0 !important;
-    padding-bottom: 0 !important;
-    height: 3.3rem !important;
-}
-
-.status.cards .three.wide.column {
-    padding-right: 0rem !important;
-}
-
-.status.cards .wide.column:nth-child(1) {
-    margin-top: 2rem !important;
-}
-
-.status.cards .wide.column:nth-child(2) {
-    margin-top: 2rem !important;
-}
-
-.status.cards .description {
-    padding-bottom: 0 !important;
-}
-
-/* 服务器名 */
-.status.cards .flag {
-    margin-right: 0.5rem !important;
-}
-
-/* 弹出卡片图标 */
-.status.cards .header > .info.icon {
-    margin-right: 0 !important;
-}
-
-.nezha-secondary-font {
-    color: #2175ba !important;
-}
-
-/* 上传下载 */
-.status.cards .outline.icon {
-    margin-right: 1px !important;
-}
-
-i.arrow.alternate.circle.down.outline.icon {
-    color: #2175ba !important;
-}
-
-i.arrow.alternate.circle.up.outline.icon {
-    color: red !important;
-}
-
-/* 弹出卡片小箭头 */
-.ui.right.center.popup {
-    margin: -3px 0 0 0.914286em !important;
-    -webkit-transform-origin: left 50% !important;
-    transform-origin: left 50% !important;
-}
-
-.ui.bottom.left.popup {
-    margin-left: 1px !important;
-    margin-top: 3px !important;
-}
-
-.ui.top.left.popup {
-    margin-left: 0 !important;
-    margin-bottom: 10px !important;
-}
-
-.ui.top.right.popup {
-    margin-right: 0 !important;
-    margin-bottom: 8px !important;
-}
-
-.ui.left.center.popup {
-    margin: -3px .91428571em 0 0 !important;
-    -webkit-transform-origin: right 50% !important;
-    transform-origin: right 50% !important;
-}
-
-.ui.right.center.popup:before,
-.ui.left.center.popup:before {
-    border: 0px solid #fafafaeb !important;
-    background: #fafafaeb !important;
-}
-
-.ui.top.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
-
-.ui.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
-
-.ui.bottom.left.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.bottom.right.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.top.left.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.top.right.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-.ui.left.center.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
-
-/* 弹出卡片 */
-.status.cards .ui.content.popup {
-    min-width: 20rem !important;
-    line-height: 2rem !important;
-    border-radius: 5px !important;
-    border: 1px solid transparent !important;
-    background-color: #fafafaeb !important;
-    font-family: Arial,Helvetica,sans-serif !important;
-}
-
-.ui.content {
-    margin: 0 !important;
-    padding: 1em !important;
-}
-
-/* 服务页 */
-.ui.table {
-    background: RGB(225,225,225,0.6) !important;
-}
-
-.ui.table thead th {
-    background: transparent !important;
-}
-
-/* 服务页进度条 */
-.service-status .good {
-    background-color: #2175ba !important;
-}
-
-.service-status .danger {
-    background-color: red !important;
-}
-
-.service-status .warning {
-    background-color: orange !important;
-}
-
-/* 版权 */
-.ui.inverted.segment, .ui.primary.inverted.segment {
-    color: #000 !important;
-    font-weight: bold !important;
-    background-color: #fafafaa3 !important;
-}
-</style>
-
-<!--Logo和版权-->
-<script>
-window.onload = function(){
-var avatar=document.querySelector(".item img")
-var footer=document.querySelector("div.is-size-7")
-footer.innerHTML="Copyright info"
-footer.style.visibility="visible"
-avatar.src="https:/img.src"
-avatar.style.visibility="visible"
-}
-</script>

DayNight 主题更改进度条颜色、修改页脚示例(来自 @hyt-allen-xu @tech-fever

点击展开/收起
html
<style>
-.ui.fine.progress> .progress-bar {
-  background-color: #00a7d0 !important;
-}
-</style>
-
-<script>
-window.onload = function(){
-  var avatar = document.querySelector("img");
-  var footer = document.querySelector("div.footer-container");
-  footer.innerHTML = "©2021 你的名字 & Powered by 你的名字";
-  footer.style.visibility = "visible";
-  avatar.src = "你的图片连接";
-  avatar.style.visibility = "visible";
-}
-</script>

默认主题修改 LOGO、修改页脚示例(来自 @iLay1678

点击展开/收起
html
<style>
-.right.menu>a {
-  visibility: hidden;
-}
-.footer .is-size-7 {
-  visibility: hidden;
-}
-.item img {
-  visibility: hidden;
-}
-</style>
-<script>
-window.onload = function() {
-  var avatar = document.querySelector(".item img");
-  var footer = document.querySelector("div.is-size-7");
-  footer.innerHTML = "Powered by 你的名字";
-  footer.style.visibility = "visible";
-  avatar.src = "你的方形 logo 地址";
-  avatar.style.visibility = "visible";
-}
-</script>

hotaru 主题更改背景图片示例

点击展开/收起
html
<style>
-.hotaru-cover {
-   background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
-}
-</style>

前台查看密码

如果你不想向游客直接展示你的 Dashboard,可以在这里设置一个查看密码。设置密码后,需要输入密码才可以访问主页。

未接入 CDN 的面板服务器域名/IP

此项设置是使用一键脚本安装 Agent 的前提,详情请查看这里

IP 变更提醒

如果你希望当某个服务器的 IP 发生变更时收到通知,可以在这里进行设置。

覆盖范围

在这里选择一条规则,来确定需要监控哪些服务器,可以根据自己的需求进行选择。

特定服务器

配合覆盖范围的设置,在这里设置选定规则的排除项。

提醒发送至指定的通知分组

选择通知方式,通知方式请提前在“告警”页内设置。

WARNING

设置完成后,勾选启用时,通知生效

通知中显示完整 IP 地址

IP 变更通知默认隐藏完整 IP,如果你不希望隐藏,可以勾选“通知信息中显示完整 IP 地址”。

禁止主页切换主题

Dashboard 默认启用允许访客修改显示主题的功能,此功能只会影响单一访客,不会影响管理员在后台设置的启用主题。如果你不希望访客切换主题,可以勾选此项。

`,39),e=[o];function t(r,c,F,D,y,C){return a(),n("div",null,e)}const B=s(p,[["render",t]]);export{i as __pageData,B as default}; diff --git a/assets/guide_settings.md.c86c3d25.lean.js b/assets/guide_settings.md.c86c3d25.lean.js deleted file mode 100644 index 491b7c1b..00000000 --- a/assets/guide_settings.md.c86c3d25.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,o as a,c as n,R as l}from"./chunks/framework.44fd0451.js";const i=JSON.parse('{"title":"设置","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/settings.md","filePath":"guide/settings.md","lastUpdated":1718495592000}'),p={name:"guide/settings.md"},o=l("",39),e=[o];function t(r,c,F,D,y,C){return a(),n("div",null,e)}const B=s(p,[["render",t]]);export{i as __pageData,B as default}; diff --git a/assets/guide_tasks.md.64f84f3a.js b/assets/guide_tasks.md.64f84f3a.js deleted file mode 100644 index 1b6db807..00000000 --- a/assets/guide_tasks.md.64f84f3a.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,o,c as e,R as r}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"任务管理","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/tasks.md","filePath":"guide/tasks.md","lastUpdated":1718495592000}'),a={name:"guide/tasks.md"},s=r('

任务管理

在任务区域中,可以设置计划任务,触发任务,多服务器批量执行任务

哪吒监控支持推送命令到 Agent 执行,此功能非常灵活。使用此功能可以定期结合 restic、rclone 给服务器备份,定期重启某项服务来重置网络连接。也可以配合告警通知,在触发告警时执行某项任务,例如在 CPU 长时间高占用的情况下运行某个脚本。

使用方法

进入管理面板的“任务”页,点击“添加计划任务”。添加计划任务时,你需要填入以下参数:

  • 名称:自定义一个任务名称。

  • 任务类型:选择任务的类型。

    • 计划任务:按下方设置的计划时间,周期性执行任务。
    • 触发任务:仅被 API 或告警规则触发的任务,每次触发执行一次。
  • 计划:设置计划时间(使用触发任务类型时不生效),时间格式为:* * * * * *,分别对应秒 分 时 天 月 星期,详情见计划表达式格式
    例如:0 0 3 * * * 对应为“每天 3 点”。

  • 命令:设置需要执行的命令,就像写 Shell/Bat 脚本一样,但不推荐换行,多个命令使用 &&/& 连接。
    例如执行定期重启命令,可以在这里输入 reboot

  • 覆盖范围特定服务器:选择规则来确定哪些 Agent 执行计划任务,类似于“服务”页中的设置。使用触发任务类型时,可选择“由触发的服务器执行”。

  • 通知方式组:选择你已经在“告警”页设置好的通知方式,点击这里了解详情。

  • 推送成功的消息:勾选此项,任务执行成功后会触发消息通知。

管理任务

如需对已有的计划任务进行管理,可以前往管理面板中的“任务”页。选择一条任务配置,右侧的三个图标分别是:

  • 立即执行:点击后将忽略计划时间,立刻执行任务。
  • 编辑:点击可以修改任务配置。
  • 删除:删除这条计划任务。

常见问题

  1. xxx 命令找不到
    如果运行失败,提示 xxx 命令找不到,可能是 PATH 环境变量的问题。在 Linux 服务器上,可以在命令开头加入 source ~/.bashrc,或者使用绝对路径执行命令。
',11),n=[s];function i(l,c,d,g,p,h){return o(),e("div",null,n)}const m=t(a,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/guide_tasks.md.64f84f3a.lean.js b/assets/guide_tasks.md.64f84f3a.lean.js deleted file mode 100644 index 0926bda9..00000000 --- a/assets/guide_tasks.md.64f84f3a.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,o,c as e,R as r}from"./chunks/framework.44fd0451.js";const u=JSON.parse('{"title":"任务管理","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/tasks.md","filePath":"guide/tasks.md","lastUpdated":1718495592000}'),a={name:"guide/tasks.md"},s=r("",11),n=[s];function i(l,c,d,g,p,h){return o(),e("div",null,n)}const m=t(a,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/guide_tasks.md.DvMwtbjN.js b/assets/guide_tasks.md.DvMwtbjN.js new file mode 100644 index 00000000..802b9d15 --- /dev/null +++ b/assets/guide_tasks.md.DvMwtbjN.js @@ -0,0 +1 @@ +import{_ as t,c as o,o as e,a4 as r}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"任务管理","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/tasks.md","filePath":"guide/tasks.md","lastUpdated":1719239024000}'),a={name:"guide/tasks.md"},s=r('

任务管理

在任务区域中,可以设置计划任务,触发任务,多服务器批量执行任务

哪吒监控支持推送命令到 Agent 执行,此功能非常灵活。使用此功能可以定期结合 restic、rclone 给服务器备份,定期重启某项服务来重置网络连接。也可以配合告警通知,在触发告警时执行某项任务,例如在 CPU 长时间高占用的情况下运行某个脚本。

使用方法

进入管理面板的“任务”页,点击“添加计划任务”。添加计划任务时,你需要填入以下参数:

  • 名称:自定义一个任务名称。

  • 任务类型:选择任务的类型。

    • 计划任务:按下方设置的计划时间,周期性执行任务。
    • 触发任务:仅被 API 或告警规则触发的任务,每次触发执行一次。
  • 计划:设置计划时间(使用触发任务类型时不生效),时间格式为:* * * * * *,分别对应秒 分 时 天 月 星期,详情见计划表达式格式
    例如:0 0 3 * * * 对应为“每天 3 点”。

  • 命令:设置需要执行的命令,就像写 Shell/Bat 脚本一样,但不推荐换行,多个命令使用 &&/& 连接。
    例如执行定期重启命令,可以在这里输入 reboot

  • 覆盖范围特定服务器:选择规则来确定哪些 Agent 执行计划任务,类似于“服务”页中的设置。使用触发任务类型时,可选择“由触发的服务器执行”。

  • 通知方式组:选择你已经在“告警”页设置好的通知方式,点击这里了解详情。

  • 推送成功的消息:勾选此项,任务执行成功后会触发消息通知。

管理任务

如需对已有的计划任务进行管理,可以前往管理面板中的“任务”页。选择一条任务配置,右侧的三个图标分别是:

  • 立即执行:点击后将忽略计划时间,立刻执行任务。
  • 编辑:点击可以修改任务配置。
  • 删除:删除这条计划任务。

常见问题

  1. xxx 命令找不到
    如果运行失败,提示 xxx 命令找不到,可能是 PATH 环境变量的问题。在 Linux 服务器上,可以在命令开头加入 source ~/.bashrc,或者使用绝对路径执行命令。
',11),n=[s];function i(l,c,d,g,p,h){return e(),o("div",null,n)}const m=t(a,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/guide_tasks.md.DvMwtbjN.lean.js b/assets/guide_tasks.md.DvMwtbjN.lean.js new file mode 100644 index 00000000..786584dc --- /dev/null +++ b/assets/guide_tasks.md.DvMwtbjN.lean.js @@ -0,0 +1 @@ +import{_ as t,c as o,o as e,a4 as r}from"./chunks/framework.BmdFiWrL.js";const u=JSON.parse('{"title":"任务管理","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"guide/tasks.md","filePath":"guide/tasks.md","lastUpdated":1719239024000}'),a={name:"guide/tasks.md"},s=r("",11),n=[s];function i(l,c,d,g,p,h){return e(),o("div",null,n)}const m=t(a,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/index.md.a6736f6b.js b/assets/index.md.CtVXitC5.js similarity index 86% rename from assets/index.md.a6736f6b.js rename to assets/index.md.CtVXitC5.js index c1fa5bee..8bce22e4 100644 --- a/assets/index.md.a6736f6b.js +++ b/assets/index.md.CtVXitC5.js @@ -1 +1 @@ -import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"使用文档","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"使用文档","hero":{"name":"哪吒监控","text":"开源、轻量、易用的服务器监控与运维工具","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"预览","link":"https://ops.naibahq.com"},{"theme":"alt","text":"开始使用 →","link":"/guide/dashboard"}]},"features":[{"title":"一键安装","details":"支持一键安装面板和监控服务,操作便捷。兼容主流系统,包括 Linux、Windows、macOS、OpenWRT 以及群晖。"},{"title":"实时监控","details":"支持同时监控多个服务器的状态,提供历史网络状态和延迟图表,监控网页、端口可用性和 SSL 证书状态。支持故障和流量等状态告警,可通过 Telegram、邮件、微信等多种方式提醒。"},{"title":"轻松运维","details":"提供 API 获取服务器状态,支持WebSSH、DDNS 和流量监控。可设置定时和触发任务,并批量执行服务器任务。"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1718495592000}'),i={name:"index.md"};function n(s,r,o,d,l,c){return t(),a("div")}const h=e(i,[["render",n]]);export{p as __pageData,h as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"使用文档","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"使用文档","hero":{"name":"哪吒监控","text":"开源、轻量、易用的服务器监控与运维工具","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"预览","link":"https://ops.naibahq.com"},{"theme":"alt","text":"开始使用 →","link":"/guide/dashboard"}]},"features":[{"title":"一键安装","details":"支持一键安装面板和监控服务,操作便捷。兼容主流系统,包括 Linux、Windows、macOS、OpenWRT 以及群晖。"},{"title":"实时监控","details":"支持同时监控多个服务器的状态,提供历史网络状态和延迟图表,监控网页、端口可用性和 SSL 证书状态。支持故障和流量等状态告警,可通过 Telegram、邮件、微信等多种方式提醒。"},{"title":"轻松运维","details":"提供 API 获取服务器状态,支持WebSSH、DDNS 和流量监控。可设置定时和触发任务,并批量执行服务器任务。"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1719239024000}'),i={name:"index.md"};function n(s,r,o,d,l,c){return a(),t("div")}const h=e(i,[["render",n]]);export{p as __pageData,h as default}; diff --git a/assets/index.md.a6736f6b.lean.js b/assets/index.md.CtVXitC5.lean.js similarity index 86% rename from assets/index.md.a6736f6b.lean.js rename to assets/index.md.CtVXitC5.lean.js index c1fa5bee..8bce22e4 100644 --- a/assets/index.md.a6736f6b.lean.js +++ b/assets/index.md.CtVXitC5.lean.js @@ -1 +1 @@ -import{_ as e,o as t,c as a}from"./chunks/framework.44fd0451.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"使用文档","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"使用文档","hero":{"name":"哪吒监控","text":"开源、轻量、易用的服务器监控与运维工具","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"预览","link":"https://ops.naibahq.com"},{"theme":"alt","text":"开始使用 →","link":"/guide/dashboard"}]},"features":[{"title":"一键安装","details":"支持一键安装面板和监控服务,操作便捷。兼容主流系统,包括 Linux、Windows、macOS、OpenWRT 以及群晖。"},{"title":"实时监控","details":"支持同时监控多个服务器的状态,提供历史网络状态和延迟图表,监控网页、端口可用性和 SSL 证书状态。支持故障和流量等状态告警,可通过 Telegram、邮件、微信等多种方式提醒。"},{"title":"轻松运维","details":"提供 API 获取服务器状态,支持WebSSH、DDNS 和流量监控。可设置定时和触发任务,并批量执行服务器任务。"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1718495592000}'),i={name:"index.md"};function n(s,r,o,d,l,c){return t(),a("div")}const h=e(i,[["render",n]]);export{p as __pageData,h as default}; +import{_ as e,c as t,o as a}from"./chunks/framework.BmdFiWrL.js";const p=JSON.parse('{"title":"哪吒监控","titleTemplate":"使用文档","description":"","frontmatter":{"layout":"home","title":"哪吒监控","titleTemplate":"使用文档","hero":{"name":"哪吒监控","text":"开源、轻量、易用的服务器监控与运维工具","image":"https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg","actions":[{"theme":"brand","text":"预览","link":"https://ops.naibahq.com"},{"theme":"alt","text":"开始使用 →","link":"/guide/dashboard"}]},"features":[{"title":"一键安装","details":"支持一键安装面板和监控服务,操作便捷。兼容主流系统,包括 Linux、Windows、macOS、OpenWRT 以及群晖。"},{"title":"实时监控","details":"支持同时监控多个服务器的状态,提供历史网络状态和延迟图表,监控网页、端口可用性和 SSL 证书状态。支持故障和流量等状态告警,可通过 Telegram、邮件、微信等多种方式提醒。"},{"title":"轻松运维","details":"提供 API 获取服务器状态,支持WebSSH、DDNS 和流量监控。可设置定时和触发任务,并批量执行服务器任务。"}]},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1719239024000}'),i={name:"index.md"};function n(s,r,o,d,l,c){return a(),t("div")}const h=e(i,[["render",n]]);export{p as __pageData,h as default}; diff --git a/assets/inter-italic-cyrillic-ext.33bd5a8e.woff2 b/assets/inter-italic-cyrillic-ext.33bd5a8e.woff2 deleted file mode 100644 index 2a687296..00000000 Binary files a/assets/inter-italic-cyrillic-ext.33bd5a8e.woff2 and /dev/null differ diff --git a/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 b/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 new file mode 100644 index 00000000..b6b603d5 Binary files /dev/null and b/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 differ diff --git a/assets/inter-italic-cyrillic.By2_1cv3.woff2 b/assets/inter-italic-cyrillic.By2_1cv3.woff2 new file mode 100644 index 00000000..def40a4f Binary files /dev/null and b/assets/inter-italic-cyrillic.By2_1cv3.woff2 differ diff --git a/assets/inter-italic-cyrillic.ea42a392.woff2 b/assets/inter-italic-cyrillic.ea42a392.woff2 deleted file mode 100644 index f6403515..00000000 Binary files a/assets/inter-italic-cyrillic.ea42a392.woff2 and /dev/null differ diff --git a/assets/inter-italic-greek-ext.1u6EdAuj.woff2 b/assets/inter-italic-greek-ext.1u6EdAuj.woff2 new file mode 100644 index 00000000..e070c3d3 Binary files /dev/null and b/assets/inter-italic-greek-ext.1u6EdAuj.woff2 differ diff --git a/assets/inter-italic-greek-ext.4fbe9427.woff2 b/assets/inter-italic-greek-ext.4fbe9427.woff2 deleted file mode 100644 index 00218960..00000000 Binary files a/assets/inter-italic-greek-ext.4fbe9427.woff2 and /dev/null differ diff --git a/assets/inter-italic-greek.8f4463c4.woff2 b/assets/inter-italic-greek.8f4463c4.woff2 deleted file mode 100644 index 71c265f8..00000000 Binary files a/assets/inter-italic-greek.8f4463c4.woff2 and /dev/null differ diff --git a/assets/inter-italic-greek.DJ8dCoTZ.woff2 b/assets/inter-italic-greek.DJ8dCoTZ.woff2 new file mode 100644 index 00000000..a3c16ca4 Binary files /dev/null and b/assets/inter-italic-greek.DJ8dCoTZ.woff2 differ diff --git a/assets/inter-italic-latin-ext.CN1xVJS-.woff2 b/assets/inter-italic-latin-ext.CN1xVJS-.woff2 new file mode 100644 index 00000000..2210a899 Binary files /dev/null and b/assets/inter-italic-latin-ext.CN1xVJS-.woff2 differ diff --git a/assets/inter-italic-latin-ext.bd8920cc.woff2 b/assets/inter-italic-latin-ext.bd8920cc.woff2 deleted file mode 100644 index 9c1b9440..00000000 Binary files a/assets/inter-italic-latin-ext.bd8920cc.woff2 and /dev/null differ diff --git a/assets/inter-italic-latin.C2AdPX0b.woff2 b/assets/inter-italic-latin.C2AdPX0b.woff2 new file mode 100644 index 00000000..790d62dc Binary files /dev/null and b/assets/inter-italic-latin.C2AdPX0b.woff2 differ diff --git a/assets/inter-italic-latin.bd3b6f56.woff2 b/assets/inter-italic-latin.bd3b6f56.woff2 deleted file mode 100644 index 01fcf207..00000000 Binary files a/assets/inter-italic-latin.bd3b6f56.woff2 and /dev/null differ diff --git a/assets/inter-italic-vietnamese.6ce511fb.woff2 b/assets/inter-italic-vietnamese.6ce511fb.woff2 deleted file mode 100644 index e4f788ee..00000000 Binary files a/assets/inter-italic-vietnamese.6ce511fb.woff2 and /dev/null differ diff --git a/assets/inter-italic-vietnamese.BSbpV94h.woff2 b/assets/inter-italic-vietnamese.BSbpV94h.woff2 new file mode 100644 index 00000000..1eec0775 Binary files /dev/null and b/assets/inter-italic-vietnamese.BSbpV94h.woff2 differ diff --git a/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 b/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 new file mode 100644 index 00000000..2cfe6153 Binary files /dev/null and b/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 differ diff --git a/assets/inter-roman-cyrillic-ext.e75737ce.woff2 b/assets/inter-roman-cyrillic-ext.e75737ce.woff2 deleted file mode 100644 index 28593ccb..00000000 Binary files a/assets/inter-roman-cyrillic-ext.e75737ce.woff2 and /dev/null differ diff --git a/assets/inter-roman-cyrillic.5f2c6c8c.woff2 b/assets/inter-roman-cyrillic.5f2c6c8c.woff2 deleted file mode 100644 index a20adc16..00000000 Binary files a/assets/inter-roman-cyrillic.5f2c6c8c.woff2 and /dev/null differ diff --git a/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 b/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 new file mode 100644 index 00000000..e3886dd1 Binary files /dev/null and b/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 differ diff --git a/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 b/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 new file mode 100644 index 00000000..36d67487 Binary files /dev/null and b/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 differ diff --git a/assets/inter-roman-greek-ext.ab0619bc.woff2 b/assets/inter-roman-greek-ext.ab0619bc.woff2 deleted file mode 100644 index e3b0be76..00000000 Binary files a/assets/inter-roman-greek-ext.ab0619bc.woff2 and /dev/null differ diff --git a/assets/inter-roman-greek.BBVDIX6e.woff2 b/assets/inter-roman-greek.BBVDIX6e.woff2 new file mode 100644 index 00000000..2bed1e85 Binary files /dev/null and b/assets/inter-roman-greek.BBVDIX6e.woff2 differ diff --git a/assets/inter-roman-greek.d5a6d92a.woff2 b/assets/inter-roman-greek.d5a6d92a.woff2 deleted file mode 100644 index f790e047..00000000 Binary files a/assets/inter-roman-greek.d5a6d92a.woff2 and /dev/null differ diff --git a/assets/inter-roman-latin-ext.0030eebd.woff2 b/assets/inter-roman-latin-ext.0030eebd.woff2 deleted file mode 100644 index 715bd903..00000000 Binary files a/assets/inter-roman-latin-ext.0030eebd.woff2 and /dev/null differ diff --git a/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 b/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 new file mode 100644 index 00000000..9a8d1e2b Binary files /dev/null and b/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 differ diff --git a/assets/inter-roman-latin.2ed14f66.woff2 b/assets/inter-roman-latin.2ed14f66.woff2 deleted file mode 100644 index a540b7af..00000000 Binary files a/assets/inter-roman-latin.2ed14f66.woff2 and /dev/null differ diff --git a/assets/inter-roman-latin.Di8DUHzh.woff2 b/assets/inter-roman-latin.Di8DUHzh.woff2 new file mode 100644 index 00000000..07d3c53a Binary files /dev/null and b/assets/inter-roman-latin.Di8DUHzh.woff2 differ diff --git a/assets/inter-roman-vietnamese.14ce25a6.woff2 b/assets/inter-roman-vietnamese.14ce25a6.woff2 deleted file mode 100644 index 5a9f9cb9..00000000 Binary files a/assets/inter-roman-vietnamese.14ce25a6.woff2 and /dev/null differ diff --git a/assets/inter-roman-vietnamese.BjW4sHH5.woff2 b/assets/inter-roman-vietnamese.BjW4sHH5.woff2 new file mode 100644 index 00000000..57bdc22a Binary files /dev/null and b/assets/inter-roman-vietnamese.BjW4sHH5.woff2 differ diff --git a/assets/qrcode.0a61500e.png b/assets/qrcode.b_bFVwtg.png similarity index 100% rename from assets/qrcode.0a61500e.png rename to assets/qrcode.b_bFVwtg.png diff --git a/assets/style.6jWMGCsz.css b/assets/style.6jWMGCsz.css new file mode 100644 index 00000000..ff1d12cc --- /dev/null +++ b/assets/style.6jWMGCsz.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-cyrillic.C5lxZ8CY.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-greek-ext.CqjqNYQ-.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-greek.BBVDIX6e.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-vietnamese.BjW4sHH5.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-latin-ext.4ZJIpNVo.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-latin.Di8DUHzh.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-cyrillic-ext.r48I6akx.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-cyrillic.By2_1cv3.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-greek-ext.1u6EdAuj.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-greek.DJ8dCoTZ.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-vietnamese.BSbpV94h.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-latin-ext.CN1xVJS-.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-latin.C2AdPX0b.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Punctuation SC;font-weight:400;src:local("PingFang SC Regular"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:500;src:local("PingFang SC Medium"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:600;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:700;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}:root{--vp-c-white: #ffffff;--vp-c-black: #000000;--vp-c-neutral: var(--vp-c-black);--vp-c-neutral-inverse: var(--vp-c-white)}.dark{--vp-c-neutral: var(--vp-c-white);--vp-c-neutral-inverse: var(--vp-c-black)}:root{--vp-c-gray-1: #dddde3;--vp-c-gray-2: #e4e4e9;--vp-c-gray-3: #ebebef;--vp-c-gray-soft: rgba(142, 150, 170, .14);--vp-c-indigo-1: #3451b2;--vp-c-indigo-2: #3a5ccc;--vp-c-indigo-3: #5672cd;--vp-c-indigo-soft: rgba(100, 108, 255, .14);--vp-c-purple-1: #6f42c1;--vp-c-purple-2: #7e4cc9;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .14);--vp-c-green-1: #18794e;--vp-c-green-2: #299764;--vp-c-green-3: #30a46c;--vp-c-green-soft: rgba(16, 185, 129, .14);--vp-c-yellow-1: #915930;--vp-c-yellow-2: #946300;--vp-c-yellow-3: #9f6a00;--vp-c-yellow-soft: rgba(234, 179, 8, .14);--vp-c-red-1: #b8272c;--vp-c-red-2: #d5393e;--vp-c-red-3: #e0575b;--vp-c-red-soft: rgba(244, 63, 94, .14);--vp-c-sponsor: #db2777}.dark{--vp-c-gray-1: #515c67;--vp-c-gray-2: #414853;--vp-c-gray-3: #32363f;--vp-c-gray-soft: rgba(101, 117, 133, .16);--vp-c-indigo-1: #a8b1ff;--vp-c-indigo-2: #5c73e7;--vp-c-indigo-3: #3e63dd;--vp-c-indigo-soft: rgba(100, 108, 255, .16);--vp-c-purple-1: #c8abfa;--vp-c-purple-2: #a879e6;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .16);--vp-c-green-1: #3dd68c;--vp-c-green-2: #30a46c;--vp-c-green-3: #298459;--vp-c-green-soft: rgba(16, 185, 129, .16);--vp-c-yellow-1: #f9b44e;--vp-c-yellow-2: #da8b17;--vp-c-yellow-3: #a46a0a;--vp-c-yellow-soft: rgba(234, 179, 8, .16);--vp-c-red-1: #f66f81;--vp-c-red-2: #f14158;--vp-c-red-3: #b62a3c;--vp-c-red-soft: rgba(244, 63, 94, .16)}:root{--vp-c-bg: #ffffff;--vp-c-bg-alt: #f6f6f7;--vp-c-bg-elv: #ffffff;--vp-c-bg-soft: #f6f6f7}.dark{--vp-c-bg: #1b1b1f;--vp-c-bg-alt: #161618;--vp-c-bg-elv: #202127;--vp-c-bg-soft: #202127}:root{--vp-c-border: #c2c2c4;--vp-c-divider: #e2e2e3;--vp-c-gutter: #e2e2e3}.dark{--vp-c-border: #3c3f44;--vp-c-divider: #2e2e32;--vp-c-gutter: #000000}:root{--vp-c-text-1: rgba(60, 60, 67);--vp-c-text-2: rgba(60, 60, 67, .78);--vp-c-text-3: rgba(60, 60, 67, .56)}.dark{--vp-c-text-1: rgba(255, 255, 245, .86);--vp-c-text-2: rgba(235, 235, 245, .6);--vp-c-text-3: rgba(235, 235, 245, .38)}:root{--vp-c-default-1: var(--vp-c-gray-1);--vp-c-default-2: var(--vp-c-gray-2);--vp-c-default-3: var(--vp-c-gray-3);--vp-c-default-soft: var(--vp-c-gray-soft);--vp-c-brand-1: var(--vp-c-indigo-1);--vp-c-brand-2: var(--vp-c-indigo-2);--vp-c-brand-3: var(--vp-c-indigo-3);--vp-c-brand-soft: var(--vp-c-indigo-soft);--vp-c-brand: var(--vp-c-brand-1);--vp-c-tip-1: var(--vp-c-brand-1);--vp-c-tip-2: var(--vp-c-brand-2);--vp-c-tip-3: var(--vp-c-brand-3);--vp-c-tip-soft: var(--vp-c-brand-soft);--vp-c-note-1: var(--vp-c-brand-1);--vp-c-note-2: var(--vp-c-brand-2);--vp-c-note-3: var(--vp-c-brand-3);--vp-c-note-soft: var(--vp-c-brand-soft);--vp-c-success-1: var(--vp-c-green-1);--vp-c-success-2: var(--vp-c-green-2);--vp-c-success-3: var(--vp-c-green-3);--vp-c-success-soft: var(--vp-c-green-soft);--vp-c-important-1: var(--vp-c-purple-1);--vp-c-important-2: var(--vp-c-purple-2);--vp-c-important-3: var(--vp-c-purple-3);--vp-c-important-soft: var(--vp-c-purple-soft);--vp-c-warning-1: var(--vp-c-yellow-1);--vp-c-warning-2: var(--vp-c-yellow-2);--vp-c-warning-3: var(--vp-c-yellow-3);--vp-c-warning-soft: var(--vp-c-yellow-soft);--vp-c-danger-1: var(--vp-c-red-1);--vp-c-danger-2: var(--vp-c-red-2);--vp-c-danger-3: var(--vp-c-red-3);--vp-c-danger-soft: var(--vp-c-red-soft);--vp-c-caution-1: var(--vp-c-red-1);--vp-c-caution-2: var(--vp-c-red-2);--vp-c-caution-3: var(--vp-c-red-3);--vp-c-caution-soft: var(--vp-c-red-soft)}:root{--vp-font-family-base: "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;font-optical-sizing:auto}:root:where(:lang(zh)){--vp-font-family-base: "Punctuation SC", "Inter", ui-sans-serif, system-ui, "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Heiti SC", "Microsoft YaHei", "DengXian", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-footer: 10;--vp-z-index-local-nav: 20;--vp-z-index-nav: 30;--vp-z-index-layout-top: 40;--vp-z-index-backdrop: 50;--vp-z-index-sidebar: 60}@media (min-width: 960px){:root{--vp-z-index-sidebar: 25}}:root{--vp-layout-max-width: 1440px}:root{--vp-header-anchor-symbol: "#"}:root{--vp-code-line-height: 1.7;--vp-code-font-size: .875em;--vp-code-color: var(--vp-c-brand-1);--vp-code-link-color: var(--vp-c-brand-1);--vp-code-link-hover-color: var(--vp-c-brand-2);--vp-code-bg: var(--vp-c-default-soft);--vp-code-block-color: var(--vp-c-text-2);--vp-code-block-bg: var(--vp-c-bg-alt);--vp-code-block-divider-color: var(--vp-c-gutter);--vp-code-lang-color: var(--vp-c-text-3);--vp-code-line-highlight-color: var(--vp-c-default-soft);--vp-code-line-number-color: var(--vp-c-text-3);--vp-code-line-diff-add-color: var(--vp-c-success-soft);--vp-code-line-diff-add-symbol-color: var(--vp-c-success-1);--vp-code-line-diff-remove-color: var(--vp-c-danger-soft);--vp-code-line-diff-remove-symbol-color: var(--vp-c-danger-1);--vp-code-line-warning-color: var(--vp-c-warning-soft);--vp-code-line-error-color: var(--vp-c-danger-soft);--vp-code-copy-code-border-color: var(--vp-c-divider);--vp-code-copy-code-bg: var(--vp-c-bg-soft);--vp-code-copy-code-hover-border-color: var(--vp-c-divider);--vp-code-copy-code-hover-bg: var(--vp-c-bg);--vp-code-copy-code-active-text: var(--vp-c-text-2);--vp-code-copy-copied-text-content: "Copied";--vp-code-tab-divider: var(--vp-code-block-divider-color);--vp-code-tab-text-color: var(--vp-c-text-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-1);--vp-code-tab-active-text-color: var(--vp-c-text-1);--vp-code-tab-active-bar-color: var(--vp-c-brand-1)}:root{--vp-button-brand-border: transparent;--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand-3);--vp-button-brand-hover-border: transparent;--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-2);--vp-button-brand-active-border: transparent;--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-c-brand-1);--vp-button-alt-border: transparent;--vp-button-alt-text: var(--vp-c-text-1);--vp-button-alt-bg: var(--vp-c-default-3);--vp-button-alt-hover-border: transparent;--vp-button-alt-hover-text: var(--vp-c-text-1);--vp-button-alt-hover-bg: var(--vp-c-default-2);--vp-button-alt-active-border: transparent;--vp-button-alt-active-text: var(--vp-c-text-1);--vp-button-alt-active-bg: var(--vp-c-default-1);--vp-button-sponsor-border: var(--vp-c-text-2);--vp-button-sponsor-text: var(--vp-c-text-2);--vp-button-sponsor-bg: transparent;--vp-button-sponsor-hover-border: var(--vp-c-sponsor);--vp-button-sponsor-hover-text: var(--vp-c-sponsor);--vp-button-sponsor-hover-bg: transparent;--vp-button-sponsor-active-border: var(--vp-c-sponsor);--vp-button-sponsor-active-text: var(--vp-c-sponsor);--vp-button-sponsor-active-bg: transparent}:root{--vp-custom-block-font-size: 14px;--vp-custom-block-code-font-size: 13px;--vp-custom-block-info-border: transparent;--vp-custom-block-info-text: var(--vp-c-text-1);--vp-custom-block-info-bg: var(--vp-c-default-soft);--vp-custom-block-info-code-bg: var(--vp-c-default-soft);--vp-custom-block-note-border: transparent;--vp-custom-block-note-text: var(--vp-c-text-1);--vp-custom-block-note-bg: var(--vp-c-default-soft);--vp-custom-block-note-code-bg: var(--vp-c-default-soft);--vp-custom-block-tip-border: transparent;--vp-custom-block-tip-text: var(--vp-c-text-1);--vp-custom-block-tip-bg: var(--vp-c-tip-soft);--vp-custom-block-tip-code-bg: var(--vp-c-tip-soft);--vp-custom-block-important-border: transparent;--vp-custom-block-important-text: var(--vp-c-text-1);--vp-custom-block-important-bg: var(--vp-c-important-soft);--vp-custom-block-important-code-bg: var(--vp-c-important-soft);--vp-custom-block-warning-border: transparent;--vp-custom-block-warning-text: var(--vp-c-text-1);--vp-custom-block-warning-bg: var(--vp-c-warning-soft);--vp-custom-block-warning-code-bg: var(--vp-c-warning-soft);--vp-custom-block-danger-border: transparent;--vp-custom-block-danger-text: var(--vp-c-text-1);--vp-custom-block-danger-bg: var(--vp-c-danger-soft);--vp-custom-block-danger-code-bg: var(--vp-c-danger-soft);--vp-custom-block-caution-border: transparent;--vp-custom-block-caution-text: var(--vp-c-text-1);--vp-custom-block-caution-bg: var(--vp-c-caution-soft);--vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);--vp-custom-block-details-border: var(--vp-custom-block-info-border);--vp-custom-block-details-text: var(--vp-custom-block-info-text);--vp-custom-block-details-bg: var(--vp-custom-block-info-bg);--vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg)}:root{--vp-input-border-color: var(--vp-c-border);--vp-input-bg-color: var(--vp-c-bg-alt);--vp-input-switch-bg-color: var(--vp-c-default-soft)}:root{--vp-nav-height: 64px;--vp-nav-bg-color: var(--vp-c-bg);--vp-nav-screen-bg-color: var(--vp-c-bg);--vp-nav-logo-height: 24px}.hide-nav{--vp-nav-height: 0px}.hide-nav .VPSidebar{--vp-nav-height: 22px}:root{--vp-local-nav-bg-color: var(--vp-c-bg)}:root{--vp-sidebar-width: 272px;--vp-sidebar-bg-color: var(--vp-c-bg-alt)}:root{--vp-backdrop-bg-color: rgba(0, 0, 0, .6)}:root{--vp-home-hero-name-color: var(--vp-c-brand-1);--vp-home-hero-name-background: transparent;--vp-home-hero-image-background-image: none;--vp-home-hero-image-filter: none}:root{--vp-badge-info-border: transparent;--vp-badge-info-text: var(--vp-c-text-2);--vp-badge-info-bg: var(--vp-c-default-soft);--vp-badge-tip-border: transparent;--vp-badge-tip-text: var(--vp-c-tip-1);--vp-badge-tip-bg: var(--vp-c-tip-soft);--vp-badge-warning-border: transparent;--vp-badge-warning-text: var(--vp-c-warning-1);--vp-badge-warning-bg: var(--vp-c-warning-soft);--vp-badge-danger-border: transparent;--vp-badge-danger-text: var(--vp-c-danger-1);--vp-badge-danger-bg: var(--vp-c-danger-soft)}:root{--vp-carbon-ads-text-color: var(--vp-c-text-1);--vp-carbon-ads-poweredby-color: var(--vp-c-text-2);--vp-carbon-ads-bg-color: var(--vp-c-bg-soft);--vp-carbon-ads-hover-text-color: var(--vp-c-brand-1);--vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1)}:root{--vp-local-search-bg: var(--vp-c-bg);--vp-local-search-result-bg: var(--vp-c-bg);--vp-local-search-result-border: var(--vp-c-divider);--vp-local-search-result-selected-bg: var(--vp-c-bg);--vp-local-search-result-selected-border: var(--vp-c-brand-1);--vp-local-search-highlight-bg: var(--vp-c-brand-1);--vp-local-search-highlight-text: var(--vp-c-neutral-inverse)}@media (prefers-reduced-motion: reduce){*,:before,:after{animation-delay:-1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important;background-attachment:initial!important;scroll-behavior:auto!important;transition-duration:0s!important;transition-delay:0s!important}}*,:before,:after{box-sizing:border-box}html{line-height:1.4;font-size:16px;-webkit-text-size-adjust:100%}html.dark{color-scheme:dark}body{margin:0;width:100%;min-width:320px;min-height:100vh;line-height:24px;font-family:var(--vp-font-family-base);font-size:16px;font-weight:400;color:var(--vp-c-text-1);background-color:var(--vp-c-bg);font-synthesis:style;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin:0;line-height:24px;font-size:16px;font-weight:400}p{margin:0}strong,b{font-weight:600}a,area,button,[role=button],input,label,select,summary,textarea{touch-action:manipulation}a{color:inherit;text-decoration:inherit}ol,ul{list-style:none;margin:0;padding:0}blockquote{margin:0}pre,code,kbd,samp{font-family:var(--vp-font-family-mono)}img,svg,video,canvas,audio,iframe,embed,object{display:block}figure{margin:0}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{border:0;padding:0;line-height:inherit;color:inherit}button{padding:0;font-family:inherit;background-color:transparent;background-image:none}button:enabled,[role=button]:enabled{cursor:pointer}button:focus,button:focus-visible{outline:1px dotted;outline:4px auto -webkit-focus-ring-color}button:focus:not(:focus-visible){outline:none!important}input:focus,textarea:focus,select:focus{outline:none}table{border-collapse:collapse}input{background-color:transparent}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--vp-c-text-3)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--vp-c-text-3)}input::placeholder,textarea::placeholder{color:var(--vp-c-text-3)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}textarea{resize:vertical}select{-webkit-appearance:none}fieldset{margin:0;padding:0}h1,h2,h3,h4,h5,h6,li,p{overflow-wrap:break-word}vite-error-overlay{z-index:9999}mjx-container{overflow-x:auto}mjx-container>svg{display:inline-block;margin:auto}[class^=vpi-],[class*=" vpi-"],.vp-icon{width:1em;height:1em}[class^=vpi-].bg,[class*=" vpi-"].bg,.vp-icon.bg{background-size:100% 100%;background-color:transparent}[class^=vpi-]:not(.bg),[class*=" vpi-"]:not(.bg),.vp-icon:not(.bg){-webkit-mask:var(--icon) no-repeat;mask:var(--icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit}.vpi-align-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 6H3M15 12H3M17 18H3'/%3E%3C/svg%3E")}.vpi-arrow-right,.vpi-arrow-down,.vpi-arrow-left,.vpi-arrow-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E")}.vpi-chevron-right,.vpi-chevron-down,.vpi-chevron-left,.vpi-chevron-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")}.vpi-chevron-down,.vpi-arrow-down{transform:rotate(90deg)}.vpi-chevron-left,.vpi-arrow-left{transform:rotate(180deg)}.vpi-chevron-up,.vpi-arrow-up{transform:rotate(-90deg)}.vpi-square-pen{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z'/%3E%3C/svg%3E")}.vpi-plus{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E")}.vpi-sun{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E")}.vpi-moon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E")}.vpi-more-horizontal{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E")}.vpi-languages{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m5 8 6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E")}.vpi-heart{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E")}.vpi-search{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")}.vpi-layout-list{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7M14 9h7M14 15h7M14 20h7'/%3E%3C/svg%3E")}.vpi-delete{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H9l-7 7 7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2ZM18 9l-6 6M12 9l6 6'/%3E%3C/svg%3E")}.vpi-corner-down-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 10-5 5 5 5'/%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3C/svg%3E")}:root{--vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");--vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E")}.vpi-social-discord{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z'/%3E%3C/svg%3E")}.vpi-social-facebook{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z'/%3E%3C/svg%3E")}.vpi-social-github{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")}.vpi-social-instagram{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.03.084c-1.277.06-2.149.264-2.91.563a5.874 5.874 0 0 0-2.124 1.388 5.878 5.878 0 0 0-1.38 2.127C.321 4.926.12 5.8.064 7.076.008 8.354-.005 8.764.001 12.023c.007 3.259.021 3.667.083 4.947.061 1.277.264 2.149.563 2.911.308.789.72 1.457 1.388 2.123a5.872 5.872 0 0 0 2.129 1.38c.763.295 1.636.496 2.913.552 1.278.056 1.689.069 4.947.063 3.257-.007 3.668-.021 4.947-.082 1.28-.06 2.147-.265 2.91-.563a5.881 5.881 0 0 0 2.123-1.388 5.881 5.881 0 0 0 1.38-2.129c.295-.763.496-1.636.551-2.912.056-1.28.07-1.69.063-4.948-.006-3.258-.02-3.667-.081-4.947-.06-1.28-.264-2.148-.564-2.911a5.892 5.892 0 0 0-1.387-2.123 5.857 5.857 0 0 0-2.128-1.38C19.074.322 18.202.12 16.924.066 15.647.009 15.236-.006 11.977 0 8.718.008 8.31.021 7.03.084m.14 21.693c-1.17-.05-1.805-.245-2.228-.408a3.736 3.736 0 0 1-1.382-.895 3.695 3.695 0 0 1-.9-1.378c-.165-.423-.363-1.058-.417-2.228-.06-1.264-.072-1.644-.08-4.848-.006-3.204.006-3.583.061-4.848.05-1.169.246-1.805.408-2.228.216-.561.477-.96.895-1.382a3.705 3.705 0 0 1 1.379-.9c.423-.165 1.057-.361 2.227-.417 1.265-.06 1.644-.072 4.848-.08 3.203-.006 3.583.006 4.85.062 1.168.05 1.804.244 2.227.408.56.216.96.475 1.382.895.421.42.681.817.9 1.378.165.422.362 1.056.417 2.227.06 1.265.074 1.645.08 4.848.005 3.203-.006 3.583-.061 4.848-.051 1.17-.245 1.805-.408 2.23-.216.56-.477.96-.896 1.38a3.705 3.705 0 0 1-1.378.9c-.422.165-1.058.362-2.226.418-1.266.06-1.645.072-4.85.079-3.204.007-3.582-.006-4.848-.06m9.783-16.192a1.44 1.44 0 1 0 1.437-1.442 1.44 1.44 0 0 0-1.437 1.442M5.839 12.012a6.161 6.161 0 1 0 12.323-.024 6.162 6.162 0 0 0-12.323.024M8 12.008A4 4 0 1 1 12.008 16 4 4 0 0 1 8 12.008'/%3E%3C/svg%3E")}.vpi-social-linkedin{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E")}.vpi-social-mastodon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z'/%3E%3C/svg%3E")}.vpi-social-npm{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z'/%3E%3C/svg%3E")}.vpi-social-slack{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z'/%3E%3C/svg%3E")}.vpi-social-twitter,.vpi-social-x{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E")}.vpi-social-youtube{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z'/%3E%3C/svg%3E")}.visually-hidden{position:absolute;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden}.custom-block{border:1px solid transparent;border-radius:8px;padding:16px 16px 8px;line-height:24px;font-size:var(--vp-custom-block-font-size);color:var(--vp-c-text-2)}.custom-block.info{border-color:var(--vp-custom-block-info-border);color:var(--vp-custom-block-info-text);background-color:var(--vp-custom-block-info-bg)}.custom-block.info a,.custom-block.info code{color:var(--vp-c-brand-1)}.custom-block.info a:hover,.custom-block.info a:hover>code{color:var(--vp-c-brand-2)}.custom-block.info code{background-color:var(--vp-custom-block-info-code-bg)}.custom-block.note{border-color:var(--vp-custom-block-note-border);color:var(--vp-custom-block-note-text);background-color:var(--vp-custom-block-note-bg)}.custom-block.note a,.custom-block.note code{color:var(--vp-c-brand-1)}.custom-block.note a:hover,.custom-block.note a:hover>code{color:var(--vp-c-brand-2)}.custom-block.note code{background-color:var(--vp-custom-block-note-code-bg)}.custom-block.tip{border-color:var(--vp-custom-block-tip-border);color:var(--vp-custom-block-tip-text);background-color:var(--vp-custom-block-tip-bg)}.custom-block.tip a,.custom-block.tip code{color:var(--vp-c-tip-1)}.custom-block.tip a:hover,.custom-block.tip a:hover>code{color:var(--vp-c-tip-2)}.custom-block.tip code{background-color:var(--vp-custom-block-tip-code-bg)}.custom-block.important{border-color:var(--vp-custom-block-important-border);color:var(--vp-custom-block-important-text);background-color:var(--vp-custom-block-important-bg)}.custom-block.important a,.custom-block.important code{color:var(--vp-c-important-1)}.custom-block.important a:hover,.custom-block.important a:hover>code{color:var(--vp-c-important-2)}.custom-block.important code{background-color:var(--vp-custom-block-important-code-bg)}.custom-block.warning{border-color:var(--vp-custom-block-warning-border);color:var(--vp-custom-block-warning-text);background-color:var(--vp-custom-block-warning-bg)}.custom-block.warning a,.custom-block.warning code{color:var(--vp-c-warning-1)}.custom-block.warning a:hover,.custom-block.warning a:hover>code{color:var(--vp-c-warning-2)}.custom-block.warning code{background-color:var(--vp-custom-block-warning-code-bg)}.custom-block.danger{border-color:var(--vp-custom-block-danger-border);color:var(--vp-custom-block-danger-text);background-color:var(--vp-custom-block-danger-bg)}.custom-block.danger a,.custom-block.danger code{color:var(--vp-c-danger-1)}.custom-block.danger a:hover,.custom-block.danger a:hover>code{color:var(--vp-c-danger-2)}.custom-block.danger code{background-color:var(--vp-custom-block-danger-code-bg)}.custom-block.caution{border-color:var(--vp-custom-block-caution-border);color:var(--vp-custom-block-caution-text);background-color:var(--vp-custom-block-caution-bg)}.custom-block.caution a,.custom-block.caution code{color:var(--vp-c-caution-1)}.custom-block.caution a:hover,.custom-block.caution a:hover>code{color:var(--vp-c-caution-2)}.custom-block.caution code{background-color:var(--vp-custom-block-caution-code-bg)}.custom-block.details{border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.custom-block.details a{color:var(--vp-c-brand-1)}.custom-block.details a:hover,.custom-block.details a:hover>code{color:var(--vp-c-brand-2)}.custom-block.details code{background-color:var(--vp-custom-block-details-code-bg)}.custom-block-title{font-weight:600}.custom-block p+p{margin:8px 0}.custom-block.details summary{margin:0 0 8px;font-weight:700;cursor:pointer;-webkit-user-select:none;user-select:none}.custom-block.details summary+p{margin:8px 0}.custom-block a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;transition:opacity .25s}.custom-block a:hover{opacity:.75}.custom-block code{font-size:var(--vp-custom-block-code-font-size)}.custom-block.custom-block th,.custom-block.custom-block blockquote>p{font-size:var(--vp-custom-block-font-size);color:inherit}.dark .vp-code span{color:var(--shiki-dark, inherit)}html:not(.dark) .vp-code span{color:var(--shiki-light, inherit)}.vp-code-group{margin-top:16px}.vp-code-group .tabs{position:relative;display:flex;margin-right:-24px;margin-left:-24px;padding:0 12px;background-color:var(--vp-code-tab-bg);overflow-x:auto;overflow-y:hidden;box-shadow:inset 0 -1px var(--vp-code-tab-divider)}@media (min-width: 640px){.vp-code-group .tabs{margin-right:0;margin-left:0;border-radius:8px 8px 0 0}}.vp-code-group .tabs input{position:fixed;opacity:0;pointer-events:none}.vp-code-group .tabs label{position:relative;display:inline-block;border-bottom:1px solid transparent;padding:0 12px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-code-tab-text-color);white-space:nowrap;cursor:pointer;transition:color .25s}.vp-code-group .tabs label:after{position:absolute;right:8px;bottom:-1px;left:8px;z-index:1;height:2px;border-radius:2px;content:"";background-color:transparent;transition:background-color .25s}.vp-code-group label:hover{color:var(--vp-code-tab-hover-text-color)}.vp-code-group input:checked+label{color:var(--vp-code-tab-active-text-color)}.vp-code-group input:checked+label:after{background-color:var(--vp-code-tab-active-bar-color)}.vp-code-group div[class*=language-],.vp-block{display:none;margin-top:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.vp-code-group div[class*=language-].active,.vp-block.active{display:block}.vp-block{padding:20px 24px}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{position:relative;font-weight:600;outline:none}.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:28px}.vp-doc h2{margin:48px 0 16px;border-top:1px solid var(--vp-c-divider);padding-top:24px;letter-spacing:-.02em;line-height:32px;font-size:24px}.vp-doc h3{margin:32px 0 0;letter-spacing:-.01em;line-height:28px;font-size:20px}.vp-doc .header-anchor{position:absolute;top:0;left:0;margin-left:-.87em;font-weight:500;-webkit-user-select:none;user-select:none;opacity:0;text-decoration:none;transition:color .25s,opacity .25s}.vp-doc .header-anchor:before{content:var(--vp-header-anchor-symbol)}.vp-doc h1:hover .header-anchor,.vp-doc h1 .header-anchor:focus,.vp-doc h2:hover .header-anchor,.vp-doc h2 .header-anchor:focus,.vp-doc h3:hover .header-anchor,.vp-doc h3 .header-anchor:focus,.vp-doc h4:hover .header-anchor,.vp-doc h4 .header-anchor:focus,.vp-doc h5:hover .header-anchor,.vp-doc h5 .header-anchor:focus,.vp-doc h6:hover .header-anchor,.vp-doc h6 .header-anchor:focus{opacity:1}@media (min-width: 768px){.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:32px}}.vp-doc h2 .header-anchor{top:24px}.vp-doc p,.vp-doc summary{margin:16px 0}.vp-doc p{line-height:28px}.vp-doc blockquote{margin:16px 0;border-left:2px solid var(--vp-c-divider);padding-left:16px;transition:border-color .5s}.vp-doc blockquote>p{margin:0;font-size:16px;color:var(--vp-c-text-2);transition:color .5s}.vp-doc a{font-weight:500;color:var(--vp-c-brand-1);text-decoration:underline;text-underline-offset:2px;transition:color .25s,opacity .25s}.vp-doc a:hover{color:var(--vp-c-brand-2)}.vp-doc strong{font-weight:600}.vp-doc ul,.vp-doc ol{padding-left:1.25rem;margin:16px 0}.vp-doc ul{list-style:disc}.vp-doc ol{list-style:decimal}.vp-doc li+li{margin-top:8px}.vp-doc li>ol,.vp-doc li>ul{margin:8px 0 0}.vp-doc table{display:block;border-collapse:collapse;margin:20px 0;overflow-x:auto}.vp-doc tr{background-color:var(--vp-c-bg);border-top:1px solid var(--vp-c-divider);transition:background-color .5s}.vp-doc tr:nth-child(2n){background-color:var(--vp-c-bg-soft)}.vp-doc th,.vp-doc td{border:1px solid var(--vp-c-divider);padding:8px 16px}.vp-doc th{text-align:left;font-size:14px;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-doc td{font-size:14px}.vp-doc hr{margin:16px 0;border:none;border-top:1px solid var(--vp-c-divider)}.vp-doc .custom-block{margin:16px 0}.vp-doc .custom-block p{margin:8px 0;line-height:24px}.vp-doc .custom-block p:first-child{margin:0}.vp-doc .custom-block div[class*=language-]{margin:8px 0;border-radius:8px}.vp-doc .custom-block div[class*=language-] code{font-weight:400;background-color:transparent}.vp-doc .custom-block .vp-code-group .tabs{margin:0;border-radius:8px 8px 0 0}.vp-doc :not(pre,h1,h2,h3,h4,h5,h6)>code{font-size:var(--vp-code-font-size);color:var(--vp-code-color)}.vp-doc :not(pre)>code{border-radius:4px;padding:3px 6px;background-color:var(--vp-code-bg);transition:color .25s,background-color .5s}.vp-doc a>code{color:var(--vp-code-link-color)}.vp-doc a:hover>code{color:var(--vp-code-link-hover-color)}.vp-doc h1>code,.vp-doc h2>code,.vp-doc h3>code{font-size:.9em}.vp-doc div[class*=language-],.vp-block{position:relative;margin:16px -24px;background-color:var(--vp-code-block-bg);overflow-x:auto;transition:background-color .5s}@media (min-width: 640px){.vp-doc div[class*=language-],.vp-block{border-radius:8px;margin:16px 0}}@media (max-width: 639px){.vp-doc li div[class*=language-]{border-radius:8px 0 0 8px}}.vp-doc div[class*=language-]+div[class*=language-],.vp-doc div[class$=-api]+div[class*=language-],.vp-doc div[class*=language-]+div[class$=-api]>div[class*=language-]{margin-top:-8px}.vp-doc [class*=language-] pre,.vp-doc [class*=language-] code{direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.vp-doc [class*=language-] pre{position:relative;z-index:1;margin:0;padding:20px 0;background:transparent;overflow-x:auto}.vp-doc [class*=language-] code{display:block;padding:0 24px;width:fit-content;min-width:100%;line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-block-color);transition:color .5s}.vp-doc [class*=language-] code .highlighted{background-color:var(--vp-code-line-highlight-color);transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .highlighted.error{background-color:var(--vp-code-line-error-color)}.vp-doc [class*=language-] code .highlighted.warning{background-color:var(--vp-code-line-warning-color)}.vp-doc [class*=language-] code .diff{transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .diff:before{position:absolute;left:10px}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){filter:blur(.095rem);opacity:.4;transition:filter .35s,opacity .35s}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){opacity:.7;transition:filter .35s,opacity .35s}.vp-doc [class*=language-]:hover .has-focused-lines .line:not(.has-focus){filter:blur(0);opacity:1}.vp-doc [class*=language-] code .diff.remove{background-color:var(--vp-code-line-diff-remove-color);opacity:.7}.vp-doc [class*=language-] code .diff.remove:before{content:"-";color:var(--vp-code-line-diff-remove-symbol-color)}.vp-doc [class*=language-] code .diff.add{background-color:var(--vp-code-line-diff-add-color)}.vp-doc [class*=language-] code .diff.add:before{content:"+";color:var(--vp-code-line-diff-add-symbol-color)}.vp-doc div[class*=language-].line-numbers-mode{padding-left:32px}.vp-doc .line-numbers-wrapper{position:absolute;top:0;bottom:0;left:0;z-index:3;border-right:1px solid var(--vp-code-block-divider-color);padding-top:20px;width:32px;text-align:center;font-family:var(--vp-font-family-mono);line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-line-number-color);transition:border-color .5s,color .5s}.vp-doc [class*=language-]>button.copy{direction:ltr;position:absolute;top:12px;right:12px;z-index:3;border:1px solid var(--vp-code-copy-code-border-color);border-radius:4px;width:40px;height:40px;background-color:var(--vp-code-copy-code-bg);opacity:0;cursor:pointer;background-image:var(--vp-icon-copy);background-position:50%;background-size:20px;background-repeat:no-repeat;transition:border-color .25s,background-color .25s,opacity .25s}.vp-doc [class*=language-]:hover>button.copy,.vp-doc [class*=language-]>button.copy:focus{opacity:1}.vp-doc [class*=language-]>button.copy:hover,.vp-doc [class*=language-]>button.copy.copied{border-color:var(--vp-code-copy-code-hover-border-color);background-color:var(--vp-code-copy-code-hover-bg)}.vp-doc [class*=language-]>button.copy.copied,.vp-doc [class*=language-]>button.copy:hover.copied{border-radius:0 4px 4px 0;background-color:var(--vp-code-copy-code-hover-bg);background-image:var(--vp-icon-copied)}.vp-doc [class*=language-]>button.copy.copied:before,.vp-doc [class*=language-]>button.copy:hover.copied:before{position:relative;top:-1px;transform:translate(calc(-100% - 1px));display:flex;justify-content:center;align-items:center;border:1px solid var(--vp-code-copy-code-hover-border-color);border-right:0;border-radius:4px 0 0 4px;padding:0 10px;width:fit-content;height:40px;text-align:center;font-size:12px;font-weight:500;color:var(--vp-code-copy-code-active-text);background-color:var(--vp-code-copy-code-hover-bg);white-space:nowrap;content:var(--vp-code-copy-copied-text-content)}.vp-doc [class*=language-]>span.lang{position:absolute;top:2px;right:8px;z-index:2;font-size:12px;font-weight:500;color:var(--vp-code-lang-color);transition:color .4s,opacity .4s}.vp-doc [class*=language-]:hover>button.copy+span.lang,.vp-doc [class*=language-]>button.copy:focus+span.lang{opacity:0}.vp-doc .VPTeamMembers{margin-top:24px}.vp-doc .VPTeamMembers.small.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}.vp-doc .VPTeamMembers.small.count-2 .container,.vp-doc .VPTeamMembers.small.count-3 .container{max-width:100%!important}.vp-doc .VPTeamMembers.medium.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}:is(.vp-external-link-icon,.vp-doc a[href*="://"],.vp-doc a[target=_blank]):not(.no-icon):after{display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:currentColor;color:var(--vp-c-text-3);flex-shrink:0;--icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");-webkit-mask-image:var(--icon);mask-image:var(--icon)}.vp-external-link-icon:after{content:""}.external-link-icon-enabled :is(.vp-doc a[href*="://"],.vp-doc a[target=_blank]):after{content:"";color:currentColor}.vp-sponsor{border-radius:16px;overflow:hidden}.vp-sponsor.aside{border-radius:12px}.vp-sponsor-section+.vp-sponsor-section{margin-top:4px}.vp-sponsor-tier{margin:0 0 4px!important;text-align:center;letter-spacing:1px!important;line-height:24px;width:100%;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-sponsor.normal .vp-sponsor-tier{padding:13px 0 11px;font-size:14px}.vp-sponsor.aside .vp-sponsor-tier{padding:9px 0 7px;font-size:12px}.vp-sponsor-grid+.vp-sponsor-tier{margin-top:4px}.vp-sponsor-grid{display:flex;flex-wrap:wrap;gap:4px}.vp-sponsor-grid.xmini .vp-sponsor-grid-link{height:64px}.vp-sponsor-grid.xmini .vp-sponsor-grid-image{max-width:64px;max-height:22px}.vp-sponsor-grid.mini .vp-sponsor-grid-link{height:72px}.vp-sponsor-grid.mini .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.small .vp-sponsor-grid-link{height:96px}.vp-sponsor-grid.small .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.medium .vp-sponsor-grid-link{height:112px}.vp-sponsor-grid.medium .vp-sponsor-grid-image{max-width:120px;max-height:36px}.vp-sponsor-grid.big .vp-sponsor-grid-link{height:184px}.vp-sponsor-grid.big .vp-sponsor-grid-image{max-width:192px;max-height:56px}.vp-sponsor-grid[data-vp-grid="2"] .vp-sponsor-grid-item{width:calc((100% - 4px)/2)}.vp-sponsor-grid[data-vp-grid="3"] .vp-sponsor-grid-item{width:calc((100% - 4px * 2) / 3)}.vp-sponsor-grid[data-vp-grid="4"] .vp-sponsor-grid-item{width:calc((100% - 12px)/4)}.vp-sponsor-grid[data-vp-grid="5"] .vp-sponsor-grid-item{width:calc((100% - 16px)/5)}.vp-sponsor-grid[data-vp-grid="6"] .vp-sponsor-grid-item{width:calc((100% - 4px * 5) / 6)}.vp-sponsor-grid-item{flex-shrink:0;width:100%;background-color:var(--vp-c-bg-soft);transition:background-color .25s}.vp-sponsor-grid-item:hover{background-color:var(--vp-c-default-soft)}.vp-sponsor-grid-item:hover .vp-sponsor-grid-image{filter:grayscale(0) invert(0)}.vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.dark .vp-sponsor-grid-item:hover{background-color:var(--vp-c-white)}.dark .vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.vp-sponsor-grid-link{display:flex}.vp-sponsor-grid-box{display:flex;justify-content:center;align-items:center;width:100%}.vp-sponsor-grid-image{max-width:100%;filter:grayscale(1);transition:filter .25s}.dark .vp-sponsor-grid-image{filter:grayscale(1) invert(1)}.VPBadge{display:inline-block;margin-left:2px;border:1px solid transparent;border-radius:12px;padding:0 10px;line-height:22px;font-size:12px;font-weight:500;transform:translateY(-2px)}.VPBadge.small{padding:0 6px;line-height:18px;font-size:10px;transform:translateY(-8px)}.VPDocFooter .VPBadge{display:none}.vp-doc h1>.VPBadge{margin-top:4px;vertical-align:top}.vp-doc h2>.VPBadge{margin-top:3px;padding:0 8px;vertical-align:top}.vp-doc h3>.VPBadge{vertical-align:middle}.vp-doc h4>.VPBadge,.vp-doc h5>.VPBadge,.vp-doc h6>.VPBadge{vertical-align:middle;line-height:18px}.VPBadge.info{border-color:var(--vp-badge-info-border);color:var(--vp-badge-info-text);background-color:var(--vp-badge-info-bg)}.VPBadge.tip{border-color:var(--vp-badge-tip-border);color:var(--vp-badge-tip-text);background-color:var(--vp-badge-tip-bg)}.VPBadge.warning{border-color:var(--vp-badge-warning-border);color:var(--vp-badge-warning-text);background-color:var(--vp-badge-warning-bg)}.VPBadge.danger{border-color:var(--vp-badge-danger-border);color:var(--vp-badge-danger-text);background-color:var(--vp-badge-danger-bg)}.VPBackdrop[data-v-c79a1216]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--vp-z-index-backdrop);background:var(--vp-backdrop-bg-color);transition:opacity .5s}.VPBackdrop.fade-enter-from[data-v-c79a1216],.VPBackdrop.fade-leave-to[data-v-c79a1216]{opacity:0}.VPBackdrop.fade-leave-active[data-v-c79a1216]{transition-duration:.25s}@media (min-width: 1280px){.VPBackdrop[data-v-c79a1216]{display:none}}.NotFound[data-v-d6be1790]{padding:64px 24px 96px;text-align:center}@media (min-width: 768px){.NotFound[data-v-d6be1790]{padding:96px 32px 168px}}.code[data-v-d6be1790]{line-height:64px;font-size:64px;font-weight:600}.title[data-v-d6be1790]{padding-top:12px;letter-spacing:2px;line-height:20px;font-size:20px;font-weight:700}.divider[data-v-d6be1790]{margin:24px auto 18px;width:64px;height:1px;background-color:var(--vp-c-divider)}.quote[data-v-d6be1790]{margin:0 auto;max-width:256px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.action[data-v-d6be1790]{padding-top:20px}.link[data-v-d6be1790]{display:inline-block;border:1px solid var(--vp-c-brand-1);border-radius:16px;padding:3px 16px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:border-color .25s,color .25s}.link[data-v-d6be1790]:hover{border-color:var(--vp-c-brand-2);color:var(--vp-c-brand-2)}.root[data-v-b933a997]{position:relative;z-index:1}.nested[data-v-b933a997]{padding-right:16px;padding-left:16px}.outline-link[data-v-b933a997]{display:block;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .5s}.outline-link[data-v-b933a997]:hover,.outline-link.active[data-v-b933a997]{color:var(--vp-c-text-1);transition:color .25s}.outline-link.nested[data-v-b933a997]{padding-left:13px}.VPDocAsideOutline[data-v-a5bbad30]{display:none}.VPDocAsideOutline.has-outline[data-v-a5bbad30]{display:block}.content[data-v-a5bbad30]{position:relative;border-left:1px solid var(--vp-c-divider);padding-left:16px;font-size:13px;font-weight:500}.outline-marker[data-v-a5bbad30]{position:absolute;top:32px;left:-1px;z-index:0;opacity:0;width:2px;border-radius:2px;height:18px;background-color:var(--vp-c-brand-1);transition:top .25s cubic-bezier(0,1,.5,1),background-color .5s,opacity .25s}.outline-title[data-v-a5bbad30]{line-height:32px;font-size:14px;font-weight:600}.VPDocAside[data-v-3f215769]{display:flex;flex-direction:column;flex-grow:1}.spacer[data-v-3f215769]{flex-grow:1}.VPDocAside[data-v-3f215769] .spacer+.VPDocAsideSponsors,.VPDocAside[data-v-3f215769] .spacer+.VPDocAsideCarbonAds{margin-top:24px}.VPDocAside[data-v-3f215769] .VPDocAsideSponsors+.VPDocAsideCarbonAds{margin-top:16px}.VPLastUpdated[data-v-7e05ebdb]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 640px){.VPLastUpdated[data-v-7e05ebdb]{line-height:32px;font-size:14px;font-weight:500}}.VPDocFooter[data-v-d4a0bba5]{margin-top:64px}.edit-info[data-v-d4a0bba5]{padding-bottom:18px}@media (min-width: 640px){.edit-info[data-v-d4a0bba5]{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px}}.edit-link-button[data-v-d4a0bba5]{display:flex;align-items:center;border:0;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.edit-link-button[data-v-d4a0bba5]:hover{color:var(--vp-c-brand-2)}.edit-link-icon[data-v-d4a0bba5]{margin-right:8px}.prev-next[data-v-d4a0bba5]{border-top:1px solid var(--vp-c-divider);padding-top:24px;display:grid;grid-row-gap:8px}@media (min-width: 640px){.prev-next[data-v-d4a0bba5]{grid-template-columns:repeat(2,1fr);grid-column-gap:16px}}.pager-link[data-v-d4a0bba5]{display:block;border:1px solid var(--vp-c-divider);border-radius:8px;padding:11px 16px 13px;width:100%;height:100%;transition:border-color .25s}.pager-link[data-v-d4a0bba5]:hover{border-color:var(--vp-c-brand-1)}.pager-link.next[data-v-d4a0bba5]{margin-left:auto;text-align:right}.desc[data-v-d4a0bba5]{display:block;line-height:20px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.title[data-v-d4a0bba5]{display:block;line-height:20px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.VPDoc[data-v-39a288b8]{padding:32px 24px 96px;width:100%}@media (min-width: 768px){.VPDoc[data-v-39a288b8]{padding:48px 32px 128px}}@media (min-width: 960px){.VPDoc[data-v-39a288b8]{padding:48px 32px 0}.VPDoc:not(.has-sidebar) .container[data-v-39a288b8]{display:flex;justify-content:center;max-width:992px}.VPDoc:not(.has-sidebar) .content[data-v-39a288b8]{max-width:752px}}@media (min-width: 1280px){.VPDoc .container[data-v-39a288b8]{display:flex;justify-content:center}.VPDoc .aside[data-v-39a288b8]{display:block}}@media (min-width: 1440px){.VPDoc:not(.has-sidebar) .content[data-v-39a288b8]{max-width:784px}.VPDoc:not(.has-sidebar) .container[data-v-39a288b8]{max-width:1104px}}.container[data-v-39a288b8]{margin:0 auto;width:100%}.aside[data-v-39a288b8]{position:relative;display:none;order:2;flex-grow:1;padding-left:32px;width:100%;max-width:256px}.left-aside[data-v-39a288b8]{order:1;padding-left:unset;padding-right:32px}.aside-container[data-v-39a288b8]{position:fixed;top:0;padding-top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 48px);width:224px;height:100vh;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.aside-container[data-v-39a288b8]::-webkit-scrollbar{display:none}.aside-curtain[data-v-39a288b8]{position:fixed;bottom:0;z-index:10;width:224px;height:32px;background:linear-gradient(transparent,var(--vp-c-bg) 70%)}.aside-content[data-v-39a288b8]{display:flex;flex-direction:column;min-height:calc(100vh - (var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px));padding-bottom:32px}.content[data-v-39a288b8]{position:relative;margin:0 auto;width:100%}@media (min-width: 960px){.content[data-v-39a288b8]{padding:0 32px 128px}}@media (min-width: 1280px){.content[data-v-39a288b8]{order:1;margin:0;min-width:640px}}.content-container[data-v-39a288b8]{margin:0 auto}.VPDoc.has-aside .content-container[data-v-39a288b8]{max-width:688px}.VPButton[data-v-cad61b99]{display:inline-block;border:1px solid transparent;text-align:center;font-weight:600;white-space:nowrap;transition:color .25s,border-color .25s,background-color .25s}.VPButton[data-v-cad61b99]:active{transition:color .1s,border-color .1s,background-color .1s}.VPButton.medium[data-v-cad61b99]{border-radius:20px;padding:0 20px;line-height:38px;font-size:14px}.VPButton.big[data-v-cad61b99]{border-radius:24px;padding:0 24px;line-height:46px;font-size:16px}.VPButton.brand[data-v-cad61b99]{border-color:var(--vp-button-brand-border);color:var(--vp-button-brand-text);background-color:var(--vp-button-brand-bg)}.VPButton.brand[data-v-cad61b99]:hover{border-color:var(--vp-button-brand-hover-border);color:var(--vp-button-brand-hover-text);background-color:var(--vp-button-brand-hover-bg)}.VPButton.brand[data-v-cad61b99]:active{border-color:var(--vp-button-brand-active-border);color:var(--vp-button-brand-active-text);background-color:var(--vp-button-brand-active-bg)}.VPButton.alt[data-v-cad61b99]{border-color:var(--vp-button-alt-border);color:var(--vp-button-alt-text);background-color:var(--vp-button-alt-bg)}.VPButton.alt[data-v-cad61b99]:hover{border-color:var(--vp-button-alt-hover-border);color:var(--vp-button-alt-hover-text);background-color:var(--vp-button-alt-hover-bg)}.VPButton.alt[data-v-cad61b99]:active{border-color:var(--vp-button-alt-active-border);color:var(--vp-button-alt-active-text);background-color:var(--vp-button-alt-active-bg)}.VPButton.sponsor[data-v-cad61b99]{border-color:var(--vp-button-sponsor-border);color:var(--vp-button-sponsor-text);background-color:var(--vp-button-sponsor-bg)}.VPButton.sponsor[data-v-cad61b99]:hover{border-color:var(--vp-button-sponsor-hover-border);color:var(--vp-button-sponsor-hover-text);background-color:var(--vp-button-sponsor-hover-bg)}.VPButton.sponsor[data-v-cad61b99]:active{border-color:var(--vp-button-sponsor-active-border);color:var(--vp-button-sponsor-active-text);background-color:var(--vp-button-sponsor-active-bg)}html:not(.dark) .VPImage.dark[data-v-8426fc1a]{display:none}.dark .VPImage.light[data-v-8426fc1a]{display:none}.VPHero[data-v-303bb580]{margin-top:calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px}@media (min-width: 640px){.VPHero[data-v-303bb580]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px}}@media (min-width: 960px){.VPHero[data-v-303bb580]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px}}.container[data-v-303bb580]{display:flex;flex-direction:column;margin:0 auto;max-width:1152px}@media (min-width: 960px){.container[data-v-303bb580]{flex-direction:row}}.main[data-v-303bb580]{position:relative;z-index:10;order:2;flex-grow:1;flex-shrink:0}.VPHero.has-image .container[data-v-303bb580]{text-align:center}@media (min-width: 960px){.VPHero.has-image .container[data-v-303bb580]{text-align:left}}@media (min-width: 960px){.main[data-v-303bb580]{order:1;width:calc((100% / 3) * 2)}.VPHero.has-image .main[data-v-303bb580]{max-width:592px}}.name[data-v-303bb580],.text[data-v-303bb580]{max-width:392px;letter-spacing:-.4px;line-height:40px;font-size:32px;font-weight:700;white-space:pre-wrap}.VPHero.has-image .name[data-v-303bb580],.VPHero.has-image .text[data-v-303bb580]{margin:0 auto}.name[data-v-303bb580]{color:var(--vp-home-hero-name-color)}.clip[data-v-303bb580]{background:var(--vp-home-hero-name-background);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--vp-home-hero-name-color)}@media (min-width: 640px){.name[data-v-303bb580],.text[data-v-303bb580]{max-width:576px;line-height:56px;font-size:48px}}@media (min-width: 960px){.name[data-v-303bb580],.text[data-v-303bb580]{line-height:64px;font-size:56px}.VPHero.has-image .name[data-v-303bb580],.VPHero.has-image .text[data-v-303bb580]{margin:0}}.tagline[data-v-303bb580]{padding-top:8px;max-width:392px;line-height:28px;font-size:18px;font-weight:500;white-space:pre-wrap;color:var(--vp-c-text-2)}.VPHero.has-image .tagline[data-v-303bb580]{margin:0 auto}@media (min-width: 640px){.tagline[data-v-303bb580]{padding-top:12px;max-width:576px;line-height:32px;font-size:20px}}@media (min-width: 960px){.tagline[data-v-303bb580]{line-height:36px;font-size:24px}.VPHero.has-image .tagline[data-v-303bb580]{margin:0}}.actions[data-v-303bb580]{display:flex;flex-wrap:wrap;margin:-6px;padding-top:24px}.VPHero.has-image .actions[data-v-303bb580]{justify-content:center}@media (min-width: 640px){.actions[data-v-303bb580]{padding-top:32px}}@media (min-width: 960px){.VPHero.has-image .actions[data-v-303bb580]{justify-content:flex-start}}.action[data-v-303bb580]{flex-shrink:0;padding:6px}.image[data-v-303bb580]{order:1;margin:-76px -24px -48px}@media (min-width: 640px){.image[data-v-303bb580]{margin:-108px -24px -48px}}@media (min-width: 960px){.image[data-v-303bb580]{flex-grow:1;order:2;margin:0;min-height:100%}}.image-container[data-v-303bb580]{position:relative;margin:0 auto;width:320px;height:320px}@media (min-width: 640px){.image-container[data-v-303bb580]{width:392px;height:392px}}@media (min-width: 960px){.image-container[data-v-303bb580]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;transform:translate(-32px,-32px)}}.image-bg[data-v-303bb580]{position:absolute;top:50%;left:50%;border-radius:50%;width:192px;height:192px;background-image:var(--vp-home-hero-image-background-image);filter:var(--vp-home-hero-image-filter);transform:translate(-50%,-50%)}@media (min-width: 640px){.image-bg[data-v-303bb580]{width:256px;height:256px}}@media (min-width: 960px){.image-bg[data-v-303bb580]{width:320px;height:320px}}[data-v-303bb580] .image-src{position:absolute;top:50%;left:50%;max-width:192px;max-height:192px;transform:translate(-50%,-50%)}@media (min-width: 640px){[data-v-303bb580] .image-src{max-width:256px;max-height:256px}}@media (min-width: 960px){[data-v-303bb580] .image-src{max-width:320px;max-height:320px}}.VPFeature[data-v-a3976bdc]{display:block;border:1px solid var(--vp-c-bg-soft);border-radius:12px;height:100%;background-color:var(--vp-c-bg-soft);transition:border-color .25s,background-color .25s}.VPFeature.link[data-v-a3976bdc]:hover{border-color:var(--vp-c-brand-1)}.box[data-v-a3976bdc]{display:flex;flex-direction:column;padding:24px;height:100%}.box[data-v-a3976bdc]>.VPImage{margin-bottom:20px}.icon[data-v-a3976bdc]{display:flex;justify-content:center;align-items:center;margin-bottom:20px;border-radius:6px;background-color:var(--vp-c-default-soft);width:48px;height:48px;font-size:24px;transition:background-color .25s}.title[data-v-a3976bdc]{line-height:24px;font-size:16px;font-weight:600}.details[data-v-a3976bdc]{flex-grow:1;padding-top:8px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.link-text[data-v-a3976bdc]{padding-top:8px}.link-text-value[data-v-a3976bdc]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.link-text-icon[data-v-a3976bdc]{margin-left:6px}.VPFeatures[data-v-a6181336]{position:relative;padding:0 24px}@media (min-width: 640px){.VPFeatures[data-v-a6181336]{padding:0 48px}}@media (min-width: 960px){.VPFeatures[data-v-a6181336]{padding:0 64px}}.container[data-v-a6181336]{margin:0 auto;max-width:1152px}.items[data-v-a6181336]{display:flex;flex-wrap:wrap;margin:-8px}.item[data-v-a6181336]{padding:8px;width:100%}@media (min-width: 640px){.item.grid-2[data-v-a6181336],.item.grid-4[data-v-a6181336],.item.grid-6[data-v-a6181336]{width:50%}}@media (min-width: 768px){.item.grid-2[data-v-a6181336],.item.grid-4[data-v-a6181336]{width:50%}.item.grid-3[data-v-a6181336],.item.grid-6[data-v-a6181336]{width:calc(100% / 3)}}@media (min-width: 960px){.item.grid-4[data-v-a6181336]{width:25%}}.container[data-v-8e2d4988]{margin:auto;width:100%;max-width:1280px;padding:0 24px}@media (min-width: 640px){.container[data-v-8e2d4988]{padding:0 48px}}@media (min-width: 960px){.container[data-v-8e2d4988]{width:100%;padding:0 64px}}.vp-doc[data-v-8e2d4988] .VPHomeSponsors,.vp-doc[data-v-8e2d4988] .VPTeamPage{margin-left:var(--vp-offset, calc(50% - 50vw) );margin-right:var(--vp-offset, calc(50% - 50vw) )}.vp-doc[data-v-8e2d4988] .VPHomeSponsors h2{border-top:none;letter-spacing:normal}.vp-doc[data-v-8e2d4988] .VPHomeSponsors a,.vp-doc[data-v-8e2d4988] .VPTeamPage a{text-decoration:none}.VPHome[data-v-686f80a6]{margin-bottom:96px}@media (min-width: 768px){.VPHome[data-v-686f80a6]{margin-bottom:128px}}.VPContent[data-v-1428d186]{flex-grow:1;flex-shrink:0;margin:var(--vp-layout-top-height, 0px) auto 0;width:100%}.VPContent.is-home[data-v-1428d186]{width:100%;max-width:100%}.VPContent.has-sidebar[data-v-1428d186]{margin:0}@media (min-width: 960px){.VPContent[data-v-1428d186]{padding-top:var(--vp-nav-height)}.VPContent.has-sidebar[data-v-1428d186]{margin:var(--vp-layout-top-height, 0px) 0 0;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPContent.has-sidebar[data-v-1428d186]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.VPFooter[data-v-e315a0ad]{position:relative;z-index:var(--vp-z-index-footer);border-top:1px solid var(--vp-c-gutter);padding:32px 24px;background-color:var(--vp-c-bg)}.VPFooter.has-sidebar[data-v-e315a0ad]{display:none}.VPFooter[data-v-e315a0ad] a{text-decoration-line:underline;text-underline-offset:2px;transition:color .25s}.VPFooter[data-v-e315a0ad] a:hover{color:var(--vp-c-text-1)}@media (min-width: 768px){.VPFooter[data-v-e315a0ad]{padding:32px}}.container[data-v-e315a0ad]{margin:0 auto;max-width:var(--vp-layout-max-width);text-align:center}.message[data-v-e315a0ad],.copyright[data-v-e315a0ad]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.VPLocalNavOutlineDropdown[data-v-17a5e62e]{padding:12px 20px 11px}@media (min-width: 960px){.VPLocalNavOutlineDropdown[data-v-17a5e62e]{padding:12px 36px 11px}}.VPLocalNavOutlineDropdown button[data-v-17a5e62e]{display:block;font-size:12px;font-weight:500;line-height:24px;color:var(--vp-c-text-2);transition:color .5s;position:relative}.VPLocalNavOutlineDropdown button[data-v-17a5e62e]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPLocalNavOutlineDropdown button.open[data-v-17a5e62e]{color:var(--vp-c-text-1)}.icon[data-v-17a5e62e]{display:inline-block;vertical-align:middle;margin-left:2px;font-size:14px;transform:rotate(0);transition:transform .25s}@media (min-width: 960px){.VPLocalNavOutlineDropdown button[data-v-17a5e62e]{font-size:14px}.icon[data-v-17a5e62e]{font-size:16px}}.open>.icon[data-v-17a5e62e]{transform:rotate(90deg)}.items[data-v-17a5e62e]{position:absolute;top:40px;right:16px;left:16px;display:grid;gap:1px;border:1px solid var(--vp-c-border);border-radius:8px;background-color:var(--vp-c-gutter);max-height:calc(var(--vp-vh, 100vh) - 86px);overflow:hidden auto;box-shadow:var(--vp-shadow-3)}@media (min-width: 960px){.items[data-v-17a5e62e]{right:auto;left:calc(var(--vp-sidebar-width) + 32px);width:320px}}.header[data-v-17a5e62e]{background-color:var(--vp-c-bg-soft)}.top-link[data-v-17a5e62e]{display:block;padding:0 16px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.outline[data-v-17a5e62e]{padding:8px 0;background-color:var(--vp-c-bg-soft)}.flyout-enter-active[data-v-17a5e62e]{transition:all .2s ease-out}.flyout-leave-active[data-v-17a5e62e]{transition:all .15s ease-in}.flyout-enter-from[data-v-17a5e62e],.flyout-leave-to[data-v-17a5e62e]{opacity:0;transform:translateY(-16px)}.VPLocalNav[data-v-a6f0e41e]{position:sticky;top:0;left:0;z-index:var(--vp-z-index-local-nav);border-bottom:1px solid var(--vp-c-gutter);padding-top:var(--vp-layout-top-height, 0px);width:100%;background-color:var(--vp-local-nav-bg-color)}.VPLocalNav.fixed[data-v-a6f0e41e]{position:fixed}@media (min-width: 960px){.VPLocalNav[data-v-a6f0e41e]{top:var(--vp-nav-height)}.VPLocalNav.has-sidebar[data-v-a6f0e41e]{padding-left:var(--vp-sidebar-width)}.VPLocalNav.empty[data-v-a6f0e41e]{display:none}}@media (min-width: 1280px){.VPLocalNav[data-v-a6f0e41e]{display:none}}@media (min-width: 1440px){.VPLocalNav.has-sidebar[data-v-a6f0e41e]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.container[data-v-a6f0e41e]{display:flex;justify-content:space-between;align-items:center}.menu[data-v-a6f0e41e]{display:flex;align-items:center;padding:12px 24px 11px;line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.menu[data-v-a6f0e41e]:hover{color:var(--vp-c-text-1);transition:color .25s}@media (min-width: 768px){.menu[data-v-a6f0e41e]{padding:0 32px}}@media (min-width: 960px){.menu[data-v-a6f0e41e]{display:none}}.menu-icon[data-v-a6f0e41e]{margin-right:8px;font-size:14px}.VPOutlineDropdown[data-v-a6f0e41e]{padding:12px 24px 11px}@media (min-width: 768px){.VPOutlineDropdown[data-v-a6f0e41e]{padding:12px 32px 11px}}.VPSwitch[data-v-1d5665e3]{position:relative;border-radius:11px;display:block;width:40px;height:22px;flex-shrink:0;border:1px solid var(--vp-input-border-color);background-color:var(--vp-input-switch-bg-color);transition:border-color .25s!important}.VPSwitch[data-v-1d5665e3]:hover{border-color:var(--vp-c-brand-1)}.check[data-v-1d5665e3]{position:absolute;top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:var(--vp-c-neutral-inverse);box-shadow:var(--vp-shadow-1);transition:transform .25s!important}.icon[data-v-1d5665e3]{position:relative;display:block;width:18px;height:18px;border-radius:50%;overflow:hidden}.icon[data-v-1d5665e3] [class^=vpi-]{position:absolute;top:3px;left:3px;width:12px;height:12px;color:var(--vp-c-text-2)}.dark .icon[data-v-1d5665e3] [class^=vpi-]{color:var(--vp-c-text-1);transition:opacity .25s!important}.sun[data-v-d1f28634]{opacity:1}.moon[data-v-d1f28634],.dark .sun[data-v-d1f28634]{opacity:0}.dark .moon[data-v-d1f28634]{opacity:1}.dark .VPSwitchAppearance[data-v-d1f28634] .check{transform:translate(18px)}.VPNavBarAppearance[data-v-e6aabb21]{display:none}@media (min-width: 1280px){.VPNavBarAppearance[data-v-e6aabb21]{display:flex;align-items:center}}.VPMenuGroup+.VPMenuLink[data-v-43f1e123]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.link[data-v-43f1e123]{display:block;border-radius:6px;padding:0 12px;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);white-space:nowrap;transition:background-color .25s,color .25s}.link[data-v-43f1e123]:hover{color:var(--vp-c-brand-1);background-color:var(--vp-c-default-soft)}.link.active[data-v-43f1e123]{color:var(--vp-c-brand-1)}.VPMenuGroup[data-v-69e747b5]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.VPMenuGroup[data-v-69e747b5]:first-child{margin-top:0;border-top:0;padding-top:0}.VPMenuGroup+.VPMenuGroup[data-v-69e747b5]{margin-top:12px;border-top:1px solid var(--vp-c-divider)}.title[data-v-69e747b5]{padding:0 12px;line-height:32px;font-size:14px;font-weight:600;color:var(--vp-c-text-2);white-space:nowrap;transition:color .25s}.VPMenu[data-v-e7ea1737]{border-radius:12px;padding:12px;min-width:128px;border:1px solid var(--vp-c-divider);background-color:var(--vp-c-bg-elv);box-shadow:var(--vp-shadow-3);transition:background-color .5s;max-height:calc(100vh - var(--vp-nav-height));overflow-y:auto}.VPMenu[data-v-e7ea1737] .group{margin:0 -12px;padding:0 12px 12px}.VPMenu[data-v-e7ea1737] .group+.group{border-top:1px solid var(--vp-c-divider);padding:11px 12px 12px}.VPMenu[data-v-e7ea1737] .group:last-child{padding-bottom:0}.VPMenu[data-v-e7ea1737] .group+.item{border-top:1px solid var(--vp-c-divider);padding:11px 16px 0}.VPMenu[data-v-e7ea1737] .item{padding:0 16px;white-space:nowrap}.VPMenu[data-v-e7ea1737] .label{flex-grow:1;line-height:28px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.VPMenu[data-v-e7ea1737] .action{padding-left:24px}.VPFlyout[data-v-b6c34ac9]{position:relative}.VPFlyout[data-v-b6c34ac9]:hover{color:var(--vp-c-brand-1);transition:color .25s}.VPFlyout:hover .text[data-v-b6c34ac9]{color:var(--vp-c-text-2)}.VPFlyout:hover .icon[data-v-b6c34ac9]{fill:var(--vp-c-text-2)}.VPFlyout.active .text[data-v-b6c34ac9]{color:var(--vp-c-brand-1)}.VPFlyout.active:hover .text[data-v-b6c34ac9]{color:var(--vp-c-brand-2)}.VPFlyout:hover .menu[data-v-b6c34ac9],.button[aria-expanded=true]+.menu[data-v-b6c34ac9]{opacity:1;visibility:visible;transform:translateY(0)}.button[aria-expanded=false]+.menu[data-v-b6c34ac9]{opacity:0;visibility:hidden;transform:translateY(0)}.button[data-v-b6c34ac9]{display:flex;align-items:center;padding:0 12px;height:var(--vp-nav-height);color:var(--vp-c-text-1);transition:color .5s}.text[data-v-b6c34ac9]{display:flex;align-items:center;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.option-icon[data-v-b6c34ac9]{margin-right:0;font-size:16px}.text-icon[data-v-b6c34ac9]{margin-left:4px;font-size:14px}.icon[data-v-b6c34ac9]{font-size:20px;transition:fill .25s}.menu[data-v-b6c34ac9]{position:absolute;top:calc(var(--vp-nav-height) / 2 + 20px);right:0;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s,transform .25s}.VPSocialLink[data-v-eee4e7cb]{display:flex;justify-content:center;align-items:center;width:36px;height:36px;color:var(--vp-c-text-2);transition:color .5s}.VPSocialLink[data-v-eee4e7cb]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPSocialLink[data-v-eee4e7cb]>svg,.VPSocialLink[data-v-eee4e7cb]>[class^=vpi-social-]{width:20px;height:20px;fill:currentColor}.VPSocialLinks[data-v-7bc22406]{display:flex;justify-content:center}.VPNavBarExtra[data-v-d0bd9dde]{display:none;margin-right:-12px}@media (min-width: 768px){.VPNavBarExtra[data-v-d0bd9dde]{display:block}}@media (min-width: 1280px){.VPNavBarExtra[data-v-d0bd9dde]{display:none}}.trans-title[data-v-d0bd9dde]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.item.appearance[data-v-d0bd9dde],.item.social-links[data-v-d0bd9dde]{display:flex;align-items:center;padding:0 12px}.item.appearance[data-v-d0bd9dde]{min-width:176px}.appearance-action[data-v-d0bd9dde]{margin-right:-2px}.social-links-list[data-v-d0bd9dde]{margin:-4px -8px}.VPNavBarHamburger[data-v-e5dd9c1c]{display:flex;justify-content:center;align-items:center;width:48px;height:var(--vp-nav-height)}@media (min-width: 768px){.VPNavBarHamburger[data-v-e5dd9c1c]{display:none}}.container[data-v-e5dd9c1c]{position:relative;width:16px;height:14px;overflow:hidden}.VPNavBarHamburger:hover .top[data-v-e5dd9c1c]{top:0;left:0;transform:translate(4px)}.VPNavBarHamburger:hover .middle[data-v-e5dd9c1c]{top:6px;left:0;transform:translate(0)}.VPNavBarHamburger:hover .bottom[data-v-e5dd9c1c]{top:12px;left:0;transform:translate(8px)}.VPNavBarHamburger.active .top[data-v-e5dd9c1c]{top:6px;transform:translate(0) rotate(225deg)}.VPNavBarHamburger.active .middle[data-v-e5dd9c1c]{top:6px;transform:translate(16px)}.VPNavBarHamburger.active .bottom[data-v-e5dd9c1c]{top:6px;transform:translate(0) rotate(135deg)}.VPNavBarHamburger.active:hover .top[data-v-e5dd9c1c],.VPNavBarHamburger.active:hover .middle[data-v-e5dd9c1c],.VPNavBarHamburger.active:hover .bottom[data-v-e5dd9c1c]{background-color:var(--vp-c-text-2);transition:top .25s,background-color .25s,transform .25s}.top[data-v-e5dd9c1c],.middle[data-v-e5dd9c1c],.bottom[data-v-e5dd9c1c]{position:absolute;width:16px;height:2px;background-color:var(--vp-c-text-1);transition:top .25s,background-color .5s,transform .25s}.top[data-v-e5dd9c1c]{top:0;left:0;transform:translate(0)}.middle[data-v-e5dd9c1c]{top:6px;left:0;transform:translate(8px)}.bottom[data-v-e5dd9c1c]{top:12px;left:0;transform:translate(4px)}.VPNavBarMenuLink[data-v-9c663999]{display:flex;align-items:center;padding:0 12px;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.VPNavBarMenuLink.active[data-v-9c663999],.VPNavBarMenuLink[data-v-9c663999]:hover{color:var(--vp-c-brand-1)}.VPNavBarMenu[data-v-7f418b0f]{display:none}@media (min-width: 768px){.VPNavBarMenu[data-v-7f418b0f]{display:flex}}/*! @docsearch/css 3.6.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 rgba(3,4,9,.30196078431372547);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;position:relative;padding:0 0 2px;border:0;top:-1px;width:20px}.DocSearch-Button-Key--pressed{transform:translate3d(0,1px,0);box-shadow:var(--docsearch-key-pressed-shadow)}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:2px;box-shadow:var(--docsearch-key-shadow);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;color:var(--docsearch-muted-color);border:0;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[class*=DocSearch]{--docsearch-primary-color: var(--vp-c-brand-1);--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-text-color: var(--vp-c-text-1);--docsearch-muted-color: var(--vp-c-text-2);--docsearch-searchbox-shadow: none;--docsearch-searchbox-background: transparent;--docsearch-searchbox-focus-background: transparent;--docsearch-key-gradient: transparent;--docsearch-key-shadow: none;--docsearch-modal-background: var(--vp-c-bg-soft);--docsearch-footer-background: var(--vp-c-bg)}.dark [class*=DocSearch]{--docsearch-modal-shadow: none;--docsearch-footer-shadow: none;--docsearch-logo-color: var(--vp-c-text-2);--docsearch-hit-background: var(--vp-c-default-soft);--docsearch-hit-color: var(--vp-c-text-2);--docsearch-hit-shadow: none}.DocSearch-Button{display:flex;justify-content:center;align-items:center;margin:0;padding:0;width:48px;height:55px;background:transparent;transition:border-color .25s}.DocSearch-Button:hover{background:transparent}.DocSearch-Button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.DocSearch-Button-Key--pressed{transform:none;box-shadow:none}.DocSearch-Button:focus:not(:focus-visible){outline:none!important}@media (min-width: 768px){.DocSearch-Button{justify-content:flex-start;border:1px solid transparent;border-radius:8px;padding:0 10px 0 12px;width:100%;height:40px;background-color:var(--vp-c-bg-alt)}.DocSearch-Button:hover{border-color:var(--vp-c-brand-1);background:var(--vp-c-bg-alt)}}.DocSearch-Button .DocSearch-Button-Container{display:flex;align-items:center}.DocSearch-Button .DocSearch-Search-Icon{position:relative;width:16px;height:16px;color:var(--vp-c-text-1);fill:currentColor;transition:color .5s}.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Search-Icon{top:1px;margin-right:8px;width:14px;height:14px;color:var(--vp-c-text-2)}}.DocSearch-Button .DocSearch-Button-Placeholder{display:none;margin-top:2px;padding:0 16px 0 0;font-size:13px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.DocSearch-Button:hover .DocSearch-Button-Placeholder{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Placeholder{display:inline-block}}.DocSearch-Button .DocSearch-Button-Keys{direction:ltr;display:none;min-width:auto}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Keys{display:flex;align-items:center}}.DocSearch-Button .DocSearch-Button-Key{display:block;margin:2px 0 0;border:1px solid var(--vp-c-divider);border-right:none;border-radius:4px 0 0 4px;padding-left:6px;min-width:0;width:auto;height:22px;line-height:22px;font-family:var(--vp-font-family-base);font-size:12px;font-weight:500;transition:color .5s,border-color .5s}.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key{border-right:1px solid var(--vp-c-divider);border-left:none;border-radius:0 4px 4px 0;padding-left:2px;padding-right:6px}.DocSearch-Button .DocSearch-Button-Key:first-child{font-size:0!important}.DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"Ctrl";font-size:12px;letter-spacing:normal;color:var(--docsearch-muted-color)}.mac .DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"⌘"}.DocSearch-Button .DocSearch-Button-Key:first-child>*{display:none}.DocSearch-Search-Icon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke-width='1.6' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='m14.386 14.386 4.088 4.088-4.088-4.088A7.533 7.533 0 1 1 3.733 3.733a7.533 7.533 0 0 1 10.653 10.653z'/%3E%3C/svg%3E")}.VPNavBarSearch{display:flex;align-items:center}@media (min-width: 768px){.VPNavBarSearch{flex-grow:1;padding-left:24px}}@media (min-width: 960px){.VPNavBarSearch{padding-left:32px}}.dark .DocSearch-Footer{border-top:1px solid var(--vp-c-divider)}.DocSearch-Form{border:1px solid var(--vp-c-brand-1);background-color:var(--vp-c-white)}.dark .DocSearch-Form{background-color:var(--vp-c-default-soft)}.DocSearch-Screen-Icon>svg{margin:auto}.VPNavBarSocialLinks[data-v-0394ad82]{display:none}@media (min-width: 1280px){.VPNavBarSocialLinks[data-v-0394ad82]{display:flex;align-items:center}}.title[data-v-ab179fa1]{display:flex;align-items:center;border-bottom:1px solid transparent;width:100%;height:var(--vp-nav-height);font-size:16px;font-weight:600;color:var(--vp-c-text-1);transition:opacity .25s}@media (min-width: 960px){.title[data-v-ab179fa1]{flex-shrink:0}.VPNavBarTitle.has-sidebar .title[data-v-ab179fa1]{border-bottom-color:var(--vp-c-divider)}}[data-v-ab179fa1] .logo{margin-right:8px;height:var(--vp-nav-logo-height)}.VPNavBarTranslations[data-v-88af2de4]{display:none}@media (min-width: 1280px){.VPNavBarTranslations[data-v-88af2de4]{display:flex;align-items:center}}.title[data-v-88af2de4]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.VPNavBar[data-v-ccf7ddec]{position:relative;height:var(--vp-nav-height);pointer-events:none;white-space:nowrap;transition:background-color .5s}.VPNavBar[data-v-ccf7ddec]:not(.home){background-color:var(--vp-nav-bg-color)}@media (min-width: 960px){.VPNavBar[data-v-ccf7ddec]:not(.home){background-color:transparent}.VPNavBar[data-v-ccf7ddec]:not(.has-sidebar):not(.home.top){background-color:var(--vp-nav-bg-color)}}.wrapper[data-v-ccf7ddec]{padding:0 8px 0 24px}@media (min-width: 768px){.wrapper[data-v-ccf7ddec]{padding:0 32px}}@media (min-width: 960px){.VPNavBar.has-sidebar .wrapper[data-v-ccf7ddec]{padding:0}}.container[data-v-ccf7ddec]{display:flex;justify-content:space-between;margin:0 auto;max-width:calc(var(--vp-layout-max-width) - 64px);height:var(--vp-nav-height);pointer-events:none}.container>.title[data-v-ccf7ddec],.container>.content[data-v-ccf7ddec]{pointer-events:none}.container[data-v-ccf7ddec] *{pointer-events:auto}@media (min-width: 960px){.VPNavBar.has-sidebar .container[data-v-ccf7ddec]{max-width:100%}}.title[data-v-ccf7ddec]{flex-shrink:0;height:calc(var(--vp-nav-height) - 1px);transition:background-color .5s}@media (min-width: 960px){.VPNavBar.has-sidebar .title[data-v-ccf7ddec]{position:absolute;top:0;left:0;z-index:2;padding:0 32px;width:var(--vp-sidebar-width);height:var(--vp-nav-height);background-color:transparent}}@media (min-width: 1440px){.VPNavBar.has-sidebar .title[data-v-ccf7ddec]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}.content[data-v-ccf7ddec]{flex-grow:1}@media (min-width: 960px){.VPNavBar.has-sidebar .content[data-v-ccf7ddec]{position:relative;z-index:1;padding-right:32px;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .content[data-v-ccf7ddec]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.content-body[data-v-ccf7ddec]{display:flex;justify-content:flex-end;align-items:center;height:var(--vp-nav-height);transition:background-color .5s}@media (min-width: 960px){.VPNavBar:not(.home.top) .content-body[data-v-ccf7ddec]{position:relative;background-color:var(--vp-nav-bg-color)}.VPNavBar:not(.has-sidebar):not(.home.top) .content-body[data-v-ccf7ddec]{background-color:transparent}}@media (max-width: 767px){.content-body[data-v-ccf7ddec]{column-gap:.5rem}}.menu+.translations[data-v-ccf7ddec]:before,.menu+.appearance[data-v-ccf7ddec]:before,.menu+.social-links[data-v-ccf7ddec]:before,.translations+.appearance[data-v-ccf7ddec]:before,.appearance+.social-links[data-v-ccf7ddec]:before{margin-right:8px;margin-left:8px;width:1px;height:24px;background-color:var(--vp-c-divider);content:""}.menu+.appearance[data-v-ccf7ddec]:before,.translations+.appearance[data-v-ccf7ddec]:before{margin-right:16px}.appearance+.social-links[data-v-ccf7ddec]:before{margin-left:16px}.social-links[data-v-ccf7ddec]{margin-right:-8px}.divider[data-v-ccf7ddec]{width:100%;height:1px}@media (min-width: 960px){.VPNavBar.has-sidebar .divider[data-v-ccf7ddec]{padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .divider[data-v-ccf7ddec]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.divider-line[data-v-ccf7ddec]{width:100%;height:1px;transition:background-color .5s}.VPNavBar:not(.home) .divider-line[data-v-ccf7ddec]{background-color:var(--vp-c-gutter)}@media (min-width: 960px){.VPNavBar:not(.home.top) .divider-line[data-v-ccf7ddec]{background-color:var(--vp-c-gutter)}.VPNavBar:not(.has-sidebar):not(.home.top) .divider[data-v-ccf7ddec]{background-color:var(--vp-c-gutter)}}.VPNavScreenAppearance[data-v-2d7af913]{display:flex;justify-content:space-between;align-items:center;border-radius:8px;padding:12px 14px 12px 16px;background-color:var(--vp-c-bg-soft)}.text[data-v-2d7af913]{line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.VPNavScreenMenuLink[data-v-7f31e1f6]{display:block;border-bottom:1px solid var(--vp-c-divider);padding:12px 0 11px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:border-color .25s,color .25s}.VPNavScreenMenuLink[data-v-7f31e1f6]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupLink[data-v-19976ae1]{display:block;margin-left:12px;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-1);transition:color .25s}.VPNavScreenMenuGroupLink[data-v-19976ae1]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupSection[data-v-8133b170]{display:block}.title[data-v-8133b170]{line-height:32px;font-size:13px;font-weight:700;color:var(--vp-c-text-2);transition:color .25s}.VPNavScreenMenuGroup[data-v-ff6087d4]{border-bottom:1px solid var(--vp-c-divider);height:48px;overflow:hidden;transition:border-color .5s}.VPNavScreenMenuGroup .items[data-v-ff6087d4]{visibility:hidden}.VPNavScreenMenuGroup.open .items[data-v-ff6087d4]{visibility:visible}.VPNavScreenMenuGroup.open[data-v-ff6087d4]{padding-bottom:10px;height:auto}.VPNavScreenMenuGroup.open .button[data-v-ff6087d4]{padding-bottom:6px;color:var(--vp-c-brand-1)}.VPNavScreenMenuGroup.open .button-icon[data-v-ff6087d4]{transform:rotate(45deg)}.button[data-v-ff6087d4]{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 11px 0;width:100%;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.button[data-v-ff6087d4]:hover{color:var(--vp-c-brand-1)}.button-icon[data-v-ff6087d4]{transition:transform .25s}.group[data-v-ff6087d4]:first-child{padding-top:0}.group+.group[data-v-ff6087d4],.group+.item[data-v-ff6087d4]{padding-top:4px}.VPNavScreenTranslations[data-v-858fe1a4]{height:24px;overflow:hidden}.VPNavScreenTranslations.open[data-v-858fe1a4]{height:auto}.title[data-v-858fe1a4]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-text-1)}.icon[data-v-858fe1a4]{font-size:16px}.icon.lang[data-v-858fe1a4]{margin-right:8px}.icon.chevron[data-v-858fe1a4]{margin-left:4px}.list[data-v-858fe1a4]{padding:4px 0 0 24px}.link[data-v-858fe1a4]{line-height:32px;font-size:13px;color:var(--vp-c-text-1)}.VPNavScreen[data-v-cc5739dd]{position:fixed;top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 1px);right:0;bottom:0;left:0;padding:0 32px;width:100%;background-color:var(--vp-nav-screen-bg-color);overflow-y:auto;transition:background-color .5s;pointer-events:auto}.VPNavScreen.fade-enter-active[data-v-cc5739dd],.VPNavScreen.fade-leave-active[data-v-cc5739dd]{transition:opacity .25s}.VPNavScreen.fade-enter-active .container[data-v-cc5739dd],.VPNavScreen.fade-leave-active .container[data-v-cc5739dd]{transition:transform .25s ease}.VPNavScreen.fade-enter-from[data-v-cc5739dd],.VPNavScreen.fade-leave-to[data-v-cc5739dd]{opacity:0}.VPNavScreen.fade-enter-from .container[data-v-cc5739dd],.VPNavScreen.fade-leave-to .container[data-v-cc5739dd]{transform:translateY(-8px)}@media (min-width: 768px){.VPNavScreen[data-v-cc5739dd]{display:none}}.container[data-v-cc5739dd]{margin:0 auto;padding:24px 0 96px;max-width:288px}.menu+.translations[data-v-cc5739dd],.menu+.appearance[data-v-cc5739dd],.translations+.appearance[data-v-cc5739dd]{margin-top:24px}.menu+.social-links[data-v-cc5739dd]{margin-top:16px}.appearance+.social-links[data-v-cc5739dd]{margin-top:16px}.VPNav[data-v-ae24b3ad]{position:relative;top:var(--vp-layout-top-height, 0px);left:0;z-index:var(--vp-z-index-nav);width:100%;pointer-events:none;transition:background-color .5s}@media (min-width: 960px){.VPNav[data-v-ae24b3ad]{position:fixed}}.VPSidebarItem.level-0[data-v-b8d55f3b]{padding-bottom:24px}.VPSidebarItem.collapsed.level-0[data-v-b8d55f3b]{padding-bottom:10px}.item[data-v-b8d55f3b]{position:relative;display:flex;width:100%}.VPSidebarItem.collapsible>.item[data-v-b8d55f3b]{cursor:pointer}.indicator[data-v-b8d55f3b]{position:absolute;top:6px;bottom:6px;left:-17px;width:2px;border-radius:2px;transition:background-color .25s}.VPSidebarItem.level-2.is-active>.item>.indicator[data-v-b8d55f3b],.VPSidebarItem.level-3.is-active>.item>.indicator[data-v-b8d55f3b],.VPSidebarItem.level-4.is-active>.item>.indicator[data-v-b8d55f3b],.VPSidebarItem.level-5.is-active>.item>.indicator[data-v-b8d55f3b]{background-color:var(--vp-c-brand-1)}.link[data-v-b8d55f3b]{display:flex;align-items:center;flex-grow:1}.text[data-v-b8d55f3b]{flex-grow:1;padding:4px 0;line-height:24px;font-size:14px;transition:color .25s}.VPSidebarItem.level-0 .text[data-v-b8d55f3b]{font-weight:700;color:var(--vp-c-text-1)}.VPSidebarItem.level-1 .text[data-v-b8d55f3b],.VPSidebarItem.level-2 .text[data-v-b8d55f3b],.VPSidebarItem.level-3 .text[data-v-b8d55f3b],.VPSidebarItem.level-4 .text[data-v-b8d55f3b],.VPSidebarItem.level-5 .text[data-v-b8d55f3b]{font-weight:500;color:var(--vp-c-text-2)}.VPSidebarItem.level-0.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-1.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-2.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-3.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-4.is-link>.item>.link:hover .text[data-v-b8d55f3b],.VPSidebarItem.level-5.is-link>.item>.link:hover .text[data-v-b8d55f3b]{color:var(--vp-c-brand-1)}.VPSidebarItem.level-0.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-1.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-2.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-3.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-4.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-5.has-active>.item>.text[data-v-b8d55f3b],.VPSidebarItem.level-0.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-1.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-2.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-3.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-4.has-active>.item>.link>.text[data-v-b8d55f3b],.VPSidebarItem.level-5.has-active>.item>.link>.text[data-v-b8d55f3b]{color:var(--vp-c-text-1)}.VPSidebarItem.level-0.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-1.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-2.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-3.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-4.is-active>.item .link>.text[data-v-b8d55f3b],.VPSidebarItem.level-5.is-active>.item .link>.text[data-v-b8d55f3b]{color:var(--vp-c-brand-1)}.caret[data-v-b8d55f3b]{display:flex;justify-content:center;align-items:center;margin-right:-7px;width:32px;height:32px;color:var(--vp-c-text-3);cursor:pointer;transition:color .25s;flex-shrink:0}.item:hover .caret[data-v-b8d55f3b]{color:var(--vp-c-text-2)}.item:hover .caret[data-v-b8d55f3b]:hover{color:var(--vp-c-text-1)}.caret-icon[data-v-b8d55f3b]{font-size:18px;transform:rotate(90deg);transition:transform .25s}.VPSidebarItem.collapsed .caret-icon[data-v-b8d55f3b]{transform:rotate(0)}.VPSidebarItem.level-1 .items[data-v-b8d55f3b],.VPSidebarItem.level-2 .items[data-v-b8d55f3b],.VPSidebarItem.level-3 .items[data-v-b8d55f3b],.VPSidebarItem.level-4 .items[data-v-b8d55f3b],.VPSidebarItem.level-5 .items[data-v-b8d55f3b]{border-left:1px solid var(--vp-c-divider);padding-left:16px}.VPSidebarItem.collapsed .items[data-v-b8d55f3b]{display:none}.VPSidebar[data-v-575e6a36]{position:fixed;top:var(--vp-layout-top-height, 0px);bottom:0;left:0;z-index:var(--vp-z-index-sidebar);padding:32px 32px 96px;width:calc(100vw - 64px);max-width:320px;background-color:var(--vp-sidebar-bg-color);opacity:0;box-shadow:var(--vp-c-shadow-3);overflow-x:hidden;overflow-y:auto;transform:translate(-100%);transition:opacity .5s,transform .25s ease;overscroll-behavior:contain}.VPSidebar.open[data-v-575e6a36]{opacity:1;visibility:visible;transform:translate(0);transition:opacity .25s,transform .5s cubic-bezier(.19,1,.22,1)}.dark .VPSidebar[data-v-575e6a36]{box-shadow:var(--vp-shadow-1)}@media (min-width: 960px){.VPSidebar[data-v-575e6a36]{padding-top:var(--vp-nav-height);width:var(--vp-sidebar-width);max-width:100%;background-color:var(--vp-sidebar-bg-color);opacity:1;visibility:visible;box-shadow:none;transform:translate(0)}}@media (min-width: 1440px){.VPSidebar[data-v-575e6a36]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}@media (min-width: 960px){.curtain[data-v-575e6a36]{position:sticky;top:-64px;left:0;z-index:1;margin-top:calc(var(--vp-nav-height) * -1);margin-right:-32px;margin-left:-32px;height:var(--vp-nav-height);background-color:var(--vp-sidebar-bg-color)}}.nav[data-v-575e6a36]{outline:0}.group+.group[data-v-575e6a36]{border-top:1px solid var(--vp-c-divider);padding-top:10px}@media (min-width: 960px){.group[data-v-575e6a36]{padding-top:10px;width:calc(var(--vp-sidebar-width) - 64px)}}.VPSkipLink[data-v-0f60ec36]{top:8px;left:8px;padding:8px 16px;z-index:999;border-radius:8px;font-size:12px;font-weight:700;text-decoration:none;color:var(--vp-c-brand-1);box-shadow:var(--vp-shadow-3);background-color:var(--vp-c-bg)}.VPSkipLink[data-v-0f60ec36]:focus{height:auto;width:auto;clip:auto;clip-path:none}@media (min-width: 1280px){.VPSkipLink[data-v-0f60ec36]{top:14px;left:16px}}.Layout[data-v-5d98c3a5]{display:flex;flex-direction:column;min-height:100vh}.VPHomeSponsors[data-v-3d121b4a]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPHomeSponsors[data-v-3d121b4a]{margin:96px 0}@media (min-width: 768px){.VPHomeSponsors[data-v-3d121b4a]{margin:128px 0}}.VPHomeSponsors[data-v-3d121b4a]{padding:0 24px}@media (min-width: 768px){.VPHomeSponsors[data-v-3d121b4a]{padding:0 48px}}@media (min-width: 960px){.VPHomeSponsors[data-v-3d121b4a]{padding:0 64px}}.container[data-v-3d121b4a]{margin:0 auto;max-width:1152px}.love[data-v-3d121b4a]{margin:0 auto;width:fit-content;font-size:28px;color:var(--vp-c-text-3)}.icon[data-v-3d121b4a]{display:inline-block}.message[data-v-3d121b4a]{margin:0 auto;padding-top:10px;max-width:320px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.sponsors[data-v-3d121b4a]{padding-top:32px}.action[data-v-3d121b4a]{padding-top:40px;text-align:center}.VPTeamPage[data-v-7c57f839]{margin:96px 0}@media (min-width: 768px){.VPTeamPage[data-v-7c57f839]{margin:128px 0}}.VPHome .VPTeamPageTitle[data-v-7c57f839-s]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPTeamPageSection+.VPTeamPageSection[data-v-7c57f839-s],.VPTeamMembers+.VPTeamPageSection[data-v-7c57f839-s]{margin-top:64px}.VPTeamMembers+.VPTeamMembers[data-v-7c57f839-s]{margin-top:24px}@media (min-width: 768px){.VPTeamPageTitle+.VPTeamPageSection[data-v-7c57f839-s]{margin-top:16px}.VPTeamPageSection+.VPTeamPageSection[data-v-7c57f839-s],.VPTeamMembers+.VPTeamPageSection[data-v-7c57f839-s]{margin-top:96px}}.VPTeamMembers[data-v-7c57f839-s]{padding:0 24px}@media (min-width: 768px){.VPTeamMembers[data-v-7c57f839-s]{padding:0 48px}}@media (min-width: 960px){.VPTeamMembers[data-v-7c57f839-s]{padding:0 64px}}.VPTeamPageTitle[data-v-bf2cbdac]{padding:48px 32px;text-align:center}@media (min-width: 768px){.VPTeamPageTitle[data-v-bf2cbdac]{padding:64px 48px 48px}}@media (min-width: 960px){.VPTeamPageTitle[data-v-bf2cbdac]{padding:80px 64px 48px}}.title[data-v-bf2cbdac]{letter-spacing:0;line-height:44px;font-size:36px;font-weight:500}@media (min-width: 768px){.title[data-v-bf2cbdac]{letter-spacing:-.5px;line-height:56px;font-size:48px}}.lead[data-v-bf2cbdac]{margin:0 auto;max-width:512px;padding-top:12px;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 768px){.lead[data-v-bf2cbdac]{max-width:592px;letter-spacing:.15px;line-height:28px;font-size:20px}}.VPTeamPageSection[data-v-b1a88750]{padding:0 32px}@media (min-width: 768px){.VPTeamPageSection[data-v-b1a88750]{padding:0 48px}}@media (min-width: 960px){.VPTeamPageSection[data-v-b1a88750]{padding:0 64px}}.title[data-v-b1a88750]{position:relative;margin:0 auto;max-width:1152px;text-align:center;color:var(--vp-c-text-2)}.title-line[data-v-b1a88750]{position:absolute;top:16px;left:0;width:100%;height:1px;background-color:var(--vp-c-divider)}.title-text[data-v-b1a88750]{position:relative;display:inline-block;padding:0 24px;letter-spacing:0;line-height:32px;font-size:20px;font-weight:500;background-color:var(--vp-c-bg)}.lead[data-v-b1a88750]{margin:0 auto;max-width:480px;padding-top:12px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.members[data-v-b1a88750]{padding-top:40px}.VPTeamMembersItem[data-v-f3fa364a]{display:flex;flex-direction:column;gap:2px;border-radius:12px;width:100%;height:100%;overflow:hidden}.VPTeamMembersItem.small .profile[data-v-f3fa364a]{padding:32px}.VPTeamMembersItem.small .data[data-v-f3fa364a]{padding-top:20px}.VPTeamMembersItem.small .avatar[data-v-f3fa364a]{width:64px;height:64px}.VPTeamMembersItem.small .name[data-v-f3fa364a]{line-height:24px;font-size:16px}.VPTeamMembersItem.small .affiliation[data-v-f3fa364a]{padding-top:4px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .desc[data-v-f3fa364a]{padding-top:12px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .links[data-v-f3fa364a]{margin:0 -16px -20px;padding:10px 0 0}.VPTeamMembersItem.medium .profile[data-v-f3fa364a]{padding:48px 32px}.VPTeamMembersItem.medium .data[data-v-f3fa364a]{padding-top:24px;text-align:center}.VPTeamMembersItem.medium .avatar[data-v-f3fa364a]{width:96px;height:96px}.VPTeamMembersItem.medium .name[data-v-f3fa364a]{letter-spacing:.15px;line-height:28px;font-size:20px}.VPTeamMembersItem.medium .affiliation[data-v-f3fa364a]{padding-top:4px;font-size:16px}.VPTeamMembersItem.medium .desc[data-v-f3fa364a]{padding-top:16px;max-width:288px;font-size:16px}.VPTeamMembersItem.medium .links[data-v-f3fa364a]{margin:0 -16px -12px;padding:16px 12px 0}.profile[data-v-f3fa364a]{flex-grow:1;background-color:var(--vp-c-bg-soft)}.data[data-v-f3fa364a]{text-align:center}.avatar[data-v-f3fa364a]{position:relative;flex-shrink:0;margin:0 auto;border-radius:50%;box-shadow:var(--vp-shadow-3)}.avatar-img[data-v-f3fa364a]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;object-fit:cover}.name[data-v-f3fa364a]{margin:0;font-weight:600}.affiliation[data-v-f3fa364a]{margin:0;font-weight:500;color:var(--vp-c-text-2)}.org.link[data-v-f3fa364a]{color:var(--vp-c-text-2);transition:color .25s}.org.link[data-v-f3fa364a]:hover{color:var(--vp-c-brand-1)}.desc[data-v-f3fa364a]{margin:0 auto}.desc[data-v-f3fa364a] a{font-weight:500;color:var(--vp-c-brand-1);text-decoration-style:dotted;transition:color .25s}.links[data-v-f3fa364a]{display:flex;justify-content:center;height:56px}.sp-link[data-v-f3fa364a]{display:flex;justify-content:center;align-items:center;text-align:center;padding:16px;font-size:14px;font-weight:500;color:var(--vp-c-sponsor);background-color:var(--vp-c-bg-soft);transition:color .25s,background-color .25s}.sp .sp-link.link[data-v-f3fa364a]:hover,.sp .sp-link.link[data-v-f3fa364a]:focus{outline:none;color:var(--vp-c-white);background-color:var(--vp-c-sponsor)}.sp-icon[data-v-f3fa364a]{margin-right:8px;font-size:16px}.VPTeamMembers.small .container[data-v-6cb0dbc4]{grid-template-columns:repeat(auto-fit,minmax(224px,1fr))}.VPTeamMembers.small.count-1 .container[data-v-6cb0dbc4]{max-width:276px}.VPTeamMembers.small.count-2 .container[data-v-6cb0dbc4]{max-width:576px}.VPTeamMembers.small.count-3 .container[data-v-6cb0dbc4]{max-width:876px}.VPTeamMembers.medium .container[data-v-6cb0dbc4]{grid-template-columns:repeat(auto-fit,minmax(256px,1fr))}@media (min-width: 375px){.VPTeamMembers.medium .container[data-v-6cb0dbc4]{grid-template-columns:repeat(auto-fit,minmax(288px,1fr))}}.VPTeamMembers.medium.count-1 .container[data-v-6cb0dbc4]{max-width:368px}.VPTeamMembers.medium.count-2 .container[data-v-6cb0dbc4]{max-width:760px}.container[data-v-6cb0dbc4]{display:grid;gap:24px;margin:0 auto;max-width:1152px} diff --git a/assets/style.ac216bba.css b/assets/style.ac216bba.css deleted file mode 100644 index 4f0e21cf..00000000 --- a/assets/style.ac216bba.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:normal;font-named-instance:"Regular";src:url(/assets/inter-roman-cyrillic.5f2c6c8c.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:normal;font-named-instance:"Regular";src:url(/assets/inter-roman-cyrillic-ext.e75737ce.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:normal;font-named-instance:"Regular";src:url(/assets/inter-roman-greek.d5a6d92a.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:normal;font-named-instance:"Regular";src:url(/assets/inter-roman-greek-ext.ab0619bc.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:normal;font-named-instance:"Regular";src:url(/assets/inter-roman-latin.2ed14f66.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:normal;font-named-instance:"Regular";src:url(/assets/inter-roman-latin-ext.0030eebd.woff2) format("woff2");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:normal;font-named-instance:"Regular";src:url(/assets/inter-roman-vietnamese.14ce25a6.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:italic;font-named-instance:"Italic";src:url(/assets/inter-italic-cyrillic.ea42a392.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:italic;font-named-instance:"Italic";src:url(/assets/inter-italic-cyrillic-ext.33bd5a8e.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:italic;font-named-instance:"Italic";src:url(/assets/inter-italic-greek.8f4463c4.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:italic;font-named-instance:"Italic";src:url(/assets/inter-italic-greek-ext.4fbe9427.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:italic;font-named-instance:"Italic";src:url(/assets/inter-italic-latin.bd3b6f56.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:italic;font-named-instance:"Italic";src:url(/assets/inter-italic-latin-ext.bd8920cc.woff2) format("woff2");unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter var;font-weight:100 900;font-display:swap;font-style:italic;font-named-instance:"Italic";src:url(/assets/inter-italic-vietnamese.6ce511fb.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB}@font-face{font-family:Chinese Quotes;src:local("PingFang SC Regular"),local("PingFang SC"),local("SimHei"),local("Source Han Sans SC");unicode-range:U+2018,U+2019,U+201C,U+201D}:root{--vp-c-white: #ffffff;--vp-c-black: #000000;--vp-c-gray: #8e8e93;--vp-c-text-light-1: rgba(60, 60, 67);--vp-c-text-light-2: rgba(60, 60, 67, .75);--vp-c-text-light-3: rgba(60, 60, 67, .33);--vp-c-text-dark-1: rgba(255, 255, 245, .86);--vp-c-text-dark-2: rgba(235, 235, 245, .6);--vp-c-text-dark-3: rgba(235, 235, 245, .38);--vp-c-green: #10b981;--vp-c-green-light: #34d399;--vp-c-green-lighter: #6ee7b7;--vp-c-green-dark: #059669;--vp-c-green-darker: #047857;--vp-c-green-dimm-1: rgba(16, 185, 129, .05);--vp-c-green-dimm-2: rgba(16, 185, 129, .2);--vp-c-green-dimm-3: rgba(16, 185, 129, .5);--vp-c-yellow: #d97706;--vp-c-yellow-light: #f59e0b;--vp-c-yellow-lighter: #fbbf24;--vp-c-yellow-dark: #b45309;--vp-c-yellow-darker: #92400e;--vp-c-yellow-dimm-1: rgba(234, 179, 8, .05);--vp-c-yellow-dimm-2: rgba(234, 179, 8, .2);--vp-c-yellow-dimm-3: rgba(234, 179, 8, .5);--vp-c-red: #f43f5e;--vp-c-red-light: #fb7185;--vp-c-red-lighter: #fda4af;--vp-c-red-dark: #e11d48;--vp-c-red-darker: #be123c;--vp-c-red-dimm-1: rgba(244, 63, 94, .05);--vp-c-red-dimm-2: rgba(244, 63, 94, .2);--vp-c-red-dimm-3: rgba(244, 63, 94, .5);--vp-c-sponsor: #db2777}:root{--vp-c-bg: #ffffff;--vp-c-bg-elv: #ffffff;--vp-c-bg-elv-up: #ffffff;--vp-c-bg-elv-down: #f6f6f7;--vp-c-bg-elv-mute: #f6f6f7;--vp-c-bg-soft: #f6f6f7;--vp-c-bg-soft-up: #f9f9fa;--vp-c-bg-soft-down: #e3e3e5;--vp-c-bg-soft-mute: #e3e3e5;--vp-c-bg-alt: #f6f6f7;--vp-c-border: rgba(60, 60, 67, .29);--vp-c-divider: rgba(60, 60, 67, .12);--vp-c-gutter: rgba(60, 60, 67, .12);--vp-c-neutral: var(--vp-c-black);--vp-c-neutral-inverse: var(--vp-c-white);--vp-c-text-1: var(--vp-c-text-light-1);--vp-c-text-2: var(--vp-c-text-light-2);--vp-c-text-3: var(--vp-c-text-light-3);--vp-c-text-inverse-1: var(--vp-c-text-dark-1);--vp-c-text-inverse-2: var(--vp-c-text-dark-2);--vp-c-text-inverse-3: var(--vp-c-text-dark-3);--vp-c-text-code: #476582;--vp-c-brand: var(--vp-c-green);--vp-c-brand-light: var(--vp-c-green-light);--vp-c-brand-lighter: var(--vp-c-green-lighter);--vp-c-brand-dark: var(--vp-c-green-dark);--vp-c-brand-darker: var(--vp-c-green-darker);--vp-c-mute: #f6f6f7;--vp-c-mute-light: #f9f9fc;--vp-c-mute-lighter: #ffffff;--vp-c-mute-dark: #e3e3e5;--vp-c-mute-darker: #d7d7d9}.dark{--vp-c-bg: #1e1e20;--vp-c-bg-elv: #252529;--vp-c-bg-elv-up: #313136;--vp-c-bg-elv-down: #1e1e20;--vp-c-bg-elv-mute: #313136;--vp-c-bg-soft: #252529;--vp-c-bg-soft-up: #313136;--vp-c-bg-soft-down: #1e1e20;--vp-c-bg-soft-mute: #313136;--vp-c-bg-alt: #161618;--vp-c-border: rgba(82, 82, 89, .68);--vp-c-divider: rgba(82, 82, 89, .32);--vp-c-gutter: #000000;--vp-c-neutral: var(--vp-c-white);--vp-c-neutral-inverse: var(--vp-c-black);--vp-c-text-1: var(--vp-c-text-dark-1);--vp-c-text-2: var(--vp-c-text-dark-2);--vp-c-text-3: var(--vp-c-text-dark-3);--vp-c-text-inverse-1: var(--vp-c-text-light-1);--vp-c-text-inverse-2: var(--vp-c-text-light-2);--vp-c-text-inverse-3: var(--vp-c-text-light-3);--vp-c-text-code: #c9def1;--vp-c-mute: #313136;--vp-c-mute-light: #3a3a3c;--vp-c-mute-lighter: #505053;--vp-c-mute-dark: #2c2c30;--vp-c-mute-darker: #252529}:root{--vp-font-family-base: "Chinese Quotes", "Inter var", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-local-nav: 10;--vp-z-index-nav: 20;--vp-z-index-layout-top: 30;--vp-z-index-backdrop: 40;--vp-z-index-sidebar: 50;--vp-z-index-footer: 60}:root{--vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2'/%3E%3C/svg%3E");--vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2m-6 9 2 2 4-4'/%3E%3C/svg%3E")}:root{--vp-layout-max-width: 1440px}:root{--vp-header-anchor-symbol: "#"}:root{--vp-code-line-height: 1.7;--vp-code-font-size: .875em;--vp-c-code-dimm: var(--vp-c-text-dark-3);--vp-code-block-color: var(--vp-c-text-dark-1);--vp-code-block-bg: #292b30;--vp-code-block-bg-light: #1e1e20;--vp-code-block-divider-color: #000000;--vp-code-line-highlight-color: rgba(0, 0, 0, .5);--vp-code-line-number-color: var(--vp-c-code-dimm);--vp-code-line-diff-add-color: var(--vp-c-green-dimm-2);--vp-code-line-diff-add-symbol-color: var(--vp-c-green);--vp-code-line-diff-remove-color: var(--vp-c-red-dimm-2);--vp-code-line-diff-remove-symbol-color: var(--vp-c-red);--vp-code-line-warning-color: var(--vp-c-yellow-dimm-2);--vp-code-line-error-color: var(--vp-c-red-dimm-2);--vp-code-copy-code-border-color: transparent;--vp-code-copy-code-bg: var(--vp-code-block-bg-light);--vp-code-copy-code-hover-border-color: var(--vp-c-divider);--vp-code-copy-code-hover-bg: var(--vp-code-block-bg-light);--vp-code-copy-code-active-text: var(--vp-c-text-dark-2);--vp-code-tab-divider: var(--vp-code-block-divider-color);--vp-code-tab-text-color: var(--vp-c-text-dark-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-dark-1);--vp-code-tab-active-text-color: var(--vp-c-text-dark-1);--vp-code-tab-active-bar-color: var(--vp-c-brand)}.dark{--vp-code-block-bg: #161618}:root:not(.dark) .vp-adaptive-theme{--vp-c-code-dimm: var(--vp-c-text-2);--vp-code-block-color: var(--vp-c-text-1);--vp-code-block-bg: #f8f8f8;--vp-code-block-divider-color: var(--vp-c-divider);--vp-code-line-highlight-color: #ececec;--vp-code-line-number-color: var(--vp-c-code-dimm);--vp-code-copy-code-bg: #e2e2e2;--vp-code-copy-code-hover-bg: #dcdcdc;--vp-code-copy-code-active-text: var(--vp-c-text-2);--vp-code-tab-divider: var(--vp-c-divider);--vp-code-tab-text-color: var(--vp-c-text-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-1);--vp-code-tab-active-text-color: var(--vp-c-text-1)}:root{--vp-button-brand-border: var(--vp-c-brand-lighter);--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand);--vp-button-brand-hover-border: var(--vp-c-brand-lighter);--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-dark);--vp-button-brand-active-border: var(--vp-c-brand-lighter);--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-c-brand-darker);--vp-button-alt-border: var(--vp-c-border);--vp-button-alt-text: var(--vp-c-neutral);--vp-button-alt-bg: var(--vp-c-mute);--vp-button-alt-hover-border: var(--vp-c-border);--vp-button-alt-hover-text: var(--vp-c-neutral);--vp-button-alt-hover-bg: var(--vp-c-mute-dark);--vp-button-alt-active-border: var(--vp-c-border);--vp-button-alt-active-text: var(--vp-c-neutral);--vp-button-alt-active-bg: var(--vp-c-mute-darker);--vp-button-sponsor-border: var(--vp-c-gray-light-3);--vp-button-sponsor-text: var(--vp-c-text-light-2);--vp-button-sponsor-bg: transparent;--vp-button-sponsor-hover-border: var(--vp-c-sponsor);--vp-button-sponsor-hover-text: var(--vp-c-sponsor);--vp-button-sponsor-hover-bg: transparent;--vp-button-sponsor-active-border: var(--vp-c-sponsor);--vp-button-sponsor-active-text: var(--vp-c-sponsor);--vp-button-sponsor-active-bg: transparent}.dark{--vp-button-sponsor-border: var(--vp-c-gray-dark-1);--vp-button-sponsor-text: var(--vp-c-text-dark-2)}:root{--vp-custom-block-font-size: 14px;--vp-custom-block-code-font-size: 13px;--vp-custom-block-info-border: var(--vp-c-border);--vp-custom-block-info-text: var(--vp-c-text-2);--vp-custom-block-info-bg: var(--vp-c-bg-soft-up);--vp-custom-block-info-code-bg: var(--vp-c-bg-soft);--vp-custom-block-tip-border: var(--vp-c-green);--vp-custom-block-tip-text: var(--vp-c-green-dark);--vp-custom-block-tip-bg: var(--vp-c-bg-soft-up);--vp-custom-block-tip-code-bg: var(--vp-c-bg-soft);--vp-custom-block-warning-border: var(--vp-c-yellow);--vp-custom-block-warning-text: var(--vp-c-yellow);--vp-custom-block-warning-bg: var(--vp-c-bg-soft-up);--vp-custom-block-warning-code-bg: var(--vp-c-bg-soft);--vp-custom-block-danger-border: var(--vp-c-red);--vp-custom-block-danger-text: var(--vp-c-red);--vp-custom-block-danger-bg: var(--vp-c-bg-soft-up);--vp-custom-block-danger-code-bg: var(--vp-c-bg-soft);--vp-custom-block-details-border: var(--vp-custom-block-info-border);--vp-custom-block-details-text: var(--vp-custom-block-info-text);--vp-custom-block-details-bg: var(--vp-custom-block-info-bg);--vp-custom-block-details-code-bg: var(--vp-custom-block-details-bg)}:root{--vp-input-border-color: var(--vp-c-border);--vp-input-bg-color: var(--vp-c-bg-alt);--vp-input-hover-border-color: var(--vp-c-gray);--vp-input-switch-bg-color: var(--vp-c-mute)}:root{--vp-nav-height: 64px;--vp-nav-bg-color: var(--vp-c-bg);--vp-nav-screen-bg-color: var(--vp-c-bg)}:root{--vp-local-nav-bg-color: var(--vp-c-bg)}:root{--vp-sidebar-width: 272px;--vp-sidebar-bg-color: var(--vp-c-bg-alt)}:root{--vp-backdrop-bg-color: rgba(0, 0, 0, .6)}:root{--vp-home-hero-name-color: var(--vp-c-brand);--vp-home-hero-name-background: transparent;--vp-home-hero-image-background-image: none;--vp-home-hero-image-filter: none}:root{--vp-badge-info-border: var(--vp-c-border);--vp-badge-info-text: var(--vp-c-text-2);--vp-badge-info-bg: var(--vp-c-bg-soft-up);--vp-badge-tip-border: var(--vp-c-green-dark);--vp-badge-tip-text: var(--vp-c-green);--vp-badge-tip-bg: var(--vp-c-green-dimm-1);--vp-badge-warning-border: var(--vp-c-yellow-dark);--vp-badge-warning-text: var(--vp-c-yellow);--vp-badge-warning-bg: var(--vp-c-yellow-dimm-1);--vp-badge-danger-border: var(--vp-c-red-dark);--vp-badge-danger-text: var(--vp-c-red);--vp-badge-danger-bg: var(--vp-c-red-dimm-1)}:root{--vp-carbon-ads-text-color: var(--vp-c-text-1);--vp-carbon-ads-poweredby-color: var(--vp-c-text-2);--vp-carbon-ads-bg-color: var(--vp-c-bg-soft);--vp-carbon-ads-hover-text-color: var(--vp-c-brand);--vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1)}:root{--vp-local-search-bg: var(--vp-c-bg);--vp-local-search-result-bg: var(--vp-c-bg);--vp-local-search-result-border: var(--vp-c-divider);--vp-local-search-result-selected-bg: var(--vp-c-bg);--vp-local-search-result-selected-border: var(--vp-c-brand);--vp-local-search-highlight-bg: var(--vp-c-green-lighter);--vp-local-search-highlight-text: var(--vp-c-black)}*,:before,:after{box-sizing:border-box}html{line-height:1.4;font-size:16px;-webkit-text-size-adjust:100%}html.dark{color-scheme:dark}body{margin:0;width:100%;min-width:320px;min-height:100vh;line-height:24px;font-family:var(--vp-font-family-base);font-size:16px;font-weight:400;color:var(--vp-c-text-1);background-color:var(--vp-c-bg);direction:ltr;font-synthesis:style;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin:0;line-height:24px;font-size:16px;font-weight:400}p{margin:0}strong,b{font-weight:600}a,area,button,[role=button],input,label,select,summary,textarea{touch-action:manipulation}a{color:inherit;text-decoration:inherit}ol,ul{list-style:none;margin:0;padding:0}blockquote{margin:0}pre,code,kbd,samp{font-family:var(--vp-font-family-mono)}img,svg,video,canvas,audio,iframe,embed,object{display:block}figure{margin:0}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{border:0;padding:0;line-height:inherit;color:inherit}button{padding:0;font-family:inherit;background-color:transparent;background-image:none}button:enabled,[role=button]:enabled{cursor:pointer}button:focus,button:focus-visible{outline:1px dotted;outline:4px auto -webkit-focus-ring-color}button:focus:not(:focus-visible){outline:none!important}input:focus,textarea:focus,select:focus{outline:none}table{border-collapse:collapse}input{background-color:transparent}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--vp-c-text-3)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--vp-c-text-3)}input::placeholder,textarea::placeholder{color:var(--vp-c-text-3)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}textarea{resize:vertical}select{-webkit-appearance:none}fieldset{margin:0;padding:0}h1,h2,h3,h4,h5,h6,li,p{overflow-wrap:break-word}vite-error-overlay{z-index:9999}.visually-hidden{position:absolute;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden}.custom-block{border:1px solid transparent;border-radius:8px;padding:16px 16px 8px;line-height:24px;font-size:var(--vp-custom-block-font-size);color:var(--vp-c-text-2)}.custom-block.info{border-color:var(--vp-custom-block-info-border);color:var(--vp-custom-block-info-text);background-color:var(--vp-custom-block-info-bg)}.custom-block.custom-block th,.custom-block.custom-block blockquote>p{font-size:var(--vp-custom-block-font-size);color:inherit}.custom-block.info code{background-color:var(--vp-custom-block-info-code-bg)}.custom-block.tip{border-color:var(--vp-custom-block-tip-border);color:var(--vp-custom-block-tip-text);background-color:var(--vp-custom-block-tip-bg)}.custom-block.tip code{background-color:var(--vp-custom-block-tip-code-bg)}.custom-block.warning{border-color:var(--vp-custom-block-warning-border);color:var(--vp-custom-block-warning-text);background-color:var(--vp-custom-block-warning-bg)}.custom-block.warning code{background-color:var(--vp-custom-block-warning-code-bg)}.custom-block.danger{border-color:var(--vp-custom-block-danger-border);color:var(--vp-custom-block-danger-text);background-color:var(--vp-custom-block-danger-bg)}.custom-block.danger code{background-color:var(--vp-custom-block-danger-code-bg)}.custom-block.details{border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.custom-block.details code{background-color:var(--vp-custom-block-details-code-bg)}.custom-block-title{font-weight:600}.custom-block p+p{margin:8px 0}.custom-block.details summary{margin:0 0 8px;font-weight:700;cursor:pointer}.custom-block.details summary+p{margin:8px 0}.custom-block a{color:inherit;font-weight:600}.custom-block a:hover{text-decoration:underline}.custom-block code{font-size:var(--vp-custom-block-code-font-size)}.dark .vp-code-light{display:none}html:not(.dark) .vp-code-dark{display:none}.vp-code-group{margin-top:16px}.vp-code-group .tabs{position:relative;display:flex;margin-right:-24px;margin-left:-24px;padding:0 12px;background-color:var(--vp-code-tab-bg);overflow-x:auto;overflow-y:hidden}.vp-code-group .tabs:after{position:absolute;right:0;bottom:0;left:0;height:1px;background-color:var(--vp-code-tab-divider);content:""}@media (min-width: 640px){.vp-code-group .tabs{margin-right:0;margin-left:0;border-radius:8px 8px 0 0}}.vp-code-group .tabs input{position:absolute;opacity:0;pointer-events:none}.vp-code-group .tabs label{position:relative;display:inline-block;border-bottom:1px solid transparent;padding:0 12px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-code-tab-text-color);white-space:nowrap;cursor:pointer;transition:color .25s}.vp-code-group .tabs label:after{position:absolute;right:8px;bottom:-1px;left:8px;z-index:1;height:1px;content:"";background-color:transparent;transition:background-color .25s}.vp-code-group label:hover{color:var(--vp-code-tab-hover-text-color)}.vp-code-group input:checked+label{color:var(--vp-code-tab-active-text-color)}.vp-code-group input:checked+label:after{background-color:var(--vp-code-tab-active-bar-color)}.vp-code-group div[class*=language-]{display:none;margin-top:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.vp-code-group div[class*=language-].active{display:block}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{position:relative;font-weight:600;outline:none}.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:28px}.vp-doc h2{margin:48px 0 16px;border-top:1px solid var(--vp-c-divider);padding-top:24px;letter-spacing:-.02em;line-height:32px;font-size:24px}.vp-doc h3{margin:32px 0 0;letter-spacing:-.01em;line-height:28px;font-size:20px}.vp-doc .header-anchor{float:left;margin-left:-.87em;padding-right:.23em;font-weight:500;user-select:none;opacity:0;transition:color .25s,opacity .25s}.vp-doc .header-anchor:before{content:var(--vp-header-anchor-symbol)}.vp-doc h1:hover .header-anchor,.vp-doc h1 .header-anchor:focus,.vp-doc h2:hover .header-anchor,.vp-doc h2 .header-anchor:focus,.vp-doc h3:hover .header-anchor,.vp-doc h3 .header-anchor:focus,.vp-doc h4:hover .header-anchor,.vp-doc h4 .header-anchor:focus,.vp-doc h5:hover .header-anchor,.vp-doc h5 .header-anchor:focus,.vp-doc h6:hover .header-anchor,.vp-doc h6 .header-anchor:focus{opacity:1}@media (min-width: 768px){.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:32px}}.vp-doc p,.vp-doc summary{margin:16px 0}.vp-doc p{line-height:28px}.vp-doc blockquote{margin:16px 0;border-left:2px solid var(--vp-c-divider);padding-left:16px;transition:border-color .5s}.vp-doc blockquote>p{margin:0;font-size:16px;color:var(--vp-c-text-2);transition:color .5s}.vp-doc a{font-weight:500;color:var(--vp-c-brand);text-decoration-style:dotted;transition:color .25s}.vp-doc a:hover{text-decoration:underline}.vp-doc strong{font-weight:600}.vp-doc ul,.vp-doc ol{padding-left:1.25rem;margin:16px 0}.vp-doc ul{list-style:disc}.vp-doc ol{list-style:decimal}.vp-doc li+li{margin-top:8px}.vp-doc li>ol,.vp-doc li>ul{margin:8px 0 0}.vp-doc table{display:block;border-collapse:collapse;margin:20px 0;overflow-x:auto}.vp-doc tr{border-top:1px solid var(--vp-c-divider);transition:background-color .5s}.vp-doc tr:nth-child(2n){background-color:var(--vp-c-bg-soft)}.vp-doc th,.vp-doc td{border:1px solid var(--vp-c-divider);padding:8px 16px}.vp-doc th{text-align:left;font-size:14px;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-doc td{font-size:14px}.vp-doc hr{margin:16px 0;border:none;border-top:1px solid var(--vp-c-divider)}.vp-doc .custom-block{margin:16px 0}.vp-doc .custom-block p{margin:8px 0;line-height:24px}.vp-doc .custom-block p:first-child{margin:0}.vp-doc .custom-block a{color:inherit;font-weight:600}.vp-doc .custom-block a:hover{text-decoration:underline}.vp-doc .custom-block code{font-size:var(--vp-custom-block-code-font-size);font-weight:700;color:inherit}.vp-doc .custom-block div[class*=language-]{margin:8px 0}.vp-doc .custom-block div[class*=language-] code{font-weight:400;background-color:transparent}.vp-doc :not(pre,h1,h2,h3,h4,h5,h6)>code{font-size:var(--vp-code-font-size)}.vp-doc :not(pre)>code{border-radius:4px;padding:3px 6px;color:var(--vp-c-text-code);background-color:var(--vp-c-mute);transition:color .5s,background-color .5s}.vp-doc h1>code,.vp-doc h2>code,.vp-doc h3>code{font-size:.9em}.vp-doc a>code{color:var(--vp-c-brand);transition:color .25s}.vp-doc a:hover>code{color:var(--vp-c-brand-dark)}.vp-doc div[class*=language-]{position:relative;margin:16px -24px;background-color:var(--vp-code-block-bg);overflow-x:auto;transition:background-color .5s}@media (min-width: 640px){.vp-doc div[class*=language-]{border-radius:8px;margin:16px 0}}@media (max-width: 639px){.vp-doc li div[class*=language-]{border-radius:8px 0 0 8px}}.vp-doc div[class*=language-]+div[class*=language-],.vp-doc div[class$=-api]+div[class*=language-],.vp-doc div[class*=language-]+div[class$=-api]>div[class*=language-]{margin-top:-8px}.vp-doc [class*=language-] pre,.vp-doc [class*=language-] code{direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.vp-doc [class*=language-] pre{position:relative;z-index:1;margin:0;padding:20px 0;background:transparent;overflow-x:auto}.vp-doc [class*=language-] code{display:block;padding:0 24px;width:fit-content;min-width:100%;line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-block-color);transition:color .5s}.vp-doc [class*=language-] code .highlighted{background-color:var(--vp-code-line-highlight-color);transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .highlighted.error{background-color:var(--vp-code-line-error-color)}.vp-doc [class*=language-] code .highlighted.warning{background-color:var(--vp-code-line-warning-color)}.vp-doc [class*=language-] code .diff{transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .diff:before{position:absolute;left:10px}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){filter:blur(.095rem);opacity:.4;transition:filter .35s,opacity .35s}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){opacity:.7;transition:filter .35s,opacity .35s}.vp-doc [class*=language-]:hover .has-focused-lines .line:not(.has-focus){filter:blur(0);opacity:1}.vp-doc [class*=language-] code .diff.remove{background-color:var(--vp-code-line-diff-remove-color);opacity:.7}.vp-doc [class*=language-] code .diff.remove:before{content:"-";color:var(--vp-code-line-diff-remove-symbol-color)}.vp-doc [class*=language-] code .diff.add{background-color:var(--vp-code-line-diff-add-color)}.vp-doc [class*=language-] code .diff.add:before{content:"+";color:var(--vp-code-line-diff-add-symbol-color)}.vp-doc div[class*=language-].line-numbers-mode{padding-left:32px}.vp-doc .line-numbers-wrapper{position:absolute;top:0;bottom:0;left:0;z-index:3;border-right:1px solid var(--vp-code-block-divider-color);padding-top:20px;width:32px;text-align:center;font-family:var(--vp-font-family-mono);line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-line-number-color);transition:border-color .5s,color .5s}.vp-doc [class*=language-]>button.copy{direction:ltr;position:absolute;top:12px;right:12px;z-index:3;border:1px solid var(--vp-code-copy-code-border-color);border-radius:4px;width:40px;height:40px;background-color:var(--vp-code-copy-code-bg);opacity:0;cursor:pointer;background-image:var(--vp-icon-copy);background-position:50%;background-size:20px;background-repeat:no-repeat;transition:border-color .25s,background-color .25s,opacity .25s}.vp-doc [class*=language-]:hover>button.copy,.vp-doc [class*=language-]>button.copy:focus{opacity:1}.vp-doc [class*=language-]>button.copy:hover,.vp-doc [class*=language-]>button.copy.copied{border-color:var(--vp-code-copy-code-hover-border-color);background-color:var(--vp-code-copy-code-hover-bg)}.vp-doc [class*=language-]>button.copy.copied,.vp-doc [class*=language-]>button.copy:hover.copied{border-radius:0 4px 4px 0;background-color:var(--vp-code-copy-code-hover-bg);background-image:var(--vp-icon-copied)}.vp-doc [class*=language-]>button.copy.copied:before,.vp-doc [class*=language-]>button.copy:hover.copied:before{position:relative;top:-1px;left:-65px;display:flex;justify-content:center;align-items:center;border:1px solid var(--vp-code-copy-code-hover-border-color);border-right:0;border-radius:4px 0 0 4px;width:64px;height:40px;text-align:center;font-size:12px;font-weight:500;color:var(--vp-code-copy-code-active-text);background-color:var(--vp-code-copy-code-hover-bg);white-space:nowrap;content:"Copied"}.vp-doc [class*=language-]>span.lang{position:absolute;top:2px;right:8px;z-index:2;font-size:12px;font-weight:500;color:var(--vp-c-code-dimm);transition:color .4s,opacity .4s}.vp-doc [class*=language-]:hover>button.copy+span.lang,.vp-doc [class*=language-]>button.copy:focus+span.lang{opacity:0}.vp-doc .VPTeamMembers{margin-top:24px}.vp-doc .VPTeamMembers.small.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}.vp-doc .VPTeamMembers.small.count-2 .container,.vp-doc .VPTeamMembers.small.count-3 .container{max-width:100%!important}.vp-doc .VPTeamMembers.medium.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}.vp-sponsor{border-radius:16px;overflow:hidden}.vp-sponsor.aside{border-radius:12px}.vp-sponsor-section+.vp-sponsor-section{margin-top:4px}.vp-sponsor-tier{margin-bottom:4px;text-align:center;letter-spacing:1px;line-height:24px;width:100%;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-sponsor.normal .vp-sponsor-tier{padding:13px 0 11px;font-size:14px}.vp-sponsor.aside .vp-sponsor-tier{padding:9px 0 7px;font-size:12px}.vp-sponsor-grid+.vp-sponsor-tier{margin-top:4px}.vp-sponsor-grid{display:flex;flex-wrap:wrap;gap:4px}.vp-sponsor-grid.xmini .vp-sponsor-grid-link{height:64px}.vp-sponsor-grid.xmini .vp-sponsor-grid-image{max-width:64px;max-height:22px}.vp-sponsor-grid.mini .vp-sponsor-grid-link{height:72px}.vp-sponsor-grid.mini .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.small .vp-sponsor-grid-link{height:96px}.vp-sponsor-grid.small .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.medium .vp-sponsor-grid-link{height:112px}.vp-sponsor-grid.medium .vp-sponsor-grid-image{max-width:120px;max-height:36px}.vp-sponsor-grid.big .vp-sponsor-grid-link{height:184px}.vp-sponsor-grid.big .vp-sponsor-grid-image{max-width:192px;max-height:56px}.vp-sponsor-grid[data-vp-grid="2"] .vp-sponsor-grid-item{width:calc((100% - 4px)/2)}.vp-sponsor-grid[data-vp-grid="3"] .vp-sponsor-grid-item{width:calc((100% - 4px * 2) / 3)}.vp-sponsor-grid[data-vp-grid="4"] .vp-sponsor-grid-item{width:calc((100% - 12px)/4)}.vp-sponsor-grid[data-vp-grid="5"] .vp-sponsor-grid-item{width:calc((100% - 16px)/5)}.vp-sponsor-grid[data-vp-grid="6"] .vp-sponsor-grid-item{width:calc((100% - 4px * 5) / 6)}.vp-sponsor-grid-item{flex-shrink:0;width:100%;background-color:var(--vp-c-bg-soft);transition:background-color .25s}.vp-sponsor-grid-item:hover{background-color:var(--vp-c-bg-soft-down)}.vp-sponsor-grid-item:hover .vp-sponsor-grid-image{filter:grayscale(0) invert(0)}.vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.dark .vp-sponsor-grid-item:hover{background-color:var(--vp-c-white)}.dark .vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.vp-sponsor-grid-link{display:flex}.vp-sponsor-grid-box{display:flex;justify-content:center;align-items:center;width:100%}.vp-sponsor-grid-image{max-width:100%;filter:grayscale(1);transition:filter .25s}.dark .vp-sponsor-grid-image{filter:grayscale(1) invert(1)}.VPBadge[data-v-350d3852]{display:inline-block;margin-left:2px;border:1px solid transparent;border-radius:10px;padding:0 8px;line-height:18px;font-size:12px;font-weight:600;transform:translateY(-2px)}h1 .VPBadge[data-v-350d3852],h2 .VPBadge[data-v-350d3852],h3 .VPBadge[data-v-350d3852],h4 .VPBadge[data-v-350d3852],h5 .VPBadge[data-v-350d3852],h6 .VPBadge[data-v-350d3852]{vertical-align:top}h2 .VPBadge[data-v-350d3852]{border-radius:11px;line-height:20px}.VPBadge.info[data-v-350d3852]{border-color:var(--vp-badge-info-border);color:var(--vp-badge-info-text);background-color:var(--vp-badge-info-bg)}.VPBadge.tip[data-v-350d3852]{border-color:var(--vp-badge-tip-border);color:var(--vp-badge-tip-text);background-color:var(--vp-badge-tip-bg)}.VPBadge.warning[data-v-350d3852]{border-color:var(--vp-badge-warning-border);color:var(--vp-badge-warning-text);background-color:var(--vp-badge-warning-bg)}.VPBadge.danger[data-v-350d3852]{border-color:var(--vp-badge-danger-border);color:var(--vp-badge-danger-text);background-color:var(--vp-badge-danger-bg)}.VPSkipLink[data-v-b8b11faa]{top:8px;left:8px;padding:8px 16px;z-index:999;border-radius:8px;font-size:12px;font-weight:700;text-decoration:none;color:var(--vp-c-brand);box-shadow:var(--vp-shadow-3);background-color:var(--vp-c-bg)}.VPSkipLink[data-v-b8b11faa]:focus{height:auto;width:auto;clip:auto;clip-path:none}@media (min-width: 1280px){.VPSkipLink[data-v-b8b11faa]{top:14px;left:16px}}.VPBackdrop[data-v-c79a1216]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--vp-z-index-backdrop);background:var(--vp-backdrop-bg-color);transition:opacity .5s}.VPBackdrop.fade-enter-from[data-v-c79a1216],.VPBackdrop.fade-leave-to[data-v-c79a1216]{opacity:0}.VPBackdrop.fade-leave-active[data-v-c79a1216]{transition-duration:.25s}@media (min-width: 1280px){.VPBackdrop[data-v-c79a1216]{display:none}}html:not(.dark) .VPImage.dark[data-v-6db2186b]{display:none}.dark .VPImage.light[data-v-6db2186b]{display:none}.title[data-v-4d981103]{display:flex;align-items:center;border-bottom:1px solid transparent;width:100%;height:var(--vp-nav-height);font-size:16px;font-weight:600;color:var(--vp-c-text-1);transition:opacity .25s}@media (min-width: 960px){.title[data-v-4d981103]{flex-shrink:0}.VPNavBarTitle.has-sidebar .title[data-v-4d981103]{border-bottom-color:var(--vp-c-divider)}}[data-v-4d981103] .logo{margin-right:8px;height:24px}/*! @docsearch/css 3.5.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;position:relative;padding:0 0 2px;border:0;top:-1px;width:20px}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:2px;box-shadow:var(--docsearch-key-shadow);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;color:var(--docsearch-muted-color);border:0;width:20px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.DocSearch{--docsearch-primary-color: var(--vp-c-brand);--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-text-color: var(--vp-c-text-1);--docsearch-muted-color: var(--vp-c-text-2);--docsearch-searchbox-shadow: none;--docsearch-searchbox-focus-background: transparent;--docsearch-key-gradient: transparent;--docsearch-key-shadow: none;--docsearch-modal-background: var(--vp-c-bg-soft);--docsearch-footer-background: var(--vp-c-bg)}.dark .DocSearch{--docsearch-modal-shadow: none;--docsearch-footer-shadow: none;--docsearch-logo-color: var(--vp-c-text-2);--docsearch-hit-background: var(--vp-c-bg-soft-mute);--docsearch-hit-color: var(--vp-c-text-2);--docsearch-hit-shadow: none}.DocSearch-Button{display:flex;justify-content:center;align-items:center;margin:0;padding:0;width:48px;height:55px;background:transparent;transition:border-color .25s}.DocSearch-Button:hover{background:transparent}.DocSearch-Button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.DocSearch-Button:focus:not(:focus-visible){outline:none!important}@media (min-width: 768px){.DocSearch-Button{justify-content:flex-start;border:1px solid transparent;border-radius:8px;padding:0 10px 0 12px;width:100%;height:40px;background-color:var(--vp-c-bg-alt)}.DocSearch-Button:hover{border-color:var(--vp-c-brand);background:var(--vp-c-bg-alt)}}.DocSearch-Button .DocSearch-Button-Container{display:flex;align-items:center}.DocSearch-Button .DocSearch-Search-Icon{position:relative;width:16px;height:16px;color:var(--vp-c-text-1);fill:currentColor;transition:color .5s}.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Search-Icon{top:1px;margin-right:8px;width:14px;height:14px;color:var(--vp-c-text-2)}}.DocSearch-Button .DocSearch-Button-Placeholder{display:none;margin-top:2px;padding:0 16px 0 0;font-size:13px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.DocSearch-Button:hover .DocSearch-Button-Placeholder{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Placeholder{display:inline-block}}.DocSearch-Button .DocSearch-Button-Keys{direction:ltr;display:none;min-width:auto}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Keys{display:flex;align-items:center}}.DocSearch-Button .DocSearch-Button-Key{display:block;margin:2px 0 0;border:1px solid var(--vp-c-divider);border-right:none;border-radius:4px 0 0 4px;padding-left:6px;min-width:0;width:auto;height:22px;line-height:22px;font-family:var(--vp-font-family-base);font-size:12px;font-weight:500;transition:color .5s,border-color .5s}.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key{border-right:1px solid var(--vp-c-divider);border-left:none;border-radius:0 4px 4px 0;padding-left:2px;padding-right:6px}.DocSearch-Button .DocSearch-Button-Key:first-child{font-size:1px;letter-spacing:-12px;color:transparent}.DocSearch-Button .DocSearch-Button-Key:first-child:after{content:var(--vp-meta-key);font-size:12px;letter-spacing:normal;color:var(--docsearch-muted-color)}.DocSearch-Button .DocSearch-Button-Key:first-child>*{display:none}.VPNavBarSearch{display:flex;align-items:center}@media (min-width: 768px){.VPNavBarSearch{flex-grow:1;padding-left:24px}}@media (min-width: 960px){.VPNavBarSearch{padding-left:32px}}.dark .DocSearch-Footer{border-top:1px solid var(--vp-c-divider)}.DocSearch-Form{border:1px solid var(--vp-c-brand);background-color:var(--vp-c-white)}.dark .DocSearch-Form{background-color:var(--vp-c-bg-soft-mute)}.DocSearch-Screen-Icon>svg{margin:auto}.icon[data-v-8f4dc553]{display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;fill:var(--vp-c-text-3);transition:fill .25s;flex-shrink:0}.VPNavBarMenuLink[data-v-5e623618]{display:flex;align-items:center;padding:0 12px;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.VPNavBarMenuLink.active[data-v-5e623618],.VPNavBarMenuLink[data-v-5e623618]:hover{color:var(--vp-c-brand)}.VPMenuGroup+.VPMenuLink[data-v-2f2cfafc]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.link[data-v-2f2cfafc]{display:block;border-radius:6px;padding:0 12px;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);white-space:nowrap;transition:background-color .25s,color .25s}.link[data-v-2f2cfafc]:hover{color:var(--vp-c-brand);background-color:var(--vp-c-bg-elv-mute)}.link.active[data-v-2f2cfafc]{color:var(--vp-c-brand)}.VPMenuGroup[data-v-69e747b5]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.VPMenuGroup[data-v-69e747b5]:first-child{margin-top:0;border-top:0;padding-top:0}.VPMenuGroup+.VPMenuGroup[data-v-69e747b5]{margin-top:12px;border-top:1px solid var(--vp-c-divider)}.title[data-v-69e747b5]{padding:0 12px;line-height:32px;font-size:14px;font-weight:600;color:var(--vp-c-text-2);white-space:nowrap;transition:color .25s}.VPMenu[data-v-e7ea1737]{border-radius:12px;padding:12px;min-width:128px;border:1px solid var(--vp-c-divider);background-color:var(--vp-c-bg-elv);box-shadow:var(--vp-shadow-3);transition:background-color .5s;max-height:calc(100vh - var(--vp-nav-height));overflow-y:auto}.VPMenu[data-v-e7ea1737] .group{margin:0 -12px;padding:0 12px 12px}.VPMenu[data-v-e7ea1737] .group+.group{border-top:1px solid var(--vp-c-divider);padding:11px 12px 12px}.VPMenu[data-v-e7ea1737] .group:last-child{padding-bottom:0}.VPMenu[data-v-e7ea1737] .group+.item{border-top:1px solid var(--vp-c-divider);padding:11px 16px 0}.VPMenu[data-v-e7ea1737] .item{padding:0 16px;white-space:nowrap}.VPMenu[data-v-e7ea1737] .label{flex-grow:1;line-height:28px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.VPMenu[data-v-e7ea1737] .action{padding-left:24px}.VPFlyout[data-v-764effdf]{position:relative}.VPFlyout[data-v-764effdf]:hover{color:var(--vp-c-brand);transition:color .25s}.VPFlyout:hover .text[data-v-764effdf]{color:var(--vp-c-text-2)}.VPFlyout:hover .icon[data-v-764effdf]{fill:var(--vp-c-text-2)}.VPFlyout.active .text[data-v-764effdf]{color:var(--vp-c-brand)}.VPFlyout.active:hover .text[data-v-764effdf]{color:var(--vp-c-brand-dark)}.VPFlyout:hover .menu[data-v-764effdf],.button[aria-expanded=true]+.menu[data-v-764effdf]{opacity:1;visibility:visible;transform:translateY(0)}.button[data-v-764effdf]{display:flex;align-items:center;padding:0 12px;height:var(--vp-nav-height);color:var(--vp-c-text-1);transition:color .5s}.text[data-v-764effdf]{display:flex;align-items:center;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.option-icon[data-v-764effdf]{margin-right:0;width:16px;height:16px;fill:currentColor}.text-icon[data-v-764effdf]{margin-left:4px;width:14px;height:14px;fill:currentColor}.icon[data-v-764effdf]{width:20px;height:20px;fill:currentColor;transition:fill .25s}.menu[data-v-764effdf]{position:absolute;top:calc(var(--vp-nav-height) / 2 + 20px);right:0;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s,transform .25s}.VPNavBarMenu[data-v-7f418b0f]{display:none}@media (min-width: 768px){.VPNavBarMenu[data-v-7f418b0f]{display:flex}}.VPNavBarTranslations[data-v-74abcbb9]{display:none}@media (min-width: 1280px){.VPNavBarTranslations[data-v-74abcbb9]{display:flex;align-items:center}}.title[data-v-74abcbb9]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.VPSwitch[data-v-f3c41672]{position:relative;border-radius:11px;display:block;width:40px;height:22px;flex-shrink:0;border:1px solid var(--vp-input-border-color);background-color:var(--vp-input-switch-bg-color);transition:border-color .25s}.VPSwitch[data-v-f3c41672]:hover{border-color:var(--vp-input-hover-border-color)}.check[data-v-f3c41672]{position:absolute;top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:var(--vp-c-neutral-inverse);box-shadow:var(--vp-shadow-1);transition:transform .25s}.icon[data-v-f3c41672]{position:relative;display:block;width:18px;height:18px;border-radius:50%;overflow:hidden}.icon[data-v-f3c41672] svg{position:absolute;top:3px;left:3px;width:12px;height:12px;fill:var(--vp-c-text-2)}.dark .icon[data-v-f3c41672] svg{fill:var(--vp-c-text-1);transition:opacity .25s}.sun[data-v-82b282f1]{opacity:1}.moon[data-v-82b282f1],.dark .sun[data-v-82b282f1]{opacity:0}.dark .moon[data-v-82b282f1]{opacity:1}.dark .VPSwitchAppearance[data-v-82b282f1] .check{transform:translate(18px)}.VPNavBarAppearance[data-v-f6a63727]{display:none}@media (min-width: 1280px){.VPNavBarAppearance[data-v-f6a63727]{display:flex;align-items:center}}.VPSocialLink[data-v-36371990]{display:flex;justify-content:center;align-items:center;width:36px;height:36px;color:var(--vp-c-text-2);transition:color .5s}.VPSocialLink[data-v-36371990]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPSocialLink[data-v-36371990]>svg{width:20px;height:20px;fill:currentColor}.VPSocialLinks[data-v-7bc22406]{display:flex;justify-content:center}.VPNavBarSocialLinks[data-v-0394ad82]{display:none}@media (min-width: 1280px){.VPNavBarSocialLinks[data-v-0394ad82]{display:flex;align-items:center}}.VPNavBarExtra[data-v-40855f84]{display:none;margin-right:-12px}@media (min-width: 768px){.VPNavBarExtra[data-v-40855f84]{display:block}}@media (min-width: 1280px){.VPNavBarExtra[data-v-40855f84]{display:none}}.trans-title[data-v-40855f84]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.item.appearance[data-v-40855f84],.item.social-links[data-v-40855f84]{display:flex;align-items:center;padding:0 12px}.item.appearance[data-v-40855f84]{min-width:176px}.appearance-action[data-v-40855f84]{margin-right:-2px}.social-links-list[data-v-40855f84]{margin:-4px -8px}.VPNavBarHamburger[data-v-e5dd9c1c]{display:flex;justify-content:center;align-items:center;width:48px;height:var(--vp-nav-height)}@media (min-width: 768px){.VPNavBarHamburger[data-v-e5dd9c1c]{display:none}}.container[data-v-e5dd9c1c]{position:relative;width:16px;height:14px;overflow:hidden}.VPNavBarHamburger:hover .top[data-v-e5dd9c1c]{top:0;left:0;transform:translate(4px)}.VPNavBarHamburger:hover .middle[data-v-e5dd9c1c]{top:6px;left:0;transform:translate(0)}.VPNavBarHamburger:hover .bottom[data-v-e5dd9c1c]{top:12px;left:0;transform:translate(8px)}.VPNavBarHamburger.active .top[data-v-e5dd9c1c]{top:6px;transform:translate(0) rotate(225deg)}.VPNavBarHamburger.active .middle[data-v-e5dd9c1c]{top:6px;transform:translate(16px)}.VPNavBarHamburger.active .bottom[data-v-e5dd9c1c]{top:6px;transform:translate(0) rotate(135deg)}.VPNavBarHamburger.active:hover .top[data-v-e5dd9c1c],.VPNavBarHamburger.active:hover .middle[data-v-e5dd9c1c],.VPNavBarHamburger.active:hover .bottom[data-v-e5dd9c1c]{background-color:var(--vp-c-text-2);transition:top .25s,background-color .25s,transform .25s}.top[data-v-e5dd9c1c],.middle[data-v-e5dd9c1c],.bottom[data-v-e5dd9c1c]{position:absolute;width:16px;height:2px;background-color:var(--vp-c-text-1);transition:top .25s,background-color .5s,transform .25s}.top[data-v-e5dd9c1c]{top:0;left:0;transform:translate(0)}.middle[data-v-e5dd9c1c]{top:6px;left:0;transform:translate(8px)}.bottom[data-v-e5dd9c1c]{top:12px;left:0;transform:translate(4px)}.VPNavBar[data-v-7683ced7]{position:relative;border-bottom:1px solid transparent;padding:0 8px 0 24px;height:var(--vp-nav-height);pointer-events:none;white-space:nowrap}@media (min-width: 768px){.VPNavBar[data-v-7683ced7]{padding:0 32px}}@media (min-width: 960px){.VPNavBar.has-sidebar[data-v-7683ced7]{padding:0}.VPNavBar.fill[data-v-7683ced7]:not(.has-sidebar){border-bottom-color:var(--vp-c-gutter);background-color:var(--vp-nav-bg-color)}}.container[data-v-7683ced7]{display:flex;justify-content:space-between;margin:0 auto;max-width:calc(var(--vp-layout-max-width) - 64px);height:var(--vp-nav-height);pointer-events:none}.container>.title[data-v-7683ced7],.container>.content[data-v-7683ced7]{pointer-events:none}.container[data-v-7683ced7] *{pointer-events:auto}@media (min-width: 960px){.VPNavBar.has-sidebar .container[data-v-7683ced7]{max-width:100%}}.title[data-v-7683ced7]{flex-shrink:0;height:calc(var(--vp-nav-height) - 1px);transition:background-color .5s}@media (min-width: 960px){.VPNavBar.has-sidebar .title[data-v-7683ced7]{position:absolute;top:0;left:0;z-index:2;padding:0 32px;width:var(--vp-sidebar-width);height:var(--vp-nav-height);background-color:transparent}}@media (min-width: 1440px){.VPNavBar.has-sidebar .title[data-v-7683ced7]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}.content[data-v-7683ced7]{flex-grow:1}@media (min-width: 960px){.VPNavBar.has-sidebar .content[data-v-7683ced7]{position:relative;z-index:1;padding-right:32px;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .content[data-v-7683ced7]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.content-body[data-v-7683ced7]{display:flex;justify-content:flex-end;align-items:center;height:calc(var(--vp-nav-height) - 1px);transition:background-color .5s}@media (min-width: 960px){.VPNavBar.has-sidebar .content-body[data-v-7683ced7],.VPNavBar.fill .content-body[data-v-7683ced7]{position:relative;background-color:var(--vp-nav-bg-color)}}@media (max-width: 768px){.content-body[data-v-7683ced7]{column-gap:.5rem}}.menu+.translations[data-v-7683ced7]:before,.menu+.appearance[data-v-7683ced7]:before,.menu+.social-links[data-v-7683ced7]:before,.translations+.appearance[data-v-7683ced7]:before,.appearance+.social-links[data-v-7683ced7]:before{margin-right:8px;margin-left:8px;width:1px;height:24px;background-color:var(--vp-c-divider);content:""}.menu+.appearance[data-v-7683ced7]:before,.translations+.appearance[data-v-7683ced7]:before{margin-right:16px}.appearance+.social-links[data-v-7683ced7]:before{margin-left:16px}.social-links[data-v-7683ced7]{margin-right:-8px}@media (min-width: 960px){.VPNavBar.has-sidebar .curtain[data-v-7683ced7]{position:absolute;right:0;bottom:-31px;width:calc(100% - var(--vp-sidebar-width));height:32px}.VPNavBar.has-sidebar .curtain[data-v-7683ced7]:before{display:block;width:100%;height:32px;background:linear-gradient(var(--vp-c-bg),transparent 70%);content:""}}@media (min-width: 1440px){.VPNavBar.has-sidebar .curtain[data-v-7683ced7]{width:calc(100% - ((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width)))}}.VPNavScreenMenuLink[data-v-30be0acb]{display:block;border-bottom:1px solid var(--vp-c-divider);padding:12px 0 11px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:border-color .25s,color .25s}.VPNavScreenMenuLink[data-v-30be0acb]:hover{color:var(--vp-c-brand)}.VPNavScreenMenuGroupLink[data-v-6656c42a]{display:block;margin-left:12px;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-1);transition:color .25s}.VPNavScreenMenuGroupLink[data-v-6656c42a]:hover{color:var(--vp-c-brand)}.VPNavScreenMenuGroupSection[data-v-8133b170]{display:block}.title[data-v-8133b170]{line-height:32px;font-size:13px;font-weight:700;color:var(--vp-c-text-2);transition:color .25s}.VPNavScreenMenuGroup[data-v-338a1689]{border-bottom:1px solid var(--vp-c-divider);height:48px;overflow:hidden;transition:border-color .5s}.VPNavScreenMenuGroup .items[data-v-338a1689]{visibility:hidden}.VPNavScreenMenuGroup.open .items[data-v-338a1689]{visibility:visible}.VPNavScreenMenuGroup.open[data-v-338a1689]{padding-bottom:10px;height:auto}.VPNavScreenMenuGroup.open .button[data-v-338a1689]{padding-bottom:6px;color:var(--vp-c-brand)}.VPNavScreenMenuGroup.open .button-icon[data-v-338a1689]{transform:rotate(45deg)}.button[data-v-338a1689]{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 11px 0;width:100%;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.button[data-v-338a1689]:hover{color:var(--vp-c-brand)}.button-icon[data-v-338a1689]{width:14px;height:14px;fill:var(--vp-c-text-2);transition:fill .5s,transform .25s}.group[data-v-338a1689]:first-child{padding-top:0}.group+.group[data-v-338a1689],.group+.item[data-v-338a1689]{padding-top:4px}.VPNavScreenAppearance[data-v-add8f686]{display:flex;justify-content:space-between;align-items:center;border-radius:8px;padding:12px 14px 12px 16px;background-color:var(--vp-c-bg-soft)}.text[data-v-add8f686]{line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.VPNavScreenTranslations[data-v-d72aa483]{height:24px;overflow:hidden}.VPNavScreenTranslations.open[data-v-d72aa483]{height:auto}.title[data-v-d72aa483]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-text-1)}.icon[data-v-d72aa483]{width:16px;height:16px;fill:currentColor}.icon.lang[data-v-d72aa483]{margin-right:8px}.icon.chevron[data-v-d72aa483]{margin-left:4px}.list[data-v-d72aa483]{padding:4px 0 0 24px}.link[data-v-d72aa483]{line-height:32px;font-size:13px;color:var(--vp-c-text-1)}.VPNavScreen[data-v-724636ae]{position:fixed;top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 1px);right:0;bottom:0;left:0;padding:0 32px;width:100%;background-color:var(--vp-nav-screen-bg-color);overflow-y:auto;transition:background-color .5s;pointer-events:auto}.VPNavScreen.fade-enter-active[data-v-724636ae],.VPNavScreen.fade-leave-active[data-v-724636ae]{transition:opacity .25s}.VPNavScreen.fade-enter-active .container[data-v-724636ae],.VPNavScreen.fade-leave-active .container[data-v-724636ae]{transition:transform .25s ease}.VPNavScreen.fade-enter-from[data-v-724636ae],.VPNavScreen.fade-leave-to[data-v-724636ae]{opacity:0}.VPNavScreen.fade-enter-from .container[data-v-724636ae],.VPNavScreen.fade-leave-to .container[data-v-724636ae]{transform:translateY(-8px)}@media (min-width: 768px){.VPNavScreen[data-v-724636ae]{display:none}}.container[data-v-724636ae]{margin:0 auto;padding:24px 0 96px;max-width:288px}.menu+.translations[data-v-724636ae],.menu+.appearance[data-v-724636ae],.translations+.appearance[data-v-724636ae]{margin-top:24px}.menu+.social-links[data-v-724636ae]{margin-top:16px}.appearance+.social-links[data-v-724636ae]{margin-top:16px}.VPNav[data-v-7e5bc4a5]{position:relative;top:var(--vp-layout-top-height, 0px);left:0;z-index:var(--vp-z-index-nav);width:100%;pointer-events:none;transition:background-color .5s}@media (min-width: 960px){.VPNav[data-v-7e5bc4a5]{position:fixed}}.root[data-v-9a431c33]{position:relative;z-index:1}.nested[data-v-9a431c33]{padding-left:13px}.outline-link[data-v-9a431c33]{display:block;line-height:28px;color:var(--vp-c-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .5s;font-weight:500}.outline-link[data-v-9a431c33]:hover,.outline-link.active[data-v-9a431c33]{color:var(--vp-c-text-1);transition:color .25s}.outline-link.nested[data-v-9a431c33]{padding-left:13px}.VPLocalNavOutlineDropdown[data-v-687955bc]{padding:12px 20px 11px}.VPLocalNavOutlineDropdown button[data-v-687955bc]{display:block;font-size:12px;font-weight:500;line-height:24px;color:var(--vp-c-text-2);transition:color .5s;position:relative}.VPLocalNavOutlineDropdown button[data-v-687955bc]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPLocalNavOutlineDropdown button.open[data-v-687955bc]{color:var(--vp-c-text-1)}.icon[data-v-687955bc]{display:inline-block;vertical-align:middle;margin-left:2px;width:14px;height:14px;fill:currentColor}[data-v-687955bc] .outline-link{font-size:14px;padding:2px 0}.open>.icon[data-v-687955bc]{transform:rotate(90deg)}.items[data-v-687955bc]{position:absolute;left:20px;right:20px;top:64px;background-color:var(--vp-local-nav-bg-color);padding:4px 10px 16px;border:1px solid var(--vp-c-divider);border-radius:8px;max-height:calc(var(--vp-vh, 100vh) - 86px);overflow:hidden auto;box-shadow:var(--vp-shadow-3)}.top-link[data-v-687955bc]{display:block;color:var(--vp-c-brand);font-size:13px;font-weight:500;padding:6px 0;margin:0 13px 10px;border-bottom:1px solid var(--vp-c-divider)}.flyout-enter-active[data-v-687955bc]{transition:all .2s ease-out}.flyout-leave-active[data-v-687955bc]{transition:all .15s ease-in}.flyout-enter-from[data-v-687955bc],.flyout-leave-to[data-v-687955bc]{opacity:0;transform:translateY(-16px)}.VPLocalNav[data-v-9074c407]{position:sticky;top:0;left:0;z-index:var(--vp-z-index-local-nav);display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--vp-c-gutter);border-bottom:1px solid var(--vp-c-gutter);padding-top:var(--vp-layout-top-height, 0px);width:100%;background-color:var(--vp-local-nav-bg-color)}.VPLocalNav.fixed[data-v-9074c407]{position:fixed}.VPLocalNav.reached-top[data-v-9074c407]{border-top-color:transparent}@media (min-width: 960px){.VPLocalNav[data-v-9074c407]{display:none}}.menu[data-v-9074c407]{display:flex;align-items:center;padding:12px 24px 11px;line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.menu[data-v-9074c407]:hover{color:var(--vp-c-text-1);transition:color .25s}@media (min-width: 768px){.menu[data-v-9074c407]{padding:0 32px}}.menu-icon[data-v-9074c407]{margin-right:8px;width:16px;height:16px;fill:currentColor}.VPOutlineDropdown[data-v-9074c407]{padding:12px 24px 11px}@media (min-width: 768px){.VPOutlineDropdown[data-v-9074c407]{padding:12px 32px 11px}}.VPSidebarItem.level-0[data-v-c4656e6d]{padding-bottom:24px}.VPSidebarItem.collapsed.level-0[data-v-c4656e6d]{padding-bottom:10px}.item[data-v-c4656e6d]{position:relative;display:flex;width:100%}.VPSidebarItem.collapsible>.item[data-v-c4656e6d]{cursor:pointer}.indicator[data-v-c4656e6d]{position:absolute;top:6px;bottom:6px;left:-17px;width:1px;transition:background-color .25s}.VPSidebarItem.level-2.is-active>.item>.indicator[data-v-c4656e6d],.VPSidebarItem.level-3.is-active>.item>.indicator[data-v-c4656e6d],.VPSidebarItem.level-4.is-active>.item>.indicator[data-v-c4656e6d],.VPSidebarItem.level-5.is-active>.item>.indicator[data-v-c4656e6d]{background-color:var(--vp-c-brand)}.link[data-v-c4656e6d]{display:flex;align-items:center;flex-grow:1}.text[data-v-c4656e6d]{flex-grow:1;padding:4px 0;line-height:24px;font-size:14px;transition:color .25s}.VPSidebarItem.level-0 .text[data-v-c4656e6d]{font-weight:700;color:var(--vp-c-text-1)}.VPSidebarItem.level-1 .text[data-v-c4656e6d],.VPSidebarItem.level-2 .text[data-v-c4656e6d],.VPSidebarItem.level-3 .text[data-v-c4656e6d],.VPSidebarItem.level-4 .text[data-v-c4656e6d],.VPSidebarItem.level-5 .text[data-v-c4656e6d]{font-weight:500;color:var(--vp-c-text-2)}.VPSidebarItem.level-0.is-link>.item>.link:hover .text[data-v-c4656e6d],.VPSidebarItem.level-1.is-link>.item>.link:hover .text[data-v-c4656e6d],.VPSidebarItem.level-2.is-link>.item>.link:hover .text[data-v-c4656e6d],.VPSidebarItem.level-3.is-link>.item>.link:hover .text[data-v-c4656e6d],.VPSidebarItem.level-4.is-link>.item>.link:hover .text[data-v-c4656e6d],.VPSidebarItem.level-5.is-link>.item>.link:hover .text[data-v-c4656e6d]{color:var(--vp-c-brand)}.VPSidebarItem.level-0.has-active>.item>.link>.text[data-v-c4656e6d],.VPSidebarItem.level-1.has-active>.item>.link>.text[data-v-c4656e6d],.VPSidebarItem.level-2.has-active>.item>.link>.text[data-v-c4656e6d],.VPSidebarItem.level-3.has-active>.item>.link>.text[data-v-c4656e6d],.VPSidebarItem.level-4.has-active>.item>.link>.text[data-v-c4656e6d],.VPSidebarItem.level-5.has-active>.item>.link>.text[data-v-c4656e6d]{color:var(--vp-c-text-1)}.VPSidebarItem.level-0.is-active>.item .link>.text[data-v-c4656e6d],.VPSidebarItem.level-1.is-active>.item .link>.text[data-v-c4656e6d],.VPSidebarItem.level-2.is-active>.item .link>.text[data-v-c4656e6d],.VPSidebarItem.level-3.is-active>.item .link>.text[data-v-c4656e6d],.VPSidebarItem.level-4.is-active>.item .link>.text[data-v-c4656e6d],.VPSidebarItem.level-5.is-active>.item .link>.text[data-v-c4656e6d]{color:var(--vp-c-brand)}.caret[data-v-c4656e6d]{display:flex;justify-content:center;align-items:center;margin-right:-7px;width:32px;height:32px;color:var(--vp-c-text-3);cursor:pointer;transition:color .25s}.item:hover .caret[data-v-c4656e6d]{color:var(--vp-c-text-2)}.item:hover .caret[data-v-c4656e6d]:hover{color:var(--vp-c-text-1)}.caret-icon[data-v-c4656e6d]{width:18px;height:18px;fill:currentColor;transform:rotate(90deg);transition:transform .25s}.VPSidebarItem.collapsed .caret-icon[data-v-c4656e6d]{transform:rotate(0)}.VPSidebarItem.level-1 .items[data-v-c4656e6d],.VPSidebarItem.level-2 .items[data-v-c4656e6d],.VPSidebarItem.level-3 .items[data-v-c4656e6d],.VPSidebarItem.level-4 .items[data-v-c4656e6d],.VPSidebarItem.level-5 .items[data-v-c4656e6d]{border-left:1px solid var(--vp-c-divider);padding-left:16px}.VPSidebarItem.collapsed .items[data-v-c4656e6d]{display:none}.VPSidebar[data-v-af16598e]{position:fixed;top:var(--vp-layout-top-height, 0px);bottom:0;left:0;z-index:var(--vp-z-index-sidebar);padding:32px 32px 96px;width:calc(100vw - 64px);max-width:320px;background-color:var(--vp-sidebar-bg-color);opacity:0;box-shadow:var(--vp-c-shadow-3);overflow-x:hidden;overflow-y:auto;transform:translate(-100%);transition:opacity .5s,transform .25s ease;overscroll-behavior:contain}.VPSidebar.open[data-v-af16598e]{opacity:1;visibility:visible;transform:translate(0);transition:opacity .25s,transform .5s cubic-bezier(.19,1,.22,1)}.dark .VPSidebar[data-v-af16598e]{box-shadow:var(--vp-shadow-1)}@media (min-width: 960px){.VPSidebar[data-v-af16598e]{z-index:1;padding-top:var(--vp-nav-height);padding-bottom:128px;width:var(--vp-sidebar-width);max-width:100%;background-color:var(--vp-sidebar-bg-color);opacity:1;visibility:visible;box-shadow:none;transform:translate(0)}}@media (min-width: 1440px){.VPSidebar[data-v-af16598e]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}@media (min-width: 960px){.curtain[data-v-af16598e]{position:sticky;top:-64px;left:0;z-index:1;margin-top:calc(var(--vp-nav-height) * -1);margin-right:-32px;margin-left:-32px;height:var(--vp-nav-height);background-color:var(--vp-sidebar-bg-color)}}.nav[data-v-af16598e]{outline:0}.group+.group[data-v-af16598e]{border-top:1px solid var(--vp-c-divider);padding-top:10px}@media (min-width: 960px){.group[data-v-af16598e]{padding-top:10px;width:calc(var(--vp-sidebar-width) - 64px)}}.VPButton[data-v-567ba664]{display:inline-block;border:1px solid transparent;text-align:center;font-weight:600;white-space:nowrap;transition:color .25s,border-color .25s,background-color .25s}.VPButton[data-v-567ba664]:active{transition:color .1s,border-color .1s,background-color .1s}.VPButton.medium[data-v-567ba664]{border-radius:20px;padding:0 20px;line-height:38px;font-size:14px}.VPButton.big[data-v-567ba664]{border-radius:24px;padding:0 24px;line-height:46px;font-size:16px}.VPButton.brand[data-v-567ba664]{border-color:var(--vp-button-brand-border);color:var(--vp-button-brand-text);background-color:var(--vp-button-brand-bg)}.VPButton.brand[data-v-567ba664]:hover{border-color:var(--vp-button-brand-hover-border);color:var(--vp-button-brand-hover-text);background-color:var(--vp-button-brand-hover-bg)}.VPButton.brand[data-v-567ba664]:active{border-color:var(--vp-button-brand-active-border);color:var(--vp-button-brand-active-text);background-color:var(--vp-button-brand-active-bg)}.VPButton.alt[data-v-567ba664]{border-color:var(--vp-button-alt-border);color:var(--vp-button-alt-text);background-color:var(--vp-button-alt-bg)}.VPButton.alt[data-v-567ba664]:hover{border-color:var(--vp-button-alt-hover-border);color:var(--vp-button-alt-hover-text);background-color:var(--vp-button-alt-hover-bg)}.VPButton.alt[data-v-567ba664]:active{border-color:var(--vp-button-alt-active-border);color:var(--vp-button-alt-active-text);background-color:var(--vp-button-alt-active-bg)}.VPButton.sponsor[data-v-567ba664]{border-color:var(--vp-button-sponsor-border);color:var(--vp-button-sponsor-text);background-color:var(--vp-button-sponsor-bg)}.VPButton.sponsor[data-v-567ba664]:hover{border-color:var(--vp-button-sponsor-hover-border);color:var(--vp-button-sponsor-hover-text);background-color:var(--vp-button-sponsor-hover-bg)}.VPButton.sponsor[data-v-567ba664]:active{border-color:var(--vp-button-sponsor-active-border);color:var(--vp-button-sponsor-active-text);background-color:var(--vp-button-sponsor-active-bg)}.VPHero[data-v-fd2650d5]{margin-top:calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px}@media (min-width: 640px){.VPHero[data-v-fd2650d5]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px}}@media (min-width: 960px){.VPHero[data-v-fd2650d5]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px}}.container[data-v-fd2650d5]{display:flex;flex-direction:column;margin:0 auto;max-width:1152px}@media (min-width: 960px){.container[data-v-fd2650d5]{flex-direction:row}}.main[data-v-fd2650d5]{position:relative;z-index:10;order:2;flex-grow:1;flex-shrink:0}.VPHero.has-image .container[data-v-fd2650d5]{text-align:center}@media (min-width: 960px){.VPHero.has-image .container[data-v-fd2650d5]{text-align:left}}@media (min-width: 960px){.main[data-v-fd2650d5]{order:1;width:calc((100% / 3) * 2)}.VPHero.has-image .main[data-v-fd2650d5]{max-width:592px}}.name[data-v-fd2650d5],.text[data-v-fd2650d5]{max-width:392px;letter-spacing:-.4px;line-height:40px;font-size:32px;font-weight:700;white-space:pre-wrap}.VPHero.has-image .name[data-v-fd2650d5],.VPHero.has-image .text[data-v-fd2650d5]{margin:0 auto}.name[data-v-fd2650d5]{color:var(--vp-home-hero-name-color)}.clip[data-v-fd2650d5]{background:var(--vp-home-hero-name-background);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--vp-home-hero-name-color)}@media (min-width: 640px){.name[data-v-fd2650d5],.text[data-v-fd2650d5]{max-width:576px;line-height:56px;font-size:48px}}@media (min-width: 960px){.name[data-v-fd2650d5],.text[data-v-fd2650d5]{line-height:64px;font-size:56px}.VPHero.has-image .name[data-v-fd2650d5],.VPHero.has-image .text[data-v-fd2650d5]{margin:0}}.tagline[data-v-fd2650d5]{padding-top:8px;max-width:392px;line-height:28px;font-size:18px;font-weight:500;white-space:pre-wrap;color:var(--vp-c-text-2)}.VPHero.has-image .tagline[data-v-fd2650d5]{margin:0 auto}@media (min-width: 640px){.tagline[data-v-fd2650d5]{padding-top:12px;max-width:576px;line-height:32px;font-size:20px}}@media (min-width: 960px){.tagline[data-v-fd2650d5]{line-height:36px;font-size:24px}.VPHero.has-image .tagline[data-v-fd2650d5]{margin:0}}.actions[data-v-fd2650d5]{display:flex;flex-wrap:wrap;margin:-6px;padding-top:24px}.VPHero.has-image .actions[data-v-fd2650d5]{justify-content:center}@media (min-width: 640px){.actions[data-v-fd2650d5]{padding-top:32px}}@media (min-width: 960px){.VPHero.has-image .actions[data-v-fd2650d5]{justify-content:flex-start}}.action[data-v-fd2650d5]{flex-shrink:0;padding:6px}.image[data-v-fd2650d5]{order:1;margin:-76px -24px -48px}@media (min-width: 640px){.image[data-v-fd2650d5]{margin:-108px -24px -48px}}@media (min-width: 960px){.image[data-v-fd2650d5]{flex-grow:1;order:2;margin:0;min-height:100%}}.image-container[data-v-fd2650d5]{position:relative;margin:0 auto;width:320px;height:320px}@media (min-width: 640px){.image-container[data-v-fd2650d5]{width:392px;height:392px}}@media (min-width: 960px){.image-container[data-v-fd2650d5]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;transform:translate(-32px,-32px)}}.image-bg[data-v-fd2650d5]{position:absolute;top:50%;left:50%;border-radius:50%;width:192px;height:192px;background-image:var(--vp-home-hero-image-background-image);filter:var(--vp-home-hero-image-filter);transform:translate(-50%,-50%)}@media (min-width: 640px){.image-bg[data-v-fd2650d5]{width:256px;height:256px}}@media (min-width: 960px){.image-bg[data-v-fd2650d5]{width:320px;height:320px}}[data-v-fd2650d5] .image-src{position:absolute;top:50%;left:50%;max-width:192px;max-height:192px;transform:translate(-50%,-50%)}@media (min-width: 640px){[data-v-fd2650d5] .image-src{max-width:256px;max-height:256px}}@media (min-width: 960px){[data-v-fd2650d5] .image-src{max-width:320px;max-height:320px}}.VPFeature[data-v-837f6cca]{display:block;border:1px solid var(--vp-c-bg-soft);border-radius:12px;height:100%;background-color:var(--vp-c-bg-soft);transition:border-color .25s,background-color .25s}.VPFeature.link[data-v-837f6cca]:hover{border-color:var(--vp-c-brand);background-color:var(--vp-c-bg-soft-up)}.box[data-v-837f6cca]{display:flex;flex-direction:column;padding:24px;height:100%}.VPFeature[data-v-837f6cca] .VPImage{width:48px;height:48px;margin-bottom:20px}.icon[data-v-837f6cca]{display:flex;justify-content:center;align-items:center;margin-bottom:20px;border-radius:6px;background-color:var(--vp-c-bg-soft-down);width:48px;height:48px;font-size:24px;transition:background-color .25s}.title[data-v-837f6cca]{line-height:24px;font-size:16px;font-weight:600}.details[data-v-837f6cca]{flex-grow:1;padding-top:8px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.link-text[data-v-837f6cca]{padding-top:8px}.link-text-value[data-v-837f6cca]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-brand)}.link-text-icon[data-v-837f6cca]{display:inline-block;margin-left:6px;width:14px;height:14px;fill:currentColor}.VPFeatures[data-v-ba861f23]{position:relative;padding:0 24px}@media (min-width: 640px){.VPFeatures[data-v-ba861f23]{padding:0 48px}}@media (min-width: 960px){.VPFeatures[data-v-ba861f23]{padding:0 64px}}.container[data-v-ba861f23]{margin:0 auto;max-width:1152px}.items[data-v-ba861f23]{display:flex;flex-wrap:wrap;margin:-8px}.item[data-v-ba861f23]{padding:8px;width:100%}@media (min-width: 640px){.item.grid-2[data-v-ba861f23],.item.grid-4[data-v-ba861f23],.item.grid-6[data-v-ba861f23]{width:50%}}@media (min-width: 768px){.item.grid-2[data-v-ba861f23],.item.grid-4[data-v-ba861f23]{width:50%}.item.grid-3[data-v-ba861f23],.item.grid-6[data-v-ba861f23]{width:calc(100% / 3)}}@media (min-width: 960px){.item.grid-4[data-v-ba861f23]{width:25%}}.VPHome[data-v-d82743a8]{padding-bottom:96px}.VPHome[data-v-d82743a8] .VPHomeSponsors{margin-top:112px;margin-bottom:-128px}@media (min-width: 768px){.VPHome[data-v-d82743a8]{padding-bottom:128px}}.VPDocAsideOutline[data-v-ff0f39c8]{display:none}.VPDocAsideOutline.has-outline[data-v-ff0f39c8]{display:block}.content[data-v-ff0f39c8]{position:relative;border-left:1px solid var(--vp-c-divider);padding-left:16px;font-size:13px;font-weight:500}.outline-marker[data-v-ff0f39c8]{position:absolute;top:32px;left:-1px;z-index:0;opacity:0;width:1px;height:18px;background-color:var(--vp-c-brand);transition:top .25s cubic-bezier(0,1,.5,1),background-color .5s,opacity .25s}.outline-title[data-v-ff0f39c8]{letter-spacing:.4px;line-height:28px;font-size:13px;font-weight:600}.VPDocAside[data-v-3f215769]{display:flex;flex-direction:column;flex-grow:1}.spacer[data-v-3f215769]{flex-grow:1}.VPDocAside[data-v-3f215769] .spacer+.VPDocAsideSponsors,.VPDocAside[data-v-3f215769] .spacer+.VPDocAsideCarbonAds{margin-top:24px}.VPDocAside[data-v-3f215769] .VPDocAsideSponsors+.VPDocAsideCarbonAds{margin-top:16px}.VPLastUpdated[data-v-7b3ebfe1]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 640px){.VPLastUpdated[data-v-7b3ebfe1]{line-height:32px;font-size:14px;font-weight:500}}.VPDocFooter[data-v-face870a]{margin-top:64px}.edit-info[data-v-face870a]{padding-bottom:18px}@media (min-width: 640px){.edit-info[data-v-face870a]{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px}}.edit-link-button[data-v-face870a]{display:flex;align-items:center;border:0;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-brand);transition:color .25s}.edit-link-button[data-v-face870a]:hover{color:var(--vp-c-brand-dark)}.edit-link-icon[data-v-face870a]{margin-right:8px;width:14px;height:14px;fill:currentColor}.prev-next[data-v-face870a]{border-top:1px solid var(--vp-c-divider);padding-top:24px}@media (min-width: 640px){.prev-next[data-v-face870a]{display:flex}}.pager.has-prev[data-v-face870a]{padding-top:8px}@media (min-width: 640px){.pager[data-v-face870a]{display:flex;flex-direction:column;flex-shrink:0;width:50%}.pager.has-prev[data-v-face870a]{padding-top:0;padding-left:16px}}.pager-link[data-v-face870a]{display:block;border:1px solid var(--vp-c-divider);border-radius:8px;padding:11px 16px 13px;width:100%;height:100%;transition:border-color .25s}.pager-link[data-v-face870a]:hover{border-color:var(--vp-c-brand)}.pager-link.next[data-v-face870a]{margin-left:auto;text-align:right}.desc[data-v-face870a]{display:block;line-height:20px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.title[data-v-face870a]{display:block;line-height:20px;font-size:14px;font-weight:500;color:var(--vp-c-brand);transition:color .25s}.VPDocOutlineDropdown[data-v-2edece88]{margin-bottom:42px}.VPDocOutlineDropdown button[data-v-2edece88]{display:block;font-size:14px;font-weight:500;line-height:24px;color:var(--vp-c-text-2);transition:color .5s;border:1px solid var(--vp-c-border);padding:4px 12px;border-radius:8px}.VPDocOutlineDropdown button[data-v-2edece88]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPDocOutlineDropdown button.open[data-v-2edece88]{color:var(--vp-c-text-1)}.icon[data-v-2edece88]{display:inline-block;vertical-align:middle;margin-left:2px;width:14px;height:14px;fill:currentColor}[data-v-2edece88] .outline-link{font-size:13px}.open>.icon[data-v-2edece88]{transform:rotate(90deg)}.items[data-v-2edece88]{margin-top:10px;border-left:1px solid var(--vp-c-divider)}.VPDoc[data-v-c4b0d3cf]{padding:32px 24px 96px;width:100%}.VPDoc .VPDocOutlineDropdown[data-v-c4b0d3cf]{display:none}@media (min-width: 960px) and (max-width: 1280px){.VPDoc .VPDocOutlineDropdown[data-v-c4b0d3cf]{display:block}}@media (min-width: 768px){.VPDoc[data-v-c4b0d3cf]{padding:48px 32px 128px}}@media (min-width: 960px){.VPDoc[data-v-c4b0d3cf]{padding:32px 32px 0}.VPDoc:not(.has-sidebar) .container[data-v-c4b0d3cf]{display:flex;justify-content:center;max-width:992px}.VPDoc:not(.has-sidebar) .content[data-v-c4b0d3cf]{max-width:752px}}@media (min-width: 1280px){.VPDoc .container[data-v-c4b0d3cf]{display:flex;justify-content:center}.VPDoc .aside[data-v-c4b0d3cf]{display:block}}@media (min-width: 1440px){.VPDoc:not(.has-sidebar) .content[data-v-c4b0d3cf]{max-width:784px}.VPDoc:not(.has-sidebar) .container[data-v-c4b0d3cf]{max-width:1104px}}.container[data-v-c4b0d3cf]{margin:0 auto;width:100%}.aside[data-v-c4b0d3cf]{position:relative;display:none;order:2;flex-grow:1;padding-left:32px;width:100%;max-width:256px}.left-aside[data-v-c4b0d3cf]{order:1;padding-left:unset;padding-right:32px}.aside-container[data-v-c4b0d3cf]{position:fixed;top:0;padding-top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 32px);width:224px;height:100vh;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.aside-container[data-v-c4b0d3cf]::-webkit-scrollbar{display:none}.aside-curtain[data-v-c4b0d3cf]{position:fixed;bottom:0;z-index:10;width:224px;height:32px;background:linear-gradient(transparent,var(--vp-c-bg) 70%)}.aside-content[data-v-c4b0d3cf]{display:flex;flex-direction:column;min-height:calc(100vh - (var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 32px));padding-bottom:32px}.content[data-v-c4b0d3cf]{position:relative;margin:0 auto;width:100%}@media (min-width: 960px){.content[data-v-c4b0d3cf]{padding:0 32px 128px}}@media (min-width: 1280px){.content[data-v-c4b0d3cf]{order:1;margin:0;min-width:640px}}.content-container[data-v-c4b0d3cf]{margin:0 auto}.VPDoc.has-aside .content-container[data-v-c4b0d3cf]{max-width:688px}.NotFound[data-v-c70503b8]{padding:64px 24px 96px;text-align:center}@media (min-width: 768px){.NotFound[data-v-c70503b8]{padding:96px 32px 168px}}.code[data-v-c70503b8]{line-height:64px;font-size:64px;font-weight:600}.title[data-v-c70503b8]{padding-top:12px;letter-spacing:2px;line-height:20px;font-size:20px;font-weight:700}.divider[data-v-c70503b8]{margin:24px auto 18px;width:64px;height:1px;background-color:var(--vp-c-divider)}.quote[data-v-c70503b8]{margin:0 auto;max-width:256px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.action[data-v-c70503b8]{padding-top:20px}.link[data-v-c70503b8]{display:inline-block;border:1px solid var(--vp-c-brand);border-radius:16px;padding:3px 16px;font-size:14px;font-weight:500;color:var(--vp-c-brand);transition:border-color .25s,color .25s}.link[data-v-c70503b8]:hover{border-color:var(--vp-c-brand-dark);color:var(--vp-c-brand-dark)}.VPContent[data-v-a494bd1d]{flex-grow:1;flex-shrink:0;margin:var(--vp-layout-top-height, 0px) auto 0;width:100%}.VPContent.is-home[data-v-a494bd1d]{width:100%;max-width:100%}.VPContent.has-sidebar[data-v-a494bd1d]{margin:0}@media (min-width: 960px){.VPContent[data-v-a494bd1d]{padding-top:var(--vp-nav-height)}.VPContent.has-sidebar[data-v-a494bd1d]{margin:var(--vp-layout-top-height, 0px) 0 0;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPContent.has-sidebar[data-v-a494bd1d]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.VPFooter[data-v-f7fc41f4]{position:relative;z-index:var(--vp-z-index-footer);border-top:1px solid var(--vp-c-gutter);padding:32px 24px;background-color:var(--vp-c-bg)}.VPFooter.has-sidebar[data-v-f7fc41f4]{display:none}@media (min-width: 768px){.VPFooter[data-v-f7fc41f4]{padding:32px}}.container[data-v-f7fc41f4]{margin:0 auto;max-width:var(--vp-layout-max-width);text-align:center}.message[data-v-f7fc41f4],.copyright[data-v-f7fc41f4]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.Layout[data-v-b2cf3e0b]{display:flex;flex-direction:column;min-height:100vh}.VPHomeSponsors[data-v-3c6e61c2]{border-top:1px solid var(--vp-c-gutter);padding:88px 24px 96px;background-color:var(--vp-c-bg)}.container[data-v-3c6e61c2]{margin:0 auto;max-width:1152px}.love[data-v-3c6e61c2]{margin:0 auto;width:28px;height:28px;color:var(--vp-c-text-3)}.icon[data-v-3c6e61c2]{width:28px;height:28px;fill:currentColor}.message[data-v-3c6e61c2]{margin:0 auto;padding-top:10px;max-width:320px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.sponsors[data-v-3c6e61c2]{padding-top:32px}.action[data-v-3c6e61c2]{padding-top:40px;text-align:center}.VPTeamPage[data-v-10b00018]{padding-bottom:96px}@media (min-width: 768px){.VPTeamPage[data-v-10b00018]{padding-bottom:128px}}.VPTeamPageSection+.VPTeamPageSection[data-v-10b00018-s],.VPTeamMembers+.VPTeamPageSection[data-v-10b00018-s]{margin-top:64px}.VPTeamMembers+.VPTeamMembers[data-v-10b00018-s]{margin-top:24px}@media (min-width: 768px){.VPTeamPageTitle+.VPTeamPageSection[data-v-10b00018-s]{margin-top:16px}.VPTeamPageSection+.VPTeamPageSection[data-v-10b00018-s],.VPTeamMembers+.VPTeamPageSection[data-v-10b00018-s]{margin-top:96px}}.VPTeamMembers[data-v-10b00018-s]{padding:0 24px}@media (min-width: 768px){.VPTeamMembers[data-v-10b00018-s]{padding:0 48px}}@media (min-width: 960px){.VPTeamMembers[data-v-10b00018-s]{padding:0 64px}}.VPTeamPageTitle[data-v-bf2cbdac]{padding:48px 32px;text-align:center}@media (min-width: 768px){.VPTeamPageTitle[data-v-bf2cbdac]{padding:64px 48px 48px}}@media (min-width: 960px){.VPTeamPageTitle[data-v-bf2cbdac]{padding:80px 64px 48px}}.title[data-v-bf2cbdac]{letter-spacing:0;line-height:44px;font-size:36px;font-weight:500}@media (min-width: 768px){.title[data-v-bf2cbdac]{letter-spacing:-.5px;line-height:56px;font-size:48px}}.lead[data-v-bf2cbdac]{margin:0 auto;max-width:512px;padding-top:12px;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 768px){.lead[data-v-bf2cbdac]{max-width:592px;letter-spacing:.15px;line-height:28px;font-size:20px}}.VPTeamPageSection[data-v-b1a88750]{padding:0 32px}@media (min-width: 768px){.VPTeamPageSection[data-v-b1a88750]{padding:0 48px}}@media (min-width: 960px){.VPTeamPageSection[data-v-b1a88750]{padding:0 64px}}.title[data-v-b1a88750]{position:relative;margin:0 auto;max-width:1152px;text-align:center;color:var(--vp-c-text-2)}.title-line[data-v-b1a88750]{position:absolute;top:16px;left:0;width:100%;height:1px;background-color:var(--vp-c-divider)}.title-text[data-v-b1a88750]{position:relative;display:inline-block;padding:0 24px;letter-spacing:0;line-height:32px;font-size:20px;font-weight:500;background-color:var(--vp-c-bg)}.lead[data-v-b1a88750]{margin:0 auto;max-width:480px;padding-top:12px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.members[data-v-b1a88750]{padding-top:40px}.VPTeamMembersItem[data-v-a3462077]{display:flex;flex-direction:column;gap:2px;border-radius:12px;width:100%;height:100%;overflow:hidden}.VPTeamMembersItem.small .profile[data-v-a3462077]{padding:32px}.VPTeamMembersItem.small .data[data-v-a3462077]{padding-top:20px}.VPTeamMembersItem.small .avatar[data-v-a3462077]{width:64px;height:64px}.VPTeamMembersItem.small .name[data-v-a3462077]{line-height:24px;font-size:16px}.VPTeamMembersItem.small .affiliation[data-v-a3462077]{padding-top:4px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .desc[data-v-a3462077]{padding-top:12px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .links[data-v-a3462077]{margin:0 -16px -20px;padding:10px 0 0}.VPTeamMembersItem.medium .profile[data-v-a3462077]{padding:48px 32px}.VPTeamMembersItem.medium .data[data-v-a3462077]{padding-top:24px;text-align:center}.VPTeamMembersItem.medium .avatar[data-v-a3462077]{width:96px;height:96px}.VPTeamMembersItem.medium .name[data-v-a3462077]{letter-spacing:.15px;line-height:28px;font-size:20px}.VPTeamMembersItem.medium .affiliation[data-v-a3462077]{padding-top:4px;font-size:16px}.VPTeamMembersItem.medium .desc[data-v-a3462077]{padding-top:16px;max-width:288px;font-size:16px}.VPTeamMembersItem.medium .links[data-v-a3462077]{margin:0 -16px -12px;padding:16px 12px 0}.profile[data-v-a3462077]{flex-grow:1;background-color:var(--vp-c-bg-soft)}.data[data-v-a3462077]{text-align:center}.avatar[data-v-a3462077]{position:relative;flex-shrink:0;margin:0 auto;border-radius:50%;box-shadow:var(--vp-shadow-3)}.avatar-img[data-v-a3462077]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;object-fit:cover}.name[data-v-a3462077]{margin:0;font-weight:600}.affiliation[data-v-a3462077]{margin:0;font-weight:500;color:var(--vp-c-text-2)}.org.link[data-v-a3462077]{color:var(--vp-c-text-2);transition:color .25s}.org.link[data-v-a3462077]:hover{color:var(--vp-c-brand)}.desc[data-v-a3462077]{margin:0 auto}.desc[data-v-a3462077] a{font-weight:500;color:var(--vp-c-brand);text-decoration-style:dotted;transition:color .25s}.links[data-v-a3462077]{display:flex;justify-content:center;height:56px}.sp-link[data-v-a3462077]{display:flex;justify-content:center;align-items:center;text-align:center;padding:16px;font-size:14px;font-weight:500;color:var(--vp-c-sponsor);background-color:var(--vp-c-bg-soft);transition:color .25s,background-color .25s}.sp .sp-link.link[data-v-a3462077]:hover,.sp .sp-link.link[data-v-a3462077]:focus{outline:none;color:var(--vp-c-white);background-color:var(--vp-c-sponsor)}.sp-icon[data-v-a3462077]{margin-right:8px;width:16px;height:16px;fill:currentColor}.VPTeamMembers.small .container[data-v-04685dce]{grid-template-columns:repeat(auto-fit,minmax(224px,1fr))}.VPTeamMembers.small.count-1 .container[data-v-04685dce]{max-width:276px}.VPTeamMembers.small.count-2 .container[data-v-04685dce]{max-width:576px}.VPTeamMembers.small.count-3 .container[data-v-04685dce]{max-width:876px}.VPTeamMembers.medium .container[data-v-04685dce]{grid-template-columns:repeat(auto-fit,minmax(256px,1fr))}@media (min-width: 375px){.VPTeamMembers.medium .container[data-v-04685dce]{grid-template-columns:repeat(auto-fit,minmax(288px,1fr))}}.VPTeamMembers.medium.count-1 .container[data-v-04685dce]{max-width:368px}.VPTeamMembers.medium.count-2 .container[data-v-04685dce]{max-width:760px}.container[data-v-04685dce]{display:grid;gap:24px;margin:0 auto;max-width:1152px} diff --git a/case/case1.html b/case/case1.html index 2ca3f265..03d2e762 100644 --- a/case/case1.html +++ b/case/case1.html @@ -5,21 +5,24 @@ 自建一个TG机器人来查询服务器信息 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

自建一个TG机器人来查询服务器信息

贡献者:

项目地址:nezha_api_tgbot

镜像备份(非实时更新):nezha_api_tgbot
机器人可以通过API向面板请求服务器状态信息,得到信息后发送给用户
你可以搭建此机器人来方便地查看指定服务器的当前状态且不需要打开面板

- +
Skip to content

自建一个TG机器人来查询服务器信息

贡献者:

项目地址:nezha_api_tgbot

镜像备份(非实时更新):nezha_api_tgbot
机器人可以通过API向面板请求服务器状态信息,得到信息后发送给用户
你可以搭建此机器人来方便地查看指定服务器的当前状态且不需要打开面板

+ \ No newline at end of file diff --git a/case/case2.html b/case/case2.html index 394602d4..011f6b32 100644 --- a/case/case2.html +++ b/case/case2.html @@ -5,22 +5,25 @@ 在iOS/MacOS中使用Siri运行快捷指令查询服务器状态 | 哪吒监控 - - - - - - - - - - - + + + + + + + + + + + + + + + -
Skip to content
On this page

在iOS/MacOS中使用Siri运行快捷指令查询服务器状态

当前版本:V1.0
贡献者:

获取快捷指令

使用iPhone或iPad扫描以下二维码,获取快捷指令

coode

MacOS用户请访问这里,获取快捷指令

使用说明

  • 获取快捷指令后,打开并编辑快捷指令
  • 分别在三个文本框中填入 面板URLAPI Token服务器ID
  • 保存编辑并测试运行,能获取结果则表示设置正确
  • 修改快捷指令的名称,如修改为:“一号服务器状态”,保存后便可使用Siri指令:“嘿Siri,一号服务器状态”来获取服务器状态

WARNING

每个快捷指令只能监控一台服务器,如需要监控多个服务器,请多次复制此快捷指令并分别配置,然后分别修改快捷指令名称,如;一号服务器状态、二号服务器状态等

- +
Skip to content

在iOS/MacOS中使用Siri运行快捷指令查询服务器状态

当前版本:V1.0
贡献者:

获取快捷指令

使用iPhone或iPad扫描以下二维码,获取快捷指令

coode

MacOS用户请访问这里,获取快捷指令

使用说明

  • 获取快捷指令后,打开并编辑快捷指令
  • 分别在三个文本框中填入 面板URLAPI Token服务器ID
  • 保存编辑并测试运行,能获取结果则表示设置正确
  • 修改快捷指令的名称,如修改为:“一号服务器状态”,保存后便可使用Siri指令:“嘿Siri,一号服务器状态”来获取服务器状态

WARNING

每个快捷指令只能监控一台服务器,如需要监控多个服务器,请多次复制此快捷指令并分别配置,然后分别修改快捷指令名称,如;一号服务器状态、二号服务器状态等

+ \ No newline at end of file diff --git a/case/case3.html b/case/case3.html index 7a4aa6d6..af7a229b 100644 --- a/case/case3.html +++ b/case/case3.html @@ -5,21 +5,24 @@ 自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人

贡献者:

项目地址:nezha_telegram_bot

镜像备份(非实时更新):nezha_telegram_bot

项目特色

开源Telegram机器人项目,可以基于API实时查询哪吒面板的服务器信息。

  • [x] 支持中/英多语言切换
  • [x] 支持分组统计(CPU、磁盘、内存、上下行速度、流量统计等)
  • [x] 支持实时刷新单个服务器数据
  • [x] 支持键盘互动查询
  • [x] 支持命令直接查询
  • [x] 增加群聊判断,限制群聊可发送命令
  • [x] 增加群聊内5秒自动删除信息
  • [x] 支持docker部署

命令列表

命令功能仅私聊
start开始使用键盘主菜单✔️
help帮助列表
add添加面板链接和token✔️
url添加面板链接✔️
token添加面板token✔️
info获取保存的面板链接和token✔️
delete删除保存的面板链接和token✔️
id命令后面添加整数id,来进行单个服务器信息查询(私聊带刷新按钮,群聊不带)
all查询所有服务器的统计信息
search在服务器名字中搜索关键字(支持多个,用空格分开)

效果展示

imageimage

- +
Skip to content

自建使用 API 来进行查询,且支持多语言的 Telegram 查询机器人

贡献者:

项目地址:nezha_telegram_bot

镜像备份(非实时更新):nezha_telegram_bot

项目特色

开源Telegram机器人项目,可以基于API实时查询哪吒面板的服务器信息。

  • [x] 支持中/英多语言切换
  • [x] 支持分组统计(CPU、磁盘、内存、上下行速度、流量统计等)
  • [x] 支持实时刷新单个服务器数据
  • [x] 支持键盘互动查询
  • [x] 支持命令直接查询
  • [x] 增加群聊判断,限制群聊可发送命令
  • [x] 增加群聊内5秒自动删除信息
  • [x] 支持docker部署

命令列表

命令功能仅私聊
start开始使用键盘主菜单✔️
help帮助列表
add添加面板链接和token✔️
url添加面板链接✔️
token添加面板token✔️
info获取保存的面板链接和token✔️
delete删除保存的面板链接和token✔️
id命令后面添加整数id,来进行单个服务器信息查询(私聊带刷新按钮,群聊不带)
all查询所有服务器的统计信息
search在服务器名字中搜索关键字(支持多个,用空格分开)

效果展示

imageimage

+ \ No newline at end of file diff --git a/case/case4.html b/case/case4.html index 39ca780e..40126239 100644 --- a/case/case4.html +++ b/case/case4.html @@ -5,21 +5,24 @@ 重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑



2

还在因为自己的小鸡配置太差被朋友嘲笑吗?
还在想参加以针会友活动却因为小鸡不够排面而觉得羞耻吗?
还在因为在哪吒TG群里机器人排名太低而觉得自己低人一等吗?


今天开始!找回自信!

来自南京的名老中医 dysf888 独家秘方!让你找回男人本色,激情畅享!
安装 Fake Agent,可随意修改服务器监测数据的倍数上传到 Dashboard,让你的小鸡 脱!胎!换!骨! 让你在 MJJ 面前起来!

镜像备份(非实时更新):Fake Agent

哪吒监控创始人奶爸也在用:
5


男人用了都说好:
6
4



1

- +
Skip to content

重磅推荐!一秒拥有宇宙级算力!让你在人前,不!再!自!卑



2

还在因为自己的小鸡配置太差被朋友嘲笑吗?
还在想参加以针会友活动却因为小鸡不够排面而觉得羞耻吗?
还在因为在哪吒TG群里机器人排名太低而觉得自己低人一等吗?


今天开始!找回自信!

来自南京的名老中医 dysf888 独家秘方!让你找回男人本色,激情畅享!
安装 Fake Agent,可随意修改服务器监测数据的倍数上传到 Dashboard,让你的小鸡 脱!胎!换!骨! 让你在 MJJ 面前起来!

镜像备份(非实时更新):Fake Agent

哪吒监控创始人奶爸也在用:
5


男人用了都说好:
6
4



1

+ \ No newline at end of file diff --git a/case/case5.html b/case/case5.html index 803b9688..d2183c7e 100644 --- a/case/case5.html +++ b/case/case5.html @@ -5,67 +5,70 @@ 使用 Argo 隧道的哪吒服务端 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

使用 Argo 隧道的哪吒服务端

贡献者:

项目地址:Argo-Nezha-Service-Container

镜像备份(非实时更新):Argo-Nezha-Service-Container


目录


项目特点:

  • 适用范围更广 --- 只要能连通网络,就能安装哪吒服务端,如 LXC, OpenVZ VPS,Nas 虚拟机 , Container PaaS 等
  • Argo 隧道突破需要公网入口的限制 --- 传统的哪吒需要有两个公网端口,一个用于面板的访问,另一个用于客户端上报数据,本项目借用 Cloudflare Argo 隧道,使用内网穿透的办法
  • IPv4 / v6 具备更高的灵活性 --- 传统哪吒需要处理服务端和客户端的 IPv4/v6 兼容性问题,还需要通过 warp 等工具来解决不对应的情况。然而,本项目可以完全不需要考虑这些问题,可以任意对接,更加方便和简便
  • 一条 Argo 隧道分流多个域名和协议 --- 建立一条内网穿透的 Argo 隧道,即可分流三个域名(hostname)和协议(protocal),分别用于面板的访问(http),客户端上报数据(tcp)和 ssh(可选)
  • GrpcWebProxy 反向代理的 gRPC 数据端口 --- 配上证书做 tls 终结,然后 Argo 的隧道配置用 https 服务指向这个反向代理,启用http2回源,grpc(nezha)->GrpcWebProxy->h2(argo)->cf cdn edge->agent
  • 每天自动备份 --- 北京时间每天 4 时 0 分自动备份整个哪吒面板文件夹到指定的 github 私库,包括面板主题,面板设置,探针数据和隧道信息,备份保留近 5 天数据;鉴于内容十分重要,必须要放在私库
  • 每天自动更新面板 -- 北京时间每天 4 时 0 分自动检测最新的官方面板版本,有升级时自动更新
  • 手/自一体还原备份 --- 每分钟检测一次在线还原文件的内容,遇到有更新立刻还原
  • 默认内置本机探针 --- 能很方便的监控自身服务器信息
  • 数据更安全 --- Argo 隧道使用TLS加密通信,可以将应用程序流量安全地传输到 Cloudflare 网络,提高了应用程序的安全性和可靠性。此外,Argo Tunnel也可以防止IP泄露和DDoS攻击等网络威胁
image

准备需要用的变量

  • 到 Cloudflare 官网,选择使用的域名,打开 网络 选项将 gRPC 开关打开
image

面板域名加上 https:// 开头,回调地址再加上 /oauth2/callback 结尾

imageimageimageimageimage

Argo 认证的获取方式: json 或 token

Argo 隧道认证方式有 json 和 token,使用两个方式其中之一。推荐前者,理由脚本会处理好所有的 Argo 隧道参数和路径,后者需要到 Cloudflare 官网手动设置,容易出错。

(方式 1 - Json):

通过 Cloudflare Json 生成网轻松获取 Argo 隧道 json 信息: https://fscarmen.cloudflare.now.cc

image

(方式 2 - Token): 通过 Cloudflare 官网,手动生成 Argo 隧道 token 信息

到 cf 官网:https://dash.cloudflare.com/

  • 进入 zero trust 里生成 token 隧道和信息。
  • 其中数据路径 443/https 为 proto.NezhaService
  • ssh 路径 22/ssh 为 < client id >
imageimageimageimageimageimageimage

PaaS 部署实例

镜像 fscarmen/argo-nezha:latest , 支持 amd64 和 arm64 架构

用到的变量

变量名是否必须备注
GH_USERgithub 的用户名,用于面板管理授权
GH_CLIENTID在 github 上申请
GH_CLIENTSECRET在 github 上申请
GH_BACKUP_USER在 github 上备份哪吒服务端数据库的 github 用户名,不填则与面板管理授权的账户 GH_USER 一致
GH_REPO在 github 上备份哪吒服务端数据库文件的 github 库
GH_EMAILgithub 的邮箱,用于备份的 git 推送到远程库
GH_PATgithub 的 PAT
ARGO_AUTHJson: 从 https://fscarmen.cloudflare.now.cc 获取的 Argo Json
Token: 从 Cloudflare 官网获取
ARGO_DOMAINArgo 域名

Koyeb

Deploy to Koyeb

imageimageimageimageimage

VPS 部署方式 1 --- docker

  • 注意: ARGO_DOMAIN= 后面需要有单引号,不能去掉
  • 如果 VPS 是 IPv6 only 的,请先安装 WARP IPv4 或者双栈: https://gitlab.com/fscarmen/warp
  • 备份目录为当前路径的 dashboard 文件夹

docker 部署

docker run -dit \
-           --name nezha_dashboard \
-           --pull always \
-           --restart always \
-           -e GH_USER=<填 github 用户名> \
-           -e GH_EMAIL=<填 github 邮箱> \
-           -e GH_PAT=<填获取的> \
-           -e GH_REPO=<填自定义的> \
-           -e GH_CLIENTID=<填获取的>  \
-           -e GH_CLIENTSECRET=<填获取的> \
-           -e ARGO_AUTH='<填获取的 Argo json 或者 token>' \
-           -e ARGO_DOMAIN=<填自定义的> \
-           -e GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量> \
-           fscarmen/argo-nezha

docker-compose 部署

version: '3.8'
-services:
-    argo-nezha:
-        image: fscarmen/argo-nezha
-        pull: always
-        container_name: nezha_dashboard
-        restart: always
-        environment:
-            - GH_USER=<填 github 用户名>
-            - GH_EMAIL=<<填 github 邮箱>
-            - GH_PAT=<填获取的>
-            - GH_REPO=<填自定义的>
-            - GH_CLIENTID=<填获取的>
-            - GH_CLIENTSECRET=<填获取的>
-            - ARGO_AUTH='<填获取的 Argo json 或者 token>'
-            - ARGO_DOMAIN=<填自定义的>
-            - GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量>

VPS 部署方式 2 --- 宿主机

bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)

客户端接入

通过gRPC传输,无需额外配置。使用面板给到的安装方式,举例

curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent nezha.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls

SSH 接入

<file path>/cloudflared access ssh --hostname nezha.seales.nom.za/<GH_CLIENTID>
imageimageimage

手动备份数据

方法一: 把 Github 备份库里的 README.md 文件内容改为 backup

image

方法二: ssh 进去后,容器版本运行 /dashboard/backup.sh; 非容器版本运行 /opt/nezha/dashboard/backup.sh

自动还原备份

  • 把需要还原的文件名改到 github 备份库里的 README.md,定时服务会每分钟检测更新,并把上次同步的文件名记录在本地 /dbfile 处以与在线的文件内容作比对

下图为以还原文件名为 dashboard-2023-04-23-13:08:37.tar.gz 作示例

image

手动还原备份

  • ssh 进入容器后运行,github 备份库里的 tar.gz 文件名,格式: dashboard-2023-04-22-21:42:10.tar.gz
bash /dashboard/restore.sh <文件名>
image

完美搬家

  • 备份原哪吒的 /dashboard 文件夹,压缩备份为 dashboard.tar.gz 文件
tar czvf dashboard.tar.gz /dashboard
  • 下载文件并放入私库,这个私库名要与新哪吒 <GH_REPO> 完全一致,并把该库的 README.md 的内容编辑为 dashboard.tar.gz
  • 部署本项目新哪吒,完整填入变量即可。部署完成后,自动还原脚本会每分钟作检测,发现有新的内容即会自动还原,全程约 3 分钟

主体目录文件及说明

/dashboard/
-|-- app                  # 哪吒面板主程序
-|-- argo.json            # Argo 隧道 json 文件,记录着使用隧道的信息
-|-- argo.yml             # Argo 隧道 yml 文件,用于在一同隧道下,根据不同域名来分流 web, gRPC 和 ssh 协议的作用
-|-- backup.sh            # 备份数据脚本
-|-- restore.sh           # 还原备份脚本
-|-- dbfile               # 记录最新的还原或备份文件名
-|-- resource             # 面板主题、语言和旗帜等资料的文件夹
-|-- data
-|   |-- config.yaml      # 哪吒面板的配置,如 Github OAuth2 / gRPC 域名 / 端口 / 是否启用 TLS 等信息
-|   `-- sqlite.db        # SQLite 数据库文件,记录着面板设置的所有 severs 和 cron 等信息
-|-- entrypoint.sh        # 主脚本,容器运行后执行
-|-- nezha.csr            # SSL/TLS 证书签名请求
-|-- nezha.key            # SSL/TLS 证书的私钥信息
-|-- nezha.pem            # SSL/TLS 证书文件
-|-- cloudflared          # Cloudflare Argo 隧道主程序
-|-- grpcwebproxy         # gRPC 反代主程序
-`-- nezha-agent          # 哪吒客户端,用于监控本地 localhost

鸣谢下列作者的文章和项目:

免责声明:

  • 本程序仅供学习了解, 非盈利目的,请于下载后 24 小时内删除, 不得用作任何商业用途, 文字、数据及图片均有所属版权, 如转载须注明来源。
  • 使用本程序必循遵守部署免责声明。使用本程序必循遵守部署服务器所在地、所在国家和用户所在国家的法律法规, 程序作者不对使用者任何不当行为负责。
- +
Skip to content

使用 Argo 隧道的哪吒服务端

贡献者:

项目地址:Argo-Nezha-Service-Container

镜像备份(非实时更新):Argo-Nezha-Service-Container


目录


项目特点:

  • 适用范围更广 --- 只要能连通网络,就能安装哪吒服务端,如 LXC, OpenVZ VPS,Nas 虚拟机 , Container PaaS 等
  • Argo 隧道突破需要公网入口的限制 --- 传统的哪吒需要有两个公网端口,一个用于面板的访问,另一个用于客户端上报数据,本项目借用 Cloudflare Argo 隧道,使用内网穿透的办法
  • IPv4 / v6 具备更高的灵活性 --- 传统哪吒需要处理服务端和客户端的 IPv4/v6 兼容性问题,还需要通过 warp 等工具来解决不对应的情况。然而,本项目可以完全不需要考虑这些问题,可以任意对接,更加方便和简便
  • 一条 Argo 隧道分流多个域名和协议 --- 建立一条内网穿透的 Argo 隧道,即可分流三个域名(hostname)和协议(protocal),分别用于面板的访问(http),客户端上报数据(tcp)和 ssh(可选)
  • GrpcWebProxy 反向代理的 gRPC 数据端口 --- 配上证书做 tls 终结,然后 Argo 的隧道配置用 https 服务指向这个反向代理,启用http2回源,grpc(nezha)->GrpcWebProxy->h2(argo)->cf cdn edge->agent
  • 每天自动备份 --- 北京时间每天 4 时 0 分自动备份整个哪吒面板文件夹到指定的 github 私库,包括面板主题,面板设置,探针数据和隧道信息,备份保留近 5 天数据;鉴于内容十分重要,必须要放在私库
  • 每天自动更新面板 -- 北京时间每天 4 时 0 分自动检测最新的官方面板版本,有升级时自动更新
  • 手/自一体还原备份 --- 每分钟检测一次在线还原文件的内容,遇到有更新立刻还原
  • 默认内置本机探针 --- 能很方便的监控自身服务器信息
  • 数据更安全 --- Argo 隧道使用TLS加密通信,可以将应用程序流量安全地传输到 Cloudflare 网络,提高了应用程序的安全性和可靠性。此外,Argo Tunnel也可以防止IP泄露和DDoS攻击等网络威胁
image

准备需要用的变量

  • 到 Cloudflare 官网,选择使用的域名,打开 网络 选项将 gRPC 开关打开
image

面板域名加上 https:// 开头,回调地址再加上 /oauth2/callback 结尾

imageimageimageimageimage

Argo 认证的获取方式: json 或 token

Argo 隧道认证方式有 json 和 token,使用两个方式其中之一。推荐前者,理由脚本会处理好所有的 Argo 隧道参数和路径,后者需要到 Cloudflare 官网手动设置,容易出错。

(方式 1 - Json):

通过 Cloudflare Json 生成网轻松获取 Argo 隧道 json 信息: https://fscarmen.cloudflare.now.cc

image

(方式 2 - Token): 通过 Cloudflare 官网,手动生成 Argo 隧道 token 信息

到 cf 官网:https://dash.cloudflare.com/

  • 进入 zero trust 里生成 token 隧道和信息。
  • 其中数据路径 443/https 为 proto.NezhaService
  • ssh 路径 22/ssh 为 < client id >
imageimageimageimageimageimageimage

PaaS 部署实例

镜像 fscarmen/argo-nezha:latest , 支持 amd64 和 arm64 架构

用到的变量

变量名是否必须备注
GH_USERgithub 的用户名,用于面板管理授权
GH_CLIENTID在 github 上申请
GH_CLIENTSECRET在 github 上申请
GH_BACKUP_USER在 github 上备份哪吒服务端数据库的 github 用户名,不填则与面板管理授权的账户 GH_USER 一致
GH_REPO在 github 上备份哪吒服务端数据库文件的 github 库
GH_EMAILgithub 的邮箱,用于备份的 git 推送到远程库
GH_PATgithub 的 PAT
ARGO_AUTHJson: 从 https://fscarmen.cloudflare.now.cc 获取的 Argo Json
Token: 从 Cloudflare 官网获取
ARGO_DOMAINArgo 域名

Koyeb

Deploy to Koyeb

imageimageimageimageimage

VPS 部署方式 1 --- docker

  • 注意: ARGO_DOMAIN= 后面需要有单引号,不能去掉
  • 如果 VPS 是 IPv6 only 的,请先安装 WARP IPv4 或者双栈: https://gitlab.com/fscarmen/warp
  • 备份目录为当前路径的 dashboard 文件夹

docker 部署

docker run -dit \
+           --name nezha_dashboard \
+           --pull always \
+           --restart always \
+           -e GH_USER=<填 github 用户名> \
+           -e GH_EMAIL=<填 github 邮箱> \
+           -e GH_PAT=<填获取的> \
+           -e GH_REPO=<填自定义的> \
+           -e GH_CLIENTID=<填获取的>  \
+           -e GH_CLIENTSECRET=<填获取的> \
+           -e ARGO_AUTH='<填获取的 Argo json 或者 token>' \
+           -e ARGO_DOMAIN=<填自定义的> \
+           -e GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量> \
+           fscarmen/argo-nezha

docker-compose 部署

version: '3.8'
+services:
+    argo-nezha:
+        image: fscarmen/argo-nezha
+        pull: always
+        container_name: nezha_dashboard
+        restart: always
+        environment:
+            - GH_USER=<填 github 用户名>
+            - GH_EMAIL=<<填 github 邮箱>
+            - GH_PAT=<填获取的>
+            - GH_REPO=<填自定义的>
+            - GH_CLIENTID=<填获取的>
+            - GH_CLIENTSECRET=<填获取的>
+            - ARGO_AUTH='<填获取的 Argo json 或者 token>'
+            - ARGO_DOMAIN=<填自定义的>
+            - GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量>

VPS 部署方式 2 --- 宿主机

bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)

客户端接入

通过gRPC传输,无需额外配置。使用面板给到的安装方式,举例

curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent nezha.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls

SSH 接入

<file path>/cloudflared access ssh --hostname nezha.seales.nom.za/<GH_CLIENTID>
imageimageimage

手动备份数据

方法一: 把 Github 备份库里的 README.md 文件内容改为 backup

image

方法二: ssh 进去后,容器版本运行 /dashboard/backup.sh; 非容器版本运行 /opt/nezha/dashboard/backup.sh

自动还原备份

  • 把需要还原的文件名改到 github 备份库里的 README.md,定时服务会每分钟检测更新,并把上次同步的文件名记录在本地 /dbfile 处以与在线的文件内容作比对

下图为以还原文件名为 dashboard-2023-04-23-13:08:37.tar.gz 作示例

image

手动还原备份

  • ssh 进入容器后运行,github 备份库里的 tar.gz 文件名,格式: dashboard-2023-04-22-21:42:10.tar.gz
bash /dashboard/restore.sh <文件名>
image

完美搬家

  • 备份原哪吒的 /dashboard 文件夹,压缩备份为 dashboard.tar.gz 文件
tar czvf dashboard.tar.gz /dashboard
  • 下载文件并放入私库,这个私库名要与新哪吒 <GH_REPO> 完全一致,并把该库的 README.md 的内容编辑为 dashboard.tar.gz
  • 部署本项目新哪吒,完整填入变量即可。部署完成后,自动还原脚本会每分钟作检测,发现有新的内容即会自动还原,全程约 3 分钟

主体目录文件及说明

/dashboard/
+|-- app                  # 哪吒面板主程序
+|-- argo.json            # Argo 隧道 json 文件,记录着使用隧道的信息
+|-- argo.yml             # Argo 隧道 yml 文件,用于在一同隧道下,根据不同域名来分流 web, gRPC 和 ssh 协议的作用
+|-- backup.sh            # 备份数据脚本
+|-- restore.sh           # 还原备份脚本
+|-- dbfile               # 记录最新的还原或备份文件名
+|-- resource             # 面板主题、语言和旗帜等资料的文件夹
+|-- data
+|   |-- config.yaml      # 哪吒面板的配置,如 Github OAuth2 / gRPC 域名 / 端口 / 是否启用 TLS 等信息
+|   `-- sqlite.db        # SQLite 数据库文件,记录着面板设置的所有 severs 和 cron 等信息
+|-- entrypoint.sh        # 主脚本,容器运行后执行
+|-- nezha.csr            # SSL/TLS 证书签名请求
+|-- nezha.key            # SSL/TLS 证书的私钥信息
+|-- nezha.pem            # SSL/TLS 证书文件
+|-- cloudflared          # Cloudflare Argo 隧道主程序
+|-- grpcwebproxy         # gRPC 反代主程序
+`-- nezha-agent          # 哪吒客户端,用于监控本地 localhost

鸣谢下列作者的文章和项目:

免责声明:

  • 本程序仅供学习了解, 非盈利目的,请于下载后 24 小时内删除, 不得用作任何商业用途, 文字、数据及图片均有所属版权, 如转载须注明来源。
  • 使用本程序必循遵守部署免责声明。使用本程序必循遵守部署服务器所在地、所在国家和用户所在国家的法律法规, 程序作者不对使用者任何不当行为负责。
+ \ No newline at end of file diff --git a/case/index.html b/case/index.html index e57f506c..cc844b9b 100644 --- a/case/index.html +++ b/case/index.html @@ -5,21 +5,24 @@ 哪吒监控 | 社区项目 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content

哪吒监控社区项目

社区贡献的相关项目

为哪吒监控提供了更多扩展

提交项目

我们欢迎您提交自己的项目,请加入TG群联系管理员了解相关事宜

注意事项

所有项目均由社区成员贡献,请您知悉哪吒监控团队无法为社区项目承担包括且不限于:保修、可用性、安全性等责任

- +
Skip to content

哪吒监控社区项目

社区贡献的相关项目

为哪吒监控提供了更多扩展

+ \ No newline at end of file diff --git a/developer/index.html b/developer/index.html index 96ac92ca..c2b1b715 100644 --- a/developer/index.html +++ b/developer/index.html @@ -5,21 +5,24 @@ 哪吒监控 | 开发手册 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content

开发手册

哪吒监控开发手册

我们欢迎你提出高质量的Pull Request,帮助哪吒监控变得更好!

- +
Skip to content

开发手册

哪吒监控开发手册

我们欢迎你提出高质量的Pull Request,帮助哪吒监控变得更好!

+ \ No newline at end of file diff --git a/developer/l10n.html b/developer/l10n.html index 04a99064..824f77bf 100644 --- a/developer/l10n.html +++ b/developer/l10n.html @@ -3,23 +3,26 @@ - 哪吒监控 | 哪吒监控 + 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

哪吒监控的 Dashboard 已经添加本地化,支持多个语言,你可以在开发新功能时遵循以下步骤来支持本地化

介绍

  1. 你可以直接使用 /resource/l10n/zh-CN.toml 中已有的文本配置来替换新功能中的文本
  2. 如果新功能中有新增文本,请参考 zh-CN.toml 的配置文本,将新文本拉取到 zh-CN.toml 等其他语言的配置文件中,并添加翻译

新本地化文本的添加

  1. /resource/l10n/ 中添加新的语言文本配置
  2. 在新的语言文本配置中拉取其他语言已有的文本配置
  3. 为新的语言文本配置添加翻译
- +
Skip to content

哪吒监控的 Dashboard 已经添加本地化,支持多个语言,你可以在开发新功能时遵循以下步骤来支持本地化

介绍

  1. 你可以直接使用 /resource/l10n/zh-CN.toml 中已有的文本配置来替换新功能中的文本
  2. 如果新功能中有新增文本,请参考 zh-CN.toml 的配置文本,将新文本拉取到 zh-CN.toml 等其他语言的配置文件中,并添加翻译

新本地化文本的添加

  1. /resource/l10n/ 中添加新的语言文本配置
  2. 在新的语言文本配置中拉取其他语言已有的文本配置
  3. 为新的语言文本配置添加翻译
+ \ No newline at end of file diff --git a/developer/theme.html b/developer/theme.html index 770aec65..2da939f4 100644 --- a/developer/theme.html +++ b/developer/theme.html @@ -3,23 +3,26 @@ - 哪吒监控 | 哪吒监控 + 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

哪吒主题开发环境

哪吒面板提供了主题开发环境,你可以使用它来创建新的哪吒监控主题

WARNING

请注意: 此开发环境仅支持 dashboard v0.13.16 及更新版本。

使用说明

  1. 克隆此仓库到本地
  2. 修改 data/config.yaml 中的 Oauth2 配置(回调连接可以填 http://localhost
  3. 运行 docker-compose up
  4. 开始开发
  5. 主题制作完成之后可以将 theme-custom 放置到服务器上的 /opt/nezha/dashboard/theme-custom 位置

FAQ

  • 如果不能使用 80 端口,在 docker-compose.yaml 中修改配置。
- +
Skip to content

哪吒主题开发环境

哪吒面板提供了主题开发环境,你可以使用它来创建新的哪吒监控主题

WARNING

请注意: 此开发环境仅支持 dashboard v0.13.16 及更新版本。

使用说明

  1. 克隆此仓库到本地
  2. 修改 data/config.yaml 中的 Oauth2 配置(回调连接可以填 http://localhost
  3. 运行 docker-compose up
  4. 开始开发
  5. 主题制作完成之后可以将 theme-custom 放置到服务器上的 /opt/nezha/dashboard/theme-custom 位置

FAQ

  • 如果不能使用 80 端口,在 docker-compose.yaml 中修改配置。
+ \ No newline at end of file diff --git a/en_US/case/case1.html b/en_US/case/case1.html index ceff2925..5e445c91 100644 --- a/en_US/case/case1.html +++ b/en_US/case/case1.html @@ -5,21 +5,24 @@ Build your own Telegram bot to query server information | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Build your own Telegram bot to query server information

Contributors:

Project: nezha_api_tgbot (Chinese)

Mirror backup, non-real-time update: nezha_api_tgbot (Chinese)

The bot can request server status information from the Dashboard through the API, and then send the information to the user.
You can build this bot to easily view the current status of a given server without opening the Dashboard.

- +
Skip to content

Build your own Telegram bot to query server information

Contributors:

Project: nezha_api_tgbot (Chinese)

Mirror backup, non-real-time update: nezha_api_tgbot (Chinese)

The bot can request server status information from the Dashboard through the API, and then send the information to the user.
You can build this bot to easily view the current status of a given server without opening the Dashboard.

+ \ No newline at end of file diff --git a/en_US/case/case2.html b/en_US/case/case2.html index 2e588a05..19fe9d10 100644 --- a/en_US/case/case2.html +++ b/en_US/case/case2.html @@ -5,22 +5,25 @@ Use Siri to run shortcut to check server status in iOS/MacOS | Nezha Monitoring - - - - - - - - - - - + + + + + + + + + + + + + + + -
Skip to content
On this page

Use Siri to run shortcut to check server status in iOS/MacOS

Current Version:V1.0 (Chinese)
Contributor:

Get shortcut command

Scan the following QR code with your iPhone or iPad to get the shortcut

coode


MacOS users please visit here to get the shortcut

How to use

  • After getting the shortcut, open and edit the shortcut
  • Fill in Dashboard URL, API Token, Server ID in the three text boxes
  • Save the edit and test run, if you can get the result, the setting is correct.
  • Modify the name of the shortcut, such as: Server Status, then you can use Siri command: "Hey Siri, Server Status" to get the server status.

WARNING

Each shortcut can only monitor one server, if you need to monitor more than one server, please copy this shortcut several times and configure them separately, then modify the shortcut name separately, such as; Server 1 Status, Server 2 Status, etc.

- +
Skip to content

Use Siri to run shortcut to check server status in iOS/MacOS

Current Version:V1.0 (Chinese)
Contributor:

Get shortcut command

Scan the following QR code with your iPhone or iPad to get the shortcut

coode


MacOS users please visit here to get the shortcut

How to use

  • After getting the shortcut, open and edit the shortcut
  • Fill in Dashboard URL, API Token, Server ID in the three text boxes
  • Save the edit and test run, if you can get the result, the setting is correct.
  • Modify the name of the shortcut, such as: Server Status, then you can use Siri command: "Hey Siri, Server Status" to get the server status.

WARNING

Each shortcut can only monitor one server, if you need to monitor more than one server, please copy this shortcut several times and configure them separately, then modify the shortcut name separately, such as; Server 1 Status, Server 2 Status, etc.

+ \ No newline at end of file diff --git a/en_US/case/case3.html b/en_US/case/case3.html index d48cb26e..27d73c84 100644 --- a/en_US/case/case3.html +++ b/en_US/case/case3.html @@ -5,21 +5,24 @@ Build your own server status query Telegram bot with multi-language and multi-user support | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Build your own server status query Telegram bot with multi-language and multi-user support

Contributor:

GitHub project: nezha_telegram_bot(English is already supported)

Mirror backup, non-real-time update : nezha_telegram_bot(English is already supported)

Features

  • [x] Support Chinese/English multi-language switch
  • [x] Support tag statistics (CPU, disk, memory, upstream and downstream speed, traffic statistics, etc.)
  • [x] Support real-time refresh of single server data
  • [x] Support keyboard interactive query
  • [x] Support query by command
  • [x] Support adding bot to group, privacy protection of bot replies in group chat
  • [x] Support bot messages automatic deletion in group chat within 20 seconds
  • [x] Support docker deployment

Commands list

CommandDescriptionPrivate chat only
startGetting started with the keyboard main menu✔️
helphelp message
addAdd Nezha monitoring url link and token✔️
urlAdd Nezha monitoring url link✔️
tokenAdd Nezha monitoring token✔️
infoGet saved Nezha monitoring url link and token✔️
deleteDelete saved Nezha monitoring url link and token✔️
idAdd an integer id after the command to query the information of a single server (refresh button only available in private chat)
allQuery statistics for all servers
searchSearch for keywords in server names (multiple keywords supported, split by spaces)
- +
Skip to content

Build your own server status query Telegram bot with multi-language and multi-user support

Contributor:

GitHub project: nezha_telegram_bot(English is already supported)

Mirror backup, non-real-time update : nezha_telegram_bot(English is already supported)

Features

  • [x] Support Chinese/English multi-language switch
  • [x] Support tag statistics (CPU, disk, memory, upstream and downstream speed, traffic statistics, etc.)
  • [x] Support real-time refresh of single server data
  • [x] Support keyboard interactive query
  • [x] Support query by command
  • [x] Support adding bot to group, privacy protection of bot replies in group chat
  • [x] Support bot messages automatic deletion in group chat within 20 seconds
  • [x] Support docker deployment

Commands list

CommandDescriptionPrivate chat only
startGetting started with the keyboard main menu✔️
helphelp message
addAdd Nezha monitoring url link and token✔️
urlAdd Nezha monitoring url link✔️
tokenAdd Nezha monitoring token✔️
infoGet saved Nezha monitoring url link and token✔️
deleteDelete saved Nezha monitoring url link and token✔️
idAdd an integer id after the command to query the information of a single server (refresh button only available in private chat)
allQuery statistics for all servers
searchSearch for keywords in server names (multiple keywords supported, split by spaces)
+ \ No newline at end of file diff --git a/en_US/case/case4.html b/en_US/case/case4.html index cf45be3c..be33aec7 100644 --- a/en_US/case/case4.html +++ b/en_US/case/case4.html @@ -5,21 +5,24 @@ Fake-agent, monitoring data cheater | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + - - + + \ No newline at end of file diff --git a/en_US/case/case5.html b/en_US/case/case5.html index 5e8976d0..56bd0a6c 100644 --- a/en_US/case/case5.html +++ b/en_US/case/case5.html @@ -5,67 +5,70 @@ Nezha server over Argo tunnel | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Nezha server over Argo tunnel

Contributors:

GitHub project: Argo-Nezha-Service-Container

Mirror backup (not live update): Argo-Nezha-Service-Container


Catalog


Project Features.

  • Wider scope of application --- As long as there is a network connection, Nezha server can be installed, such as LXC, OpenVZ VPS, Nas Virtual Machine, Container PaaS, etc.
  • Argo tunnel breaks through the restriction of requiring a public network portal --- The traditional Nezha requires two public network ports, one for panel visiting and the other for client reporting, this project uses Cloudflare Argo tunnels and uses intranet tunneling.
  • IPv4 / v6 with higher flexibility --- The traditional Nezha needs to deal with IPv4/v6 compatibility between server and client, and also needs to resolve mismatches through tools such as warp. However, this project does not need to consider these issues at all, and can be docked arbitrarily, which is much more convenient and easy!
  • One Argo tunnel for multiple domains and protocols --- Create an intranet-penetrating Argo tunnel for three domains (hostname) and protocols, which can be used for panel access (http), client reporting (tcp) and ssh (optional).
  • GrpcWebProxy reverse proxy gRPC data port --- with a certificate for tls termination, then Argo's tunnel configuration with https service pointing to this reverse proxy, enable http2 back to the source, grpc(nezha)->GrpcWebProxy->h2(argo)->cf cdn edge->agent
  • Daily automatic backup --- every day at 04:00 BST, the entire Nezha panel folder is automatically backed up to a designated private github repository, including panel themes, panel settings, probe data and tunnel information, the backup retains nearly 5 days of data; the content is so important that it must be placed in the private repository.
  • Automatic daily panel update -- the latest official panel version is automatically detected every day at 4:00 BST, and updated when there is an upgrade.
  • Manual/automatic restore backup --- check the content of online restore file once a minute, and restore immediately when there is any update.
  • Default built-in local probes --- can easily monitor their own server information
  • More secure data --- Argo Tunnel uses TLS encrypted communication to securely transmit application traffic to the Cloudflare network, improving application security and reliability. In addition, Argo Tunnel protects against network threats such as IP leaks and DDoS attacks.
image

Prepare variables to be used

  • Visit the Cloudflare website, select the domain name you want to use, and turn on the network option to turn the gRPC switch on.
image

Add https:// to the beginning of the panel's domain name and /oauth2/callback to the end of the callback address.

imageimageimageimageimage

How to get Argo authentication: json or token

Argo tunnel authentication methods include json and token, use one of the two methods. The former is recommended because the script will handle all the Argo tunnel parameters and paths, while the latter needs to be set manually on the Cloudflare website and is prone to errors.

(Methods 1 - Json):

Easily get Argo tunnel json information through Cloudflare Json Generation Network: https://fscarmen.cloudflare.now.cc

image

(Methods 2 - Token): Manually generate Argo tunnel token information via Cloudflare website.

Go to the cf website: https://dash.cloudflare.com/

  • Go to zero trust and generate token tunnel and message.
  • The data path 443/https is proto.
  • ssh path 22/ssh for < client id >.
imageimageimageimageimageimageimage

PaaS Deployment Example

Image fscarmen/argo-nezha:latest, supports amd64 and arm64 architectures.

Variables used

Variable NameRequiredRemarks
GH_USERYesgithub username for panel admin authorization
GH_CLIENTIDyesapply on github
GH_CLIENTSECRETyesapply on github
GH_BACKUP_USERNoThe github username for backing up Nezha's server-side database on github, if not filled in, it is the same as the account GH_USER for panel management authorization
GH_REPONoThe github repository for backing up Nezha's server-side database files on github
GH_EMAILNogithub's mailbox for git push backups to remote repositories
GH_PATNogithub's PAT
ARGO_AUTHYesArgo Json from https://fscarmen.cloudflare.now.cc
Argo token from Cloudflare official website
ARGO_DOMAINYesArgo domain

Koyeb

Deploy to Koyeb

imageimageimageimageimage

VPS Deployment Method 1 --- docker

  • Note: ARGO_DOMAIN= must be followed by single quotes, which cannot be removed.
  • If the VPS is IPv6 only, please install WARP IPv4 or dual-stack first: https://github.com/fscarmen/warp
  • The backup directory is the dashboard folder in the current path.

docker deployment

docker run -dit \
-           --name nezha_dashboard \
-           --pull always \
-           --restart always \
-           -e GH_USER=<fill in github username> \
-           -e GH_EMAIL=<fill in github email> \
-           -e GH_PAT=<fill in the obtained> \
-           -e GH_REPO=<fill in customized> \
-           -e GH_CLIENTID=<fill in acquired> \
-           -e GH_CLIENTSECRET=<fill in acquired> \
-           -e ARGO_AUTH='<Fill in the fetched Argo json or token>' \
-           -e ARGO_DOMAIN=<fill in customized> \
-           -e GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank> \
-           fscarmen/argo-nezha

docker-compose deployment

version: '3.8'
-services.
-    argo-nezha.
-        image: fscarmen/argo-nezha
-        --pull always
-        container_name: nezha_dashboard
-        restart: always
-        environment:
-            - GH_USER=<fill in github username>
-            - GH_EMAIL=<fill in your github email>
-            - GH_PAT=<<fill in obtained>
-            - GH_REPO=<fill in customized>
-            - GH_CLIENTID=<fill in obtained>
-            - GH_CLIENTSECRET=<fill in fetched>
-            - ARGO_AUTH='<Fill in the fetched Argo json or token>'
-            - ARGO_DOMAIN=<fill in customized>
-            - GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank>

VPS Deployment Method 2 --- hosts

bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)

Client Access

Transfer via gRPC, no additional configuration required. Use the installation method given in the panel, for example

curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent data.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls

SSH access

<filepath>/cloudflared access ssh --hostname ssh.seals.nom.za/<GH_CLIENTID>
imageimageimage

Manually backing up your data

Method 1: Change the contents of the README.md file in the Github backup repository to backup

image

Method 2: After ssh, run /dashboard/backup.sh for container version; /opt/nezha/dashboard/backup.sh for VPS host version.

Automatically restore backups

  • Change the name of the file to be restored to README.md in the github backup repository, the timer service will check for updates every minute and record the last synchronized filename in the local /dbfile to compare with the online file content.

The following is an example of restoring a file with the name dashboard-2023-04-23-13:08:37.tar.gz.

! image

Manually restore the backup

  • ssh into the container and run, tar.gz filename from the github backup repository, format: dashboard-2023-04-22-21:42:10.tar.gz
bash /dashboard/restore.sh <filename>
image

Migrating data

  • Backup the /dashboard folder of the original Nezha and zip it up to dashboard.tar.gz file.
tar czvf dashboard.tar.gz /dashboard
  • Download the file and put it into a private repository, the name of the repository should be exactly the same as <GH_REPO>, and edit the contents of README.md of the repository to dashboard.tar.gz.
  • Deploy the new Nezha in this project, and fill in the variables completely. After the deployment is done, the auto-restore script will check every minute, and will restore automatically if it finds any new content, the whole process will take about 3 minutes.

Main catalog files and descriptions

/dashboard/
-|-- app                  # Nezha panel main program
-|-- argo.json            # Argo tunnel json file, which records information about using the tunnel.
-|-- argo.yml             # Argo tunnel yml file, used for streaming web, gRPC and ssh protocols under a single tunnel with different domains.
-|-- backup.sh            # Backup data scripts
-|-- restore.sh           # Restore backup scripts
-|-- dbfile               # Record the name of the latest restore or backup file
-|-- resource             # Folders of information on panel themes, languages, flags, etc.
-|-- data
-|   |-- config.yaml      # Configuration for the Nezha panel, e.g. Github OAuth2 / gRPC domain / port / TLS enabled or not.
-|   `-- sqlite.db        # SQLite database file that records all severs and cron settings for the panel.
-|-- entrypoint.sh        # The main script, which is executed after the container is run.
-|-- nezha.csr            # SSL/TLS certificate signing request
-|-- nezha.key            # Private key information for SSL/TLS certificate.
-|-- nezha.pem            # SSL/TLS certificate file.
-|-- cloudflared          # Cloudflare Argo tunnel main program.
-|-- grpcwebproxy         # gRPC reverse proxy main program.
-`-- nezha-agent          # Nezha client, used to monitor the localhost.

Acknowledgements for articles and projects by

Disclaimer

  • This program is only for learning and understanding, non-profit purposes, please delete within 24 hours after downloading, not for any commercial purposes, text, data and images are copyrighted, if reproduced must indicate the source.
  • Use of this program is subject to the deployment disclaimer. Use of this program must follow the deployment of the server location, the country and the user's country laws and regulations, the author of the program is not responsible for any misconduct of the user.
- +
Skip to content

Nezha server over Argo tunnel

Contributors:

GitHub project: Argo-Nezha-Service-Container

Mirror backup (not live update): Argo-Nezha-Service-Container


Catalog


Project Features.

  • Wider scope of application --- As long as there is a network connection, Nezha server can be installed, such as LXC, OpenVZ VPS, Nas Virtual Machine, Container PaaS, etc.
  • Argo tunnel breaks through the restriction of requiring a public network portal --- The traditional Nezha requires two public network ports, one for panel visiting and the other for client reporting, this project uses Cloudflare Argo tunnels and uses intranet tunneling.
  • IPv4 / v6 with higher flexibility --- The traditional Nezha needs to deal with IPv4/v6 compatibility between server and client, and also needs to resolve mismatches through tools such as warp. However, this project does not need to consider these issues at all, and can be docked arbitrarily, which is much more convenient and easy!
  • One Argo tunnel for multiple domains and protocols --- Create an intranet-penetrating Argo tunnel for three domains (hostname) and protocols, which can be used for panel access (http), client reporting (tcp) and ssh (optional).
  • GrpcWebProxy reverse proxy gRPC data port --- with a certificate for tls termination, then Argo's tunnel configuration with https service pointing to this reverse proxy, enable http2 back to the source, grpc(nezha)->GrpcWebProxy->h2(argo)->cf cdn edge->agent
  • Daily automatic backup --- every day at 04:00 BST, the entire Nezha panel folder is automatically backed up to a designated private github repository, including panel themes, panel settings, probe data and tunnel information, the backup retains nearly 5 days of data; the content is so important that it must be placed in the private repository.
  • Automatic daily panel update -- the latest official panel version is automatically detected every day at 4:00 BST, and updated when there is an upgrade.
  • Manual/automatic restore backup --- check the content of online restore file once a minute, and restore immediately when there is any update.
  • Default built-in local probes --- can easily monitor their own server information
  • More secure data --- Argo Tunnel uses TLS encrypted communication to securely transmit application traffic to the Cloudflare network, improving application security and reliability. In addition, Argo Tunnel protects against network threats such as IP leaks and DDoS attacks.
image

Prepare variables to be used

  • Visit the Cloudflare website, select the domain name you want to use, and turn on the network option to turn the gRPC switch on.
image

Add https:// to the beginning of the panel's domain name and /oauth2/callback to the end of the callback address.

imageimageimageimageimage

How to get Argo authentication: json or token

Argo tunnel authentication methods include json and token, use one of the two methods. The former is recommended because the script will handle all the Argo tunnel parameters and paths, while the latter needs to be set manually on the Cloudflare website and is prone to errors.

(Methods 1 - Json):

Easily get Argo tunnel json information through Cloudflare Json Generation Network: https://fscarmen.cloudflare.now.cc

image

(Methods 2 - Token): Manually generate Argo tunnel token information via Cloudflare website.

Go to the cf website: https://dash.cloudflare.com/

  • Go to zero trust and generate token tunnel and message.
  • The data path 443/https is proto.
  • ssh path 22/ssh for < client id >.
imageimageimageimageimageimageimage

PaaS Deployment Example

Image fscarmen/argo-nezha:latest, supports amd64 and arm64 architectures.

Variables used

Variable NameRequiredRemarks
GH_USERYesgithub username for panel admin authorization
GH_CLIENTIDyesapply on github
GH_CLIENTSECRETyesapply on github
GH_BACKUP_USERNoThe github username for backing up Nezha's server-side database on github, if not filled in, it is the same as the account GH_USER for panel management authorization
GH_REPONoThe github repository for backing up Nezha's server-side database files on github
GH_EMAILNogithub's mailbox for git push backups to remote repositories
GH_PATNogithub's PAT
ARGO_AUTHYesArgo Json from https://fscarmen.cloudflare.now.cc
Argo token from Cloudflare official website
ARGO_DOMAINYesArgo domain

Koyeb

Deploy to Koyeb

imageimageimageimageimage

VPS Deployment Method 1 --- docker

  • Note: ARGO_DOMAIN= must be followed by single quotes, which cannot be removed.
  • If the VPS is IPv6 only, please install WARP IPv4 or dual-stack first: https://github.com/fscarmen/warp
  • The backup directory is the dashboard folder in the current path.

docker deployment

docker run -dit \
+           --name nezha_dashboard \
+           --pull always \
+           --restart always \
+           -e GH_USER=<fill in github username> \
+           -e GH_EMAIL=<fill in github email> \
+           -e GH_PAT=<fill in the obtained> \
+           -e GH_REPO=<fill in customized> \
+           -e GH_CLIENTID=<fill in acquired> \
+           -e GH_CLIENTSECRET=<fill in acquired> \
+           -e ARGO_AUTH='<Fill in the fetched Argo json or token>' \
+           -e ARGO_DOMAIN=<fill in customized> \
+           -e GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank> \
+           fscarmen/argo-nezha

docker-compose deployment

version: '3.8'
+services.
+    argo-nezha.
+        image: fscarmen/argo-nezha
+        --pull always
+        container_name: nezha_dashboard
+        restart: always
+        environment:
+            - GH_USER=<fill in github username>
+            - GH_EMAIL=<fill in your github email>
+            - GH_PAT=<<fill in obtained>
+            - GH_REPO=<fill in customized>
+            - GH_CLIENTID=<fill in obtained>
+            - GH_CLIENTSECRET=<fill in fetched>
+            - ARGO_AUTH='<Fill in the fetched Argo json or token>'
+            - ARGO_DOMAIN=<fill in customized>
+            - GH_BACKUP_USER=<If it is consistent with GH_USER, you can leave it blank>

VPS Deployment Method 2 --- hosts

bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh)

Client Access

Transfer via gRPC, no additional configuration required. Use the installation method given in the panel, for example

curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent data.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls

SSH access

<filepath>/cloudflared access ssh --hostname ssh.seals.nom.za/<GH_CLIENTID>
imageimageimage

Manually backing up your data

Method 1: Change the contents of the README.md file in the Github backup repository to backup

image

Method 2: After ssh, run /dashboard/backup.sh for container version; /opt/nezha/dashboard/backup.sh for VPS host version.

Automatically restore backups

  • Change the name of the file to be restored to README.md in the github backup repository, the timer service will check for updates every minute and record the last synchronized filename in the local /dbfile to compare with the online file content.

The following is an example of restoring a file with the name dashboard-2023-04-23-13:08:37.tar.gz.

! image

Manually restore the backup

  • ssh into the container and run, tar.gz filename from the github backup repository, format: dashboard-2023-04-22-21:42:10.tar.gz
bash /dashboard/restore.sh <filename>
image

Migrating data

  • Backup the /dashboard folder of the original Nezha and zip it up to dashboard.tar.gz file.
tar czvf dashboard.tar.gz /dashboard
  • Download the file and put it into a private repository, the name of the repository should be exactly the same as <GH_REPO>, and edit the contents of README.md of the repository to dashboard.tar.gz.
  • Deploy the new Nezha in this project, and fill in the variables completely. After the deployment is done, the auto-restore script will check every minute, and will restore automatically if it finds any new content, the whole process will take about 3 minutes.

Main catalog files and descriptions

/dashboard/
+|-- app                  # Nezha panel main program
+|-- argo.json            # Argo tunnel json file, which records information about using the tunnel.
+|-- argo.yml             # Argo tunnel yml file, used for streaming web, gRPC and ssh protocols under a single tunnel with different domains.
+|-- backup.sh            # Backup data scripts
+|-- restore.sh           # Restore backup scripts
+|-- dbfile               # Record the name of the latest restore or backup file
+|-- resource             # Folders of information on panel themes, languages, flags, etc.
+|-- data
+|   |-- config.yaml      # Configuration for the Nezha panel, e.g. Github OAuth2 / gRPC domain / port / TLS enabled or not.
+|   `-- sqlite.db        # SQLite database file that records all severs and cron settings for the panel.
+|-- entrypoint.sh        # The main script, which is executed after the container is run.
+|-- nezha.csr            # SSL/TLS certificate signing request
+|-- nezha.key            # Private key information for SSL/TLS certificate.
+|-- nezha.pem            # SSL/TLS certificate file.
+|-- cloudflared          # Cloudflare Argo tunnel main program.
+|-- grpcwebproxy         # gRPC reverse proxy main program.
+`-- nezha-agent          # Nezha client, used to monitor the localhost.

Acknowledgements for articles and projects by

Disclaimer

  • This program is only for learning and understanding, non-profit purposes, please delete within 24 hours after downloading, not for any commercial purposes, text, data and images are copyrighted, if reproduced must indicate the source.
  • Use of this program is subject to the deployment disclaimer. Use of this program must follow the deployment of the server location, the country and the user's country laws and regulations, the author of the program is not responsible for any misconduct of the user.
+ \ No newline at end of file diff --git a/en_US/case/index.html b/en_US/case/index.html index 7550dbbd..74e5805d 100644 --- a/en_US/case/index.html +++ b/en_US/case/index.html @@ -5,21 +5,24 @@ Nezha Monitoring | Community Project - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content

Nezha Monitoring

Community Project

Nezha Monitoring has benefited from various projects contributed by the community, which have provided it with additional extensions.

Submit a project

We welcome you to submit your own project. Please join the Telegram group to contact the administrator for further information.

Important Notes

All projects are contributed by community members. Please be aware that the Nezha Monitoring Team cannot assume responsibility for community projects, including but not limited to warranty, availability, security, etc.

- +
Skip to content

Nezha Monitoring

Community Project

Nezha Monitoring has benefited from various projects contributed by the community, which have provided it with additional extensions.

+ \ No newline at end of file diff --git a/en_US/developer/index.html b/en_US/developer/index.html index 0899009a..0993338e 100644 --- a/en_US/developer/index.html +++ b/en_US/developer/index.html @@ -5,21 +5,24 @@ Nezha Monitoring | Development Manual - - - - - - - - - - + + + + + + + + + + + + + + - - + + \ No newline at end of file diff --git a/en_US/developer/l10n.html b/en_US/developer/l10n.html index f688375d..ac47791b 100644 --- a/en_US/developer/l10n.html +++ b/en_US/developer/l10n.html @@ -3,23 +3,26 @@ - Nezha Monitoring | Nezha Monitoring + Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Nezha Monitoring's Dashboard has added localization to support multiple languages, and you can follow these steps to support localization when developing new features

Introduction

  1. You can directly use the text configuration already available in /resource/l10n/en-US.toml to replace the text in the new feature.
  2. If there is new text in the new feature, please refer to the configuration text in en-US.toml, pull the new text into the configuration files of other languages such as en-US.toml, and add translations.

Adding a new localized text file

  1. Add a new language text configuration in /resource/l10n/.
  2. Pull existing text configurations from other languages in the new language text configuration.
  3. Add translations for the new language text configuration.
- +
Skip to content

Nezha Monitoring's Dashboard has added localization to support multiple languages, and you can follow these steps to support localization when developing new features

Introduction

  1. You can directly use the text configuration already available in /resource/l10n/en-US.toml to replace the text in the new feature.
  2. If there is new text in the new feature, please refer to the configuration text in en-US.toml, pull the new text into the configuration files of other languages such as en-US.toml, and add translations.

Adding a new localized text file

  1. Add a new language text configuration in /resource/l10n/.
  2. Pull existing text configurations from other languages in the new language text configuration.
  3. Add translations for the new language text configuration.
+ \ No newline at end of file diff --git a/en_US/developer/theme.html b/en_US/developer/theme.html index 86910cd7..777b4338 100644 --- a/en_US/developer/theme.html +++ b/en_US/developer/theme.html @@ -3,23 +3,26 @@ - Nezha Monitoring | Nezha Monitoring + Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Nezha Theme Development Environment

Nezha Monitoring provides a theme development environment that you can use to create new Nezha Monitoring themes

WARNING

Please note: This development environment only supports dashboard v0.13.16 and newer versions.

How to use

  1. Clone this repository to local
  2. Modify the Oauth2 configuration in data/config.yaml(The callback connection can be filled with http://localhost
  3. Run docker-compose up
  4. Start development
  5. Once the theme has been created, you can place theme-custom in /opt/nezha/dashboard/theme-custom on the server

FAQ

  • If you can't use port 80, change the configuration in docker-compose.yaml.
- +
Skip to content

Nezha Theme Development Environment

Nezha Monitoring provides a theme development environment that you can use to create new Nezha Monitoring themes

WARNING

Please note: This development environment only supports dashboard v0.13.16 and newer versions.

How to use

  1. Clone this repository to local
  2. Modify the Oauth2 configuration in data/config.yaml(The callback connection can be filled with http://localhost
  3. Run docker-compose up
  4. Start development
  5. Once the theme has been created, you can place theme-custom in /opt/nezha/dashboard/theme-custom on the server

FAQ

  • If you can't use port 80, change the configuration in docker-compose.yaml.
+ \ No newline at end of file diff --git a/en_US/guide/agent.html b/en_US/guide/agent.html index e7bf8886..e1020514 100644 --- a/en_US/guide/agent.html +++ b/en_US/guide/agent.html @@ -5,164 +5,167 @@ Install Agent | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Install Agent

This document will introduce how to install the Agent on the monitored server and connect it to the Dashboard.

TIP

The repository for Agent binaries can be found at: https://github.com/nezhahq/agent/releases

One-Click Installation of the Agent

Nezha Monitoring supports one-click installation of the Agent on both Windows and Linux. By following the steps in this document, you can easily deploy it on your server.

Preparation

You need to set up a communication domain in the admin panel in advance, and this domain should not be connected to a CDN. This document uses the example communication domain “data.example.com”.
Go to the settings page in the admin panel, fill in the communication domain in the “Non-CDN Dashboard Server Domain/IP” field, and click "Save".

One-Click Installation on Linux (Ubuntu, Debian, CentOS)

  1. First, add a server in the admin panel.
  2. Click the green Linux icon button next to the newly added server and copy the one-click installation command.
  3. Run the copied installation command on the monitored server, and wait for the installation to complete. Then, check if the server is online in the Dashboard home page.

One-Click Installation on Windows

  1. First, add a server in the admin panel.
  2. Click the green Windows icon button next to the newly added server and copy the one-click installation command.
  3. Go to the Windows server, run PowerShell, and execute the copied installation command in PowerShell.
  4. If you encounter a prompt to "change execution policy," choose Y.
  5. Wait for the installation to complete, then check if the server is online in the Dashboard home page.

WARNING

If you encounter errors when running the one-click installation command in PowerShell, try the Manual Installation of the Agent on Windows below.

Other Ways to Install the Agent

Installing the Agent on Linux (Ubuntu, Debian, CentOS)

Click to expand/collapse
  1. First, add a server in the admin panel.
  2. Run the script on the monitored server:
bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
  1. Select “Install monitoring Agent.”
  2. Enter the communication domain, such as "data.example.com".
  3. Enter the dashboard communication port (gRPC port), default is 5555.
  4. Enter the Agent secret, which is generated when you add a server in the admin panel and can be found on the “Servers” page in the admin panel.
  5. Wait for the installation to complete, then check if the server is online in the Dashboard home page.

Installing the Agent on Other Linux Distributions (e.g., Alpine using Openrc)

Click to expand/collapse

This section is contributed by unknown0054.

  1. Modify SERVER, SECRET, TLS, and execute in the shell:
shell
cat >/etc/init.d/nezha-agent<< EOF
-#!/sbin/openrc-run
-SERVER="" # Dashboard domain ip:port
-SECRET="" # SECRET
-TLS="" # Enable TLS if yes "--tls", leave empty if no
-NZ_BASE_PATH="/opt/nezha"
-NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
-pidfile="/run/${RC_SVCNAME}.pid"
-command="/opt/nezha/agent/nezha-agent"
-command_args="-s ${SERVER} -p ${SECRET} ${TLS}"
-command_background=true
-depend() {
-  need net
-}
-checkconfig() {
-  GITHUB_URL="github.com"
-  if [ ! -f "${NZ_AGENT_PATH}/nezha-agent" ]; then
-    if [[ $(uname -m | grep 'x86_64') != "" ]]; then
-      os_arch="amd64"
-    elif [[ $(uname -m | grep 'i386\|i686') != "" ]]; then
-      os_arch="386"
-    elif [[ $(uname -m | grep 'aarch64\|armv8b\|armv8l') != "" ]]; then
-      os_arch="arm64"
-    elif [[ $(uname -m | grep 'arm') != "" ]]; then
-      os_arch="arm"
-    elif [[ $(uname -m | grep 's390x') != "" ]]; then
-      os_arch="s390x"
-    elif [[ $(uname -m | grep 'riscv64') != "" ]]; then
-      os_arch="riscv64"
-    fi
-    local version=$(curl -m 10 -sL "https://api.github.com/repos/nezhahq/agent/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
-    if [ ! -n "$version" ]; then
-      version=$(curl -m 10 -sL "https://fastly.jsdelivr.net/gh/nezhahq/agent/" | grep "option\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\/agent@/v/g')
-    fi
-    if [ ! -n "$version" ]; then
-      version=$(curl -m 10 -sL "https://gcore.jsdelivr.net/gh/nezhahq/agent/" | grep "option\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\/agent@/v/g')
-    fi
-    if [ ! -n "$version" ]; then
-      echo -e "Failed to get the version number. Please check if the server can connect to https://api.github.com/repos/nezhahq/agent/releases/latest"
-      return 0
-    else
-      echo -e "The latest version is: ${version}"
-    fi
-    wget -t 2 -T 10 -O nezha-agent_linux_${os_arch}.zip https://${GITHUB_URL}/nezhahq/agent/releases/download/${version}/nezha-agent_linux_${os_arch}.zip >/dev/null 2>&1
-    if [[ $? != 0 ]]; then
-      echo -e "Failed to download Release. Please check if the server can connect to ${GITHUB_URL}"
-      return 0
-    fi
-    mkdir -p $NZ_AGENT_PATH
-    chmod 755 -R $NZ_AGENT_PATH
-    unzip -qo nezha-agent_linux_${os_arch}.zip && mv nezha-agent $NZ_AGENT_PATH && rm -rf nezha-agent_linux_${os_arch}.zip README.md
-  fi
-  if [ ! -x "${NZ_AGENT_PATH}/nezha-agent" ]; then
-    chmod +x ${NZ_AGENT_PATH}/nezha-agent
-  fi
-}
-start_pre() {
-  if [ "${RC_CMD}" != "restart" ]; then
-    checkconfig || return $?
-  fi
-}
-EOF
  1. Add execute permissions
shell
chmod +x /etc/init.d/nezha-agent
  1. Start Nezha-Agent
shell
rc-service nezha-agent start
  1. Add to startup
shell
rc-update add nezha-agent

Manual Installation of the Agent on Windows

Installing the Agent on Synology DSM

Click to expand/collapse
sh
# Agent path
-EXEC="/PATH/TO/nezha-agent"
-# Log path
-LOG="${EXEC}.log"
-# Additional execution parameters, can be empty
-ARGS=""
-# Nezha server gRPC address
-SERVER="HOST_OR_IP:gRPC_PORT"
-# The secret key obtained in the previous step
-SECRET="APP_SECRET"
-# User running the service, *strongly recommended to use non-root user*
-RUN_USER="nezha"
+    
Skip to content

Install Agent

This document will introduce how to install the Agent on the monitored server and connect it to the Dashboard.

TIP

The repository for Agent binaries can be found at: https://github.com/nezhahq/agent/releases

One-Click Installation of the Agent

Nezha Monitoring supports one-click installation of the Agent on both Windows and Linux. By following the steps in this document, you can easily deploy it on your server.

Preparation

You need to set up a communication domain in the admin panel in advance, and this domain should not be connected to a CDN. This document uses the example communication domain “data.example.com”.
Go to the settings page in the admin panel, fill in the communication domain in the “Non-CDN Dashboard Server Domain/IP” field, and click "Save".

One-Click Installation on Linux (Ubuntu, Debian, CentOS)

  1. First, add a server in the admin panel.
  2. Click the green Linux icon button next to the newly added server and copy the one-click installation command.
  3. Run the copied installation command on the monitored server, and wait for the installation to complete. Then, check if the server is online in the Dashboard home page.

One-Click Installation on Windows

  1. First, add a server in the admin panel.
  2. Click the green Windows icon button next to the newly added server and copy the one-click installation command.
  3. Go to the Windows server, run PowerShell, and execute the copied installation command in PowerShell.
  4. If you encounter a prompt to "change execution policy," choose Y.
  5. Wait for the installation to complete, then check if the server is online in the Dashboard home page.

WARNING

If you encounter errors when running the one-click installation command in PowerShell, try the Manual Installation of the Agent on Windows below.

Other Ways to Install the Agent

Installing the Agent on Linux (Ubuntu, Debian, CentOS)

Click to expand/collapse
  1. First, add a server in the admin panel.
  2. Run the script on the monitored server:
bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
  1. Select “Install monitoring Agent.”
  2. Enter the communication domain, such as "data.example.com".
  3. Enter the dashboard communication port (gRPC port), default is 5555.
  4. Enter the Agent secret, which is generated when you add a server in the admin panel and can be found on the “Servers” page in the admin panel.
  5. Wait for the installation to complete, then check if the server is online in the Dashboard home page.

Installing the Agent on Other Linux Distributions (e.g., Alpine using Openrc)

Click to expand/collapse

This section is contributed by unknown0054.

  1. Modify SERVER, SECRET, TLS, and execute in the shell:
shell
cat >/etc/init.d/nezha-agent<< EOF
+#!/sbin/openrc-run
+SERVER="" # Dashboard domain ip:port
+SECRET="" # SECRET
+TLS="" # Enable TLS if yes "--tls", leave empty if no
+NZ_BASE_PATH="/opt/nezha"
+NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
+pidfile="/run/${RC_SVCNAME}.pid"
+command="/opt/nezha/agent/nezha-agent"
+command_args="-s ${SERVER} -p ${SECRET} ${TLS}"
+command_background=true
+depend() {
+  need net
+}
+checkconfig() {
+  GITHUB_URL="github.com"
+  if [ ! -f "${NZ_AGENT_PATH}/nezha-agent" ]; then
+    if [[ $(uname -m | grep 'x86_64') != "" ]]; then
+      os_arch="amd64"
+    elif [[ $(uname -m | grep 'i386\|i686') != "" ]]; then
+      os_arch="386"
+    elif [[ $(uname -m | grep 'aarch64\|armv8b\|armv8l') != "" ]]; then
+      os_arch="arm64"
+    elif [[ $(uname -m | grep 'arm') != "" ]]; then
+      os_arch="arm"
+    elif [[ $(uname -m | grep 's390x') != "" ]]; then
+      os_arch="s390x"
+    elif [[ $(uname -m | grep 'riscv64') != "" ]]; then
+      os_arch="riscv64"
+    fi
+    local version=$(curl -m 10 -sL "https://api.github.com/repos/nezhahq/agent/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
+    if [ ! -n "$version" ]; then
+      version=$(curl -m 10 -sL "https://fastly.jsdelivr.net/gh/nezhahq/agent/" | grep "option\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\/agent@/v/g')
+    fi
+    if [ ! -n "$version" ]; then
+      version=$(curl -m 10 -sL "https://gcore.jsdelivr.net/gh/nezhahq/agent/" | grep "option\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\/agent@/v/g')
+    fi
+    if [ ! -n "$version" ]; then
+      echo -e "Failed to get the version number. Please check if the server can connect to https://api.github.com/repos/nezhahq/agent/releases/latest"
+      return 0
+    else
+      echo -e "The latest version is: ${version}"
+    fi
+    wget -t 2 -T 10 -O nezha-agent_linux_${os_arch}.zip https://${GITHUB_URL}/nezhahq/agent/releases/download/${version}/nezha-agent_linux_${os_arch}.zip >/dev/null 2>&1
+    if [[ $? != 0 ]]; then
+      echo -e "Failed to download Release. Please check if the server can connect to ${GITHUB_URL}"
+      return 0
+    fi
+    mkdir -p $NZ_AGENT_PATH
+    chmod 755 -R $NZ_AGENT_PATH
+    unzip -qo nezha-agent_linux_${os_arch}.zip && mv nezha-agent $NZ_AGENT_PATH && rm -rf nezha-agent_linux_${os_arch}.zip README.md
+  fi
+  if [ ! -x "${NZ_AGENT_PATH}/nezha-agent" ]; then
+    chmod +x ${NZ_AGENT_PATH}/nezha-agent
+  fi
+}
+start_pre() {
+  if [ "${RC_CMD}" != "restart" ]; then
+    checkconfig || return $?
+  fi
+}
+EOF
  1. Add execute permissions
shell
chmod +x /etc/init.d/nezha-agent
  1. Start Nezha-Agent
shell
rc-service nezha-agent start
  1. Add to startup
shell
rc-update add nezha-agent

Manual Installation of the Agent on Windows

Installing the Agent on Synology DSM

Click to expand/collapse
sh
# Agent path
+EXEC="/PATH/TO/nezha-agent"
+# Log path
+LOG="${EXEC}.log"
+# Additional execution parameters, can be empty
+ARGS=""
+# Nezha server gRPC address
+SERVER="HOST_OR_IP:gRPC_PORT"
+# The secret key obtained in the previous step
+SECRET="APP_SECRET"
+# User running the service, *strongly recommended to use non-root user*
+RUN_USER="nezha"
 
-# Write to systemd service file
-cat << EOF > /usr/lib/systemd/system/nezha.service
-[Unit]
-Description=Nezha Agent Service
-After=network.target
+# Write to systemd service file
+cat << EOF > /usr/lib/systemd/system/nezha.service
+[Unit]
+Description=Nezha Agent Service
+After=network.target
 
-[Service]
-Type=simple
-ExecStart=/bin/nohup ${EXEC} ${ARGS} -s ${SERVER} -p ${SECRET} &>> ${LOG} &
-ExecStop=ps -fe |grep nezha-agent|awk '{print \$2}'|xargs kill
-User=${RUN_USER}
+[Service]
+Type=simple
+ExecStart=/bin/nohup ${EXEC} ${ARGS} -s ${SERVER} -p ${SECRET} &>> ${LOG} &
+ExecStop=ps -fe |grep nezha-agent|awk '{print \$2}'|xargs kill
+User=${RUN_USER}
 
-Restart=on-abort
+Restart=on-abort
 
-[Install]
-WantedBy=multi-user.target
-EOF
+[Install]
+WantedBy=multi-user.target
+EOF
 
-# Reload service
-systemctl daemon-reload
-# Start service
-systemctl start nezha
-# Enable service startup
-systemctl enable nezha

‼️ Modify the corresponding information before running the above commands with the root account to complete the installation.

Installing the Agent on macOS

Click to expand/collapse

This section is adapted from Mitsea Blog with the author's permission

WARNING

If you are prompted "macOS cannot verify this app" during installation, manually allow the program to run in System Settings.

  1. First, add a server in the admin panel.
  2. Go to the Release page to download the Agent binary file. Choose to download the darwin amd64 or arm64 Agent according to your CPU architecture. Download the amd64 version for Intel CPU, or the arm64 version for Apple Silicon. After downloading, unzip the Agent binary file, such as unzipping it to the Downloads folder.
  3. Create a file named nezha_agent.plist and save it with the following content:
xml
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>KeepAlive</key>
- <true/>
- <key>Label</key>
- <string>nezha_agent</string>
- <key>Program</key>
- <string>Modify the path to the Agent binary file here, such as: /Users/123/Downloads/nezha-agent</string>
- <key>ProgramArguments</key>
- <array>
-  <string>Modify the path to the Agent binary file here, same as above</string>
-  <string>--password</string>
-  <string>The communication secret, such as: 529664783eeb23cc25</string>
-  <string>--server</string>
-  <string>The communication URL and gRPC port, such as: data.example.com:5555</string>
- </array>
- <key>RunAtLoad</key>
- <true/>
-</dict>
-</plist>
  1. Load the plist file into launchd using the following command in Terminal, make sure to replace the file path:
shell
launchctl load /Users/123/Desktop/nezha_agent.plist
  1. Start the process:
shell
launchctl start nezha_agent
  1. Check if the process is running:
shell
launchctl list | grep nezha_agent
  1. Stop the process and remove it:
shell
launchctl stop nezha_agent
shell
launchctl remove nezha_agent

Installing the Agent on macOS Using Homebrew

Click to expand/collapse

This section is adapted from 🐿️松鼠收集🌰 with the author's permission

WARNING

Please be sure to add environment variables before installing nezha-agent through Homebrew! Homebrew creates the service-required plist file during software installation, and if you add the environment variables after installation, it will fail to start due to missing parameters.

  1. Add environment variables:
shell
echo 'export HOMEBREW_NEZHA_AGENT_PASSWORD="Communication key, obtained from the service page"' >> ~/.zshrc
-echo 'export HOMEBREW_NEZHA_AGENT_SERVER="Your server and port, format your.domain:5555 "' >> ~/.zshrc
-source ~/.zshrc
  1. Install Nezha Agent:

DANGER

Note that this Homebrew repository is maintained by a third party and is unrelated to Nezha Monitoring. The Nezha project team does not endorse this repository's usability, security, etc. Please evaluate the risks yourself before using!

Since it has not yet been submitted to the Homebrew Core official library, it is temporarily placed in the third-party Homebrew repository maintained by the author of the blog:

shell
brew install brewforge/chinese/nezha-agent
  1. Start Nezha Agent service through Homebrew:
shell
brew services start nezha-agent
  1. Check the service status:
shell
brew services info nezha-agent
  1. Stop the service:
shell
brew services stop nezha-agent
  1. Uninstall Nezha Agent:
shell
brew rm nezha-agent
  1. If there is an error, first check the environment variables:
shell
echo $HOMEBREW_NEZHA_AGENT_PASSWORD
-echo $HOMEBREW_NEZHA_AGENT_SERVER
  1. If the environment variables are configured correctly, try reinstalling:
shell
brew services stop nezha-agent
-brew reinstall nezha-agent
-brew services start nezha-agent
  1. If the issue persists, submit a issue to the third-party Homebrew repository.

Installing the Agent on OpenWRT

Click to expand/collapse

How to solve installation difficulties and issues in one step?

How to enable autostart on older OpenWRT/LEDE?

How to enable autostart on newer OpenWRT? Contributor: @艾斯德斯

  • First, download the corresponding binary from the release, unzip the zip package, and place it in /root.
  • Run chmod +x /root/nezha-agent to grant execution permission, then create /etc/init.d/nezha-service:
shell
#!/bin/sh /etc/rc.common
+# Reload service
+systemctl daemon-reload
+# Start service
+systemctl start nezha
+# Enable service startup
+systemctl enable nezha

‼️ Modify the corresponding information before running the above commands with the root account to complete the installation.

Installing the Agent on macOS

Click to expand/collapse

This section is adapted from Mitsea Blog with the author's permission

WARNING

If you are prompted "macOS cannot verify this app" during installation, manually allow the program to run in System Settings.

  1. First, add a server in the admin panel.
  2. Go to the Release page to download the Agent binary file. Choose to download the darwin amd64 or arm64 Agent according to your CPU architecture. Download the amd64 version for Intel CPU, or the arm64 version for Apple Silicon. After downloading, unzip the Agent binary file, such as unzipping it to the Downloads folder.
  3. Create a file named nezha_agent.plist and save it with the following content:
xml
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>KeepAlive</key>
+ <true/>
+ <key>Label</key>
+ <string>nezha_agent</string>
+ <key>Program</key>
+ <string>Modify the path to the Agent binary file here, such as: /Users/123/Downloads/nezha-agent</string>
+ <key>ProgramArguments</key>
+ <array>
+  <string>Modify the path to the Agent binary file here, same as above</string>
+  <string>--password</string>
+  <string>The communication secret, such as: 529664783eeb23cc25</string>
+  <string>--server</string>
+  <string>The communication URL and gRPC port, such as: data.example.com:5555</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+</dict>
+</plist>
  1. Load the plist file into launchd using the following command in Terminal, make sure to replace the file path:
shell
launchctl load /Users/123/Desktop/nezha_agent.plist
  1. Start the process:
shell
launchctl start nezha_agent
  1. Check if the process is running:
shell
launchctl list | grep nezha_agent
  1. Stop the process and remove it:
shell
launchctl stop nezha_agent
shell
launchctl remove nezha_agent

Installing the Agent on macOS Using Homebrew

Click to expand/collapse

This section is adapted from 🐿️松鼠收集🌰 with the author's permission

WARNING

Please be sure to add environment variables before installing nezha-agent through Homebrew! Homebrew creates the service-required plist file during software installation, and if you add the environment variables after installation, it will fail to start due to missing parameters.

  1. Add environment variables:
shell
echo 'export HOMEBREW_NEZHA_AGENT_PASSWORD="Communication key, obtained from the service page"' >> ~/.zshrc
+echo 'export HOMEBREW_NEZHA_AGENT_SERVER="Your server and port, format your.domain:5555 "' >> ~/.zshrc
+source ~/.zshrc
  1. Install Nezha Agent:

DANGER

Note that this Homebrew repository is maintained by a third party and is unrelated to Nezha Monitoring. The Nezha project team does not endorse this repository's usability, security, etc. Please evaluate the risks yourself before using!

Since it has not yet been submitted to the Homebrew Core official library, it is temporarily placed in the third-party Homebrew repository maintained by the author of the blog:

shell
brew install brewforge/chinese/nezha-agent
  1. Start Nezha Agent service through Homebrew:
shell
brew services start nezha-agent
  1. Check the service status:
shell
brew services info nezha-agent
  1. Stop the service:
shell
brew services stop nezha-agent
  1. Uninstall Nezha Agent:
shell
brew rm nezha-agent
  1. If there is an error, first check the environment variables:
shell
echo $HOMEBREW_NEZHA_AGENT_PASSWORD
+echo $HOMEBREW_NEZHA_AGENT_SERVER
  1. If the environment variables are configured correctly, try reinstalling:
shell
brew services stop nezha-agent
+brew reinstall nezha-agent
+brew services start nezha-agent
  1. If the issue persists, submit a issue to the third-party Homebrew repository.

Installing the Agent on OpenWRT

Click to expand/collapse

How to solve installation difficulties and issues in one step?

How to enable autostart on older OpenWRT/LEDE?

How to enable autostart on newer OpenWRT? Contributor: @艾斯德斯

  • First, download the corresponding binary from the release, unzip the zip package, and place it in /root.
  • Run chmod +x /root/nezha-agent to grant execution permission, then create /etc/init.d/nezha-service:
shell
#!/bin/sh /etc/rc.common
 
-START=99
-USE_PROCD=1
+START=99
+USE_PROCD=1
 
-start_service() {
- procd_open_instance
- procd_set_param command /root/nezha-agent -s Dashboard communication domain:port -p Key -d
- procd_set_param respawn
- procd_close_instance
-}
+start_service() {
+ procd_open_instance
+ procd_set_param command /root/nezha-agent -s Dashboard communication domain:port -p Key -d
+ procd_set_param respawn
+ procd_close_instance
+}
 
-stop_service() {
-  killall nezha-agent
-}
+stop_service() {
+  killall nezha-agent
+}
 
-restart() {
- stop
- sleep 2
- start
-}
  • Run chmod +x /etc/init.d/nezha-service to grant execution permission.
  • Start the service: /etc/init.d/nezha-service enable && /etc/init.d/nezha-service start

Does the Agent Have a Docker Image?

The Agent does not currently have a Docker image.
The design philosophy of the Agent is opposite to that of the Dashboard. While the Dashboard should minimally impact the server, the Agent needs to execute monitoring services and run commands within the server.
Running the Agent inside a container can still perform monitoring tasks, but features like WebShell will not function properly, so no Docker image is provided.

- +restart() { + stop + sleep 2 + start +}

Does the Agent Have a Docker Image?

The Agent does not currently have a Docker image.
The design philosophy of the Agent is opposite to that of the Dashboard. While the Dashboard should minimally impact the server, the Agent needs to execute monitoring services and run commands within the server.
Running the Agent inside a container can still perform monitoring tasks, but features like WebShell will not function properly, so no Docker image is provided.

+ \ No newline at end of file diff --git a/en_US/guide/agentq.html b/en_US/guide/agentq.html index d338df92..6b0a5677 100644 --- a/en_US/guide/agentq.html +++ b/en_US/guide/agentq.html @@ -5,21 +5,24 @@ Frequently Asked Questions about the Agent | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Frequently Asked Questions about the Agent

The IP Displayed in the Admin Panel is Different from the Actual Agent IP?

Please refer to Dashboard Related - Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?. This will not be repeated here.

Errors During One-Click Script Installation

curl: Failed to connect to raw.githubusercontent.com......

This mostly occurs on servers in mainland China. Currently, the one-click script fetches the installation script directly from Github. You may try several times, or manually install the Agent. Additionally, you can find third-party Github acceleration services or mirrors and set them in the one-click installation script.

sudo: command not found

Please manually install sudo first, for example, in Ubuntu:

shell
apt install sudo
- +
Skip to content

Frequently Asked Questions about the Agent

The IP Displayed in the Admin Panel is Different from the Actual Agent IP?

Please refer to Dashboard Related - Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?. This will not be repeated here.

Errors During One-Click Script Installation

curl: Failed to connect to raw.githubusercontent.com......

This mostly occurs on servers in mainland China. Currently, the one-click script fetches the installation script directly from Github. You may try several times, or manually install the Agent. Additionally, you can find third-party Github acceleration services or mirrors and set them in the one-click installation script.

sudo: command not found

Please manually install sudo first, for example, in Ubuntu:

shell
apt install sudo
+ \ No newline at end of file diff --git a/en_US/guide/api.html b/en_US/guide/api.html index 006085f3..37afce2f 100644 --- a/en_US/guide/api.html +++ b/en_US/guide/api.html @@ -5,158 +5,161 @@ API Interface | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

API Interface

Nezha Monitoring supports querying the status information of Agents using the API interface

Creating a Token

Nezha Monitoring's API interface allows for Token authentication and Cookies authentication. To create a new Token, go to the admin panel, click on the avatar in the top right corner, select "API Token," and enter the Token management page. Click "Add Token", add a custom note, and click "Add".

To delete a Token, select the corresponding Token and click the delete icon on the right.

WARNING

Tokens are the authentication credentials for the API interface. They are critical to the security of your Dashboard's information, so do not share your Token with others.

Authentication Method

Ensure the request header contains Authorization: Token for authentication.

Token authentication method:

Request Headers:
-Authorization: Token

Usage Instructions

WARNING

Negative timestamps in the following examples represent 0000-00-00. This currently indicates that the Agent has never reported since the Dashboard went online, but it is not recommended to use the positive or negative value to determine the status.

TIP

The request method is GET, and the response format is JSON.

Get Server List

Request:

GET /api/v1/server/list?tag=

Parameters:

  • tag (optional): ServerTag is the server group. Provide this parameter to query only servers in that group.

Example response:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653014667,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1"
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": ""
-        }
-    ]
-}

Get Server Details

Request:

GET /api/v1/server/details?id=&tag=

Parameters:

  • id (optional): ServerID, multiple IDs separated by commas. Provide this parameter to query the server corresponding to that ID and ignore the tag parameter.
  • tag (optional): ServerTag, provide this parameter to query only servers in that group.

Example response:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653015042,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1",
-            "host": {
-                "Platform": "darwin",
-                "PlatformVersion": "12.3.1",
-                "CPU": [
-                    "Apple M1 Pro 1 Physical Core"
-                ],
-                "MemTotal": 17179869184,
-                "DiskTotal": 2473496842240,
-                "SwapTotal": 0,
-                "Arch": "arm64",
-                "Virtualization": "",
-                "BootTime": 1652683962,
-                "CountryCode": "hk",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 17.33,
-                "MemUsed": 14013841408,
-                "SwapUsed": 0,
-                "DiskUsed": 2335048912896,
-                "NetInTransfer": 2710273234,
-                "NetOutTransfer": 695454765,
-                "NetInSpeed": 10806,
-                "NetOutSpeed": 5303,
-                "Uptime": 331080,
-                "Load1": 5.23,
-                "Load5": 4.87,
-                "Load15": 3.99,
-                "TcpConnCount": 195,
-                "UdpConnCount": 70,
-                "ProcessCount": 437
-            }
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": "",
-            "host": {
-                "Platform": "",
-                "PlatformVersion": "",
-                "CPU": null,
-                "MemTotal": 0,
-                "DiskTotal": 0,
-                "SwapTotal": 0,
-                "Arch": "",
-                "Virtualization": "",
-                "BootTime": 0,
-                "CountryCode": "",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 0,
-                "MemUsed": 0,
-                "SwapUsed": 0,
-                "DiskUsed": 0,
-                "NetInTransfer": 0,
-                "NetOutTransfer": 0,
-                "NetInSpeed": 0,
-                "NetOutSpeed": 0,
-                "Uptime": 0,
-                "Load1": 0,
-                "Load5": 0,
-                "Load15": 0,
-                "TcpConnCount": 0,
-                "UdpConnCount": 0,
-                "ProcessCount": 0
-            }
-        }
-    ]
-}

Usage Examples

Get All Server Information

python
import requests
+    
Skip to content

API Interface

Nezha Monitoring supports querying the status information of Agents using the API interface

Creating a Token

Nezha Monitoring's API interface allows for Token authentication and Cookies authentication. To create a new Token, go to the admin panel, click on the avatar in the top right corner, select "API Token," and enter the Token management page. Click "Add Token", add a custom note, and click "Add".

To delete a Token, select the corresponding Token and click the delete icon on the right.

WARNING

Tokens are the authentication credentials for the API interface. They are critical to the security of your Dashboard's information, so do not share your Token with others.

Authentication Method

Ensure the request header contains Authorization: Token for authentication.

Token authentication method:

Request Headers:
+Authorization: Token

Usage Instructions

WARNING

Negative timestamps in the following examples represent 0000-00-00. This currently indicates that the Agent has never reported since the Dashboard went online, but it is not recommended to use the positive or negative value to determine the status.

TIP

The request method is GET, and the response format is JSON.

Get Server List

Request:

GET /api/v1/server/list?tag=

Parameters:

  • tag (optional): ServerTag is the server group. Provide this parameter to query only servers in that group.

Example response:

json
{
+    "code": 0,
+    "message": "success",
+    "result": [
+        {
+            "id": 1,
+            "name": "Server1",
+            "tag": "Tag1",
+            "last_active": 1653014667,
+            "ipv4": "1.1.1.1",
+            "ipv6": "",
+            "valid_ip": "1.1.1.1"
+        },
+        {
+            "id": 2,
+            "name": "Server2",
+            "tag": "Tag2",
+            "last_active": -62135596800,
+            "ipv4": "",
+            "ipv6": "",
+            "valid_ip": ""
+        }
+    ]
+}

Get Server Details

Request:

GET /api/v1/server/details?id=&tag=

Parameters:

  • id (optional): ServerID, multiple IDs separated by commas. Provide this parameter to query the server corresponding to that ID and ignore the tag parameter.
  • tag (optional): ServerTag, provide this parameter to query only servers in that group.

Example response:

json
{
+    "code": 0,
+    "message": "success",
+    "result": [
+        {
+            "id": 1,
+            "name": "Server1",
+            "tag": "Tag1",
+            "last_active": 1653015042,
+            "ipv4": "1.1.1.1",
+            "ipv6": "",
+            "valid_ip": "1.1.1.1",
+            "host": {
+                "Platform": "darwin",
+                "PlatformVersion": "12.3.1",
+                "CPU": [
+                    "Apple M1 Pro 1 Physical Core"
+                ],
+                "MemTotal": 17179869184,
+                "DiskTotal": 2473496842240,
+                "SwapTotal": 0,
+                "Arch": "arm64",
+                "Virtualization": "",
+                "BootTime": 1652683962,
+                "CountryCode": "hk",
+                "Version": ""
+            },
+            "status": {
+                "CPU": 17.33,
+                "MemUsed": 14013841408,
+                "SwapUsed": 0,
+                "DiskUsed": 2335048912896,
+                "NetInTransfer": 2710273234,
+                "NetOutTransfer": 695454765,
+                "NetInSpeed": 10806,
+                "NetOutSpeed": 5303,
+                "Uptime": 331080,
+                "Load1": 5.23,
+                "Load5": 4.87,
+                "Load15": 3.99,
+                "TcpConnCount": 195,
+                "UdpConnCount": 70,
+                "ProcessCount": 437
+            }
+        },
+        {
+            "id": 2,
+            "name": "Server2",
+            "tag": "Tag2",
+            "last_active": -62135596800,
+            "ipv4": "",
+            "ipv6": "",
+            "valid_ip": "",
+            "host": {
+                "Platform": "",
+                "PlatformVersion": "",
+                "CPU": null,
+                "MemTotal": 0,
+                "DiskTotal": 0,
+                "SwapTotal": 0,
+                "Arch": "",
+                "Virtualization": "",
+                "BootTime": 0,
+                "CountryCode": "",
+                "Version": ""
+            },
+            "status": {
+                "CPU": 0,
+                "MemUsed": 0,
+                "SwapUsed": 0,
+                "DiskUsed": 0,
+                "NetInTransfer": 0,
+                "NetOutTransfer": 0,
+                "NetInSpeed": 0,
+                "NetOutSpeed": 0,
+                "Uptime": 0,
+                "Load1": 0,
+                "Load5": 0,
+                "Load15": 0,
+                "TcpConnCount": 0,
+                "UdpConnCount": 0,
+                "ProcessCount": 0
+            }
+        }
+    ]
+}

Usage Examples

Get All Server Information

python
import requests
 
-url = "http://your-dashboard/api/v1/server/list"
-headers = {
-    "Authorization": "your_token"
-}
+url = "http://your-dashboard/api/v1/server/list"
+headers = {
+    "Authorization": "your_token"
+}
 
-response = requests.get(url, headers=headers)
-data = response.json()
+response = requests.get(url, headers=headers)
+data = response.json()
 
-for server in data['result']:
-    print(f"Server Name: {server['name']}, Last Active: {server['last_active']}, IP: {server['valid_ip']}")

Get Specific Server Details

python
import requests
+for server in data['result']:
+    print(f"Server Name: {server['name']}, Last Active: {server['last_active']}, IP: {server['valid_ip']}")

Get Specific Server Details

python
import requests
 
-server_id = 1  # Replace with your server ID
-url = f"http://your-dashboard/api/v1/server/details?id={server_id}"
-headers = {
-    "Authorization": "your_token"
-}
+server_id = 1  # Replace with your server ID
+url = f"http://your-dashboard/api/v1/server/details?id={server_id}"
+headers = {
+    "Authorization": "your_token"
+}
 
-response = requests.get(url, headers=headers)
-data = response.json()
+response = requests.get(url, headers=headers)
+data = response.json()
 
-server = data['result'][0]
-print(f"Server Name: {server['name']}")
-print(f"CPU Usage: {server['status']['CPU']}%")
-print(f"Memory Used: {server['status']['MemUsed']} bytes")
-print(f"Disk Used: {server['status']['DiskUsed']} bytes")
-print(f"Network In Speed: {server['status']['NetInSpeed']} bytes/s")
-print(f"Network Out Speed: {server['status']['NetOutSpeed']} bytes/s")

With the above example code, you can easily obtain and process server status information, enabling automated monitoring and management.

- +server = data['result'][0] +print(f"Server Name: {server['name']}") +print(f"CPU Usage: {server['status']['CPU']}%") +print(f"Memory Used: {server['status']['MemUsed']} bytes") +print(f"Disk Used: {server['status']['DiskUsed']} bytes") +print(f"Network In Speed: {server['status']['NetInSpeed']} bytes/s") +print(f"Network Out Speed: {server['status']['NetOutSpeed']} bytes/s")

With the above example code, you can easily obtain and process server status information, enabling automated monitoring and management.

+ \ No newline at end of file diff --git a/en_US/guide/dashboard.html b/en_US/guide/dashboard.html index 20f0fe31..44aada31 100644 --- a/en_US/guide/dashboard.html +++ b/en_US/guide/dashboard.html @@ -5,41 +5,44 @@ Install Dashboard | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Install Dashboard

Preparation

To set up Nezha Monitoring, you need:

  1. A server with public internet access, with firewall and security policies allowing traffic on ports 8008 and 5555. These ports are necessary for accessing and receiving data. A server with a single core and 512MB of RAM is sufficient for most use cases.
  2. A domain with an A record set to point to your Dashboard server IP.

TIP

If you want to use a CDN, prepare two domains: one configured with CDN for public access (CDN must support WebSocket protocol), and another domain not using CDN for communication between the Agent and Dashboard.

This document uses "dashboard.example.com" and "data.example.com" as example domains.

  1. A Github account (or Gitlab, Gitee).

This document uses the aaPanel for reverse proxying the Dashboard as an example. As future versions change, some features may change their entry points. This document is for reference only.

WARNING

This project does not depend on the aaPanel; you can choose any server panel you prefer or manually install Nginx or Caddy to configure SSL and reverse proxy.
If you do not need to use ports 80 and 443 to access the Dashboard, you can directly use the installation script to install and run Nezha Monitoring without installing Nginx.

Obtaining Github Client ID and Secret

Nezha Monitoring uses Github, Gitlab, or Gitee as admin accounts.

  1. First, create an OAuth application. For Github, log in to Github, open Github OAuth Apps, and select "OAuth Apps" -> "New OAuth App".
    Application name - Fill in as you like.
    Homepage URL - Fill in with the domain for accessing the dashboard, such as "http://dashboard.example.com" (your domain).
    Authorization callback URL - Fill in with the callback address, such as "http://dashboard.example.com/oauth2/callback" (don't forget /oauth2/callback).
  2. Click “Register application”.
  3. Save the Client ID on the page, then click “Generate a new client secret” to create a new Client Secret, which will be displayed only once, please keep it safe.

Using Cloudflare Access as OAuth2 Provider

If you encounter issues using Github, Gitlab, or Gitee as admin login, consider switching to using Cloudflare Access as the OAuth2 provider.

Creating a SaaS-OIDC Application

  1. Go to Zero Trust Dashboard and log in with your Cloudflare account.
  2. My Team -> Users -> <specific user> -> Get User ID and save it.
  3. Access -> Application -> Add an Application.
  4. Choose SaaS, enter a custom application name in Application (e.g., nezha), select OIDC, and click Add application.
  5. Select Scopes: openid, email, profile, groups.
  6. Fill in your callback address in Redirect URLs, such as https://dashboard.example.com/oauth2/callback.
  7. Save the Client ID, Client Secret, and Issuer address (protocol and domain part), e.g., https://xxxxx.cloudflareaccess.com.

If using this method, after installing the Dashboard, modify the configuration file /opt/nezha/dashboard/data/config.yaml, and change the Endpoint configuration to the Issuer address saved earlier, e.g., https://xxxxx.cloudflareaccess.com, and restart the Dashboard.

Installing the Dashboard on the Server

Run the installation script on the dashboard server:

bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

After Docker installation completes, enter the following values:

  • OAuth provider - choose one from github, cloudflare, gitlab, gitee.
  • Client ID - the previously saved Client ID.
  • Client Secret - the previously saved Client Secret.
  • Username - the username/User ID from the OAuth provider.
  • Site title - custom site title.
  • Access port - public access port, customizable, default is 8008.
  • Agent communication port - port for Agent and Dashboard communication, default is 5555.

After inputting the values, wait for the image to be pulled.
When the installation completes, you can access the dashboard by visiting your domain and port number, such as “http://dashboard.example.com:8008”.

In the future, if you need to run the script again, run:

bash
./nezha.sh

to open the management script.

Configuring Reverse Proxy

Create a new site in the aaPanel, with the domain filled in as the public access domain, such as “http://dashboard.example.com”. Then click “Settings” to enter the site settings options, select “Reverse Proxy” - “New Reverse Proxy”.

Customize a proxy name and fill in http://127.0.0.1 in the "Target URL" below, then click “Save”.

Open the “Configuration File” on the right side of the newly created reverse proxy and replace the configuration file with the following content:

nginx
#PROXY-START/
-location / {
-    proxy_pass http://127.0.0.1:8008;
-    proxy_set_header Host $http_host;
-    proxy_set_header Upgrade $http_upgrade;
-}
-location ~ ^/(ws|terminal/.+)$  {
-    proxy_pass http://127.0.0.1:8008;
-    proxy_http_version 1.1;
-    proxy_set_header Upgrade $http_upgrade;
-    proxy_set_header Connection "Upgrade";
-    proxy_set_header Host $http_host;
-}
-#PROXY-END/

Click “Save”.
Now you should be able to access the dashboard directly using the domain, such as “http://dashboard.example.com”.

Additional Content:

CaddyServer v1 (v2 does not require special configuration):

caddy
proxy /ws http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}
-proxy /terminal/* http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}

Configuring SSL in the aaPanel

First, temporarily disable the reverse proxy.
Like configuring SSL certificates for other websites, enter the “SSL” in the site settings, and you can choose to automatically apply for a Let’s Encrypt certificate or manually configure an existing certificate.
After completing the SSL settings, go back to Github OAuth Apps and edit the previously created OAuth application. Change all the domain parts in "Homepage URL" and "Authorization callback URL" from http to https, such as "https://dashboard.example.com" and "https://dashboard.example.com/oauth2/callback". Failing to change this may result in being unable to log in to the admin panel.

Updating the Dashboard

Run the script ./nezha.sh, and select to restart and update the dashboard.

- +
Skip to content

Install Dashboard

Preparation

To set up Nezha Monitoring, you need:

  1. A server with public internet access, with firewall and security policies allowing traffic on ports 8008 and 5555. These ports are necessary for accessing and receiving data. A server with a single core and 512MB of RAM is sufficient for most use cases.
  2. A domain with an A record set to point to your Dashboard server IP.

TIP

If you want to use a CDN, prepare two domains: one configured with CDN for public access (CDN must support WebSocket protocol), and another domain not using CDN for communication between the Agent and Dashboard.

This document uses "dashboard.example.com" and "data.example.com" as example domains.

  1. A Github account (or Gitlab, Gitee).

This document uses the aaPanel for reverse proxying the Dashboard as an example. As future versions change, some features may change their entry points. This document is for reference only.

WARNING

This project does not depend on the aaPanel; you can choose any server panel you prefer or manually install Nginx or Caddy to configure SSL and reverse proxy.
If you do not need to use ports 80 and 443 to access the Dashboard, you can directly use the installation script to install and run Nezha Monitoring without installing Nginx.

Obtaining Github Client ID and Secret

Nezha Monitoring uses Github, Gitlab, or Gitee as admin accounts.

  1. First, create an OAuth application. For Github, log in to Github, open Github OAuth Apps, and select "OAuth Apps" -> "New OAuth App".
    Application name - Fill in as you like.
    Homepage URL - Fill in with the domain for accessing the dashboard, such as "http://dashboard.example.com" (your domain).
    Authorization callback URL - Fill in with the callback address, such as "http://dashboard.example.com/oauth2/callback" (don't forget /oauth2/callback).
  2. Click “Register application”.
  3. Save the Client ID on the page, then click “Generate a new client secret” to create a new Client Secret, which will be displayed only once, please keep it safe.

Using Cloudflare Access as OAuth2 Provider

If you encounter issues using Github, Gitlab, or Gitee as admin login, consider switching to using Cloudflare Access as the OAuth2 provider.

Creating a SaaS-OIDC Application

  1. Go to Zero Trust Dashboard and log in with your Cloudflare account.
  2. My Team -> Users -> <specific user> -> Get User ID and save it.
  3. Access -> Application -> Add an Application.
  4. Choose SaaS, enter a custom application name in Application (e.g., nezha), select OIDC, and click Add application.
  5. Select Scopes: openid, email, profile, groups.
  6. Fill in your callback address in Redirect URLs, such as https://dashboard.example.com/oauth2/callback.
  7. Save the Client ID, Client Secret, and Issuer address (protocol and domain part), e.g., https://xxxxx.cloudflareaccess.com.

If using this method, after installing the Dashboard, modify the configuration file /opt/nezha/dashboard/data/config.yaml, and change the Endpoint configuration to the Issuer address saved earlier, e.g., https://xxxxx.cloudflareaccess.com, and restart the Dashboard.

Installing the Dashboard on the Server

Run the installation script on the dashboard server:

bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

After Docker installation completes, enter the following values:

  • OAuth provider - choose one from github, cloudflare, gitlab, gitee.
  • Client ID - the previously saved Client ID.
  • Client Secret - the previously saved Client Secret.
  • Username - the username/User ID from the OAuth provider.
  • Site title - custom site title.
  • Access port - public access port, customizable, default is 8008.
  • Agent communication port - port for Agent and Dashboard communication, default is 5555.

After inputting the values, wait for the image to be pulled.
When the installation completes, you can access the dashboard by visiting your domain and port number, such as “http://dashboard.example.com:8008”.

In the future, if you need to run the script again, run:

bash
./nezha.sh

to open the management script.

Configuring Reverse Proxy

Create a new site in the aaPanel, with the domain filled in as the public access domain, such as “http://dashboard.example.com”. Then click “Settings” to enter the site settings options, select “Reverse Proxy” - “New Reverse Proxy”.

Customize a proxy name and fill in http://127.0.0.1 in the "Target URL" below, then click “Save”.

Open the “Configuration File” on the right side of the newly created reverse proxy and replace the configuration file with the following content:

nginx
#PROXY-START/
+location / {
+    proxy_pass http://127.0.0.1:8008;
+    proxy_set_header Host $http_host;
+    proxy_set_header Upgrade $http_upgrade;
+}
+location ~ ^/(ws|terminal/.+)$  {
+    proxy_pass http://127.0.0.1:8008;
+    proxy_http_version 1.1;
+    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection "Upgrade";
+    proxy_set_header Host $http_host;
+}
+#PROXY-END/

Click “Save”.
Now you should be able to access the dashboard directly using the domain, such as “http://dashboard.example.com”.

Additional Content:

CaddyServer v1 (v2 does not require special configuration):

caddy
proxy /ws http://ip:8008 {
+    websocket
+    header_upstream -Origin
+}
+proxy /terminal/* http://ip:8008 {
+    websocket
+    header_upstream -Origin
+}

Configuring SSL in the aaPanel

First, temporarily disable the reverse proxy.
Like configuring SSL certificates for other websites, enter the “SSL” in the site settings, and you can choose to automatically apply for a Let’s Encrypt certificate or manually configure an existing certificate.
After completing the SSL settings, go back to Github OAuth Apps and edit the previously created OAuth application. Change all the domain parts in "Homepage URL" and "Authorization callback URL" from http to https, such as "https://dashboard.example.com" and "https://dashboard.example.com/oauth2/callback". Failing to change this may result in being unable to log in to the admin panel.

Updating the Dashboard

Run the script ./nezha.sh, and select to restart and update the dashboard.

+ \ No newline at end of file diff --git a/en_US/guide/dashboardq.html b/en_US/guide/dashboardq.html index af18f067..371b061d 100644 --- a/en_US/guide/dashboardq.html +++ b/en_US/guide/dashboardq.html @@ -5,30 +5,33 @@ Frequently Asked Questions about the Dashboard | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Frequently Asked Questions about the Dashboard

Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?

First, let's explain how the IP displayed in the Admin panel is obtained: The Agent periodically requests IP-API to get IP information and reports it to the Dashboard. The currently used IP-API can be viewed here: myip.go.
If you find that the IP displayed in the Admin panel is different from the IP provided by your service provider, it is most likely that the service provider has given you an entry IP, but the Agent is testing your exit IP. This issue can also occur with multi-line servers and IPLC private lines.

TIP

For example, a common scenario is that the service provider gives you a high-defense server. To meet both high defense and low network interruption rate goals, the IP provided may be a mapped high-defense IP rather than your server's real exit IP.

You can also test the exit IP on the Agent server by running the following commands:

shell
curl https://ipapi.co/ip/
-curl ip.sb
-curl ip-api.com

Forgot or Deleted Viewing Password

Please view or edit the /opt/nezha/dashboard/data/config.yaml file.
The password is located under the site-viewpassword item.

Dashboard Installation/Restart/Update Failure: iptables ......

First, try restarting Docker before proceeding:

shell
systemctl status docker
-systemctl restart docker
-systemctl status docker

After restarting, try reinstalling the Dashboard.
If iptables errors persist, consider disabling or removing iptables.
This issue might also be related to the kernel, so switching to the official kernel can be another solution.

Dashboard Restart Failure: Invalid hostPort: nz_site_port

If this issue occurs, you can modify the configuration via the installation script or directly edit the /opt/nezha/dashboard/docker-compose.yaml file.

Dashboard Layout Error, CSS Resources Not Loading

If the Dashboard page layout is incorrect, it's usually due to missing or inaccessible CSS files.
To resolve this, try restarting and updating the Dashboard first.
If the problem persists after updating, the issue may be due to inappropriate configurations in your vhost file. You can edit the Nginx vhost file or use the aaPanel to:

  1. Find the site configured during Dashboard installation in Websites and click Settings on the right.

  2. Select Configuration File and remove the following lines:

    nginx
    location ~ .*\.(js|css)?$
    -    {
    -        expires      12h;
    -        error_log /dev/null;
    -        access_log /dev/null;
    -    }
  3. Save the configuration, clear the browser, Nginx, and CDN caches, and refresh the page to see if it returns to normal.

Dashboard Cannot Start: panic: Unable to find the configured DDNS provider...

The value entered for the DDNS provider is incorrect. Currently, only webhook, cloudflare, tencentcloud, and dummy are supported.

Dashboard DDNS Update Crash: panic: interface conversion: interface {} is nil, not []interface {}

The entered DDNS AccessID or AccessSecret is incorrect.

Network Monitoring Page Shows: server monitor history not found

This error indicates that no TCP-Ping or ICMP-Ping type monitoring has been set in the services page or monitoring data has not yet been generated.
If it has been set up, wait for some time and then check again.

What to do if /terminal or /ws can't connect properly after enabling HTTPS?

This is often due to an incomplete certificate. Add the -d parameter to the agent run command. If the log contains x509:certificate signed by unknown authority, replacing with a complete certificate will solve the problem.

What if I'm not satisfied with the data modification/addition functionality provided by the dashboard and want to modify/add data myself?

Common in scenarios like batch adding Agents, you can directly modify the database.
Note that not everything in the database can be modified; incorrect modifications can lead to data corruption and inability to start the Dashboard. Do not modify the database casually!

DANGER

Again, do not modify the database casually!

If you need to modify data in the database, stop the dashboard container first.
The database type is sqlite3, located at /opt/nezha/dashboard/data/sqlite.db. Backup before modifying.

Will the Dashboard automatically update?

Agents typically update automatically, but the Dashboard does not and requires manual updates.

- +
Skip to content

Frequently Asked Questions about the Dashboard

Why is the IP Displayed in the Admin Panel Different from the Actual Agent IP?

First, let's explain how the IP displayed in the Admin panel is obtained: The Agent periodically requests IP-API to get IP information and reports it to the Dashboard. The currently used IP-API can be viewed here: myip.go.
If you find that the IP displayed in the Admin panel is different from the IP provided by your service provider, it is most likely that the service provider has given you an entry IP, but the Agent is testing your exit IP. This issue can also occur with multi-line servers and IPLC private lines.

TIP

For example, a common scenario is that the service provider gives you a high-defense server. To meet both high defense and low network interruption rate goals, the IP provided may be a mapped high-defense IP rather than your server's real exit IP.

You can also test the exit IP on the Agent server by running the following commands:

shell
curl https://ipapi.co/ip/
+curl ip.sb
+curl ip-api.com

Forgot or Deleted Viewing Password

Please view or edit the /opt/nezha/dashboard/data/config.yaml file.
The password is located under the site-viewpassword item.

Dashboard Installation/Restart/Update Failure: iptables ......

First, try restarting Docker before proceeding:

shell
systemctl status docker
+systemctl restart docker
+systemctl status docker

After restarting, try reinstalling the Dashboard.
If iptables errors persist, consider disabling or removing iptables.
This issue might also be related to the kernel, so switching to the official kernel can be another solution.

Dashboard Restart Failure: Invalid hostPort: nz_site_port

If this issue occurs, you can modify the configuration via the installation script or directly edit the /opt/nezha/dashboard/docker-compose.yaml file.

Dashboard Layout Error, CSS Resources Not Loading

If the Dashboard page layout is incorrect, it's usually due to missing or inaccessible CSS files.
To resolve this, try restarting and updating the Dashboard first.
If the problem persists after updating, the issue may be due to inappropriate configurations in your vhost file. You can edit the Nginx vhost file or use the aaPanel to:

  1. Find the site configured during Dashboard installation in Websites and click Settings on the right.

  2. Select Configuration File and remove the following lines:

    nginx
    location ~ .*\.(js|css)?$
    +    {
    +        expires      12h;
    +        error_log /dev/null;
    +        access_log /dev/null;
    +    }
  3. Save the configuration, clear the browser, Nginx, and CDN caches, and refresh the page to see if it returns to normal.

Dashboard Cannot Start: panic: Unable to find the configured DDNS provider...

The value entered for the DDNS provider is incorrect. Currently, only webhook, cloudflare, tencentcloud, and dummy are supported.

Dashboard DDNS Update Crash: panic: interface conversion: interface {} is nil, not []interface {}

The entered DDNS AccessID or AccessSecret is incorrect.

Network Monitoring Page Shows: server monitor history not found

This error indicates that no TCP-Ping or ICMP-Ping type monitoring has been set in the services page or monitoring data has not yet been generated.
If it has been set up, wait for some time and then check again.

What to do if /terminal or /ws can't connect properly after enabling HTTPS?

This is often due to an incomplete certificate. Add the -d parameter to the agent run command. If the log contains x509:certificate signed by unknown authority, replacing with a complete certificate will solve the problem.

What if I'm not satisfied with the data modification/addition functionality provided by the dashboard and want to modify/add data myself?

Common in scenarios like batch adding Agents, you can directly modify the database.
Note that not everything in the database can be modified; incorrect modifications can lead to data corruption and inability to start the Dashboard. Do not modify the database casually!

DANGER

Again, do not modify the database casually!

If you need to modify data in the database, stop the dashboard container first.
The database type is sqlite3, located at /opt/nezha/dashboard/data/sqlite.db. Backup before modifying.

Will the Dashboard automatically update?

Agents typically update automatically, but the Dashboard does not and requires manual updates.

+ \ No newline at end of file diff --git a/en_US/guide/loginq.html b/en_US/guide/loginq.html index 67b698cc..8c826f59 100644 --- a/en_US/guide/loginq.html +++ b/en_US/guide/loginq.html @@ -5,21 +5,24 @@ Frequently Asked Questions about logging into the Dashboard | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Frequently Asked Questions about logging into the Dashboard

Stuck Page/Connection Refused/Long Response Time After Login Callback

These issues can manifest in various ways, but ultimately the browser cannot display correctly after login.

  1. Your server cannot connect to Github/Gitee, which is most common when configuring Github on servers in mainland China. You may try several times or switch to Cloudflare Access.
  2. You have configured the callback address incorrectly. Ensure that your callback address is correct and that both the port and protocol are accurate!
  3. An unknown error occurred on the Dashboard. You can use a script to check the logs.

TIP

What is a protocol? In the browser, the string that ends your domain with :// is the protocol, usually http or https. Since there may be multiple protocol+domain+port combinations available for accessing the Dashboard in a normal deployment, make sure to choose the most appropriate one as the callback.

How to Check if My Callback Address is Wrong?

Ensure that the protocol+domain+port displayed in the browser before login and after the callback are consistent.
Ensure that your path is /oauth2/callback, all in lowercase.

Errors After Logging into the Admin Panel

  1. Clear cookies and log in again, or try a different browser.
  2. Check the callback address to ensure it is correct and that both the port and protocol are accurate! The address initiating the request must be in the same domain as the callback address, with the port, protocol, and domain (or IP) all matching.

lookup xxx

The container DNS resolution failed, usually due to modified iptables configurations.
It is recommended to restart Docker first, sudo systemctl restart docker, then restart the Dashboard using the script.
If the lookup error persists, check if there are other tools controlling iptables, such as firewall.
This issue might also be related to the kernel, so try switching to the official kernel.

Invalid authorization method, or the login callback address is invalid, expired, or has been revoked

This issue appears only when using Gitee login, and the reason is unclear. Switching to GitHub is recommended.

oauth2: server response missing access_token

This could be caused by various factors, most likely a network issue. Check your network and try again.
If unresolved, switching to Github or another method is recommended.

The user is not an admin of this site and cannot log in

You logged in with the wrong account or configured the wrong username. Note that the username is not an email, and you can use a script to modify it.
For Cloudflare Access users, note that your username is not an email but a User ID.

dial tcp xxx:443 i/o timeout

This is a network issue. Try restarting Docker first, sudo systemctl restart docker, then restart the Dashboard using the script.
If you are configuring Github login on a server in mainland China, switching to Cloudflare Access is recommended to avoid network interference.

net/http: TLS handshake timeout

Same as above.

- +
Skip to content

Frequently Asked Questions about logging into the Dashboard

Stuck Page/Connection Refused/Long Response Time After Login Callback

These issues can manifest in various ways, but ultimately the browser cannot display correctly after login.

  1. Your server cannot connect to Github/Gitee, which is most common when configuring Github on servers in mainland China. You may try several times or switch to Cloudflare Access.
  2. You have configured the callback address incorrectly. Ensure that your callback address is correct and that both the port and protocol are accurate!
  3. An unknown error occurred on the Dashboard. You can use a script to check the logs.

TIP

What is a protocol? In the browser, the string that ends your domain with :// is the protocol, usually http or https. Since there may be multiple protocol+domain+port combinations available for accessing the Dashboard in a normal deployment, make sure to choose the most appropriate one as the callback.

How to Check if My Callback Address is Wrong?

Ensure that the protocol+domain+port displayed in the browser before login and after the callback are consistent.
Ensure that your path is /oauth2/callback, all in lowercase.

Errors After Logging into the Admin Panel

  1. Clear cookies and log in again, or try a different browser.
  2. Check the callback address to ensure it is correct and that both the port and protocol are accurate! The address initiating the request must be in the same domain as the callback address, with the port, protocol, and domain (or IP) all matching.

lookup xxx

The container DNS resolution failed, usually due to modified iptables configurations.
It is recommended to restart Docker first, sudo systemctl restart docker, then restart the Dashboard using the script.
If the lookup error persists, check if there are other tools controlling iptables, such as firewall.
This issue might also be related to the kernel, so try switching to the official kernel.

Invalid authorization method, or the login callback address is invalid, expired, or has been revoked

This issue appears only when using Gitee login, and the reason is unclear. Switching to GitHub is recommended.

oauth2: server response missing access_token

This could be caused by various factors, most likely a network issue. Check your network and try again.
If unresolved, switching to Github or another method is recommended.

The user is not an admin of this site and cannot log in

You logged in with the wrong account or configured the wrong username. Note that the username is not an email, and you can use a script to modify it.
For Cloudflare Access users, note that your username is not an email but a User ID.

dial tcp xxx:443 i/o timeout

This is a network issue. Try restarting Docker first, sudo systemctl restart docker, then restart the Dashboard using the script.
If you are configuring Github login on a server in mainland China, switching to Cloudflare Access is recommended to avoid network interference.

net/http: TLS handshake timeout

Same as above.

+ \ No newline at end of file diff --git a/en_US/guide/notifications.html b/en_US/guide/notifications.html index 2c599c64..7a888778 100644 --- a/en_US/guide/notifications.html +++ b/en_US/guide/notifications.html @@ -5,60 +5,63 @@ Notification Configuration | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Notification Configuration

Nezha Monitoring supports monitoring server load, CPU, memory, disk, traffic, monthly traffic, process count, and connection count, and sending notifications when user-defined thresholds are reached.

Flexible Notification Methods

  • In Dashboard messages, the placeholder #DATETIME# represents the timestamp of the event. When the notification is triggered, the Dashboard automatically replaces #DATETIME# with the actual event time.
  • #NEZHA# is a placeholder for Dashboard messages, and the Dashboard automatically replaces the placeholder with the actual message when the notification is triggered.
  • The body content is in JSON format: When the request type is FORM, the value is in key:value form, and placeholders can be placed inside value. The placeholders will be automatically replaced during notification. When the request type is JSON, only simple string replacement is performed before being submitted to the URL.
  • Placeholders can also be placed inside the URL, and simple string replacement will be performed during the request.

Refer to the following notification method examples, and you can also flexibly set the push method according to your needs.

Bark Example

Click to expand/collapse
  • Name: Bark

  • URL structure: /:key/:body or /:key/:title/:body or /:key/:category/:title/:body

  • Request Method: GET

  • Request Type: Default

  • Body: Empty

  • Name: Bark

  • URL structure: /push

  • Request Method: POST

  • Request Type: form

  • Body: {"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":"https://xxxxxxxx/nz.png"}

Slack Example Contributor: @白歌

Click to expand/collapse

URL Parameter Acquisition Instructions

Prepare your Slack Workspace in advance and create an App for this Workspace. If you have not created one, you can create an App at Slack API.

After creating the App, you need to add an Incoming Webhook to the App. In the App's settings page, find Incoming Webhooks, enable Activate Incoming Webhooks, and at the bottom of the page, find and click Add New Webhook to Workspace, choose a Channel, and click Allow. After creating, you will get a Webhook URL, which you will use to replace the example URL below.

Telegram Example Contributor: @白歌

Click to expand/collapse

URL Parameter Acquisition Instructions

Create a bot in Telegram and get the bot's token and your Telegram user ID.

The token and user ID are alphanumeric strings. You can get your user ID by chatting with @userinfobot on Telegram. Create a bot by chatting with @BotFather, and you will get the bot's token.

Replace botXXXXXX with your bot token and YYYYYY with your user ID in the URL below. Note that you need to chat with the bot first, otherwise the bot cannot send messages to you.

Email Notification Example - Outlook Contributor: @白歌

Click to expand/collapse

Note: SendCloud has a daily free email sending limit. This is just an example. You can choose a paid service or other similar free services. The usage method is similar.

URL Parameter Acquisition Instructions

This example uses SendCloud as the email service. You need to register an account on SendCloud, create a sender email, and then obtain the APIUSER and APIKEY here.

Replace <replaceAPIUSER> and <replaceAPIKEY> in the example URL below with your APIUSER and APIKEY, and replace <customSenderEmail> and <customRecipientEmail> with any sender and recipient email addresses.

  • Name: MS Mail Notification
  • URL:https://graph.microsoft.com/v1.0/me/microsoft.graph.sendMail
  • Request method: POST
  • Request type: JSON
  • Header: {"Content-type":"application/json", "Authorization":"Bearer {Token}"}
  • Body:
    json
    {
    -  "message": {
    -      "subject": "Server Status Notification",
    -      "body": {
    -      "contentType": "Text",
    -      "content": "#NEZHA#"
    -      },
    -      "toRecipients": [
    -        {
    -          "emailAddress": {
    -              "address": "ADDRESS FOR RECEVING EMAILS"
    -              }
    -        }
    -      ]
    -  }
    -}

DingTalk Group Bot Configuration Example

Click to expand/collapse

URL Parameter Acquisition Instructions

Create a bot in DingTalk in advance and get the bot's token.

The bot URL is obtained after creating a bot in the DingTalk group - Manage Bot - Create Bot. Choose custom keywords for the security method, and the Body content value must contain these keywords.

WeChat Work Group Bot Example Contributor: @ChowRex

Click to expand/collapse

Supported placeholders list

json
{
-    "content": "#NEZHA#",
-    "ServerName": "#SERVER.NAME#",
-    "ServerIP": "#SERVER.IP#",
-    "ServerIPV4": "#SERVER.IPV4#",
-    "ServerIPV6": "#SERVER.IPV6#",
-    "CPU": "#SERVER.CPU#",
-    "MEM": "#SERVER.MEM#",
-    "SWAP": "#SERVER.SWAP#",
-    "DISK": "#SERVER.DISK#",
-    "NetInSpeed": "#SERVER.NETINSPEED#",
-    "NetOutSpeed": "#SERVER.NETOUTSPEED#",
-    "TransferIn": "#SERVER.TRANSFERIN#",
-    "TranferOut": "#SERVER.TRANSFEROUT#",
-    "Load1": "#SERVER.LOAD1#",
-    "Load5": "#SERVER.LOAD5#",
-    "Load15": "#SERVER.LOAD15#",
-    "TCP_CONN_COUNT": "#SERVER.TCPCONNCOUNT",  # invalid
-    "UDP_CONN_COUNT": "#SERVER.UDPCONNCOUNT",  # invalid
-}

This document is NOT available in English.

Group Bot Configuration Instructions - Document - WeChat Work Developer Center

  • Name: WeChat Work Group Bot
  • URL: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY
  • Request Method: POST
  • Request Type: JSON
  • Body:
    json
    {
    -    "msgtype": "markdown",
    -    "markdown": {
    -        "content": "# Nezha Notification\n\n\"#NEZHA#\"\n\n> Name: \"#SERVER.NAME#\"\n> IP: \"#SERVER.IP#\"\n> IPv4: \"#SERVER.IPV4#\"\nIPv6: \"#SERVER.IPV6#\"\n> CPU: \"#SERVER.CPU#\"\n> Memory: \"#SERVER.MEM#\"\n> Swap: \"#SERVER.SWAP#\"\n> Disk: \"#SERVER.DISK#\"\n> Upload Speed: \"#SERVER.NETINSPEED#\"\n> Download Speed: \"#SERVER.NETOUTSPEED#\"\n> Total Upload: \"#SERVER.TRANSFERIN#\"\n> Total Download: \"#SERVER.TRANSFEROUT#\"\n> Load1: \"#SERVER.LOAD1#\"\n> Load5: \"#SERVER.LOAD5#\"\n> Load15: \"#SERVER.LOAD15#\"\n> TCP Connection Count: \"#SERVER.TCPCONNCOUNT\"\n> UDP Connection Count: \"#SERVER.UDPCONNCOUNT\"\n\n"
    -    }
    -}

You can remove or add relevant information as needed.

Notification Rule Explanation

Basic Rules

  • type: You can choose one or more types. If multiple types are selected in one rule, all selected types must be satisfied to trigger a notification (refer to the examples below)
    • cpu, memory, swap, disk
    • net_in_speed inbound network speed, net_out_speed outbound network speed, net_all_speed total network speed, transfer_in inbound traffic, transfer_out outbound traffic, transfer_all total traffic
    • offline offline monitoring
    • load1, load5, load15 load
    • process_count process count (currently resource-intensive due to thread count, not supported temporarily)
    • tcp_conn_count, udp_conn_count connection count
  • duration: Duration in seconds. An notification is triggered if 30% or more of the samples exceed the threshold within this duration (to prevent data spikes).
  • min or max:
    • For traffic and network speed, the unit is bytes (1KB = 1024B, 1MB = 1024 * 1024B)
    • For memory, disk, and CPU, the unit is percentage
    • No need to set this for offline monitoring
  • cover:
    • 0 monitors all servers, use ignore to exclude specific servers
    • 1 ignores all servers, use ignore to monitor specific servers
      Example: [{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
  • ignore: Select specific servers to exclude, used with cover, content is server ID and boolean value, e.g., {"1": true, "2": false}

Complete Examples:

Add an offline notification:

  • Name: Offline Notification
  • Rule: [{"Type":"offline","Duration":10}]
  • Enabled: √

Add an notification for CPU usage exceeding 50% for 10 seconds and memory usage below 20% for 20 seconds:

  • Name: CPU+Memory
  • Rule: [{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
  • Enabled: √

Send notifications for specific servers to specific notification groups:

Scenario example:
There are 4 servers (1, 2, 3, 4) and two notification groups (A, B).
Notify group A if servers 1 and 2 are offline for 10 minutes.
Notify group B if servers 3 and 4 are offline for 10 minutes.

First, set up notification groups A and B, then add two notification rules:

Rule 1:

  • Name: 1, 2 Offline, Send to Notification Group A
  • Rule: [{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]
  • Notification Group: A
  • Enabled: √

Rule 2:

  • Name: 3, 4 Offline, Send to Notification Group B
  • Rule: [{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]
  • Notification Group: B
  • Enabled: √

Flexibly using parameters can make your notification function fully utilized

Special: Any Cycle Traffic notification

Can be used for monthly traffic monitoring

  • type:
    • transfer_in_cycle inbound traffic during the cycle
    • transfer_out_cycle outbound traffic during the cycle
    • transfer_all_cycle total traffic during the cycle
  • cycle_start: The start date of the statistical cycle (can be the start date of your server billing cycle). The time format is RFC3339, e.g., Beijing time is 2022-01-11T08:00:00.00+08:00
  • cycle_interval: The number of statistical cycle units (e.g., if the cycle unit is days, and this value is 7, it means statistics are collected every 7 days)
  • cycle_unit: Statistical cycle unit, default is hour, optional (hour, day, week, month, year)
  • min/max, cover, ignore refer to basic rule configuration

Example:

For servers with IDs 3 and 4 (defined in ignore), if the monthly outbound traffic exceeds 1TB starting from the 1st of each month, send an notification:

json
[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]

Notification Trigger Modes

  • Always Trigger: A notification is triggered every time the Agent reports a status that matches the notification rule.
  • Single Trigger: A notification is triggered only once when the status changes, such as from normal to abnormal or from abnormal to normal.

Set Tasks to Execute on notifications

If you need to execute a task while sending an notification message, you can set this item.

  • Task on Notification: The task to be executed when the notification status changes from "normal" to "event". The task should be set in the tasks page in advance.
  • Task on Recovery: The task to be executed when the notification status changes from "event" to "normal". The task should be set in the tasks page in advance.
- +
Skip to content

Notification Configuration

Nezha Monitoring supports monitoring server load, CPU, memory, disk, traffic, monthly traffic, process count, and connection count, and sending notifications when user-defined thresholds are reached.

Flexible Notification Methods

  • In Dashboard messages, the placeholder #DATETIME# represents the timestamp of the event. When the notification is triggered, the Dashboard automatically replaces #DATETIME# with the actual event time.
  • #NEZHA# is a placeholder for Dashboard messages, and the Dashboard automatically replaces the placeholder with the actual message when the notification is triggered.
  • The body content is in JSON format: When the request type is FORM, the value is in key:value form, and placeholders can be placed inside value. The placeholders will be automatically replaced during notification. When the request type is JSON, only simple string replacement is performed before being submitted to the URL.
  • Placeholders can also be placed inside the URL, and simple string replacement will be performed during the request.

Refer to the following notification method examples, and you can also flexibly set the push method according to your needs.

Bark Example

Click to expand/collapse
  • Name: Bark

  • URL structure: /:key/:body or /:key/:title/:body or /:key/:category/:title/:body

  • Request Method: GET

  • Request Type: Default

  • Body: Empty

  • Name: Bark

  • URL structure: /push

  • Request Method: POST

  • Request Type: form

  • Body: {"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":"https://xxxxxxxx/nz.png"}

Slack Example Contributor: @白歌

Click to expand/collapse

URL Parameter Acquisition Instructions

Prepare your Slack Workspace in advance and create an App for this Workspace. If you have not created one, you can create an App at Slack API.

After creating the App, you need to add an Incoming Webhook to the App. In the App's settings page, find Incoming Webhooks, enable Activate Incoming Webhooks, and at the bottom of the page, find and click Add New Webhook to Workspace, choose a Channel, and click Allow. After creating, you will get a Webhook URL, which you will use to replace the example URL below.

Telegram Example Contributor: @白歌

Click to expand/collapse

URL Parameter Acquisition Instructions

Create a bot in Telegram and get the bot's token and your Telegram user ID.

The token and user ID are alphanumeric strings. You can get your user ID by chatting with @userinfobot on Telegram. Create a bot by chatting with @BotFather, and you will get the bot's token.

Replace botXXXXXX with your bot token and YYYYYY with your user ID in the URL below. Note that you need to chat with the bot first, otherwise the bot cannot send messages to you.

Email Notification Example - Outlook Contributor: @白歌

Click to expand/collapse

Note: SendCloud has a daily free email sending limit. This is just an example. You can choose a paid service or other similar free services. The usage method is similar.

URL Parameter Acquisition Instructions

This example uses SendCloud as the email service. You need to register an account on SendCloud, create a sender email, and then obtain the APIUSER and APIKEY here.

Replace <replaceAPIUSER> and <replaceAPIKEY> in the example URL below with your APIUSER and APIKEY, and replace <customSenderEmail> and <customRecipientEmail> with any sender and recipient email addresses.

  • Name: MS Mail Notification
  • URL:https://graph.microsoft.com/v1.0/me/microsoft.graph.sendMail
  • Request method: POST
  • Request type: JSON
  • Header: {"Content-type":"application/json", "Authorization":"Bearer {Token}"}
  • Body:
    json
    {
    +  "message": {
    +      "subject": "Server Status Notification",
    +      "body": {
    +      "contentType": "Text",
    +      "content": "#NEZHA#"
    +      },
    +      "toRecipients": [
    +        {
    +          "emailAddress": {
    +              "address": "ADDRESS FOR RECEVING EMAILS"
    +              }
    +        }
    +      ]
    +  }
    +}

DingTalk Group Bot Configuration Example

Click to expand/collapse

URL Parameter Acquisition Instructions

Create a bot in DingTalk in advance and get the bot's token.

The bot URL is obtained after creating a bot in the DingTalk group - Manage Bot - Create Bot. Choose custom keywords for the security method, and the Body content value must contain these keywords.

WeChat Work Group Bot Example Contributor: @ChowRex

Click to expand/collapse

Supported placeholders list

json
{
+    "content": "#NEZHA#",
+    "ServerName": "#SERVER.NAME#",
+    "ServerIP": "#SERVER.IP#",
+    "ServerIPV4": "#SERVER.IPV4#",
+    "ServerIPV6": "#SERVER.IPV6#",
+    "CPU": "#SERVER.CPU#",
+    "MEM": "#SERVER.MEM#",
+    "SWAP": "#SERVER.SWAP#",
+    "DISK": "#SERVER.DISK#",
+    "NetInSpeed": "#SERVER.NETINSPEED#",
+    "NetOutSpeed": "#SERVER.NETOUTSPEED#",
+    "TransferIn": "#SERVER.TRANSFERIN#",
+    "TranferOut": "#SERVER.TRANSFEROUT#",
+    "Load1": "#SERVER.LOAD1#",
+    "Load5": "#SERVER.LOAD5#",
+    "Load15": "#SERVER.LOAD15#",
+    "TCP_CONN_COUNT": "#SERVER.TCPCONNCOUNT",  # invalid
+    "UDP_CONN_COUNT": "#SERVER.UDPCONNCOUNT",  # invalid
+}

This document is NOT available in English.

Group Bot Configuration Instructions - Document - WeChat Work Developer Center

  • Name: WeChat Work Group Bot
  • URL: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY
  • Request Method: POST
  • Request Type: JSON
  • Body:
    json
    {
    +    "msgtype": "markdown",
    +    "markdown": {
    +        "content": "# Nezha Notification\n\n\"#NEZHA#\"\n\n> Name: \"#SERVER.NAME#\"\n> IP: \"#SERVER.IP#\"\n> IPv4: \"#SERVER.IPV4#\"\nIPv6: \"#SERVER.IPV6#\"\n> CPU: \"#SERVER.CPU#\"\n> Memory: \"#SERVER.MEM#\"\n> Swap: \"#SERVER.SWAP#\"\n> Disk: \"#SERVER.DISK#\"\n> Upload Speed: \"#SERVER.NETINSPEED#\"\n> Download Speed: \"#SERVER.NETOUTSPEED#\"\n> Total Upload: \"#SERVER.TRANSFERIN#\"\n> Total Download: \"#SERVER.TRANSFEROUT#\"\n> Load1: \"#SERVER.LOAD1#\"\n> Load5: \"#SERVER.LOAD5#\"\n> Load15: \"#SERVER.LOAD15#\"\n> TCP Connection Count: \"#SERVER.TCPCONNCOUNT\"\n> UDP Connection Count: \"#SERVER.UDPCONNCOUNT\"\n\n"
    +    }
    +}

You can remove or add relevant information as needed.

Notification Rule Explanation

Basic Rules

  • type: You can choose one or more types. If multiple types are selected in one rule, all selected types must be satisfied to trigger a notification (refer to the examples below)
    • cpu, memory, swap, disk
    • net_in_speed inbound network speed, net_out_speed outbound network speed, net_all_speed total network speed, transfer_in inbound traffic, transfer_out outbound traffic, transfer_all total traffic
    • offline offline monitoring
    • load1, load5, load15 load
    • process_count process count (currently resource-intensive due to thread count, not supported temporarily)
    • tcp_conn_count, udp_conn_count connection count
  • duration: Duration in seconds. An notification is triggered if 30% or more of the samples exceed the threshold within this duration (to prevent data spikes).
  • min or max:
    • For traffic and network speed, the unit is bytes (1KB = 1024B, 1MB = 1024 * 1024B)
    • For memory, disk, and CPU, the unit is percentage
    • No need to set this for offline monitoring
  • cover:
    • 0 monitors all servers, use ignore to exclude specific servers
    • 1 ignores all servers, use ignore to monitor specific servers
      Example: [{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
  • ignore: Select specific servers to exclude, used with cover, content is server ID and boolean value, e.g., {"1": true, "2": false}

Complete Examples:

Add an offline notification:

  • Name: Offline Notification
  • Rule: [{"Type":"offline","Duration":10}]
  • Enabled: √

Add an notification for CPU usage exceeding 50% for 10 seconds and memory usage below 20% for 20 seconds:

  • Name: CPU+Memory
  • Rule: [{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
  • Enabled: √

Send notifications for specific servers to specific notification groups:

Scenario example:
There are 4 servers (1, 2, 3, 4) and two notification groups (A, B).
Notify group A if servers 1 and 2 are offline for 10 minutes.
Notify group B if servers 3 and 4 are offline for 10 minutes.

First, set up notification groups A and B, then add two notification rules:

Rule 1:

  • Name: 1, 2 Offline, Send to Notification Group A
  • Rule: [{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]
  • Notification Group: A
  • Enabled: √

Rule 2:

  • Name: 3, 4 Offline, Send to Notification Group B
  • Rule: [{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]
  • Notification Group: B
  • Enabled: √

Flexibly using parameters can make your notification function fully utilized

Special: Any Cycle Traffic notification

Can be used for monthly traffic monitoring

  • type:
    • transfer_in_cycle inbound traffic during the cycle
    • transfer_out_cycle outbound traffic during the cycle
    • transfer_all_cycle total traffic during the cycle
  • cycle_start: The start date of the statistical cycle (can be the start date of your server billing cycle). The time format is RFC3339, e.g., Beijing time is 2022-01-11T08:00:00.00+08:00
  • cycle_interval: The number of statistical cycle units (e.g., if the cycle unit is days, and this value is 7, it means statistics are collected every 7 days)
  • cycle_unit: Statistical cycle unit, default is hour, optional (hour, day, week, month, year)
  • min/max, cover, ignore refer to basic rule configuration

Example:

For servers with IDs 3 and 4 (defined in ignore), if the monthly outbound traffic exceeds 1TB starting from the 1st of each month, send an notification:

json
[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]

Notification Trigger Modes

  • Always Trigger: A notification is triggered every time the Agent reports a status that matches the notification rule.
  • Single Trigger: A notification is triggered only once when the status changes, such as from normal to abnormal or from abnormal to normal.

Set Tasks to Execute on notifications

If you need to execute a task while sending an notification message, you can set this item.

  • Task on Notification: The task to be executed when the notification status changes from "normal" to "event". The task should be set in the tasks page in advance.
  • Task on Recovery: The task to be executed when the notification status changes from "event" to "normal". The task should be set in the tasks page in advance.
+ \ No newline at end of file diff --git a/en_US/guide/q2.html b/en_US/guide/q2.html index 4ad73198..19811ec1 100644 --- a/en_US/guide/q2.html +++ b/en_US/guide/q2.html @@ -5,21 +5,24 @@ Agent Startup/Online Troubleshooting Process | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Agent Startup/Online Troubleshooting Process

  1. Directly execute /opt/nezha/agent/nezha-agent -s DashboardIP or non-CDN domain:RPCPort -p AgentKey -d to check if the logs indicate timeouts due to DNS or poor network conditions.
  2. Use nc -v Domain/IP RPCPort or telnet Domain/IP RPCPort to check for network issues, inspect the inbound and outbound firewalls of the local machine and the panel server. If you cannot determine the issue, you can use the port checking tool provided by https://port.ping.pe/.
  3. If the above steps indicate no issues but the Agent still does not go online correctly, try disabling SELinux. How to disable SELinux?
- +
Skip to content

Agent Startup/Online Troubleshooting Process

  1. Directly execute /opt/nezha/agent/nezha-agent -s DashboardIP or non-CDN domain:RPCPort -p AgentKey -d to check if the logs indicate timeouts due to DNS or poor network conditions.
  2. Use nc -v Domain/IP RPCPort or telnet Domain/IP RPCPort to check for network issues, inspect the inbound and outbound firewalls of the local machine and the panel server. If you cannot determine the issue, you can use the port checking tool provided by https://port.ping.pe/.
  3. If the above steps indicate no issues but the Agent still does not go online correctly, try disabling SELinux. How to disable SELinux?
+ \ No newline at end of file diff --git a/en_US/guide/q3.html b/en_US/guide/q3.html index 4f030dc8..819a0759 100644 --- a/en_US/guide/q3.html +++ b/en_US/guide/q3.html @@ -5,94 +5,97 @@ Reverse Proxy gRPC Port (Supports Cloudflare CDN) | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Reverse Proxy gRPC Port (Supports Cloudflare CDN)

Using Nginx or Caddy to reverse proxy gRPC

  • Nginx Configuration
nginx
server {
-    listen 443 ssl http2;
-    listen [::]:443 ssl http2;
-    server_name data.example.com; # Your domain that the Agent uses to connect to the Dashboard
+    
Skip to content

Reverse Proxy gRPC Port (Supports Cloudflare CDN)

Using Nginx or Caddy to reverse proxy gRPC

  • Nginx Configuration
nginx
server {
+    listen 443 ssl http2;
+    listen [::]:443 ssl http2;
+    server_name data.example.com; # Your domain that the Agent uses to connect to the Dashboard
 
-    ssl_certificate          /data/letsencrypt/fullchain.pem; # Path to your domain certificate
-    ssl_certificate_key      /data/letsencrypt/key.pem;       # Path to your domain private key
-    ssl_stapling on;
-    ssl_session_timeout 1d;
-    ssl_session_cache shared:SSL:10m; # This might conflict with other configuration files; comment it out if there are conflicts
-    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
+    ssl_certificate          /data/letsencrypt/fullchain.pem; # Path to your domain certificate
+    ssl_certificate_key      /data/letsencrypt/key.pem;       # Path to your domain private key
+    ssl_stapling on;
+    ssl_session_timeout 1d;
+    ssl_session_cache shared:SSL:10m; # This might conflict with other configuration files; comment it out if there are conflicts
+    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
 
-    underscores_in_headers on;
+    underscores_in_headers on;
 
-    keepalive_time 24h;
-    keepalive_requests 100000;
-    keepalive_timeout 120s;
+    keepalive_time 24h;
+    keepalive_requests 100000;
+    keepalive_timeout 120s;
 
-    location / {
-        grpc_read_timeout 300s;
-        grpc_send_timeout 300s;
-        grpc_socket_keepalive on;
-        grpc_pass grpc://grpcservers;
-    }
-}
+    location / {
+        grpc_read_timeout 300s;
+        grpc_send_timeout 300s;
+        grpc_socket_keepalive on;
+        grpc_pass grpc://grpcservers;
+    }
+}
 
-upstream grpcservers {
-    server localhost:5555;
-    keepalive 512;
-}
  • Caddy Configuration
data.example.com:443 { # Your domain that the Agent uses to connect to the Dashboard
-    reverse_proxy {
-        to localhost:5555
-        transport http {
-            versions h2c 2
-        }
-    }
-}

Dashboard Configuration

  • First, log in to the Dashboard and go to the settings page. In the Non-CDN Dashboard server domain/IP field, enter the domain configured in Nginx or Caddy in the previous step, for example, data.example.com, and save it.
  • Then, on the Dashboard server, open the /opt/nezha/dashboard/data/config.yaml file. Modify proxygrpcport to the port that Nginx or Caddy is listening to, for example, 443. Since we enabled SSL/TLS in Nginx or Caddy, set tls to true. After making these changes, restart the Dashboard.

Agent Configuration

  • Log in to the Dashboard management backend, copy the one-click installation command, and execute it on the corresponding server to reinstall the agent.

Enabling Cloudflare CDN (Optional)

According to Cloudflare gRPC requirements: gRPC services must listen on port 443 and must support TLS and HTTP/2. So, to enable CDN, you must use port 443 when configuring Nginx or Caddy to reverse proxy gRPC and configure the certificate (Caddy will automatically apply and configure the certificate).

  • Log in to Cloudflare, select the domain you are using. Go to the Network tab and turn on the gRPC switch. Then, go to the DNS tab, find the DNS record for the domain configured in Nginx or Caddy to reverse proxy gRPC, and enable the CDN by clicking the orange cloud.

After enabling gRPC, it might not be available immediately, and you may need to wait for a while. You can use curl and nezha-agent -d to verify:

bash
localhost:~/agent# curl -H "content-type: application/grpc+proto" -H "authorization: Bearer test" https://xxx.xxx.ovh -v 
-* processing: https://xxx.xxx.ovh
-*   Trying [2606:4700:3035::ac43:8bed]:443...
-* Connected to xxx.xxx.ovh (2606:4700:3035::ac43:8bed) port 443
-# ... SSL info
-* using HTTP/2
-* h2 [:method: GET]
-* h2 [:scheme: https]
-* h2 [:authority: xxx.xxx.ovh]
-* h2 [:path: /]
-* h2 [user-agent: curl/8.2.1]
-* h2 [accept: */*]
-* Using Stream ID: 1
-> GET / HTTP/2
-> Host: xxx.xxx.ovh
-> User-Agent: curl/8.4.0
-> Accept: */*
-> content-type: application/grpc+proto
-> authorization: Bearer test
-> 
-< HTTP/2 405 
-< date: Wed, 20 Dec 2023 08:56:27 GMT
-< content-type: application/grpc+proto
-< cf-ray: 8386ac12dabd5ddc-HKG
-< cf-cache-status: DYNAMIC
-< grpc-message: Received a HEADERS frame with :method "GET" which should be POST
-< grpc-status: 13
-< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=%2BTjgJvXWyRF11nUOYx9Lq7UDC1xOYBLtjvWrdjVJQIqu9YqnFJeZFran2KRs6zabQc%2BLV8AubNqYRYDb7hQAZe6bglmVz0wQjrb0tNovYf%2B59SAp%2BQfZnH%2BAFDydNT95ZCmTPnKgWetcwQiUfXU%3D"}],"group":"cf-nel","max_age":604800}
-< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
-< vary: Accept-Encoding
-< server: cloudflare
-< alt-svc: h3=":443"; ma=86400
-< 
-* Connection #0 to host xxx.xxx.ovh left intact
-localhost:~/agent# /opt/nezha/agent/nezha-agent -s nezha.xxx.xxx:443 -p YOUR_KEY --tls -d
-NEZHA@2023-12-20 05:14:00>> 检查更新: 0.15.14
-NEZHA@2023-12-20 05:14:01>> 上报系统信息失败: rpc error: code = Unknown desc = EOF # You need to modify the GRPCHost and TLS options in the Dashboard /opt/nezha/dashboard/data/config.yaml
-NEZHA@2023-12-20 05:14:01>> Error to close connection ...
- +upstream grpcservers { + server localhost:5555; + keepalive 512; +}

Dashboard Configuration

Agent Configuration

Enabling Cloudflare CDN (Optional)

According to Cloudflare gRPC requirements: gRPC services must listen on port 443 and must support TLS and HTTP/2. So, to enable CDN, you must use port 443 when configuring Nginx or Caddy to reverse proxy gRPC and configure the certificate (Caddy will automatically apply and configure the certificate).

After enabling gRPC, it might not be available immediately, and you may need to wait for a while. You can use curl and nezha-agent -d to verify:

bash
localhost:~/agent# curl -H "content-type: application/grpc+proto" -H "authorization: Bearer test" https://xxx.xxx.ovh -v 
+* processing: https://xxx.xxx.ovh
+*   Trying [2606:4700:3035::ac43:8bed]:443...
+* Connected to xxx.xxx.ovh (2606:4700:3035::ac43:8bed) port 443
+# ... SSL info
+* using HTTP/2
+* h2 [:method: GET]
+* h2 [:scheme: https]
+* h2 [:authority: xxx.xxx.ovh]
+* h2 [:path: /]
+* h2 [user-agent: curl/8.2.1]
+* h2 [accept: */*]
+* Using Stream ID: 1
+> GET / HTTP/2
+> Host: xxx.xxx.ovh
+> User-Agent: curl/8.4.0
+> Accept: */*
+> content-type: application/grpc+proto
+> authorization: Bearer test
+> 
+< HTTP/2 405 
+< date: Wed, 20 Dec 2023 08:56:27 GMT
+< content-type: application/grpc+proto
+< cf-ray: 8386ac12dabd5ddc-HKG
+< cf-cache-status: DYNAMIC
+< grpc-message: Received a HEADERS frame with :method "GET" which should be POST
+< grpc-status: 13
+< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=%2BTjgJvXWyRF11nUOYx9Lq7UDC1xOYBLtjvWrdjVJQIqu9YqnFJeZFran2KRs6zabQc%2BLV8AubNqYRYDb7hQAZe6bglmVz0wQjrb0tNovYf%2B59SAp%2BQfZnH%2BAFDydNT95ZCmTPnKgWetcwQiUfXU%3D"}],"group":"cf-nel","max_age":604800}
+< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
+< vary: Accept-Encoding
+< server: cloudflare
+< alt-svc: h3=":443"; ma=86400
+< 
+* Connection #0 to host xxx.xxx.ovh left intact
+localhost:~/agent# /opt/nezha/agent/nezha-agent -s nezha.xxx.xxx:443 -p YOUR_KEY --tls -d
+NEZHA@2023-12-20 05:14:00>> 检查更新: 0.15.14
+NEZHA@2023-12-20 05:14:01>> 上报系统信息失败: rpc error: code = Unknown desc = EOF # You need to modify the GRPCHost and TLS options in the Dashboard /opt/nezha/dashboard/data/config.yaml
+NEZHA@2023-12-20 05:14:01>> Error to close connection ...
+ \ No newline at end of file diff --git a/en_US/guide/q4.html b/en_US/guide/q4.html index a22e633c..0eda2d6a 100644 --- a/en_US/guide/q4.html +++ b/en_US/guide/q4.html @@ -5,21 +5,24 @@ Real-Time Channel Disconnection/Online Terminal Connection Failure | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Real-Time Channel Disconnection/Online Terminal Connection Failure

  • If you are using a CDN, ensure that the CDN provider offers WebSocket services and that WebSocket is enabled.
  • Confirm that your reverse proxy rules have special configurations for the /ws and /terminal paths. You can click here to view the reverse proxy configuration.
- +
Skip to content

Real-Time Channel Disconnection/Online Terminal Connection Failure

  • If you are using a CDN, ensure that the CDN provider offers WebSocket services and that WebSocket is enabled.
  • Confirm that your reverse proxy rules have special configurations for the /ws and /terminal paths. You can click here to view the reverse proxy configuration.
+ \ No newline at end of file diff --git a/en_US/guide/q5.html b/en_US/guide/q5.html index 6b182f77..0fb2330f 100644 --- a/en_US/guide/q5.html +++ b/en_US/guide/q5.html @@ -5,21 +5,24 @@ How to Perform Data Migration and Backup Recovery? | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + - - + + \ No newline at end of file diff --git a/en_US/guide/q6.html b/en_US/guide/q6.html index 3a8ad8c0..4d7988eb 100644 --- a/en_US/guide/q6.html +++ b/en_US/guide/q6.html @@ -5,21 +5,24 @@ How to Reset Traffic Statistics Monthly? | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

How to Reset Traffic Statistics Monthly?

The traffic statistics on the homepage reset every time the server restarts. To achieve a monthly reset of the traffic counter, you can do the following:

  1. Go to the Notification page in the management panel.
  2. Refer to this document to create a monthly traffic notification.
  3. Return to the homepage and go to the Services page, where you can see the monthly traffic statistics. The statistics here will not reset when the server restarts.

TIP

This method allows you to set any period, including but not limited to hourly, daily, weekly, monthly, or yearly traffic statistics reset, offering great flexibility!

- +
Skip to content

How to Reset Traffic Statistics Monthly?

The traffic statistics on the homepage reset every time the server restarts. To achieve a monthly reset of the traffic counter, you can do the following:

  1. Go to the Notification page in the management panel.
  2. Refer to this document to create a monthly traffic notification.
  3. Return to the homepage and go to the Services page, where you can see the monthly traffic statistics. The statistics here will not reset when the server restarts.

TIP

This method allows you to set any period, including but not limited to hourly, daily, weekly, monthly, or yearly traffic statistics reset, offering great flexibility!

+ \ No newline at end of file diff --git a/en_US/guide/q7.html b/en_US/guide/q7.html index 06b75b50..e7c718d9 100644 --- a/en_US/guide/q7.html +++ b/en_US/guide/q7.html @@ -5,21 +5,24 @@ Custom Agent Monitoring Projects | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Custom Agent Monitoring Projects

Customizing Monitored Network Interfaces and Disk Partitions

Execute the following command to select custom network interfaces and partitions, then restart the Agent for the changes to take effect:

bash
/opt/nezha/agent/nezha-agent edit

Other Runtime Parameters

To view the supported parameters, execute:

bash
./nezha-agent --help

If you installed the Agent using the one-click script, you can edit /etc/systemd/system/nezha-agent.service and add the following parameters at the end of the ExecStart= line:

  • --report-delay: Controls the interval for reporting system information. The default is 1 second. You can set it to 3 to further reduce the agent's system resource usage (configuration range: 1-4).
  • --skip-conn: Does not monitor connection counts. Recommended for servers with high connection density or high CPU usage.
  • --skip-procs: Does not monitor process counts, which can also reduce Agent resource usage.
  • --disable-auto-update: Disables automatic updates for the Agent (security feature).
  • --disable-force-update: Disables forced updates for the Agent (security feature).
  • --disable-command-execute: Disables the execution of scheduled tasks and the opening of the online terminal on the Agent (security feature).
  • --tls: Enables SSL/TLS encryption (required if you use nginx to reverse proxy the Agent's gRPC connection and nginx has SSL/TLS enabled).
- +
Skip to content

Custom Agent Monitoring Projects

Customizing Monitored Network Interfaces and Disk Partitions

Execute the following command to select custom network interfaces and partitions, then restart the Agent for the changes to take effect:

bash
/opt/nezha/agent/nezha-agent edit

Other Runtime Parameters

To view the supported parameters, execute:

bash
./nezha-agent --help

If you installed the Agent using the one-click script, you can edit /etc/systemd/system/nezha-agent.service and add the following parameters at the end of the ExecStart= line:

  • --report-delay: Controls the interval for reporting system information. The default is 1 second. You can set it to 3 to further reduce the agent's system resource usage (configuration range: 1-4).
  • --skip-conn: Does not monitor connection counts. Recommended for servers with high connection density or high CPU usage.
  • --skip-procs: Does not monitor process counts, which can also reduce Agent resource usage.
  • --disable-auto-update: Disables automatic updates for the Agent (security feature).
  • --disable-force-update: Disables forced updates for the Agent (security feature).
  • --disable-command-execute: Disables the execution of scheduled tasks and the opening of the online terminal on the Agent (security feature).
  • --tls: Enables SSL/TLS encryption (required if you use nginx to reverse proxy the Agent's gRPC connection and nginx has SSL/TLS enabled).
+ \ No newline at end of file diff --git a/en_US/guide/q8.html b/en_US/guide/q8.html index 41ef3fd7..e53ea700 100644 --- a/en_US/guide/q8.html +++ b/en_US/guide/q8.html @@ -5,26 +5,29 @@ Cloudflare Access OAuth2 Configuration | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Cloudflare Access OAuth2 Configuration

If you encounter issues logging in as an administrator using Github, Gitlab, or Gitee, you may consider switching to Cloudflare Access as the OAuth2 provider.

Example Configuration:

yaml
Oauth2:
-  Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
-  ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
-  ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
-  Endpoint: "https://xxxxx.cloudflareaccess.com"
-  Type: cloudflare

Configuration Description:

ParameterRetrieval Method
AdminMy Team -> Users -> <specific user> -> User ID
ClientID/ClientSecretAccess -> Application -> Add an Application
-> SaaS -> OIDC
EndpointAccess -> Application -> Application URL -> Only keep the protocol and domain, no path

Creating a SaaS-OIDC Application

Go to Zero Trust Dashboard: https://one.dash.cloudflare.com

  1. My Team -> Users -> <specific user> -> Get User ID and save it;
  2. Access -> Application -> Add an Application;
  3. Select SaaS, enter a custom application name (e.g., nezha) in Application, select OIDC, and click Add application;
  4. In Scopes, select openid, email, profile, groups;
  5. Fill in your CallBack URL in Redirect URLs, such as https://dashboard.example.com/oauth2/callback;
  6. Record the Client ID, Client Secret, and the protocol and domain part of the Issuer URL, such as https://xxxxx.cloudflareaccess.com;
  7. Edit the Dashboard configuration file (usually located at /opt/nezha/dashboard/data/config.yaml), modify the Oauth2 configuration according to the example configuration, and restart the Dashboard service.

Authentication Policy Configuration

After completing the Dashboard setup, you also need to configure the authentication policy in the Zero Trust Dashboard: Access -> Applications -> <application name> -> Policies. You can choose from over ten SSO authentication methods, including email OTP verification, hardware key verification, etc. For detailed configuration, please refer to the Cloudflare Zero Trust documentation.

- +
Skip to content

Cloudflare Access OAuth2 Configuration

If you encounter issues logging in as an administrator using Github, Gitlab, or Gitee, you may consider switching to Cloudflare Access as the OAuth2 provider.

Example Configuration:

yaml
Oauth2:
+  Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
+  ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
+  ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
+  Endpoint: "https://xxxxx.cloudflareaccess.com"
+  Type: cloudflare

Configuration Description:

ParameterRetrieval Method
AdminMy Team -> Users -> <specific user> -> User ID
ClientID/ClientSecretAccess -> Application -> Add an Application
-> SaaS -> OIDC
EndpointAccess -> Application -> Application URL -> Only keep the protocol and domain, no path

Creating a SaaS-OIDC Application

Go to Zero Trust Dashboard: https://one.dash.cloudflare.com

  1. My Team -> Users -> <specific user> -> Get User ID and save it;
  2. Access -> Application -> Add an Application;
  3. Select SaaS, enter a custom application name (e.g., nezha) in Application, select OIDC, and click Add application;
  4. In Scopes, select openid, email, profile, groups;
  5. Fill in your CallBack URL in Redirect URLs, such as https://dashboard.example.com/oauth2/callback;
  6. Record the Client ID, Client Secret, and the protocol and domain part of the Issuer URL, such as https://xxxxx.cloudflareaccess.com;
  7. Edit the Dashboard configuration file (usually located at /opt/nezha/dashboard/data/config.yaml), modify the Oauth2 configuration according to the example configuration, and restart the Dashboard service.

Authentication Policy Configuration

After completing the Dashboard setup, you also need to configure the authentication policy in the Zero Trust Dashboard: Access -> Applications -> <application name> -> Policies. You can choose from over ten SSO authentication methods, including email OTP verification, hardware key verification, etc. For detailed configuration, please refer to the Cloudflare Zero Trust documentation.

+ \ No newline at end of file diff --git a/en_US/guide/servers.html b/en_US/guide/servers.html index 6d85da1b..f6b0913f 100644 --- a/en_US/guide/servers.html +++ b/en_US/guide/servers.html @@ -5,46 +5,49 @@ Server Management | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Server Management

Introduction

The server section is responsible for managing Agents, forming the most fundamental part of Nezha monitoring and serving as the basis for other functionalities.

Adding a Server

The first step is to add a server, where you can customize the name, group, sorting, and notes.
Servers in the same group will be displayed together in supported themes. Notes will only be visible in the Admin Panel, so there's no need to worry about leaking information.

Installing the Agent

Please refer to the previous section on installing the Agent.
It is recommended to use the one-click installation. After configuring the parameters, click the corresponding system icon in the one-click installation column of the server to copy the installation command and execute it on the respective server.

Forced Update

Agent update-related parameters include --disable-auto-update and --disable-force-update as described in Custom Agent Monitoring Projects.
By default, the Agent will update automatically without intervention. However, if the user disables automatic updates, you can select specific servers for a forced update.
The forced update will not work if disable-force-update is enabled.

Data Columns

  • Version: Records the current version of the Agent.
  • Hide from Guests: When true, guests cannot see this server in the Dashboard.
  • Enable DDNS: When true, if the server IP changes, the Dashboard will automatically update the DNS records.
  • DDNS Domain: The DDNS domain configured for this server.
  • Secret: The secret/key used for configuring the Agent, which is used to verify communication between the Agent and the Dashboard.
  • One-Click Install: Click the corresponding system button to copy the command and execute it on the server for a one-click installation.
  • Management: Connects to WebShell, modifies server configuration, or deletes the server.

WebSSH Terminal

This is WebShell; the feature will not work if disable-command-execute is enabled.
It is available for both Linux and Windows and supports Ctrl+Shift+V for pasting.
If the connection fails, refer to Real-Time Channel Disconnection/Online Terminal Connection Failure.
Note that in the WebSSH terminal function, the Agent connects to the public access domain via WebSocket, not through gRPC.

DDNS Functionality

The DDNS functionality is suitable for servers with dynamic IPs. When the Agent reports a new IP, the Dashboard will automatically update the DNS records based on the configuration.

Why Use Nezha Monitoring's DDNS Functionality?

  • Centralized management of DDNS settings instead of deploying a DDNS service on each server.
  • Confidential information is only stored on the Dashboard server, preventing leakage.

Configuration Instructions

Currently, the DDNS functionality supports two configuration forms: single configuration and multiple configurations. If single configuration is used, all Agent servers will use the same configuration to update DDNS. If multiple configurations are used, each server can be assigned a specific configuration to update DDNS, offering greater flexibility.

Single Configuration

yaml
DDNS:
-  Enable: true
-  Provider: "webhook"
-  AccessID: ""
-  AccessSecret: ""
-  WebhookMethod: ""
-  WebhookURL: ""
-  WebhookRequestBody: ""
-  WebhookHeaders: ""
-  MaxRetries: 3
-  Profiles: null
  • Enable: Boolean value to enable or disable the DDNS functionality.
  • Provider: The name of the DDNS provider; currently supports webhook, cloudflare, and tencentcloud.
  • AccessID: Token ID for the DDNS provider; only applicable to the tencentcloud provider.
  • AccessSecret: Token Secret for the DDNS provider; only applicable to the cloudflare and tencentcloud providers.
  • WebhookMethod: The request method for the webhook, such as GET or POST; only applicable to the webhook provider.
  • WebhookURL: The request URL for the webhook; only applicable to the webhook provider.
  • WebhookRequestBody: The request body for the webhook; only applicable to the webhook provider.
  • WebhookHeaders: The request headers for the webhook; only applicable to the webhook provider.
  • MaxRetries: The number of retry attempts when a request fails.
  • Profiles: Multi-configuration settings; ignored in single configuration settings.

The WebhookURL, WebhookRequestBody, and WebhookHeaders can include the following parameters:

  • {ip}: The current IP of the server.
  • {domain}: The DDNS domain.
  • {type}: The IP type, which could be "ipv4" or "ipv6".
  • {access_id}: Credential 1.
  • {access_secret}: Credential 2.

Example Configuration:

yaml
WebhookHeaders: |
-    a:{access_id}
-    b:{access_secret}
-WebhookRequestBody: '{"domain": "{domain}", "ip": "{ip}", "type": "{type}"}'

Multiple Configurations

When using multiple configurations, leave the DDNS.Provider value empty. If DDNS.Provider is not empty, the multiple configuration settings will be ignored.

yaml
DDNS:
-  Enable: true
-  MaxRetries: 3
-  Profiles:
-    example:
-      Provider: ""
-      AccessID: ""
-      AccessSecret: ""
-      WebhookMethod: ""
-      WebhookURL: ""
-      WebhookRequestBody: ""
-      WebhookHeaders: ""
  • Profiles: Multi-configuration settings.
  • example: Can be replaced with any string as the DDNS configuration name.

Other options can be referenced from the Single Configuration section.

Dashboard Configuration

After modifying the configuration file, you also need to modify the server settings in the Dashboard for the DDNS to take effect.

DDNS related options:

  • Enable DDNS: Enable the DDNS functionality for this server.
  • Enable DDNS IPv4: Enable IPv4 parsing when updating DDNS records.
  • Enable DDNS IPv6: Enable IPv6 parsing when updating DDNS records.
  • DDNS Domain: The domain the record points to.
  • DDNS Configuration: The DDNS configuration name to use in multiple configurations.

WARNING

When you modify the configuration and save it in the Dashboard settings, it will populate the default configuration options in config.yaml, and both single and multiple configurations will exist in the DDNS section.

  • To use single configuration, configure DDNS.Provider and ignore the Profiles options.
  • To use multiple configurations, leave DDNS.Provider empty. If DDNS.Provider is not empty, the multiple configuration settings will be ignored.

Viewing Logs

In the Dashboard logs, you can see the relevant logs for the DDNS functionality. When configured correctly, there will be corresponding log entries when updating DNS records.

shell
dashboard_1  | 2024/03/16 23:16:25 NEZHA>> 正在尝试更新域名(ddns.example.com)DDNS(1/3) # Attempting to update domain (ddns.example.com) DDNS (1/3)
-dashboard_1  | 2024/03/16 23:16:28 NEZHA>> 尝试更新域名(ddns.example.com)DDNS成功 # Successfully updated domain (ddns.example.com) DDNS
- +
Skip to content

Server Management

Introduction

The server section is responsible for managing Agents, forming the most fundamental part of Nezha monitoring and serving as the basis for other functionalities.

Adding a Server

The first step is to add a server, where you can customize the name, group, sorting, and notes.
Servers in the same group will be displayed together in supported themes. Notes will only be visible in the Admin Panel, so there's no need to worry about leaking information.

Installing the Agent

Please refer to the previous section on installing the Agent.
It is recommended to use the one-click installation. After configuring the parameters, click the corresponding system icon in the one-click installation column of the server to copy the installation command and execute it on the respective server.

Forced Update

Agent update-related parameters include --disable-auto-update and --disable-force-update as described in Custom Agent Monitoring Projects.
By default, the Agent will update automatically without intervention. However, if the user disables automatic updates, you can select specific servers for a forced update.
The forced update will not work if disable-force-update is enabled.

Data Columns

  • Version: Records the current version of the Agent.
  • Hide from Guests: When true, guests cannot see this server in the Dashboard.
  • Enable DDNS: When true, if the server IP changes, the Dashboard will automatically update the DNS records.
  • DDNS Domain: The DDNS domain configured for this server.
  • Secret: The secret/key used for configuring the Agent, which is used to verify communication between the Agent and the Dashboard.
  • One-Click Install: Click the corresponding system button to copy the command and execute it on the server for a one-click installation.
  • Management: Connects to WebShell, modifies server configuration, or deletes the server.

WebSSH Terminal

This is WebShell; the feature will not work if disable-command-execute is enabled.
It is available for both Linux and Windows and supports Ctrl+Shift+V for pasting.
If the connection fails, refer to Real-Time Channel Disconnection/Online Terminal Connection Failure.
Note that in the WebSSH terminal function, the Agent connects to the public access domain via WebSocket, not through gRPC.

DDNS Functionality

The DDNS functionality is suitable for servers with dynamic IPs. When the Agent reports a new IP, the Dashboard will automatically update the DNS records based on the configuration.

Why Use Nezha Monitoring's DDNS Functionality?

  • Centralized management of DDNS settings instead of deploying a DDNS service on each server.
  • Confidential information is only stored on the Dashboard server, preventing leakage.

Configuration Instructions

Currently, the DDNS functionality supports two configuration forms: single configuration and multiple configurations. If single configuration is used, all Agent servers will use the same configuration to update DDNS. If multiple configurations are used, each server can be assigned a specific configuration to update DDNS, offering greater flexibility.

Single Configuration

yaml
DDNS:
+  Enable: true
+  Provider: "webhook"
+  AccessID: ""
+  AccessSecret: ""
+  WebhookMethod: ""
+  WebhookURL: ""
+  WebhookRequestBody: ""
+  WebhookHeaders: ""
+  MaxRetries: 3
+  Profiles: null
  • Enable: Boolean value to enable or disable the DDNS functionality.
  • Provider: The name of the DDNS provider; currently supports webhook, cloudflare, and tencentcloud.
  • AccessID: Token ID for the DDNS provider; only applicable to the tencentcloud provider.
  • AccessSecret: Token Secret for the DDNS provider; only applicable to the cloudflare and tencentcloud providers.
  • WebhookMethod: The request method for the webhook, such as GET or POST; only applicable to the webhook provider.
  • WebhookURL: The request URL for the webhook; only applicable to the webhook provider.
  • WebhookRequestBody: The request body for the webhook; only applicable to the webhook provider.
  • WebhookHeaders: The request headers for the webhook; only applicable to the webhook provider.
  • MaxRetries: The number of retry attempts when a request fails.
  • Profiles: Multi-configuration settings; ignored in single configuration settings.

The WebhookURL, WebhookRequestBody, and WebhookHeaders can include the following parameters:

  • {ip}: The current IP of the server.
  • {domain}: The DDNS domain.
  • {type}: The IP type, which could be "ipv4" or "ipv6".
  • {access_id}: Credential 1.
  • {access_secret}: Credential 2.

Example Configuration:

yaml
WebhookHeaders: |
+    a:{access_id}
+    b:{access_secret}
+WebhookRequestBody: '{"domain": "{domain}", "ip": "{ip}", "type": "{type}"}'

Multiple Configurations

When using multiple configurations, leave the DDNS.Provider value empty. If DDNS.Provider is not empty, the multiple configuration settings will be ignored.

yaml
DDNS:
+  Enable: true
+  MaxRetries: 3
+  Profiles:
+    example:
+      Provider: ""
+      AccessID: ""
+      AccessSecret: ""
+      WebhookMethod: ""
+      WebhookURL: ""
+      WebhookRequestBody: ""
+      WebhookHeaders: ""
  • Profiles: Multi-configuration settings.
  • example: Can be replaced with any string as the DDNS configuration name.

Other options can be referenced from the Single Configuration section.

Dashboard Configuration

After modifying the configuration file, you also need to modify the server settings in the Dashboard for the DDNS to take effect.

DDNS related options:

  • Enable DDNS: Enable the DDNS functionality for this server.
  • Enable DDNS IPv4: Enable IPv4 parsing when updating DDNS records.
  • Enable DDNS IPv6: Enable IPv6 parsing when updating DDNS records.
  • DDNS Domain: The domain the record points to.
  • DDNS Configuration: The DDNS configuration name to use in multiple configurations.

WARNING

When you modify the configuration and save it in the Dashboard settings, it will populate the default configuration options in config.yaml, and both single and multiple configurations will exist in the DDNS section.

  • To use single configuration, configure DDNS.Provider and ignore the Profiles options.
  • To use multiple configurations, leave DDNS.Provider empty. If DDNS.Provider is not empty, the multiple configuration settings will be ignored.

Viewing Logs

In the Dashboard logs, you can see the relevant logs for the DDNS functionality. When configured correctly, there will be corresponding log entries when updating DNS records.

shell
dashboard_1  | 2024/03/16 23:16:25 NEZHA>> 正在尝试更新域名(ddns.example.com)DDNS(1/3) # Attempting to update domain (ddns.example.com) DDNS (1/3)
+dashboard_1  | 2024/03/16 23:16:28 NEZHA>> 尝试更新域名(ddns.example.com)DDNS成功 # Successfully updated domain (ddns.example.com) DDNS
+ \ No newline at end of file diff --git a/en_US/guide/services.html b/en_US/guide/services.html index 94bc1f43..7ff73ac2 100644 --- a/en_US/guide/services.html +++ b/en_US/guide/services.html @@ -5,21 +5,24 @@ Service Monitoring | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Service Monitoring

The Services section is where you set up monitoring for external websites or servers using Agents.
Configured service monitors can be viewed on the "Services" page of the homepage, displaying the availability monitoring results for the past 30 days.

How to Use

To add a new monitor, go to the "Services" page in the Admin Panel and click "Add Monitor."

When adding a new service monitor, you need to set the following parameters:

  • Name: Customize a name.

  • Type: Select a monitor type. Nezha Monitoring currently supports three types: "HTTP-GET," "ICMP-Ping," and "TCP-Ping."

  • Target: Depending on the type you choose, the method for setting the target differs:

    • HTTP-GET: For this type, you should enter a URL as the target, including http:// or https://. If your target URL is https://, the SSL certificate of that URL will also be monitored. Notifications will be triggered when the SSL certificate expires or changes. Example: https://example.com.
    • ICMP-Ping: For this type, you should enter a domain name or IP without a port number. Example: 1.1.1.1 or example.com.
    • TCP-Ping: For this type, you should enter a domain name or IP with a port number. Example: 1.1.1.1:80 or example.com:22.
  • Request Interval: Set the interval in seconds at which the Agent requests the target.

  • Coverage: Select a rule to determine which Agents will request the target.

  • Specific Servers: Used in conjunction with the coverage scope, select Agents within the rule to exclude.

  • Notification Group: Choose the notification methods you have already set up on the "Notification" page. Click here for more details.

  • Enable Fault Notification: Choose whether to receive fault notifications for the target as needed. The default is unchecked.

After setting it up, click "Add." Wait a moment and go to the "Services" page on the homepage to view the monitoring results.

Latency Change Notification

Nezha Monitoring can monitor and record the latency between the Agent and the target server, sending notifications when there are significant changes. This feature helps you monitor if the server's network route has changed.

  • Enable Latency Notifications: When enabled, Notification will be sent if the latency from the Agent to the target server is greater than the Maximum Latency or less than the Minimum Latency.

Trigger Tasks on Notification

If you need to execute tasks when service monitoring Notification are triggered, you can check "Enable Trigger Tasks" and select the pre-configured trigger tasks in "Task on Notification" and "Task on Recovery."

Network Latency Chart

The TCP-Ping and ICMP-Ping monitoring types set in the Services page will automatically enable the monitoring chart feature. On the "Network" page of the homepage, you can view historical network latency charts. The data in the charts is based on the latency from the Agent to the target server. You can click the Agent's name to toggle the chart display. In the chart, you can uncheck the target server's name to hide or show the corresponding data.

Managing Monitors

To manage existing service monitors, go to the "Services" page in the Admin Panel. Select a monitor configuration and click the icons on the right to edit or delete it.

- +
Skip to content

Service Monitoring

The Services section is where you set up monitoring for external websites or servers using Agents.
Configured service monitors can be viewed on the "Services" page of the homepage, displaying the availability monitoring results for the past 30 days.

How to Use

To add a new monitor, go to the "Services" page in the Admin Panel and click "Add Monitor."

When adding a new service monitor, you need to set the following parameters:

  • Name: Customize a name.

  • Type: Select a monitor type. Nezha Monitoring currently supports three types: "HTTP-GET," "ICMP-Ping," and "TCP-Ping."

  • Target: Depending on the type you choose, the method for setting the target differs:

    • HTTP-GET: For this type, you should enter a URL as the target, including http:// or https://. If your target URL is https://, the SSL certificate of that URL will also be monitored. Notifications will be triggered when the SSL certificate expires or changes. Example: https://example.com.
    • ICMP-Ping: For this type, you should enter a domain name or IP without a port number. Example: 1.1.1.1 or example.com.
    • TCP-Ping: For this type, you should enter a domain name or IP with a port number. Example: 1.1.1.1:80 or example.com:22.
  • Request Interval: Set the interval in seconds at which the Agent requests the target.

  • Coverage: Select a rule to determine which Agents will request the target.

  • Specific Servers: Used in conjunction with the coverage scope, select Agents within the rule to exclude.

  • Notification Group: Choose the notification methods you have already set up on the "Notification" page. Click here for more details.

  • Enable Fault Notification: Choose whether to receive fault notifications for the target as needed. The default is unchecked.

After setting it up, click "Add." Wait a moment and go to the "Services" page on the homepage to view the monitoring results.

Latency Change Notification

Nezha Monitoring can monitor and record the latency between the Agent and the target server, sending notifications when there are significant changes. This feature helps you monitor if the server's network route has changed.

  • Enable Latency Notifications: When enabled, Notification will be sent if the latency from the Agent to the target server is greater than the Maximum Latency or less than the Minimum Latency.

Trigger Tasks on Notification

If you need to execute tasks when service monitoring Notification are triggered, you can check "Enable Trigger Tasks" and select the pre-configured trigger tasks in "Task on Notification" and "Task on Recovery."

Network Latency Chart

The TCP-Ping and ICMP-Ping monitoring types set in the Services page will automatically enable the monitoring chart feature. On the "Network" page of the homepage, you can view historical network latency charts. The data in the charts is based on the latency from the Agent to the target server. You can click the Agent's name to toggle the chart display. In the chart, you can uncheck the target server's name to hide or show the corresponding data.

Managing Monitors

To manage existing service monitors, go to the "Services" page in the Admin Panel. Select a monitor configuration and click the icons on the right to edit or delete it.

+ \ No newline at end of file diff --git a/en_US/guide/settings.html b/en_US/guide/settings.html index b6d6a796..3668a5ee 100644 --- a/en_US/guide/settings.html +++ b/en_US/guide/settings.html @@ -5,331 +5,334 @@ Settings | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Settings

Site Title

You can customize the site title in this section.

Administrator List

  • If you have changed your Github, Gitlab, or Gitee username, you need to update it here to avoid login issues. Separate multiple usernames with commas: user1,user2.
  • To change the administrator account, go to /opt/nezha/dashboard/data/config.yaml and reset the new administrator Client ID and Client Secret.

Theme

Select the theme for the homepage and admin panel here. If a theme that already exists is not in the options, update the Dashboard.
Before enabling the Custom theme, ensure you have installed the custom theme; otherwise, the Dashboard will not display correctly after enabling this option.

Language

Nezha Monitoring currently supports the following languages:

  • Simplified Chinese (简体中文)
  • Traditional Chinese (繁體中文)
  • English
  • Spanish (Español)

We welcome corrections to translations or contributions of more languages.

Custom Code (style, script)

You can modify the LOGO, adjust colors, add beautification code, and add statistical code here.

WARNING

Custom code only affects the visitor homepage, not the admin panel. Due to differences in code between themes, if you need to modify the content in the admin panel, please modify the theme files in Docker.

Example of Changing Progress Bar Color, Background Image, Navigation Bar, etc., in the Default Theme

Click to expand/collapse
html
<style>
-/* Screen adaptation */
-@media only screen and (min-width: 1200px) {
-    .ui.container {
-    width: 80% !important;
-}
-}
+    
Skip to content

Settings

Site Title

You can customize the site title in this section.

Administrator List

  • If you have changed your Github, Gitlab, or Gitee username, you need to update it here to avoid login issues. Separate multiple usernames with commas: user1,user2.
  • To change the administrator account, go to /opt/nezha/dashboard/data/config.yaml and reset the new administrator Client ID and Client Secret.

Theme

Select the theme for the homepage and admin panel here. If a theme that already exists is not in the options, update the Dashboard.
Before enabling the Custom theme, ensure you have installed the custom theme; otherwise, the Dashboard will not display correctly after enabling this option.

Language

Nezha Monitoring currently supports the following languages:

  • Simplified Chinese (简体中文)
  • Traditional Chinese (繁體中文)
  • English
  • Spanish (Español)

We welcome corrections to translations or contributions of more languages.

Custom Code (style, script)

You can modify the LOGO, adjust colors, add beautification code, and add statistical code here.

WARNING

Custom code only affects the visitor homepage, not the admin panel. Due to differences in code between themes, if you need to modify the content in the admin panel, please modify the theme files in Docker.

Example of Changing Progress Bar Color, Background Image, Navigation Bar, etc., in the Default Theme

Click to expand/collapse
html
<style>
+/* Screen adaptation */
+@media only screen and (min-width: 1200px) {
+    .ui.container {
+    width: 80% !important;
+}
+}
 
-@media only screen and (max-width: 767px) {
-    .ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) {
-        margin-top: 0.4em !important;
-    }
-}
+@media only screen and (max-width: 767px) {
+    .ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) {
+        margin-top: 0.4em !important;
+    }
+}
 
-/* Overall icons */
-i.icon {
-    color: #000;
-    width: 1.2em !important;
-}
+/* Overall icons */
+i.icon {
+    color: #000;
+    width: 1.2em !important;
+}
 
-/* Background image */
-body {
-    content: " " !important;
-    background: fixed !important;
-    z-index: -1 !important;
-    top: 0 !important;
-    right: 0 !important;
-    bottom: 0 !important;
-    left: 0 !important;
-    background-position: top !important;
-    background-repeat: no-repeat !important;
-    background-size: cover !important;
-    background-image: url(https://backgroud.img) !important;
-    font-family: Arial,Helvetica,sans-serif !important;
-}
+/* Background image */
+body {
+    content: " " !important;
+    background: fixed !important;
+    z-index: -1 !important;
+    top: 0 !important;
+    right: 0 !important;
+    bottom: 0 !important;
+    left: 0 !important;
+    background-position: top !important;
+    background-repeat: no-repeat !important;
+    background-size: cover !important;
+    background-image: url(https://backgroud.img) !important;
+    font-family: Arial,Helvetica,sans-serif !important;
+}
 
-/* Navigation bar */
-.ui.large.menu {
-    border: 0 !important;
-    border-radius: 0px !important;
-    background-color: rgba(255, 255, 255, 55%) !important;
-}
+/* Navigation bar */
+.ui.large.menu {
+    border: 0 !important;
+    border-radius: 0px !important;
+    background-color: rgba(255, 255, 255, 55%) !important;
+}
 
-/* Homepage buttons */
-.ui.menu .active.item {
-    background-color: transparent !important;
-}
+/* Homepage buttons */
+.ui.menu .active.item {
+    background-color: transparent !important;
+}
 
-/* Navigation bar dropdown */
-.ui.dropdown .menu {
-    border: 0 !important;
-    border-radius: 0 !important;
-    background-color: rgba(255, 255, 255, 80%) !important;
-}
+/* Navigation bar dropdown */
+.ui.dropdown .menu {
+    border: 0 !important;
+    border-radius: 0 !important;
+    background-color: rgba(255, 255, 255, 80%) !important;
+}
 
-/* Login button */
-.nezha-primary-btn {
-    background-color: transparent !important;
-    color: #000 !important;
-}
+/* Login button */
+.nezha-primary-btn {
+    background-color: transparent !important;
+    color: #000 !important;
+}
 
-/* Large card */
-#app .ui.fluid.accordion {
-    background-color: #fbfbfb26 !important;
-    border-radius: 0.4rem !important;
-}
+/* Large card */
+#app .ui.fluid.accordion {
+    background-color: #fbfbfb26 !important;
+    border-radius: 0.4rem !important;
+}
 
-/* Small card */
-.ui.four.cards>.card {
-    border-radius: 0.6rem !important;
-    background-color: #fafafaa3 !important;
-}
+/* Small card */
+.ui.four.cards>.card {
+    border-radius: 0.6rem !important;
+    background-color: #fafafaa3 !important;
+}
 
-.status.cards .wide.column {
-    padding-top: 0 !important;
-    padding-bottom: 0 !important;
-    height: 3.3rem !important;
-}
+.status.cards .wide.column {
+    padding-top: 0 !important;
+    padding-bottom: 0 !important;
+    height: 3.3rem !important;
+}
 
-.status.cards .three.wide.column {
-    padding-right: 0rem !important;
-}
+.status.cards .three.wide.column {
+    padding-right: 0rem !important;
+}
 
-.status.cards .wide.column:nth-child(1) {
-    margin-top: 2rem !important;
-}
+.status.cards .wide.column:nth-child(1) {
+    margin-top: 2rem !important;
+}
 
-.status.cards .wide.column:nth-child(2) {
-    margin-top: 2rem !important;
-}
+.status.cards .wide.column:nth-child(2) {
+    margin-top: 2rem !important;
+}
 
-.status.cards .description {
-    padding-bottom: 0 !important;
-}
+.status.cards .description {
+    padding-bottom: 0 !important;
+}
 
-/* Server name */
-.status.cards .flag {
-    margin-right: 0.5rem !important;
-}
+/* Server name */
+.status.cards .flag {
+    margin-right: 0.5rem !important;
+}
 
-/* Popup card icon */
-.status.cards .header > .info.icon {
-    margin-right: 0 !important;
-}
+/* Popup card icon */
+.status.cards .header > .info.icon {
+    margin-right: 0 !important;
+}
 
-.nezha-secondary-font {
-    color: #2175ba !important;
-}
+.nezha-secondary-font {
+    color: #2175ba !important;
+}
 
-/* Upload/download */
-.status.cards .outline.icon {
-    margin-right: 1px !important;
-}
+/* Upload/download */
+.status.cards .outline.icon {
+    margin-right: 1px !important;
+}
 
-i.arrow.alternate.circle.down.outline.icon {
-    color: #2175ba !important;
-}
+i.arrow.alternate.circle.down.outline.icon {
+    color: #2175ba !important;
+}
 
-i.arrow.alternate.circle.up.outline.icon {
-    color: red !important;
-}
+i.arrow.alternate.circle.up.outline.icon {
+    color: red !important;
+}
 
-/* Popup card small arrow */
-.ui.right.center.popup {
-    margin: -3px 0 0 0.914286em !important;
-    -webkit-transform-origin: left 50% !important;
-    transform-origin: left 50% !important;
-}
+/* Popup card small arrow */
+.ui.right.center.popup {
+    margin: -3px 0 0 0.914286em !important;
+    -webkit-transform-origin: left 50% !important;
+    transform-origin: left 50% !important;
+}
 
-.ui.bottom.left.popup {
-    margin-left: 1px !important;
-    margin-top: 3px !important;
-}
+.ui.bottom.left.popup {
+    margin-left: 1px !important;
+    margin-top: 3px !important;
+}
 
-.ui.top.left.popup {
-    margin-left: 0 !important;
-    margin-bottom: 10px !important;
-}
+.ui.top.left.popup {
+    margin-left: 0 !important;
+    margin-bottom: 10px !important;
+}
 
-.ui.top.right.popup {
-    margin-right: 0 !important;
-    margin-bottom: 8px !important;
-}
+.ui.top.right.popup {
+    margin-right: 0 !important;
+    margin-bottom: 8px !important;
+}
 
-.ui.left.center.popup {
-    margin: -3px .91428571em 0 0 !important;
-    -webkit-transform-origin: right 50% !important;
-    transform-origin: right 50% !important;
-}
+.ui.left.center.popup {
+    margin: -3px .91428571em 0 0 !important;
+    -webkit-transform-origin: right 50% !important;
+    transform-origin: right 50% !important;
+}
 
-.ui.right.center.popup:before,
-.ui.left.center.popup:before {
-    border: 0px solid #fafafaeb !important;
-    background: #fafafaeb !important;
-}
+.ui.right.center.popup:before,
+.ui.left.center.popup:before {
+    border: 0px solid #fafafaeb !important;
+    background: #fafafaeb !important;
+}
 
-.ui.top.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
+.ui.top.popup:before {
+    border-color: #fafafaeb transparent transparent !important;
+}
 
-.ui.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
+.ui.popup:before {
+    border-color: #fafafaeb transparent transparent !important;
+}
 
-.ui.bottom.left.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
+.ui.bottom.left.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !important;
+    background: #fafafaeb !important;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
+}
 
-.ui.bottom.right.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
+.ui.bottom.right.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !重要;
+    background: #fafafaeb !重要
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
+}
 
-.ui.top.left.popup:before {
-    border-radius: 0 !重要;
-    border: 1px solid transparent !重要;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
+.ui.top.left.popup:before {
+    border-radius: 0 !重要;
+    border: 1px solid transparent !重要;
+    border-color: #fafafaeb transparent transparent !重要;
+    background: #fafafaeb !重要;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
+}
 
-.ui.top.right.popup:before {
-    border-radius: 0 !重要;
-    border: 1px solid transparent !重要;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
+.ui.top.right.popup:before {
+    border-radius: 0 !重要;
+    border: 1px solid transparent !重要;
+    border-color: #fafafaeb transparent transparent !重要;
+    background: #fafafaeb !重要;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
+}
 
-.ui.left.center.popup:before {
-    border-radius: 0 !重要;
-    border: 1px solid transparent !重要;
-    border-color: #fafafaeb transparent transparent !重要;
-    background: #fafafaeb !重要;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
-}
+.ui.left.center.popup:before {
+    border-radius: 0 !重要;
+    border: 1px solid transparent !重要;
+    border-color: #fafafaeb transparent transparent !重要;
+    background: #fafafaeb !重要;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    box-shadow: 0px 0px 0 0 #fafafaeb !重要;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !重要;
+}
 
-/* Popup card */
-.status.cards .ui.content.popup {
-    min-width: 20rem !重要;
-    line-height: 2rem !重要;
-    border-radius: 5px !重要;
-    border: 1px solid transparent !重要;
-    background-color: #fafafaeb !重要;
-    font-family: Arial,Helvetica,sans-serif !重要;
-}
+/* Popup card */
+.status.cards .ui.content.popup {
+    min-width: 20rem !重要;
+    line-height: 2rem !重要;
+    border-radius: 5px !重要;
+    border: 1px solid transparent !重要;
+    background-color: #fafafaeb !重要;
+    font-family: Arial,Helvetica,sans-serif !重要;
+}
 
-.ui.content {
-    margin: 0 !重要;
-    padding: 1em !重要;
-}
+.ui.content {
+    margin: 0 !重要;
+    padding: 1em !重要;
+}
 
-/* Service page */
-.ui
+/* Service page */
+.ui
 
-.table {
-    background: RGB(225,225,225,0.6) !重要;
-}
+.table {
+    background: RGB(225,225,225,0.6) !重要;
+}
 
-.ui.table thead th {
-    background: transparent !重要;
-}
+.ui.table thead th {
+    background: transparent !重要;
+}
 
-/* Service page progress bar */
-.service-status .good {
-    background-color: #2175ba !重要;
-}
+/* Service page progress bar */
+.service-status .good {
+    background-color: #2175ba !重要;
+}
 
-.service-status .danger {
-    background-color: red !重要;
-}
+.service-status .danger {
+    background-color: red !重要;
+}
 
-.service-status .warning {
-    background-color: orange !重要;
-}
+.service-status .warning {
+    background-color: orange !重要;
+}
 
-/* Copyright */
-.ui.inverted.segment, .ui.primary.inverted.segment {
-    color: #000 !重要;
-    font-weight: bold !重要;
-    background-color: #fafafaa3 !重要;
-}
-</style>
+/* Copyright */
+.ui.inverted.segment, .ui.primary.inverted.segment {
+    color: #000 !重要;
+    font-weight: bold !重要;
+    background-color: #fafafaa3 !重要;
+}
+</style>
 
-<!--Logo and Copyright-->
-<script>
-window.onload = function(){
-var avatar=document.querySelector(".item img")
-var footer=document.querySelector("div.is-size-7")
-footer.innerHTML="Copyright info"
-footer.style.visibility="visible"
-avatar.src="https:/img.src"
-avatar.style.visibility="visible"
-}
-</script>
Click to expand/collapse
html
<style>
-.ui.fine.progress> .progress-bar {
-  background-color: #00a7d0 !important;
-}
-</style>
+<!--Logo and Copyright-->
+<script>
+window.onload = function(){
+var avatar=document.querySelector(".item img")
+var footer=document.querySelector("div.is-size-7")
+footer.innerHTML="Copyright info"
+footer.style.visibility="visible"
+avatar.src="https:/img.src"
+avatar.style.visibility="visible"
+}
+</script>
Click to expand/collapse
html
<style>
+.ui.fine.progress> .progress-bar {
+  background-color: #00a7d0 !important;
+}
+</style>
 
-<script>
-window.onload = function(){
-  var avatar = document.querySelector("img");
-  var footer = document.querySelector("div.footer-container");
-  footer.innerHTML = "©2021 Your Name & Powered by Your Name";
-  footer.style.visibility = "visible";
-  avatar.src = "Your Image URL";
-  avatar.style.visibility = "visible";
-}
-</script>
Click to expand/collapse
html
<style>
-.right.menu>a {
-  visibility: hidden;
-}
-.footer .is-size-7 {
-  visibility: hidden;
-}
-.item img {
-  visibility: hidden;
-}
-</style>
-<script>
-window.onload = function() {
-  var avatar = document.querySelector(".item img");
-  var footer = document.querySelector("div.is-size-7");
-  footer.innerHTML = "Powered by Your Name";
-  footer.style.visibility = "visible";
-  avatar.src = "Your Square Logo URL";
-  avatar.style.visibility = "visible";
-}
-</script>

Example of Changing Background Image in Hotaru Theme

Click to expand/collapse
html
<style>
-.hotaru-cover {
-   background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
-}
-</style>

View Password

If you don't want to display your Dashboard directly to visitors, you can set a view password here. After setting the password, visitors need to enter the password to access the homepage.

Non-CDN Dashboard Server Domain/IP

This setting is a prerequisite for using the one-click script to install the Agent. For details, please see here.

IP Change Notifications

If you want to receive notifications when a server's IP changes, you can set it up here.

Coverage

Select a rule to determine which servers to monitor. Choose according to your needs.

Specific Servers

Set exclusions for the selected rule in conjunction with the coverage scope.

Send Notifications to a Specific Notification Group

Choose a notification method, which should be set up in advance on the "Notification" page.

WARNING

Notifications take effect after enabling this setting.

Show Full IP Address in Notifications

IP change notifications hide the full IP by default. If you don't want to hide it, check "Show Full IP Address in Notification."

Disable Homepage Theme Switching

By default, the Dashboard allows visitors to change the theme. This feature only affects individual visitors and does not affect the theme set by the administrator in the admin panel. If you don't want visitors to switch themes, check this option.

- +<script> +window.onload = function(){ + var avatar = document.querySelector("img"); + var footer = document.querySelector("div.footer-container"); + footer.innerHTML = "©2021 Your Name & Powered by Your Name"; + footer.style.visibility = "visible"; + avatar.src = "Your Image URL"; + avatar.style.visibility = "visible"; +} +</script>
Click to expand/collapse
html
<style>
+.right.menu>a {
+  visibility: hidden;
+}
+.footer .is-size-7 {
+  visibility: hidden;
+}
+.item img {
+  visibility: hidden;
+}
+</style>
+<script>
+window.onload = function() {
+  var avatar = document.querySelector(".item img");
+  var footer = document.querySelector("div.is-size-7");
+  footer.innerHTML = "Powered by Your Name";
+  footer.style.visibility = "visible";
+  avatar.src = "Your Square Logo URL";
+  avatar.style.visibility = "visible";
+}
+</script>

Example of Changing Background Image in Hotaru Theme

Click to expand/collapse
html
<style>
+.hotaru-cover {
+   background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
+}
+</style>

View Password

If you don't want to display your Dashboard directly to visitors, you can set a view password here. After setting the password, visitors need to enter the password to access the homepage.

Non-CDN Dashboard Server Domain/IP

This setting is a prerequisite for using the one-click script to install the Agent. For details, please see here.

IP Change Notifications

If you want to receive notifications when a server's IP changes, you can set it up here.

Coverage

Select a rule to determine which servers to monitor. Choose according to your needs.

Specific Servers

Set exclusions for the selected rule in conjunction with the coverage scope.

Send Notifications to a Specific Notification Group

Choose a notification method, which should be set up in advance on the "Notification" page.

WARNING

Notifications take effect after enabling this setting.

Show Full IP Address in Notifications

IP change notifications hide the full IP by default. If you don't want to hide it, check "Show Full IP Address in Notification."

Disable Homepage Theme Switching

By default, the Dashboard allows visitors to change the theme. This feature only affects individual visitors and does not affect the theme set by the administrator in the admin panel. If you don't want visitors to switch themes, check this option.

+ \ No newline at end of file diff --git a/en_US/guide/tasks.html b/en_US/guide/tasks.html index 124a52e3..c31c4fb5 100644 --- a/en_US/guide/tasks.html +++ b/en_US/guide/tasks.html @@ -5,21 +5,24 @@ Task Management | Nezha Monitoring - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Task Management

In the Tasks section, you can set up scheduled tasks, trigger tasks, and batch execute tasks on multiple servers.

Nezha Monitoring supports pushing commands to Agents for execution. This feature is highly flexible and can be used for regular backups using tools like restic or rclone, periodically restarting a service to reset network connections, or executing a task when an notification is triggered, such as running a script when CPU usage is high for an extended period.

How to Use

Go to the "Tasks" page in the admin panel and click "Add Scheduled Task." When adding a scheduled task, you need to fill in the following parameters:

  • Name: Customize a task name.

  • Task Type: Choose the type of task.

    • Scheduled Task: Executes periodically according to the schedule set below.
    • Trigger Task: Only executed when triggered by an API call or notification rule, runs once per trigger.
  • Schedule: Set the schedule time (not enable when using trigger task type). The time format is * * * * * *, corresponding to second minute hour day month weekday. For more details, see Cron Expression Format.
    For example: 0 0 3 * * * means "3 AM every day."

  • Command: Set the command to execute, similar to writing Shell/Bat scripts, but it's recommended not to use new lines; connect multiple commands with && or &.
    For example, to schedule a reboot, you can enter reboot here.

  • Coverage and Specific Servers: Select rules to determine which Agents execute the scheduled task, similar to the settings on the "Services" page. When using the trigger task type, you can choose "executed by the triggered server."

  • Notification Group: Choose the notification methods you have set up on the "Notifications" page. Click here for more details.

  • Send Success Notification: Check this option to trigger a notification upon successful task execution.

Managing Tasks

To manage existing scheduled tasks, go to the "Tasks" page in the admin panel. For each task configuration, the three icons on the right are:

  • Execute Immediately: Click to ignore the scheduled time and execute the task immediately.
  • Edit: Click to modify the task configuration.
  • Delete: Delete the scheduled task.

Frequently Asked Questions

  1. Command not found error
    If a command fails to run with a "command not found" error, it may be a PATH environment variable issue. On Linux servers, you can add source ~/.bashrc at the beginning of the command or use the absolute path to execute the command.
- +
Skip to content

Task Management

In the Tasks section, you can set up scheduled tasks, trigger tasks, and batch execute tasks on multiple servers.

Nezha Monitoring supports pushing commands to Agents for execution. This feature is highly flexible and can be used for regular backups using tools like restic or rclone, periodically restarting a service to reset network connections, or executing a task when an notification is triggered, such as running a script when CPU usage is high for an extended period.

How to Use

Go to the "Tasks" page in the admin panel and click "Add Scheduled Task." When adding a scheduled task, you need to fill in the following parameters:

  • Name: Customize a task name.

  • Task Type: Choose the type of task.

    • Scheduled Task: Executes periodically according to the schedule set below.
    • Trigger Task: Only executed when triggered by an API call or notification rule, runs once per trigger.
  • Schedule: Set the schedule time (not enable when using trigger task type). The time format is * * * * * *, corresponding to second minute hour day month weekday. For more details, see Cron Expression Format.
    For example: 0 0 3 * * * means "3 AM every day."

  • Command: Set the command to execute, similar to writing Shell/Bat scripts, but it's recommended not to use new lines; connect multiple commands with && or &.
    For example, to schedule a reboot, you can enter reboot here.

  • Coverage and Specific Servers: Select rules to determine which Agents execute the scheduled task, similar to the settings on the "Services" page. When using the trigger task type, you can choose "executed by the triggered server."

  • Notification Group: Choose the notification methods you have set up on the "Notifications" page. Click here for more details.

  • Send Success Notification: Check this option to trigger a notification upon successful task execution.

Managing Tasks

To manage existing scheduled tasks, go to the "Tasks" page in the admin panel. For each task configuration, the three icons on the right are:

  • Execute Immediately: Click to ignore the scheduled time and execute the task immediately.
  • Edit: Click to modify the task configuration.
  • Delete: Delete the scheduled task.

Frequently Asked Questions

  1. Command not found error
    If a command fails to run with a "command not found" error, it may be a PATH environment variable issue. On Linux servers, you can add source ~/.bashrc at the beginning of the command or use the absolute path to execute the command.
+ \ No newline at end of file diff --git a/en_US/index.html b/en_US/index.html index 0d28b1e0..9e80f2ae 100644 --- a/en_US/index.html +++ b/en_US/index.html @@ -5,21 +5,24 @@ Nezha Monitoring | User Manual - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content

Nezha Monitoring

Open-source, lightweight, and easy-to-use server monitoring and operation tool

One-Click Installation

Supports one-click installation of the Dashboard and Agent services, making it easy to operate. Compatible with mainstream systems, including Linux, Windows, macOS, OpenWRT, and Synology.

Real-Time Monitoring

Supports monitoring the status of multiple servers simultaneously, providing historical network status and latency charts, monitoring webpage and port availability, and SSL certificate status. Supports alerts for status such as faults and traffic, with notifications via Telegram, email, Slack, and more.

Easy Operations

Provides an API to get server status, supports WebSSH, DDNS, and traffic monitoring. Allows setting up scheduled and triggered tasks and executing server tasks in batches.

- +
Skip to content

Nezha Monitoring

Open-source, lightweight, and easy-to-use server monitoring and operation tool

+ \ No newline at end of file diff --git a/guide/agent.html b/guide/agent.html index 62eac008..3a1a4f90 100644 --- a/guide/agent.html +++ b/guide/agent.html @@ -5,165 +5,168 @@ 安装 Agent | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

安装 Agent

哪吒监控的被控端服务被称为 Agent,本文档将介绍如何在被控端服务器上安装 Agent,并与 Dashboard 连接。

TIP

Agent 二进制文件仓库地址为:https://github.com/nezhahq/agent/releases

一键安装 Agent

哪吒监控支持在 Windows 和 Linux 上一键安装 Agent。遵循本文档的步骤,你可以很轻松地在服务器上部署它。

准备工作

你需要提前在管理面板中设置好通信域名,此域名不可以接入 CDN。本文档以示例通信域名 “data.example.com” 为例。
进入后台管理面板,转到“设置”页,在“未接入 CDN 的面板服务器域名/IP”项中填入通信域名,然后点击"保存"。

在 Linux 中一键安装 (Ubuntu、Debian、CentOS)

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Linux 图标按钮,复制一键安装命令。
  3. 在被控端服务器中运行复制的一键安装命令,等待安装完成后返回到 Dashboard 主页查看服务器是否上线。

在 Windows 中一键安装

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Windows 图标按钮,复制一键安装命令。
  3. 进入 Windows 服务器,运行 PowerShell,在 PowerShell 中运行复制的安装命令。
  4. 如遇到确认「执行策略变更」请选择 Y。
  5. 等待安装完成后返回 Dashboard 主页查看服务器是否上线。

WARNING

如果在 PowerShell 中运行一键安装命令时遇到错误,请尝试下方的在 Windows 中手动安装 Agent

其他方式安装 Agent

在 Linux 中安装 Agent (Ubuntu、Debian、CentOS)

点击展开/收起
  1. 首先在管理面板中添加一台服务器。
  2. 在被控服务器中,运行脚本(位于中国大陆的服务器请使用镜像):
bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

如果你的被控服务器位于中国大陆,可以使用镜像:

bash
curl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
  1. 选择“安装监控 Agent”。
  2. 输入通信域名,如:”data.example.com“。
  3. 输入面板通信端口(gRPC 端口),默认为 5555。
  4. 输入 Agent 密钥,Agent 密钥在管理面板中添加服务器时生成,可以在管理面板中的“服务器”页中找到。
  5. 等待安装完成后返回 Dashboard 主页查看服务器是否上线。

在其他 Linux 发行版(如 Alpine 使用 Openrc)中安装 Agent

点击展开/收起

本节内容由 unknown0054 贡献。

  1. 修改 SERVER、SECRET、TLS,然后在 shell 中执行:
shell
cat >/etc/init.d/nezha-agent<< EOF
-#!/sbin/openrc-run
-SERVER="" # Dashboard 地址 ip:port
-SECRET="" # SECRET
-TLS="" # 是否启用 TLS,是 "--tls" ,否留空
-NZ_BASE_PATH="/opt/nezha"
-NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
-pidfile="/run/${RC_SVCNAME}.pid"
-command="/opt/nezha/agent/nezha-agent"
-command_args="-s ${SERVER} -p ${SECRET} ${TLS}"
-command_background=true
-depend() {
-  need net
-}
-checkconfig() {
-  GITHUB_URL="github.com"
-  if [ ! -f "${NZ_AGENT_PATH}/nezha-agent" ]; then
-    if [[ $(uname -m | grep 'x86_64') != "" ]]; then
-      os_arch="amd64"
-    elif [[ $(uname -m | grep 'i386\|i686') != "" ]]; then
-      os_arch="386"
-    elif [[ $(uname -m | grep 'aarch64\|armv8b\|armv8l') != "" ]]; then
-      os_arch="arm64"
-    elif [[ $(uname -m | grep 'arm') != "" ]]; then
-      os_arch="arm"
-    elif [[ $(uname -m | grep 's390x') != "" ]]; then
-      os_arch="s390x"
-    elif [[ $(uname -m | grep 'riscv64') != "" ]]; then
-      os_arch="riscv64"
-    fi
-    local version=$(curl -m 10 -sL "https://api.github.com/repos/nezhahq/agent/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
-    if [ ! -n "$version" ]; then
-      version=$(curl -m 10 -sL "https://fastly.jsdelivr.net/gh/nezhahq/agent/" | grep "option\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\/agent@/v/g')
-    fi
-    if [ ! -n "$version" ]; then
-      version=$(curl -m 10 -sL "https://gcore.jsdelivr.net/gh/nezhahq/agent/" | grep "option\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\/agent@/v/g')
-    fi
-    if [ ! -n "$version" ]; then
-      echo -e "获取版本号失败,请检查本机能否链接 https://api.github.com/repos/nezhahq/agent/releases/latest"
-      return 0
-    else
-      echo -e "当前最新版本为: ${version}"
-    fi
-    wget -t 2 -T 10 -O nezha-agent_linux_${os_arch}.zip https://${GITHUB_URL}/nezhahq/agent/releases/download/${version}/nezha-agent_linux_${os_arch}.zip >/dev/null 2>&1
-    if [[ $? != 0 ]]; then
-      echo -e "Release 下载失败,请检查本机能否连接 ${GITHUB_URL}${plain}"
-      return 0
-    fi
-    mkdir -p $NZ_AGENT_PATH
-    chmod 755 -R $NZ_AGENT_PATH
-    unzip -qo nezha-agent_linux_${os_arch}.zip && mv nezha-agent $NZ_AGENT_PATH && rm -rf nezha-agent_linux_${os_arch}.zip README.md
-  fi
-  if [ ! -x "${NZ_AGENT_PATH}/nezha-agent" ]; then
-    chmod +x ${NZ_AGENT_PATH}/nezha-agent
-  fi
-}
-start_pre() {
-  if [ "${RC_CMD}" != "restart" ]; then
-    checkconfig || return $?
-  fi
-}
-EOF
  1. 增加运行权限
shell
chmod +x /etc/init.d/nezha-agent
  1. 运行 Nezha-Agent
shell
rc-service nezha-agent start
  1. 添加开机自启动
shell
rc-update add nezha-agent

在 Windows 中手动安装 Agent

在群晖 DSM 中安装 Agent

点击展开/收起
sh
# Agent 路径
-EXEC="/PATH/TO/nezha-agent"
-# 日志路径地址
-LOG="${EXEC}.log"
-# 额外执行参数, 可留空
-ARGS=""
-# 哪吒服务端 gRPC 地址
-SERVER="HOST_OR_IP:gRPC_PORT"
-# 上一步获取的主机密钥
-SECRET="APP_SECRET"
-# 运行服务的用户名, *强烈建议使用非root用户执行*
-RUN_USER="nezha"
+    
Skip to content

安装 Agent

哪吒监控的被控端服务被称为 Agent,本文档将介绍如何在被控端服务器上安装 Agent,并与 Dashboard 连接。

TIP

Agent 二进制文件仓库地址为:https://github.com/nezhahq/agent/releases

一键安装 Agent

哪吒监控支持在 Windows 和 Linux 上一键安装 Agent。遵循本文档的步骤,你可以很轻松地在服务器上部署它。

准备工作

你需要提前在管理面板中设置好通信域名,此域名不可以接入 CDN。本文档以示例通信域名 “data.example.com” 为例。
进入后台管理面板,转到“设置”页,在“未接入 CDN 的面板服务器域名/IP”项中填入通信域名,然后点击"保存"。

在 Linux 中一键安装 (Ubuntu、Debian、CentOS)

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Linux 图标按钮,复制一键安装命令。
  3. 在被控端服务器中运行复制的一键安装命令,等待安装完成后返回到 Dashboard 主页查看服务器是否上线。

在 Windows 中一键安装

  1. 首先在管理面板中添加一台服务器。
  2. 点击新添加的服务器旁的绿色 Windows 图标按钮,复制一键安装命令。
  3. 进入 Windows 服务器,运行 PowerShell,在 PowerShell 中运行复制的安装命令。
  4. 如遇到确认「执行策略变更」请选择 Y。
  5. 等待安装完成后返回 Dashboard 主页查看服务器是否上线。

WARNING

如果在 PowerShell 中运行一键安装命令时遇到错误,请尝试下方的在 Windows 中手动安装 Agent

其他方式安装 Agent

在 Linux 中安装 Agent (Ubuntu、Debian、CentOS)

点击展开/收起
  1. 首先在管理面板中添加一台服务器。
  2. 在被控服务器中,运行脚本(位于中国大陆的服务器请使用镜像):
bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

如果你的被控服务器位于中国大陆,可以使用镜像:

bash
curl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
  1. 选择“安装监控 Agent”。
  2. 输入通信域名,如:”data.example.com“。
  3. 输入面板通信端口(gRPC 端口),默认为 5555。
  4. 输入 Agent 密钥,Agent 密钥在管理面板中添加服务器时生成,可以在管理面板中的“服务器”页中找到。
  5. 等待安装完成后返回 Dashboard 主页查看服务器是否上线。

在其他 Linux 发行版(如 Alpine 使用 Openrc)中安装 Agent

点击展开/收起

本节内容由 unknown0054 贡献。

  1. 修改 SERVER、SECRET、TLS,然后在 shell 中执行:
shell
cat >/etc/init.d/nezha-agent<< EOF
+#!/sbin/openrc-run
+SERVER="" # Dashboard 地址 ip:port
+SECRET="" # SECRET
+TLS="" # 是否启用 TLS,是 "--tls" ,否留空
+NZ_BASE_PATH="/opt/nezha"
+NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
+pidfile="/run/${RC_SVCNAME}.pid"
+command="/opt/nezha/agent/nezha-agent"
+command_args="-s ${SERVER} -p ${SECRET} ${TLS}"
+command_background=true
+depend() {
+  need net
+}
+checkconfig() {
+  GITHUB_URL="github.com"
+  if [ ! -f "${NZ_AGENT_PATH}/nezha-agent" ]; then
+    if [[ $(uname -m | grep 'x86_64') != "" ]]; then
+      os_arch="amd64"
+    elif [[ $(uname -m | grep 'i386\|i686') != "" ]]; then
+      os_arch="386"
+    elif [[ $(uname -m | grep 'aarch64\|armv8b\|armv8l') != "" ]]; then
+      os_arch="arm64"
+    elif [[ $(uname -m | grep 'arm') != "" ]]; then
+      os_arch="arm"
+    elif [[ $(uname -m | grep 's390x') != "" ]]; then
+      os_arch="s390x"
+    elif [[ $(uname -m | grep 'riscv64') != "" ]]; then
+      os_arch="riscv64"
+    fi
+    local version=$(curl -m 10 -sL "https://api.github.com/repos/nezhahq/agent/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
+    if [ ! -n "$version" ]; then
+      version=$(curl -m 10 -sL "https://fastly.jsdelivr.net/gh/nezhahq/agent/" | grep "option\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\/agent@/v/g')
+    fi
+    if [ ! -n "$version" ]; then
+      version=$(curl -m 10 -sL "https://gcore.jsdelivr.net/gh/nezhahq/agent/" | grep "option\.value" | awk -F "'" '{print $2}' | sed 's/nezhahq\/agent@/v/g')
+    fi
+    if [ ! -n "$version" ]; then
+      echo -e "获取版本号失败,请检查本机能否链接 https://api.github.com/repos/nezhahq/agent/releases/latest"
+      return 0
+    else
+      echo -e "当前最新版本为: ${version}"
+    fi
+    wget -t 2 -T 10 -O nezha-agent_linux_${os_arch}.zip https://${GITHUB_URL}/nezhahq/agent/releases/download/${version}/nezha-agent_linux_${os_arch}.zip >/dev/null 2>&1
+    if [[ $? != 0 ]]; then
+      echo -e "Release 下载失败,请检查本机能否连接 ${GITHUB_URL}${plain}"
+      return 0
+    fi
+    mkdir -p $NZ_AGENT_PATH
+    chmod 755 -R $NZ_AGENT_PATH
+    unzip -qo nezha-agent_linux_${os_arch}.zip && mv nezha-agent $NZ_AGENT_PATH && rm -rf nezha-agent_linux_${os_arch}.zip README.md
+  fi
+  if [ ! -x "${NZ_AGENT_PATH}/nezha-agent" ]; then
+    chmod +x ${NZ_AGENT_PATH}/nezha-agent
+  fi
+}
+start_pre() {
+  if [ "${RC_CMD}" != "restart" ]; then
+    checkconfig || return $?
+  fi
+}
+EOF
  1. 增加运行权限
shell
chmod +x /etc/init.d/nezha-agent
  1. 运行 Nezha-Agent
shell
rc-service nezha-agent start
  1. 添加开机自启动
shell
rc-update add nezha-agent

在 Windows 中手动安装 Agent

在群晖 DSM 中安装 Agent

点击展开/收起
sh
# Agent 路径
+EXEC="/PATH/TO/nezha-agent"
+# 日志路径地址
+LOG="${EXEC}.log"
+# 额外执行参数, 可留空
+ARGS=""
+# 哪吒服务端 gRPC 地址
+SERVER="HOST_OR_IP:gRPC_PORT"
+# 上一步获取的主机密钥
+SECRET="APP_SECRET"
+# 运行服务的用户名, *强烈建议使用非root用户执行*
+RUN_USER="nezha"
 
-# 写入到 systemd 服务文件
-cat << EOF > /usr/lib/systemd/system/nezha.service
-[Unit]
-Description=Nezha Agent Service
-After=network.target
+# 写入到 systemd 服务文件
+cat << EOF > /usr/lib/systemd/system/nezha.service
+[Unit]
+Description=Nezha Agent Service
+After=network.target
 
-[Service]
-Type=simple
-ExecStart=/bin/nohup ${EXEC} ${ARGS} -s ${SERVER} -p ${SECRET} &>> ${LOG} &
-ExecStop=ps -fe |grep nezha-agent|awk '{print \$2}'|xargs kill
-User=${RUN_USER
+[Service]
+Type=simple
+ExecStart=/bin/nohup ${EXEC} ${ARGS} -s ${SERVER} -p ${SECRET} &>> ${LOG} &
+ExecStop=ps -fe |grep nezha-agent|awk '{print \$2}'|xargs kill
+User=${RUN_USER
 
-}
-Restart=on-abort
+}
+Restart=on-abort
 
-[Install]
-WantedBy=multi-user.target
-EOF
+[Install]
+WantedBy=multi-user.target
+EOF
 
-# 重载服务
-systemctl daemon-reload
-# 启动服务
-systemctl start nezha
-# 服务自启动
-systemctl enable nezha

‼️修改对应信息后‼️
使用 root 账号执行上述命令即可安装完成。

在 macOS 中安装 Agent

点击展开/收起

本节内容改编自 Mitsea Blog,改编已获得原作者授权

WARNING

安装过程中如提示“macOS 无法验证此 app“,请前往系统设置手动允许程序运行。

  1. 首先在管理面板中添加一台服务器。
  2. 前往 Release 页下载 Agent 二进制文件,根据 CPU 架构选择下载 darwin amd64 还是 arm64 的 Agent。
    如 Intel CPU 下载 amd64,Apple Silicon 下载 arm64 版本。下载完成后解压 Agent 二进制文件,如解压到下载文件夹。
  3. 新建一个名为 nezha_agent.plist 的文件并保存,修改文件内容如下:
xml
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>KeepAlive</key>
- <true/>
- <key>Label</key>
- <string>nezha_agent</string>
- <key>Program</key>
- <string>在这里修改 Agent 二进制文件的的路径,如:/Users/123/Downloads/nezha-agent</string>
- <key>ProgramArguments</key>
- <array>
-  <string>在这里修改 Agent 二进制文件的的路径,同上</string>
-  <string>--password</string>
-  <string>通信密钥,如:529664783eeb23cc25</string>
-  <string>--server</string>
-  <string>通信网址和 gRPC 端口,如:data.example.com:5555</string>
- </array>
- <key>RunAtLoad</key>
- <true/>
-</dict>
-</plist>
  1. 在 Terminal 中使用下面的命令加载 plist 文件到 launchd 里,注意替换文件路径
shell
launchctl load /Users/123/Desktop/nezha_agent.plist
  1. 启动进程:
shell
launchctl start nezha_agent
  1. 检查进程是否运行:
shell
launchctl list | grep nezha_agent
  1. 停止进程并移除:
shell
launchctl stop nezha_agent
shell
launchctl remove nezha_agent

在 macOS 中使用 Homebrew 安装 Agent

点击展开/收起

本节内容改编自 🐿️松鼠收集🌰,改编已获得原作者授权

WARNING

请务必先添加环境变量,再通过 Homebrew 安装 nezha-agent! 因 Homebrew 在软件安装时创建服务所需 plist 文件,若先安装再添加环境变量,会因缺少参数而启动失败。

  1. 添加环境变量:
shell
echo 'export HOMEBREW_NEZHA_AGENT_PASSWORD="通信密钥,在服务页面获取"' >> ~/.zshrc
-echo 'export HOMEBREW_NEZHA_AGENT_SERVER="你的服务器和端口,格式 your.domain:5555 "' >> ~/.zshrc
-source ~/.zshrc
  1. 安装 Nezha Agent:

DANGER

请注意,此 Homebrew 仓库由第三方维护,与哪吒监控无关。 Nezha 项目组不对该仓库的可用性和安全性等方面作出背书。在使用前,请自行评估风险!

由于暂未提交到 Homebrew Core 官方库,暂时放在上述博客作者参与维护的 第三方 Homebrew 仓库 中:

shell
brew install brewforge/chinese/nezha-agent
  1. 通过 Homebrew 启动 Nezha Agent 服务:
shell
brew services start nezha-agent
  1. 检查服务状态:
shell
brew services info nezha-agent
  1. 停止服务:
shell
brew services stop nezha-agent
  1. 卸载 Nezha Agent:
shell
brew rm nezha-agent
  1. 报错时先检查环境变量:
shell
echo $HOMEBREW_NEZHA_AGENT_PASSWORD
-echo $HOMEBREW_NEZHA_AGENT_SERVER
  1. 若环境变量配置正确,再尝试重装:
shell
brew services stop nezha-agent
-brew reinstall nezha-agent
-brew services start nezha-agent
  1. 若仍未解决,请前往上述 第三方 Homebrew 仓库 提交 issue。

在 OpenWRT 中安装 Agent

点击展开/收起

如何一步到位,解决安装过程中的疑难杂症?

如何使旧版 OpenWRT/LEDE 自启动?

如何使新版 OpenWRT 自启动? 贡献者:@艾斯德斯

  • 首先在 release 下载对应的二进制解压 zip 包后放置到 /root
  • 运行 chmod +x /root/nezha-agent 赋予执行权限,然后创建 /etc/init.d/nezha-service
shell
#!/bin/sh /etc/rc.common
+# 重载服务
+systemctl daemon-reload
+# 启动服务
+systemctl start nezha
+# 服务自启动
+systemctl enable nezha

‼️修改对应信息后‼️
使用 root 账号执行上述命令即可安装完成。

在 macOS 中安装 Agent

点击展开/收起

本节内容改编自 Mitsea Blog,改编已获得原作者授权

WARNING

安装过程中如提示“macOS 无法验证此 app“,请前往系统设置手动允许程序运行。

  1. 首先在管理面板中添加一台服务器。
  2. 前往 Release 页下载 Agent 二进制文件,根据 CPU 架构选择下载 darwin amd64 还是 arm64 的 Agent。
    如 Intel CPU 下载 amd64,Apple Silicon 下载 arm64 版本。下载完成后解压 Agent 二进制文件,如解压到下载文件夹。
  3. 新建一个名为 nezha_agent.plist 的文件并保存,修改文件内容如下:
xml
<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>KeepAlive</key>
+ <true/>
+ <key>Label</key>
+ <string>nezha_agent</string>
+ <key>Program</key>
+ <string>在这里修改 Agent 二进制文件的的路径,如:/Users/123/Downloads/nezha-agent</string>
+ <key>ProgramArguments</key>
+ <array>
+  <string>在这里修改 Agent 二进制文件的的路径,同上</string>
+  <string>--password</string>
+  <string>通信密钥,如:529664783eeb23cc25</string>
+  <string>--server</string>
+  <string>通信网址和 gRPC 端口,如:data.example.com:5555</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+</dict>
+</plist>
  1. 在 Terminal 中使用下面的命令加载 plist 文件到 launchd 里,注意替换文件路径
shell
launchctl load /Users/123/Desktop/nezha_agent.plist
  1. 启动进程:
shell
launchctl start nezha_agent
  1. 检查进程是否运行:
shell
launchctl list | grep nezha_agent
  1. 停止进程并移除:
shell
launchctl stop nezha_agent
shell
launchctl remove nezha_agent

在 macOS 中使用 Homebrew 安装 Agent

点击展开/收起

本节内容改编自 🐿️松鼠收集🌰,改编已获得原作者授权

WARNING

请务必先添加环境变量,再通过 Homebrew 安装 nezha-agent! 因 Homebrew 在软件安装时创建服务所需 plist 文件,若先安装再添加环境变量,会因缺少参数而启动失败。

  1. 添加环境变量:
shell
echo 'export HOMEBREW_NEZHA_AGENT_PASSWORD="通信密钥,在服务页面获取"' >> ~/.zshrc
+echo 'export HOMEBREW_NEZHA_AGENT_SERVER="你的服务器和端口,格式 your.domain:5555 "' >> ~/.zshrc
+source ~/.zshrc
  1. 安装 Nezha Agent:

DANGER

请注意,此 Homebrew 仓库由第三方维护,与哪吒监控无关。 Nezha 项目组不对该仓库的可用性和安全性等方面作出背书。在使用前,请自行评估风险!

由于暂未提交到 Homebrew Core 官方库,暂时放在上述博客作者参与维护的 第三方 Homebrew 仓库 中:

shell
brew install brewforge/chinese/nezha-agent
  1. 通过 Homebrew 启动 Nezha Agent 服务:
shell
brew services start nezha-agent
  1. 检查服务状态:
shell
brew services info nezha-agent
  1. 停止服务:
shell
brew services stop nezha-agent
  1. 卸载 Nezha Agent:
shell
brew rm nezha-agent
  1. 报错时先检查环境变量:
shell
echo $HOMEBREW_NEZHA_AGENT_PASSWORD
+echo $HOMEBREW_NEZHA_AGENT_SERVER
  1. 若环境变量配置正确,再尝试重装:
shell
brew services stop nezha-agent
+brew reinstall nezha-agent
+brew services start nezha-agent
  1. 若仍未解决,请前往上述 第三方 Homebrew 仓库 提交 issue。

在 OpenWRT 中安装 Agent

点击展开/收起

如何一步到位,解决安装过程中的疑难杂症?

如何使旧版 OpenWRT/LEDE 自启动?

如何使新版 OpenWRT 自启动? 贡献者:@艾斯德斯

  • 首先在 release 下载对应的二进制解压 zip 包后放置到 /root
  • 运行 chmod +x /root/nezha-agent 赋予执行权限,然后创建 /etc/init.d/nezha-service
shell
#!/bin/sh /etc/rc.common
 
-START=99
-USE_PROCD=1
+START=99
+USE_PROCD=1
 
-start_service() {
- procd_open_instance
- procd_set_param command /root/nezha-agent -s 面板通信地址:端口 -p 秘钥 -d
- procd_set_param respawn
- procd_close_instance
-}
+start_service() {
+ procd_open_instance
+ procd_set_param command /root/nezha-agent -s 面板通信地址:端口 -p 秘钥 -d
+ procd_set_param respawn
+ procd_close_instance
+}
 
-stop_service() {
-  killall nezha-agent
-}
+stop_service() {
+  killall nezha-agent
+}
 
-restart() {
- stop
- sleep 2
- start
-}
  • 运行 chmod +x /etc/init.d/nezha-service 赋予执行权限。
  • 启动服务: /etc/init.d/nezha-service enable && /etc/init.d/nezha-service start

Agent 有 Docker 镜像吗?

Agent 目前没有推出 Docker 镜像。
Agent 的设计思路和 Dashboard 相反,Dashboard 要尽可能不影响宿主机工作,但 Agent 则需要在宿主机中执行监控服务和运行命令。
将 Agent 放入容器中确实可以继续执行监控任务,但 WebShell 等功能无法正常运行,因此不提供 Docker 镜像。

- +restart() { + stop + sleep 2 + start +}

Agent 有 Docker 镜像吗?

Agent 目前没有推出 Docker 镜像。
Agent 的设计思路和 Dashboard 相反,Dashboard 要尽可能不影响宿主机工作,但 Agent 则需要在宿主机中执行监控服务和运行命令。
将 Agent 放入容器中确实可以继续执行监控任务,但 WebShell 等功能无法正常运行,因此不提供 Docker 镜像。

+ \ No newline at end of file diff --git a/guide/agentq.html b/guide/agentq.html index 7b86be78..e22de7da 100644 --- a/guide/agentq.html +++ b/guide/agentq.html @@ -5,21 +5,24 @@ Agent 常见问题 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Agent 常见问题

后台显示的 IP 和 Agent 实际 IP 不一致?

请查看 Dashboard 相关-为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?。在此不再赘述。

一键脚本安装时出错

curl: Failed to connect to raw.githubusercontent.com......

多出现在中国大陆的服务器中,目前一键脚本只从 Github 直接获取安装脚本,您可以多尝试几次,或者手动安装 Agent。另外,也可以自行寻找第三方 Github 加速服务或者镜像,并在一键安装脚本中设置。

sudo: command not found

请先手动安装 sudo,例如在 Ubuntu 中:

shell
apt install sudo
- +
Skip to content

Agent 常见问题

后台显示的 IP 和 Agent 实际 IP 不一致?

请查看 Dashboard 相关-为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?。在此不再赘述。

一键脚本安装时出错

curl: Failed to connect to raw.githubusercontent.com......

多出现在中国大陆的服务器中,目前一键脚本只从 Github 直接获取安装脚本,您可以多尝试几次,或者手动安装 Agent。另外,也可以自行寻找第三方 Github 加速服务或者镜像,并在一键安装脚本中设置。

sudo: command not found

请先手动安装 sudo,例如在 Ubuntu 中:

shell
apt install sudo
+ \ No newline at end of file diff --git a/guide/api.html b/guide/api.html index 9306471a..aa45850b 100644 --- a/guide/api.html +++ b/guide/api.html @@ -5,158 +5,161 @@ API 接口 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

API 接口

哪吒监控支持使用 API 接口查询面板中 Agent 的状态信息

创建 Token

哪吒面板的 API 接口允许使用 Token 认证与 Cookies 认证。要新建一个 Token,在进入管理面板后,点击右上角的头像,选择 “API Token”,进入 Token 管理页面。点击 “API Token”,自定义备注后,点击 “添加”。

如需删除一个 Token,请选择相应的 Token,点击右侧的删除图标。

WARNING

Token 是 API 接口的鉴权凭据,它对你的面板的信息安全非常重要,请不要泄漏你的 Token 给他人。

认证方式

确保在请求头中包含 Authorization: Token 进行身份认证。

Token 认证方式:

Request Headers:
-Authorization: Token

使用说明

WARNING

下面示例中的负数时间戳为(0000-00-00),目前表示 Dashboard 上线后该 Agent 从未汇报过,但不建议用正负性判断状态。

TIP

请求方式为 GET,返回格式为 JSON

获取服务器列表

请求:

GET /api/v1/server/list?tag=

参数:

  • tag(可选):ServerTag 是服务器的分组,提供此参数则仅查询该分组中的服务器。

返回示例:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653014667,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1"
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": ""
-        }
-    ]
-}

获取服务器详情

请求:

GET /api/v1/server/details?id=&tag=

参数:

  • id(可选):ServerID,多个 ID 以逗号分隔,提供此参数则查询该 ID 对应的服务器,同时无视 tag 参数。
  • tag(可选):ServerTag,提供此参数则仅查询该分组下的服务器。

返回示例:

json
{
-    "code": 0,
-    "message": "success",
-    "result": [
-        {
-            "id": 1,
-            "name": "Server1",
-            "tag": "Tag1",
-            "last_active": 1653015042,
-            "ipv4": "1.1.1.1",
-            "ipv6": "",
-            "valid_ip": "1.1.1.1",
-            "host": {
-                "Platform": "darwin",
-                "PlatformVersion": "12.3.1",
-                "CPU": [
-                    "Apple M1 Pro 1 Physical Core"
-                ],
-                "MemTotal": 17179869184,
-                "DiskTotal": 2473496842240,
-                "SwapTotal": 0,
-                "Arch": "arm64",
-                "Virtualization": "",
-                "BootTime": 1652683962,
-                "CountryCode": "hk",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 17.33,
-                "MemUsed": 14013841408,
-                "SwapUsed": 0,
-                "DiskUsed": 2335048912896,
-                "NetInTransfer": 2710273234,
-                "NetOutTransfer": 695454765,
-                "NetInSpeed": 10806,
-                "NetOutSpeed": 5303,
-                "Uptime": 331080,
-                "Load1": 5.23,
-                "Load5": 4.87,
-                "Load15": 3.99,
-                "TcpConnCount": 195,
-                "UdpConnCount": 70,
-                "ProcessCount": 437
-            }
-        },
-        {
-            "id": 2,
-            "name": "Server2",
-            "tag": "Tag2",
-            "last_active": -62135596800,
-            "ipv4": "",
-            "ipv6": "",
-            "valid_ip": "",
-            "host": {
-                "Platform": "",
-                "PlatformVersion": "",
-                "CPU": null,
-                "MemTotal": 0,
-                "DiskTotal": 0,
-                "SwapTotal": 0,
-                "Arch": "",
-                "Virtualization": "",
-                "BootTime": 0,
-                "CountryCode": "",
-                "Version": ""
-            },
-            "status": {
-                "CPU": 0,
-                "MemUsed": 0,
-                "SwapUsed": 0,
-                "DiskUsed": 0,
-                "NetInTransfer": 0,
-                "NetOutTransfer": 0,
-                "NetInSpeed": 0,
-                "NetOutSpeed": 0,
-                "Uptime": 0,
-                "Load1": 0,
-                "Load5": 0,
-                "Load15": 0,
-                "TcpConnCount": 0,
-                "UdpConnCount": 0,
-                "ProcessCount": 0
-            }
-        }
-    ]
-}

使用案例

获取所有服务器信息

python
import requests
+    
Skip to content

API 接口

哪吒监控支持使用 API 接口查询面板中 Agent 的状态信息

创建 Token

哪吒面板的 API 接口允许使用 Token 认证与 Cookies 认证。要新建一个 Token,在进入管理面板后,点击右上角的头像,选择 “API Token”,进入 Token 管理页面。点击 “API Token”,自定义备注后,点击 “添加”。

如需删除一个 Token,请选择相应的 Token,点击右侧的删除图标。

WARNING

Token 是 API 接口的鉴权凭据,它对你的面板的信息安全非常重要,请不要泄漏你的 Token 给他人。

认证方式

确保在请求头中包含 Authorization: Token 进行身份认证。

Token 认证方式:

Request Headers:
+Authorization: Token

使用说明

WARNING

下面示例中的负数时间戳为(0000-00-00),目前表示 Dashboard 上线后该 Agent 从未汇报过,但不建议用正负性判断状态。

TIP

请求方式为 GET,返回格式为 JSON

获取服务器列表

请求:

GET /api/v1/server/list?tag=

参数:

  • tag(可选):ServerTag 是服务器的分组,提供此参数则仅查询该分组中的服务器。

返回示例:

json
{
+    "code": 0,
+    "message": "success",
+    "result": [
+        {
+            "id": 1,
+            "name": "Server1",
+            "tag": "Tag1",
+            "last_active": 1653014667,
+            "ipv4": "1.1.1.1",
+            "ipv6": "",
+            "valid_ip": "1.1.1.1"
+        },
+        {
+            "id": 2,
+            "name": "Server2",
+            "tag": "Tag2",
+            "last_active": -62135596800,
+            "ipv4": "",
+            "ipv6": "",
+            "valid_ip": ""
+        }
+    ]
+}

获取服务器详情

请求:

GET /api/v1/server/details?id=&tag=

参数:

  • id(可选):ServerID,多个 ID 以逗号分隔,提供此参数则查询该 ID 对应的服务器,同时无视 tag 参数。
  • tag(可选):ServerTag,提供此参数则仅查询该分组下的服务器。

返回示例:

json
{
+    "code": 0,
+    "message": "success",
+    "result": [
+        {
+            "id": 1,
+            "name": "Server1",
+            "tag": "Tag1",
+            "last_active": 1653015042,
+            "ipv4": "1.1.1.1",
+            "ipv6": "",
+            "valid_ip": "1.1.1.1",
+            "host": {
+                "Platform": "darwin",
+                "PlatformVersion": "12.3.1",
+                "CPU": [
+                    "Apple M1 Pro 1 Physical Core"
+                ],
+                "MemTotal": 17179869184,
+                "DiskTotal": 2473496842240,
+                "SwapTotal": 0,
+                "Arch": "arm64",
+                "Virtualization": "",
+                "BootTime": 1652683962,
+                "CountryCode": "hk",
+                "Version": ""
+            },
+            "status": {
+                "CPU": 17.33,
+                "MemUsed": 14013841408,
+                "SwapUsed": 0,
+                "DiskUsed": 2335048912896,
+                "NetInTransfer": 2710273234,
+                "NetOutTransfer": 695454765,
+                "NetInSpeed": 10806,
+                "NetOutSpeed": 5303,
+                "Uptime": 331080,
+                "Load1": 5.23,
+                "Load5": 4.87,
+                "Load15": 3.99,
+                "TcpConnCount": 195,
+                "UdpConnCount": 70,
+                "ProcessCount": 437
+            }
+        },
+        {
+            "id": 2,
+            "name": "Server2",
+            "tag": "Tag2",
+            "last_active": -62135596800,
+            "ipv4": "",
+            "ipv6": "",
+            "valid_ip": "",
+            "host": {
+                "Platform": "",
+                "PlatformVersion": "",
+                "CPU": null,
+                "MemTotal": 0,
+                "DiskTotal": 0,
+                "SwapTotal": 0,
+                "Arch": "",
+                "Virtualization": "",
+                "BootTime": 0,
+                "CountryCode": "",
+                "Version": ""
+            },
+            "status": {
+                "CPU": 0,
+                "MemUsed": 0,
+                "SwapUsed": 0,
+                "DiskUsed": 0,
+                "NetInTransfer": 0,
+                "NetOutTransfer": 0,
+                "NetInSpeed": 0,
+                "NetOutSpeed": 0,
+                "Uptime": 0,
+                "Load1": 0,
+                "Load5": 0,
+                "Load15": 0,
+                "TcpConnCount": 0,
+                "UdpConnCount": 0,
+                "ProcessCount": 0
+            }
+        }
+    ]
+}

使用案例

获取所有服务器信息

python
import requests
 
-url = "http://your-dashboard/api/v1/server/list"
-headers = {
-    "Authorization": "your_token"
-}
+url = "http://your-dashboard/api/v1/server/list"
+headers = {
+    "Authorization": "your_token"
+}
 
-response = requests.get(url, headers=headers)
-data = response.json()
+response = requests.get(url, headers=headers)
+data = response.json()
 
-for server in data['result']:
-    print(f"Server Name: {server['name']}, Last Active: {server['last_active']}, IP: {server['valid_ip']}")

获取特定服务器详情

python
import requests
+for server in data['result']:
+    print(f"Server Name: {server['name']}, Last Active: {server['last_active']}, IP: {server['valid_ip']}")

获取特定服务器详情

python
import requests
 
-server_id = 1  # 替换为你的服务器ID
-url = f"http://your-dashboard/api/v1/server/details?id={server_id}"
-headers = {
-    "Authorization": "your_token"
-}
+server_id = 1  # 替换为你的服务器ID
+url = f"http://your-dashboard/api/v1/server/details?id={server_id}"
+headers = {
+    "Authorization": "your_token"
+}
 
-response = requests.get(url, headers=headers)
-data = response.json()
+response = requests.get(url, headers=headers)
+data = response.json()
 
-server = data['result'][0]
-print(f"Server Name: {server['name']}")
-print(f"CPU Usage: {server['status']['CPU']}%")
-print(f"Memory Used: {server['status']['MemUsed']} bytes")
-print(f"Disk Used: {server['status']['DiskUsed']} bytes")
-print(f"Network In Speed: {server['status']['NetInSpeed']} bytes/s")
-print(f"Network Out Speed: {server['status']['NetOutSpeed']} bytes/s")

通过以上示例代码,可以轻松获取和处理服务器的状态信息,从而实现自动化监控和管理。

- +server = data['result'][0] +print(f"Server Name: {server['name']}") +print(f"CPU Usage: {server['status']['CPU']}%") +print(f"Memory Used: {server['status']['MemUsed']} bytes") +print(f"Disk Used: {server['status']['DiskUsed']} bytes") +print(f"Network In Speed: {server['status']['NetInSpeed']} bytes/s") +print(f"Network Out Speed: {server['status']['NetOutSpeed']} bytes/s")

通过以上示例代码,可以轻松获取和处理服务器的状态信息,从而实现自动化监控和管理。

+ \ No newline at end of file diff --git a/guide/dashboard.html b/guide/dashboard.html index 9347f850..07f0a74a 100644 --- a/guide/dashboard.html +++ b/guide/dashboard.html @@ -5,41 +5,44 @@ 安装 Dashboard | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

安装 Dashboard

准备工作

搭建一个哪吒监控,你需要:

  1. 一台可以连接公网的服务器,防火墙和安全策略需要放行 8008 和 5555 端口,否则会无法访问和无法接收数据。单核 512MB 内存的服务器配置就足以满足大多数使用场景。
  2. 一个已经设置好 A 记录,指向 Dashboard 服务器 IP 的域名。

TIP

如果你想使用 CDN,请准备两个域名,一个配置好 CDN 用作公开访问,CDN 需要支持 WebSocket 协议;另一个域名不要使用 CDN,用作 Agent 端与 Dashboard 的通信。

本文档分别以 "dashboard.example.com" 和 "data.example.com" 两个域名来演示。

  1. 一个 Github 账号(或:Gitlab、Gitee)。

本文档将以宝塔面板反代 Dashboard 的过程作为示范,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考。

WARNING

本项目并不依赖宝塔,你可以选择使用你喜欢的任何服务器面板,或手动安装 Nginx 或 Caddy 来配置 SSL 和反代。
如果你认为没有必要使用 80、443 端口来访问 Dashboard,你甚至不需要安装 Nginx 就可以直接使用安装脚本安装并运行哪吒监控。

获取 Github 的 Client ID 和密钥

哪吒监控接入 Github、Gitlab、Gitee 作为后台管理员账号。

  1. 首先我们需要新建一个验证应用,以 Github 为例,登录 Github 后,打开 https://github.com/settings/developers,依次选择“OAuth Apps” - “New OAuth App”。
    Application name - 随意填写。
    Homepage URL - 填写面板的访问域名,如:"http://dashboard.example.com"(你的域名)。
    Authorization callback URL - 填写回调地址,如:"http://dashboard.example.com/oauth2/callback"(不要忘记/oauth2/callback)。
  2. 点击 “Register application”。
  3. 保存页面中的 Client ID,然后点击 “Generate a new client secret“,创建一个新的 Client Secret,新建的密钥仅会显示一次,请妥善保存

使用 Cloudflare Access 作为 OAuth2 提供方

位于中国大陆的用户可能无法直接连接 Github,如您在使用 Github、Gitlab、Gitee 作为管理员账户登录时遇到问题,可以优先考虑切换 使用 Cloudflare Access 作为 OAuth2 提供方 作为登录方式。

新建 SaaS-OIDC 应用流程

  1. 前往 Zero Trust Dashboard,使用 Cloudflare 账号登录。
  2. My Team -> Users -> <具体用户> -> 获取 User ID 并保存。
  3. Access -> Application -> Add an Application
  4. 选择 SaaS,在 Application 中输入自定义的应用名称(例如 nezha),选择 OIDC 后点击 Add application
  5. Scopes 选择 openid, email, profile, groups
  6. Redirect URLs 填写你的 callback 地址,例如 https://dashboard.example.com/oauth2/callback
  7. 保存 Client IDClient SecretIssuer 地址中协议与域名的部分,例如 https://xxxxx.cloudflareaccess.com

如使用此方式,安装 Dashboard 完成后,需要修改配置文件 /opt/nezha/dashboard/data/config.yaml,将 Endpoint 配置修改为之前保存的 Issuer 地址,例如 https://xxxxx.cloudflareaccess.com,保存后需重启 Dashboard。

在服务器中安装 Dashboard

在面板服务器中,运行安装脚本:

bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

如果你的面板服务器位于中国大陆,可以使用镜像:

bash
curl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh

等待 Docker 安装完毕后,分别输入以下值:

  • OAuth提供商 - github、cloudflare、gitlab、gitee 中选择一个。
  • Client ID - 之前保存的 Client ID。
  • Client Secret - 之前保存的 Client Secret。
  • 用户名 - OAuth 提供商中的用户名/User ID。
  • 站点标题 - 自定义站点标题。
  • 访问端口 - 公开访问端口,可自定义,默认 8008。
  • Agent的通信端口 - Agent 与 Dashboard 的通信端口,默认 5555。

输入完成后,等待拉取镜像。
安装结束后,如果一切正常,此时你可以访问域名+端口号,如 “http://dashboard.example.com:8008” 来查看面板。

将来如果需要再次运行脚本,可以运行:

bash
./nezha.sh

来打开管理脚本。

配置反向代理

在宝塔面板中新建一个站点,域名填写公开访问域名,如 “http://dashboard.example.com“ ,然后点击“设置”进入站点设置选项,选择“反向代理” - “新建反向代理”。

自定义一个代理名称,在下方“目标 URL”中填入 http://127.0.0.1 然后点击“保存”。

打开刚刚新建的反向代理右边的“配置文件”,将配置文件替换为以下内容:

nginx
#PROXY-START/
-location / {
-    proxy_pass http://127.0.0.1:8008;
-    proxy_set_header Host $http_host;
-    proxy_set_header      Upgrade $http_upgrade;
-}
-location ~ ^/(ws|terminal/.+)$  {
-    proxy_pass http://127.0.0.1:8008;
-    proxy_http_version 1.1;
-    proxy_set_header Upgrade $http_upgrade;
-    proxy_set_header Connection "Upgrade";
-    proxy_set_header Host $http_host;
-}
-#PROXY-END/

点击“保存”。
现在,你应该可以直接使用域名,如:“http://dashboard.example.com“ 来访问面板了。

扩展内容:

CaddyServer v1(v2 无需特别配置):

caddy
proxy /ws http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}
-proxy /terminal/* http://ip:8008 {
-    websocket
-    header_upstream -Origin
-}

在宝塔面板中配置 SSL

首先,先暂时关闭反向代理。
正如在其他网站中配置 SSL 证书一样,进入站点设置中的 “SSL”,你可以选择自动申请 Let´s Encrypt 证书或手动配置已有的证书。
完成 SSL 的设置后,你需要回到 https://github.com/settings/developers ,编辑之前创建的验证应用程序,将之前我们填入的 "Homepage URL" 和 "Authorization callback URL" 中的域名全部从 http 改为 https,如:"https://dashboard.example.com" 和 "https://dashboard.example.com/oauth2/callback" ,不更改此项可能会导致你无法登录面板后台

更新 Dashboard

运行脚本 ./nezha.sh ,选择重启面板并更新。

- +
Skip to content

安装 Dashboard

准备工作

搭建一个哪吒监控,你需要:

  1. 一台可以连接公网的服务器,防火墙和安全策略需要放行 8008 和 5555 端口,否则会无法访问和无法接收数据。单核 512MB 内存的服务器配置就足以满足大多数使用场景。
  2. 一个已经设置好 A 记录,指向 Dashboard 服务器 IP 的域名。

TIP

如果你想使用 CDN,请准备两个域名,一个配置好 CDN 用作公开访问,CDN 需要支持 WebSocket 协议;另一个域名不要使用 CDN,用作 Agent 端与 Dashboard 的通信。

本文档分别以 "dashboard.example.com" 和 "data.example.com" 两个域名来演示。

  1. 一个 Github 账号(或:Gitlab、Gitee)。

本文档将以宝塔面板反代 Dashboard 的过程作为示范,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考。

WARNING

本项目并不依赖宝塔,你可以选择使用你喜欢的任何服务器面板,或手动安装 Nginx 或 Caddy 来配置 SSL 和反代。
如果你认为没有必要使用 80、443 端口来访问 Dashboard,你甚至不需要安装 Nginx 就可以直接使用安装脚本安装并运行哪吒监控。

获取 Github 的 Client ID 和密钥

哪吒监控接入 Github、Gitlab、Gitee 作为后台管理员账号。

  1. 首先我们需要新建一个验证应用,以 Github 为例,登录 Github 后,打开 https://github.com/settings/developers,依次选择“OAuth Apps” - “New OAuth App”。
    Application name - 随意填写。
    Homepage URL - 填写面板的访问域名,如:"http://dashboard.example.com"(你的域名)。
    Authorization callback URL - 填写回调地址,如:"http://dashboard.example.com/oauth2/callback"(不要忘记/oauth2/callback)。
  2. 点击 “Register application”。
  3. 保存页面中的 Client ID,然后点击 “Generate a new client secret“,创建一个新的 Client Secret,新建的密钥仅会显示一次,请妥善保存

使用 Cloudflare Access 作为 OAuth2 提供方

位于中国大陆的用户可能无法直接连接 Github,如您在使用 Github、Gitlab、Gitee 作为管理员账户登录时遇到问题,可以优先考虑切换 使用 Cloudflare Access 作为 OAuth2 提供方 作为登录方式。

新建 SaaS-OIDC 应用流程

  1. 前往 Zero Trust Dashboard,使用 Cloudflare 账号登录。
  2. My Team -> Users -> <具体用户> -> 获取 User ID 并保存。
  3. Access -> Application -> Add an Application
  4. 选择 SaaS,在 Application 中输入自定义的应用名称(例如 nezha),选择 OIDC 后点击 Add application
  5. Scopes 选择 openid, email, profile, groups
  6. Redirect URLs 填写你的 callback 地址,例如 https://dashboard.example.com/oauth2/callback
  7. 保存 Client IDClient SecretIssuer 地址中协议与域名的部分,例如 https://xxxxx.cloudflareaccess.com

如使用此方式,安装 Dashboard 完成后,需要修改配置文件 /opt/nezha/dashboard/data/config.yaml,将 Endpoint 配置修改为之前保存的 Issuer 地址,例如 https://xxxxx.cloudflareaccess.com,保存后需重启 Dashboard。

在服务器中安装 Dashboard

在面板服务器中,运行安装脚本:

bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

如果你的面板服务器位于中国大陆,可以使用镜像:

bash
curl -L https://gitee.com/naibahq/nezha/raw/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh

等待 Docker 安装完毕后,分别输入以下值:

  • OAuth提供商 - github、cloudflare、gitlab、gitee 中选择一个。
  • Client ID - 之前保存的 Client ID。
  • Client Secret - 之前保存的 Client Secret。
  • 用户名 - OAuth 提供商中的用户名/User ID。
  • 站点标题 - 自定义站点标题。
  • 访问端口 - 公开访问端口,可自定义,默认 8008。
  • Agent的通信端口 - Agent 与 Dashboard 的通信端口,默认 5555。

输入完成后,等待拉取镜像。
安装结束后,如果一切正常,此时你可以访问域名+端口号,如 “http://dashboard.example.com:8008” 来查看面板。

将来如果需要再次运行脚本,可以运行:

bash
./nezha.sh

来打开管理脚本。

配置反向代理

在宝塔面板中新建一个站点,域名填写公开访问域名,如 “http://dashboard.example.com“ ,然后点击“设置”进入站点设置选项,选择“反向代理” - “新建反向代理”。

自定义一个代理名称,在下方“目标 URL”中填入 http://127.0.0.1 然后点击“保存”。

打开刚刚新建的反向代理右边的“配置文件”,将配置文件替换为以下内容:

nginx
#PROXY-START/
+location / {
+    proxy_pass http://127.0.0.1:8008;
+    proxy_set_header Host $http_host;
+    proxy_set_header      Upgrade $http_upgrade;
+}
+location ~ ^/(ws|terminal/.+)$  {
+    proxy_pass http://127.0.0.1:8008;
+    proxy_http_version 1.1;
+    proxy_set_header Upgrade $http_upgrade;
+    proxy_set_header Connection "Upgrade";
+    proxy_set_header Host $http_host;
+}
+#PROXY-END/

点击“保存”。
现在,你应该可以直接使用域名,如:“http://dashboard.example.com“ 来访问面板了。

扩展内容:

CaddyServer v1(v2 无需特别配置):

caddy
proxy /ws http://ip:8008 {
+    websocket
+    header_upstream -Origin
+}
+proxy /terminal/* http://ip:8008 {
+    websocket
+    header_upstream -Origin
+}

在宝塔面板中配置 SSL

首先,先暂时关闭反向代理。
正如在其他网站中配置 SSL 证书一样,进入站点设置中的 “SSL”,你可以选择自动申请 Let´s Encrypt 证书或手动配置已有的证书。
完成 SSL 的设置后,你需要回到 https://github.com/settings/developers ,编辑之前创建的验证应用程序,将之前我们填入的 "Homepage URL" 和 "Authorization callback URL" 中的域名全部从 http 改为 https,如:"https://dashboard.example.com" 和 "https://dashboard.example.com/oauth2/callback" ,不更改此项可能会导致你无法登录面板后台

更新 Dashboard

运行脚本 ./nezha.sh ,选择重启面板并更新。

+ \ No newline at end of file diff --git a/guide/dashboardq.html b/guide/dashboardq.html index 82fac611..b584729b 100644 --- a/guide/dashboardq.html +++ b/guide/dashboardq.html @@ -5,30 +5,33 @@ Dashboard 常见问题 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Dashboard 常见问题

为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?

首先解释管理面板中显示的IP是怎么得到的:Agent 会每隔一段时间请求一遍 IP-API,获取到 IP 信息后上报到 Dashboard,目前使用的 IP-API 可在此查看:myip.go
如您发现管理面板中显示的 IP 和服务商提供给您的 IP 不一致,最大的可能是服务商给您的是入口 IP,但 Agent 测试的是您的出口 IP。这个问题也可能会出现在多线服务器和 IPLC 专线中。

TIP

举个简单也十分常见的例子,服务商给您提供的是一台高防服务器,为了同时满足高防和低网络中断率的目标,提供给您的 IP 可能是经过映射后的高防 IP 而并非您服务器的真实出口 IP。

您也可以在 Agent 服务器中运行以下命令测试出口 IP:

shell
curl https://ipapi.co/ip/
-curl ip.sb
-curl ip-api.com

忘记查看密码\删除查看密码

请查看或编辑 /opt/nezha/dashboard/data/config.yaml 文件。
密码位于 site-viewpassword 项中。

面板安装/重启/更新失败: iptables ......

首先尝试重启 Docker 再操作:

shell
systemctl status docker
-systemctl restart docker
-systemctl status docker

重启后尝试重新安装面板。
若依然出现 iptables... 等错误,则考虑直接关闭 iptables 甚至移除 iptables。
这个问题也可能与内核有关,也可以尝试更换官方内核。

面板重启失败:Invalid hostPort: nz_site_port 等

如出现此问题,可以通过安装脚本修改配置,或者直接修改 /opt/nezha/dashboard/docker-compose.yaml 文件。

面板布局错误、CSS 资源无法被加载

如果出现 Dashboard 页面布局错误,通常是 CSS 文件丢失或无法被加载。
出现此类错误,可以先尝试 重启并更新面板
如果更新面板后问题没有得到解决,那么可能是你的 vhost 配置文件内有不适用的配置,你可以编辑 Nginx 的 vhost 文件或在宝塔面板内:

  1. 网站 中找到安装 Dashboard 时配置的站点,点击右侧 设置

  2. 选择 配置文件,删除配置文件中的:

    nginx
    location ~ .*\.(js|css)?$
    -    {
    -        expires      12h;
    -        error_log /dev/null;
    -        access_log /dev/null;
    -    }
  3. 保存配置,并清空浏览器、Nginx、CDN 中的缓存,此时刷新页面应恢复正常。

面板无法启动:panic: 无法找到配置的 DDNS 提供者...

填入的 DDNS provider 的值有误,目前仅支持 webhookcloudflaretencentclouddummy

面板更新 DDNS 崩溃:panic: interface conversion: interface {} is nil, not []interface {}

填入的 DDNS AccessIDAccessSecret 有误。

打开网络监控页显示:server monitor history not found

出现此错误说明没有在服务页中设置 TCP-Ping 和 ICMP-Ping 类型的监控或者监控数据还未生成。
如已经设置完毕,可以等待一段时间后再查看。

启用 HTTPS 后 /terminal 或 /ws 不能正常连接

常常是由于证书不完整造成的,请在 agent 运行参数中添加 -d,若 log 中有 x509:certificate signed by unknown authority,更换完整证书则可解决该问题。

对面板提供的数据修改/增加功能不满意,想要修改/增加数据

常见于批量新建 Agent 等需求中,可以直接修改数据库。
请注意,数据库中并非什么都可以修改,错误的修改会导致数据混乱无法启动 Dashboard,请勿随意修改数据库!

DANGER

再重复一遍,请勿随意修改数据库!

如需要在数据库中修改数据,请先停止面板容器再修改。
数据库类型是 sqlite3,位于 /opt/nezha/dashboard/data/sqlite.db,修改前请备份。

Dashboard 会自动更新吗?

Agent 通常情况下会自动更新,但 Dashboard 并不会,需要手动更新。

- +
Skip to content

Dashboard 常见问题

为什么管理面板中显示的 IP 和 Agent 实际 IP 不一致?

首先解释管理面板中显示的IP是怎么得到的:Agent 会每隔一段时间请求一遍 IP-API,获取到 IP 信息后上报到 Dashboard,目前使用的 IP-API 可在此查看:myip.go
如您发现管理面板中显示的 IP 和服务商提供给您的 IP 不一致,最大的可能是服务商给您的是入口 IP,但 Agent 测试的是您的出口 IP。这个问题也可能会出现在多线服务器和 IPLC 专线中。

TIP

举个简单也十分常见的例子,服务商给您提供的是一台高防服务器,为了同时满足高防和低网络中断率的目标,提供给您的 IP 可能是经过映射后的高防 IP 而并非您服务器的真实出口 IP。

您也可以在 Agent 服务器中运行以下命令测试出口 IP:

shell
curl https://ipapi.co/ip/
+curl ip.sb
+curl ip-api.com

忘记查看密码\删除查看密码

请查看或编辑 /opt/nezha/dashboard/data/config.yaml 文件。
密码位于 site-viewpassword 项中。

面板安装/重启/更新失败: iptables ......

首先尝试重启 Docker 再操作:

shell
systemctl status docker
+systemctl restart docker
+systemctl status docker

重启后尝试重新安装面板。
若依然出现 iptables... 等错误,则考虑直接关闭 iptables 甚至移除 iptables。
这个问题也可能与内核有关,也可以尝试更换官方内核。

面板重启失败:Invalid hostPort: nz_site_port 等

如出现此问题,可以通过安装脚本修改配置,或者直接修改 /opt/nezha/dashboard/docker-compose.yaml 文件。

面板布局错误、CSS 资源无法被加载

如果出现 Dashboard 页面布局错误,通常是 CSS 文件丢失或无法被加载。
出现此类错误,可以先尝试 重启并更新面板
如果更新面板后问题没有得到解决,那么可能是你的 vhost 配置文件内有不适用的配置,你可以编辑 Nginx 的 vhost 文件或在宝塔面板内:

  1. 网站 中找到安装 Dashboard 时配置的站点,点击右侧 设置

  2. 选择 配置文件,删除配置文件中的:

    nginx
    location ~ .*\.(js|css)?$
    +    {
    +        expires      12h;
    +        error_log /dev/null;
    +        access_log /dev/null;
    +    }
  3. 保存配置,并清空浏览器、Nginx、CDN 中的缓存,此时刷新页面应恢复正常。

面板无法启动:panic: 无法找到配置的 DDNS 提供者...

填入的 DDNS provider 的值有误,目前仅支持 webhookcloudflaretencentclouddummy

面板更新 DDNS 崩溃:panic: interface conversion: interface {} is nil, not []interface {}

填入的 DDNS AccessIDAccessSecret 有误。

打开网络监控页显示:server monitor history not found

出现此错误说明没有在服务页中设置 TCP-Ping 和 ICMP-Ping 类型的监控或者监控数据还未生成。
如已经设置完毕,可以等待一段时间后再查看。

启用 HTTPS 后 /terminal 或 /ws 不能正常连接

常常是由于证书不完整造成的,请在 agent 运行参数中添加 -d,若 log 中有 x509:certificate signed by unknown authority,更换完整证书则可解决该问题。

对面板提供的数据修改/增加功能不满意,想要修改/增加数据

常见于批量新建 Agent 等需求中,可以直接修改数据库。
请注意,数据库中并非什么都可以修改,错误的修改会导致数据混乱无法启动 Dashboard,请勿随意修改数据库!

DANGER

再重复一遍,请勿随意修改数据库!

如需要在数据库中修改数据,请先停止面板容器再修改。
数据库类型是 sqlite3,位于 /opt/nezha/dashboard/data/sqlite.db,修改前请备份。

Dashboard 会自动更新吗?

Agent 通常情况下会自动更新,但 Dashboard 并不会,需要手动更新。

+ \ No newline at end of file diff --git a/guide/loginq.html b/guide/loginq.html index f616f06f..bfd7090c 100644 --- a/guide/loginq.html +++ b/guide/loginq.html @@ -5,21 +5,24 @@ 登录常见问题 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

登录常见问题

登录回调后页面卡住\拒绝连接\响应时间过长

还有其他一些表现形式,总之登录后浏览器无法正常显示。

  1. 您的服务器无法连接到 Github/Gitee,最常见于国内服务器配置 Github 情况下,可以考虑多尝试几次或者切换到 Cloudflare Access。
  2. 您配置错了回调地址,确保您的回调地址正确且端口与协议均正确!
  3. Dashboard 发生未知错误,您可以使用脚本查看日志。

TIP

什么是协议? 在浏览器中,您的域名以 :// 结尾的字符串即为协议,通常为 httphttps 两种。由于正常部署情况下面板可能有多种协议+域名+端口组合均可访问,请务必选一个最合适的作为回调。

如何检查我的回调地址是否错误?

请确保登录前浏览器显示的协议+域名+端口和登录后跳转到的协议+域名+端口一致。
请确保您的路径为 /oauth2/callback全部小写

登录后面板报错

  1. 清理 cookies 后重新登录,或换个浏览器。
  2. 检查回调地址,确保您的回调地址正确且端口与协议均正确!发起请求的地址需要和回调地址处于同域,端口、协议和域名(或IP)都需要一致。

lookup xxx

容器 DNS 解析失败,多数情况下为修改了 iptables 相关配置。
建议先重启 docker,sudo systemctl restart docker,再使用脚本重启面板。
仍然出现 lookup 错误建议查看是否有其他控制 iptables 的工具,如宝塔防火墙等。
这个问题也可能与内核有关系,请尝试更换官方内核。

授权方式无效,或者登录回调地址无效、过期或已被撤销

只出现在 Gitee 登录方式中,原因不明,建议更换到 GitHub。

oauth2: server response missing access_token

可能由多种因素引起,最大可能性是网络问题,建议检查网络后重试。
无法解决的话建议更换 Github 等。

该用户不是本站点管理员,无法登录

您登陆错了账号或者配置错了用户名,注意用户名不是邮箱,可使用脚本修改。
Cloudflare Access 用户请注意,您的用户名不是邮箱,而是 User ID。

dial tcp xxx:443 i/o timeout

网络问题,可先重启 Docker,sudo systemctl restart docker,再使用脚本重启面板。
如为国内服务器配置 Github 登陆方式,则建议切换到 Cloudflare Access 以避免网络干扰。

net/http: TLS handshake timeout

同上。

- +
Skip to content

登录常见问题

登录回调后页面卡住\拒绝连接\响应时间过长

还有其他一些表现形式,总之登录后浏览器无法正常显示。

  1. 您的服务器无法连接到 Github/Gitee,最常见于国内服务器配置 Github 情况下,可以考虑多尝试几次或者切换到 Cloudflare Access。
  2. 您配置错了回调地址,确保您的回调地址正确且端口与协议均正确!
  3. Dashboard 发生未知错误,您可以使用脚本查看日志。

TIP

什么是协议? 在浏览器中,您的域名以 :// 结尾的字符串即为协议,通常为 httphttps 两种。由于正常部署情况下面板可能有多种协议+域名+端口组合均可访问,请务必选一个最合适的作为回调。

如何检查我的回调地址是否错误?

请确保登录前浏览器显示的协议+域名+端口和登录后跳转到的协议+域名+端口一致。
请确保您的路径为 /oauth2/callback全部小写

登录后面板报错

  1. 清理 cookies 后重新登录,或换个浏览器。
  2. 检查回调地址,确保您的回调地址正确且端口与协议均正确!发起请求的地址需要和回调地址处于同域,端口、协议和域名(或IP)都需要一致。

lookup xxx

容器 DNS 解析失败,多数情况下为修改了 iptables 相关配置。
建议先重启 docker,sudo systemctl restart docker,再使用脚本重启面板。
仍然出现 lookup 错误建议查看是否有其他控制 iptables 的工具,如宝塔防火墙等。
这个问题也可能与内核有关系,请尝试更换官方内核。

授权方式无效,或者登录回调地址无效、过期或已被撤销

只出现在 Gitee 登录方式中,原因不明,建议更换到 GitHub。

oauth2: server response missing access_token

可能由多种因素引起,最大可能性是网络问题,建议检查网络后重试。
无法解决的话建议更换 Github 等。

该用户不是本站点管理员,无法登录

您登陆错了账号或者配置错了用户名,注意用户名不是邮箱,可使用脚本修改。
Cloudflare Access 用户请注意,您的用户名不是邮箱,而是 User ID。

dial tcp xxx:443 i/o timeout

网络问题,可先重启 Docker,sudo systemctl restart docker,再使用脚本重启面板。
如为国内服务器配置 Github 登陆方式,则建议切换到 Cloudflare Access 以避免网络干扰。

net/http: TLS handshake timeout

同上。

+ \ No newline at end of file diff --git a/guide/notifications.html b/guide/notifications.html index 555fdf38..d7a255b3 100644 --- a/guide/notifications.html +++ b/guide/notifications.html @@ -5,48 +5,51 @@ 通知设置 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

通知设置

哪吒监控支持对服务器的负载、CPU、内存、硬盘、流量、月流量、进程数、连接数进行监控,并在达到用户设定的阈值时发送告警通知。

灵活的通知方式

  • 在面板消息中,占位符 #DATETIME# 代表事件发生的时间戳。当通知被触发时,面板会自动将 #DATETIME# 替换为事件的实际时间。
  • #NEZHA# 是面板消息占位符,面板触发通知时会自动用实际消息替换占位符。
  • Body 内容是 JSON 格式的:当请求类型为 FORM 时,值为 key:value 的形式,value 里面可放置占位符,通知时会自动替换。当请求类型为 JSON 时 只会简单进行字符串替换后直接提交到 URL
  • URL 里面也可放置占位符,请求时会进行简单的字符串替换。

请参考以下的通知方式示例,也可以根据自己的需求灵活设置推送方式。

Bark 示例

点击展开/收起
  • 名称:Bark

  • URL 组成: /:key/:body or /:key/:title/:body or /:key/:category/:title/:body

  • 请求方式: GET

  • 请求类型: 默认

  • Body: 空

  • 名称:Bark

  • URL 组成: /push

  • 请求方式: POST

  • 请求类型: form

  • Body: {"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":"https://xxxxxxxx/nz.png"}

Slack 示例 贡献者:@白歌

点击展开/收起

URL 参数获取说明

请提前准备好 Slack 的 Workspace 并为这个 Workspace 创建一个 App。如果你还没有创建,可以在 Slack API 创建一个 App。

创建完成 App 后,需要为这个 App 添加一个 Incoming Webhook。在 App 的设置页面中找到 Incoming Webhooks,将 Activate Incoming Webhooks 勾选为 ON,在页面下方找到并点击 Add New Webhook to Workspace,选择一个 Channel,然后点击允许。完成创建后,你会得到一个 Webhook URL,使用这个 URL 替换下方的示例 URL。

Server 酱示例

点击展开/收起

Server 酱进阶

  • 名称:Server 酱

  • URL:https://sc.ftqq.com/SCUrandomkeys.send

  • 请求方式: POST

  • 请求类型: FORM

  • Body:

    json
    {
    -  "title": "#SERVER.NAME#",
    -  "desp": "**#NEZHA#\n\n平均负载: \"#SERVER.LOAD1#\",\"#SERVER.LOAD5#\",\"#SERVER.LOAD15#\"\n\n## [点击访问面板](https://你的面板域名)\n\n![logo](https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg)"
    -}

    展示

Telegram 示例 贡献者:@白歌

点击展开/收起

URL 参数获取说明

请提前在 Telegram 中创建一个机器人,获取到机器人的 token 和你的 Telegram 用户 ID。

机器人的 token 和用户 ID 都是数字和字母的组合,可以在 Telegram 中与 @userinfobot 对话获取自己的用户 ID。与 @BotFather 对话,输入命令 /newbot 创建一个机器人,创建完成后可以获得机器人的 token。

得到的 token 和用户 ID 都是字符串,可以直接拼接到 URL 中,如下所示,将其中的 botXXXXXX 替换为你的机器人 token,将 YYYYYY 替换为你的用户 ID。注意,你需要先与机器人对话,否则机器人无法发送消息给你。

wxpusher 示例

需要提前关注你的应用

点击展开/收起

邮件通知示例 - SendCloud 贡献者:@白歌

点击展开/收起

注意:SendCloud 有每日免费发送邮件限额限制,这里仅作示例,你可以选择付费服务或其他类似的免费服务,使用方法类似。

URL 参数获取说明

该示例使用 SendCloud 作为发信服务,需提前在 SendCloud 注册账号,创建发件邮箱,然后在这里获取 APIUSER 和 APIKEY。

替换示例 URL 中的 <替换APIUSER><替换APIKEY> 为自己的 APIUSER 和 APIKEY,替换 URL 中的 <自定义发件邮箱><自定义收件邮箱> 为任意的的发件邮箱和收件邮箱。

  • 名称:邮件告警
  • URL:https://api.sendcloud.net/apiv2/mail/send?apiUser=<替换APIUSER>&apiKey=<替换APIKEY>&from=<自定义发件邮箱>&fromName=Nezha&to=<自定义收件邮箱>&subject=Nezha-Notification&html=#NEZHA#
  • 请求方式: POST
  • 请求类型: JSON
  • Header: 留空
  • Body: 留空

钉钉群机器人配置 示例

点击展开/收起

URL 参数获取说明

请提前在钉钉中创建一个机器人,获取到机器人的 token。

机器人 URL 在钉钉群 - 管理机器人 - 创建机器人后获取,安全方式选择自定义关键词,Body 中 content 值内需包含该关键词。

企业微信群机器人 示例 贡献者:@ChowRex

点击展开/收起

支持的占位符一览

json
{
-    "content": "#NEZHA#",
-    "ServerName": "#SERVER.NAME#",
-    "ServerIP": "#SERVER.IP#",
-    "ServerIPV4": "#SERVER.IPV4#",
-    "ServerIPV6": "#SERVER.IPV6#",
-    "CPU": "#SERVER.CPU#",
-    "MEM": "#SERVER.MEM#",
-    "SWAP": "#SERVER.SWAP#",
-    "DISK": "#SERVER.DISK#",
-    "NetInSpeed": "#SERVER.NETINSPEED#",
-    "NetOutSpeed": "#SERVER.NETOUTSPEED#",
-    "TransferIn": "#SERVER.TRANSFERIN#",
-    "TranferOut": "#SERVER.TRANSFEROUT#",
-    "Load1": "#SERVER.LOAD1#",
-    "Load5": "#SERVER.LOAD5#",
-    "Load15": "#SERVER.LOAD15#",
-    "TCP_CONN_COUNT": "#SERVER.TCPCONNCOUNT",  # 无效
-    "UDP_CONN_COUNT": "#SERVER.UDPCONNCOUNT",  # 无效
-}

群机器人配置说明 - 文档 - 企业微信开发者中心

  • 名称:企业微信群机器人
  • URL:https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY
  • 请求方式: POST
  • 请求类型: JSON
  • Body:
    json
    {
    -    "msgtype": "markdown",
    -    "markdown": {
    -        "content": "# 哪吒通知消息\n\n\"#NEZHA#\"\n\n> 名称: \"#SERVER.NAME#\"\n> IP: \"#SERVER.IP#\"\n> IPv4: \"#SERVER.IPV4#\"\n> IPv6: \"#SERVER.IPV6#\"\n> CPU: \"#SERVER.CPU#\"\n> 内存: \"#SERVER.MEM#\"\n> 交换分区: \"#SERVER.SWAP#\"\n> 存储: \"#SERVER.DISK#\"\n> 实时上传速度: \"#SERVER.NETINSPEED#\"\n> 实时下载速度: \"#SERVER.NETOUTSPEED#\"\n> 总上传: \"#SERVER.TRANSFERIN#\"\n> 总下载: \"#SERVER.TRANSFEROUT#\"\n> 1分钟内负载: \"#SERVER.LOAD1#\"\n> 5分钟内负载: \"#SERVER.LOAD5#\"\n> 15分钟内负载: \"#SERVER.LOAD15#\"\n> TCP连接数: \"#SERVER.TCPCONNCOUNT\"\n> UDP连接数: \"#SERVER.UDPCONNCOUNT\"\n\n"
    -    }
    -}

根据需求删减相关内容信息即可。

通知效果

飞书群机器人配置 示例 贡献者:@eya46

点击展开/收起

URL 参数获取说明

机器人 URL 通过飞书群 - 群机器人 - 添加机器人 - 自定义机器人(webhook)创建后获取。

告警规则说明

基本规则

  • type:可选取一个或多个类型,如在一个规则中选择了多个类型,需要同时满足所有选择的类型才会触发通知(可参考后面的示例)
    • cpumemoryswapdisk
    • net_in_speed 入站网速、net_out_speed 出站网速、net_all_speed 双向网速、transfer_in 入站流量、transfer_out 出站流量、transfer_all 双向流量
    • offline 离线监控
    • load1load5load15 负载
    • process_count 进程数(目前取线程数占用资源太多,暂时不支持)
    • tcp_conn_countudp_conn_count 连接数
  • duration:持续数秒,数秒内采样记录 30% 以上触发阈值才会告警(防数据插针)
  • minmax
    • 流量、网速类单位为字节(1KB=1024B,1MB=1024*1024B)
    • 内存、硬盘、CPU 以占用百分比计数
    • 离线监控无需设置此项
  • cover
    • 0 监控所有服务器,通过 ignore 忽略特定服务器
    • 1 忽略所有服务器,通过 ignore 监控特定服务器
      例如:[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
  • ignore:选择忽略特定服务器,搭配 cover 使用,内容为服务器 ID 和布尔值,例如:{"1": true, "2": false}

完整示例:

添加一个离线告警:

  • 名称:离线通知
  • 规则:[{"Type":"offline","Duration":10}]
  • 启用:√

添加一个监控 CPU 持续 10 秒超过 50% 内存持续 20 秒占用低于 20% 的告警:

  • 名称:CPU+内存
  • 规则:[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
  • 启用:√

将特定的服务器通知发送到特定的通知分组:

示例场景:
有 1、2、3、4 四台服务器和 A、B 两个不同的通知组。
1、2 这两台服务器掉线十分钟后给通知组 A 发送通知。
3、4 这两台服务器掉线十分钟后给通知组 B 发送通知。

首先你需要先设置好 A、B 两个通知组,然后添加两条告警规则:

规则一:

  • 名称:1、2 离线,发送给通知组 A
  • 规则:[{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]
  • 通知方式组:A
  • 启用:√

规则二:

  • 名称:3、4 离线,发送给通知组 B
  • 规则:[{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]
  • 通知方式组:B
  • 启用:√

灵活使用参数可以让你的告警功能被充分使用

特殊:任意周期流量告警

可以用作月流量监控

  • type
    • transfer_in_cycle 周期内的入站流量
    • transfer_out_cycle 周期内的出站流量
    • transfer_all_cycle 周期内双向流量的和
  • cycle_start:统计周期开始日期(可以是你机器计费周期的开始日期),时间格式为 RFC3339,例如北京时间为 2022-01-11T08:00:00.00+08:00
  • cycle_interval:统计周期单位的数量(例如,周期单位为天,该值为 7,则代表每隔 7 天统计一次)
  • cycle_unit:统计周期单位,默认 hour,可选(hour, day, week, month, year
  • min/maxcoverignore 参考基本规则配置

示例:

ID 为 3 和 4 的服务器(ignore 里面定义),以每月 1 号为统计周期,周期内统计的出站月流量达到 1TB 时告警:

json
[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]

通知触发模式

  • 始终触发:每当 Agent 上报的状态符合告警的规则时,都会触发一次通知。
  • 单次触发:仅状态改变时触发一次通知,如从正常状态改变为异常状态,或异常状态恢复为正常状态。

设置告警时执行任务

如果需要在发出告警消息的同时执行某项任务,可以设置此项目。

  • 告警时触发任务:当告警状态符合从“正常”变更为“事件”时,所要执行的任务,任务应提前在任务页设置。
  • 恢复时触发任务:当告警状态符合从“事件”恢复为“正常”时,所要执行的任务,任务应提前在任务页设置。
- +
Skip to content

通知设置

哪吒监控支持对服务器的负载、CPU、内存、硬盘、流量、月流量、进程数、连接数进行监控,并在达到用户设定的阈值时发送告警通知。

灵活的通知方式

  • 在面板消息中,占位符 #DATETIME# 代表事件发生的时间戳。当通知被触发时,面板会自动将 #DATETIME# 替换为事件的实际时间。
  • #NEZHA# 是面板消息占位符,面板触发通知时会自动用实际消息替换占位符。
  • Body 内容是 JSON 格式的:当请求类型为 FORM 时,值为 key:value 的形式,value 里面可放置占位符,通知时会自动替换。当请求类型为 JSON 时 只会简单进行字符串替换后直接提交到 URL
  • URL 里面也可放置占位符,请求时会进行简单的字符串替换。

请参考以下的通知方式示例,也可以根据自己的需求灵活设置推送方式。

Bark 示例

点击展开/收起
  • 名称:Bark

  • URL 组成: /:key/:body or /:key/:title/:body or /:key/:category/:title/:body

  • 请求方式: GET

  • 请求类型: 默认

  • Body: 空

  • 名称:Bark

  • URL 组成: /push

  • 请求方式: POST

  • 请求类型: form

  • Body: {"title": "#SERVER.NAME#","device_key":"xxxxxxxxx","body":"#NEZHA#","icon":"https://xxxxxxxx/nz.png"}

Slack 示例 贡献者:@白歌

点击展开/收起

URL 参数获取说明

请提前准备好 Slack 的 Workspace 并为这个 Workspace 创建一个 App。如果你还没有创建,可以在 Slack API 创建一个 App。

创建完成 App 后,需要为这个 App 添加一个 Incoming Webhook。在 App 的设置页面中找到 Incoming Webhooks,将 Activate Incoming Webhooks 勾选为 ON,在页面下方找到并点击 Add New Webhook to Workspace,选择一个 Channel,然后点击允许。完成创建后,你会得到一个 Webhook URL,使用这个 URL 替换下方的示例 URL。

Server 酱示例

点击展开/收起

Server 酱进阶

  • 名称:Server 酱

  • URL:https://sc.ftqq.com/SCUrandomkeys.send

  • 请求方式: POST

  • 请求类型: FORM

  • Body:

    json
    {
    +  "title": "#SERVER.NAME#",
    +  "desp": "**#NEZHA#\n\n平均负载: \"#SERVER.LOAD1#\",\"#SERVER.LOAD5#\",\"#SERVER.LOAD15#\"\n\n## [点击访问面板](https://你的面板域名)\n\n![logo](https://raw.githubusercontent.com/naiba/nezha/master/resource/static/brand.svg)"
    +}

    展示

Telegram 示例 贡献者:@白歌

点击展开/收起

URL 参数获取说明

请提前在 Telegram 中创建一个机器人,获取到机器人的 token 和你的 Telegram 用户 ID。

机器人的 token 和用户 ID 都是数字和字母的组合,可以在 Telegram 中与 @userinfobot 对话获取自己的用户 ID。与 @BotFather 对话,输入命令 /newbot 创建一个机器人,创建完成后可以获得机器人的 token。

得到的 token 和用户 ID 都是字符串,可以直接拼接到 URL 中,如下所示,将其中的 botXXXXXX 替换为你的机器人 token,将 YYYYYY 替换为你的用户 ID。注意,你需要先与机器人对话,否则机器人无法发送消息给你。

wxpusher 示例

需要提前关注你的应用

点击展开/收起

邮件通知示例 - SendCloud 贡献者:@白歌

点击展开/收起

注意:SendCloud 有每日免费发送邮件限额限制,这里仅作示例,你可以选择付费服务或其他类似的免费服务,使用方法类似。

URL 参数获取说明

该示例使用 SendCloud 作为发信服务,需提前在 SendCloud 注册账号,创建发件邮箱,然后在这里获取 APIUSER 和 APIKEY。

替换示例 URL 中的 <替换APIUSER><替换APIKEY> 为自己的 APIUSER 和 APIKEY,替换 URL 中的 <自定义发件邮箱><自定义收件邮箱> 为任意的的发件邮箱和收件邮箱。

  • 名称:邮件告警
  • URL:https://api.sendcloud.net/apiv2/mail/send?apiUser=<替换APIUSER>&apiKey=<替换APIKEY>&from=<自定义发件邮箱>&fromName=Nezha&to=<自定义收件邮箱>&subject=Nezha-Notification&html=#NEZHA#
  • 请求方式: POST
  • 请求类型: JSON
  • Header: 留空
  • Body: 留空

钉钉群机器人配置 示例

点击展开/收起

URL 参数获取说明

请提前在钉钉中创建一个机器人,获取到机器人的 token。

机器人 URL 在钉钉群 - 管理机器人 - 创建机器人后获取,安全方式选择自定义关键词,Body 中 content 值内需包含该关键词。

企业微信群机器人 示例 贡献者:@ChowRex

点击展开/收起

支持的占位符一览

json
{
+    "content": "#NEZHA#",
+    "ServerName": "#SERVER.NAME#",
+    "ServerIP": "#SERVER.IP#",
+    "ServerIPV4": "#SERVER.IPV4#",
+    "ServerIPV6": "#SERVER.IPV6#",
+    "CPU": "#SERVER.CPU#",
+    "MEM": "#SERVER.MEM#",
+    "SWAP": "#SERVER.SWAP#",
+    "DISK": "#SERVER.DISK#",
+    "NetInSpeed": "#SERVER.NETINSPEED#",
+    "NetOutSpeed": "#SERVER.NETOUTSPEED#",
+    "TransferIn": "#SERVER.TRANSFERIN#",
+    "TranferOut": "#SERVER.TRANSFEROUT#",
+    "Load1": "#SERVER.LOAD1#",
+    "Load5": "#SERVER.LOAD5#",
+    "Load15": "#SERVER.LOAD15#",
+    "TCP_CONN_COUNT": "#SERVER.TCPCONNCOUNT",  # 无效
+    "UDP_CONN_COUNT": "#SERVER.UDPCONNCOUNT",  # 无效
+}

群机器人配置说明 - 文档 - 企业微信开发者中心

  • 名称:企业微信群机器人
  • URL:https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_BOT_KEY
  • 请求方式: POST
  • 请求类型: JSON
  • Body:
    json
    {
    +    "msgtype": "markdown",
    +    "markdown": {
    +        "content": "# 哪吒通知消息\n\n\"#NEZHA#\"\n\n> 名称: \"#SERVER.NAME#\"\n> IP: \"#SERVER.IP#\"\n> IPv4: \"#SERVER.IPV4#\"\n> IPv6: \"#SERVER.IPV6#\"\n> CPU: \"#SERVER.CPU#\"\n> 内存: \"#SERVER.MEM#\"\n> 交换分区: \"#SERVER.SWAP#\"\n> 存储: \"#SERVER.DISK#\"\n> 实时上传速度: \"#SERVER.NETINSPEED#\"\n> 实时下载速度: \"#SERVER.NETOUTSPEED#\"\n> 总上传: \"#SERVER.TRANSFERIN#\"\n> 总下载: \"#SERVER.TRANSFEROUT#\"\n> 1分钟内负载: \"#SERVER.LOAD1#\"\n> 5分钟内负载: \"#SERVER.LOAD5#\"\n> 15分钟内负载: \"#SERVER.LOAD15#\"\n> TCP连接数: \"#SERVER.TCPCONNCOUNT\"\n> UDP连接数: \"#SERVER.UDPCONNCOUNT\"\n\n"
    +    }
    +}

根据需求删减相关内容信息即可。

通知效果

飞书群机器人配置 示例 贡献者:@eya46

点击展开/收起

URL 参数获取说明

机器人 URL 通过飞书群 - 群机器人 - 添加机器人 - 自定义机器人(webhook)创建后获取。

告警规则说明

基本规则

  • type:可选取一个或多个类型,如在一个规则中选择了多个类型,需要同时满足所有选择的类型才会触发通知(可参考后面的示例)
    • cpumemoryswapdisk
    • net_in_speed 入站网速、net_out_speed 出站网速、net_all_speed 双向网速、transfer_in 入站流量、transfer_out 出站流量、transfer_all 双向流量
    • offline 离线监控
    • load1load5load15 负载
    • process_count 进程数(目前取线程数占用资源太多,暂时不支持)
    • tcp_conn_countudp_conn_count 连接数
  • duration:持续数秒,数秒内采样记录 30% 以上触发阈值才会告警(防数据插针)
  • minmax
    • 流量、网速类单位为字节(1KB=1024B,1MB=1024*1024B)
    • 内存、硬盘、CPU 以占用百分比计数
    • 离线监控无需设置此项
  • cover
    • 0 监控所有服务器,通过 ignore 忽略特定服务器
    • 1 忽略所有服务器,通过 ignore 监控特定服务器
      例如:[{"type":"offline","duration":10, "cover":0, "ignore":{"5": true}}]
  • ignore:选择忽略特定服务器,搭配 cover 使用,内容为服务器 ID 和布尔值,例如:{"1": true, "2": false}

完整示例:

添加一个离线告警:

  • 名称:离线通知
  • 规则:[{"Type":"offline","Duration":10}]
  • 启用:√

添加一个监控 CPU 持续 10 秒超过 50% 内存持续 20 秒占用低于 20% 的告警:

  • 名称:CPU+内存
  • 规则:[{"Type":"cpu","Min":0,"Max":50,"Duration":10},{"Type":"memory","Min":20,"Max":0,"Duration":20}]
  • 启用:√

将特定的服务器通知发送到特定的通知分组:

示例场景:
有 1、2、3、4 四台服务器和 A、B 两个不同的通知组。
1、2 这两台服务器掉线十分钟后给通知组 A 发送通知。
3、4 这两台服务器掉线十分钟后给通知组 B 发送通知。

首先你需要先设置好 A、B 两个通知组,然后添加两条告警规则:

规则一:

  • 名称:1、2 离线,发送给通知组 A
  • 规则:[{"type":"offline","duration":600,"cover":1,"ignore":{"1":true,"2":true}}]
  • 通知方式组:A
  • 启用:√

规则二:

  • 名称:3、4 离线,发送给通知组 B
  • 规则:[{"type":"offline","duration":600,"cover":1,"ignore":{"3":true,"4":true}}]
  • 通知方式组:B
  • 启用:√

灵活使用参数可以让你的告警功能被充分使用

特殊:任意周期流量告警

可以用作月流量监控

  • type
    • transfer_in_cycle 周期内的入站流量
    • transfer_out_cycle 周期内的出站流量
    • transfer_all_cycle 周期内双向流量的和
  • cycle_start:统计周期开始日期(可以是你机器计费周期的开始日期),时间格式为 RFC3339,例如北京时间为 2022-01-11T08:00:00.00+08:00
  • cycle_interval:统计周期单位的数量(例如,周期单位为天,该值为 7,则代表每隔 7 天统计一次)
  • cycle_unit:统计周期单位,默认 hour,可选(hour, day, week, month, year
  • min/maxcoverignore 参考基本规则配置

示例:

ID 为 3 和 4 的服务器(ignore 里面定义),以每月 1 号为统计周期,周期内统计的出站月流量达到 1TB 时告警:

json
[{"type":"transfer_out_cycle","max":1099511627776,"cycle_start":"2022-01-01T00:00:00+08:00","cycle_interval":1,"cycle_unit":"month","cover":1,"ignore":{"3":true,"4":true}}]

通知触发模式

  • 始终触发:每当 Agent 上报的状态符合告警的规则时,都会触发一次通知。
  • 单次触发:仅状态改变时触发一次通知,如从正常状态改变为异常状态,或异常状态恢复为正常状态。

设置告警时执行任务

如果需要在发出告警消息的同时执行某项任务,可以设置此项目。

  • 告警时触发任务:当告警状态符合从“正常”变更为“事件”时,所要执行的任务,任务应提前在任务页设置。
  • 恢复时触发任务:当告警状态符合从“事件”恢复为“正常”时,所要执行的任务,任务应提前在任务页设置。
+ \ No newline at end of file diff --git a/guide/q1.html b/guide/q1.html index 25e277ee..1662668d 100644 --- a/guide/q1.html +++ b/guide/q1.html @@ -5,66 +5,69 @@ 反向代理 Telegram Bot API | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

反向代理 Telegram Bot API

如果你的 Dashboard 服务器无法访问 Telegram Bot API,但你依然想使用 Telegram 来推送通知,你可以尝试使用反向代理的方式解决这个问题。

准备工作

这里介绍使用你自己的服务器进行反代的方法。你也可以选择使用 Cloudflare 的 Workers 进行反代,但可能对于中国大陆的用户来说网络连通性依然不佳。

要搭建一个 Telegram Bot API 反代,你需要准备以下内容:

  1. 一个可以连接 Telegram Bot API 服务器(并安装好 Nginx)。
  2. 一个域名(提前申请 SSL 证书)。

NGINX 配置

编辑 Nginx 配置文件,在 http{} 中添加如下配置:

nginx
# HTTP 强制跳转到 HTTPS
-server {
-    listen 80;
-    listen [::]:80;
-    server_name <yourDomainName>;
+    
Skip to content

反向代理 Telegram Bot API

如果你的 Dashboard 服务器无法访问 Telegram Bot API,但你依然想使用 Telegram 来推送通知,你可以尝试使用反向代理的方式解决这个问题。

准备工作

这里介绍使用你自己的服务器进行反代的方法。你也可以选择使用 Cloudflare 的 Workers 进行反代,但可能对于中国大陆的用户来说网络连通性依然不佳。

要搭建一个 Telegram Bot API 反代,你需要准备以下内容:

  1. 一个可以连接 Telegram Bot API 服务器(并安装好 Nginx)。
  2. 一个域名(提前申请 SSL 证书)。

NGINX 配置

编辑 Nginx 配置文件,在 http{} 中添加如下配置:

nginx
# HTTP 强制跳转到 HTTPS
+server {
+    listen 80;
+    listen [::]:80;
+    server_name <yourDomainName>;
 
-    # 强制 HTTPS
-    return 301 https://$server_name$request_uri;
-}
+    # 强制 HTTPS
+    return 301 https://$server_name$request_uri;
+}
 
-# HTTPS 配置
-server {
-    listen 443 ssl;
-    listen [::]:443 ssl;
-    server_name <yourDomainName>;
+# HTTPS 配置
+server {
+    listen 443 ssl;
+    listen [::]:443 ssl;
+    server_name <yourDomainName>;
 
-    # SSL 证书路径
-    ssl_certificate </path/to/your/server.pem>;
-    ssl_certificate_key </path/to/your/server.key>;
+    # SSL 证书路径
+    ssl_certificate </path/to/your/server.pem>;
+    ssl_certificate_key </path/to/your/server.key>;
 
-    # Root 非必要
-    root /var/www/tgbot/;
+    # Root 非必要
+    root /var/www/tgbot/;
 
-    # 必须配置 DNS,否则会报 502 错误
-    resolver 8.8.8.8;
+    # 必须配置 DNS,否则会报 502 错误
+    resolver 8.8.8.8;
 
-    # 以 /bot 开头的请求会被正则匹配
-    location ~* ^/bot {
-        proxy_buffering off;
-        proxy_pass  https://api.telegram.org$request_uri;
-        proxy_http_version 1.1;
-    }
+    # 以 /bot 开头的请求会被正则匹配
+    location ~* ^/bot {
+        proxy_buffering off;
+        proxy_pass  https://api.telegram.org$request_uri;
+        proxy_http_version 1.1;
+    }
 
-    # Root 非必要,主要用于确认服务器状态。也可以改为 return 403
-    location / {
-        try_files $uri $uri /index.html;
-    }
+    # Root 非必要,主要用于确认服务器状态。也可以改为 return 403
+    location / {
+        try_files $uri $uri /index.html;
+    }
 
-    # 错误日志
-    error_log /var/log/tg.log error;
-}
  • yourDomainName:你准备的域名
  • ssl_certificate:SSL 证书路径
  • ssl_certificate_key:SSL 证书路径

使用方式

执行 systemctl restart nginx 重启 Nginx。然后在 Nezha 中将原来的 https://api.telegram.org/ 替换为 https://<yourDomainName>/,即可正常推送消息。

防止盗用

配置防火墙以防止他人盗用你的反代服务:

  • serverIp:Agent 的 IP 地址。根据你的系统选择适用的命令,ufwiptables 均可。
bash
# Ubuntu
-ufw allow proto tcp from <serverIp> to any port 443
+    # 错误日志
+    error_log /var/log/tg.log error;
+}
  • yourDomainName:你准备的域名
  • ssl_certificate:SSL 证书路径
  • ssl_certificate_key:SSL 证书路径

使用方式

执行 systemctl restart nginx 重启 Nginx。然后在 Nezha 中将原来的 https://api.telegram.org/ 替换为 https://<yourDomainName>/,即可正常推送消息。

防止盗用

配置防火墙以防止他人盗用你的反代服务:

  • serverIp:Agent 的 IP 地址。根据你的系统选择适用的命令,ufwiptables 均可。
bash
# Ubuntu
+ufw allow proto tcp from <serverIp> to any port 443
 
-# CentOS
-iptables -I INPUT -p tcp --dport 443 -j DROP
-iptables -I INPUT -s <serverIp> -p tcp --dport 443 -j ACCEPT

通过以上配置,可以有效防止未经授权的访问。

- +# CentOS +iptables -I INPUT -p tcp --dport 443 -j DROP +iptables -I INPUT -s <serverIp> -p tcp --dport 443 -j ACCEPT

通过以上配置,可以有效防止未经授权的访问。

+ \ No newline at end of file diff --git a/guide/q2.html b/guide/q2.html index 2296efd7..94bfd415 100644 --- a/guide/q2.html +++ b/guide/q2.html @@ -5,21 +5,24 @@ Agent 启动/上线 问题自检流程 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

Agent 启动/上线 问题自检流程

  1. 直接执行 /opt/nezha/agent/nezha-agent -s 面板IP或非CDN域名:面板RPC端口 -p Agent密钥 -d 查看日志是否是因为 DNS、网络不佳导致超时(timeout)
  2. nc -v 域名/IP 面板RPC端口 或者 telnet 域名/IP 面板RPC端口 来检验是否是网络问题,检查本机与面板服务器的出入站防火墙,如果无法判断问题可借助 https://port.ping.pe/ 提供的端口检查工具进行检测。
  3. 如果上面步骤检测正常,Agent 依然没有正常上线,请尝试关闭 SELinux,如何关闭 SELinux?
- +
Skip to content

Agent 启动/上线 问题自检流程

  1. 直接执行 /opt/nezha/agent/nezha-agent -s 面板IP或非CDN域名:面板RPC端口 -p Agent密钥 -d 查看日志是否是因为 DNS、网络不佳导致超时(timeout)
  2. nc -v 域名/IP 面板RPC端口 或者 telnet 域名/IP 面板RPC端口 来检验是否是网络问题,检查本机与面板服务器的出入站防火墙,如果无法判断问题可借助 https://port.ping.pe/ 提供的端口检查工具进行检测。
  3. 如果上面步骤检测正常,Agent 依然没有正常上线,请尝试关闭 SELinux,如何关闭 SELinux?
+ \ No newline at end of file diff --git a/guide/q3.html b/guide/q3.html index b492d97c..0fa03cf5 100644 --- a/guide/q3.html +++ b/guide/q3.html @@ -5,94 +5,97 @@ 反向代理 gRPC 端口(支持 Cloudflare CDN) | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

反向代理 gRPC 端口(支持 Cloudflare CDN)

使用 Nginx 或者 Caddy 反向代理 gRPC

  • Nginx 配置
nginx
server {
-    listen 443 ssl http2;
-    listen [::]:443 ssl http2;
-    server_name data.example.com; # 你的 Agent 连接 Dashboard 的域名
+    
Skip to content

反向代理 gRPC 端口(支持 Cloudflare CDN)

使用 Nginx 或者 Caddy 反向代理 gRPC

  • Nginx 配置
nginx
server {
+    listen 443 ssl http2;
+    listen [::]:443 ssl http2;
+    server_name data.example.com; # 你的 Agent 连接 Dashboard 的域名
 
-    ssl_certificate          /data/letsencrypt/fullchain.pem; # 你的域名证书路径
-    ssl_certificate_key      /data/letsencrypt/key.pem;       # 你的域名私钥路径
-    ssl_stapling on;
-    ssl_session_timeout 1d;
-    ssl_session_cache shared:SSL:10m; # 此项可能会和其他配置文件冲突,如冲突请注释此项
-    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
+    ssl_certificate          /data/letsencrypt/fullchain.pem; # 你的域名证书路径
+    ssl_certificate_key      /data/letsencrypt/key.pem;       # 你的域名私钥路径
+    ssl_stapling on;
+    ssl_session_timeout 1d;
+    ssl_session_cache shared:SSL:10m; # 此项可能会和其他配置文件冲突,如冲突请注释此项
+    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
 
-    underscores_in_headers on;
+    underscores_in_headers on;
 
-    keepalive_time 24h;
-    keepalive_requests 100000;
-    keepalive_timeout 120s;
+    keepalive_time 24h;
+    keepalive_requests 100000;
+    keepalive_timeout 120s;
 
-    location / {
-        grpc_read_timeout 300s;
-        grpc_send_timeout 300s;
-        grpc_socket_keepalive on;
-        grpc_pass grpc://grpcservers;
-    }
-}
+    location / {
+        grpc_read_timeout 300s;
+        grpc_send_timeout 300s;
+        grpc_socket_keepalive on;
+        grpc_pass grpc://grpcservers;
+    }
+}
 
-upstream grpcservers {
-    server localhost:5555;
-    keepalive 512;
-}
  • Caddy 配置
data.example.com:443 { # 你的 Agent 连接 Dashboard 的域名
-    reverse_proxy {
-        to localhost:5555
-        transport http {
-            versions h2c 2
-        }
-    }
-}

Dashboard 面板端配置

  • 首先登录面板进入管理后台 打开设置页面,在 未接入CDN的面板服务器域名/IP 中填入上一步在 Nginx 或 Caddy 中配置的域名 比如 data.example.com ,并保存。
  • 然后在面板服务器中,打开 /opt/nezha/dashboard/data/config.yaml 文件,将 proxygrpcport 修改为 Nginx 或 Caddy 监听的端口,比如上一步设置的 443 ;因为我们在 Nginx 或 Caddy 中开启了 SSL/TLS,所以需要将 tls 设置为 true ;修改完成后重启面板。

Agent 端配置

  • 登录面板管理后台,复制一键安装命令,在对应的服务器上面执行一键安装命令重新安装 agent 端即可。

开启 Cloudflare CDN(可选)

根据 Cloudflare gRPC 的要求:gRPC 服务必须侦听 443 端口 且必须支持 TLS 和 HTTP/2。 所以如果需要开启 CDN,必须在配置 Nginx 或者 Caddy 反向代理 gRPC 时使用 443 端口,并配置证书(Caddy 会自动申请并配置证书)。

  • 登录 Cloudflare,选择使用的域名。打开 网络 选项将 gRPC 开关打开,打开 DNS 选项,找到 Nginx 或 Caddy 反代 gRPC 配置的域名的解析记录,打开橙色云启用 CDN。

开启gRPC后,可能不能立即可用,需要等待一段时间。具体可通过curl和使用nezha-agent -d来验证:

bash
localhost:~/agent# curl -H "content-type: application/grpc+proto" -H "authorization: Bearer test" https://xxx.xxx.ovh -v 
-* processing: https://xxx.xxx.ovh
-*   Trying [2606:4700:3035::ac43:8bed]:443...
-* Connected to xxx.xxx.ovh (2606:4700:3035::ac43:8bed) port 443
-# ... SSL info
-* using HTTP/2
-* h2 [:method: GET]
-* h2 [:scheme: https]
-* h2 [:authority: xxx.xxx.ovh]
-* h2 [:path: /]
-* h2 [user-agent: curl/8.2.1]
-* h2 [accept: */*]
-* Using Stream ID: 1
-> GET / HTTP/2
-> Host: xxx.xxx.ovh
-> User-Agent: curl/8.4.0
-> Accept: */*
-> content-type: application/grpc+proto
-> authorization: Bearer test
-> 
-< HTTP/2 405 
-< date: Wed, 20 Dec 2023 08:56:27 GMT
-< content-type: application/grpc+proto
-< cf-ray: 8386ac12dabd5ddc-HKG
-< cf-cache-status: DYNAMIC
-< grpc-message: Received a HEADERS frame with :method "GET" which should be POST
-< grpc-status: 13
-< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=%2BTjgJvXWyRF11nUOYx9Lq7UDC1xOYBLtjvWrdjVJQIqu9YqnFJeZFran2KRs6zabQc%2BLV8AubNqYRYDb7hQAZe6bglmVz0wQjrb0tNovYf%2B59SAp%2BQfZnH%2BAFDydNT95ZCmTPnKgWetcwQiUfXU%3D"}],"group":"cf-nel","max_age":604800}
-< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
-< vary: Accept-Encoding
-< server: cloudflare
-< alt-svc: h3=":443"; ma=86400
-< 
-* Connection #0 to host xxx.xxx.ovh left intact
-localhost:~/agent# /opt/nezha/agent/nezha-agent -s nezha.xxx.xxx:443 -p YOUR_KEY --tls -d
-NEZHA@2023-12-20 05:14:00>> 检查更新: 0.15.14
-NEZHA@2023-12-20 05:14:01>> 上报系统信息失败: rpc error: code = Unknown desc = EOF # 需要修改主控端 /opt/nezha/dashboard/data/config.yaml的 GRPCHost 和 TLS 选项
-NEZHA@2023-12-20 05:14:01>> Error to close connection ...
- +upstream grpcservers { + server localhost:5555; + keepalive 512; +}

Dashboard 面板端配置

Agent 端配置

开启 Cloudflare CDN(可选)

根据 Cloudflare gRPC 的要求:gRPC 服务必须侦听 443 端口 且必须支持 TLS 和 HTTP/2。 所以如果需要开启 CDN,必须在配置 Nginx 或者 Caddy 反向代理 gRPC 时使用 443 端口,并配置证书(Caddy 会自动申请并配置证书)。

开启gRPC后,可能不能立即可用,需要等待一段时间。具体可通过curl和使用nezha-agent -d来验证:

bash
localhost:~/agent# curl -H "content-type: application/grpc+proto" -H "authorization: Bearer test" https://xxx.xxx.ovh -v 
+* processing: https://xxx.xxx.ovh
+*   Trying [2606:4700:3035::ac43:8bed]:443...
+* Connected to xxx.xxx.ovh (2606:4700:3035::ac43:8bed) port 443
+# ... SSL info
+* using HTTP/2
+* h2 [:method: GET]
+* h2 [:scheme: https]
+* h2 [:authority: xxx.xxx.ovh]
+* h2 [:path: /]
+* h2 [user-agent: curl/8.2.1]
+* h2 [accept: */*]
+* Using Stream ID: 1
+> GET / HTTP/2
+> Host: xxx.xxx.ovh
+> User-Agent: curl/8.4.0
+> Accept: */*
+> content-type: application/grpc+proto
+> authorization: Bearer test
+> 
+< HTTP/2 405 
+< date: Wed, 20 Dec 2023 08:56:27 GMT
+< content-type: application/grpc+proto
+< cf-ray: 8386ac12dabd5ddc-HKG
+< cf-cache-status: DYNAMIC
+< grpc-message: Received a HEADERS frame with :method "GET" which should be POST
+< grpc-status: 13
+< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=%2BTjgJvXWyRF11nUOYx9Lq7UDC1xOYBLtjvWrdjVJQIqu9YqnFJeZFran2KRs6zabQc%2BLV8AubNqYRYDb7hQAZe6bglmVz0wQjrb0tNovYf%2B59SAp%2BQfZnH%2BAFDydNT95ZCmTPnKgWetcwQiUfXU%3D"}],"group":"cf-nel","max_age":604800}
+< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
+< vary: Accept-Encoding
+< server: cloudflare
+< alt-svc: h3=":443"; ma=86400
+< 
+* Connection #0 to host xxx.xxx.ovh left intact
+localhost:~/agent# /opt/nezha/agent/nezha-agent -s nezha.xxx.xxx:443 -p YOUR_KEY --tls -d
+NEZHA@2023-12-20 05:14:00>> 检查更新: 0.15.14
+NEZHA@2023-12-20 05:14:01>> 上报系统信息失败: rpc error: code = Unknown desc = EOF # 需要修改主控端 /opt/nezha/dashboard/data/config.yaml的 GRPCHost 和 TLS 选项
+NEZHA@2023-12-20 05:14:01>> Error to close connection ...
+ \ No newline at end of file diff --git a/guide/q4.html b/guide/q4.html index 98ce9857..16e18f94 100644 --- a/guide/q4.html +++ b/guide/q4.html @@ -5,21 +5,24 @@ 实时通道断开/在线终端连接失败 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

实时通道断开/在线终端连接失败

  • 如果你使用了 CDN,请确认 CDN 服务商提供 WebSocket 服务,并且已开启 WebSocket。
  • 确认你的反代规则中针对 /ws, /terminal 路径的 WebSocket 进行了特别配置,你可以 点击这里 查看反向代理配置。
- +
Skip to content

实时通道断开/在线终端连接失败

  • 如果你使用了 CDN,请确认 CDN 服务商提供 WebSocket 服务,并且已开启 WebSocket。
  • 确认你的反代规则中针对 /ws, /terminal 路径的 WebSocket 进行了特别配置,你可以 点击这里 查看反向代理配置。
+ \ No newline at end of file diff --git a/guide/q5.html b/guide/q5.html index cc1fd8e7..876c53ae 100644 --- a/guide/q5.html +++ b/guide/q5.html @@ -5,21 +5,24 @@ 如何进行数据迁移、备份恢复? | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + - - + + \ No newline at end of file diff --git a/guide/q6.html b/guide/q6.html index 56d11391..3d7374f1 100644 --- a/guide/q6.html +++ b/guide/q6.html @@ -5,21 +5,24 @@ 如何每月重置流量统计? | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

如何每月重置流量统计?

主页中的流量统计每次服务器重启时都会重置,如果要实现每月重置一次流量计数,可以这样实现:

  1. 进入管理面板的 告警
  2. 参考这篇文档,创建一个月流量告警
  3. 返回主页,在 服务 页中就可以看到月流量统计了,这里的统计数据不会因为服务器重启而重置

TIP

此方式可以设置任何周期,包括且不限于每小时/每天/每周/每月/每年重置流量统计,非常灵活!

- +
Skip to content

如何每月重置流量统计?

主页中的流量统计每次服务器重启时都会重置,如果要实现每月重置一次流量计数,可以这样实现:

  1. 进入管理面板的 告警
  2. 参考这篇文档,创建一个月流量告警
  3. 返回主页,在 服务 页中就可以看到月流量统计了,这里的统计数据不会因为服务器重启而重置

TIP

此方式可以设置任何周期,包括且不限于每小时/每天/每周/每月/每年重置流量统计,非常灵活!

+ \ No newline at end of file diff --git a/guide/q7.html b/guide/q7.html index c7227854..24765fcf 100644 --- a/guide/q7.html +++ b/guide/q7.html @@ -5,21 +5,24 @@ 自定义 Agent 监控项目 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

自定义 Agent 监控项目

自定义监控的网卡和硬盘分区

执行以下命令来选择自定义的网卡和分区,然后重启 Agent 即可生效:

bash
/opt/nezha/agent/nezha-agent edit

其他运行参数

通过执行以下命令查看支持的参数:

bash
./nezha-agent --help

如果你使用了一键脚本安装 Agent,可以编辑 /etc/systemd/system/nezha-agent.service,在 ExecStart= 这一行的末尾加上以下参数:

  • --report-delay:控制系统信息上报的间隔,默认为 1 秒,可以设置为 3 来进一步降低 agent 端系统资源占用(配置区间 1-4)。
  • --skip-conn:不监控连接数,推荐在机场/连接密集型服务器或CPU占用较高的服务器上设置。
  • --skip-procs:不监控进程数,也可以降低 Agent 占用。
  • --disable-auto-update:禁止 自动更新 Agent(安全特性)。
  • --disable-force-update:禁止 强制更新 Agent(安全特性)。
  • --disable-command-execute:禁止在 Agent 上执行定时任务、打开在线终端(安全特性)。
  • --tls:启用 SSL/TLS 加密(使用 nginx 反向代理 Agent 的 grpc 连接,并且 nginx 开启 SSL/TLS 时,需要启用该项配置)。
- +
Skip to content

自定义 Agent 监控项目

自定义监控的网卡和硬盘分区

执行以下命令来选择自定义的网卡和分区,然后重启 Agent 即可生效:

bash
/opt/nezha/agent/nezha-agent edit

其他运行参数

通过执行以下命令查看支持的参数:

bash
./nezha-agent --help

如果你使用了一键脚本安装 Agent,可以编辑 /etc/systemd/system/nezha-agent.service,在 ExecStart= 这一行的末尾加上以下参数:

  • --report-delay:控制系统信息上报的间隔,默认为 1 秒,可以设置为 3 来进一步降低 agent 端系统资源占用(配置区间 1-4)。
  • --skip-conn:不监控连接数,推荐在机场/连接密集型服务器或CPU占用较高的服务器上设置。
  • --skip-procs:不监控进程数,也可以降低 Agent 占用。
  • --disable-auto-update:禁止 自动更新 Agent(安全特性)。
  • --disable-force-update:禁止 强制更新 Agent(安全特性)。
  • --disable-command-execute:禁止在 Agent 上执行定时任务、打开在线终端(安全特性)。
  • --tls:启用 SSL/TLS 加密(使用 nginx 反向代理 Agent 的 grpc 连接,并且 nginx 开启 SSL/TLS 时,需要启用该项配置)。
+ \ No newline at end of file diff --git a/guide/q8.html b/guide/q8.html index f367a1c4..2ce0efd7 100644 --- a/guide/q8.html +++ b/guide/q8.html @@ -5,26 +5,29 @@ 使用 Cloudflare Access 作为 OAuth2 提供方 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

使用 Cloudflare Access 作为 OAuth2 提供方

相较于 Github,Cloudflare Access 对于中国大陆用户更加友好。如您当前使用 Github、Gitlab、Gitee 作为管理员账户登录时遇到问题,您可以考虑切换 Cloudflare Access 作为 OAuth2 提供方

示例配置:

yaml
Oauth2:
-  Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
-  ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
-  ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
-  Endpoint: "https://xxxxx.cloudflareaccess.com"
-  Type: cloudflare

配置说明:

参数获取方式
AdminMy Team -> Users -> <具体用户> -> User ID
ClientID/ClientSecretAccess -> Application -> Add an Application
-> SaaS -> OIDC
EndpointAccess -> Application -> Application URL -> 只保留协议+域名的部分,路径不需要

新建 SaaS-OIDC 应用流程

前往 Zero Trust Dashboard: https://one.dash.cloudflare.com

  1. My Team -> Users -> <具体用户> -> 获取 User ID 并保存;
  2. Access -> Application -> Add an Application;
  3. 选择 SaaS,在 Application 中输入自定义的应用名称(例如 nezha),选择 OIDC后点击 Add application;
  4. Scopes 选择 openid, email, profile, groups;
  5. Redirect URLs 填写你的 CallBack 地址,例如 https://dashboard.example.com/oauth2/callback;
  6. 记录 Client IDClient SecretIssuer 地址中协议与域名的部分,例如 https://xxxxx.cloudflareaccess.com
  7. 编辑 Dashboard 配置文件(通常在/opt/nezha/dashboard/data/config.yaml),参考示例配置修改 Oauth2 配置,并重启 Dashboard 服务

身份验证策略配置

在完成 Dashboard 的设置后,您还需要在 Zero Trust Dashboard 中 Access-> Applications -> <应用名> -> Policies 配置验证策略。您可以选择包括邮件OTP验证、硬件密钥验证、等十多种 SSO 验证方式,详细配置请参考 Cloudflare Zero Trust 文档

- +
Skip to content

使用 Cloudflare Access 作为 OAuth2 提供方

相较于 Github,Cloudflare Access 对于中国大陆用户更加友好。如您当前使用 Github、Gitlab、Gitee 作为管理员账户登录时遇到问题,您可以考虑切换 Cloudflare Access 作为 OAuth2 提供方

示例配置:

yaml
Oauth2:
+  Admin: 701b9ea6-9f56-48cd-af3e-cbb4bfc1475c
+  ClientID: 3516291f53eca9b4901a01337e41be7dc52f565c8657d08a3fddb2178d13c5bf
+  ClientSecret: 0568b67c7b6d0ed51c663e2fe935683007c28f947a27b7bd47a5ad3d8b56fb67
+  Endpoint: "https://xxxxx.cloudflareaccess.com"
+  Type: cloudflare

配置说明:

参数获取方式
AdminMy Team -> Users -> <具体用户> -> User ID
ClientID/ClientSecretAccess -> Application -> Add an Application
-> SaaS -> OIDC
EndpointAccess -> Application -> Application URL -> 只保留协议+域名的部分,路径不需要

新建 SaaS-OIDC 应用流程

前往 Zero Trust Dashboard: https://one.dash.cloudflare.com

  1. My Team -> Users -> <具体用户> -> 获取 User ID 并保存;
  2. Access -> Application -> Add an Application;
  3. 选择 SaaS,在 Application 中输入自定义的应用名称(例如 nezha),选择 OIDC后点击 Add application;
  4. Scopes 选择 openid, email, profile, groups;
  5. Redirect URLs 填写你的 CallBack 地址,例如 https://dashboard.example.com/oauth2/callback;
  6. 记录 Client IDClient SecretIssuer 地址中协议与域名的部分,例如 https://xxxxx.cloudflareaccess.com
  7. 编辑 Dashboard 配置文件(通常在/opt/nezha/dashboard/data/config.yaml),参考示例配置修改 Oauth2 配置,并重启 Dashboard 服务

身份验证策略配置

在完成 Dashboard 的设置后,您还需要在 Zero Trust Dashboard 中 Access-> Applications -> <应用名> -> Policies 配置验证策略。您可以选择包括邮件OTP验证、硬件密钥验证、等十多种 SSO 验证方式,详细配置请参考 Cloudflare Zero Trust 文档

+ \ No newline at end of file diff --git a/guide/servers.html b/guide/servers.html index 2000a13c..bc374856 100644 --- a/guide/servers.html +++ b/guide/servers.html @@ -5,46 +5,49 @@ 服务器 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

服务器

介绍

服务器区域负责管理 Agent,是哪吒探针中最基础的区域,也是其他功能的基础。

新增服务器

第一步是新增服务器,可以自定义名称、分组、排序和备注。
拥有相同分组的服务器会在受支持的主题中划分到一起进行显示,备注仅会在后台显示,无需担心泄露信息。

安装 Agent

请参考前文安装 Agent
推荐使用一键安装,即配置好参数后,点击服务器一键安装列上的对应的系统图标即可复制安装命令,在相应服务器上进行安装。

强制更新

Agent 更新相关的参数是 自定义 Agent 监控项目 中的 --disable-auto-update--disable-force-update
默认情况下,Agent 会自动更新,无需干预。但当用户关闭自动更新后,也可以选中指定服务器进行强制更新。
disable-force-update 开启时此功能不生效。

数据列

  • 版本号:记录 Agent 当前版本。
  • 对游客隐藏:为 True 时,游客在面板中无法查看到此服务器。
  • 启用 DDNS:为 True 时,当该服务器 IP 发生变化,Dashboard 会自动更新 DNS 记录。
  • DDNS 域名:为该服务器配置的 DDNS 域名。
  • 密钥:即 secret/key,配置 Agent 时会用到,用于验证 Agent 与 Dashboard 的通信。
  • 一键安装:点击相应的系统按钮,复制命令到服务器执行即可一键安装。
  • 管理:分别为连接 WebShell,修改服务器配置,删除服务器。

在线终端

即 WebShell,disable-command-execute 开启时此功能不生效。
Linux 和 Windows 均可用,可使用 Ctrl+Shift+V 粘贴。
连接失败请参考实时通道断开/在线终端连接失败
注意在线终端功能中,Agent 也是通过 WebSocket 连接到公开访问域名,而非通过 gRPC 交互。

DDNS 功能

DDNS 功能适用于使用动态 IP 的服务器,当 Agent 上报了一个新的 IP,Dashboard 会根据配置自动更新 DNS 记录。

为什么我要使用哪吒监控的 DDNS 功能?

  • 方便集中管理 DDNS 设置,而不是在每台服务器上都部署一个 DDNS 服务。
  • 仅在面板服务器上保存您的机密信息,防止外泄。

配置说明

目前 DDNS 功能支持两种形式的配置:单配置和多配置。如使用单配置,则所有 Agent 服务器都使用相同的配置更新 DDNS;如使用多配置,则可为每台服务器指定一个配置更新 DDNS,灵活性更强。

单配置

yaml
DDNS:
-  Enable: true
-  Provider: "webhook"
-  AccessID: ""
-  AccessSecret: ""
-  WebhookMethod: ""
-  WebhookURL: ""
-  WebhookRequestBody: ""
-  WebhookHeaders: ""
-  MaxRetries: 3
-  Profiles: null
  • Enable:布尔值,选择是否开启 DDNS 功能。
  • Provider:DDNS 供应商的名称;目前支持 webhookcloudflare 以及 tencentcloud
  • AccessID:DDNS 供应商的令牌 ID;仅适用于供应商 tencentcloud
  • AccessSecret:DDNS 供应商的令牌 Secret;仅适用于供应商 cloudflaretencentcloud
  • WebhookMethod:Webhook 的请求方法。例如 GETPOST 等;仅适用于供应商 webhook
  • WebhookURL:Webhook 的请求地址;仅适用于供应商 webhook
  • WebhookRequestBody:Webhook 的请求体;仅适用于供应商 webhook
  • WebhookHeaders:Webhook 的请求头;仅适用于供应商 webhook
  • MaxRetries:当请求失败时,重试请求的次数。
  • Profiles:多配置设定;在单配置设定中,此项忽略。

WebhookURLWebhookRequestBody 以及 WebhookHeaders 可以包含以下参数:

  • {ip}:主机当前 IP。
  • {domain}:ddns 域名。
  • {type}:IP 类型,可能为 "ipv4" 和 "ipv6"。
  • {access_id}:凭据 1。
  • {access_secret}:凭据 2。

配置示例:

yaml
WebhookHeaders: |
-    a:{access_id}
-    b:{access_secret}
-WebhookRequestBody: '{"domain": "{domain}", "ip": "{ip}", "type": "{type}"}'

多配置

当使用多配置时,请将 DDNS.Provider 留空。如 DDNS.Provider 的值不为空,多配置设定将被忽略。

yaml
DDNS:
-  Enable: true
-  MaxRetries: 3
-  Profiles:
-    example:
-      Provider: ""
-      AccessID: ""
-      AccessSecret: ""
-      WebhookMethod: ""
-      WebhookURL: ""
-      WebhookRequestBody: ""
-      WebhookHeaders: ""
  • Profiles:多配置设定。
  • example:可替换为 DDNS 配置名,可填任意字符串。

其它选项请参考单配置段。

Dashboard 配置

修改配置文件后,还需要在 Dashboard 中修改服务器设置才能使 DDNS 生效。

DDNS 相关选项说明:

  • 启用 DDNS:为此服务器启用 DDNS 功能。
  • 启用 DDNS IPv4:更新 DDNS 记录时,启用 IPv4 解析。
  • 启用 DDNS IPv6:更新 DDNS 记录时,启用 IPv6 解析。
  • DDNS 域名:记录指向的域名。
  • DDNS 配置:在多配置情况下,要使用的 DDNS 配置名。

WARNING

在 Dashboard 设置中修改配置并保存时,会在 config.yaml 中填入默认配置选项,此时 DDNS 段中会同时存在单配置和多配置。

  • 如需使用单配置,请配置 DDNS.Provider,并忽略 Profiles 选项相关内容。
  • 如需使用多配置,请将 DDNS.Provider 留空。如 DDNS.Provider 的值不为空,多配置设定将被忽略。

查看日志

在 Dashboard 的日志中,可以看到 DDNS 功能的相关日志,配置正确时,更新 DNS 记录时会有相应的日志记录。

shell
dashboard_1  | 2024/03/16 23:16:25 NEZHA>> 正在尝试更新域名(ddns.example.com)DDNS(1/3)
-dashboard_1  | 2024/03/16 23:16:28 NEZHA>> 尝试更新域名(ddns.example.com)DDNS成功
- +
Skip to content

服务器

介绍

服务器区域负责管理 Agent,是哪吒探针中最基础的区域,也是其他功能的基础。

新增服务器

第一步是新增服务器,可以自定义名称、分组、排序和备注。
拥有相同分组的服务器会在受支持的主题中划分到一起进行显示,备注仅会在后台显示,无需担心泄露信息。

安装 Agent

请参考前文安装 Agent
推荐使用一键安装,即配置好参数后,点击服务器一键安装列上的对应的系统图标即可复制安装命令,在相应服务器上进行安装。

强制更新

Agent 更新相关的参数是 自定义 Agent 监控项目 中的 --disable-auto-update--disable-force-update
默认情况下,Agent 会自动更新,无需干预。但当用户关闭自动更新后,也可以选中指定服务器进行强制更新。
disable-force-update 开启时此功能不生效。

数据列

  • 版本号:记录 Agent 当前版本。
  • 对游客隐藏:为 True 时,游客在面板中无法查看到此服务器。
  • 启用 DDNS:为 True 时,当该服务器 IP 发生变化,Dashboard 会自动更新 DNS 记录。
  • DDNS 域名:为该服务器配置的 DDNS 域名。
  • 密钥:即 secret/key,配置 Agent 时会用到,用于验证 Agent 与 Dashboard 的通信。
  • 一键安装:点击相应的系统按钮,复制命令到服务器执行即可一键安装。
  • 管理:分别为连接 WebShell,修改服务器配置,删除服务器。

在线终端

即 WebShell,disable-command-execute 开启时此功能不生效。
Linux 和 Windows 均可用,可使用 Ctrl+Shift+V 粘贴。
连接失败请参考实时通道断开/在线终端连接失败
注意在线终端功能中,Agent 也是通过 WebSocket 连接到公开访问域名,而非通过 gRPC 交互。

DDNS 功能

DDNS 功能适用于使用动态 IP 的服务器,当 Agent 上报了一个新的 IP,Dashboard 会根据配置自动更新 DNS 记录。

为什么我要使用哪吒监控的 DDNS 功能?

  • 方便集中管理 DDNS 设置,而不是在每台服务器上都部署一个 DDNS 服务。
  • 仅在面板服务器上保存您的机密信息,防止外泄。

配置说明

目前 DDNS 功能支持两种形式的配置:单配置和多配置。如使用单配置,则所有 Agent 服务器都使用相同的配置更新 DDNS;如使用多配置,则可为每台服务器指定一个配置更新 DDNS,灵活性更强。

单配置

yaml
DDNS:
+  Enable: true
+  Provider: "webhook"
+  AccessID: ""
+  AccessSecret: ""
+  WebhookMethod: ""
+  WebhookURL: ""
+  WebhookRequestBody: ""
+  WebhookHeaders: ""
+  MaxRetries: 3
+  Profiles: null
  • Enable:布尔值,选择是否开启 DDNS 功能。
  • Provider:DDNS 供应商的名称;目前支持 webhookcloudflare 以及 tencentcloud
  • AccessID:DDNS 供应商的令牌 ID;仅适用于供应商 tencentcloud
  • AccessSecret:DDNS 供应商的令牌 Secret;仅适用于供应商 cloudflaretencentcloud
  • WebhookMethod:Webhook 的请求方法。例如 GETPOST 等;仅适用于供应商 webhook
  • WebhookURL:Webhook 的请求地址;仅适用于供应商 webhook
  • WebhookRequestBody:Webhook 的请求体;仅适用于供应商 webhook
  • WebhookHeaders:Webhook 的请求头;仅适用于供应商 webhook
  • MaxRetries:当请求失败时,重试请求的次数。
  • Profiles:多配置设定;在单配置设定中,此项忽略。

WebhookURLWebhookRequestBody 以及 WebhookHeaders 可以包含以下参数:

  • {ip}:主机当前 IP。
  • {domain}:ddns 域名。
  • {type}:IP 类型,可能为 "ipv4" 和 "ipv6"。
  • {access_id}:凭据 1。
  • {access_secret}:凭据 2。

配置示例:

yaml
WebhookHeaders: |
+    a:{access_id}
+    b:{access_secret}
+WebhookRequestBody: '{"domain": "{domain}", "ip": "{ip}", "type": "{type}"}'

多配置

当使用多配置时,请将 DDNS.Provider 留空。如 DDNS.Provider 的值不为空,多配置设定将被忽略。

yaml
DDNS:
+  Enable: true
+  MaxRetries: 3
+  Profiles:
+    example:
+      Provider: ""
+      AccessID: ""
+      AccessSecret: ""
+      WebhookMethod: ""
+      WebhookURL: ""
+      WebhookRequestBody: ""
+      WebhookHeaders: ""
  • Profiles:多配置设定。
  • example:可替换为 DDNS 配置名,可填任意字符串。

其它选项请参考单配置段。

Dashboard 配置

修改配置文件后,还需要在 Dashboard 中修改服务器设置才能使 DDNS 生效。

DDNS 相关选项说明:

  • 启用 DDNS:为此服务器启用 DDNS 功能。
  • 启用 DDNS IPv4:更新 DDNS 记录时,启用 IPv4 解析。
  • 启用 DDNS IPv6:更新 DDNS 记录时,启用 IPv6 解析。
  • DDNS 域名:记录指向的域名。
  • DDNS 配置:在多配置情况下,要使用的 DDNS 配置名。

WARNING

在 Dashboard 设置中修改配置并保存时,会在 config.yaml 中填入默认配置选项,此时 DDNS 段中会同时存在单配置和多配置。

  • 如需使用单配置,请配置 DDNS.Provider,并忽略 Profiles 选项相关内容。
  • 如需使用多配置,请将 DDNS.Provider 留空。如 DDNS.Provider 的值不为空,多配置设定将被忽略。

查看日志

在 Dashboard 的日志中,可以看到 DDNS 功能的相关日志,配置正确时,更新 DNS 记录时会有相应的日志记录。

shell
dashboard_1  | 2024/03/16 23:16:25 NEZHA>> 正在尝试更新域名(ddns.example.com)DDNS(1/3)
+dashboard_1  | 2024/03/16 23:16:28 NEZHA>> 尝试更新域名(ddns.example.com)DDNS成功
+ \ No newline at end of file diff --git a/guide/services.html b/guide/services.html index f41c0659..2669a9ed 100644 --- a/guide/services.html +++ b/guide/services.html @@ -5,21 +5,24 @@ 服务监控 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

服务监控

服务区域是设置 Agent 监控外部网站或服务器的功能设置区
设置好的服务监控可以在主页中的“服务”页查看过去 30 天的可用性监控结果

使用方法

如需新增一个监控,可以进入管理面板中的“服务”页,点击“添加监控”。

新增一个服务监控时,你需要设置以下参数:

  • 名称:自定义一个名称。

  • 类型:选择一个监控类型。目前哪吒监控支持三种监控类型,分别是“HTTP-GET”、“ICMP-Ping”和“TCP-Ping”。

  • 目标:根据你选择的类型不同,目标的设置方法也不同:

    • HTTP-GET:选择此类型时,你应输入一个 URL 作为目标,URL 需添加 http://https://如果你的目标 URL 是 https://,将会同时监控该 URL 的 SSL 证书,当 SSL 证书到期或发生变更,会触发提醒。例如:https://example.com
    • ICMP-Ping:选择此类型时,你应输入一个域名或 IP,不含端口号。例如:1.1.1.1 或 example.com。
    • TCP-Ping:选择此类型时,你应输入一个域名或 IP 并包含端口号。例如:1.1.1.1:80 或 example.com:22。
  • 请求间隔:设定 Agent 每次请求目标的时间间隔,以秒为单位。

  • 覆盖范围:选择一条规则来确定要使用哪些 Agent 来请求目标。

  • 特定服务器:配合覆盖范围使用,选择规则内需要排除的 Agent。

  • 通知方式组:选择你已经在“告警”页设置好的通知方式,点击这里了解详情。

  • 启用故障通知:根据需要选择是否接收目标故障通知,默认为不勾选。

设置完成后,点击“添加”即可。稍等片刻前往主页的“服务”页查看监控结果。

延迟变化告警

哪吒监控可以监测并统计 Agent 到目标服务器之间的延迟,在发生较大变化的情况下发送通知。利用此功能可以帮助你监控服务器的线路是否发生了变化。

  • 启用延迟通知:开启时,当 Agent 至目标服务器的延迟大于最高延迟或小于最低延迟时,将会发送告警通知。

告警时触发任务

如果你需要在服务监控告警触发时执行一些任务,可以勾选“启用触发任务”,并在“告警时触发任务”和“恢复时触发任务”中选择你已经提前设置好的触发任务。

网络延迟图表

在服务页中设置的 TCP-Ping 和 ICMP-Ping 类型的监控都会自动启用监控图表功能。在主页的“网络”页中,你可以查看历史网络延迟监控图表。图表中的数据是根据 Agent 到目标服务器的延迟统计而来,你可以点击 Agent 的名称来切换图表。在图表中,可以取消勾选目标服务器的名称来隐藏或显示对应的数据。

管理监控

如需对已有的服务监控进行管理,可以前往管理面板中的“服务”页。选择一条监控配置,点击右侧的图标进行编辑或删除。

- +
Skip to content

服务监控

服务区域是设置 Agent 监控外部网站或服务器的功能设置区
设置好的服务监控可以在主页中的“服务”页查看过去 30 天的可用性监控结果

使用方法

如需新增一个监控,可以进入管理面板中的“服务”页,点击“添加监控”。

新增一个服务监控时,你需要设置以下参数:

  • 名称:自定义一个名称。

  • 类型:选择一个监控类型。目前哪吒监控支持三种监控类型,分别是“HTTP-GET”、“ICMP-Ping”和“TCP-Ping”。

  • 目标:根据你选择的类型不同,目标的设置方法也不同:

    • HTTP-GET:选择此类型时,你应输入一个 URL 作为目标,URL 需添加 http://https://如果你的目标 URL 是 https://,将会同时监控该 URL 的 SSL 证书,当 SSL 证书到期或发生变更,会触发提醒。例如:https://example.com
    • ICMP-Ping:选择此类型时,你应输入一个域名或 IP,不含端口号。例如:1.1.1.1 或 example.com。
    • TCP-Ping:选择此类型时,你应输入一个域名或 IP 并包含端口号。例如:1.1.1.1:80 或 example.com:22。
  • 请求间隔:设定 Agent 每次请求目标的时间间隔,以秒为单位。

  • 覆盖范围:选择一条规则来确定要使用哪些 Agent 来请求目标。

  • 特定服务器:配合覆盖范围使用,选择规则内需要排除的 Agent。

  • 通知方式组:选择你已经在“告警”页设置好的通知方式,点击这里了解详情。

  • 启用故障通知:根据需要选择是否接收目标故障通知,默认为不勾选。

设置完成后,点击“添加”即可。稍等片刻前往主页的“服务”页查看监控结果。

延迟变化告警

哪吒监控可以监测并统计 Agent 到目标服务器之间的延迟,在发生较大变化的情况下发送通知。利用此功能可以帮助你监控服务器的线路是否发生了变化。

  • 启用延迟通知:开启时,当 Agent 至目标服务器的延迟大于最高延迟或小于最低延迟时,将会发送告警通知。

告警时触发任务

如果你需要在服务监控告警触发时执行一些任务,可以勾选“启用触发任务”,并在“告警时触发任务”和“恢复时触发任务”中选择你已经提前设置好的触发任务。

网络延迟图表

在服务页中设置的 TCP-Ping 和 ICMP-Ping 类型的监控都会自动启用监控图表功能。在主页的“网络”页中,你可以查看历史网络延迟监控图表。图表中的数据是根据 Agent 到目标服务器的延迟统计而来,你可以点击 Agent 的名称来切换图表。在图表中,可以取消勾选目标服务器的名称来隐藏或显示对应的数据。

管理监控

如需对已有的服务监控进行管理,可以前往管理面板中的“服务”页。选择一条监控配置,点击右侧的图标进行编辑或删除。

+ \ No newline at end of file diff --git a/guide/settings.html b/guide/settings.html index d1fe80b4..19e7f8f1 100644 --- a/guide/settings.html +++ b/guide/settings.html @@ -5,329 +5,332 @@ 设置 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

设置

站点标题

你可以在此项中自定义站点标题。

管理员列表

  • 如果你修改了自己的 Github、Gitlab 或 Gitee 的用户名,需要在此项中同步修改,否则无法登录。多个用户请用逗号隔开:user1,user2
  • 如需更改管理员账户,请前往 /opt/nezha/dashboard/data/config.yaml,重新设置新的管理员 Client IDClient Secret

界面主题

在这里选择主页和管理界面主题,如果选项中没有某个已存在的主题,请更新面板。
启用 Custom 主题前,你需要提前安装自定义主题,否则启用该项后,面板将无法正常显示。

Language

哪吒监控目前支持以下语言:

  • 简体中文
  • 繁體中文
  • English
  • Español

我们欢迎您对翻译进行勘误或贡献更多语言。

自定义代码 (style, script)

可以在此修改 LOGO、修改色调、添加美化代码和统计代码等。

WARNING

自定义代码仅在游客首页生效,管理面板不生效。由于不同主题的代码不同,如确需修改管理面板中的内容,请修改 Docker 中的主题文件。

默认主题更改进度条颜色、背景图片、导航栏等效果示例

点击展开/收起
html
<style>
-/* 屏幕适配 */
-@media only screen and (min-width: 1200px) {
-    .ui.container {
-    width: 80% !important;
-}
-}
+    
Skip to content

设置

站点标题

你可以在此项中自定义站点标题。

管理员列表

  • 如果你修改了自己的 Github、Gitlab 或 Gitee 的用户名,需要在此项中同步修改,否则无法登录。多个用户请用逗号隔开:user1,user2
  • 如需更改管理员账户,请前往 /opt/nezha/dashboard/data/config.yaml,重新设置新的管理员 Client IDClient Secret

界面主题

在这里选择主页和管理界面主题,如果选项中没有某个已存在的主题,请更新面板。
启用 Custom 主题前,你需要提前安装自定义主题,否则启用该项后,面板将无法正常显示。

Language

哪吒监控目前支持以下语言:

  • 简体中文
  • 繁體中文
  • English
  • Español

我们欢迎您对翻译进行勘误或贡献更多语言。

自定义代码 (style, script)

可以在此修改 LOGO、修改色调、添加美化代码和统计代码等。

WARNING

自定义代码仅在游客首页生效,管理面板不生效。由于不同主题的代码不同,如确需修改管理面板中的内容,请修改 Docker 中的主题文件。

默认主题更改进度条颜色、背景图片、导航栏等效果示例

点击展开/收起
html
<style>
+/* 屏幕适配 */
+@media only screen and (min-width: 1200px) {
+    .ui.container {
+    width: 80% !important;
+}
+}
 
-@media only screen and (max-width: 767px) {
-    .ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) {
-        margin-top: 0.4em !important;
-    }
-}
+@media only screen and (max-width: 767px) {
+    .ui.card>.content>.header:not(.ui), .ui.cards>.card>.content>.header:not(.ui) {
+        margin-top: 0.4em !important;
+    }
+}
 
-/* 整体图标 */
-i.icon {
-    color: #000;
-    width: 1.2em !important;
-}
+/* 整体图标 */
+i.icon {
+    color: #000;
+    width: 1.2em !important;
+}
 
-/* 背景图片 */
-body {
-    content: " " !important;
-    background: fixed !important;
-    z-index: -1 !important;
-    top: 0 !important;
-    right: 0 !important;
-    bottom: 0 !important;
-    left: 0 !important;
-    background-position: top !important;
-    background-repeat: no-repeat !important;
-    background-size: cover !important;
-    background-image: url(https://backgroud.img) !important;
-    font-family: Arial,Helvetica,sans-serif !important;
-}
+/* 背景图片 */
+body {
+    content: " " !important;
+    background: fixed !important;
+    z-index: -1 !important;
+    top: 0 !important;
+    right: 0 !important;
+    bottom: 0 !important;
+    left: 0 !important;
+    background-position: top !important;
+    background-repeat: no-repeat !important;
+    background-size: cover !important;
+    background-image: url(https://backgroud.img) !important;
+    font-family: Arial,Helvetica,sans-serif !important;
+}
 
-/* 导航栏 */
-.ui.large.menu {
-    border: 0 !important;
-    border-radius: 0px !important;
-    background-color: rgba(255, 255, 255, 55%) !important;
-}
+/* 导航栏 */
+.ui.large.menu {
+    border: 0 !important;
+    border-radius: 0px !important;
+    background-color: rgba(255, 255, 255, 55%) !important;
+}
 
-/* 首页按钮 */
-.ui.menu .active.item {
-    background-color: transparent !important;
-}
+/* 首页按钮 */
+.ui.menu .active.item {
+    background-color: transparent !important;
+}
 
-/* 导航栏下拉框 */
-.ui.dropdown .menu {
-    border: 0 !important;
-    border-radius: 0 !important;
-    background-color: rgba(255, 255, 255, 80%) !important;
-}
+/* 导航栏下拉框 */
+.ui.dropdown .menu {
+    border: 0 !important;
+    border-radius: 0 !important;
+    background-color: rgba(255, 255, 255, 80%) !important;
+}
 
-/* 登录按钮 */
-.nezha-primary-btn {
-    background-color: transparent !important;
-    color: #000 !important;
-}
+/* 登录按钮 */
+.nezha-primary-btn {
+    background-color: transparent !important;
+    color: #000 !important;
+}
 
-/* 大卡片 */
-#app .ui.fluid.accordion {
-    background-color: #fbfbfb26 !important;
-    border-radius: 0.4rem !important;
-}
+/* 大卡片 */
+#app .ui.fluid.accordion {
+    background-color: #fbfbfb26 !important;
+    border-radius: 0.4rem !important;
+}
 
-/* 小卡片 */
-.ui.four.cards>.card {
-    border-radius: 0.6rem !important;
-    background-color: #fafafaa3 !important;
-}
+/* 小卡片 */
+.ui.four.cards>.card {
+    border-radius: 0.6rem !important;
+    background-color: #fafafaa3 !important;
+}
 
-.status.cards .wide.column {
-    padding-top: 0 !important;
-    padding-bottom: 0 !important;
-    height: 3.3rem !important;
-}
+.status.cards .wide.column {
+    padding-top: 0 !important;
+    padding-bottom: 0 !important;
+    height: 3.3rem !important;
+}
 
-.status.cards .three.wide.column {
-    padding-right: 0rem !important;
-}
+.status.cards .three.wide.column {
+    padding-right: 0rem !important;
+}
 
-.status.cards .wide.column:nth-child(1) {
-    margin-top: 2rem !important;
-}
+.status.cards .wide.column:nth-child(1) {
+    margin-top: 2rem !important;
+}
 
-.status.cards .wide.column:nth-child(2) {
-    margin-top: 2rem !important;
-}
+.status.cards .wide.column:nth-child(2) {
+    margin-top: 2rem !important;
+}
 
-.status.cards .description {
-    padding-bottom: 0 !important;
-}
+.status.cards .description {
+    padding-bottom: 0 !important;
+}
 
-/* 服务器名 */
-.status.cards .flag {
-    margin-right: 0.5rem !important;
-}
+/* 服务器名 */
+.status.cards .flag {
+    margin-right: 0.5rem !important;
+}
 
-/* 弹出卡片图标 */
-.status.cards .header > .info.icon {
-    margin-right: 0 !important;
-}
+/* 弹出卡片图标 */
+.status.cards .header > .info.icon {
+    margin-right: 0 !important;
+}
 
-.nezha-secondary-font {
-    color: #2175ba !important;
-}
+.nezha-secondary-font {
+    color: #2175ba !important;
+}
 
-/* 上传下载 */
-.status.cards .outline.icon {
-    margin-right: 1px !important;
-}
+/* 上传下载 */
+.status.cards .outline.icon {
+    margin-right: 1px !important;
+}
 
-i.arrow.alternate.circle.down.outline.icon {
-    color: #2175ba !important;
-}
+i.arrow.alternate.circle.down.outline.icon {
+    color: #2175ba !important;
+}
 
-i.arrow.alternate.circle.up.outline.icon {
-    color: red !important;
-}
+i.arrow.alternate.circle.up.outline.icon {
+    color: red !important;
+}
 
-/* 弹出卡片小箭头 */
-.ui.right.center.popup {
-    margin: -3px 0 0 0.914286em !important;
-    -webkit-transform-origin: left 50% !important;
-    transform-origin: left 50% !important;
-}
+/* 弹出卡片小箭头 */
+.ui.right.center.popup {
+    margin: -3px 0 0 0.914286em !important;
+    -webkit-transform-origin: left 50% !important;
+    transform-origin: left 50% !important;
+}
 
-.ui.bottom.left.popup {
-    margin-left: 1px !important;
-    margin-top: 3px !important;
-}
+.ui.bottom.left.popup {
+    margin-left: 1px !important;
+    margin-top: 3px !important;
+}
 
-.ui.top.left.popup {
-    margin-left: 0 !important;
-    margin-bottom: 10px !important;
-}
+.ui.top.left.popup {
+    margin-left: 0 !important;
+    margin-bottom: 10px !important;
+}
 
-.ui.top.right.popup {
-    margin-right: 0 !important;
-    margin-bottom: 8px !important;
-}
+.ui.top.right.popup {
+    margin-right: 0 !important;
+    margin-bottom: 8px !important;
+}
 
-.ui.left.center.popup {
-    margin: -3px .91428571em 0 0 !important;
-    -webkit-transform-origin: right 50% !important;
-    transform-origin: right 50% !important;
-}
+.ui.left.center.popup {
+    margin: -3px .91428571em 0 0 !important;
+    -webkit-transform-origin: right 50% !important;
+    transform-origin: right 50% !important;
+}
 
-.ui.right.center.popup:before,
-.ui.left.center.popup:before {
-    border: 0px solid #fafafaeb !important;
-    background: #fafafaeb !important;
-}
+.ui.right.center.popup:before,
+.ui.left.center.popup:before {
+    border: 0px solid #fafafaeb !important;
+    background: #fafafaeb !important;
+}
 
-.ui.top.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
+.ui.top.popup:before {
+    border-color: #fafafaeb transparent transparent !important;
+}
 
-.ui.popup:before {
-    border-color: #fafafaeb transparent transparent !important;
-}
+.ui.popup:before {
+    border-color: #fafafaeb transparent transparent !important;
+}
 
-.ui.bottom.left.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
+.ui.bottom.left.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !important;
+    background: #fafafaeb !important;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
+}
 
-.ui.bottom.right.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
+.ui.bottom.right.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !important;
+    background: #fafafaeb !important
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
+}
 
-.ui.top.left.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
+.ui.top.left.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !important;
+    background: #fafafaeb !important;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
+}
 
-.ui.top.right.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
+.ui.top.right.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !important;
+    background: #fafafaeb !important;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
+}
 
-.ui.left.center.popup:before {
-    border-radius: 0 !important;
-    border: 1px solid transparent !important;
-    border-color: #fafafaeb transparent transparent !important;
-    background: #fafafaeb !important;
-    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    box-shadow: 0px 0px 0 0 #fafafaeb !important;
-    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
-}
+.ui.left.center.popup:before {
+    border-radius: 0 !important;
+    border: 1px solid transparent !important;
+    border-color: #fafafaeb transparent transparent !important;
+    background: #fafafaeb !important;
+    -webkit-box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    box-shadow: 0px 0px 0 0 #fafafaeb !important;
+    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
+}
 
-/* 弹出卡片 */
-.status.cards .ui.content.popup {
-    min-width: 20rem !important;
-    line-height: 2rem !important;
-    border-radius: 5px !important;
-    border: 1px solid transparent !important;
-    background-color: #fafafaeb !important;
-    font-family: Arial,Helvetica,sans-serif !important;
-}
+/* 弹出卡片 */
+.status.cards .ui.content.popup {
+    min-width: 20rem !important;
+    line-height: 2rem !important;
+    border-radius: 5px !important;
+    border: 1px solid transparent !important;
+    background-color: #fafafaeb !important;
+    font-family: Arial,Helvetica,sans-serif !important;
+}
 
-.ui.content {
-    margin: 0 !important;
-    padding: 1em !important;
-}
+.ui.content {
+    margin: 0 !important;
+    padding: 1em !important;
+}
 
-/* 服务页 */
-.ui.table {
-    background: RGB(225,225,225,0.6) !important;
-}
+/* 服务页 */
+.ui.table {
+    background: RGB(225,225,225,0.6) !important;
+}
 
-.ui.table thead th {
-    background: transparent !important;
-}
+.ui.table thead th {
+    background: transparent !important;
+}
 
-/* 服务页进度条 */
-.service-status .good {
-    background-color: #2175ba !important;
-}
+/* 服务页进度条 */
+.service-status .good {
+    background-color: #2175ba !important;
+}
 
-.service-status .danger {
-    background-color: red !important;
-}
+.service-status .danger {
+    background-color: red !important;
+}
 
-.service-status .warning {
-    background-color: orange !important;
-}
+.service-status .warning {
+    background-color: orange !important;
+}
 
-/* 版权 */
-.ui.inverted.segment, .ui.primary.inverted.segment {
-    color: #000 !important;
-    font-weight: bold !important;
-    background-color: #fafafaa3 !important;
-}
-</style>
+/* 版权 */
+.ui.inverted.segment, .ui.primary.inverted.segment {
+    color: #000 !important;
+    font-weight: bold !important;
+    background-color: #fafafaa3 !important;
+}
+</style>
 
-<!--Logo和版权-->
-<script>
-window.onload = function(){
-var avatar=document.querySelector(".item img")
-var footer=document.querySelector("div.is-size-7")
-footer.innerHTML="Copyright info"
-footer.style.visibility="visible"
-avatar.src="https:/img.src"
-avatar.style.visibility="visible"
-}
-</script>

DayNight 主题更改进度条颜色、修改页脚示例(来自 @hyt-allen-xu @tech-fever

点击展开/收起
html
<style>
-.ui.fine.progress> .progress-bar {
-  background-color: #00a7d0 !important;
-}
-</style>
+<!--Logo和版权-->
+<script>
+window.onload = function(){
+var avatar=document.querySelector(".item img")
+var footer=document.querySelector("div.is-size-7")
+footer.innerHTML="Copyright info"
+footer.style.visibility="visible"
+avatar.src="https:/img.src"
+avatar.style.visibility="visible"
+}
+</script>

DayNight 主题更改进度条颜色、修改页脚示例(来自 @hyt-allen-xu @tech-fever

点击展开/收起
html
<style>
+.ui.fine.progress> .progress-bar {
+  background-color: #00a7d0 !important;
+}
+</style>
 
-<script>
-window.onload = function(){
-  var avatar = document.querySelector("img");
-  var footer = document.querySelector("div.footer-container");
-  footer.innerHTML = "©2021 你的名字 & Powered by 你的名字";
-  footer.style.visibility = "visible";
-  avatar.src = "你的图片连接";
-  avatar.style.visibility = "visible";
-}
-</script>

默认主题修改 LOGO、修改页脚示例(来自 @iLay1678

点击展开/收起
html
<style>
-.right.menu>a {
-  visibility: hidden;
-}
-.footer .is-size-7 {
-  visibility: hidden;
-}
-.item img {
-  visibility: hidden;
-}
-</style>
-<script>
-window.onload = function() {
-  var avatar = document.querySelector(".item img");
-  var footer = document.querySelector("div.is-size-7");
-  footer.innerHTML = "Powered by 你的名字";
-  footer.style.visibility = "visible";
-  avatar.src = "你的方形 logo 地址";
-  avatar.style.visibility = "visible";
-}
-</script>

hotaru 主题更改背景图片示例

点击展开/收起
html
<style>
-.hotaru-cover {
-   background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
-}
-</style>

前台查看密码

如果你不想向游客直接展示你的 Dashboard,可以在这里设置一个查看密码。设置密码后,需要输入密码才可以访问主页。

未接入 CDN 的面板服务器域名/IP

此项设置是使用一键脚本安装 Agent 的前提,详情请查看这里

IP 变更提醒

如果你希望当某个服务器的 IP 发生变更时收到通知,可以在这里进行设置。

覆盖范围

在这里选择一条规则,来确定需要监控哪些服务器,可以根据自己的需求进行选择。

特定服务器

配合覆盖范围的设置,在这里设置选定规则的排除项。

提醒发送至指定的通知分组

选择通知方式,通知方式请提前在“告警”页内设置。

WARNING

设置完成后,勾选启用时,通知生效

通知中显示完整 IP 地址

IP 变更通知默认隐藏完整 IP,如果你不希望隐藏,可以勾选“通知信息中显示完整 IP 地址”。

禁止主页切换主题

Dashboard 默认启用允许访客修改显示主题的功能,此功能只会影响单一访客,不会影响管理员在后台设置的启用主题。如果你不希望访客切换主题,可以勾选此项。

- +<script> +window.onload = function(){ + var avatar = document.querySelector("img"); + var footer = document.querySelector("div.footer-container"); + footer.innerHTML = "©2021 你的名字 & Powered by 你的名字"; + footer.style.visibility = "visible"; + avatar.src = "你的图片连接"; + avatar.style.visibility = "visible"; +} +</script>

默认主题修改 LOGO、修改页脚示例(来自 @iLay1678

点击展开/收起
html
<style>
+.right.menu>a {
+  visibility: hidden;
+}
+.footer .is-size-7 {
+  visibility: hidden;
+}
+.item img {
+  visibility: hidden;
+}
+</style>
+<script>
+window.onload = function() {
+  var avatar = document.querySelector(".item img");
+  var footer = document.querySelector("div.is-size-7");
+  footer.innerHTML = "Powered by 你的名字";
+  footer.style.visibility = "visible";
+  avatar.src = "你的方形 logo 地址";
+  avatar.style.visibility = "visible";
+}
+</script>

hotaru 主题更改背景图片示例

点击展开/收起
html
<style>
+.hotaru-cover {
+   background: url(https://s3.ax1x.com/2020/12/08/DzHv6A.jpg) center;
+}
+</style>

前台查看密码

如果你不想向游客直接展示你的 Dashboard,可以在这里设置一个查看密码。设置密码后,需要输入密码才可以访问主页。

未接入 CDN 的面板服务器域名/IP

此项设置是使用一键脚本安装 Agent 的前提,详情请查看这里

IP 变更提醒

如果你希望当某个服务器的 IP 发生变更时收到通知,可以在这里进行设置。

覆盖范围

在这里选择一条规则,来确定需要监控哪些服务器,可以根据自己的需求进行选择。

特定服务器

配合覆盖范围的设置,在这里设置选定规则的排除项。

提醒发送至指定的通知分组

选择通知方式,通知方式请提前在“告警”页内设置。

WARNING

设置完成后,勾选启用时,通知生效

通知中显示完整 IP 地址

IP 变更通知默认隐藏完整 IP,如果你不希望隐藏,可以勾选“通知信息中显示完整 IP 地址”。

禁止主页切换主题

Dashboard 默认启用允许访客修改显示主题的功能,此功能只会影响单一访客,不会影响管理员在后台设置的启用主题。如果你不希望访客切换主题,可以勾选此项。

+ \ No newline at end of file diff --git a/guide/tasks.html b/guide/tasks.html index 10cac252..bb6416d6 100644 --- a/guide/tasks.html +++ b/guide/tasks.html @@ -5,21 +5,24 @@ 任务管理 | 哪吒监控 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content
On this page

任务管理

在任务区域中,可以设置计划任务,触发任务,多服务器批量执行任务

哪吒监控支持推送命令到 Agent 执行,此功能非常灵活。使用此功能可以定期结合 restic、rclone 给服务器备份,定期重启某项服务来重置网络连接。也可以配合告警通知,在触发告警时执行某项任务,例如在 CPU 长时间高占用的情况下运行某个脚本。

使用方法

进入管理面板的“任务”页,点击“添加计划任务”。添加计划任务时,你需要填入以下参数:

  • 名称:自定义一个任务名称。

  • 任务类型:选择任务的类型。

    • 计划任务:按下方设置的计划时间,周期性执行任务。
    • 触发任务:仅被 API 或告警规则触发的任务,每次触发执行一次。
  • 计划:设置计划时间(使用触发任务类型时不生效),时间格式为:* * * * * *,分别对应秒 分 时 天 月 星期,详情见计划表达式格式
    例如:0 0 3 * * * 对应为“每天 3 点”。

  • 命令:设置需要执行的命令,就像写 Shell/Bat 脚本一样,但不推荐换行,多个命令使用 &&/& 连接。
    例如执行定期重启命令,可以在这里输入 reboot

  • 覆盖范围特定服务器:选择规则来确定哪些 Agent 执行计划任务,类似于“服务”页中的设置。使用触发任务类型时,可选择“由触发的服务器执行”。

  • 通知方式组:选择你已经在“告警”页设置好的通知方式,点击这里了解详情。

  • 推送成功的消息:勾选此项,任务执行成功后会触发消息通知。

管理任务

如需对已有的计划任务进行管理,可以前往管理面板中的“任务”页。选择一条任务配置,右侧的三个图标分别是:

  • 立即执行:点击后将忽略计划时间,立刻执行任务。
  • 编辑:点击可以修改任务配置。
  • 删除:删除这条计划任务。

常见问题

  1. xxx 命令找不到
    如果运行失败,提示 xxx 命令找不到,可能是 PATH 环境变量的问题。在 Linux 服务器上,可以在命令开头加入 source ~/.bashrc,或者使用绝对路径执行命令。
- +
Skip to content

任务管理

在任务区域中,可以设置计划任务,触发任务,多服务器批量执行任务

哪吒监控支持推送命令到 Agent 执行,此功能非常灵活。使用此功能可以定期结合 restic、rclone 给服务器备份,定期重启某项服务来重置网络连接。也可以配合告警通知,在触发告警时执行某项任务,例如在 CPU 长时间高占用的情况下运行某个脚本。

使用方法

进入管理面板的“任务”页,点击“添加计划任务”。添加计划任务时,你需要填入以下参数:

  • 名称:自定义一个任务名称。

  • 任务类型:选择任务的类型。

    • 计划任务:按下方设置的计划时间,周期性执行任务。
    • 触发任务:仅被 API 或告警规则触发的任务,每次触发执行一次。
  • 计划:设置计划时间(使用触发任务类型时不生效),时间格式为:* * * * * *,分别对应秒 分 时 天 月 星期,详情见计划表达式格式
    例如:0 0 3 * * * 对应为“每天 3 点”。

  • 命令:设置需要执行的命令,就像写 Shell/Bat 脚本一样,但不推荐换行,多个命令使用 &&/& 连接。
    例如执行定期重启命令,可以在这里输入 reboot

  • 覆盖范围特定服务器:选择规则来确定哪些 Agent 执行计划任务,类似于“服务”页中的设置。使用触发任务类型时,可选择“由触发的服务器执行”。

  • 通知方式组:选择你已经在“告警”页设置好的通知方式,点击这里了解详情。

  • 推送成功的消息:勾选此项,任务执行成功后会触发消息通知。

管理任务

如需对已有的计划任务进行管理,可以前往管理面板中的“任务”页。选择一条任务配置,右侧的三个图标分别是:

  • 立即执行:点击后将忽略计划时间,立刻执行任务。
  • 编辑:点击可以修改任务配置。
  • 删除:删除这条计划任务。

常见问题

  1. xxx 命令找不到
    如果运行失败,提示 xxx 命令找不到,可能是 PATH 环境变量的问题。在 Linux 服务器上,可以在命令开头加入 source ~/.bashrc,或者使用绝对路径执行命令。
+ \ No newline at end of file diff --git a/hashmap.json b/hashmap.json index e96b226e..ce7df00e 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"case_case1.md":"4511267a","case_case2.md":"15761344","en_us_guide_dashboardq.md":"7302f04b","en_us_guide_loginq.md":"0a8a1bec","guide_services.md":"adf6490e","en_us_guide_services.md":"b9e22be7","guide_q6.md":"a63ae0d3","case_case4.md":"3d76eaa8","en_us_guide_tasks.md":"9c66a854","en_us_case_case1.md":"a1eac32f","en_us_case_case2.md":"31035400","guide_agentq.md":"a7c6d5c4","en_us_case_case4.md":"cd2a9c57","en_us_index.md":"483599a8","guide_agent.md":"ca60d73d","en_us_guide_settings.md":"9aa8066d","en_us_guide_q2.md":"ba9d6542","guide_api.md":"8b2774bf","en_us_guide_q3.md":"636a4fb5","en_us_guide_dashboard.md":"54205e0c","en_us_case_case3.md":"d0600eda","developer_index.md":"3bf4b5d9","developer_theme.md":"67a964df","developer_l10n.md":"f1206383","guide_q3.md":"17434cbd","guide_q4.md":"51315641","guide_dashboard.md":"83e865a5","guide_q5.md":"fda1ace4","case_index.md":"0560322d","en_us_guide_q6.md":"2b98fb0c","guide_tasks.md":"64f84f3a","en_us_guide_q4.md":"688e36aa","en_us_guide_q5.md":"060bf29f","en_us_guide_q7.md":"6cc217f4","en_us_guide_servers.md":"fa2a7a63","en_us_guide_q8.md":"d9a53a36","en_us_developer_theme.md":"8e6bceb7","en_us_developer_index.md":"127deb01","en_us_guide_notifications.md":"0c956c41","en_us_case_case5.md":"f8b87ece","guide_q8.md":"107876e2","guide_servers.md":"971f5a47","index.md":"a6736f6b","guide_q2.md":"524813bc","en_us_guide_agent.md":"7264295e","guide_settings.md":"c86c3d25","guide_dashboardq.md":"dd22b797","guide_loginq.md":"b615efd0","guide_notifications.md":"b99b360d","en_us_guide_agentq.md":"8251e9de","guide_q7.md":"9c08febc","case_case3.md":"dd36066e","en_us_developer_l10n.md":"d15efbb3","case_case5.md":"05a62247","en_us_case_index.md":"f86af56c","en_us_guide_api.md":"9f430ab7","guide_q1.md":"aa6954ab"} +{"en_us_case_case5.md":"XqwZ8iKk","en_us_developer_index.md":"DdHbANMq","en_us_case_case2.md":"CtI6yc_M","en_us_guide_agentq.md":"BKmzind8","en_us_case_case3.md":"DCEb-lOe","en_us_case_case4.md":"Bq6rZxKf","en_us_developer_theme.md":"DsiXMVZ4","en_us_guide_agent.md":"XjTB7cBt","en_us_case_index.md":"CSf_yv3T","case_case1.md":"ChD04IfY","en_us_guide_loginq.md":"Cz5kBrac","developer_theme.md":"DpFToTun","en_us_guide_q2.md":"BPMhVFbw","en_us_guide_api.md":"DlwwVGvY","en_us_guide_q7.md":"UsLVXz4r","en_us_guide_dashboard.md":"CqJk3SZj","case_index.md":"Dpbpc1R2","en_us_guide_servers.md":"C6ttJH3B","en_us_guide_dashboardq.md":"B7tjvTgj","en_us_guide_services.md":"DlWdTpu5","case_case4.md":"Dcp2TVIl","developer_l10n.md":"DlMPJ4AL","developer_index.md":"DFC7O4If","en_us_guide_q3.md":"CC66i-vY","guide_servers.md":"DDv3konh","index.md":"CtVXitC5","guide_tasks.md":"DvMwtbjN","case_case3.md":"Bktz5arj","case_case2.md":"p4X-B3ai","en_us_guide_q5.md":"RcBGWcbM","en_us_guide_notifications.md":"BFN9G5FT","guide_q5.md":"CApD4PGd","guide_settings.md":"DnOHC6ho","en_us_developer_l10n.md":"C-79vxLb","en_us_case_case1.md":"4LkFrC_x","guide_q4.md":"Bwi-wIzP","guide_dashboardq.md":"h1t88GdR","guide_loginq.md":"0dEC8Tty","guide_notifications.md":"uDxrpArB","en_us_guide_q8.md":"BLA1wvwL","en_us_guide_q6.md":"CYZ4lxRg","case_case5.md":"_Z3o2S8Q","guide_services.md":"BHZuB3ts","guide_q7.md":"DyaEbK7v","guide_q8.md":"CXLLAZ7L","en_us_guide_q4.md":"CMem165Z","guide_q6.md":"D9InDAD2","guide_q1.md":"C5KPuqP_","guide_api.md":"BqAGPlfh","guide_agentq.md":"FPZHBF1_","guide_dashboard.md":"C6o-Roy3","en_us_guide_settings.md":"wx4ZCmxQ","en_us_index.md":"wm6LXN_f","guide_q3.md":"CQNdJrKk","guide_q2.md":"DVtou8cF","guide_agent.md":"rsLi-_uD","en_us_guide_tasks.md":"DSlKW8HO"} diff --git a/index.html b/index.html index 897d32b4..9d48e9b0 100644 --- a/index.html +++ b/index.html @@ -5,21 +5,24 @@ 哪吒监控 | 使用文档 - - - - - - - - - - + + + + + + + + + + + + + + -
Skip to content

哪吒监控

开源、轻量、易用的服务器监控与运维工具

一键安装

支持一键安装面板和监控服务,操作便捷。兼容主流系统,包括 Linux、Windows、macOS、OpenWRT 以及群晖。

实时监控

支持同时监控多个服务器的状态,提供历史网络状态和延迟图表,监控网页、端口可用性和 SSL 证书状态。支持故障和流量等状态告警,可通过 Telegram、邮件、微信等多种方式提醒。

轻松运维

提供 API 获取服务器状态,支持WebSSH、DDNS 和流量监控。可设置定时和触发任务,并批量执行服务器任务。

- +
Skip to content

哪吒监控

开源、轻量、易用的服务器监控与运维工具

+ \ No newline at end of file diff --git a/logo.png b/logo.png new file mode 100644 index 00000000..af54371e Binary files /dev/null and b/logo.png differ