404
页面不存在
我们是怎么来到这儿的?
diff --git a/1.jpg b/1.jpg new file mode 100644 index 00000000..f77cb86a Binary files /dev/null and b/1.jpg differ diff --git a/404.html b/404.html new file mode 100644 index 00000000..53425b9c --- /dev/null +++ b/404.html @@ -0,0 +1,40 @@ + + +
+ + + + + + +{
+ "allowed_modules": [
+ "@minecraft/server-gametest",
+ "@minecraft/server",
+ "@minecraft/server-ui",
+ "@minecraft/server-admin",
+ "@minecraft/server-editor",
+ "@minecraft/server-net"
+ ]
+}
+
+
to enable
Download NIAHttpBOT.exe built by the latest release to get the latest version of NIA-Http-Bot
Start developing!
# ip address, generally do not need to change
+IPAddress = "127.0.0.1"
+
+# Port, which must be consistent with the behavior package port
+Port = 10086
+
+#Whether to enable the DOS command function
+UseCmd = false
+
+
/CheckServer
(under development, not online)Return the current status of NIAHttpBOT
, mostly used to detect whether the dependent server is normally enabled
/GetTime
(under development, not online)Get the current time and return a string like "2019-01-28 12:53"
Example of use
const port = 3000
+const reqGetTime = http.get(\`http://127.0.0.1:\${port}/GetTime\`)
+reqServerStarted.then((response) => {
+ if (response.status == 200) {
+ console.log(response.body)
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/RunCmd
Execute DOS commands
warning
Since the API involves server security issues, this function is disabled by default. Please enable this function after modifying the configuration file under the condition that you are sure you are ready!
Functions that can be realized:
`,16),T={href:"https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/mkdir",target:"_blank",rel:"noopener noreferrer"},D={href:"https://learn.microsoft.com/zh-cn/windows-server/administration/windows-commands/del",target:"_blank",rel:"noopener noreferrer"},R={href:"https://learn.microsoft.com/zh-cn/windows-server/administration/windows-commands/echo",target:"_blank",rel:"noopener noreferrer"},P={href:"https://learn.microsoft.com/zh-cn/windows-server/administration/windows-commands/windows-commands",target:"_blank",rel:"noopener noreferrer"},J=e(`Example of use
const port = 3000
+const reqRunCmd = new HttpRequest(\`http://127.0.0.1:\${port}/RunCmd\`);
+ reqRunCmd.body = "del 123.txt"
+ reqRunCmd.method = HttpRequestMethod.Post;
+ reqRunCmd.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqRunCmd).then((response) => {
+ if (response.status == 200) {
+ console.log("Dos command executed successfully!")
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/CheckFile
Checks whether a file exists. If the target file exists, it returns true
with a status code of 200
. If it does not exist, it returns false
with a status code of 400
Example of use
const port = 3000
+const reqCheckFile = new HttpRequest(\`http://127.0.0.1:\${port}/CheckFile\`);
+ reqCheckFile.body = "FileName.json"
+ reqCheckFile.method = HttpRequestMethod.Post;
+ reqCheckFile.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqCheckFile).then((response) => {
+ if (response.status == 200) {
+ console.log("Target file exists.")
+ } else if (response.status == 400) {
+ console.error("The target file does not exist")
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/CheckDir
Check if the target folder exists, if the target folder exists, return true
, the status code is 200
, if it does not exist, return false
, the status code is 400
Example of use
const port = 3000
+const reqCheckDir = new HttpRequest(\`http://127.0.0.1:\${port}/CheckDir\`);
+ reqCheckDir.body = "./A"
+ reqCheckDir.method = HttpRequestMethod.Post;
+ reqCheckDir.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqCheckDir).then((response) => {
+ if (response.status == 200) {
+ console.log("Target folder exists.")
+ } else if (response.status == 400) {
+ console.error("The target folder does not exist")
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/CreateNewFile
Create a file, if the creation is successful, return success
, the status code is 200
, if the creation fails, return failure reason
, the status code is 400
Example of use
const port = 3000
+const reqCreateNewFile = new HttpRequest(\`http://127.0.0.1:\${port}/CreateNewFile\`);
+ reqCreateNewFile.body = JSON.stringify({"fileName":"test.txt","content":"这是第一行\\n这是第二行"})
+ reqCreateNewFile.method = HttpRequestMethod.Post;
+ reqCreateNewFile.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqCreateNewFile).then((response) => {
+ if (response.status == 200) {
+ console.log("File created successfully!")
+ } else if (response.status == 400) {
+ console.error(response.body)
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/CreateNewJsonFile
Create a JSON file and return success
with a status code of 200
if the creation is successful, or return failure reason
with a status code of 400
if the creation fails
Example of use
const port = 3000
+const reqCreateNewJsonFile = new HttpRequest(\`http://127.0.0.1:\${port}/CreateNewJsonFile\`);
+ reqCreateNewJsonFile.body = JSON.stringify({"fileName":"market111.json","content":{"a":10}})
+ reqCreateNewJsonFile.method = HttpRequestMethod.Post;
+ reqCreateNewJsonFile.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqCreateNewJsonFile).then((response) => {
+ if (response.status == 200) {
+ console.log("File created successfully!")
+ } else if (response.status == 400) {
+ console.error(response.body)
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/GetFileData
Get the file data, return the file data (the type is a string) if the acquisition is successful, the status code is 200
, if the acquisition fails, return fail
, the status code is 400
Example of use
const port = 3000
+const reqGetFileData = new HttpRequest(\`http://127.0.0.1:\${port}/GetFileData\`);
+ reqGetFileData.body = "text.txt"
+ reqGetFileData.method = HttpRequestMethod.Post;
+ reqGetFileData.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqGetFileData).then((response) => {
+ if (response.status == 200) {
+ console.log("Get file data successfully! File data:" + response.body)
+ } else if (response.status == 400) {
+ console.error("The target file does not exist")
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/GetJsonFileData
Obtain JSON file data, if the acquisition is successful, return the data in json format, the status code is 200
, if the acquisition fails, return fail
, the status code is 400
Example of use
const port = 3000
+const reqGetJsonFileData = new HttpRequest(\`http://127.0.0.1:\${port}/GetJsonFileData\`);
+ reqGetJsonFileData.body = "market.json"
+ reqGetJsonFileData.method = HttpRequestMethod.Post;
+ reqGetJsonFileData.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqGetJsonFileData).then((response) => {
+ if (response.status == 200) {
+ console.log("Get file data successfully! File data:" + response.body)
+ } else if (response.status == 400) {
+ console.error("The target file does not exist")
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/OverwriteFile
Overwrite the content of the file. If the overwrite is successful, it will return success
with a status code of 200
. If the overwrite fails, it will return failure reason
with a status code of 400
Example of use
const port = 3000
+const reqOverwriteFile = new HttpRequest(\`http://127.0.0.1:\${port}/OverwriteFile\`);
+ reqOverwriteFile.body = JSON.stringify({"fileName":"FileName.txt","content": "这是第一行\\n这是第二行"})
+ reqOverwriteFile.method = HttpRequestMethod.Post;
+ reqOverwriteFile.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqOverwriteFile).then((response) => {
+ if (response.status == 200) {
+ console.log("Overwrite file data successfully!")
+ } else if (response.status == 400) {
+ console.error(response.body)
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/OverwriteJsonFile
Overwrite the content of the JSON file. If the overwrite is successful, it will return success
with a status code of 200
. If the overwrite fails, it will return failure reason
with a status code of 200
Example of use
const port = 3000
+const reqOverwriteJsonFile = new HttpRequest(\`http://127.0.0.1:\${port}/OverwriteJsonFile\`);
+ reqOverwriteJsonFile.body = JSON.stringify({"fileName":"FileName.json","content":{"a":"呵呵呵呵"}})
+ reqOverwriteJsonFile.method = HttpRequestMethod.Post;
+ reqOverwriteJsonFile.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqOverwriteJsonFile).then((response) => {
+ if (response.status == 200) {
+ console.log("Overwrite file data successfully!")
+ } else if (response.status == 400) {
+ console.error(response.body)
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/WriteLineToFile
Write a line of content to the target file at the end, if successful, return success
with status code 200
, if failed, return failure reason
, status code is 400
** Pay attention to adding a newline character(\\n), otherwise there will be no newline! **
Example of use
const port = 3000
+const reqWriteLineToFile = new HttpRequest(\`http://127.0.0.1:\${port}/WriteLineToFile\`);
+ reqWriteLineToFile.body = JSON.stringify({"fileName":"123.txt","content": "这是一行测试内容" + "\\n"})
+ reqWriteLineToFile.method = HttpRequestMethod.Post;
+ reqWriteLineToFile.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqWriteLineToFile).then((response) => {
+ if (response.status == 200) {
+ console.log("Overwrite file data successfully!")
+ } else if (response.status == 400) {
+ console.error(response.body)
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
Suggested method
Create the ./API/filesystem.js
file with the following content
(Currently written some commonly used functions, more functions will be updated later)
`,43),I={href:"https://github.com/NIANIANKNIA/NiaServer-Core/blob/dev/development_behavior_packs/NIA_V4.0_BP/scripts/API/filesystem.js",target:"_blank",rel:"noopener noreferrer"},M=e(`import {http,HttpRequestMethod,HttpRequest,HttpHeader} from '@minecraft/server-net';
+
+const port = 10086
+const server_url = "http://127.0.0.1"
+
+export class ExternalFS {
+
+ /**
+ * @function Execute DOS command
+ * @param {String} cmd
+ * @return {String | Number} returns success if the acquisition is successful, and returns -1 if the server connection fails
+ */
+ RunCmd(cmd) {
+ const reqRunCmd = new HttpRequest(\`\${server_url}:\${port}/RunCmd\`)
+ .setBody(cmd)
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain");
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqRunCmd);
+ if (response.status == 200) {
+ resolve(response.body);
+ } else {
+ resolve(-1);
+ }
+ })
+ }
+
+ /**
+ * @function Get file content
+ * @param {String} filename
+ * @return {String | Number} returns the file data successfully, returns 0 if the file does not exist, returns -1 if the server connection fails
+ */
+ GetFileData(filename) {
+ const reqGetFileData = new HttpRequest(\`\${server_url}:\${port}/GetFileData\`)
+ .setBody(filename)
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain");
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqGetFileData);
+ if (response.status == 200) {
+ resolve(JSON.parse(response.body));
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ })
+ }
+
+ /**
+ * @function Get the content of the json file
+ * @param {String} filename
+ * @return {Object | Number} returns json data successfully, returns 0 if the file does not exist, returns -1 if the server connection fails
+ */
+ GetJSONFileData(filename) {
+ const reqGetJsonFileData = new HttpRequest(\`\${server_url}:\${port}/GetJsonFileData\`)
+ .setBody(filename)
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain");
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqGetJsonFileData);
+ if (response.status == 200) {
+ resolve(JSON.parse(response.body));
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ })
+ }
+
+ /**
+ * @function Create new file
+ * @param {String} filename
+ * @param {String} filecontent
+ * @return {String | Number} Successful creation returns success, creation failure returns 0, server connection failure returns -1
+ */
+ CreateNewFile(filename,filecontent) {
+ const reqCreateNewFile = new HttpRequest(\`\${server_url}:\${port}/CreateNewFile\`)
+ .setBody(JSON.stringify({"fileName":filename,"content":filecontent}))
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain")
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqCreateNewFile);
+ if (response.status == 200) {
+ resolve(response.body);
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ });
+ }
+
+ /**
+ * @function Create new json file
+ * @param {String} filename
+ * @param {Object} filecontent
+ * @return {String | Number} Successful creation returns success, creation failure returns 0, server connection failure returns -1
+ */
+ CreateNewJsonFile(filename,filecontent) {
+ const reqCreateNewJsonFile = new HttpRequest(\`\${server_url}:\${port}/CreateNewJsonFile\`)
+ .setBody(JSON.stringify({"fileName":filename,"content":filecontent}))
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain")
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqCreateNewJsonFile);
+ if (response.status == 200) {
+ resolve(response.body);
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ });
+ }
+
+ /**
+ * @function Overwrite file
+ * @param {String} filename
+ * @param {String} filecontent
+ * @return {String | Number} Successful overwrite returns success, overwrite failure returns 0, server connection failure returns -1
+ */
+ OverwriteFile(filename,filecontent) {
+ const reqOverwriteFile = new HttpRequest(\`\${server_url}:\${port}/OverwriteFile\`)
+ .setBody(JSON.stringify({"fileName":filename,"content":filecontent}))
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain");
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqOverwriteFile);
+ if (response.status == 200) {
+ resolve(response.body);
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ })
+ }
+
+ /**
+ * @function Overwrite json file
+ * @param {String} filename
+ * @param {Object} filecontent
+ * @return {String | Number} Successful overwrite returns success, overwrite failure returns 0, server connection failure returns -1
+ */
+ OverwriteJsonFile(filename,filecontent) {
+ const reqOverwriteJsonFile = new HttpRequest(\`\${server_url}:\${port}/OverwriteJsonFile\`)
+ .setBody(JSON.stringify({"fileName":filename,"content":filecontent}))
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain");
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqOverwriteJsonFile);
+ if (response.status == 200) {
+ resolve(response.body);
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ })
+ }
+
+ /**
+ * @function Write a line to a specific file
+ * @param {String} filename
+ * @param {String} filecontent
+ * @return {String | Number} If the write is successful, it will return success, if the overwrite fails, it will return 0, and if the server connection fails, it will return -1
+ */
+ WriteLineToFile(filename,filecontent) {
+ const reqWriteLineToFile = new HttpRequest(\`\${server_url}:\${port}/WriteLineToFile\`)
+ .setBody(JSON.stringify({"fileName":filename,"content":filecontent}))
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain");
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqWriteLineToFile);
+ if (response.status == 200) {
+ resolve(response.body);
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ })
+ }
+}
+
Then we can call it directly without repeatedly writing
Call example (intercepted from part of the code of the player trading market)
import { world } from '@minecraft/server';
+import { ExternalFS } from './API/filesystem';
+
+const fs = new ExternalFS();
+const port = 10086
+var MarketData = [-1]
+
+
+world.afterEvents.worldInitialize.subscribe(() => {
+ fs.getJSONFileData("market.json").then((result) => {
+ if (result === 0) {
+ fs.CreateNewJsonFile("market.json",[]).then((result) => {
+ if (result === "success") {
+ MarketData = [];
+ console.log("玩家市场文件不存在,已成功创建!");
+ } else if (result === -1) {
+ console.error("依赖服务器连接失败!请检查依赖服务器是否成功启动,以及端口是否设置正确!");
+ }
+ });
+ } else if (result === -1) {
+ console.error("依赖服务器连接失败!请检查依赖服务器是否成功启动,以及端口是否设置正确!");
+ } else {
+ MarketData = result;
+ console.log("玩家市场数据获取成功!")
+ }
+ })
+})
+
由于目前我的世界的Script-api无法实现诸如文件读写等功能,为此我们特此基于C++开发了NIA-Http-Bot
用来实现更多功能,从而赋予Script-api更多可能
1.本项目基于http进行通讯,故当前Minecraft版本应当注意启用minecraft/server-net模块(该模块只能运行在服务器上)
',8),b=n("strong",null,"NiaServer-Core",-1),g={href:"https://github.com/Nia-Server/NiaServer-Core/releases",target:"_blank",rel:"noopener noreferrer"},h=n("strong",null,"NIAHttpBOT.exe",-1),f=n("code",null,"NIA-Http-Bot",-1),q=n("strong",null,"NiaServer-Core",-1),y={href:"https://github.com/Nia-Server/NiaServer-Core/issues",target:"_blank",rel:"noopener noreferrer"},w=p('4.由于采用的是http通讯,而非https,我们非常不推荐您将NIAHttpBOT与基岩版服务端分开放置于两台服务器上,这是非常不安全的操作!请务必将NiaHttpBOT与基岩版服务端放置于同一台服务器之上,并注意防火墙设置,不要开放使用过程中涉及的两个端口,以免对服务器安全造成威胁!
提示
这里使用的是LLONEBot,事实上,我们是基于onebot-v11进行的开发,只要您所使用的机器人遵循这个接口,即可使用!
由于minecraft/server-net模块在本地存档中无法启用,所以我们应当在本地搭建一个服务器环境用于开发
',5),N={href:"https://www.minecraft.net/en-us/download/server/bedrock",target:"_blank",rel:"noopener noreferrer"},x=p(`2.安装行为包
3.修改服务器端文件,来启用net模块:将config/default/permissions.json
内容改为
{
+ "allowed_modules": [
+ "@minecraft/server-gametest",
+ "@minecraft/server",
+ "@minecraft/server-ui",
+ "@minecraft/server-admin",
+ "@minecraft/server-editor",
+ "@minecraft/server-net"
+ ]
+}
+
+
即可启用
4.Windows平台下下载最新release构建的NIAHttpBOT.exe来获取最新版的NIAHttp-Bot
,Linux平台下载最新release构建的NIAHttpBOT来获取最新版的NIAHttp-Bot
6.安装后,打开机器人设置界面,启用HTTP服务,HTTP服务监听端口与下述配置文件中ClientPort保持一致,启用HTTP事件上报,上报地址如果是下述配置项目则为http://127.0.0.1:10086/qqEvent
,机器人至此配置完毕
7.Windows平台点击NIAHttpBOT.exe启动;Linux平台在终端输入./NIAHttpBOT
来启动!
在Linux如果出项权限不够的提示,这个错误是因为你试图运行的文件没有执行权限。你可以使用 chmod
命令来给文件添加执行权限。以下是具体的步骤:
7.1. 打开终端
7.2. 使用 cd
命令导航到文件所在的目录
7.3. 运行 chmod +x NIAHttpBOT
命令给文件添加执行权限
这是具体的命令:
chmod +x NIAHttpBOT
+
然后你就可以使用 ./NIAHttpBOT
命令来运行你的程序了。
8.开始开发!
# ip地址,一般为不用改
+IPAddress = "127.0.0.1"
+
+# 服务器端口,需与行为包端口保持一致
+ServerPort = 10086
+
+#是否启用DOS指令功能
+UseCmd = false
+
+#是否启用QQ机器人相关功能
+UseQQBot = true
+
+# 客户端端口,需要与机器人设置的监听Http端口一致
+ClientPort = 10023
+https://github.com/Nia-Server/NiaServer-Docs
+
+# 监听QQ群
+QQGroup = "123456789"
+
+
<XboxID>
玩家的XboxID
注:当前还不能录入带空格的XboxID,需要管理员手动修改player_data.json
文件
#帮助: 显示帮助菜单
+
+#赞我: 给自己点10个赞
+
+#绑定 <XboxID>: 绑定XboxID
+
+例:#绑定 NIANIANKNIA
+
+#查:查询自己账号的相关信息
+
+#查 @要查询的人 : 查询别人账号的相关信息
+
<时间>
应当以min(分钟)、h(小时)、d(天)为结尾,前面只能为阿拉伯数字
例:1min、10h、100d等
+#禁言 @要禁言的人 <时间>: 禁言指定群成员
+
+例:#禁言 @NIANIANKNIA 1h
+
+#解禁 @要解禁的人: 解禁指定群成员
+
+#改绑 @要改绑的人 <XboxID>: 改绑XboxID
+
+#封禁 @要封禁的人 <时间>: 封禁指定群成员游戏账号
+
+例:#封禁 @NIANIANKNIA 1d
+
+#解封 @要解封的人: 解封指定群成员账号
+
+#改权限 @要改权限的人 <权限>: 改变指定群成员的权限
+
/RunCmd
执行DOS命令
警告
由于API涉及服务器安全性问题,本功能默认关闭,请在确定做好准备的条件下修改配置文件后启用本功能!
可以实现的功能:
`,32),H={href:"https://learn.microsoft.com/zh-cn/windows-server/administration/windows-commands/mkdir",target:"_blank",rel:"noopener noreferrer"},j={href:"https://learn.microsoft.com/zh-cn/windows-server/administration/windows-commands/del",target:"_blank",rel:"noopener noreferrer"},O={href:"https://learn.microsoft.com/zh-cn/windows-server/administration/windows-commands/echo",target:"_blank",rel:"noopener noreferrer"},S={href:"https://learn.microsoft.com/zh-cn/windows-server/administration/windows-commands/windows-commands",target:"_blank",rel:"noopener noreferrer"},T=p(`使用示例
const port = 3000
+const reqRunCmd = new HttpRequest(\`http://127.0.0.1:\${port}/RunCmd\`);
+ reqRunCmd.body = "del 123.txt"
+ reqRunCmd.method = HttpRequestMethod.Post;
+ reqRunCmd.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqRunCmd).then((response) => {
+ if (response.status == 200) {
+ console.log("Dos command executed successfully!")
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/CheckFile
检查一个文件是否存在,目标文件存在则返回true
,状态码为200
,不存在则返回false
,状态码为400
使用示例
const port = 3000
+const reqCheckFile = new HttpRequest(\`http://127.0.0.1:\${port}/CheckFile\`);
+ reqCheckFile.body = "FileName.json"
+ reqCheckFile.method = HttpRequestMethod.Post;
+ reqCheckFile.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqCheckFile).then((response) => {
+ if (response.status == 200) {
+ console.log("Target file exists.")
+ } else if (response.status == 400) {
+ console.error("The target file does not exist")
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/CheckDir
检查目标文件夹是否存在,目标文件夹存在则返回true
,状态码为200
,不存在则返回false
,状态码为400
使用示例
const port = 3000
+const reqCheckDir = new HttpRequest(\`http://127.0.0.1:\${port}/CheckDir\`);
+ reqCheckDir.body = "./A"
+ reqCheckDir.method = HttpRequestMethod.Post;
+ reqCheckDir.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqCheckDir).then((response) => {
+ if (response.status == 200) {
+ console.log("Target folder exists.")
+ } else if (response.status == 400) {
+ console.error("The target folder does not exist")
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/CreateNewFile
创建一个文件,创建成功返回success
,状态码为200
,创建失败则返回失败原因
,状态码为400
使用示例
const port = 3000
+const reqCreateNewFile = new HttpRequest(\`http://127.0.0.1:\${port}/CreateNewFile\`);
+ reqCreateNewFile.body = JSON.stringify({"fileName":"test.txt","content":"这是第一行\\n这是第二行"})
+ reqCreateNewFile.method = HttpRequestMethod.Post;
+ reqCreateNewFile.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqCreateNewFile).then((response) => {
+ if (response.status == 200) {
+ console.log("File created successfully!")
+ } else if (response.status == 400) {
+ console.error(response.body)
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/CreateNewJsonFile
创建一个JSON文件,创建成功返回success
,状态码为200
,创建失败则返回失败原因
,状态码为400
使用示例
const port = 3000
+const reqCreateNewJsonFile = new HttpRequest(\`http://127.0.0.1:\${port}/CreateNewJsonFile\`);
+ reqCreateNewJsonFile.body = JSON.stringify({"fileName":"market111.json","content":{"a":10}})
+ reqCreateNewJsonFile.method = HttpRequestMethod.Post;
+ reqCreateNewJsonFile.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqCreateNewJsonFile).then((response) => {
+ if (response.status == 200) {
+ console.log("File created successfully!")
+ } else if (response.status == 400) {
+ console.error(response.body)
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/GetFileData
获取文件数据,获取成功则返回文件数据(类型为字符串),状态码为200
,获取失败则返回fail
,状态码为400
使用示例
const port = 3000
+const reqGetFileData = new HttpRequest(\`http://127.0.0.1:\${port}/GetFileData\`);
+ reqGetFileData.body = "text.txt"
+ reqGetFileData.method = HttpRequestMethod.Post;
+ reqGetFileData.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqGetFileData).then((response) => {
+ if (response.status == 200) {
+ console.log("Get file data successfully! File data:" + response.body)
+ } else if (response.status == 400) {
+ console.error("The target file does not exist")
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/GetJsonFileData
警告
json文件应当没有任何语法错误/注释,否则将无法正确读取json数据!,详细请查看json文件读取注意事项
获取JSON文件数据,获取成功则返回json格式的数据,状态码为200
,获取失败则返回fail
,状态码为400
使用示例
const port = 3000
+const reqGetJsonFileData = new HttpRequest(\`http://127.0.0.1:\${port}/GetJsonFileData\`);
+ reqGetJsonFileData.body = "market.json"
+ reqGetJsonFileData.method = HttpRequestMethod.Post;
+ reqGetJsonFileData.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqGetJsonFileData).then((response) => {
+ if (response.status == 200) {
+ console.log("Get file data successfully! File data:" + response.body)
+ } else if (response.status == 400) {
+ console.error("The target file does not exist")
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/OverwriteFile
覆盖文件内容,覆盖成功则返回success
,状态码为200
,覆盖失败则返回失败原因
,状态码为400
使用示例
const port = 3000
+const reqOverwriteFile = new HttpRequest(\`http://127.0.0.1:\${port}/OverwriteFile\`);
+ reqOverwriteFile.body = JSON.stringify({"fileName":"FileName.txt","content": "这是第一行\\n这是第二行"})
+ reqOverwriteFile.method = HttpRequestMethod.Post;
+ reqOverwriteFile.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqOverwriteFile).then((response) => {
+ if (response.status == 200) {
+ console.log("Overwrite file data successfully!")
+ } else if (response.status == 400) {
+ console.error(response.body)
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/OverwriteJsonFile
覆盖JSON文件内容,覆盖成功则返回success
,状态码为200
,覆盖失败则返回失败原因
,状态码为200
使用示例
const port = 3000
+const reqOverwriteJsonFile = new HttpRequest(\`http://127.0.0.1:\${port}/OverwriteJsonFile\`);
+ reqOverwriteJsonFile.body = JSON.stringify({"fileName":"FileName.json","content":{"a":"呵呵呵呵"}})
+ reqOverwriteJsonFile.method = HttpRequestMethod.Post;
+ reqOverwriteJsonFile.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqOverwriteJsonFile).then((response) => {
+ if (response.status == 200) {
+ console.log("Overwrite file data successfully!")
+ } else if (response.status == 400) {
+ console.error(response.body)
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/WriteLineToFile
向目标文件最后写入如一行内容,成功则返回success
,状态码为200
,失败则返回失败原因
,状态码为400
注意增加换行符(\\n),否则不会换行!
使用示例
const port = 3000
+const reqWriteLineToFile = new HttpRequest(\`http://127.0.0.1:\${port}/WriteLineToFile\`);
+ reqWriteLineToFile.body = JSON.stringify({"fileName":"123.txt","content": "这是一行测试内容" + "\\n"})
+ reqWriteLineToFile.method = HttpRequestMethod.Post;
+ reqWriteLineToFile.headers = [
+ new HttpHeader("Content-Type", "text/plain"),
+ ];
+http.request(reqWriteLineToFile).then((response) => {
+ if (response.status == 200) {
+ console.log("Overwrite file data successfully!")
+ } else if (response.status == 400) {
+ console.error(response.body)
+ } else {
+ console.error("Dependent server connection failed! Check whether the dependent server started successfully.")
+ }
+})
+
/CopyFolder
将特定文件夹复制到指定位置
json文件应当没有任何语法错误/注释,否则将无法正确读取json数据!
以下是错误示例:
多了一个,
产生了语法错误!
{
+ "key":value,
+}
+
不能进行注释,否则会导致无法正确读取!
{
+ //这是一行注释,这会导致无法正常读取!
+ "key":value
+}
+
错误的使用了中文的标点符号导致语法错误!
{
+ //这是一行注释,这会导致无法正常读取!
+ "key1":value,
+ "key2":value
+}
+
建议使用的方法
创建./API/filesystem.js
文件,内容如下
(目前写了一些常用的功能,更多功能将在后续更新)
`,56),D={href:"https://github.com/Nia-Server/NiaServer-Core/blob/dev/development_behavior_packs/NIA_V4.0_BP/scripts/API/filesystem.js",target:"_blank",rel:"noopener noreferrer"},P=p(`import {http,HttpRequestMethod,HttpRequest,HttpHeader} from '@minecraft/server-net';
+
+const port = 10086
+const server_url = "http://127.0.0.1"
+
+export class ExternalFS {
+
+ /**
+ * @function 执行DOS命令
+ * @param {String} cmd
+ * @return {String | Number} 获取成功返回success,服务器连接失败返回-1
+ */
+ RunCmd(cmd) {
+ const reqRunCmd = new HttpRequest(\`\${server_url}:\${port}/RunCmd\`)
+ .setBody(cmd)
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain");
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqRunCmd);
+ if (response.status == 200) {
+ resolve(response.body);
+ } else {
+ resolve(-1);
+ }
+ })
+ }
+
+ /**
+ * @function 获取文件内容
+ * @param {String} filename
+ * @return {String | Number} 获取成功返回文件数据,文件不存在返回0,服务器连接失败返回-1
+ */
+ GetFileData(filename) {
+ const reqGetFileData = new HttpRequest(\`\${server_url}:\${port}/GetFileData\`)
+ .setBody(filename)
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain");
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqGetFileData);
+ if (response.status == 200) {
+ resolve(JSON.parse(response.body));
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ })
+ }
+
+ /**
+ * @function 获取json文件内容
+ * @param {String} filename
+ * @return {Object | Number} 获取成功返回json数据,文件不存在返回0,服务器连接失败返回-1
+ */
+ GetJSONFileData(filename) {
+ const reqGetJsonFileData = new HttpRequest(\`\${server_url}:\${port}/GetJsonFileData\`)
+ .setBody(filename)
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain");
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqGetJsonFileData);
+ if (response.status == 200) {
+ resolve(JSON.parse(response.body));
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ })
+ }
+
+ /**
+ * @function 创建新文件
+ * @param {String} filename
+ * @param {String} filecontent
+ * @return {String | Number} 创建成功返回success,创建失败返回0,服务器连接失败返回-1
+ */
+ CreateNewFile(filename,filecontent) {
+ const reqCreateNewFile = new HttpRequest(\`\${server_url}:\${port}/CreateNewFile\`)
+ .setBody(JSON.stringify({"fileName":filename,"content":filecontent}))
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain")
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqCreateNewFile);
+ if (response.status == 200) {
+ resolve(response.body);
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ });
+ }
+
+ /**
+ * @function 创建json文件
+ * @param {String} filename
+ * @param {Object} filecontent
+ * @return {String | Number} 创建成功返回success,创建失败返回0,服务器连接失败返回-1
+ */
+ CreateNewJsonFile(filename,filecontent) {
+ const reqCreateNewJsonFile = new HttpRequest(\`\${server_url}:\${port}/CreateNewJsonFile\`)
+ .setBody(JSON.stringify({"fileName":filename,"content":filecontent}))
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain")
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqCreateNewJsonFile);
+ if (response.status == 200) {
+ resolve(response.body);
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ });
+ }
+
+ /**
+ * @function 覆写文件
+ * @param {String} filename
+ * @param {String} filecontent
+ * @return {String | Number} 覆写成功返回success,覆写失败返回0,服务器连接失败返回-1
+ */
+ OverwriteFile(filename,filecontent) {
+ const reqOverwriteFile = new HttpRequest(\`\${server_url}:\${port}/OverwriteFile\`)
+ .setBody(JSON.stringify({"fileName":filename,"content":filecontent}))
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain");
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqOverwriteFile);
+ if (response.status == 200) {
+ resolve(response.body);
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ })
+ }
+
+ /**
+ * @function 覆写json文件
+ * @param {String} filename
+ * @param {Object} filecontent
+ * @return {String | Number} 覆写成功返回success,覆写失败返回0,服务器连接失败返回-1
+ */
+ OverwriteJsonFile(filename,filecontent) {
+ const reqOverwriteJsonFile = new HttpRequest(\`\${server_url}:\${port}/OverwriteJsonFile\`)
+ .setBody(JSON.stringify({"fileName":filename,"content":filecontent}))
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain");
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqOverwriteJsonFile);
+ if (response.status == 200) {
+ resolve(response.body);
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ })
+ }
+
+ /**
+ * @function 向特定文件写入一行内容
+ * @param {String} filename
+ * @param {String} filecontent
+ * @return {String | Number} 写入成功返回success,覆写失败返回0,服务器连接失败返回-1
+ */
+ WriteLineToFile(filename,filecontent) {
+ const reqWriteLineToFile = new HttpRequest(\`\${server_url}:\${port}/WriteLineToFile\`)
+ .setBody(JSON.stringify({"fileName":filename,"content":filecontent}))
+ .setMethod(HttpRequestMethod.Post)
+ .addHeader("Content-Type", "text/plain");
+ return new Promise(async (resolve) => {
+ const response = await http.request(reqWriteLineToFile);
+ if (response.status == 200) {
+ resolve(response.body);
+ } else if (response.status == 400) {
+ resolve(0);
+ } else {
+ resolve(-1);
+ }
+ })
+ }
+}
+
+
+
+
+
然后我们可以直接调用即可,不用反复写
调用示例(截取自玩家交易市场部分代码)
import { world } from '@minecraft/server';
+import { ExternalFS } from './API/filesystem';
+
+//违禁物品,等后期接入配置文件
+const fs = new ExternalFS();
+const port = 10086
+var MarketData = [-1]
+
+
+//服务器启动监听&&获得玩家市场数据
+world.afterEvents.worldInitialize.subscribe(() => {
+ fs.getJSONFileData("market.json").then((result) => {
+ //文件不存在
+ if (result === 0) {
+ fs.CreateNewJsonFile("market.json",[]).then((result) => {
+ if (result === "success") {
+ MarketData = [];
+ console.log("玩家市场文件不存在,已成功创建!");
+ } else if (result === -1) {
+ console.error("依赖服务器连接失败!请检查依赖服务器是否成功启动,以及端口是否设置正确!");
+ }
+ });
+ } else if (result === -1) {
+ console.error("依赖服务器连接失败!请检查依赖服务器是否成功启动,以及端口是否设置正确!");
+ } else {
+ //文件存在且服务器连接成功
+ MarketData = result;
+ console.log("玩家市场数据获取成功!")
+ }
+ })
+})
+
实际应用
`,5),R={href:"https://github.com/Nia-Server/NiaServer-Core/blob/dev/development_behavior_packs/NIA_V4.0_BP/scripts/market.js",target:"_blank",rel:"noopener noreferrer"};function J(B,I){const a=o("ExternalLinkIcon");return c(),i("div",null,[u,r,n("figure",null,[n("a",k,[d,t(a)]),v]),m,n("p",null,[s("2.您可以前往"),b,s("项目地址的"),n("a",g,[s("release"),t(a)]),s("下载最新release构建的"),h,s("来获取最新版的"),f]),n("p",null,[s("3.如果您在使用期间遇到了问题/有建议,您可以前往"),q,s("的"),n("a",y,[s("issues"),t(a)]),s("进行反馈!")]),w,n("p",null,[s("1.前往我的世界官网"),n("a",N,[s("下载BDS"),t(a)]),s(",并将下好的服务端解压")]),x,n("p",null,[s("5.根据自己的平台,下载最新的"),n("a",F,[s("NTQQ"),t(a)]),s(",后根据"),n("a",_,[s("LLONEBot安装教程"),t(a)]),s("安装相应的机器人框架")]),C,n("ul",null,[n("li",null,[n("a",H,[s("创建文件夹"),t(a)])]),n("li",null,[n("a",j,[s("删除文件"),t(a)])]),n("li",null,[n("a",O,[s("向NIAHttpBOT显示一行输出"),t(a)])])]),n("p",null,[s("如需了解更多DOS指令,请前往"),n("a",S,[s("微软官方文档站"),t(a)]),s("查看")]),T,n("p",null,[n("a",D,[s("点击下载示例文件"),t(a)])]),P,n("p",null,[n("a",R,[s("玩家交易市场"),t(a)])])])}const $=e(l,[["render",J],["__file","Http-Bot.html.vue"]]);export{$ as default}; diff --git a/assets/Http-Bot.html-DUjRRRKL.js b/assets/Http-Bot.html-DUjRRRKL.js new file mode 100644 index 00000000..c409b3c5 --- /dev/null +++ b/assets/Http-Bot.html-DUjRRRKL.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-0347a4f7","path":"/en-US/dev/Http-Bot.html","title":"🤖Http-BOT","lang":"en-US","frontmatter":{"lang":"en-US","title":"🤖Http-BOT","description":"version prompt All the APIs below are based on the latest build (see RELEASE below) ![Latest Release (https://img.shields.io/github/v/release/NIANIANKNIA/NiaServer-Core?include_...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://docs.mcnia.com/dev/Http-Bot.html"}],["meta",{"property":"og:url","content":"https://docs.mcnia.com/en-US/dev/Http-Bot.html"}],["meta",{"property":"og:site_name","content":"NIA-Server"}],["meta",{"property":"og:title","content":"🤖Http-BOT"}],["meta",{"property":"og:description","content":"version prompt All the APIs below are based on the latest build (see RELEASE below) ![Latest Release (https://img.shields.io/github/v/release/NIANIANKNIA/NiaServer-Core?include_..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-01-30T15:43:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-01-30T15:43:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"🤖Http-BOT\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-01-30T15:43:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"Why develop?","slug":"why-develop","link":"#why-develop","children":[]},{"level":2,"title":"Precautions before use","slug":"precautions-before-use","link":"#precautions-before-use","children":[]},{"level":2,"title":"Usage/Development Tutorial","slug":"usage-development-tutorial","link":"#usage-development-tutorial","children":[]},{"level":2,"title":"configuration file","slug":"configuration-file","link":"#configuration-file","children":[]},{"level":2,"title":"API","slug":"api","link":"#api","children":[{"level":3,"title":"[GET] /CheckServer (under development, not online)","slug":"get-checkserver-under-development-not-online","link":"#get-checkserver-under-development-not-online","children":[]},{"level":3,"title":"[GET] /GetTime (under development, not online)","slug":"get-gettime-under-development-not-online","link":"#get-gettime-under-development-not-online","children":[]},{"level":3,"title":"[POST] /RunCmd","slug":"post-runcmd","link":"#post-runcmd","children":[]},{"level":3,"title":"[POST] /CheckFile","slug":"post-checkfile","link":"#post-checkfile","children":[]},{"level":3,"title":"[POST] /CheckDir","slug":"post-checkdir","link":"#post-checkdir","children":[]},{"level":3,"title":"[POST] /CreateNewFile","slug":"post-createnewfile","link":"#post-createnewfile","children":[]},{"level":3,"title":"[POST] /CreateNewJsonFile","slug":"post-createnewjsonfile","link":"#post-createnewjsonfile","children":[]},{"level":3,"title":"[POST] /GetFileData","slug":"post-getfiledata","link":"#post-getfiledata","children":[]},{"level":3,"title":"[POST] /GetJsonFileData","slug":"post-getjsonfiledata","link":"#post-getjsonfiledata","children":[]},{"level":3,"title":"[POST] /OverwriteFile","slug":"post-overwritefile","link":"#post-overwritefile","children":[]},{"level":3,"title":"[POST] /OverwriteJsonFile","slug":"post-overwritejsonfile","link":"#post-overwritejsonfile","children":[]},{"level":3,"title":"[POST] /WriteLineToFile","slug":"post-writelinetofile","link":"#post-writelinetofile","children":[]}]},{"level":2,"title":"Example of use","slug":"example-of-use","link":"#example-of-use","children":[]}],"git":{"createdTime":1701014283000,"updatedTime":1706629419000,"contributors":[{"name":"NIANIANKNIA","email":"nianianknia@163.com","commits":2}]},"readingTime":{"minutes":7.51,"words":2253},"filePathRelative":"en-US/dev/Http-Bot.md","localizedDate":"November 26, 2023","copyright":{"author":"NIA服务器","license":"CC-BY-NC-SA-4.0"},"autoDesc":true}');export{e as data}; diff --git a/assets/Illustrated.html-CWuQ7BxR.js b/assets/Illustrated.html-CWuQ7BxR.js new file mode 100644 index 00000000..b8988d6f --- /dev/null +++ b/assets/Illustrated.html-CWuQ7BxR.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-6811cfd5","path":"/play-guide/Illustrated.html","title":"📜服务器图鉴","lang":"zh-CN","frontmatter":{"lang":"zh-CN","title":"📜服务器图鉴","description":"变动中数据提醒 以下数据均基于测试服数据,数据仍会出现较大变动,具体请以正式服为准 NIA服务器V4.5版本的全新基本设定,你可以在这里查询到任何你想知道的关于服务器的设定! 🚨基本玩法 服务器主要玩法仍是以原版生存为基础的的扩展玩法 💵货币系统 金币:通过击杀怪物或击败boss获取,用于升级装备武器、打磨宝石、玩家交易; 魔币:通过挖掘魔石原矿获...","head":[["meta",{"property":"og:url","content":"https://docs.mcnia.com/play-guide/Illustrated.html"}],["meta",{"property":"og:site_name","content":"NIA服务器"}],["meta",{"property":"og:title","content":"📜服务器图鉴"}],["meta",{"property":"og:description","content":"变动中数据提醒 以下数据均基于测试服数据,数据仍会出现较大变动,具体请以正式服为准 NIA服务器V4.5版本的全新基本设定,你可以在这里查询到任何你想知道的关于服务器的设定! 🚨基本玩法 服务器主要玩法仍是以原版生存为基础的的扩展玩法 💵货币系统 金币:通过击杀怪物或击败boss获取,用于升级装备武器、打磨宝石、玩家交易; 魔币:通过挖掘魔石原矿获..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2023-11-26T15:58:03.000Z"}],["meta",{"property":"article:modified_time","content":"2023-11-26T15:58:03.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"📜服务器图鉴\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2023-11-26T15:58:03.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"🚨基本玩法","slug":"🚨基本玩法","link":"#🚨基本玩法","children":[]},{"level":3,"title":"💵货币系统","slug":"💵货币系统","link":"#💵货币系统","children":[]},{"level":3,"title":"材料与升级","slug":"材料与升级","link":"#材料与升级","children":[]},{"level":3,"title":"七大元素","slug":"七大元素","link":"#七大元素","children":[]},{"level":3,"title":"七大元素剑","slug":"七大元素剑","link":"#七大元素剑","children":[]},{"level":3,"title":"PVP系统","slug":"pvp系统","link":"#pvp系统","children":[]},{"level":3,"title":"(测试内容)合成表","slug":"测试内容-合成表","link":"#测试内容-合成表","children":[]},{"level":3,"title":"🧊服务器背景故事设定","slug":"🧊服务器背景故事设定","link":"#🧊服务器背景故事设定","children":[]},{"level":3,"title":"🚨基本玩法","slug":"🚨基本玩法-1","link":"#🚨基本玩法-1","children":[]},{"level":3,"title":"🗻所有空岛类型","slug":"🗻所有空岛类型","link":"#🗻所有空岛类型","children":[]},{"level":3,"title":"💵货币系统","slug":"💵货币系统-1","link":"#💵货币系统-1","children":[]},{"level":3,"title":"🫧氧气值设定","slug":"🫧氧气值设定","link":"#🫧氧气值设定","children":[]},{"level":3,"title":"🤖\\"呼吸装备\\"设定","slug":"🤖-呼吸装备-设定","link":"#🤖-呼吸装备-设定","children":[]},{"level":3,"title":"🤿如何获得氧气?","slug":"🤿如何获得氧气","link":"#🤿如何获得氧气","children":[]},{"level":3,"title":"🥖体力系统","slug":"🥖体力系统","link":"#🥖体力系统","children":[]},{"level":3,"title":"🧩等级系统","slug":"🧩等级系统","link":"#🧩等级系统","children":[]},{"level":3,"title":"💎随机矿场","slug":"💎随机矿场","link":"#💎随机矿场","children":[]},{"level":3,"title":"🎃副本系统","slug":"🎃副本系统","link":"#🎃副本系统","children":[]}],"git":{"createdTime":1701014283000,"updatedTime":1701014283000,"contributors":[{"name":"NIANIANKNIA","email":"nianianknia@163.com","commits":1}]},"readingTime":{"minutes":10.96,"words":3289},"filePathRelative":"play-guide/Illustrated.md","localizedDate":"2023年11月26日","copyright":{"author":"NIA服务器","license":"CC-BY-NC-SA-4.0"},"autoDesc":true}');export{e as data}; diff --git a/assets/Illustrated.html-yw1DKwVc.js b/assets/Illustrated.html-yw1DKwVc.js new file mode 100644 index 00000000..48d38780 --- /dev/null +++ b/assets/Illustrated.html-yw1DKwVc.js @@ -0,0 +1 @@ +import{_ as i}from"./plugin-vue_export-helper-DlAUqK2U.js";import{r as s,o,c as g,a as t,d as r,w as d,b as e,e as l}from"./app-Rh3tvdAp.js";const n="/items/sword/dark_sword.png",c="/island/forest.png",h="/island/island1.png",p="/island/bamboo.png",x="/island/catcoffee.png",y="/island/ore.png",u="/island/island2.png",f="/island/hell1.png",b="/island/poorisland.png",_="/island/bottle.png",m={},E=l('变动中数据提醒
以下数据均基于测试服数据,数据仍会出现较大变动,具体请以正式服为准
NIA服务器V4.5版本的全新基本设定,你可以在这里查询到任何你想知道的关于服务器的设定!
服务器主要玩法仍是以原版生存为基础的的扩展玩法
金币:通过击杀怪物或击败boss获取,用于升级装备武器、打磨宝石、玩家交易
魔币:通过挖掘魔石原矿获得(2~5颗)或者通过使用铁匠铺功能的熔炼使用(原版矿物)进行转换获得,用于换取装饰方块和基础物资
服务器所有商品价格/回收价格均基于基础物价*物价指数
其中物价指数将每小时更新一次,其中物价指数的生成规则为:
理论上服务器生成的物价指数分布符合以100
为均值,20
为方差的标准正态分布(物价指数将取随机生成后的数据除以100并保留两位小数的处理)
根据标准正态分布曲线,将有99.74%的数据分布于0.4-1.6
同时为了保障服务器正常运行,所有物价指数最后输出范围被限制在0.2-1.8
即小于0.2
物价指数为0.2
,大于1.8
的物价指数为1.8
注:物价指数仅仅影响金币相关交易,并不影响魔币交易
下表中的X代表暗、火、空、岩、灵、雷、水
七大元素
x元素矿石:通过在不同的元素空岛上挖掘,使用熔炉烧制获得元素锭
x元素锭:用于武器装备升级以及合成注入魔力的元素锭
x元素瓶:通过地牢中的宝箱有概率获得用于武器装备升级以及合成注入魔力的元素锭
x元素晶体:通过挖掘元素原矿有概率获得或击败怪物、boss、地牢宝箱有概率获得,用于铁匠铺打磨宝石
●x元素宝石:通过铁匠铺打磨获得,用于武器装备升级以及合成注入魔力的元素锭
●注入魔力的x元素锭:通过合成获得,用于合成武器装备以及升级
●灵魂残片:通过击杀怪物获得,用于合成灵魂
●灵魂:用于武器装备升级,和打磨宝石材料
在这个世界由暗、火、空、岩、灵、雷、水
七大元素构成。
基础攻击力:6
基础耐久值:1000
特殊效果:在攻击敌人命中后立即造成一次额外的2点伤害,该伤害无视护甲防御值,同时敌人获得2s失明效果。
基础攻击力:8
基础耐久值:800
特殊效果:在攻击敌人命中后给敌人附加持续之火效果,在此效果下,5s内敌人喝抗火药水、进入水中均无法消除此状态,在此状态下敌人会持续受到火焰伤害。
基础攻击力:4
基础耐久值:1200
特殊效果:在攻击敌人命中后,敌人获得3s漂浮效果,同时在装备该武器后获得速度效果
基础攻击力:6
基础耐久值:2000
特殊效果:在攻击有护甲装备的敌人命中时,会大大加速敌方护甲耐久值损耗速度。
基础攻击力:7
基础耐久值:1000
特殊效果:在攻击敌人命中后,敌人获得凋零1秒、缓慢3秒。
基础攻击力:7
基础耐久值:1500
特殊效果:在攻击敌人命中后,会在敌人所在位置立刻产生三道落雷,同时敌人获得2s缓慢效果。
基础攻击力:4
基础耐久值:1800
特殊效果:在攻击敌人命中后,会立刻恢复自身生命值2点,同时对敌人施加中毒5s的效果。
玩家双方可以通过菜单进入pvp系统,双方自行选择pvp模式后,在开始
1 | 2 | 3 | 合成所得 | |
---|---|---|---|---|
=> | ||||
过时页面提醒
下方页面部分内容过时,仅供参考!
NIA服务器V4版本的基本设定,你可以在这里查询到任何你想知道的关于服务器的设定!
敬请期待 其实是没人写
或许可以借助这个东西赚个差价呢
那么...
前面的区域,就请你自己探索吧!
丛林风格的空岛,拥有较大的空间以及资源,岛上甚至还有两只羊!是萌新开始空岛生存的不二之选!
多种群落杂糅在一起的一个小岛,空间较为紧凑,同样没有奖励箱,但也是很美观的一个小岛
竹园小岛,遍布竹子,有一个小亭子,溪流,场景十分安详!
一个猫猫样式的屋子!猛男生存必备...作者这样说道...
一个小岛,上面有蜂巢,底下也有一定的矿产!
一个“破败的”小岛,布满蜘蛛网,但是有奖励箱子,甚至还有一个村民蛋?
下界风格的小空岛,资源比较匮乏,生存难度较高,适合以下界为主建筑风格的玩家
一个主体由石头构成的岛,资源比较贫瘠,可能在上面生存比较困难吧。
一个小小的玻璃瓶里承载了小岛的全部物质~
货币名为能源币,基准为一颗钻石1000货币
服务器商店回收木头,农作物,石头等物品
服务器所有商品价格/回收价格均基于基础物价*物价指数
其中物价指数将每小时更新一次,其中物价指数的生成规则为:
理论上服务器生成的物价指数分布符合以100
为均值,20
为方差的标准正态分布(物价指数将取随机生成后的数据除以100并保留两位小数的处理)
根据标准正态分布曲线,将有99.74%的数据分布于0.4-1.6
同时为了保障服务器正常运行,所有物价指数最后输出范围被限制在0.2-1.8
附表:基础物品基础物价表
物品名称 | 售卖价格 | 回收价格 | 所属种类 | 备注 |
---|---|---|---|---|
钻石 | - | 1000 | 矿石 | - |
敬请期待 |
玩家初始拥有“初始呼吸装备”便获得5000/5000点氧气值 (前面为如今氧气值,后面的为初始等级氧气值最大容量)
以下所有数值除非说明否则均以“初始呼吸装备”为准
当玩家在线时,氧气值将以每分钟20点减少
当氧气值≥14000时玩家血量将由20点变为40点(评估中功能,暂未上线)
当氧气值≥10000时玩家获得跳跃提升1提升(评估中功能,暂未上线)
当氧气值≥4800时玩家获得力量1提升
当氧气值≥3500时玩家获得生命恢复1提升
当氧气值≤200时玩家获得缓慢/虚弱效果
当氧气值归零超过1分钟获得失明/挖掘疲劳/反胃效果
当氧气值归零超过4分钟,玩家直接死亡并强制重生至"医院",在"医院"强制支付50能源币进行治疗,并获得200氧气值用于生命的基本维持,玩家需在下次氧气值归零前购买足够的氧气用于保命。
玩家可以通过升级自己的呼吸装备来获得更高等级的效果
装备名称 | 最大氧气值 | 每分钟损耗氧气值 | 升级所消耗能源币 | 特殊效果 |
---|---|---|---|---|
初级呼吸装备Ⅰ | 5000 | 20 | - | - |
初级呼吸装备Ⅱ | 5300 | 19 | 100 | - |
初级呼吸装备Ⅲ | 5500 | 18 | 300 | - |
中级呼吸装备Ⅰ | 5800 | 18 | 500 | - |
中级呼吸装备Ⅱ | 6000 | 17 | 1000 | - |
中级呼吸装备Ⅲ | 6000 | 16 | 1200 | - |
高级呼吸装备Ⅰ | 6300 | 16 | 1500 | - |
高级呼吸装备Ⅱ | 6500 | 15 | 2000 | - |
高级呼吸装备Ⅲ | 6500 | 14 | 2500 | - |
X级呼吸装备Ⅰ | 7000 | 13 | 5000 | - |
X级呼吸装备Ⅱ | 8000 | 13 | 8000 | - |
X级呼吸装备Ⅲ | 9000 | 12 | 10000 | - |
X级呼吸装备Ⅳ | 10000 | 11 | 10000 | - |
X级呼吸装备Ⅴ | 15000 | 10 | 15000 | - |
S级呼吸装备Ⅰ | 15000 | 5 | 20000 | 当氧气值≥3500时玩家获得生命恢复2提升 |
S级呼吸装备Ⅱ | 15000 | 3 | 30000 | 当氧气值≥3500时玩家获得生命恢复3提升(评估中功能,暂未上线) |
S级呼吸装备Ⅲ | 15000 | 2 | 40000 | 当氧气值≥4800时玩家获得力量2提升 |
V型呼吸装备 | 15000 | 1 | 50000 | 装备者可获得无限时间的夜视效果 (评估中功能,暂未上线) |
注:“特殊效果”一栏如果为“-”,则代表正向增益buff按照氧气值设定中初始设定实行,如果没有特殊说明,默认更高级的装备支持低级装备所有功能,玩家不可以跨级升级。
当玩家在拥有X级呼吸装备Ⅰ之前进入下界,将会获得缓慢、虚弱的效果,同时氧气值消耗速度增加100%
当玩家在拥有S级呼吸装备Ⅰ之前进入末地,将会获得缓慢、虚弱的效果,同时氧气值消耗速度增加200%
当玩家在拥有V级呼吸装备之前,每次死亡将扣除剩余氧气值10%
①从商店购买"氧气制造机"(虚拟的)当玩家在线每分钟按照级别将产生5/8/10的氧气值直接至玩家氧气值中直到玩家氧气值满(评估中功能,暂未上线)
②从商店直接使用货币购买氧气值(1能源币购买10氧气值)
③接收其他玩家的"有损"转送氧气值(玩家a给玩家b转送氧气,由于过程中损耗,玩家b只能收到50-95%
的氧气)
④敬请期待...
玩家不在线时每十分钟回一个体力值,体力值基础最大值160
格,玩家在线时每分钟回一格体力值,体力值可以用于进入矿场、刷怪场、跑酷等可以获得矿物、突破素材、货币的场所
敬请期待
每次进入花费40
体力值获取15
分钟采矿权(进入矿场才计算时间,采矿时间在矿场更新前有效)
矿场每次更新时间是每天的晚上12点
在矿场更新时所有在矿场玩家将会被强制传出,且当天采矿剩余时间清零,重新计算
敬请期待
*所有名称、数值均为开发中内容,具体请以游戏正式服为准
*本服务器与现实没有任何关系,所有设定均为游戏需要,现实请勿模仿
',76);function S(j,L){const a=s("RouterLink");return o(),g("div",null,[E,t("p",null,[r(a,{to:"/play-guide/Illustrated.html#%F0%9F%97%BB%E6%89%80%E6%9C%89%E7%A9%BA%E5%B2%9B%E7%B1%BB%E5%9E%8B"},{default:d(()=>[B]),_:1}),e(",在岛上开始你的生存~")]),A,t("p",null,[e("至于获取资源嘛...了解一下"),r(a,{to:"/play-guide/Illustrated.html#%F0%9F%92%8E%E9%9A%8F%E6%9C%BA%E7%9F%BF%E5%9C%BA"},{default:d(()=>[F]),_:1}),e("?")]),z,t("p",null,[e("哦对了,在这个大陆,你需要使用一种叫做"),r(a,{to:"/play-guide/Illustrated.html#%F0%9F%92%B5%E8%B4%A7%E5%B8%81%E7%B3%BB%E7%BB%9F"},{default:d(()=>[q]),_:1}),e("的东西来进行交易")]),I,k,v,t("p",null,[e("在获取资源的过程中,你要时刻关注自己的"),r(a,{to:"/play-guide/Illustrated.html#%F0%9F%AB%A7%E6%B0%A7%E6%B0%94%E5%80%BC%E8%AE%BE%E5%AE%9A"},{default:d(()=>[N]),_:1})]),t("p",null,[e("使用能源币升级"),r(a,{to:"/play-guide/Illustrated.html#%F0%9F%A4%96%E5%91%BC%E5%90%B8%E8%A3%85%E5%A4%87%E8%AE%BE%E5%AE%9A"},{default:d(()=>[V]),_:1}),e(",这会使你氧气容量上限增加,氧气消耗速度也会变慢。")]),t("p",null,[e("如何获取氧气呢?"),r(a,{to:"/play-guide/Illustrated.html#%F0%9F%A4%BF%E5%A6%82%E4%BD%95%E8%8E%B7%E5%BE%97%E6%B0%A7%E6%B0%94"},{default:d(()=>[C]),_:1})]),t("p",null,[e("另外,服务器采用了极其先进的正态分布算法来计算"),r(a,{to:"/play-guide/Illustrated.html#%F0%9F%92%B5%E8%B4%A7%E5%B8%81%E7%B3%BB%E7%BB%9F"},{default:d(()=>[X]),_:1})]),w])}const P=i(m,[["render",S],["__file","Illustrated.html.vue"]]);export{P as default}; diff --git a/assets/KillItem.html-3lE0bNPv.js b/assets/KillItem.html-3lE0bNPv.js new file mode 100644 index 00000000..7b01a68e --- /dev/null +++ b/assets/KillItem.html-3lE0bNPv.js @@ -0,0 +1 @@ +import{_ as n}from"./plugin-vue_export-helper-DlAUqK2U.js";import{r as a,o,c as i,a as e,b as t,d as r,e as s}from"./app-Rh3tvdAp.js";const c={},d=s('用于定期清扫服务器掉落物,并拥有回溯已清理掉落物物品的功能。
Used to periodically clean up server drops and has the ability to backtrack items that have been cleared.
{
+ //领地系统性能部分配置
+ //领地计算索引值基准距离
+ //为了保证服务器的流畅运行,DISTANSE参数应满足:DISTANSE * DISTANCE 等于或稍稍小于 MAX_SQUARE,否则可能会导致插件包运行超时而引发“hang”报错
+ "DISTANCE" = 100,
+ //领地系统基础配置
+ //单人最多圈地数量
+ "MAX_LAND_NUM" = 5,
+ //2d/3d领地最大面积(两者均只计算xz平面所占面积)
+ "MAX_SQUARE" = 10000,
+ //2d/3d领地最小面积(两者均只计算xz平面所占面积)
+ "MIN_SQUARE" = 100,
+ //领地价格计算指数
+ //2d领地单面积价格
+ "PRICE_2D" = 300,
+ //3d领地单块价格
+ "PRICE_3D" = 3,
+ //坐标限制范围
+ "X_RANGE" = [-100000,100000],
+ "Y_RANGE" = [-64,256],
+ "Z_RANGE" = [-100000,100000],
+ //金币计分板名称
+ "MONEY_SCOREBOARD_NAME" = "money",
+ "MONEY_SCOREBOARD_DISPLAY_NAME" = "金币"
+}
+
Ntrade目前已经停止维护,不再提供任何技术支持,请尽量不要使用该插件,目前该项目已被基于script-api的插件NiaServer-Core中的market.js替代!
用于实现玩家间交易的一个插件
请参考以下内容修改配置文件
配置文件位置:plugins/Ntrade/config.json
{
+ "marketID": 1, //市场ID,正常情况下不要更改
+ "llmoney": 0, //是否启用llmoney经济,0(false)为不启用,1(true)为启用
+ "MoneyScoresBoardName": "money", //如果为计分板经济,相应的计分板名称
+ "Password": "123456", //下架授权码
+ "BanItems": [
+ {
+ "type": "minecraft:clock", //禁止上架的物品id
+ "aux": -1 //禁止上架的物品特殊值(-1就是不限制特殊值)
+ }
+ ],
+ "language": "zh_CN", //插件的主语言 en_US 为英语
+ "AutoOffShelfTime": 72, //自动下架的时间(单位:小时),设置为-1则不会自动下架
+ "TaxRate": 0 //转账税率,设置为0则不收手续费,若有需求,请自行更改为[0,1)的任意数字
+}
+
1.修改完成配置文件后开服即可使用
2.在服务器中输入/trade指令打开GUI进行相应操作
3.您可以输入/opentradegui @p给最近的玩家打开交易市场GUI
`,8);function v(b,_){const a=p("ExternalLinkIcon");return r(),l("div",null,[i,n("ol",null,[n("li",null,[n("p",null,[s("配置好相应的BDS服务端,并安装好"),n("a",u,[s("LiteLoader"),e(a)])])]),n("li",null,[n("p",null,[s("下载最新版本的"),n("a",d,[s("Ntrade"),e(a)])])]),m,k]),h])}const g=o(c,[["render",v],["__file","Ntrade.html.vue"]]);export{g as default}; diff --git a/assets/Ntrade.html-CXpVSDrm.js b/assets/Ntrade.html-CXpVSDrm.js new file mode 100644 index 00000000..ff8818b2 --- /dev/null +++ b/assets/Ntrade.html-CXpVSDrm.js @@ -0,0 +1 @@ +const e=JSON.parse('{"key":"v-c2a19aba","path":"/en-US/dev/Ntrade.html","title":"📦Ntrade tutorial","lang":"en-US","frontmatter":{"lang":"en-US","title":"📦Ntrade tutorial","description":"Ntrade has stopped maintenance and no longer provides any technical support. Please try not to use this plug-in. The project has been replaced by market.js in the script-api-bas...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://docs.mcnia.com/dev/Ntrade.html"}],["meta",{"property":"og:url","content":"https://docs.mcnia.com/en-US/dev/Ntrade.html"}],["meta",{"property":"og:site_name","content":"NIA-Server"}],["meta",{"property":"og:title","content":"📦Ntrade tutorial"}],["meta",{"property":"og:description","content":"Ntrade has stopped maintenance and no longer provides any technical support. Please try not to use this plug-in. The project has been replaced by market.js in the script-api-bas..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-01-30T15:43:39.000Z"}],["meta",{"property":"article:modified_time","content":"2024-01-30T15:43:39.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"📦Ntrade tutorial\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2024-01-30T15:43:39.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":3,"title":"Plugin function","slug":"plugin-function","link":"#plugin-function","children":[]},{"level":3,"title":"Initialize the plugin","slug":"initialize-the-plugin","link":"#initialize-the-plugin","children":[]},{"level":3,"title":"Modify the configuration file","slug":"modify-the-configuration-file","link":"#modify-the-configuration-file","children":[]},{"level":3,"title":"Get started","slug":"get-started","link":"#get-started","children":[]}],"git":{"createdTime":1701014283000,"updatedTime":1706629419000,"contributors":[{"name":"NIANIANKNIA","email":"nianianknia@163.com","commits":3}]},"readingTime":{"minutes":1,"words":299},"filePathRelative":"en-US/dev/Ntrade.md","localizedDate":"November 26, 2023","copyright":{"author":"NIA服务器","license":"CC-BY-NC-SA-4.0"},"autoDesc":true}');export{e as data}; diff --git a/assets/Ntrade.html-D7gCsZmu.js b/assets/Ntrade.html-D7gCsZmu.js new file mode 100644 index 00000000..d8006561 --- /dev/null +++ b/assets/Ntrade.html-D7gCsZmu.js @@ -0,0 +1,16 @@ +import{_ as o}from"./plugin-vue_export-helper-DlAUqK2U.js";import{r as i,o as r,c as l,a as n,b as e,d as s,e as t}from"./app-Rh3tvdAp.js";const p={},c=t('Ntrade has stopped maintenance and no longer provides any technical support. Please try not to use this plug-in. The project has been replaced by market.js in the script-api-based plug-in NiaServer-Core!
A plugin for interplayer transactions
Please refer to the following to modify the configuration file
Configuration file location: plugins/Ntrade/config.json
{
+ "MarketID": 1, //Market ID, do not change under normal circumstances
+ "llmoney": 0, // whether to enable llmoney economy, 0 (false) is not enabled, 1 (true) is enabled
+ "MoneyScoresBoardName": "money", // If for scoreboard economy, the corresponding scoreboard name
+ "Password": "123456", //Remove Authorization Code
+ "BanItems": [
+ {
+ "type": "minecraft:clock", //prohibited item id
+ "aux": -1 // Prohibited items with special values (-1 means no restriction on special values)
+ }
+ ],
+ "language": "en_US", //the main language of the plugin, en_US is English and zh_CN is Chinese
+ "AutoOffShelfTime": 72, // Automatic removal time (in hours), set to -1 will not automatically take off the shelves
+ "TaxRate": 0 // Transfer tax rate, set to 0 will not charge a fee, if necessary, please change to any number of [0,1) by yourself
+}
+
After modifying the configuration file, you can use it after opening the service
Enter the /trade command in the server to open the GUI and perform the corresponding operation
You can enter the /opentradegui @p open the marketplace GUI to the nearest player
{
+ "sell_data": [
+ {
+ "name": "一些免费赠送的东西",
+ "description": "无限次免费购买(",
+ "image": "textures/ui/gift_square.png",
+ "content": [
+ {
+ "name": "钟表",
+ "type": "minecraft:clock",
+ "price": 50,
+ "discount": 0,
+ "data": 0,
+ "image": "textures/items/clock_item"
+ }
+ ]
+ },
+ {
+ "name": "杂项商店",
+ "description": "卖一些杂七杂八的东西",
+ "image": "textures/items/apple_golden",
+ "content": [
+ {
+ "name": "附魔金苹果",
+ "type": "minecraft:enchanted_golden_apple",
+ "price": 500,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/items/apple_golden"
+ },
+ {
+ "name": "三叉戟",
+ "type": "minecraft:trident",
+ "price": 5000,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/items/trident"
+ },
+ {
+ "name": "细雪桶",
+ "type": "minecraft:powder_snow_bucket",
+ "price": 400,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/items/bucket_powder_snow"
+ },
+ {
+ "name": "经验瓶",
+ "type": "minecraft:experience_bottle",
+ "price": 400,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/items/experience_bottle"
+ }
+ ]
+ },
+ {
+ "name": "生物蛋?",
+ "description": "值钱玩意家人",
+ "image": "textures/items/egg_villager",
+ "content": [
+ {
+ "name": "村民蛋",
+ "type": "minecraft:villager_spawn_egg",
+ "price": 12000,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/items/egg_villager"
+ },
+ {
+ "name": "猫猫蛋",
+ "type": "minecraft:cat_spawn_egg",
+ "price": 15000,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/items/egg_cat"
+ },
+ {
+ "name": "狼蛋",
+ "type": "minecraft:wolf_spawn_egg",
+ "price": 15000,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/items/egg_wolf"
+ },
+ {
+ "name": "鹦鹉蛋",
+ "type": "minecraft:parrot_spawn_egg",
+ "price": 15000,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/items/egg_parrot"
+ },
+ {
+ "name": "熊猫蛋",
+ "type": "minecraft:panda_spawn_egg",
+ "price": 50000,
+ "discount": 0.8,
+ "data": 0,
+ "image": "textures/items/egg_panda"
+ }
+ ]
+ },
+ {
+ "name": "树苗",
+ "description": "在这里售卖各种各样的树苗!",
+ "image": "textures/blocks/sapling_oak",
+ "content": [
+ {
+ "name": "橡树苗",
+ "type": "minecraft:sapling",
+ "price": 100,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/blocks/sapling_oak"
+ },
+ {
+ "name": "云杉树苗",
+ "type": "minecraft:sapling",
+ "price": 100,
+ "discount": 1,
+ "data": 1,
+ "image": "textures/blocks/sapling_spruce"
+ },
+ {
+ "name": "桦树苗",
+ "type": "minecraft:sapling",
+ "price": 100,
+ "discount": 1,
+ "data": 2,
+ "image": "textures/blocks/sapling_birch"
+ },
+ {
+ "name": "丛林树苗",
+ "type": "minecraft:sapling",
+ "price": 100,
+ "discount": 1,
+ "data": 3,
+ "image": "textures/blocks/sapling_jungle"
+ },
+ {
+ "name": "金合欢树苗",
+ "type": "minecraft:sapling",
+ "price": 100,
+ "discount": 1,
+ "data": 4,
+ "image": "textures/blocks/sapling_acacia"
+ },
+ {
+ "name": "深色橡树苗",
+ "type": "minecraft:sapling",
+ "price": 100,
+ "discount": 1,
+ "data": 5,
+ "image": "textures/blocks/sapling_roofed_oak"
+ },
+ {
+ "name": "红树胎生苗",
+ "type": "minecraft:mangrove_propagule",
+ "price": 150,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/blocks/mangrove_propagule"
+ },
+ {
+ "name": "樱花树苗",
+ "type": "minecraft:cherry_sapling",
+ "price": 150,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/blocks/cherry_sapling"
+ }
+ ]
+ },
+ {
+ "name": "珊瑚相关方块",
+ "description": "采摘于稻妻海祗岛,品质值得信赖",
+ "image": "textures/blocks/coral_fan_pink",
+ "content": [
+ {
+ "name": "管珊瑚块",
+ "type": "minecraft:coral_block",
+ "price": 60,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/blocks/coral_blue"
+ },
+ {
+ "name": "脑纹珊瑚块",
+ "type": "minecraft:coral_block",
+ "price": 60,
+ "discount": 1,
+ "data": 1,
+ "image": "textures/blocks/coral_pink"
+ },
+ {
+ "name": "气泡珊瑚块",
+ "type": "minecraft:coral_block",
+ "price": 60,
+ "discount": 1,
+ "data": 2,
+ "image": "textures/blocks/coral_purple"
+ },
+ {
+ "name": "火珊瑚块",
+ "type": "minecraft:coral_block",
+ "price": 60,
+ "discount": 1,
+ "data": 3,
+ "image": "textures/blocks/coral_red"
+ },
+ {
+ "name": "鹿角珊瑚块",
+ "type": "minecraft:coral_block",
+ "price": 60,
+ "discount": 1,
+ "data": 4,
+ "image": "textures/blocks/coral_yellow"
+ },
+ {
+ "name": "管珊瑚",
+ "type": "minecraft:coral",
+ "price": 60,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/blocks/coral_fan_blue"
+ },
+ {
+ "name": "脑纹珊瑚",
+ "type": "minecraft:coral",
+ "price": 60,
+ "discount": 1,
+ "data": 1,
+ "image": "textures/blocks/coral_fan_pink"
+ },
+ {
+ "name": "气泡珊瑚",
+ "type": "minecraft:coral",
+ "price": 60,
+ "discount": 1,
+ "data": 2,
+ "image": "textures/blocks/coral_fan_purple"
+ },
+ {
+ "name": "火珊瑚",
+ "type": "minecraft:coral",
+ "price": 60,
+ "discount": 1,
+ "data": 3,
+ "image": "textures/blocks/coral_fan_red"
+ },
+ {
+ "name": "鹿角珊瑚",
+ "type": "minecraft:coral",
+ "price": 60,
+ "discount": 1,
+ "data": 4,
+ "image": "textures/blocks/coral_fan_yellow"
+ }
+ ]
+ },
+ {
+ "name": "其他的杂项方块",
+ "description": "在这里购买其他杂项方块",
+ "image": "textures/blocks/grass_side_carried",
+ "content": [
+ {
+ "name": "泥土方块",
+ "type": "minecraft:dirt",
+ "price": 50,
+ "discount": 0.8,
+ "data": 0,
+ "image": "textures/blocks/dirt"
+ },
+ {
+ "name": "草方块",
+ "type": "minecraft:grass",
+ "price": 150,
+ "discount": 0.8,
+ "data": 0,
+ "image": "textures/blocks/grass_side_carried"
+ },
+ {
+ "name": "沙砾",
+ "type": "minecraft:gravel",
+ "price": 50,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/blocks/gravel"
+ },
+ {
+ "name": "沙子",
+ "type": "minecraft:sand",
+ "price": 50,
+ "discount": 0.8,
+ "data": 0,
+ "image": "textures/blocks/sand"
+ },
+ {
+ "name": "浮冰",
+ "type": "minecraft:packed_ice",
+ "price": 40,
+ "discount": 0.75,
+ "data": 0,
+ "image": "textures/blocks/ice_packed"
+ },
+ {
+ "name": "赭黄蛙明灯",
+ "type": "minecraft:ochre_froglight",
+ "price": 500,
+ "discount": 0.8,
+ "data": 0,
+ "image": "textures/blocks/ochre_froglight_side"
+ },
+ {
+ "name": "珠光蛙明灯",
+ "type": "minecraft:pearlescent_froglight",
+ "price": 500,
+ "discount": 0.8,
+ "data": 0,
+ "image": "textures/blocks/pearlescent_froglight_side"
+ },
+ {
+ "name": "青翠蛙明灯",
+ "type": "minecraft:verdant_froglight",
+ "price": 500,
+ "discount": 0.8,
+ "data": 0,
+ "image": "textures/blocks/verdant_froglight_side"
+ },
+ {
+ "name": "海晶灯(贴图错了",
+ "type": "minecraft:sea_lantern",
+ "price": 500,
+ "discount": 0.8,
+ "data": 0,
+ "image": "textures/blocks/sea_lantern"
+ }
+ ]
+ },
+ {
+ "name": "各种陶瓦方块",
+ "description": "在这里购买陶瓦相关方块",
+ "image": "textures/blocks/hardened_clay",
+ "content": [
+ {
+ "name": "陶瓦",
+ "type": "minecraft:hardened_clay",
+ "price": 100,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/blocks/hardened_clay"
+ },
+ {
+ "name": "橙色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 1,
+ "image": "textures/blocks/hardened_clay_stained_orange"
+ },
+ {
+ "name": "品红色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 2,
+ "image": "textures/blocks/hardened_clay_stained_magenta"
+ },
+ {
+ "name": "淡蓝色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 3,
+ "image": "textures/blocks/hardened_clay_stained_light_blue"
+ },
+ {
+ "name": "黄色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 4,
+ "image": "textures/blocks/hardened_clay_stained_yellow"
+ },
+ {
+ "name": "黄绿色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 5,
+ "image": "textures/blocks/hardened_clay_stained_lime"
+ },
+ {
+ "name": "粉红色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 6,
+ "image": "textures/blocks/hardened_clay_stained_pink"
+ },
+ {
+ "name": "灰色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 7,
+ "image": "textures/blocks/hardened_clay_stained_gray"
+ },
+ {
+ "name": "淡灰色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 8,
+ "image": "textures/blocks/hardened_clay_stained_silver"
+ },
+ {
+ "name": "青色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 9,
+ "image": "textures/blocks/hardened_clay_stained_cyan"
+ },
+ {
+ "name": "紫色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 10,
+ "image": "textures/blocks/hardened_clay_stained_purple"
+ },
+ {
+ "name": "蓝色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 11,
+ "image": "textures/blocks/hardened_clay_stained_blue"
+ },
+ {
+ "name": "棕色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 12,
+ "image": "textures/blocks/hardened_clay_stained_brown"
+ },
+ {
+ "name": "绿色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 13,
+ "image": "textures/blocks/hardened_clay_stained_green"
+ },
+ {
+ "name": "红色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 14,
+ "image": "textures/blocks/hardened_clay_stained_red"
+ },
+ {
+ "name": "黑色陶瓦",
+ "type": "minecraft:stained_hardened_clay",
+ "price": 120,
+ "discount": 1,
+ "data": 15,
+ "image": "textures/blocks/hardened_clay_stained_black"
+ }
+ ]
+ },
+ {
+ "name": "各种石头相关方块",
+ "description": "在这里购买石头相关方块",
+ "image": "textures/blocks/stone",
+ "content": [
+ {
+ "name": "石头",
+ "type": "minecraft:stone",
+ "price": 80,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/blocks/stone"
+ },
+ {
+ "name": "花岗岩",
+ "type": "minecraft:stone",
+ "price": 80,
+ "discount": 1,
+ "data": 1,
+ "image": "textures/blocks/stone_granite"
+ },
+ {
+ "name": "磨制花岗岩",
+ "type": "minecraft:stone",
+ "price": 100,
+ "discount": 1,
+ "data": 2,
+ "image": "textures/blocks/stone_granite_smooth"
+ },
+ {
+ "name": "闪长岩",
+ "type": "minecraft:stone",
+ "price": 80,
+ "discount": 1,
+ "data": 3,
+ "image": "textures/blocks/stone_diorite"
+ },
+ {
+ "name": "磨制闪长岩",
+ "type": "minecraft:stone",
+ "price": 100,
+ "discount": 1,
+ "data": 4,
+ "image": "textures/blocks/stone_diorite_smooth"
+ },
+ {
+ "name": "安山岩",
+ "type": "minecraft:stone",
+ "price": 80,
+ "discount": 1,
+ "data": 5,
+ "image": "textures/blocks/stone_andesite"
+ },
+ {
+ "name": "磨制安山岩",
+ "type": "minecraft:stone",
+ "price": 100,
+ "discount": 1,
+ "data": 6,
+ "image": "textures/blocks/stone_andesite_smooth"
+ }
+ ]
+ },
+ {
+ "name": "红石相关物品",
+ "description": "在这里购买红石相关的物品",
+ "image": "textures/blocks/redstone_torch_on",
+ "content": [
+ {
+ "name": "漏斗",
+ "type": "minecraft:hopper",
+ "price": 2000,
+ "discount": 0.95,
+ "data": 0,
+ "image": "textures/items/hopper"
+ },
+ {
+ "name": "活塞",
+ "type": "minecraft:piston",
+ "price": 500,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/blocks/piston_side"
+ },
+ {
+ "name": "粘液球",
+ "type": "minecraft:slime_ball",
+ "price": 100,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/items/slimeball"
+ },
+ {
+ "name": "红石中继器",
+ "type": "minecraft:repeater",
+ "price": 1000,
+ "discount": 0.6,
+ "data": 0,
+ "image": "textures/items/repeater"
+ },
+ {
+ "name": "红石比较器",
+ "type": "minecraft:comparator",
+ "price": 1000,
+ "discount": 0.6,
+ "data": 0,
+ "image": "textures/items/comparator"
+ },
+ {
+ "name": "发射器",
+ "type": "minecraft:dispenser",
+ "price": 1000,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/blocks/dispenser_front_horizontal"
+ },
+ {
+ "name": "投掷器",
+ "type": "minecraft:dropper",
+ "price": 600,
+ "discount": 1,
+ "data": 0,
+ "image": "textures/blocks/dropper_front_horizontal"
+ }
+ ]
+ }
+ ],
+ "recycle_data": [
+ {
+ "name": "jiansyuan的小当铺",
+ "description": "童叟无欺,老少皆宜~",
+ "image": "textures/ui/village_hero_effect",
+ "content": [
+ {
+ "name": "腐肉肉,恶心心",
+ "type": "minecraft:rotten_flesh",
+ "price": 5,
+ "data": 0,
+ "image": "textures/items/rotten_flesh",
+ "lim": true,
+ "limnum": 48
+ },
+ {
+ "name": "生牛肉",
+ "type": "minecraft:beef",
+ "price": 15,
+ "data": 0,
+ "image": "textures/items/beef_raw",
+ "lim": false
+ },
+ {
+ "name": "生猪肉",
+ "type": "minecraft:porkchop",
+ "price": 15,
+ "data": 0,
+ "image": "textures/items/porkchop_raw",
+ "lim": false
+ },
+ {
+ "name": "苹果",
+ "type": "minecraft:apple",
+ "price": 20,
+ "data": 0,
+ "image": "textures/items/apple",
+ "lim": false
+ },
+ {
+ "name": "农村自养生土鸡",
+ "type": "minecraft:chicken",
+ "price": 15,
+ "data": 0,
+ "image": "textures/items/chicken_raw",
+ "lim": true,
+ "limnum": 128
+ },
+ {
+ "name": "农村天然土鸡蛋",
+ "type": "minecraft:egg",
+ "price": 20,
+ "data": 0,
+ "image": "textures/items/egg",
+ "lim": true,
+ "limnum": 128
+ },
+ {
+ "name": "非常普通的小麦",
+ "type": "minecraft:wheat",
+ "price": 35,
+ "data": 0,
+ "image": "textures/items/wheat",
+ "lim": true,
+ "limnum": 256
+ },
+ {
+ "name": "熟高档安格斯牛",
+ "type": "minecraft:cooked_beef",
+ "price": 60,
+ "data": 0,
+ "image": "textures/items/beef_cooked",
+ "lim": true,
+ "limnum": 16
+ }
+ ]
+ },
+ {
+ "name": "NIA的小当铺(木匠",
+ "description": "童叟无欺,老少皆宜~",
+ "image": "textures/ui/mashup_world",
+ "content": [
+ {
+ "name": "橡木",
+ "type": "minecraft:oak_log",
+ "price": 40,
+ "data": 0,
+ "image": "textures/blocks/log_oak",
+ "lim": false,
+ "limnum": 0
+ },
+ {
+ "name": "云杉木",
+ "type": "minecraft:spruce_log",
+ "price": 40,
+ "data": 0,
+ "image": "textures/blocks/log_spruce",
+ "lim": false,
+ "limnum": 0
+ },
+ {
+ "name": "白桦木",
+ "type": "minecraft:birch_log",
+ "price": 40,
+ "data": 0,
+ "image": "textures/blocks/log_birch",
+ "lim": false,
+ "limnum": 0
+ },
+ {
+ "name": "丛林木",
+ "type": "minecraft:jungle_log",
+ "price": 40,
+ "data": 0,
+ "image": "textures/blocks/log_jungle",
+ "lim": false,
+ "limnum": 0
+ },
+ {
+ "name": "金合欢原木",
+ "type": "minecraft:acacia_log",
+ "price": 40,
+ "data": 0,
+ "image": "textures/blocks/log_acacia",
+ "lim": false,
+ "limnum": 0
+ },
+ {
+ "name": "深色橡木原木",
+ "type": "minecraft:dark_oak_log",
+ "price": 40,
+ "data": -1,
+ "image": "textures/blocks/log_big_oak",
+ "lim": false,
+ "limnum": 0
+ },
+ {
+ "name": "樱花原木",
+ "type": "minecraft:cherry_log",
+ "price": 40,
+ "data": -1,
+ "image": "textures/blocks/cherry_log_side",
+ "lim": false,
+ "limnum": 0
+ }
+ ]
+ },
+ {
+ "name": "矿物回收",
+ "description": "在这里回收矿物",
+ "image": "textures/items/diamond",
+ "content": [
+ {
+ "name": "煤炭",
+ "type": "minecraft:coal",
+ "price": 50,
+ "data": 0,
+ "image": "textures/items/coal",
+ "lim": true,
+ "limnum": 32
+ },
+ {
+ "name": "红石",
+ "type": "minecraft:redstone",
+ "price": 150,
+ "data": 0,
+ "image": "textures/items/redstone_dust",
+ "lim": true,
+ "limnum": 16
+ },
+ {
+ "name": "青金石",
+ "type": "minecraft:lapis_lazuli",
+ "price": 400,
+ "data": 0,
+ "image": "textures/items/dye_powder_blue",
+ "lim": true,
+ "limnum": 16
+ },
+ {
+ "name": "铁锭",
+ "type": "minecraft:iron_ingot",
+ "price": 150,
+ "data": 0,
+ "image": "textures/items/iron_ingot",
+ "lim": true,
+ "limnum": 16
+ },
+ {
+ "name": "黄金锭",
+ "type": "minecraft:gold_ingot",
+ "price": 450,
+ "data": 0,
+ "image": "textures/items/gold_ingot",
+ "lim": true,
+ "limnum": 16
+ },
+ {
+ "name": "绿宝石",
+ "type": "minecraft:emerald",
+ "price": 700,
+ "data": 0,
+ "image": "textures/items/emerald",
+ "lim": true,
+ "limnum": 16
+ },
+ {
+ "name": "钻石",
+ "type": "minecraft:diamond",
+ "price": 1000,
+ "data": 0,
+ "image": "textures/items/diamond",
+ "lim": true,
+ "limnum": 16
+ },
+ {
+ "name": "下界合金锭",
+ "type": "minecraft:netherite_ingot",
+ "price": 1800,
+ "data": 0,
+ "image": "textures/items/netherite_ingot",
+ "lim": false,
+ "limnum": 0
+ }
+ ]
+ },
+ {
+ "name": "战利品回收",
+ "description": "在这里回收战利品",
+ "image": "textures/items/end_crystal",
+ "content": [
+ {
+ "name": "骨头",
+ "type": "minecraft:bone",
+ "price": 5,
+ "data": -1,
+ "image": "textures/items/bone",
+ "lim": true,
+ "limnum": 48
+ },
+ {
+ "name": "箭矢",
+ "type": "minecraft:arrow",
+ "price": 5,
+ "data": -1,
+ "image": "textures/items/arrow",
+ "lim": true,
+ "limnum": 48
+ },
+ {
+ "name": "炸药",
+ "type": "minecraft:gunpowder",
+ "price": 5,
+ "data": -1,
+ "image": "textures/items/gunpowder",
+ "lim": true,
+ "limnum": 48
+ },
+ {
+ "name": "鞘翅",
+ "type": "minecraft:elytra",
+ "price": 50000,
+ "data": -1,
+ "image": "textures/items/elytra",
+ "lim": false,
+ "limnum": 0
+ },
+ {
+ "name": "龙头",
+ "type": "minecraft:skull",
+ "price": 50000,
+ "data": -1,
+ "image": "",
+ "lim": false,
+ "limnum": 0
+ }
+ ]
+ },
+ {
+ "name": "部分方块回收",
+ "description": "在这里回收一些方块",
+ "image": "textures/blocks/grass_side_carried",
+ "content": [
+ {
+ "name": "草方块",
+ "type": "minecraft:grass",
+ "price": 100,
+ "data": 0,
+ "image": "textures/blocks/grass_side_carried",
+ "lim": true,
+ "limnum": 10
+ },
+ {
+ "name": "圆石",
+ "type": "minecraft:cobblestone",
+ "price": 5,
+ "data": 0,
+ "image": "textures/blocks/cobblestone",
+ "lim": true,
+ "limnum": 512
+ },
+ {
+ "name": "沙砾",
+ "type": "minecraft:gravel",
+ "price": 10,
+ "data": -1,
+ "image": "textures/blocks/gravel",
+ "lim": true,
+ "limnum": 64
+ },
+ {
+ "name": "沙子",
+ "type": "minecraft:sand",
+ "price": 10,
+ "data": -1,
+ "image": "textures/blocks/sand",
+ "lim": true,
+ "limnum": 64
+ },
+ {
+ "name": "陶瓦",
+ "type": "minecraft:hardened_clay",
+ "price": 50,
+ "data": -1,
+ "image": "textures/blocks/hardened_clay",
+ "lim": true,
+ "limnum": 64
+ },
+ {
+ "name": "基岩",
+ "type": "minecraft:bedrock",
+ "price": 0,
+ "data": -1,
+ "image": "textures/blocks/bedrock",
+ "lim": false,
+ "limnum": 0
+ }
+ ]
+ }
+ ]
+}
+
Most of the English part of this document site uses Google Translate. If you feel that some parts of this document are inaccurate, you can click the "Edit this page" button on the page that you want to edit to submit an edit on Github!
Because the NIA-Server can only be played in China, some documents do not provide the corresponding English version for the time being.
U?Ae(h,k,D,!0,!1,Q):z(m,S,A,k,D,F,M,N,Q)},ht=(h,m,S,A,k,D,F,M,N)=>{let R=0;const U=m.length;let Q=h.length-1,J=U-1;for(;R<=Q&&R<=J;){const ne=h[R],oe=m[R]=N?Bt(m[R]):ut(m[R]);if(tn(ne,oe))_(ne,oe,S,null,k,D,F,M,N);else break;R++}for(;R<=Q&&R<=J;){const ne=h[Q],oe=m[J]=N?Bt(m[J]):ut(m[J]);if(tn(ne,oe))_(ne,oe,S,null,k,D,F,M,N);else break;Q--,J--}if(R>Q){if(R<=J){const ne=J+1,oe=neJ)for(;R<=Q;)Pe(h[R],k,D,!0),R++;else{const ne=R,oe=R,_e=new Map;for(R=oe;R<=J;R++){const Ke=m[R]=N?Bt(m[R]):ut(m[R]);Ke.key!=null&&_e.set(Ke.key,R)}let fe,Oe=0;const it=J-oe+1;let sn=!1,ql=0;const Dn=new Array(it);for(R=0;R=it){Pe(Ke,k,D,!0);continue}let mt;if(Ke.key!=null)mt=_e.get(Ke.key);else for(fe=oe;fe<=J;fe++)if(Dn[fe-oe]===0&&tn(Ke,m[fe])){mt=fe;break}mt===void 0?Pe(Ke,k,D,!0):(Dn[mt-oe]=R+1,mt>=ql?ql=mt:sn=!0,_(Ke,m[mt],S,null,k,D,F,M,N),Oe++)}const Wl=sn?id(Dn):hn;for(fe=Wl.length-1,R=it-1;R>=0;R--){const Ke=oe+R,mt=m[Ke],Kl=Ke+1{const{el:D,type:F,transition:M,children:N,shapeFlag:R}=h;if(R&6){Xe(h.component.subTree,m,S,A);return}if(R&128){h.suspense.move(m,S,A);return}if(R&64){F.move(h,m,S,G);return}if(F===Ye){r(D,m,S);for(let Q=0;Q M.enter(D),k);else{const{leave:Q,delayLeave:J,afterLeave:ne}=M,oe=()=>r(D,m,S),_e=()=>{Q(D,()=>{oe(),ne&&ne()})};J?J(D,oe,_e):_e()}else r(D,m,S)},Pe=(h,m,S,A=!1,k=!1)=>{const{type:D,props:F,ref:M,children:N,dynamicChildren:R,shapeFlag:U,patchFlag:Q,dirs:J,memoIndex:ne}=h;if(M!=null&&Vr(M,null,S,h,!0),ne!=null&&(m.renderCache[ne]=void 0),U&256){m.ctx.deactivate(h);return}const oe=U&1&&J,_e=!Un(h);let fe;if(_e&&(fe=F&&F.onVnodeBeforeUnmount)&&et(fe,m,h),U&6)vt(h.component,S,A);else{if(U&128){h.suspense.unmount(S,A);return}oe&>(h,null,m,"beforeUnmount"),U&64?h.type.remove(h,m,S,k,G,A):R&&(D!==Ye||Q>0&&Q&64)?Ae(R,m,S,!1,!0):(D===Ye&&Q&384||!k&&U&16)&&Ae(N,m,S),A&&We(h)}(_e&&(fe=F&&F.onVnodeUnmounted)||oe)&&je(()=>{fe&&et(fe,m,h),oe&>(h,null,m,"unmounted")},S)},We=h=>{const{type:m,el:S,anchor:A,transition:k}=h;if(m===Ye){_t(S,A);return}if(m===Kn){C(h);return}const D=()=>{o(S),k&&!k.persisted&&k.afterLeave&&k.afterLeave()};if(h.shapeFlag&1&&k&&!k.persisted){const{leave:F,delayLeave:M}=k,N=()=>F(S,D);M?M(h.el,D,N):N()}else D()},_t=(h,m)=>{let S;for(;h!==m;)S=p(h),o(h),h=S;o(m)},vt=(h,m,S)=>{const{bum:A,scope:k,update:D,subTree:F,um:M,m:N,a:R}=h;hs(N),hs(R),A&&po(A),k.stop(),D&&(D.active=!1,Pe(F,h,m,S)),M&&je(M,m),je(()=>{h.isUnmounted=!0},m),m&&m.pendingBranch&&!m.isUnmounted&&h.asyncDep&&!h.asyncResolved&&h.suspenseId===m.pendingId&&(m.deps--,m.deps===0&&m.resolve())},Ae=(h,m,S,A=!1,k=!1,D=0)=>{for(let F=D;F h.shapeFlag&6?x(h.component.subTree):h.shapeFlag&128?h.suspense.next():p(h.anchor||h.el);let V=!1;const H=(h,m,S)=>{h==null?m._vnode&&Pe(m._vnode,null,null,!0):_(m._vnode||null,h,m,null,null,null,S),V||(V=!0,ns(),Hr(),V=!1),m._vnode=h},G={p:_,um:Pe,m:Xe,r:We,mt:ye,mc:z,pc:K,pbc:I,n:x,o:e};let le,ve;return t&&([le,ve]=t(G)),{render:H,hydrate:le,createApp:Qf(H,le)}}function go({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 Qt({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function ai(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ii(e,t,n=!1){const r=e.children,o=t.children;if(Z(r)&&Z(o))for(let l=0;l >1,e[n[a]]0&&(t[r]=n[l-1]),n[l]=r)}}for(l=n.length,s=n[l-1];l-- >0;)n[l]=s,s=t[s];return n}function ci(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ci(t)}function hs(e){if(e)for(let t=0;t Se(cd);function Tl(e,t){return Cl(e,null,t)}const kr={};function ce(e,t,n){return Cl(e,t,n)}function Cl(e,t,{immediate:n,deep:r,flush:o,once:l,onTrack:s,onTrigger:a}=Ee){if(t&&l){const T=t;t=(...$)=>{T(...$),P()}}const i=$e,u=T=>r===!0?T:en(T,r===!1?1:void 0);let c,d=!1,p=!1;if(Me(e)?(c=()=>e.value,d=Br(e)):Vn(e)?(c=()=>u(e),d=!0):Z(e)?(p=!0,d=e.some(T=>Vn(T)||Br(T)),c=()=>e.map(T=>{if(Me(T))return T.value;if(Vn(T))return u(T);if(re(T))return jt(T,i,2)})):re(e)?t?c=()=>jt(e,i,2):c=()=>(v&&v(),lt(e,i,3,[g])):c=rt,t&&r){const T=c;c=()=>en(T())}let v,g=T=>{v=y.onStop=()=>{jt(T,i,4),v=y.onStop=void 0}},_;if(vr)if(g=rt,t?n&<(t,i,3,[c(),p?[]:void 0,g]):c(),o==="sync"){const T=ud();_=T.__watcherHandles||(T.__watcherHandles=[])}else return rt;let w=p?new Array(e.length).fill(kr):kr;const b=()=>{if(!(!y.active||!y.dirty))if(t){const T=y.run();(r||d||(p?T.some(($,z)=>Vt($,w[z])):Vt(T,w)))&&(v&&v(),lt(t,i,3,[T,w===kr?void 0:p&&w[0]===kr?[]:w,g]),w=T)}else y.run()};b.allowRecurse=!!t;let E;o==="sync"?E=b:o==="post"?E=()=>je(b,i&&i.suspense):(b.pre=!0,i&&(b.id=i.uid),E=()=>Xr(b));const y=new dl(c,rt,E),C=La(),P=()=>{y.stop(),C&&il(C.effects,y)};return t?n?b():w=y.run():o==="post"?je(y.run.bind(y),i&&i.suspense):y.run(),_&&_.push(P),P}function fd(e,t,n){const r=this.proxy,o=de(e)?e.includes(".")?ui(r,e):()=>r[e]:e.bind(r,r);let l;re(t)?l=t:(l=t.handler,n=t);const s=hr(this),a=Cl(o,l.bind(r),n);return s(),a}function ui(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;o {en(r,t,n)});else if($u(e)){for(const r in e)en(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&en(e[r],t,n)}return e}const pr=e=>e.type.__isKeepAlive;function dd(e,t){fi(e,"a",t)}function pd(e,t){fi(e,"da",t)}function fi(e,t,n=$e){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(eo(t,r,n),n){let o=n.parent;for(;o&&o.parent;)pr(o.parent.vnode)&&hd(r,t,n,o),o=o.parent}}function hd(e,t,n,r){const o=eo(t,e,r,!0);dr(()=>{il(r[t],o)},n)}const Nt=Symbol("_leaveCb"),Ar=Symbol("_enterCb");function di(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ge(()=>{e.isMounted=!0}),wl(()=>{e.isUnmounting=!0}),e}const Ze=[Function,Array],pi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ze,onEnter:Ze,onAfterEnter:Ze,onEnterCancelled:Ze,onBeforeLeave:Ze,onLeave:Ze,onAfterLeave:Ze,onLeaveCancelled:Ze,onBeforeAppear:Ze,onAppear:Ze,onAfterAppear:Ze,onAppearCancelled:Ze},hi=e=>{const t=e.subTree;return t.component?hi(t.component):t},vd={name:"BaseTransition",props:pi,setup(e,{slots:t}){const n=In(),r=di();return()=>{const o=t.default&&Ll(t.default(),!0);if(!o||!o.length)return;let l=o[0];if(o.length>1){for(const p of o)if(p.type!==nt){l=p;break}}const s=ie(e),{mode:a}=s;if(r.isLeaving)return yo(l);const i=vs(l);if(!i)return yo(l);let u=nr(i,s,r,n,p=>u=p);En(i,u);const c=n.subTree,d=c&&vs(c);if(d&&d.type!==nt&&!tn(i,d)&&hi(n).type!==nt){const p=nr(d,s,r,n);if(En(d,p),a==="out-in"&&i.type!==nt)return r.isLeaving=!0,p.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},yo(l);a==="in-out"&&i.type!==nt&&(p.delayLeave=(v,g,_)=>{const w=vi(r,d);w[String(d.key)]=d,v[Nt]=()=>{g(),v[Nt]=void 0,delete u.delayedLeave},u.delayedLeave=_})}return l}}},md=vd;function vi(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 nr(e,t,n,r,o){const{appear:l,mode:s,persisted:a=!1,onBeforeEnter:i,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:p,onLeave:v,onAfterLeave:g,onLeaveCancelled:_,onBeforeAppear:w,onAppear:b,onAfterAppear:E,onAppearCancelled:y}=t,C=String(e.key),P=vi(n,e),T=(B,I)=>{B&<(B,r,9,I)},$=(B,I)=>{const j=I[1];T(B,I),Z(B)?B.every(O=>O.length<=1)&&j():B.length<=1&&j()},z={mode:s,persisted:a,beforeEnter(B){let I=i;if(!n.isMounted)if(l)I=w||i;else return;B[Nt]&&B[Nt](!0);const j=P[C];j&&tn(e,j)&&j.el[Nt]&&j.el[Nt](),T(I,[B])},enter(B){let I=u,j=c,O=d;if(!n.isMounted)if(l)I=b||u,j=E||c,O=y||d;else return;let ee=!1;const ye=B[Ar]=be=>{ee||(ee=!0,be?T(O,[B]):T(j,[B]),z.delayedLeave&&z.delayedLeave(),B[Ar]=void 0)};I?$(I,[B,ye]):ye()},leave(B,I){const j=String(e.key);if(B[Ar]&&B[Ar](!0),n.isUnmounting)return I();T(p,[B]);let O=!1;const ee=B[Nt]=ye=>{O||(O=!0,I(),ye?T(_,[B]):T(g,[B]),B[Nt]=void 0,P[j]===e&&delete P[j])};P[j]=e,v?$(v,[B,ee]):ee()},clone(B){const I=nr(B,t,n,r,o);return o&&o(I),I}};return z}function yo(e){if(pr(e))return e=zt(e),e.children=null,e}function vs(e){if(!pr(e))return e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&re(n.default))return n.default()}}function En(e,t){e.shapeFlag&6&&e.component?En(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 Ll(e,t=!1,n){let r=[],o=0;for(let l=0;l 1)for(let l=0;l e.__isTeleport,Ye=Symbol.for("v-fgt"),Sn=Symbol.for("v-txt"),nt=Symbol.for("v-cmt"),Kn=Symbol.for("v-stc"),Gn=[];let ft=null;function og(e=!1){Gn.push(ft=e?null:[])}function yd(){Gn.pop(),ft=Gn[Gn.length-1]||null}let rr=1;function ms(e){rr+=e}function bd(e){return e.dynamicChildren=rr>0?ft||hn:null,yd(),rr>0&&ft&&ft.push(e),e}function lg(e,t,n,r,o,l){return bd(gi(e,t,n,r,o,l,!0))}function Wo(e){return e?e.__v_isVNode===!0:!1}function tn(e,t){return e.type===t.type&&e.key===t.key}const mi=({key:e})=>e??null,Mr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?de(e)||Me(e)||re(e)?{i:ot,r:e,k:t,f:!!n}:e:null);function gi(e,t=null,n=null,r=0,o=null,l=e===Ye?0:1,s=!1,a=!1){const i={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&mi(t),ref:t&&Mr(t),scopeId:Ga,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:l,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:ot};return a?(xl(i,n),l&128&&e.normalize(i)):n&&(i.shapeFlag|=de(n)?8:16),rr>0&&!s&&ft&&(i.patchFlag>0||l&6)&&i.patchFlag!==32&&ft.push(i),i}const Ie=_d;function _d(e,t=null,n=null,r=0,o=null,l=!1){if((!e||e===Mf)&&(e=nt),Wo(e)){const a=zt(e,t,!0);return n&&xl(a,n),rr>0&&!l&&ft&&(a.shapeFlag&6?ft[ft.indexOf(e)]=a:ft.push(a)),a.patchFlag=-2,a}if(Id(e)&&(e=e.__vccOpts),t){t=wd(t);let{class:a,style:i}=t;a&&!de(a)&&(t.class=fl(a)),Te(i)&&(Ha(i)&&!Z(i)&&(i=xe({},i)),t.style=ul(i))}const s=de(e)?1:Nf(e)?128:gd(e)?64:Te(e)?4:re(e)?2:0;return gi(e,t,n,r,o,s,l,!0)}function wd(e){return e?Ha(e)||ti(e)?xe({},e):e:null}function zt(e,t,n=!1,r=!1){const{props:o,ref:l,patchFlag:s,children:a,transition:i}=e,u=t?Ed(o||{},t):o,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&mi(u),ref:t&&t.ref?n&&l?Z(l)?l.concat(Mr(t)):[l,Mr(t)]:Mr(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ye?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:i,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&zt(e.ssContent),ssFallback:e.ssFallback&&zt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return i&&r&&En(c,i.clone(c)),c}function yi(e=" ",t=0){return Ie(Sn,null,e,t)}function sg(e,t){const n=Ie(Kn,null,e);return n.staticCount=t,n}function ut(e){return e==null||typeof e=="boolean"?Ie(nt):Z(e)?Ie(Ye,null,e.slice()):typeof e=="object"?Bt(e):Ie(Sn,null,String(e))}function Bt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:zt(e)}function xl(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Z(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),xl(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!ti(t)?t._ctx=ot:o===3&&ot&&(ot.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else re(t)?(t={default:t,_ctx:ot},n=32):(t=String(t),r&64?(n=16,t=[yi(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ed(...e){const t={};for(let n=0;n $e||ot;let zr,Ko;{const e=Ta(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),l=>{o.length>1?o.forEach(s=>s(l)):o[0](l)}};zr=t("__VUE_INSTANCE_SETTERS__",n=>$e=n),Ko=t("__VUE_SSR_SETTERS__",n=>vr=n)}const hr=e=>{const t=$e;return zr(e),e.scope.on(),()=>{e.scope.off(),zr(t)}},gs=()=>{$e&&$e.scope.off(),zr(null)};function bi(e){return e.vnode.shapeFlag&4}let vr=!1;function Ld(e,t=!1){t&&Ko(t);const{props:n,children:r}=e.vnode,o=bi(e);Xf(e,n,o,t),td(e,r);const l=o?xd(e,t):void 0;return t&&Ko(!1),l}function xd(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Uf);const{setup:r}=n;if(r){const o=e.setupContext=r.length>1?Ad(e):null,l=hr(e);Wt();const s=jt(r,e,0,[e.props,o]);if(Kt(),l(),Ea(s)){if(s.then(gs,gs),t)return s.then(a=>{ys(e,a,t)}).catch(a=>{fr(a,e,0)});e.asyncDep=s}else ys(e,s,t)}else _i(e,t)}function ys(e,t,n){re(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Te(t)&&(e.setupState=Va(t)),_i(e,n)}let bs;function _i(e,t,n){const r=e.type;if(!e.render){if(!t&&bs&&!r.render){const o=r.template||El(e).template;if(o){const{isCustomElement:l,compilerOptions:s}=e.appContext.config,{delimiters:a,compilerOptions:i}=r,u=xe(xe({isCustomElement:l,delimiters:a},s),i);r.render=bs(o,u)}}e.render=r.render||rt}{const o=hr(e);Wt();try{qf(e)}finally{Kt(),o()}}}const kd={get(e,t){return ze(e,"get",""),e[t]}};function Ad(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,kd),slots:e.slots,emit:e.emit,expose:t}}function kl(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Va(vf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in qn)return qn[n](e)},has(t,n){return n in t||n in qn}})):e.proxy}function Rd(e,t=!0){return re(e)?e.displayName||e.name:e.name||t&&e.__name}function Id(e){return re(e)&&"__vccOpts"in e}const L=(e,t)=>mf(e,t,vr);function f(e,t,n){const r=arguments.length;return r===2?Te(t)&&!Z(t)?Wo(t)?Ie(e,null,[t]):Ie(e,t):Ie(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Wo(n)&&(n=[n]),Ie(e,t,n))}const Pd="3.4.29";/** +* @vue/runtime-dom v3.4.29 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const Od="http://www.w3.org/2000/svg",$d="http://www.w3.org/1998/Math/MathML",Ct=typeof document<"u"?document:null,_s=Ct&&Ct.createElement("template"),Md={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 o=t==="svg"?Ct.createElementNS(Od,e):t==="mathml"?Ct.createElementNS($d,e):n?Ct.createElement(e,{is:n}):Ct.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Ct.createTextNode(e),createComment:e=>Ct.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ct.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,l){const s=n?n.previousSibling:t.lastChild;if(o&&(o===l||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===l||!(o=o.nextSibling)););else{_s.innerHTML=r==="svg"?` ${e} `:r==="mathml"?``:e;const a=_s.content;if(r==="svg"||r==="mathml"){const i=a.firstChild;for(;i.firstChild;)a.appendChild(i.firstChild);a.removeChild(i)}t.insertBefore(a,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ot="transition",Nn="animation",Tn=Symbol("_vtc"),Ut=(e,{slots:t})=>f(md,Ei(e),t);Ut.displayName="Transition";const wi={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},Dd=Ut.props=xe({},pi,wi),Xt=(e,t=[])=>{Z(e)?e.forEach(n=>n(...t)):e&&e(...t)},ws=e=>e?Z(e)?e.some(t=>t.length>1):e.length>1:!1;function Ei(e){const t={};for(const O in e)O in wi||(t[O]=e[O]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:l=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:i=l,appearActiveClass:u=s,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,g=Nd(o),_=g&&g[0],w=g&&g[1],{onBeforeEnter:b,onEnter:E,onEnterCancelled:y,onLeave:C,onLeaveCancelled:P,onBeforeAppear:T=b,onAppear:$=E,onAppearCancelled:z=y}=t,B=(O,ee,ye)=>{Mt(O,ee?c:a),Mt(O,ee?u:s),ye&&ye()},I=(O,ee)=>{O._isLeaving=!1,Mt(O,d),Mt(O,v),Mt(O,p),ee&&ee()},j=O=>(ee,ye)=>{const be=O?$:E,W=()=>B(ee,O,ye);Xt(be,[ee,W]),Es(()=>{Mt(ee,O?i:l),Et(ee,O?c:a),ws(be)||Ss(ee,r,_,W)})};return xe(t,{onBeforeEnter(O){Xt(b,[O]),Et(O,l),Et(O,s)},onBeforeAppear(O){Xt(T,[O]),Et(O,i),Et(O,u)},onEnter:j(!1),onAppear:j(!0),onLeave(O,ee){O._isLeaving=!0;const ye=()=>I(O,ee);Et(O,d),Et(O,p),Ti(),Es(()=>{O._isLeaving&&(Mt(O,d),Et(O,v),ws(C)||Ss(O,r,w,ye))}),Xt(C,[O,ye])},onEnterCancelled(O){B(O,!1),Xt(y,[O])},onAppearCancelled(O){B(O,!0),Xt(z,[O])},onLeaveCancelled(O){I(O),Xt(P,[O])}})}function Nd(e){if(e==null)return null;if(Te(e))return[bo(e.enter),bo(e.leave)];{const t=bo(e);return[t,t]}}function bo(e){return Bu(e)}function Et(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Tn]||(e[Tn]=new Set)).add(t)}function Mt(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[Tn];n&&(n.delete(t),n.size||(e[Tn]=void 0))}function Es(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Bd=0;function Ss(e,t,n,r){const o=e._endId=++Bd,l=()=>{o===e._endId&&r()};if(n)return setTimeout(l,n);const{type:s,timeout:a,propCount:i}=Si(e,t);if(!s)return r();const u=s+"end";let c=0;const d=()=>{e.removeEventListener(u,p),l()},p=v=>{v.target===e&&++c>=i&&d()};setTimeout(()=>{c(n[g]||"").split(", "),o=r(`${Ot}Delay`),l=r(`${Ot}Duration`),s=Ts(o,l),a=r(`${Nn}Delay`),i=r(`${Nn}Duration`),u=Ts(a,i);let c=null,d=0,p=0;t===Ot?s>0&&(c=Ot,d=s,p=l.length):t===Nn?u>0&&(c=Nn,d=u,p=i.length):(d=Math.max(s,u),c=d>0?s>u?Ot:Nn:null,p=c?c===Ot?l.length:i.length:0);const v=c===Ot&&/\b(transform|all)(,|$)/.test(r(`${Ot}Property`).toString());return{type:c,timeout:d,propCount:p,hasTransform:v}}function Ts(e,t){for(;e.lengthCs(n)+Cs(e[r])))}function Cs(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ti(){return document.body.offsetHeight}function Hd(e,t,n){const r=e[Tn];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ls=Symbol("_vod"),Fd=Symbol("_vsh"),jd=Symbol(""),Vd=/(^|;)\s*display\s*:/;function zd(e,t,n){const r=e.style,o=de(n);let l=!1;if(n&&!o){if(t)if(de(t))for(const s of t.split(";")){const a=s.slice(0,s.indexOf(":")).trim();n[a]==null&&Dr(r,a,"")}else for(const s in t)n[s]==null&&Dr(r,s,"");for(const s in n)s==="display"&&(l=!0),Dr(r,s,n[s])}else if(o){if(t!==n){const s=r[jd];s&&(n+=";"+s),r.cssText=n,l=Vd.test(n)}}else t&&e.removeAttribute("style");Ls in e&&(e[Ls]=l?r.display:"",e[Fd]&&(r.display="none"))}const xs=/\s*!important$/;function Dr(e,t,n){if(Z(n))n.forEach(r=>Dr(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Ud(e,t);xs.test(n)?e.setProperty(An(r),n.replace(xs,""),"important"):e[r]=n}}const ks=["Webkit","Moz","ms"],_o={};function Ud(e,t){const n=_o[t];if(n)return n;let r=at(t);if(r!=="filter"&&r in e)return _o[t]=r;r=cr(r);for(let o=0;o wo||(Jd.then(()=>wo=0),wo=Date.now());function Xd(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;lt(Zd(r,n.value),t,5,[r])};return n.value=e,n.attached=Qd(),n}function Zd(e,t){if(Z(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>o=>!o._stopped&&r&&r(o))}else return t}const Os=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ep=(e,t,n,r,o,l,s,a,i)=>{const u=o==="svg";t==="class"?Hd(e,r,u):t==="style"?zd(e,n,r):ar(t)?al(t)||Gd(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):tp(e,t,r,u))?(qd(e,t,r,l,s,a,i),(t==="value"||t==="checked"||t==="selected")&&Rs(e,t,r,u,s,t!=="value")):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Rs(e,t,r,u))};function tp(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Os(t)&&re(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 o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Os(t)&&de(n)?!1:t in e}const Ci=new WeakMap,Li=new WeakMap,Ur=Symbol("_moveCb"),$s=Symbol("_enterCb"),xi={name:"TransitionGroup",props:xe({},Dd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=In(),r=di();let o,l;return Ja(()=>{if(!o.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!ap(o[0].el,n.vnode.el,s))return;o.forEach(op),o.forEach(lp);const a=o.filter(sp);Ti(),a.forEach(i=>{const u=i.el,c=u.style;Et(u,s),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Ur]=p=>{p&&p.target!==u||(!p||/transform$/.test(p.propertyName))&&(u.removeEventListener("transitionend",d),u[Ur]=null,Mt(u,s))};u.addEventListener("transitionend",d)})}),()=>{const s=ie(e),a=Ei(s);let i=s.tag||Ye;if(o=[],l)for(let u=0;u delete e.mode;xi.props;const rp=xi;function op(e){const t=e.el;t[Ur]&&t[Ur](),t[$s]&&t[$s]()}function lp(e){Li.set(e,e.el.getBoundingClientRect())}function sp(e){const t=Ci.get(e),n=Li.get(e),r=t.left-n.left,o=t.top-n.top;if(r||o){const l=e.el.style;return l.transform=l.webkitTransform=`translate(${r}px,${o}px)`,l.transitionDuration="0s",e}}function ap(e,t,n){const r=e.cloneNode(),o=e[Tn];o&&o.forEach(a=>{a.split(/\s+/).forEach(i=>i&&r.classList.remove(i))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const l=t.nodeType===1?t:t.parentNode;l.appendChild(r);const{hasTransform:s}=Si(r);return l.removeChild(r),s}const ip=xe({patchProp:ep},Md);let Eo,Ms=!1;function cp(){return Eo=Ms?Eo:sd(ip),Ms=!0,Eo}const up=(...e)=>{const t=cp().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=dp(r);if(o)return n(o,!0,fp(o))},t};function fp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function dp(e){return de(e)?document.querySelector(e):e}const pp="modulepreload",hp=function(e){return"/"+e},Ds={},Y=function(t,n,r){let o=Promise.resolve();return n&&n.length>0&&(document.getElementsByTagName("link"),o=Promise.all(n.map(l=>{if(l=hp(l),l in Ds)return;Ds[l]=!0;const s=l.endsWith(".css"),a=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${a}`))return;const i=document.createElement("link");if(i.rel=s?"stylesheet":pp,s||(i.as="script",i.crossOrigin=""),i.href=l,document.head.appendChild(i),s)return new Promise((u,c)=>{i.addEventListener("load",u),i.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${l}`)))})}))),o.then(()=>t()).catch(l=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=l,window.dispatchEvent(s),!s.defaultPrevented)throw l})},vp={"v-8daa1a0e":()=>Y(()=>import("./index.html-Ditw1kiZ.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-22a39d25":()=>Y(()=>import("./about.html-D4FHWbGj.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-772decc4":()=>Y(()=>import("./Http-Bot.html-DGG9b-Nl.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-4b5f9516":()=>Y(()=>import("./KillItem.html-LBTHb8Jp.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-66feb44a":()=>Y(()=>import("./Land.html-DTW455mH.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-332f09b0":()=>Y(()=>import("./Ntrade.html-rYhcCyhZ.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-7445cd33":()=>Y(()=>import("./index.html-Bu0JevOU.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-0a2f68a0":()=>Y(()=>import("./Shop.html-BZ0RaJOJ.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-7c1a6266":()=>Y(()=>import("./index.html-C93EqT0D.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-54972f5c":()=>Y(()=>import("./about.html-IkQ0QTkx.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-6811cfd5":()=>Y(()=>import("./Illustrated.html-CWuQ7BxR.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-a0112e5a":()=>Y(()=>import("./index.html-CRmql3vU.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-2492863c":()=>Y(()=>import("./regulation.html-DPGz_F3q.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-3f6da79a":()=>Y(()=>import("./index.html-gcnxUQJX.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-29f1c2b8":()=>Y(()=>import("./changelog.html-CVRA_aRg.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-fbdd0006":()=>Y(()=>import("./developers.html-nCHrslpC.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-4c569078":()=>Y(()=>import("./history.html-dTDX4noh.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-481843a0":()=>Y(()=>import("./map.html-DukjdEJ3.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-67582eaa":()=>Y(()=>import("./specialThanks.html-BLZkAqrq.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-0347a4f7":()=>Y(()=>import("./Http-Bot.html-DUjRRRKL.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-6669eda8":()=>Y(()=>import("./KillItem.html-B4XrK05l.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-c2a19aba":()=>Y(()=>import("./Ntrade.html-CXpVSDrm.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-49e5be20":()=>Y(()=>import("./index.html-BLMIjH9M.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-c0620fb4":()=>Y(()=>import("./index.html-CPGXzDhT.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-1f5c20ac":()=>Y(()=>import("./developers.html-CsBcik6Q.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-f847f846":()=>Y(()=>import("./specialThanks.html-BhKawJYo.js"),__vite__mapDeps([])).then(({data:e})=>e),"v-3706649a":()=>Y(()=>import("./404.html-DxAYxFse.js"),__vite__mapDeps([])).then(({data:e})=>e)},mp=JSON.parse('{"base":"/","lang":"en-US","title":"","description":"","head":[["link",{"rel":"icon","href":"/1.jpg"}]],"locales":{"/":{"lang":"zh-CN","title":"NIA服务器","description":"一个基于BDS的Minecraft服务器"},"/en-US/":{"lang":"en-US","title":"NIA-Server","description":"A Minecraft server based on BDS"}}}');var gp=([e,t,n])=>e==="meta"&&t.name?`${e}.${t.name}`:["title","base"].includes(e)?e:e==="template"&&t.id?`${e}.${t.id}`:JSON.stringify([e,t,n]),yp=e=>{const t=new Set,n=[];return e.forEach(r=>{const o=gp(r);t.has(o)||(t.add(o),n.push(r))}),n},bp=e=>e[e.length-1]==="/"||e.endsWith(".html")?e:`${e}/`,Pn=e=>/^(https?:)?\/\//.test(e),_p=/.md((\?|#).*)?$/,qr=(e,t="/")=>!!(Pn(e)||e.startsWith("/")&&!e.startsWith(t)&&!_p.test(e)),ki=e=>/^[a-z][a-z0-9+.-]*:/.test(e),mr=e=>Object.prototype.toString.call(e)==="[object Object]",Al=e=>e[e.length-1]==="/"?e.slice(0,-1):e,Ai=e=>e[0]==="/"?e.slice(1):e,wp=(e,t)=>{const n=Object.keys(e).sort((r,o)=>{const l=o.split("/").length-r.split("/").length;return l!==0?l:o.length-r.length});for(const r of n)if(t.startsWith(r))return r;return"/"},Ns=(e,t="/")=>{const n=e.replace(/^(https?:)?\/\/[^/]*/,"");return n.startsWith(t)?`/${n.slice(t.length)}`:n};const Ri={"v-8daa1a0e":me(()=>Y(()=>import("./index.html-CoFVXKsY.js"),__vite__mapDeps([0,1]))),"v-22a39d25":me(()=>Y(()=>import("./about.html-CH6CGDLb.js"),__vite__mapDeps([2,1]))),"v-772decc4":me(()=>Y(()=>import("./Http-Bot.html-DHkOMbBy.js"),__vite__mapDeps([3,1]))),"v-4b5f9516":me(()=>Y(()=>import("./KillItem.html-3lE0bNPv.js"),__vite__mapDeps([4,1]))),"v-66feb44a":me(()=>Y(()=>import("./Land.html-CXuMPGFT.js"),__vite__mapDeps([5,1]))),"v-332f09b0":me(()=>Y(()=>import("./Ntrade.html-B2KbCHqZ.js"),__vite__mapDeps([6,1]))),"v-7445cd33":me(()=>Y(()=>import("./index.html-oOrqXUlC.js"),__vite__mapDeps([7,1]))),"v-0a2f68a0":me(()=>Y(()=>import("./Shop.html-Cb-v5q56.js"),__vite__mapDeps([8,1]))),"v-7c1a6266":me(()=>Y(()=>import("./index.html-DpiTCEUi.js"),__vite__mapDeps([9,1]))),"v-54972f5c":me(()=>Y(()=>import("./about.html-BeCLU3AC.js"),__vite__mapDeps([10,1]))),"v-6811cfd5":me(()=>Y(()=>import("./Illustrated.html-yw1DKwVc.js"),__vite__mapDeps([11,1]))),"v-a0112e5a":me(()=>Y(()=>import("./index.html-4slaVerL.js"),__vite__mapDeps([12,1]))),"v-2492863c":me(()=>Y(()=>import("./regulation.html-DnKGYTsA.js"),__vite__mapDeps([13,1]))),"v-3f6da79a":me(()=>Y(()=>import("./index.html-C_p3IxZa.js"),__vite__mapDeps([14,15,1]))),"v-29f1c2b8":me(()=>Y(()=>import("./changelog.html-CsLYiXLf.js"),__vite__mapDeps([16,1]))),"v-fbdd0006":me(()=>Y(()=>import("./developers.html-Dqpdm9hH.js"),__vite__mapDeps([17,1]))),"v-4c569078":me(()=>Y(()=>import("./history.html-CzAgw89d.js"),__vite__mapDeps([18,1]))),"v-481843a0":me(()=>Y(()=>import("./map.html-Dv6v28Uz.js"),__vite__mapDeps([19,1]))),"v-67582eaa":me(()=>Y(()=>import("./specialThanks.html-8SLIc6Kt.js"),__vite__mapDeps([20,1]))),"v-0347a4f7":me(()=>Y(()=>import("./Http-Bot.html-B8clxutB.js"),__vite__mapDeps([21,1]))),"v-6669eda8":me(()=>Y(()=>import("./KillItem.html-DvJeMrPG.js"),__vite__mapDeps([22,1]))),"v-c2a19aba":me(()=>Y(()=>import("./Ntrade.html-D7gCsZmu.js"),__vite__mapDeps([23,1]))),"v-49e5be20":me(()=>Y(()=>import("./index.html-XR2BLE2C.js"),__vite__mapDeps([24,1]))),"v-c0620fb4":me(()=>Y(()=>import("./index.html-D1-j4jFr.js"),__vite__mapDeps([25,15,1]))),"v-1f5c20ac":me(()=>Y(()=>import("./developers.html-CzZA5f3e.js"),__vite__mapDeps([26,1]))),"v-f847f846":me(()=>Y(()=>import("./specialThanks.html-Lp69b2On.js"),__vite__mapDeps([27,1]))),"v-3706649a":me(()=>Y(()=>import("./404.html-DUhp6T9Z.js"),__vite__mapDeps([28,1])))};var Ep=Symbol(""),Ii=Symbol(""),Sp=ln({key:"",path:"",title:"",lang:"",frontmatter:{},headers:[]}),ue=()=>{const e=Se(Ii);if(!e)throw new Error("pageData() is called without provider.");return e},Pi=Symbol(""),Ce=()=>{const e=Se(Pi);if(!e)throw new Error("usePageFrontmatter() is called without provider.");return e},Oi=Symbol(""),Tp=()=>{const e=Se(Oi);if(!e)throw new Error("usePageHead() is called without provider.");return e},Cp=Symbol(""),$i=Symbol(""),to=()=>{const e=Se($i);if(!e)throw new Error("usePageLang() is called without provider.");return e},Mi=Symbol(""),Lp=()=>{const e=Se(Mi);if(!e)throw new Error("usePageLayout() is called without provider.");return e},xp=X(vp),Rl=Symbol(""),Gt=()=>{const e=Se(Rl);if(!e)throw new Error("useRouteLocale() is called without provider.");return e},fn=X(mp),Di=()=>fn,Ni=Symbol(""),no=()=>{const e=Se(Ni);if(!e)throw new Error("useSiteLocaleData() is called without provider.");return e},kp=Symbol(""),Ap="Layout",Rp="NotFound",St=ur({resolveLayouts:e=>e.reduce((t,n)=>({...t,...n.layouts}),{}),resolvePageData:async e=>{const t=xp.value[e];return await(t==null?void 0:t())??Sp},resolvePageFrontmatter:e=>e.frontmatter,resolvePageHead:(e,t,n)=>{const r=de(t.description)?t.description:n.description,o=[...Z(t.head)?t.head:[],...n.head,["title",{},e],["meta",{name:"description",content:r}]];return yp(o)},resolvePageHeadTitle:(e,t)=>[e.title,t.title].filter(n=>!!n).join(" | "),resolvePageLang:(e,t)=>e.lang||t.lang||"en-US",resolvePageLayout:(e,t)=>{let n;if(e.path){const r=e.frontmatter.layout;de(r)?n=r:n=Ap}else n=Rp;return t[n]},resolveRouteLocale:(e,t)=>wp(e,t),resolveSiteLocaleData:(e,t)=>({...e,...e.locales[t]})}),ro=q({name:"ClientOnly",setup(e,t){const n=X(!1);return ge(()=>{n.value=!0}),()=>{var r,o;return n.value?(o=(r=t.slots).default)==null?void 0:o.call(r):null}}}),Bi=q({name:"Content",props:{pageKey:{type:String,required:!1,default:""}},setup(e){const t=ue(),n=L(()=>Ri[e.pageKey||t.value.key]);return()=>n.value?f(n.value):f("div","404 Not Found")}}),Qe=(e={})=>e,Be=e=>Pn(e)?e:`/${Ai(e)}`;const Ip={};/*! + * vue-router v4.3.3 + * (c) 2024 Eduardo San Martin Morote + * @license MIT + */const un=typeof document<"u";function Pp(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const pe=Object.assign;function So(e,t){const n={};for(const r in t){const o=t[r];n[r]=pt(o)?o.map(e):e(o)}return n}const Yn=()=>{},pt=Array.isArray,Hi=/#/g,Op=/&/g,$p=/\//g,Mp=/=/g,Dp=/\?/g,Fi=/\+/g,Np=/%5B/g,Bp=/%5D/g,ji=/%5E/g,Hp=/%60/g,Vi=/%7B/g,Fp=/%7C/g,zi=/%7D/g,jp=/%20/g;function Il(e){return encodeURI(""+e).replace(Fp,"|").replace(Np,"[").replace(Bp,"]")}function Vp(e){return Il(e).replace(Vi,"{").replace(zi,"}").replace(ji,"^")}function Go(e){return Il(e).replace(Fi,"%2B").replace(jp,"+").replace(Hi,"%23").replace(Op,"%26").replace(Hp,"`").replace(Vi,"{").replace(zi,"}").replace(ji,"^")}function zp(e){return Go(e).replace(Mp,"%3D")}function Up(e){return Il(e).replace(Hi,"%23").replace(Dp,"%3F")}function qp(e){return e==null?"":Up(e).replace($p,"%2F")}function or(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const Wp=/\/$/,Kp=e=>e.replace(Wp,"");function To(e,t,n="/"){let r,o={},l="",s="";const a=t.indexOf("#");let i=t.indexOf("?");return a=0&&(i=-1),i>-1&&(r=t.slice(0,i),l=t.slice(i+1,a>-1?a:t.length),o=e(l)),a>-1&&(r=r||t.slice(0,a),s=t.slice(a,t.length)),r=Qp(r??t,n),{fullPath:r+(l&&"?")+l+s,path:r,query:o,hash:or(s)}}function Gp(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Bs(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Yp(e,t,n){const r=t.matched.length-1,o=n.matched.length-1;return r>-1&&r===o&&Cn(t.matched[r],n.matched[o])&&Ui(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Cn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ui(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Jp(e[n],t[n]))return!1;return!0}function Jp(e,t){return pt(e)?Hs(e,t):pt(t)?Hs(t,e):e===t}function Hs(e,t){return pt(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function Qp(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let l=n.length-1,s,a;for(s=0;s 1&&l--;else break;return n.slice(0,l).join("/")+"/"+r.slice(s).join("/")}var lr;(function(e){e.pop="pop",e.push="push"})(lr||(lr={}));var Jn;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Jn||(Jn={}));function Xp(e){if(!e)if(un){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Kp(e)}const Zp=/^[^#]+#/;function eh(e,t){return e.replace(Zp,"#")+t}function th(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const oo=()=>({left:window.scrollX,top:window.scrollY});function nh(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),o=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!o)return;t=th(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Fs(e,t){return(history.state?history.state.position-t:-1)+e}const Yo=new Map;function rh(e,t){Yo.set(e,t)}function oh(e){const t=Yo.get(e);return Yo.delete(e),t}let lh=()=>location.protocol+"//"+location.host;function qi(e,t){const{pathname:n,search:r,hash:o}=t,l=e.indexOf("#");if(l>-1){let a=o.includes(e.slice(l))?e.slice(l).length:1,i=o.slice(a);return i[0]!=="/"&&(i="/"+i),Bs(i,"")}return Bs(n,e)+r+o}function sh(e,t,n,r){let o=[],l=[],s=null;const a=({state:p})=>{const v=qi(e,location),g=n.value,_=t.value;let w=0;if(p){if(n.value=v,t.value=p,s&&s===g){s=null;return}w=_?p.position-_.position:0}else r(v);o.forEach(b=>{b(n.value,g,{delta:w,type:lr.pop,direction:w?w>0?Jn.forward:Jn.back:Jn.unknown})})};function i(){s=n.value}function u(p){o.push(p);const v=()=>{const g=o.indexOf(p);g>-1&&o.splice(g,1)};return l.push(v),v}function c(){const{history:p}=window;p.state&&p.replaceState(pe({},p.state,{scroll:oo()}),"")}function d(){for(const p of l)p();l=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:i,listen:u,destroy:d}}function js(e,t,n,r=!1,o=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:o?oo():null}}function ah(e){const{history:t,location:n}=window,r={value:qi(e,n)},o={value:t.state};o.value||l(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function l(i,u,c){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+i:lh()+e+i;try{t[c?"replaceState":"pushState"](u,"",p),o.value=u}catch(v){console.error(v),n[c?"replace":"assign"](p)}}function s(i,u){const c=pe({},t.state,js(o.value.back,i,o.value.forward,!0),u,{position:o.value.position});l(i,c,!0),r.value=i}function a(i,u){const c=pe({},o.value,t.state,{forward:i,scroll:oo()});l(c.current,c,!0);const d=pe({},js(r.value,i,null),{position:c.position+1},u);l(i,d,!1),r.value=i}return{location:r,state:o,push:a,replace:s}}function ih(e){e=Xp(e);const t=ah(e),n=sh(e,t.state,t.location,t.replace);function r(l,s=!0){s||n.pauseListeners(),history.go(l)}const o=pe({location:"",base:e,go:r,createHref:eh.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function ch(e){return typeof e=="string"||e&&typeof e=="object"}function Wi(e){return typeof e=="string"||typeof e=="symbol"}const Tt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Ki=Symbol("");var Vs;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Vs||(Vs={}));function Ln(e,t){return pe(new Error,{type:e,[Ki]:!0},t)}function wt(e,t){return e instanceof Error&&Ki in e&&(t==null||!!(e.type&t))}const zs="[^/]+?",uh={sensitive:!1,strict:!1,start:!0,end:!0},fh=/[.+*?^${}()[\]/\\]/g;function dh(e,t){const n=pe({},uh,t),r=[];let o=n.start?"^":"";const l=[];for(const u of e){const c=u.length?[]:[90];n.strict&&!u.length&&(o+="/");for(let d=0;d t.length?t.length===1&&t[0]===80?1:-1:0}function Gi(e,t){let n=0;const r=e.score,o=t.score;for(;n 0&&t[t.length-1]<0}const hh={type:0,value:""},vh=/[a-zA-Z0-9_]/;function mh(e){if(!e)return[[]];if(e==="/")return[[hh]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(v){throw new Error(`ERR (${n})/"${u}": ${v}`)}let n=0,r=n;const o=[];let l;function s(){l&&o.push(l),l=[]}let a=0,i,u="",c="";function d(){u&&(n===0?l.push({type:0,value:u}):n===1||n===2||n===3?(l.length>1&&(i==="*"||i==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),l.push({type:1,value:u,regexp:c,repeatable:i==="*"||i==="+",optional:i==="*"||i==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=i}for(;a {s(E)}:Yn}function s(c){if(Wi(c)){const d=r.get(c);d&&(r.delete(c),n.splice(n.indexOf(d),1),d.children.forEach(s),d.alias.forEach(s))}else{const d=n.indexOf(c);d>-1&&(n.splice(d,1),c.record.name&&r.delete(c.record.name),c.children.forEach(s),c.alias.forEach(s))}}function a(){return n}function i(c){const d=Eh(c,n);n.splice(d,0,c),c.record.name&&!Ws(c)&&r.set(c.record.name,c)}function u(c,d){let p,v={},g,_;if("name"in c&&c.name){if(p=r.get(c.name),!p)throw Ln(1,{location:c});_=p.record.name,v=pe(qs(d.params,p.keys.filter(E=>!E.optional).concat(p.parent?p.parent.keys.filter(E=>E.optional):[]).map(E=>E.name)),c.params&&qs(c.params,p.keys.map(E=>E.name))),g=p.stringify(v)}else if(c.path!=null)g=c.path,p=n.find(E=>E.re.test(g)),p&&(v=p.parse(g),_=p.record.name);else{if(p=d.name?r.get(d.name):n.find(E=>E.re.test(d.path)),!p)throw Ln(1,{location:c,currentLocation:d});_=p.record.name,v=pe({},d.params,c.params),g=p.stringify(v)}const w=[];let b=p;for(;b;)w.unshift(b.record),b=b.parent;return{name:_,path:g,params:v,matched:w,meta:wh(w)}}return e.forEach(c=>l(c)),{addRoute:l,resolve:u,removeRoute:s,getRoutes:a,getRecordMatcher:o}}function qs(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function bh(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:_h(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function _h(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function Ws(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function wh(e){return e.reduce((t,n)=>pe(t,n.meta),{})}function Ks(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Eh(e,t){let n=0,r=t.length;for(;n!==r;){const l=n+r>>1;Gi(e,t[l])<0?r=l:n=l+1}const o=Sh(e);return o&&(r=t.lastIndexOf(o,r-1)),r}function Sh(e){let t=e;for(;t=t.parent;)if(Yi(t)&&Gi(e,t)===0)return t}function Yi({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Th(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o l&&Go(l)):[r&&Go(r)]).forEach(l=>{l!==void 0&&(t+=(t.length?"&":"")+n,l!=null&&(t+="="+l))})}return t}function Ch(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=pt(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return t}const Lh=Symbol(""),Ys=Symbol(""),lo=Symbol(""),Pl=Symbol(""),Jo=Symbol("");function Bn(){let e=[];function t(r){return e.push(r),()=>{const o=e.indexOf(r);o>-1&&e.splice(o,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Ht(e,t,n,r,o,l=s=>s()){const s=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((a,i)=>{const u=p=>{p===!1?i(Ln(4,{from:n,to:t})):p instanceof Error?i(p):ch(p)?i(Ln(2,{from:t,to:p})):(s&&r.enterCallbacks[o]===s&&typeof p=="function"&&s.push(p),a())},c=l(()=>e.call(r&&r.instances[o],t,n,u));let d=Promise.resolve(c);e.length<3&&(d=d.then(u)),d.catch(p=>i(p))})}function Co(e,t,n,r,o=l=>l()){const l=[];for(const s of e)for(const a in s.components){let i=s.components[a];if(!(t!=="beforeRouteEnter"&&!s.instances[a]))if(xh(i)){const c=(i.__vccOpts||i)[t];c&&l.push(Ht(c,n,r,s,a,o))}else{let u=i();l.push(()=>u.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${s.path}"`));const d=Pp(c)?c.default:c;s.components[a]=d;const v=(d.__vccOpts||d)[t];return v&&Ht(v,n,r,s,a,o)()}))}}return l}function xh(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Qo(e){const t=Se(lo),n=Se(Pl),r=L(()=>{const i=on(e.to);return t.resolve(i)}),o=L(()=>{const{matched:i}=r.value,{length:u}=i,c=i[u-1],d=n.matched;if(!c||!d.length)return-1;const p=d.findIndex(Cn.bind(null,c));if(p>-1)return p;const v=Js(i[u-2]);return u>1&&Js(c)===v&&d[d.length-1].path!==v?d.findIndex(Cn.bind(null,i[u-2])):p}),l=L(()=>o.value>-1&&Ih(n.params,r.value.params)),s=L(()=>o.value>-1&&o.value===n.matched.length-1&&Ui(n.params,r.value.params));function a(i={}){return Rh(i)?t[on(e.replace)?"replace":"push"](on(e.to)).catch(Yn):Promise.resolve()}return{route:r,href:L(()=>r.value.href),isActive:l,isExactActive:s,navigate:a}}const kh=q({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Qo,setup(e,{slots:t}){const n=ur(Qo(e)),{options:r}=Se(lo),o=L(()=>({[Qs(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[Qs(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const l=t.default&&t.default(n);return e.custom?l:f("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:o.value},l)}}}),Ah=kh;function Rh(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Ih(e,t){for(const n in t){const r=t[n],o=e[n];if(typeof r=="string"){if(r!==o)return!1}else if(!pt(o)||o.length!==r.length||r.some((l,s)=>l!==o[s]))return!1}return!0}function Js(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Qs=(e,t,n)=>e??t??n,Ph=q({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Se(Jo),o=L(()=>e.route||r.value),l=Se(Ys,0),s=L(()=>{let u=on(l);const{matched:c}=o.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=L(()=>o.value.matched[s.value]);gn(Ys,L(()=>s.value+1)),gn(Lh,a),gn(Jo,o);const i=X();return ce(()=>[i.value,a.value,e.name],([u,c,d],[p,v,g])=>{c&&(c.instances[d]=u,v&&v!==c&&u&&u===p&&(c.leaveGuards.size||(c.leaveGuards=v.leaveGuards),c.updateGuards.size||(c.updateGuards=v.updateGuards))),u&&c&&(!v||!Cn(c,v)||!p)&&(c.enterCallbacks[d]||[]).forEach(_=>_(u))},{flush:"post"}),()=>{const u=o.value,c=e.name,d=a.value,p=d&&d.components[c];if(!p)return Xs(n.default,{Component:p,route:u});const v=d.props[c],g=v?v===!0?u.params:typeof v=="function"?v(u):v:null,w=f(p,pe({},g,t,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(d.instances[c]=null)},ref:i}));return Xs(n.default,{Component:w,route:u})||w}}});function Xs(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Ji=Ph;function Oh(e){const t=yh(e.routes,e),n=e.parseQuery||Th,r=e.stringifyQuery||Gs,o=e.history,l=Bn(),s=Bn(),a=Bn(),i=Fe(Tt);let u=Tt;un&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=So.bind(null,x=>""+x),d=So.bind(null,qp),p=So.bind(null,or);function v(x,V){let H,G;return Wi(x)?(H=t.getRecordMatcher(x),G=V):G=x,t.addRoute(G,H)}function g(x){const V=t.getRecordMatcher(x);V&&t.removeRoute(V)}function _(){return t.getRoutes().map(x=>x.record)}function w(x){return!!t.getRecordMatcher(x)}function b(x,V){if(V=pe({},V||i.value),typeof x=="string"){const m=To(n,x,V.path),S=t.resolve({path:m.path},V),A=o.createHref(m.fullPath);return pe(m,S,{params:p(S.params),hash:or(m.hash),redirectedFrom:void 0,href:A})}let H;if(x.path!=null)H=pe({},x,{path:To(n,x.path,V.path).path});else{const m=pe({},x.params);for(const S in m)m[S]==null&&delete m[S];H=pe({},x,{params:d(m)}),V.params=d(V.params)}const G=t.resolve(H,V),le=x.hash||"";G.params=c(p(G.params));const ve=Gp(r,pe({},x,{hash:Vp(le),path:G.path})),h=o.createHref(ve);return pe({fullPath:ve,hash:le,query:r===Gs?Ch(x.query):x.query||{}},G,{redirectedFrom:void 0,href:h})}function E(x){return typeof x=="string"?To(n,x,i.value.path):pe({},x)}function y(x,V){if(u!==x)return Ln(8,{from:V,to:x})}function C(x){return $(x)}function P(x){return C(pe(E(x),{replace:!0}))}function T(x){const V=x.matched[x.matched.length-1];if(V&&V.redirect){const{redirect:H}=V;let G=typeof H=="function"?H(x):H;return typeof G=="string"&&(G=G.includes("?")||G.includes("#")?G=E(G):{path:G},G.params={}),pe({query:x.query,hash:x.hash,params:G.path!=null?{}:x.params},G)}}function $(x,V){const H=u=b(x),G=i.value,le=x.state,ve=x.force,h=x.replace===!0,m=T(H);if(m)return $(pe(E(m),{state:typeof m=="object"?pe({},le,m.state):le,force:ve,replace:h}),V||H);const S=H;S.redirectedFrom=V;let A;return!ve&&Yp(r,G,H)&&(A=Ln(16,{to:S,from:G}),Xe(G,G,!0,!1)),(A?Promise.resolve(A):I(S,G)).catch(k=>wt(k)?wt(k,2)?k:ht(k):K(k,S,G)).then(k=>{if(k){if(wt(k,2))return $(pe({replace:h},E(k.to),{state:typeof k.to=="object"?pe({},le,k.to.state):le,force:ve}),V||S)}else k=O(S,G,!0,h,le);return j(S,G,k),k})}function z(x,V){const H=y(x,V);return H?Promise.reject(H):Promise.resolve()}function B(x){const V=_t.values().next().value;return V&&typeof V.runWithContext=="function"?V.runWithContext(x):x()}function I(x,V){let H;const[G,le,ve]=$h(x,V);H=Co(G.reverse(),"beforeRouteLeave",x,V);for(const m of G)m.leaveGuards.forEach(S=>{H.push(Ht(S,x,V))});const h=z.bind(null,x,V);return H.push(h),Ae(H).then(()=>{H=[];for(const m of l.list())H.push(Ht(m,x,V));return H.push(h),Ae(H)}).then(()=>{H=Co(le,"beforeRouteUpdate",x,V);for(const m of le)m.updateGuards.forEach(S=>{H.push(Ht(S,x,V))});return H.push(h),Ae(H)}).then(()=>{H=[];for(const m of ve)if(m.beforeEnter)if(pt(m.beforeEnter))for(const S of m.beforeEnter)H.push(Ht(S,x,V));else H.push(Ht(m.beforeEnter,x,V));return H.push(h),Ae(H)}).then(()=>(x.matched.forEach(m=>m.enterCallbacks={}),H=Co(ve,"beforeRouteEnter",x,V,B),H.push(h),Ae(H))).then(()=>{H=[];for(const m of s.list())H.push(Ht(m,x,V));return H.push(h),Ae(H)}).catch(m=>wt(m,8)?m:Promise.reject(m))}function j(x,V,H){a.list().forEach(G=>B(()=>G(x,V,H)))}function O(x,V,H,G,le){const ve=y(x,V);if(ve)return ve;const h=V===Tt,m=un?history.state:{};H&&(G||h?o.replace(x.fullPath,pe({scroll:h&&m&&m.scroll},le)):o.push(x.fullPath,le)),i.value=x,Xe(x,V,H,h),ht()}let ee;function ye(){ee||(ee=o.listen((x,V,H)=>{if(!vt.listening)return;const G=b(x),le=T(G);if(le){$(pe(le,{replace:!0}),G).catch(Yn);return}u=G;const ve=i.value;un&&rh(Fs(ve.fullPath,H.delta),oo()),I(G,ve).catch(h=>wt(h,12)?h:wt(h,2)?($(h.to,G).then(m=>{wt(m,20)&&!H.delta&&H.type===lr.pop&&o.go(-1,!1)}).catch(Yn),Promise.reject()):(H.delta&&o.go(-H.delta,!1),K(h,G,ve))).then(h=>{h=h||O(G,ve,!1),h&&(H.delta&&!wt(h,8)?o.go(-H.delta,!1):H.type===lr.pop&&wt(h,20)&&o.go(-1,!1)),j(G,ve,h)}).catch(Yn)}))}let be=Bn(),W=Bn(),te;function K(x,V,H){ht(x);const G=W.list();return G.length?G.forEach(le=>le(x,V,H)):console.error(x),Promise.reject(x)}function ke(){return te&&i.value!==Tt?Promise.resolve():new Promise((x,V)=>{be.add([x,V])})}function ht(x){return te||(te=!x,ye(),be.list().forEach(([V,H])=>x?H(x):V()),be.reset()),x}function Xe(x,V,H,G){const{scrollBehavior:le}=e;if(!un||!le)return Promise.resolve();const ve=!H&&oh(Fs(x.fullPath,0))||(G||!H)&&history.state&&history.state.scroll||null;return Rn().then(()=>le(x,V,ve)).then(h=>h&&nh(h)).catch(h=>K(h,x,V))}const Pe=x=>o.go(x);let We;const _t=new Set,vt={currentRoute:i,listening:!0,addRoute:v,removeRoute:g,hasRoute:w,getRoutes:_,resolve:b,options:e,push:C,replace:P,go:Pe,back:()=>Pe(-1),forward:()=>Pe(1),beforeEach:l.add,beforeResolve:s.add,afterEach:a.add,onError:W.add,isReady:ke,install(x){const V=this;x.component("RouterLink",Ah),x.component("RouterView",Ji),x.config.globalProperties.$router=V,Object.defineProperty(x.config.globalProperties,"$route",{enumerable:!0,get:()=>on(i)}),un&&!We&&i.value===Tt&&(We=!0,C(o.location).catch(le=>{}));const H={};for(const le in Tt)Object.defineProperty(H,le,{get:()=>i.value[le],enumerable:!0});x.provide(lo,V),x.provide(Pl,Ba(H)),x.provide(Jo,i);const G=x.unmount;_t.add(x),x.unmount=function(){_t.delete(x),_t.size<1&&(u=Tt,ee&&ee(),ee=null,i.value=Tt,We=!1,te=!1),G()}}};function Ae(x){return x.reduce((V,H)=>V.then(()=>B(H)),Promise.resolve())}return vt}function $h(e,t){const n=[],r=[],o=[],l=Math.max(t.matched.length,e.matched.length);for(let s=0;s Cn(u,a))?r.push(a):n.push(a));const i=e.matched[s];i&&(t.matched.find(u=>Cn(u,i))||o.push(i))}return[n,r,o]}function qe(){return Se(lo)}function bt(){return Se(Pl)}var Je=Uint8Array,dn=Uint16Array,Mh=Int32Array,Qi=new Je([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Xi=new Je([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Dh=new Je([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Zi=function(e,t){for(var n=new dn(31),r=0;r<31;++r)n[r]=t+=1< >1|(we&21845)<<1;$t=($t&52428)>>2|($t&13107)<<2,$t=($t&61680)>>4|($t&3855)<<4,Xo[we]=(($t&65280)>>8|($t&255)<<8)>>1}var Qn=function(e,t,n){for(var r=e.length,o=0,l=new dn(t);o >i]=u}else for(a=new dn(r),o=0;o >15-e[o]);return a},gr=new Je(288);for(var we=0;we<144;++we)gr[we]=8;for(var we=144;we<256;++we)gr[we]=9;for(var we=256;we<280;++we)gr[we]=7;for(var we=280;we<288;++we)gr[we]=8;var nc=new Je(32);for(var we=0;we<32;++we)nc[we]=5;var Fh=Qn(gr,9,1),jh=Qn(nc,5,1),Lo=function(e){for(var t=e[0],n=1;n t&&(t=e[n]);return t},ct=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},xo=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},Vh=function(e){return(e+7)/8|0},rc=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Je(e.subarray(t,n))},zh=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],tt=function(e,t,n){var r=new Error(t||zh[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,tt),!n)throw r;return r},Uh=function(e,t,n,r){var o=e.length,l=0;if(!o||t.f&&!t.l)return n||new Je(0);var s=!n,a=s||t.i!=2,i=t.i;s&&(n=new Je(o*3));var u=function(le){var ve=n.length;if(le>ve){var h=new Je(Math.max(ve*2,le));h.set(n),n=h}},c=t.f||0,d=t.p||0,p=t.b||0,v=t.l,g=t.d,_=t.m,w=t.n,b=o*8;do{if(!v){c=ct(e,d,1);var E=ct(e,d+1,3);if(d+=3,E)if(E==1)v=Fh,g=jh,_=9,w=5;else if(E==2){var T=ct(e,d,31)+257,$=ct(e,d+10,15)+4,z=T+ct(e,d+5,31)+1;d+=14;for(var B=new Je(z),I=new Je(19),j=0;j<$;++j)I[Dh[j]]=ct(e,d+j*3,7);d+=$*3;for(var O=Lo(I),ee=(1< >4;if(y<16)B[j++]=y;else{var W=0,te=0;for(y==16?(te=3+ct(e,d,3),d+=2,W=B[j-1]):y==17?(te=3+ct(e,d,7),d+=3):y==18&&(te=11+ct(e,d,127),d+=7);te--;)B[j++]=W}}var K=B.subarray(0,T),ke=B.subarray(T);_=Lo(K),w=Lo(ke),v=Qn(K,_,1),g=Qn(ke,w,1)}else tt(1);else{var y=Vh(d)+4,C=e[y-4]|e[y-3]<<8,P=y+C;if(P>o){i&&tt(0);break}a&&u(p+C),n.set(e.subarray(y,P),p),t.b=p+=C,t.p=d=P*8,t.f=c;continue}if(d>b){i&&tt(0);break}}a&&u(p+131072);for(var ht=(1<<_)-1,Xe=(1< >4;if(d+=W&15,d>b){i&&tt(0);break}if(W||tt(2),We<256)n[p++]=We;else if(We==256){Pe=d,v=null;break}else{var _t=We-254;if(We>264){var j=We-257,vt=Qi[j];_t=ct(e,d,(1< >4;Ae||tt(3),d+=Ae&15;var ke=Hh[x];if(x>3){var vt=Xi[x];ke+=xo(e,d)&(1< b){i&&tt(0);break}a&&u(p+131072);var V=p+_t;if(p >4>7||(e[0]<<8|e[1])%31)&&tt(6,"invalid zlib data"),(e[1]>>5&1)==+!t&&tt(6,"invalid zlib data: "+(e[1]&32?"need":"unexpected")+" dictionary"),(e[1]>>3&4)+2};function Kh(e,t){return Uh(e.subarray(Wh(e,t),-4),{i:2},t,t)}var Zo=typeof TextDecoder<"u"&&new TextDecoder,Gh=0;try{Zo.decode(qh,{stream:!0}),Gh=1}catch{}var Yh=function(e){for(var t="",n=0;;){var r=e[n++],o=(r>127)+(r>223)+(r>239);if(n+o>e.length)return{s:t,r:rc(e,n-1)};o?o==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):o&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r)}};function Jh(e,t){{for(var n=new Je(e.length),r=0;r {var r;return f("svg",{xmlns:"http://www.w3.org/2000/svg",class:["icon",`${e}-icon`],viewBox:"0 0 1024 1024",fill:t,"aria-label":`${e} icon`},(r=n.default)==null?void 0:r.call(n))};Le.displayName="IconBase";const Ol=({size:e=48,stroke:t=4,wrapper:n=!0,height:r=2*e})=>{const o=f("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,preserveAspectRatio:"xMidYMid",viewBox:"25 25 50 50"},[f("animateTransform",{attributeName:"transform",type:"rotate",dur:"2s",keyTimes:"0;1",repeatCount:"indefinite",values:"0;360"}),f("circle",{cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":t,"stroke-linecap":"round"},[f("animate",{attributeName:"stroke-dasharray",dur:"1.5s",keyTimes:"0;0.5;1",repeatCount:"indefinite",values:"1,200;90,200;1,200"}),f("animate",{attributeName:"stroke-dashoffset",dur:"1.5s",keyTimes:"0;0.5;1",repeatCount:"indefinite",values:"0;-35px;-125px"})])]);return n?f("div",{class:"loading-icon-wrapper",style:`display:flex;align-items:center;justify-content:center;height:${r}px`},o):o};Ol.displayName="LoadingIcon";const oc=(e,{slots:t})=>{var n;return(n=t.default)==null?void 0:n.call(t)},Xh=(e="")=>{if(e){if(typeof e=="number")return new Date(e);const t=Date.parse(e.toString());if(!Number.isNaN(t))return new Date(t)}return null},lc=(e,t)=>{let n=1;for(let r=0;r >6;return n+=n<<3,n^=n>>11,n%t},sc=Array.isArray,Zh=e=>typeof e=="function",ev=e=>typeof e=="string";var $l=e=>/^(https?:)?\/\//.test(e),tv=/.md((\?|#).*)?$/,nv=(e,t="/")=>!!($l(e)||e.startsWith("/")&&!e.startsWith(t)&&!tv.test(e)),ac=e=>Object.prototype.toString.call(e)==="[object Object]";function rv(){const e=X(!1);return In()&&ge(()=>{e.value=!0}),e}function ov(e){return rv(),L(()=>!!e())}const At=e=>typeof e=="string",xn=(e,t)=>At(e)&&e.startsWith(t),cn=(e,t)=>At(e)&&e.endsWith(t),Ml=Object.entries,lv=Object.fromEntries,Yt=Object.keys,sv=e=>(e.endsWith(".md")&&(e=`${e.slice(0,-3)}.html`),!e.endsWith("/")&&!e.endsWith(".html")&&(e=`${e}.html`),e=e.replace(/(^|\/)(?:README|index).html$/i,"$1"),e),ic=e=>{const[t,n=""]=e.split("#");return t?`${sv(t)}${n?`#${n}`:""}`:e},Zs=e=>ac(e)&&At(e.name),ea=(e,t=!1)=>e?sc(e)?e.map(n=>At(n)?{name:n}:Zs(n)?n:null).filter(n=>n!==null):At(e)?[{name:e}]:Zs(e)?[e]:(console.error(`Expect "author" to be \`AuthorInfo[] | AuthorInfo | string[] | string ${t?"":"| false"} | undefined\`, but got`,e),[]):[],cc=(e,t)=>{if(e){if(sc(e)&&e.every(At))return e;if(At(e))return[e];console.error(`Expect ${t||"value"} to be \`string[] | string | undefined\`, but got`,e)}return[]},av=e=>cc(e,"category"),iv=e=>cc(e,"tag"),so=e=>xn(e,"/"),uc=/#.*$/u,cv=e=>{const t=uc.exec(e);return t?t[0]:""},ta=e=>decodeURI(e).replace(uc,"").replace(/(index)?\.(md|html)$/,""),Dl=(e,t)=>{if(t===void 0)return!1;const n=ta(e.path),r=ta(t),o=cv(t);return o?o===e.hash&&(!r||n===r):n===r},na=e=>{const t=atob(e);return Qh(Kh(Jh(t)))},uv=e=>$l(e)?e:`https://github.com/${e}`,fc=e=>!$l(e)||/github\.com/.test(e)?"GitHub":/bitbucket\.org/.test(e)?"Bitbucket":/gitlab\.com/.test(e)?"GitLab":/gitee\.com/.test(e)?"Gitee":null,Wr=(e,...t)=>{const n=e.resolve(...t),r=n.matched[n.matched.length-1];if(!(r!=null&&r.redirect))return n;const{redirect:o}=r,l=Zh(o)?o(n):o,s=ev(l)?{path:l}:l;return Wr(e,{hash:n.hash,query:n.query,params:n.params,...s})},fv=e=>{var t;if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)&&!(e.currentTarget&&((t=e.currentTarget.getAttribute("target"))!=null&&t.match(/\b_blank\b/i))))return e.preventDefault(),!0},It=({to:e="",class:t="",...n},{slots:r})=>{var a;const o=qe(),l=ic(e),s=(i={})=>fv(i)?o.push(e).catch():Promise.resolve();return f("a",{...n,class:["vp-link",t],href:xn(l,"/")?Be(l):l,onClick:s},(a=r.default)==null?void 0:a.call(r))};It.displayName="VPLink";const dc=()=>f(Le,{name:"github"},()=>f("path",{d:"M511.957 21.333C241.024 21.333 21.333 240.981 21.333 512c0 216.832 140.544 400.725 335.574 465.664 24.49 4.395 32.256-10.07 32.256-23.083 0-11.69.256-44.245 0-85.205-136.448 29.61-164.736-64.64-164.736-64.64-22.315-56.704-54.4-71.765-54.4-71.765-44.587-30.464 3.285-29.824 3.285-29.824 49.195 3.413 75.179 50.517 75.179 50.517 43.776 75.008 114.816 53.333 142.762 40.79 4.523-31.66 17.152-53.377 31.19-65.537-108.971-12.458-223.488-54.485-223.488-242.602 0-53.547 19.114-97.323 50.517-131.67-5.035-12.33-21.93-62.293 4.779-129.834 0 0 41.258-13.184 134.912 50.346a469.803 469.803 0 0 1 122.88-16.554c41.642.213 83.626 5.632 122.88 16.554 93.653-63.488 134.784-50.346 134.784-50.346 26.752 67.541 9.898 117.504 4.864 129.834 31.402 34.347 50.474 78.123 50.474 131.67 0 188.586-114.73 230.016-224.042 242.09 17.578 15.232 33.578 44.672 33.578 90.454v135.85c0 13.142 7.936 27.606 32.854 22.87C862.25 912.597 1002.667 728.747 1002.667 512c0-271.019-219.648-490.667-490.71-490.667z"}));dc.displayName="GitHubIcon";const pc=()=>f(Le,{name:"gitlab"},()=>f("path",{d:"M229.333 78.688C223.52 62 199.895 62 193.895 78.688L87.958 406.438h247.5c-.188 0-106.125-327.75-106.125-327.75zM33.77 571.438c-4.875 15 .563 31.687 13.313 41.25l464.812 345L87.77 406.438zm301.5-165 176.813 551.25 176.812-551.25zm655.125 165-54-165-424.312 551.25 464.812-345c12.938-9.563 18.188-26.25 13.5-41.25zM830.27 78.688c-5.812-16.688-29.437-16.688-35.437 0l-106.125 327.75h247.5z"}));pc.displayName="GitLabIcon";const hc=()=>f(Le,{name:"gitee"},()=>f("path",{d:"M512 992C246.92 992 32 777.08 32 512S246.92 32 512 32s480 214.92 480 480-214.92 480-480 480zm242.97-533.34H482.39a23.7 23.7 0 0 0-23.7 23.7l-.03 59.28c0 13.08 10.59 23.7 23.7 23.7h165.96a23.7 23.7 0 0 1 23.7 23.7v11.85a71.1 71.1 0 0 1-71.1 71.1H375.71a23.7 23.7 0 0 1-23.7-23.7V423.11a71.1 71.1 0 0 1 71.1-71.1h331.8a23.7 23.7 0 0 0 23.7-23.7l.06-59.25a23.73 23.73 0 0 0-23.7-23.73H423.11a177.78 177.78 0 0 0-177.78 177.75v331.83c0 13.08 10.62 23.7 23.7 23.7h349.62a159.99 159.99 0 0 0 159.99-159.99V482.33a23.7 23.7 0 0 0-23.7-23.7z"}));hc.displayName="GiteeIcon";const vc=()=>f(Le,{name:"bitbucket"},()=>f("path",{d:"M575.256 490.862c6.29 47.981-52.005 85.723-92.563 61.147-45.714-20.004-45.714-92.562-1.133-113.152 38.29-23.442 93.696 7.424 93.696 52.005zm63.451-11.996c-10.276-81.152-102.29-134.839-177.152-101.156-47.433 21.138-79.433 71.424-77.129 124.562 2.853 69.705 69.157 126.866 138.862 120.576S647.3 548.571 638.708 478.83zm136.558-309.723c-25.161-33.134-67.986-38.839-105.728-45.13-106.862-17.151-216.576-17.7-323.438 1.134-35.438 5.706-75.447 11.996-97.719 43.996 36.572 34.304 88.576 39.424 135.424 45.129 84.553 10.862 171.447 11.447 256 .585 47.433-5.705 99.987-10.276 135.424-45.714zm32.585 591.433c-16.018 55.99-6.839 131.438-66.304 163.986-102.29 56.576-226.304 62.867-338.87 42.862-59.43-10.862-129.135-29.696-161.72-85.723-14.3-54.858-23.442-110.848-32.585-166.84l3.438-9.142 10.276-5.157c170.277 112.567 408.576 112.567 579.438 0 26.844 8.01 6.84 40.558 6.29 60.014zm103.424-549.157c-19.42 125.148-41.728 249.71-63.415 374.272-6.29 36.572-41.728 57.162-71.424 72.558-106.862 53.724-231.424 62.866-348.562 50.286-79.433-8.558-160.585-29.696-225.134-79.433-30.28-23.443-30.28-63.415-35.986-97.134-20.005-117.138-42.862-234.277-57.161-352.585 6.839-51.42 64.585-73.728 107.447-89.71 57.16-21.138 118.272-30.866 178.87-36.571 129.134-12.58 261.157-8.01 386.304 28.562 44.581 13.13 92.563 31.415 122.844 69.705 13.714 17.7 9.143 40.01 6.29 60.014z"}));vc.displayName="BitbucketIcon";const mc=()=>f(Le,{name:"source"},()=>f("path",{d:"M601.92 475.2c0 76.428-8.91 83.754-28.512 99.594-14.652 11.88-43.956 14.058-78.012 16.434-18.81 1.386-40.392 2.97-62.172 6.534-18.612 2.97-36.432 9.306-53.064 17.424V299.772c37.818-21.978 63.36-62.766 63.36-109.692 0-69.894-56.826-126.72-126.72-126.72S190.08 120.186 190.08 190.08c0 46.926 25.542 87.714 63.36 109.692v414.216c-37.818 21.978-63.36 62.766-63.36 109.692 0 69.894 56.826 126.72 126.72 126.72s126.72-56.826 126.72-126.72c0-31.086-11.286-59.598-29.7-81.576 13.266-9.504 27.522-17.226 39.996-19.206 16.038-2.574 32.868-3.762 50.688-5.148 48.312-3.366 103.158-7.326 148.896-44.55 61.182-49.698 74.25-103.158 75.24-187.902V475.2h-126.72zM316.8 126.72c34.848 0 63.36 28.512 63.36 63.36s-28.512 63.36-63.36 63.36-63.36-28.512-63.36-63.36 28.512-63.36 63.36-63.36zm0 760.32c-34.848 0-63.36-28.512-63.36-63.36s28.512-63.36 63.36-63.36 63.36 28.512 63.36 63.36-28.512 63.36-63.36 63.36zM823.68 158.4h-95.04V63.36h-126.72v95.04h-95.04v126.72h95.04v95.04h126.72v-95.04h95.04z"}));mc.displayName="SourceIcon";const dt=(e,t)=>{const n=t?t._instance:In();return ac(n==null?void 0:n.appContext.components)&&(e in n.appContext.components||at(e)in n.appContext.components||cr(at(e))in n.appContext.components)},dv=()=>ov(()=>typeof window<"u"&&window.navigator&&"userAgent"in window.navigator),pv=()=>{const e=dv();return L(()=>e.value&&/\b(?:Android|iPhone)/i.test(navigator.userAgent))},On=e=>{const t=Gt();return L(()=>e[t.value])};function ra(e,t){var n;const r=Fe();return Tl(()=>{r.value=e()},{...t,flush:(n=void 0)!=null?n:"sync"}),ln(r)}function ao(e,t){let n,r,o;const l=X(!0),s=()=>{l.value=!0,o()};ce(e,s,{flush:"sync"});const a=typeof t=="function"?t:t.get,i=typeof t=="function"?void 0:t.set,u=za((c,d)=>(r=c,o=d,{get(){return l.value&&(n=a(),l.value=!1),r(),n},set(p){i==null||i(p)}}));return Object.isExtensible(u)&&(u.trigger=s),u}function $n(e){return La()?(Ku(e),!0):!1}function He(e){return typeof e=="function"?e():on(e)}const yr=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const hv=Object.prototype.toString,vv=e=>hv.call(e)==="[object Object]",sr=()=>{},oa=mv();function mv(){var e,t;return yr&&((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 gc(e,t){function n(...r){return new Promise((o,l)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(l)})}return n}const yc=e=>e();function gv(...e){let t=0,n,r=!0,o=sr,l,s,a,i,u;!Me(e[0])&&typeof e[0]=="object"?{delay:s,trailing:a=!0,leading:i=!0,rejectOnCancel:u=!1}=e[0]:[s,a=!0,i=!0,u=!1]=e;const c=()=>{n&&(clearTimeout(n),n=void 0,o(),o=sr)};return p=>{const v=He(s),g=Date.now()-t,_=()=>l=p();return c(),v<=0?(t=Date.now(),_()):(g>v&&(i||!r)?(t=Date.now(),_()):a&&(l=new Promise((w,b)=>{o=u?b:w,n=setTimeout(()=>{t=Date.now(),r=!0,w(_()),c()},Math.max(0,v-g))})),!i&&!n&&(n=setTimeout(()=>r=!0,v)),r=!1,l)}}function yv(e=yc){const t=X(!0);function n(){t.value=!1}function r(){t.value=!0}const o=(...l)=>{t.value&&e(...l)};return{isActive:ln(t),pause:n,resume:r,eventFilter:o}}function bv(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const r=t;t=void 0,r&&await r},n}function bc(e){return In()}function _v(...e){if(e.length!==1)return Qr(...e);const t=e[0];return typeof t=="function"?ln(za(()=>({get:t,set:sr}))):X(t)}function wv(e,t=200,n=!1,r=!0,o=!1){return gc(gv(t,n,r,o),e)}function Ev(e,t,n={}){const{eventFilter:r=yc,...o}=n;return ce(e,gc(r,t),o)}function Sv(e,t,n={}){const{eventFilter:r,...o}=n,{eventFilter:l,pause:s,resume:a,isActive:i}=yv(r);return{stop:Ev(e,t,{...o,eventFilter:l}),pause:s,resume:a,isActive:i}}function io(e,t=!0,n){bc()?ge(e,n):t?e():Rn(e)}function Tv(e,t){bc()&&dr(e,t)}function Cv(e,t,n={}){const{immediate:r=!0}=n,o=X(!1);let l=null;function s(){l&&(clearTimeout(l),l=null)}function a(){o.value=!1,s()}function i(...u){s(),o.value=!0,l=setTimeout(()=>{o.value=!1,l=null,e(...u)},He(t))}return r&&(o.value=!0,yr&&i()),$n(a),{isPending:ln(o),start:i,stop:a}}function Kr(e=!1,t={}){const{truthyValue:n=!0,falsyValue:r=!1}=t,o=Me(e),l=X(e);function s(a){if(arguments.length)return l.value=a,l.value;{const i=He(n);return l.value=l.value===i?He(r):i,l.value}}return o?s:[l,s]}function xt(e){var t;const n=He(e);return(t=n==null?void 0:n.$el)!=null?t:n}const qt=yr?window:void 0,_c=yr?window.document:void 0,wc=yr?window.navigator:void 0;function Re(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=qt):[t,n,r,o]=e,!t)return sr;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const l=[],s=()=>{l.forEach(c=>c()),l.length=0},a=(c,d,p,v)=>(c.addEventListener(d,p,v),()=>c.removeEventListener(d,p,v)),i=ce(()=>[xt(t),He(o)],([c,d])=>{if(s(),!c)return;const p=vv(d)?{...d}:d;l.push(...n.flatMap(v=>r.map(g=>a(c,v,g,p))))},{immediate:!0,flush:"post"}),u=()=>{i(),s()};return $n(u),u}function Lv(){const e=X(!1),t=In();return t&&ge(()=>{e.value=!0},t),e}function br(e){const t=Lv();return L(()=>(t.value,!!e()))}function Ec(e,t={}){const{window:n=qt}=t,r=br(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let o;const l=X(!1),s=u=>{l.value=u.matches},a=()=>{o&&("removeEventListener"in o?o.removeEventListener("change",s):o.removeListener(s))},i=Tl(()=>{r.value&&(a(),o=n.matchMedia(He(e)),"addEventListener"in o?o.addEventListener("change",s):o.addListener(s),l.value=o.matches)});return $n(()=>{i(),a(),o=void 0}),l}function la(e,t={}){const{controls:n=!1,navigator:r=wc}=t,o=br(()=>r&&"permissions"in r);let l;const s=typeof e=="string"?{name:e}:e,a=X(),i=()=>{l&&(a.value=l.state)},u=bv(async()=>{if(o.value){if(!l)try{l=await r.permissions.query(s),Re(l,"change",i),i()}catch{a.value="prompt"}return l}});return u(),n?{state:a,isSupported:o,query:u}:a}function xv(e={}){const{navigator:t=wc,read:n=!1,source:r,copiedDuring:o=1500,legacy:l=!1}=e,s=br(()=>t&&"clipboard"in t),a=la("clipboard-read"),i=la("clipboard-write"),u=L(()=>s.value||l),c=X(""),d=X(!1),p=Cv(()=>d.value=!1,o);function v(){s.value&&b(a.value)?t.clipboard.readText().then(E=>{c.value=E}):c.value=w()}u.value&&n&&Re(["copy","cut"],v);async function g(E=He(r)){u.value&&E!=null&&(s.value&&b(i.value)?await t.clipboard.writeText(E):_(E),c.value=E,d.value=!0,p.start())}function _(E){const y=document.createElement("textarea");y.value=E??"",y.style.position="absolute",y.style.opacity="0",document.body.appendChild(y),y.select(),document.execCommand("copy"),y.remove()}function w(){var E,y,C;return(C=(y=(E=document==null?void 0:document.getSelection)==null?void 0:E.call(document))==null?void 0:y.toString())!=null?C:""}function b(E){return E==="granted"||E==="prompt"}return{isSupported:u,text:c,copied:d,copy:g}}const Rr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ir="__vueuse_ssr_handlers__",kv=Av();function Av(){return Ir in Rr||(Rr[Ir]=Rr[Ir]||{}),Rr[Ir]}function Rv(e,t){return kv[e]||t}function Iv(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 Pv={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()}},sa="vueuse-storage";function Nl(e,t,n,r={}){var o;const{flush:l="pre",deep:s=!0,listenToStorageChanges:a=!0,writeDefaults:i=!0,mergeDefaults:u=!1,shallow:c,window:d=qt,eventFilter:p,onError:v=I=>{console.error(I)},initOnMounted:g}=r,_=(c?Fe:X)(typeof t=="function"?t():t);if(!n)try{n=Rv("getDefaultStorage",()=>{var I;return(I=qt)==null?void 0:I.localStorage})()}catch(I){v(I)}if(!n)return _;const w=He(t),b=Iv(w),E=(o=r.serializer)!=null?o:Pv[b],{pause:y,resume:C}=Sv(_,()=>T(_.value),{flush:l,deep:s,eventFilter:p});d&&a&&io(()=>{Re(d,"storage",z),Re(d,sa,B),g&&z()}),g||z();function P(I,j){d&&d.dispatchEvent(new CustomEvent(sa,{detail:{key:e,oldValue:I,newValue:j,storageArea:n}}))}function T(I){try{const j=n.getItem(e);if(I==null)P(j,null),n.removeItem(e);else{const O=E.write(I);j!==O&&(n.setItem(e,O),P(j,O))}}catch(j){v(j)}}function $(I){const j=I?I.newValue:n.getItem(e);if(j==null)return i&&w!=null&&n.setItem(e,E.write(w)),w;if(!I&&u){const O=E.read(j);return typeof u=="function"?u(O,w):b==="object"&&!Array.isArray(O)?{...w,...O}:O}else return typeof j!="string"?j:E.read(j)}function z(I){if(!(I&&I.storageArea!==n)){if(I&&I.key==null){_.value=w;return}if(!(I&&I.key!==e)){y();try{(I==null?void 0:I.newValue)!==E.write(_.value)&&(_.value=$(I))}catch(j){v(j)}finally{I?Rn(C):C()}}}}function B(I){z(I.detail)}return _}function Ov(e){return Ec("(prefers-color-scheme: dark)",e)}function $v(e,t,n={}){const{window:r=qt,...o}=n;let l;const s=br(()=>r&&"ResizeObserver"in r),a=()=>{l&&(l.disconnect(),l=void 0)},i=L(()=>Array.isArray(e)?e.map(d=>xt(d)):[xt(e)]),u=ce(i,d=>{if(a(),s.value&&r){l=new ResizeObserver(t);for(const p of d)p&&l.observe(p,o)}},{immediate:!0,flush:"post"}),c=()=>{a(),u()};return $n(c),{isSupported:s,stop:c}}function Mv(e,t={width:0,height:0},n={}){const{window:r=qt,box:o="content-box"}=n,l=L(()=>{var d,p;return(p=(d=xt(e))==null?void 0:d.namespaceURI)==null?void 0:p.includes("svg")}),s=X(t.width),a=X(t.height),{stop:i}=$v(e,([d])=>{const p=o==="border-box"?d.borderBoxSize:o==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(r&&l.value){const v=xt(e);if(v){const g=v.getBoundingClientRect();s.value=g.width,a.value=g.height}}else if(p){const v=Array.isArray(p)?p:[p];s.value=v.reduce((g,{inlineSize:_})=>g+_,0),a.value=v.reduce((g,{blockSize:_})=>g+_,0)}else s.value=d.contentRect.width,a.value=d.contentRect.height},n);io(()=>{const d=xt(e);d&&(s.value="offsetWidth"in d?d.offsetWidth:t.width,a.value="offsetHeight"in d?d.offsetHeight:t.height)});const u=ce(()=>xt(e),d=>{s.value=d?t.width:0,a.value=d?t.height:0});function c(){i(),u()}return{width:s,height:a,stop:c}}const aa=["fullscreenchange","webkitfullscreenchange","webkitendfullscreen","mozfullscreenchange","MSFullscreenChange"];function Bl(e,t={}){const{document:n=_c,autoExit:r=!1}=t,o=L(()=>{var b;return(b=xt(e))!=null?b:n==null?void 0:n.querySelector("html")}),l=X(!1),s=L(()=>["requestFullscreen","webkitRequestFullscreen","webkitEnterFullscreen","webkitEnterFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].find(b=>n&&b in n||o.value&&b in o.value)),a=L(()=>["exitFullscreen","webkitExitFullscreen","webkitExitFullScreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].find(b=>n&&b in n||o.value&&b in o.value)),i=L(()=>["fullScreen","webkitIsFullScreen","webkitDisplayingFullscreen","mozFullScreen","msFullscreenElement"].find(b=>n&&b in n||o.value&&b in o.value)),u=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].find(b=>n&&b in n),c=br(()=>o.value&&n&&s.value!==void 0&&a.value!==void 0&&i.value!==void 0),d=()=>u?(n==null?void 0:n[u])===o.value:!1,p=()=>{if(i.value){if(n&&n[i.value]!=null)return n[i.value];{const b=o.value;if((b==null?void 0:b[i.value])!=null)return!!b[i.value]}}return!1};async function v(){if(!(!c.value||!l.value)){if(a.value)if((n==null?void 0:n[a.value])!=null)await n[a.value]();else{const b=o.value;(b==null?void 0:b[a.value])!=null&&await b[a.value]()}l.value=!1}}async function g(){if(!c.value||l.value)return;p()&&await v();const b=o.value;s.value&&(b==null?void 0:b[s.value])!=null&&(await b[s.value](),l.value=!0)}async function _(){await(l.value?v():g())}const w=()=>{const b=p();(!b||b&&d())&&(l.value=b)};return Re(n,aa,w,!1),Re(()=>xt(o),aa,w,!1),r&&$n(v),{isSupported:c,isFullscreen:l,enter:g,exit:v,toggle:_}}function ko(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function Ao(e,t=sr,n={}){const{immediate:r=!0,manual:o=!1,type:l="text/javascript",async:s=!0,crossOrigin:a,referrerPolicy:i,noModule:u,defer:c,document:d=_c,attrs:p={}}=n,v=X(null);let g=null;const _=E=>new Promise((y,C)=>{const P=z=>(v.value=z,y(z),z);if(!d){y(!1);return}let T=!1,$=d.querySelector(`script[src="${He(e)}"]`);$?$.hasAttribute("data-loaded")&&P($):($=d.createElement("script"),$.type=l,$.async=s,$.src=He(e),c&&($.defer=c),a&&($.crossOrigin=a),u&&($.noModule=u),i&&($.referrerPolicy=i),Object.entries(p).forEach(([z,B])=>$==null?void 0:$.setAttribute(z,B)),T=!0),$.addEventListener("error",z=>C(z)),$.addEventListener("abort",z=>C(z)),$.addEventListener("load",()=>{$.setAttribute("data-loaded","true"),t($),P($)}),T&&($=d.head.appendChild($)),E||P($)}),w=(E=!0)=>(g||(g=_(E)),g),b=()=>{if(!d)return;g=null,v.value&&(v.value=null);const E=d.querySelector(`script[src="${He(e)}"]`);E&&d.head.removeChild(E)};return r&&!o&&io(w),o||Tv(b),{scriptTag:v,load:w,unload:b}}function Sc(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth 1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Ro=new WeakMap;function Tc(e,t=!1){const n=X(t);let r=null,o="";ce(_v(e),a=>{const i=ko(He(a));if(i){const u=i;if(Ro.get(u)||Ro.set(u,u.style.overflow),u.style.overflow!=="hidden"&&(o=u.style.overflow),u.style.overflow==="hidden")return n.value=!0;if(n.value)return u.style.overflow="hidden"}},{immediate:!0});const l=()=>{const a=ko(He(e));!a||n.value||(oa&&(r=Re(a,"touchmove",i=>{Dv(i)},{passive:!1})),a.style.overflow="hidden",n.value=!0)},s=()=>{const a=ko(He(e));!a||!n.value||(oa&&(r==null||r()),a.style.overflow=o,Ro.delete(a),n.value=!1)};return $n(s),L({get(){return n.value},set(a){a?l():s()}})}function Nv(e={}){const{window:t=qt,behavior:n="auto"}=e;if(!t)return{x:X(0),y:X(0)};const r=X(t.scrollX),o=X(t.scrollY),l=L({get(){return r.value},set(a){scrollTo({left:a,behavior:n})}}),s=L({get(){return o.value},set(a){scrollTo({top:a,behavior:n})}});return Re(t,"scroll",()=>{r.value=t.scrollX,o.value=t.scrollY},{capture:!1,passive:!0}),{x:l,y:s}}function Bv(e={}){const{window:t=qt,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:r=Number.POSITIVE_INFINITY,listenOrientation:o=!0,includeScrollbar:l=!0}=e,s=X(n),a=X(r),i=()=>{t&&(l?(s.value=t.innerWidth,a.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,a.value=t.document.documentElement.clientHeight))};if(i(),io(i),Re("resize",i,{passive:!0}),o){const u=Ec("(orientation: portrait)");ce(u,()=>i())}return{width:s,height:a}}const Cc=({type:e="info",text:t="",vertical:n,color:r},{slots:o})=>{var l;return f("span",{class:["vp-badge",e,{diy:r}],style:{verticalAlign:n??!1,backgroundColor:r??!1}},((l=o.default)==null?void 0:l.call(o))||t)};Cc.displayName="Badge";var Hv=q({name:"FontIcon",props:{icon:{type:String,default:""},color:{type:String,default:""},size:{type:[String,Number],default:""}},setup(e){const t=L(()=>{const r=["font-icon icon"],o=`fas fa-${e.icon}`;return r.push("fa-fw fa-sm"),r.push(e.icon.includes(" ")?e.icon:o),r}),n=L(()=>{const r={};return e.color&&(r.color=e.color),e.size&&(r["font-size"]=Number.isNaN(Number(e.size))?e.size:`${e.size}px`),Yt(r).length?r:null});return()=>e.icon?f("span",{key:e.icon,class:t.value,style:n.value}):null}});const Lc=()=>f(Le,{name:"back-to-top"},()=>[f("path",{d:"M512 843.2c-36.2 0-66.4-13.6-85.8-21.8-10.8-4.6-22.6 3.6-21.8 15.2l7 102c.4 6.2 7.6 9.4 12.6 5.6l29-22c3.6-2.8 9-1.8 11.4 2l41 64.2c3 4.8 10.2 4.8 13.2 0l41-64.2c2.4-3.8 7.8-4.8 11.4-2l29 22c5 3.8 12.2.6 12.6-5.6l7-102c.8-11.6-11-20-21.8-15.2-19.6 8.2-49.6 21.8-85.8 21.8z"}),f("path",{d:"m795.4 586.2-96-98.2C699.4 172 513 32 513 32S324.8 172 324.8 488l-96 98.2c-3.6 3.6-5.2 9-4.4 14.2L261.2 824c1.8 11.4 14.2 17 23.6 10.8L419 744s41.4 40 94.2 40c52.8 0 92.2-40 92.2-40l134.2 90.8c9.2 6.2 21.6.6 23.6-10.8l37-223.8c.4-5.2-1.2-10.4-4.8-14zM513 384c-34 0-61.4-28.6-61.4-64s27.6-64 61.4-64c34 0 61.4 28.6 61.4 64S547 384 513 384z"})]);Lc.displayName="BackToTopIcon";var Fv={"/en-US/":{backToTop:"Back to top"},"/":{backToTop:"返回顶部"}},jv=q({name:"BackToTop",props:{threshold:{type:Number,default:100},noProgress:Boolean},setup(e){const t=Ce(),n=On(Fv),r=Fe(),{height:o}=Mv(r),{height:l}=Bv(),{y:s}=Nv(),a=L(()=>t.value.backToTop!==!1&&s.value>e.threshold),i=L(()=>s.value/(o.value-l.value));return ge(()=>{r.value=document.body}),()=>f(Ut,{name:"fade"},()=>a.value?f("button",{type:"button",class:"vp-back-to-top-button","aria-label":n.value.backToTop,"data-balloon-pos":"left",onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})}},[e.noProgress?null:f("svg",{class:"vp-scroll-progress"},f("circle",{cx:"50%",cy:"50%",style:{"stroke-dasharray":`calc(${Math.PI*i.value*100}% - ${4*Math.PI}px) calc(${Math.PI*100}% - ${4*Math.PI}px)`}})),f(Lc)]):null)}});const Vv=Qe({enhance:({app:e})=>{dt("Badge")||e.component("Badge",Cc),dt("FontIcon")||e.component("FontIcon",Hv)},setup:()=>{Ao("https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/js/brands.min.js",()=>{},{attrs:{"data-auto-replace-svg":"nest"}}),Ao("https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/js/solid.min.js",()=>{},{attrs:{"data-auto-replace-svg":"nest"}}),Ao("https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/js/fontawesome.min.js",()=>{},{attrs:{"data-auto-replace-svg":"nest"}})},rootComponents:[()=>f(jv,{})]});function xc(e,t,n){var r,o,l;t===void 0&&(t=50),n===void 0&&(n={});var s=(r=n.isImmediate)!=null&&r,a=(o=n.callback)!=null&&o,i=n.maxWait,u=Date.now(),c=[];function d(){if(i!==void 0){var v=Date.now()-u;if(v+t>=i)return i-v}return t}var p=function(){var v=[].slice.call(arguments),g=this;return new Promise(function(_,w){var b=s&&l===void 0;if(l!==void 0&&clearTimeout(l),l=setTimeout(function(){if(l=void 0,u=Date.now(),!s){var y=e.apply(g,v);a&&a(y),c.forEach(function(C){return(0,C.resolve)(y)}),c=[]}},d()),b){var E=e.apply(g,v);return a&&a(E),_(E)}c.push({resolve:_,reject:w})})};return p.cancel=function(v){l!==void 0&&clearTimeout(l),c.forEach(function(g){return(0,g.reject)(v)}),c=[]},p}const zv=({headerLinkSelector:e,headerAnchorSelector:t,delay:n,offset:r=5})=>{const o=qe(),s=xc(()=>{var _,w;const a=Math.max(window.scrollY,document.documentElement.scrollTop,document.body.scrollTop);if(Math.abs(a-0) p.some(E=>E.hash===b.hash));for(let b=0;b =(((_=E.parentElement)==null?void 0:_.offsetTop)??0)-r,P=!y||a<(((w=y.parentElement)==null?void 0:w.offsetTop)??0)-r;if(!(C&&P))continue;const $=decodeURIComponent(o.currentRoute.value.hash),z=decodeURIComponent(E.hash);if($===z)return;if(d){for(let B=b+1;B {window.addEventListener("scroll",s)}),wl(()=>{window.removeEventListener("scroll",s)})},ia=async(e,t)=>{const{scrollBehavior:n}=e.options;e.options.scrollBehavior=void 0,await e.replace({query:e.currentRoute.value.query,hash:t}).finally(()=>e.options.scrollBehavior=n)},Uv=".vp-sidebar-link, .toc-link",qv=".header-anchor",Wv=200,Kv=5,Gv=Qe({setup(){zv({headerLinkSelector:Uv,headerAnchorSelector:qv,delay:Wv,offset:Kv})}});let kc=()=>null;const Ac=Symbol(""),Yv=e=>{kc=e},Jv=()=>Se(Ac),Qv=e=>{e.provide(Ac,kc)};var Xv={"/en-US/":{title:"Catalog",empty:"No catalog"},"/":{title:"目录",empty:"暂无目录"}},Zv=q({name:"AutoCatalog",props:{base:{type:String,default:""},level:{type:Number,default:3},index:Boolean,hideHeading:Boolean},setup(e){const t=Jv(),n=On(Xv),r=ue(),o=qe(),l=Di(),s=d=>d?f(t,{icon:d}):null,a=({title:d,path:p,icon:v,class:g})=>f(It,{class:g,to:p},()=>[s(v),d||p]),i=d=>{const p=d.I;return typeof p>"u"||p},u=()=>{const d=e.base||r.value.path.replace(/\/[^/]+$/,"/"),p=o.getRoutes(),v=[];return p.filter(({meta:g,path:_})=>{if(!xn(_,d)||_===d)return!1;if(d==="/"){const w=Yt(l.value.locales).filter(b=>b!=="/");if(_==="/404.html"||w.some(b=>xn(_,b)))return!1}return(cn(_,".html")&&!cn(_,"/index.html")||cn(_,"/"))&&i(g)}).map(({path:g,meta:_})=>{const w=g.substring(d.length).split("/").length;return{title:_.t||"",icon:_.i||null,base:g.replace(/\/[^/]+\/?$/,"/"),order:_.O||null,level:cn(g,"/")?w-1:w,path:g}}).filter(({title:g,level:_})=>g&&_<=e.level).sort(({title:g,level:_,path:w,order:b},{title:E,level:y,path:C,order:P})=>_-y||(cn(w,"/index.html")?-1:cn(C,"/index.html")?1:b===null?P===null?g.localeCompare(E):P:P===null?b:b>0?P>0?b-P:-1:P<0?b-P:1)).forEach(g=>{var b;const{base:_,level:w}=g;switch(w){case 1:v.push(g);break;case 2:{const E=v.find(y=>y.path===_);E&&(E.children??(E.children=[])).push(g);break}default:{const E=v.find(y=>y.path===_.replace(/\/[^/]+\/$/,"/"));if(E){const y=(b=E.children)==null?void 0:b.find(C=>C.path===_);y&&(y.children??(y.children=[])).push(g)}}}}),v},c=L(()=>u());return()=>{const d=c.value.some(p=>p.children);return f("div",{class:["vp-catalog-wrapper",{index:e.index}]},[e.hideHeading?null:f("h2",{class:"vp-catalog-main-title"},n.value.title),c.value.length?f(e.index?"ol":"ul",{class:["vp-catalogs",{deep:d}]},c.value.map(({children:p=[],icon:v,path:g,title:_})=>{const w=a({title:_,path:g,icon:v,class:"vp-catalog-title"});return f("li",{class:"vp-catalog"},d?[f("h3",{id:_,class:["vp-catalog-child-title",{"has-children":p.length}]},[f("a",{href:`#${_}`,class:"header-anchor","aria-hidden":!0},"#"),w]),p.length?f(e.index?"ol":"ul",{class:"vp-child-catalogs"},p.map(({children:b=[],icon:E,path:y,title:C})=>f("li",{class:"vp-child-catalog"},[f("div",{class:["vp-catalog-sub-title",{"has-children":b.length}]},[f("a",{href:`#${C}`,class:"header-anchor"},"#"),f(a,{title:C,path:y,icon:E,class:"vp-catalog-title"})]),b.length?f(e.index?"ol":"div",{class:e.index?"vp-sub-catalogs":"vp-sub-catalogs-wrapper"},b.map(({icon:P,path:T,title:$})=>{const z=f(a,{title:$,path:T,icon:P,class:""});return e.index?f("li",{class:"vp-sub-catalog"},z):f(a,{title:$,path:T,icon:P,class:"vp-sub-catalog-link"})})):null]))):null]:f("div",{class:"vp-catalog-child-title"},w))})):f("p",{class:"vp-empty-catalog"},n.value.empty)])}}}),e1=Qe({enhance:({app:e})=>{Qv(e),dt("AutoCatalog",e)||e.component("AutoCatalog",Zv)}});const t1=f("svg",{class:"external-link-icon",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"},[f("path",{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}),f("polygon",{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"})]),Rc=q({name:"ExternalLinkIcon",props:{locales:{type:Object,required:!1,default:()=>({})}},setup(e){const t=Gt(),n=L(()=>e.locales[t.value]??{openInNewWindow:"open in new window"});return()=>f("span",[t1,f("span",{class:"external-link-icon-sr-only"},n.value.openInNewWindow)])}});var n1={};const r1=n1,o1=Qe({enhance({app:e}){e.component("ExternalLinkIcon",f(Rc,{locales:r1}))}});/** + * NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress + * @license MIT + */const se={settings:{minimum:.08,easing:"ease",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,barSelector:'[role="bar"]',parent:"body",template:''},status:null,set:e=>{const t=se.isStarted();e=Io(e,se.settings.minimum,1),se.status=e===1?null:e;const n=se.render(!t),r=n.querySelector(se.settings.barSelector),o=se.settings.speed,l=se.settings.easing;return n.offsetWidth,l1(s=>{Pr(r,{transform:"translate3d("+ca(e)+"%,0,0)",transition:"all "+o+"ms "+l}),e===1?(Pr(n,{transition:"none",opacity:"1"}),n.offsetWidth,setTimeout(function(){Pr(n,{transition:"all "+o+"ms linear",opacity:"0"}),setTimeout(function(){se.remove(),s()},o)},o)):setTimeout(()=>s(),o)}),se},isStarted:()=>typeof se.status=="number",start:()=>{se.status||se.set(0);const e=()=>{setTimeout(()=>{se.status&&(se.trickle(),e())},se.settings.trickleSpeed)};return se.settings.trickle&&e(),se},done:e=>!e&&!se.status?se:se.inc(.3+.5*Math.random()).set(1),inc:e=>{let t=se.status;return t?(typeof e!="number"&&(e=(1-t)*Io(Math.random()*t,.1,.95)),t=Io(t+e,0,.994),se.set(t)):se.start()},trickle:()=>se.inc(Math.random()*se.settings.trickleRate),render:e=>{if(se.isRendered())return document.getElementById("nprogress");ua(document.documentElement,"nprogress-busy");const t=document.createElement("div");t.id="nprogress",t.innerHTML=se.settings.template;const n=t.querySelector(se.settings.barSelector),r=e?"-100":ca(se.status||0),o=document.querySelector(se.settings.parent);return Pr(n,{transition:"all 0 linear",transform:"translate3d("+r+"%,0,0)"}),o!==document.body&&ua(o,"nprogress-custom-parent"),o==null||o.appendChild(t),t},remove:()=>{fa(document.documentElement,"nprogress-busy"),fa(document.querySelector(se.settings.parent),"nprogress-custom-parent");const e=document.getElementById("nprogress");e&&s1(e)},isRendered:()=>!!document.getElementById("nprogress")},Io=(e,t,n)=>e n?n:e,ca=e=>(-1+e)*100,l1=function(){const e=[];function t(){const n=e.shift();n&&n(t)}return function(n){e.push(n),e.length===1&&t()}}(),Pr=function(){const e=["Webkit","O","Moz","ms"],t={};function n(s){return s.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(a,i){return i.toUpperCase()})}function r(s){const a=document.body.style;if(s in a)return s;let i=e.length;const u=s.charAt(0).toUpperCase()+s.slice(1);let c;for(;i--;)if(c=e[i]+u,c in a)return c;return s}function o(s){return s=n(s),t[s]??(t[s]=r(s))}function l(s,a,i){a=o(a),s.style[a]=i}return function(s,a){for(const i in a){const u=a[i];u!==void 0&&Object.prototype.hasOwnProperty.call(a,i)&&l(s,i,u)}}}(),Ic=(e,t)=>(typeof e=="string"?e:Hl(e)).indexOf(" "+t+" ")>=0,ua=(e,t)=>{const n=Hl(e),r=n+t;Ic(n,t)||(e.className=r.substring(1))},fa=(e,t)=>{const n=Hl(e);if(!Ic(e,t))return;const r=n.replace(" "+t+" "," ");e.className=r.substring(1,r.length-1)},Hl=e=>(" "+(e.className||"")+" ").replace(/\s+/gi," "),s1=e=>{e&&e.parentNode&&e.parentNode.removeChild(e)},a1=()=>{ge(()=>{const e=qe(),t=new Set;t.add(e.currentRoute.value.path),e.beforeEach(n=>{t.has(n.path)||se.start()}),e.afterEach(n=>{t.add(n.path),se.done()})})},i1=Qe({setup(){a1()}}),c1=JSON.parse(`{"encrypt":{},"logo":"/logo.png","logoDark":"/logoDark.png","repo":"/Nia-Server/NiaServer-Docs","docsRepo":"https://github.com/Nia-Server/NiaServer-Docs","docsBranch":"main","docsDir":"docs","editLinkPattern":":repo/edit/:branch/:path","locales":{"/en-US/":{"lang":"en-US","navbarLocales":{"langName":"English","selectLangAriaLabel":"Select language"},"metaLocales":{"author":"Author","date":"Writing Date","origin":"Original","views":"Page views","category":"Category","tag":"Tag","readingTime":"Reading Time","words":"Words","toc":"On This Page","prev":"Prev","next":"Next","lastUpdated":"Last update","contributors":"Contributors","editLink":"Edit this page on GitHub","print":"Print"},"outlookLocales":{"themeColor":"Theme Color","darkmode":"Theme Mode","fullscreen":"Full Screen"},"routeLocales":{"skipToContent":"Skip to main content","notFoundTitle":"Page not found","notFoundMsg":["There’s nothing here.","How did we get here?","That’s a Four-Oh-Four.","Looks like we've got some broken links."],"back":"Go back","home":"Take me home","openInNewWindow":"Open in new window"},"navbar":["/en-US/","/en-US/about",{"text":"Server","icon":"server","prefix":"/en-US/server/","children":["README","developers","specialThanks"]},{"text":"Developer documentation","icon":"code","prefix":"/en-US/dev/","children":["README","Http-Bot","Ntrade","KillItem"]},{"text":"Links","icon":"link","children":[{"text":"Blog","link":"https://www.mcnia.top"},{"text":"How to edit this document","link":"https://www.mcnia.top/howtoedit"}]}],"sidebar":{"/en-US/server/":["README","developers","specialThanks"],"/en-US/dev/":["README","Http-Bot","Ntrade","KillItem"]},"footer":"Copyright © 2019-2024 Nia-Server","displayFooter":true},"/":{"lang":"zh-CN","navbarLocales":{"langName":"简体中文","selectLangAriaLabel":"选择语言"},"metaLocales":{"author":"作者","date":"写作日期","origin":"原创","views":"访问量","category":"分类","tag":"标签","readingTime":"阅读时间","words":"字数","toc":"此页内容","prev":"上一页","next":"下一页","lastUpdated":"上次编辑于","contributors":"贡献者","editLink":"在 GitHub 上编辑此页","print":"打印"},"outlookLocales":{"themeColor":"主题色","darkmode":"外观","fullscreen":"全屏"},"routeLocales":{"skipToContent":"跳至主要內容","notFoundTitle":"页面不存在","notFoundMsg":["这里什么也没有","我们是怎么来到这儿的?","这 是 四 零 四 !","看起来你访问了一个失效的链接"],"back":"返回上一页","home":"带我回家","openInNewWindow":"Open in new window"},"navbar":["/","/about",{"text":"游玩指南","icon":"lightbulb","prefix":"/play-guide/","children":["README","regulation","Illustrated"]},{"text":"服务器相关","icon":"server","prefix":"/server/","children":["README","changelog","history","developers","specialThanks","map"]},{"text":"开发者文档","icon":"code","prefix":"/dev/","children":["README","Http-Bot","Shop","Ntrade","KillItem"]},{"text":"其他链接","icon":"link","children":[{"text":"Blog","link":"https://www.mcnia.top"},{"text":"如何编辑本文档站","link":"https://www.mcnia.top/howtoedit"},{"text":"获取授权ID","link":"https://getid.mcnia.top"}]}],"sidebar":{"/play-guide/":["README","regulation","Illustrated"],"/server/":["README","changelog","history","developers","specialThanks","map"],"/dev/":["README","Shop","Land","Http-Bot","Ntrade","KillItem"]},"footer":"Copyright © 2019-2024 NIA服务器","displayFooter":true}},"themeColor":true,"fullscreen":true}`),u1=X(c1),Pc=()=>u1,Oc=Symbol(""),f1=()=>{const e=Se(Oc);if(!e)throw new Error("useThemeLocaleData() is called without provider.");return e},d1=(e,t)=>{const{locales:n,...r}=e;return{...r,...n==null?void 0:n[t]}},p1=Qe({enhance({app:e}){const t=Pc(),n=e._context.provides[Rl],r=L(()=>d1(t.value,n.value));e.provide(Oc,r),Object.defineProperties(e.config.globalProperties,{$theme:{get(){return t.value}},$themeLocale:{get(){return r.value}}})}});var h1={provider:"Giscus",lightTheme:"https://unpkg.com/vuepress-theme-hope@2.0.0-rc.0/templates/giscus/light.css",darkTheme:"https://unpkg.com/vuepress-theme-hope@2.0.0-rc.0/templates/giscus/dark.css",repo:"NIANIANKNIA/giscus-discussions",repoId:"R_kgDOKyNHYg",category:"Announcements",categoryId:"DIC_kwDOKyNHYs4CbRRt"};const v1=h1;let m1=v1;const $c=Symbol(""),Mc=()=>Se($c),g1=Mc,y1=e=>{e.provide($c,m1)},da=["ar","ca","de","en","eo","es","fa","fr","he","id","it","ja","ko","nl","pl","pt","ro","ru","th","tr","uk","vi","zh-CN","zh-TW"];var b1=q({name:"GiscusComment",props:{identifier:{type:String,required:!0},darkmode:Boolean},setup(e){const t=g1(),n=!!(t.repo&&t.repoId&&t.category&&t.categoryId),{repo:r,repoId:o,category:l,categoryId:s}=t,a=X(!1),i=L(()=>{const c=to().value;if(da.includes(c))return c;const d=c.split("-")[0];return da.includes(d)?d:"en"}),u=L(()=>({repo:r,repoId:o,category:l,categoryId:s,lang:i.value,theme:e.darkmode?t.darkTheme||"dark":t.lightTheme||"light",mapping:t.mapping||"pathname",term:e.identifier,inputPosition:t.inputPosition||"top",reactionsEnabled:t.reactionsEnabled===!1?"0":"1",strict:t.strict===!1?"0":"1",loading:t.lazyLoading===!1?"eager":"lazy",emitMetadata:"0"}));return ge(async()=>{await Y(()=>import("./giscus-D-fkNSKD.js"),__vite__mapDeps([])),a.value=!0}),()=>n?f("div",{id:"comment",class:["giscus-wrapper",{"input-top":t.inputPosition!=="bottom"}]},a.value?f("giscus-widget",u.value):f(Ol)):null}}),_1=q({name:"CommentService",props:{darkmode:Boolean},setup(e){const t=Mc(),n=ue(),r=Ce(),o=t.comment!==!1,l=L(()=>r.value.comment||o&&r.value.comment!==!1);return()=>f(b1,{identifier:r.value.commentID||n.value.path,darkmode:e.darkmode,style:{display:l.value?"block":"none"}})}}),w1=Qe({enhance:({app:e})=>{y1(e),e.component("CommentService",_1)}}),E1={"/en-US/":{copy:"Copy code",copied:"Copied",hint:"Copied successfully"},"/":{copy:"复制代码",copied:"已复制",hint:"复制成功"}},S1=['.theme-hope-content div[class*="language-"] pre'];const T1=800,C1=2e3,L1=E1,x1=!1,k1=S1,pa=!1,Po=new Map,A1=()=>{const{copy:e}=xv({legacy:!0}),t=On(L1),n=ue(),r=pv(),o=a=>{if(!a.hasAttribute("copy-code-registered")){const i=document.createElement("button");i.type="button",i.classList.add("copy-code-button"),i.innerHTML='',i.setAttribute("aria-label",t.value.copy),i.setAttribute("data-copied",t.value.copied),a.parentElement&&a.parentElement.insertBefore(i,a),a.setAttribute("copy-code-registered","")}},l=()=>Rn().then(()=>new Promise(a=>{setTimeout(()=>{k1.forEach(i=>{document.querySelectorAll(i).forEach(o)}),a()},T1)})),s=(a,i,u)=>{let{innerText:c=""}=i;/language-(shellscript|shell|bash|sh|zsh)/.test(a.classList.toString())&&(c=c.replace(/^ *(\$|>) /gm,"")),e(c).then(()=>{u.classList.add("copied"),clearTimeout(Po.get(u));const d=setTimeout(()=>{u.classList.remove("copied"),u.blur(),Po.delete(u)},C1);Po.set(u,d)})};ge(()=>{(!r.value||pa)&&l(),Re("click",a=>{const i=a.target;if(i.matches('div[class*="language-"] > button.copy')){const u=i.parentElement,c=i.nextElementSibling;c&&s(u,c,i)}else if(i.matches('div[class*="language-"] div.copy-icon')){const u=i.parentElement,c=u.parentElement,d=u.nextElementSibling;d&&s(c,d,u)}}),ce(()=>n.value.path,()=>{(!r.value||pa)&&l()})})};var R1=Qe({setup:()=>{A1()}}),I1={"/en-US/":{author:"Copyright by :author",license:"License under :license",link:":link"},"/":{author:"著作权归:author所有",license:"基于:license协议",link:"原文链接::link"}};const P1=()=>{const e=Ce(),t=On(I1),n=ue(),r=L(()=>!!e.value.copy||e.value.copy!==!1&&!0),o=L(()=>mr(e.value.copy)?e.value.copy:null),l=L(()=>{var d;return((d=o.value)==null?void 0:d.disableCopy)??!1}),s=L(()=>{var d;return r.value?((d=o.value)==null?void 0:d.disableSelection)??!1:!1}),a=L(()=>{var d;return r.value?((d=o.value)==null?void 0:d.maxLength)??0:0}),i=L(()=>{var d;return((d=o.value)==null?void 0:d.triggerLength)??100}),u=()=>{const{author:d="",license:p=""}=n.value.copyright,{author:v,license:g,link:_}=t.value;return[d?v.replace(":author",d):"",p?g.replace(":license",p):"",_.replace(":link",window.location.href)].filter(w=>w).join(` +`)},c=d=>{const p=getSelection();if(p){const v=p.getRangeAt(0);if(r.value){const g=v.toString().length;if(l.value||a.value&&g>a.value)return d.preventDefault();if(g>=i.value){d.preventDefault();const _=u(),w=document.createElement("div");w.appendChild(p.getRangeAt(0).cloneContents()),d.clipboardData&&(d.clipboardData.setData("text/html",`${w.innerHTML} ${_.replace(/\\n/g,"`),d.clipboardData.setData("text/plain",`${p.getRangeAt(0).cloneContents().textContent||""} +------ +${_}`))}}}};ge(()=>{const d=document.querySelector("#app");Re(d,"copy",c),Tl(()=>{d.style.userSelect=s.value?"none":"auto"})})};var O1=Qe({setup:()=>{P1()}});const Or=Nl("VUEPRESS_CODE_TAB_STORE",{});var $1=q({name:"CodeTabs",props:{active:{type:Number,default:0},data:{type:Array,required:!0},id:{type:String,required:!0},tabId:{type:String,default:""}},slots:Object,setup(e,{slots:t}){const n=X(e.active),r=Fe([]),o=()=>{e.tabId&&(Or.value[e.tabId]=e.data[n.value].id)},l=(u=n.value)=>{n.value=u
")}{n.value=u>0?u-1:r.value.length-1,r.value[n.value].focus()},a=(u,c)=>{u.key===" "||u.key==="Enter"?(u.preventDefault(),n.value=c):u.key==="ArrowRight"?(u.preventDefault(),l()):u.key==="ArrowLeft"&&(u.preventDefault(),s()),e.tabId&&(Or.value[e.tabId]=e.data[n.value].id)},i=()=>{if(e.tabId){const u=e.data.findIndex(({id:c})=>Or.value[e.tabId]===c);if(u!==-1)return u}return e.active};return ge(()=>{n.value=i(),ce(()=>Or.value[e.tabId],(u,c)=>{if(e.tabId&&u!==c){const d=e.data.findIndex(({id:p})=>p===u);d!==-1&&(n.value=d)}})}),()=>e.data.length?f("div",{class:"vp-code-tabs"},[f("div",{class:"vp-code-tabs-nav",role:"tablist"},e.data.map(({id:u},c)=>{const d=c===n.value;return f("button",{type:"button",ref:p=>{p&&(r.value[c]=p)},class:["vp-code-tab-nav",{active:d}],role:"tab","aria-controls":`codetab-${e.id}-${c}`,"aria-selected":d,onClick:()=>{n.value=c,o()},onKeydown:p=>a(p,c)},t[`title${c}`]({value:u,isActive:d}))})),e.data.map(({id:u},c)=>{const d=c===n.value;return f("div",{class:["vp-code-tab",{active:d}],id:`codetab-${e.id}-${c}`,role:"tabpanel","aria-expanded":d},[f("div",{class:"vp-code-tab-title"},t[`title${c}`]({value:u,isActive:d})),t[`tab${c}`]({value:u,isActive:d})])})]):null}});const Dc=({active:e=!1},{slots:t})=>{var n;return f("div",{class:["code-group-item",{active:e}],"aria-selected":e},(n=t.default)==null?void 0:n.call(t))};Dc.displayName="CodeGroupItem";const M1=q({name:"CodeGroup",slots:Object,setup(e,{slots:t}){const n=X(-1),r=Fe([]),o=(a=n.value)=>{n.value=a {n.value=a>0?a-1:r.value.length-1,r.value[n.value].focus()},s=(a,i)=>{a.key===" "||a.key==="Enter"?(a.preventDefault(),n.value=i):a.key==="ArrowRight"?(a.preventDefault(),o(i)):a.key==="ArrowLeft"&&(a.preventDefault(),l(i))};return()=>{var i;const a=(((i=t.default)==null?void 0:i.call(t))||[]).filter(u=>u.type.name==="CodeGroupItem").map(u=>(u.props===null&&(u.props={}),u));return a.length===0?null:(n.value<0||n.value>a.length-1?(n.value=a.findIndex(u=>"active"in u.props),n.value===-1&&(n.value=0)):a.forEach((u,c)=>{u.props.active=c===n.value}),f("div",{class:"code-group"},[f("div",{class:"code-group-nav"},a.map((u,c)=>{const d=c===n.value;return f("button",{type:"button",ref:p=>{p&&(r.value[c]=p)},class:["code-group-nav-tab",{active:d}],"aria-pressed":d,"aria-expanded":d,onClick:()=>{n.value=c},onKeydown:p=>s(p,c)},u.props.title)})),a]))}}}),D1=()=>{Re("beforeprint",()=>{document.querySelectorAll("details").forEach(e=>{e.open=!0})})},N1=' ',B1=' ',H1=' ';var F1={useBabel:!1,jsLib:[],cssLib:[],codepenLayout:"left",codepenEditors:"101",babel:"https://unpkg.com/@babel/standalone/babel.min.js",vue:"https://unpkg.com/vue/dist/vue.global.prod.js",react:"https://unpkg.com/react/umd/react.production.min.js",reactDOM:"https://unpkg.com/react-dom/umd/react-dom.production.min.js"};const Oo=F1,ha={html:{types:["html","slim","haml","md","markdown","vue"],map:{html:"none",vue:"none",md:"markdown"}},js:{types:["js","javascript","coffee","coffeescript","ts","typescript","ls","livescript"],map:{js:"none",javascript:"none",coffee:"coffeescript",ls:"livescript",ts:"typescript"}},css:{types:["css","less","sass","scss","stylus","styl"],map:{css:"none",styl:"stylus"}}},j1=(e,t,n)=>{const r=document.createElement(e);return mr(t)&&Yt(t).forEach(o=>{if(o.indexOf("data"))r[o]=t[o];else{const l=o.replace("data","");r.dataset[l]=t[o]}}),r},Fl=e=>({...Oo,...e,jsLib:Array.from(new Set([...Oo.jsLib||[],...e.jsLib||[]])),cssLib:Array.from(new Set([...Oo.cssLib||[],...e.cssLib||[]]))}),yn=(e,t)=>{if(e[t]!==void 0)return e[t];const n=new Promise(r=>{var l;const o=document.createElement("script");o.src=t,(l=document.querySelector("body"))==null||l.appendChild(o),o.onload=()=>{r()}});return e[t]=n,n},V1=(e,t)=>{if(t.css&&Array.from(e.childNodes).every(n=>n.nodeName!=="STYLE")){const n=j1("style",{innerHTML:t.css});e.appendChild(n)}},z1=(e,t,n)=>{const r=n.getScript();if(r&&Array.from(t.childNodes).every(o=>o.nodeName!=="SCRIPT")){const o=document.createElement("script");o.appendChild(document.createTextNode(`{const document=window.document.querySelector('#${e} .vp-code-demo-display').shadowRoot; +${r}}`)),t.appendChild(o)}},U1=e=>{const t=Yt(e),n={html:[],js:[],css:[],isLegal:!1};return["html","js","css"].forEach(r=>{const o=t.filter(l=>ha[r].types.includes(l));if(o.length){const l=o[0];n[r]=[e[l].replace(/^\n|\n$/g,""),ha[r].map[l]||l]}}),n.isLegal=(!n.html.length||n.html[1]==="none")&&(!n.js.length||n.js[1]==="none")&&(!n.css.length||n.css[1]==="none"),n},Nc=e=>e.replace(/
/g,"
").replace(/<((\S+)[^<]*?)\s+\/>/g,"<$1>$2>"),Bc=e=>`+${Nc(e)} +`,q1=e=>`${e.replace("export default ","const $reactApp = ").replace(/App\.__style__(\s*)=(\s*)`([\s\S]*)?`/,"")}; +ReactDOM.createRoot(document.getElementById("app")).render(React.createElement($reactApp))`,W1=e=>e.replace(/export\s+default\s*\{(\n*[\s\S]*)\n*\}\s*;?$/u,"Vue.createApp({$1}).mount('#app')").replace(/export\s+default\s*define(Async)?Component\s*\(\s*\{(\n*[\s\S]*)\n*\}\s*\)\s*;?$/u,"Vue.createApp({$1}).mount('#app')").trim(),Hc=e=>`(function(exports){var module={};module.exports=exports;${e};return module.exports.__esModule?module.exports.default:module.exports;})({})`,K1=(e,t)=>{const n=Fl(t),r=e.js[0]||"";return{...n,html:Nc(e.html[0]||""),js:r,css:e.css[0]||"",isLegal:e.isLegal,getScript:()=>{var o;return n.useBabel?((o=window.Babel.transform(r,{presets:["es2015"]}))==null?void 0:o.code)||"":r}}},G1=/([\s\S]+)<\/template>/u,Y1=/ +🤖Http-BOT | NIA服务器 + + + + + +跳至主要內容+ + +🤖Http-BOT
大约 12 分钟 🤖Http-BOT
版本提示
以下所有api均基于最新构建的版本(见下方RELEASE)
为什么开发?
由于目前我的世界的Script-api无法实现诸如文件读写等功能,为此我们特此基于C++开发了
NIA-Http-Bot
用来实现更多功能,从而赋予Script-api更多可能功能特性
- 基于http可以实现对特定文件进行读写、创建以及删除等功能
- 基于http搭配NiaServer-Core以及LLONEBot可以实现QQ机器人与服务器联动功能
使用前注意事项
1.本项目基于http进行通讯,故当前Minecraft版本应当注意启用minecraft/server-net模块(该模块只能运行在服务器上)
2.您可以前往NiaServer-Core项目地址的release下载最新release构建的NIAHttpBOT.exe来获取最新版的
NIA-Http-Bot
3.如果您在使用期间遇到了问题/有建议,您可以前往NiaServer-Core的issues进行反馈!
4.由于采用的是http通讯,而非https,我们非常不推荐您将NIAHttpBOT与基岩版服务端分开放置于两台服务器上,这是非常不安全的操作!请务必将NiaHttpBOT与基岩版服务端放置于同一台服务器之上,并注意防火墙设置,不要开放使用过程中涉及的两个端口,以免对服务器安全造成威胁!
使用/开发教程
提示
这里使用的是LLONEBot,事实上,我们是基于onebot-v11进行的开发,只要您所使用的机器人遵循这个接口,即可使用!
由于minecraft/server-net模块在本地存档中无法启用,所以我们应当在本地搭建一个服务器环境用于开发
1.前往我的世界官网下载BDS,并将下好的服务端解压
2.安装行为包
3.修改服务器端文件,来启用net模块:将
config/default/permissions.json
内容改为{ + "allowed_modules": [ + "@minecraft/server-gametest", + "@minecraft/server", + "@minecraft/server-ui", + "@minecraft/server-admin", + "@minecraft/server-editor", + "@minecraft/server-net" + ] +} + +
即可启用
4.Windows平台下下载最新release构建的NIAHttpBOT.exe来获取最新版的
NIAHttp-Bot
,Linux平台下载最新release构建的NIAHttpBOT来获取最新版的NIAHttp-Bot
5.根据自己的平台,下载最新的NTQQ,后根据LLONEBot安装教程安装相应的机器人框架
6.安装后,打开机器人设置界面,启用HTTP服务,HTTP服务监听端口与下述配置文件中ClientPort保持一致,启用HTTP事件上报,上报地址如果是下述配置项目则为
http://127.0.0.1:10086/qqEvent
,机器人至此配置完毕7.Windows平台点击NIAHttpBOT.exe启动;Linux平台在终端输入
./NIAHttpBOT
来启动!在Linux如果出项权限不够的提示,这个错误是因为你试图运行的文件没有执行权限。你可以使用
chmod
命令来给文件添加执行权限。以下是具体的步骤:7.1. 打开终端
7.2. 使用
cd
命令导航到文件所在的目录7.3. 运行
chmod +x NIAHttpBOT
命令给文件添加执行权限这是具体的命令:
chmod +x NIAHttpBOT +
然后你就可以使用
./NIAHttpBOT
命令来运行你的程序了。8.开始开发!
配置文件
# ip地址,一般为不用改 +IPAddress = "127.0.0.1" + +# 服务器端口,需与行为包端口保持一致 +ServerPort = 10086 + +#是否启用DOS指令功能 +UseCmd = false + +#是否启用QQ机器人相关功能 +UseQQBot = true + +# 客户端端口,需要与机器人设置的监听Http端口一致 +ClientPort = 10023 +https://github.com/Nia-Server/NiaServer-Docs + +# 监听QQ群 +QQGroup = "123456789" + +
QQ-BOT 相关指令
一般指令
参数说明
<XboxID>
玩家的XboxID注:当前还不能录入带空格的XboxID,需要管理员手动修改
player_data.json
文件详细指令
#帮助: 显示帮助菜单 + +#赞我: 给自己点10个赞 + +#绑定 <XboxID>: 绑定XboxID + +例:#绑定 NIANIANKNIA + +#查:查询自己账号的相关信息 + +#查 @要查询的人 : 查询别人账号的相关信息 +
管理指令
参数说明
<时间>
应当以min(分钟)、h(小时)、d(天)为结尾,前面只能为阿拉伯数字例:1min、10h、100d等
详细指令
+#禁言 @要禁言的人 <时间>: 禁言指定群成员 + +例:#禁言 @NIANIANKNIA 1h + +#解禁 @要解禁的人: 解禁指定群成员 + +#改绑 @要改绑的人 <XboxID>: 改绑XboxID + +#封禁 @要封禁的人 <时间>: 封禁指定群成员游戏账号 + +例:#封禁 @NIANIANKNIA 1d + +#解封 @要解封的人: 解封指定群成员账号 + +#改权限 @要改权限的人 <权限>: 改变指定群成员的权限 +
HTTP API一览表
[POST]
/RunCmd
执行DOS命令
警告
由于API涉及服务器安全性问题,本功能默认关闭,请在确定做好准备的条件下修改配置文件后启用本功能!
可以实现的功能:
如需了解更多DOS指令,请前往微软官方文档站查看
使用示例
const port = 3000 +const reqRunCmd = new HttpRequest(`http://127.0.0.1:${port}/RunCmd`); + reqRunCmd.body = "del 123.txt" + reqRunCmd.method = HttpRequestMethod.Post; + reqRunCmd.headers = [ + new HttpHeader("Content-Type", "text/plain"), + ]; +http.request(reqRunCmd).then((response) => { + if (response.status == 200) { + console.log("Dos command executed successfully!") + } else { + console.error("Dependent server connection failed! Check whether the dependent server started successfully.") + } +}) +
[POST]
/CheckFile
检查一个文件是否存在,目标文件存在则返回
true
,状态码为200
,不存在则返回false
,状态码为400
使用示例
const port = 3000 +const reqCheckFile = new HttpRequest(`http://127.0.0.1:${port}/CheckFile`); + reqCheckFile.body = "FileName.json" + reqCheckFile.method = HttpRequestMethod.Post; + reqCheckFile.headers = [ + new HttpHeader("Content-Type", "text/plain"), + ]; +http.request(reqCheckFile).then((response) => { + if (response.status == 200) { + console.log("Target file exists.") + } else if (response.status == 400) { + console.error("The target file does not exist") + } else { + console.error("Dependent server connection failed! Check whether the dependent server started successfully.") + } +}) +
[POST]
/CheckDir
检查目标文件夹是否存在,目标文件夹存在则返回
true
,状态码为200
,不存在则返回false
,状态码为400
使用示例
const port = 3000 +const reqCheckDir = new HttpRequest(`http://127.0.0.1:${port}/CheckDir`); + reqCheckDir.body = "./A" + reqCheckDir.method = HttpRequestMethod.Post; + reqCheckDir.headers = [ + new HttpHeader("Content-Type", "text/plain"), + ]; +http.request(reqCheckDir).then((response) => { + if (response.status == 200) { + console.log("Target folder exists.") + } else if (response.status == 400) { + console.error("The target folder does not exist") + } else { + console.error("Dependent server connection failed! Check whether the dependent server started successfully.") + } +}) +
[POST]
/CreateNewFile
创建一个文件,创建成功返回
success
,状态码为200
,创建失败则返回失败原因
,状态码为400
使用示例
const port = 3000 +const reqCreateNewFile = new HttpRequest(`http://127.0.0.1:${port}/CreateNewFile`); + reqCreateNewFile.body = JSON.stringify({"fileName":"test.txt","content":"这是第一行\n这是第二行"}) + reqCreateNewFile.method = HttpRequestMethod.Post; + reqCreateNewFile.headers = [ + new HttpHeader("Content-Type", "text/plain"), + ]; +http.request(reqCreateNewFile).then((response) => { + if (response.status == 200) { + console.log("File created successfully!") + } else if (response.status == 400) { + console.error(response.body) + } else { + console.error("Dependent server connection failed! Check whether the dependent server started successfully.") + } +}) +
[POST]
/CreateNewJsonFile
创建一个JSON文件,创建成功返回
success
,状态码为200
,创建失败则返回失败原因
,状态码为400
使用示例
const port = 3000 +const reqCreateNewJsonFile = new HttpRequest(`http://127.0.0.1:${port}/CreateNewJsonFile`); + reqCreateNewJsonFile.body = JSON.stringify({"fileName":"market111.json","content":{"a":10}}) + reqCreateNewJsonFile.method = HttpRequestMethod.Post; + reqCreateNewJsonFile.headers = [ + new HttpHeader("Content-Type", "text/plain"), + ]; +http.request(reqCreateNewJsonFile).then((response) => { + if (response.status == 200) { + console.log("File created successfully!") + } else if (response.status == 400) { + console.error(response.body) + } else { + console.error("Dependent server connection failed! Check whether the dependent server started successfully.") + } +}) +
[POST]
/GetFileData
获取文件数据,获取成功则返回文件数据(类型为字符串),状态码为
200
,获取失败则返回fail
,状态码为400
使用示例
const port = 3000 +const reqGetFileData = new HttpRequest(`http://127.0.0.1:${port}/GetFileData`); + reqGetFileData.body = "text.txt" + reqGetFileData.method = HttpRequestMethod.Post; + reqGetFileData.headers = [ + new HttpHeader("Content-Type", "text/plain"), + ]; +http.request(reqGetFileData).then((response) => { + if (response.status == 200) { + console.log("Get file data successfully! File data:" + response.body) + } else if (response.status == 400) { + console.error("The target file does not exist") + } else { + console.error("Dependent server connection failed! Check whether the dependent server started successfully.") + } +}) +
[POST]
/GetJsonFileData
警告
json文件应当没有任何语法错误/注释,否则将无法正确读取json数据!,详细请查看json文件读取注意事项
获取JSON文件数据,获取成功则返回json格式的数据,状态码为
200
,获取失败则返回fail
,状态码为400
使用示例
const port = 3000 +const reqGetJsonFileData = new HttpRequest(`http://127.0.0.1:${port}/GetJsonFileData`); + reqGetJsonFileData.body = "market.json" + reqGetJsonFileData.method = HttpRequestMethod.Post; + reqGetJsonFileData.headers = [ + new HttpHeader("Content-Type", "text/plain"), + ]; +http.request(reqGetJsonFileData).then((response) => { + if (response.status == 200) { + console.log("Get file data successfully! File data:" + response.body) + } else if (response.status == 400) { + console.error("The target file does not exist") + } else { + console.error("Dependent server connection failed! Check whether the dependent server started successfully.") + } +}) +
[POST]
/OverwriteFile
覆盖文件内容,覆盖成功则返回
success
,状态码为200
,覆盖失败则返回失败原因
,状态码为400
使用示例
const port = 3000 +const reqOverwriteFile = new HttpRequest(`http://127.0.0.1:${port}/OverwriteFile`); + reqOverwriteFile.body = JSON.stringify({"fileName":"FileName.txt","content": "这是第一行\n这是第二行"}) + reqOverwriteFile.method = HttpRequestMethod.Post; + reqOverwriteFile.headers = [ + new HttpHeader("Content-Type", "text/plain"), + ]; +http.request(reqOverwriteFile).then((response) => { + if (response.status == 200) { + console.log("Overwrite file data successfully!") + } else if (response.status == 400) { + console.error(response.body) + } else { + console.error("Dependent server connection failed! Check whether the dependent server started successfully.") + } +}) +
[POST]
/OverwriteJsonFile
覆盖JSON文件内容,覆盖成功则返回
success
,状态码为200
,覆盖失败则返回失败原因
,状态码为200
使用示例
const port = 3000 +const reqOverwriteJsonFile = new HttpRequest(`http://127.0.0.1:${port}/OverwriteJsonFile`); + reqOverwriteJsonFile.body = JSON.stringify({"fileName":"FileName.json","content":{"a":"呵呵呵呵"}}) + reqOverwriteJsonFile.method = HttpRequestMethod.Post; + reqOverwriteJsonFile.headers = [ + new HttpHeader("Content-Type", "text/plain"), + ]; +http.request(reqOverwriteJsonFile).then((response) => { + if (response.status == 200) { + console.log("Overwrite file data successfully!") + } else if (response.status == 400) { + console.error(response.body) + } else { + console.error("Dependent server connection failed! Check whether the dependent server started successfully.") + } +}) +
[POST]
/WriteLineToFile
向目标文件最后写入如一行内容,成功则返回
success
,状态码为200
,失败则返回失败原因
,状态码为400
注意增加换行符(\n),否则不会换行!
使用示例
const port = 3000 +const reqWriteLineToFile = new HttpRequest(`http://127.0.0.1:${port}/WriteLineToFile`); + reqWriteLineToFile.body = JSON.stringify({"fileName":"123.txt","content": "这是一行测试内容" + "\n"}) + reqWriteLineToFile.method = HttpRequestMethod.Post; + reqWriteLineToFile.headers = [ + new HttpHeader("Content-Type", "text/plain"), + ]; +http.request(reqWriteLineToFile).then((response) => { + if (response.status == 200) { + console.log("Overwrite file data successfully!") + } else if (response.status == 400) { + console.error(response.body) + } else { + console.error("Dependent server connection failed! Check whether the dependent server started successfully.") + } +}) +
[POST]
/CopyFolder
将特定文件夹复制到指定位置
附加说明
JSON文件读取注意事项
json文件应当没有任何语法错误/注释,否则将无法正确读取json数据!
以下是错误示例:
多了一个
,
产生了语法错误!{ + "key":value, +} +
不能进行注释,否则会导致无法正确读取!
{ + //这是一行注释,这会导致无法正常读取! + "key":value +} +
错误的使用了中文的标点符号导致语法错误!
{ + //这是一行注释,这会导致无法正常读取! + "key1":value, + "key2":value +} +
使用示例
建议使用的方法
创建
./API/filesystem.js
文件,内容如下(目前写了一些常用的功能,更多功能将在后续更新)
import {http,HttpRequestMethod,HttpRequest,HttpHeader} from '@minecraft/server-net'; + +const port = 10086 +const server_url = "http://127.0.0.1" + +export class ExternalFS { + + /** + * @function 执行DOS命令 + * @param {String} cmd + * @return {String | Number} 获取成功返回success,服务器连接失败返回-1 + */ + RunCmd(cmd) { + const reqRunCmd = new HttpRequest(`${server_url}:${port}/RunCmd`) + .setBody(cmd) + .setMethod(HttpRequestMethod.Post) + .addHeader("Content-Type", "text/plain"); + return new Promise(async (resolve) => { + const response = await http.request(reqRunCmd); + if (response.status == 200) { + resolve(response.body); + } else { + resolve(-1); + } + }) + } + + /** + * @function 获取文件内容 + * @param {String} filename + * @return {String | Number} 获取成功返回文件数据,文件不存在返回0,服务器连接失败返回-1 + */ + GetFileData(filename) { + const reqGetFileData = new HttpRequest(`${server_url}:${port}/GetFileData`) + .setBody(filename) + .setMethod(HttpRequestMethod.Post) + .addHeader("Content-Type", "text/plain"); + return new Promise(async (resolve) => { + const response = await http.request(reqGetFileData); + if (response.status == 200) { + resolve(JSON.parse(response.body)); + } else if (response.status == 400) { + resolve(0); + } else { + resolve(-1); + } + }) + } + + /** + * @function 获取json文件内容 + * @param {String} filename + * @return {Object | Number} 获取成功返回json数据,文件不存在返回0,服务器连接失败返回-1 + */ + GetJSONFileData(filename) { + const reqGetJsonFileData = new HttpRequest(`${server_url}:${port}/GetJsonFileData`) + .setBody(filename) + .setMethod(HttpRequestMethod.Post) + .addHeader("Content-Type", "text/plain"); + return new Promise(async (resolve) => { + const response = await http.request(reqGetJsonFileData); + if (response.status == 200) { + resolve(JSON.parse(response.body)); + } else if (response.status == 400) { + resolve(0); + } else { + resolve(-1); + } + }) + } + + /** + * @function 创建新文件 + * @param {String} filename + * @param {String} filecontent + * @return {String | Number} 创建成功返回success,创建失败返回0,服务器连接失败返回-1 + */ + CreateNewFile(filename,filecontent) { + const reqCreateNewFile = new HttpRequest(`${server_url}:${port}/CreateNewFile`) + .setBody(JSON.stringify({"fileName":filename,"content":filecontent})) + .setMethod(HttpRequestMethod.Post) + .addHeader("Content-Type", "text/plain") + return new Promise(async (resolve) => { + const response = await http.request(reqCreateNewFile); + if (response.status == 200) { + resolve(response.body); + } else if (response.status == 400) { + resolve(0); + } else { + resolve(-1); + } + }); + } + + /** + * @function 创建json文件 + * @param {String} filename + * @param {Object} filecontent + * @return {String | Number} 创建成功返回success,创建失败返回0,服务器连接失败返回-1 + */ + CreateNewJsonFile(filename,filecontent) { + const reqCreateNewJsonFile = new HttpRequest(`${server_url}:${port}/CreateNewJsonFile`) + .setBody(JSON.stringify({"fileName":filename,"content":filecontent})) + .setMethod(HttpRequestMethod.Post) + .addHeader("Content-Type", "text/plain") + return new Promise(async (resolve) => { + const response = await http.request(reqCreateNewJsonFile); + if (response.status == 200) { + resolve(response.body); + } else if (response.status == 400) { + resolve(0); + } else { + resolve(-1); + } + }); + } + + /** + * @function 覆写文件 + * @param {String} filename + * @param {String} filecontent + * @return {String | Number} 覆写成功返回success,覆写失败返回0,服务器连接失败返回-1 + */ + OverwriteFile(filename,filecontent) { + const reqOverwriteFile = new HttpRequest(`${server_url}:${port}/OverwriteFile`) + .setBody(JSON.stringify({"fileName":filename,"content":filecontent})) + .setMethod(HttpRequestMethod.Post) + .addHeader("Content-Type", "text/plain"); + return new Promise(async (resolve) => { + const response = await http.request(reqOverwriteFile); + if (response.status == 200) { + resolve(response.body); + } else if (response.status == 400) { + resolve(0); + } else { + resolve(-1); + } + }) + } + + /** + * @function 覆写json文件 + * @param {String} filename + * @param {Object} filecontent + * @return {String | Number} 覆写成功返回success,覆写失败返回0,服务器连接失败返回-1 + */ + OverwriteJsonFile(filename,filecontent) { + const reqOverwriteJsonFile = new HttpRequest(`${server_url}:${port}/OverwriteJsonFile`) + .setBody(JSON.stringify({"fileName":filename,"content":filecontent})) + .setMethod(HttpRequestMethod.Post) + .addHeader("Content-Type", "text/plain"); + return new Promise(async (resolve) => { + const response = await http.request(reqOverwriteJsonFile); + if (response.status == 200) { + resolve(response.body); + } else if (response.status == 400) { + resolve(0); + } else { + resolve(-1); + } + }) + } + + /** + * @function 向特定文件写入一行内容 + * @param {String} filename + * @param {String} filecontent + * @return {String | Number} 写入成功返回success,覆写失败返回0,服务器连接失败返回-1 + */ + WriteLineToFile(filename,filecontent) { + const reqWriteLineToFile = new HttpRequest(`${server_url}:${port}/WriteLineToFile`) + .setBody(JSON.stringify({"fileName":filename,"content":filecontent})) + .setMethod(HttpRequestMethod.Post) + .addHeader("Content-Type", "text/plain"); + return new Promise(async (resolve) => { + const response = await http.request(reqWriteLineToFile); + if (response.status == 200) { + resolve(response.body); + } else if (response.status == 400) { + resolve(0); + } else { + resolve(-1); + } + }) + } +} + + + + +
然后我们可以直接调用即可,不用反复写
调用示例(截取自玩家交易市场部分代码)
import { world } from '@minecraft/server'; +import { ExternalFS } from './API/filesystem'; + +//违禁物品,等后期接入配置文件 +const fs = new ExternalFS(); +const port = 10086 +var MarketData = [-1] + + +//服务器启动监听&&获得玩家市场数据 +world.afterEvents.worldInitialize.subscribe(() => { + fs.getJSONFileData("market.json").then((result) => { + //文件不存在 + if (result === 0) { + fs.CreateNewJsonFile("market.json",[]).then((result) => { + if (result === "success") { + MarketData = []; + console.log("玩家市场文件不存在,已成功创建!"); + } else if (result === -1) { + console.error("依赖服务器连接失败!请检查依赖服务器是否成功启动,以及端口是否设置正确!"); + } + }); + } else if (result === -1) { + console.error("依赖服务器连接失败!请检查依赖服务器是否成功启动,以及端口是否设置正确!"); + } else { + //文件存在且服务器连接成功 + MarketData = result; + console.log("玩家市场数据获取成功!") + } + }) +}) +
实际应用