diff --git a/.github/ISSUE_TEMPLATE/功能请求-feature-request-.md b/.github/ISSUE_TEMPLATE/功能请求-feature-request-.md deleted file mode 100644 index b7b43db..0000000 --- a/.github/ISSUE_TEMPLATE/功能请求-feature-request-.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: 功能请求(Feature request) -about: 为本项目提出一个新想法 -title: '' -labels: '' -assignees: '' - ---- - -**你的功能请求是否与某个问题有关?请描述。** -问题的清晰而简明的描述。 - -**描述你想要的解决方案** -你想要发生什么的清晰而简明的描述。 - -**描述你已经考虑的替代方案** -对任何替代解决方案或功能的清晰简明的描述。 - -**附加说明** -在此处添加有关功能请求的任何其他说明、屏幕截图或者引用。 diff --git a/.github/ISSUE_TEMPLATE/问题反馈.md b/.github/ISSUE_TEMPLATE/问题反馈.md deleted file mode 100644 index fe9c1ef..0000000 --- a/.github/ISSUE_TEMPLATE/问题反馈.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -name: 问题反馈 -about: 提出bug解决问题并改进本项目 -title: '' -labels: '' -assignees: '' - ---- - -# 请确保提出问题前更新到最新版本!!!!!!!! - -**请在提交issue前确认你已阅读了以下资料:** - -- 项目的readme文件 -- 其他已有的Issue - -如果你的问题已经在readme或其他Issue中得到解答,我们很可能不会回复。请确保你的问题是一个新的问题。 - -## 问题描述 - -请在此处描述您遇到的问题,包括出现问题的环境、您试图实现的功能以及错误信息等。请尽可能详细,以便其他人可以在自己的环境中复制问题。 - -## 预期行为 - -请描述您期望系统在出现问题时应该做什么。 - -## 实际行为 - -请描述您实际看到的行为。 - -## 复制过程 - -请详细描述如何复制这个问题,包括所有必要的步骤、输入、任何错误信息以及输出。 - -## 环境 - -请提供您使用的任何相关信息,例如操作系统、版本、配置等。 - -## 可能的解决方案 - -如果您已经尝试了一些解决方案,请在此处描述这些解决方案,并说明是否有效。 - -## 附加信息 - -如果有任何其他信息,如日志、截图等,请在此处提供。 diff --git a/.github/workflows/tagged-released.yml b/.github/workflows/tagged-released.yml deleted file mode 100644 index a9c64e1..0000000 --- a/.github/workflows/tagged-released.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: "tagged-release" - -on: - push: - tags: - - "v*" - -jobs: - tagged-release: - name: "Tagged Release" - runs-on: "ubuntu-latest" - - steps: - # ... - - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - prerelease: false diff --git a/.gitignore b/.gitignore index 5d0cd48..98703f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,8 @@ -config/* -!config/config.example.js -!config/config.example.json -!config/config.md -server/static/live2dw/* -!server/static/live2dw/Murasame -prompts/* -!prompts/.gitkeep node_modules/ +data/ +utils/processors +utils/tools +utils/triggers +memory.md +resources/simple +memory.db diff --git a/README.md b/README.md index 1291969..5392b3b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ - -
-
-
-JetBrains for Open Source development license
-
-
-
diff --git a/apps/bym.js b/apps/bym.js
new file mode 100644
index 0000000..b68854c
--- /dev/null
+++ b/apps/bym.js
@@ -0,0 +1,155 @@
+import ChatGPTConfig from '../config/config.js'
+import { Chaite } from 'chaite'
+import { intoUserMessage, toYunzai } from '../utils/message.js'
+import common from '../../../lib/common/common.js'
+import { getGroupContextPrompt } from '../utils/group.js'
+import { formatTimeToBeiJing } from '../utils/common.js'
+import { extractTextFromUserMessage, processUserMemory } from '../models/memory/userMemoryManager.js'
+import { buildMemoryPrompt } from '../models/memory/prompt.js'
+
+export class bym extends plugin {
+ constructor () {
+ super({
+ name: 'ChatGPT-Plugin伪人模式',
+ dsc: 'ChatGPT-Plugin伪人模式',
+ event: 'message',
+ priority: 6000,
+ rule: [
+ {
+ reg: '^[^#][sS]*',
+ fnc: 'bym',
+ log: false
+ }
+ ]
+ })
+ }
+
+ async bym (e) {
+ if (!Chaite.getInstance()) {
+ return false
+ }
+ if (!ChatGPTConfig.bym.enable) {
+ return false
+ }
+ let prob = ChatGPTConfig.bym.probability
+ if (ChatGPTConfig.bym.hit.find(keyword => e.msg?.includes(keyword))) {
+ prob = 1
+ }
+ if (Math.random() > prob) {
+ return false
+ }
+ logger.info('伪人模式触发')
+ let recall = false
+ let presetId = ChatGPTConfig.bym.defaultPreset
+ if (ChatGPTConfig.bym.presetMap && ChatGPTConfig.bym.presetMap.length > 0) {
+ const option = ChatGPTConfig.bym.presetMap.sort((a, b) => b.priority - a.priority)
+ .find(item => item.keywords.find(keyword => e.msg?.includes(keyword)))
+ if (option) {
+ presetId = option.presetId
+ recall = !!option.recall
+ }
+ }
+
+ const presetManager = Chaite.getInstance().getChatPresetManager()
+ let preset = await presetManager.getInstance(presetId)
+ if (!preset) {
+ preset = await presetManager.getInstance(ChatGPTConfig.bym.defaultPreset)
+ }
+ if (!preset) {
+ logger.debug('未找到预设,请检查配置文件')
+ return false
+ }
+ /**
+ * @type {import('chaite').SendMessageOption}
+ */
+ const sendMessageOption = JSON.parse(JSON.stringify(preset.sendMessageOption))
+ if (ChatGPTConfig.bym.presetPrefix) {
+ if (!sendMessageOption.systemOverride) {
+ sendMessageOption.systemOverride = ''
+ }
+ sendMessageOption.systemOverride = ChatGPTConfig.bym.presetPrefix + sendMessageOption.systemOverride
+ }
+ sendMessageOption.systemOverride = `Current Time: ${formatTimeToBeiJing(new Date().getTime())}\n` + sendMessageOption.systemOverride
+ if (ChatGPTConfig.bym.temperature >= 0) {
+ sendMessageOption.temperature = ChatGPTConfig.bym.temperature
+ }
+ if (ChatGPTConfig.bym.maxTokens > 0) {
+ sendMessageOption.maxToken = ChatGPTConfig.bym.maxTokens
+ }
+ const userMessage = await intoUserMessage(e, {
+ handleReplyText: true,
+ handleReplyImage: true,
+ useRawMessage: true,
+ handleAtMsg: true,
+ excludeAtBot: false,
+ toggleMode: ChatGPTConfig.basic.toggleMode,
+ togglePrefix: ChatGPTConfig.basic.togglePrefix
+ })
+ const userText = extractTextFromUserMessage(userMessage) || e.msg || ''
+ // 伪人不记录历史
+ // sendMessageOption.disableHistoryRead = true
+ // sendMessageOption.disableHistorySave = true
+ sendMessageOption.conversationId = 'bym' + e.user_id + Date.now()
+ sendMessageOption.parentMessageId = undefined
+ // 设置多轮调用回掉
+ sendMessageOption.onMessageWithToolCall = async content => {
+ const { msgs, forward } = await toYunzai(e, [content])
+ if (msgs.length > 0) {
+ await e.reply(msgs)
+ }
+ for (let forwardElement of forward) {
+ this.reply(forwardElement)
+ }
+ }
+ const systemSegments = []
+ if (sendMessageOption.systemOverride) {
+ systemSegments.push(sendMessageOption.systemOverride)
+ }
+ if (userText) {
+ const memoryPrompt = await buildMemoryPrompt({
+ userId: e.sender.user_id + '',
+ groupId: e.isGroup ? e.group_id + '' : null,
+ queryText: userText
+ })
+ if (memoryPrompt) {
+ systemSegments.push(memoryPrompt)
+ logger.debug(`[Memory] bym memory prompt: ${memoryPrompt}`)
+ }
+ }
+ if (ChatGPTConfig.llm.enableGroupContext && e.isGroup) {
+ const contextPrompt = await getGroupContextPrompt(e, ChatGPTConfig.llm.groupContextLength)
+ if (contextPrompt) {
+ systemSegments.push(contextPrompt)
+ }
+ }
+ if (systemSegments.length > 0) {
+ sendMessageOption.systemOverride = systemSegments.join('\n\n')
+ }
+ // 发送
+ const response = await Chaite.getInstance().sendMessage(userMessage, e, {
+ ...sendMessageOption,
+ chatPreset: preset
+ })
+ const { msgs, forward } = await toYunzai(e, response.contents)
+ if (msgs.length > 0) {
+ // await e.reply(msgs, false, { recallMsg: recall })
+ for (let msg of msgs) {
+ await e.reply(msg, false, { recallMsg: recall ? 10 : 0 })
+ await common.sleep(Math.floor(Math.random() * 2000) + 1000)
+ }
+ }
+ if (ChatGPTConfig.bym.sendReasoning) {
+ for (let forwardElement of forward) {
+ await e.reply(forwardElement, false, { recallMsg: recall ? 10 : 0 })
+ }
+ }
+ await processUserMemory({
+ event: e,
+ userMessage,
+ userText,
+ conversationId: sendMessageOption.conversationId,
+ assistantContents: response.contents,
+ assistantMessageId: response.id
+ })
+ }
+}
diff --git a/apps/chat.js b/apps/chat.js
index 85f02fc..b6eca32 100644
--- a/apps/chat.js
+++ b/apps/chat.js
@@ -1,2403 +1,132 @@
-import plugin from '../../../lib/plugins/plugin.js'
-import _ from 'lodash'
-import { Config, defaultOpenAIAPI, pureSydneyInstruction } from '../utils/config.js'
-import { v4 as uuid } from 'uuid'
-import delay from 'delay'
-import { ChatGPTAPI } from '../utils/openai/chatgpt-api.js'
-import { BingAIClient } from '@waylaidwanderer/chatgpt-api'
-import SydneyAIClient from '../utils/SydneyAIClient.js'
-import { PoeClient } from '../utils/poe/index.js'
-import AzureTTS, { supportConfigurations } from '../utils/tts/microsoft-azure.js'
-import VoiceVoxTTS from '../utils/tts/voicevox.js'
-import { translate } from '../utils/translate.js'
-import fs from 'fs'
-import {
- render,
- renderUrl,
- getMessageById,
- makeForwardMsg,
- upsertMessage,
- randomString,
- completeJSON,
- isImage,
- getUserData,
- getDefaultReplySetting,
- isCN,
- getMasterQQ,
- getUserReplySetting,
- getImageOcrText,
- getImg,
- processList,
- getMaxModelTokens, formatDate
-} from '../utils/common.js'
-import { ChatGPTPuppeteer } from '../utils/browser.js'
-import { KeyvFile } from 'keyv-file'
-import { OfficialChatGPTClient } from '../utils/message.js'
-import fetch from 'node-fetch'
-import { deleteConversation, getConversations, getLatestMessageIdByConversationId } from '../utils/conversation.js'
-import { convertSpeaker, generateAudio, speakers } from '../utils/tts.js'
-import ChatGLMClient from '../utils/chatglm.js'
-import { convertFaces } from '../utils/face.js'
-import uploadRecord from '../utils/uploadRecord.js'
-import { SlackClaudeClient } from '../utils/slack/slackClient.js'
-import { ChatgptManagement } from './management.js'
-import { getPromptByName } from '../utils/prompts.js'
-import BingDrawClient from '../utils/BingDraw.js'
-import XinghuoClient from '../utils/xinghuo/xinghuo.js'
-import { JinyanTool } from '../utils/tools/JinyanTool.js'
-import { SendMusicTool } from '../utils/tools/SendMusicTool.js'
-import { SendVideoTool } from '../utils/tools/SendBilibiliTool.js'
-import { KickOutTool } from '../utils/tools/KickOutTool.js'
-import { SendAvatarTool } from '../utils/tools/SendAvatarTool.js'
-import { SendDiceTool } from '../utils/tools/SendDiceTool.js'
-import { EditCardTool } from '../utils/tools/EditCardTool.js'
-import { SearchVideoTool } from '../utils/tools/SearchBilibiliTool.js'
-import { SearchMusicTool } from '../utils/tools/SearchMusicTool.js'
-import { QueryStarRailTool } from '../utils/tools/QueryStarRailTool.js'
-import { WebsiteTool } from '../utils/tools/WebsiteTool.js'
-import { WeatherTool } from '../utils/tools/WeatherTool.js'
-import { SerpTool } from '../utils/tools/SerpTool.js'
-import { SerpIkechan8370Tool } from '../utils/tools/SerpIkechan8370Tool.js'
-import { SendPictureTool } from '../utils/tools/SendPictureTool.js'
-import { SerpImageTool } from '../utils/tools/SearchImageTool.js'
-import { ImageCaptionTool } from '../utils/tools/ImageCaptionTool.js'
-import {TTSTool} from "../utils/tools/TTSTool.js";
-import {ProcessPictureTool} from "../utils/tools/ProcessPictureTool.js";
-try {
- await import('emoji-strip')
-} catch (err) {
- logger.warn('【ChatGPT-Plugin】依赖emoji-strip未安装,会导致azure语音模式下朗读emoji的问题,建议执行pnpm install emoji-strip安装')
-}
-try {
- await import('keyv')
-} catch (err) {
- logger.warn('【ChatGPT-Plugin】依赖keyv未安装,可能影响Sydney模式下Bing对话,建议执行pnpm install keyv安装')
-}
-let version = Config.version
-let proxy
-if (Config.proxy) {
- try {
- proxy = (await import('https-proxy-agent')).default
- } catch (e) {
- console.warn('未安装https-proxy-agent,请在插件目录下执行pnpm add https-proxy-agent')
- }
-}
-/**
- * 每个对话保留的时长。单个对话内ai是保留上下文的。超时后销毁对话,再次对话创建新的对话。
- * 单位:秒
- * @type {number}
- *
- * 这里使用动态数据获取,以便于锅巴动态更新数据
- */
-// const CONVERSATION_PRESERVE_TIME = Config.conversationPreserveTime
-const defaultPropmtPrefix = ', a large language model trained by OpenAI. You answer as concisely as possible for each response (e.g. don’t be verbose). It is very important that you answer as concisely as possible, so please remember this. If you are generating a list, do not have too many items. Keep the number of items short.'
-const newFetch = (url, options = {}) => {
- const defaultOptions = Config.proxy
- ? {
- agent: proxy(Config.proxy)
- }
- : {}
- const mergedOptions = {
- ...defaultOptions,
- ...options
- }
+import Config from '../config/config.js'
+import { Chaite, SendMessageOption } from 'chaite'
+import { getPreset, intoUserMessage, toYunzai } from '../utils/message.js'
+import { YunzaiUserState } from '../models/chaite/storage/lowdb/user_state_storage.js'
+import { getGroupContextPrompt } from '../utils/group.js'
+import { buildMemoryPrompt } from '../models/memory/prompt.js'
+import { extractTextFromUserMessage, processUserMemory } from '../models/memory/userMemoryManager.js'
+import * as crypto from 'node:crypto'
- return fetch(url, mergedOptions)
-}
-export class chatgpt extends plugin {
+export class Chat extends plugin {
constructor () {
- let toggleMode = Config.toggleMode
super({
- /** 功能名称 */
- name: 'ChatGpt 对话',
- /** 功能描述 */
- dsc: '与人工智能对话,畅聊无限可能~',
+ name: 'ChatGPT-Plugin对话',
+ dsc: 'ChatGPT-Plugin对话',
event: 'message',
- /** 优先级,数字越小等级越高 */
- priority: 1144,
+ // 应🥑要求降低优先级
+ priority: 555500,
rule: [
{
- /** 命令正则匹配 */
- reg: '^#chat3[sS]*',
- /** 执行方法 */
- fnc: 'chatgpt3'
- },
- {
- /** 命令正则匹配 */
- reg: '^#chat1[sS]*',
- /** 执行方法 */
- fnc: 'chatgpt1'
- },
- {
- /** 命令正则匹配 */
- reg: '^#chatglm[sS]*',
- /** 执行方法 */
- fnc: 'chatglm'
- },
- {
- /** 命令正则匹配 */
- reg: '^#bing[sS]*',
- /** 执行方法 */
- fnc: 'bing'
- },
- {
- reg: '^#claude开启新对话',
- fnc: 'newClaudeConversation'
- },
- {
- /** 命令正则匹配 */
- reg: '^#claude[sS]*',
- /** 执行方法 */
- fnc: 'claude'
- },
- {
- /** 命令正则匹配 */
- reg: '^#xh[sS]*',
- /** 执行方法 */
- fnc: 'xh'
- },
- {
- /** 命令正则匹配 */
- reg: toggleMode === 'at' ? '^[^#][sS]*' : '^#chat[^gpt][sS]*',
- /** 执行方法 */
- fnc: 'chatgpt',
+ reg: '^[^#][sS]*',
+ fnc: 'chat',
log: false
- },
- {
- reg: '^#(chatgpt)?对话列表$',
- fnc: 'getAllConversations',
- permission: 'master'
- },
- {
- reg: '^#(chatgpt)?(结束|新开|摧毁|毁灭|完结)对话([sS]*)',
- fnc: 'destroyConversations'
- },
- {
- reg: '^#(chatgpt)?(结束|新开|摧毁|毁灭|完结)全部对话$',
- fnc: 'endAllConversations',
- permission: 'master'
- },
- // {
- // reg: '#chatgpt帮助',
- // fnc: 'help'
- // },
- {
- reg: '^#chatgpt图片模式$',
- fnc: 'switch2Picture'
- },
- {
- reg: '^#chatgpt文本模式$',
- fnc: 'switch2Text'
- },
- {
- reg: '^#chatgpt语音模式$',
- fnc: 'switch2Audio'
- },
- {
- reg: '^#chatgpt语音换源',
- fnc: 'switchTTSSource'
- },
- {
- reg: '^#chatgpt设置(语音角色|角色语音|角色)',
- fnc: 'setDefaultRole'
- },
- {
- reg: '^#(chatgpt)?清空(chat)?队列$',
- fnc: 'emptyQueue',
- permission: 'master'
- },
- {
- reg: '^#(chatgpt)?移出(chat)?队列首位$',
- fnc: 'removeQueueFirst',
- permission: 'master'
- },
- {
- reg: '#(OpenAI|openai)(剩余)?(余额|额度)',
- fnc: 'totalAvailable',
- permission: 'master'
- },
- {
- reg: '^#chatgpt切换对话',
- fnc: 'attachConversation'
- },
- {
- reg: '^#(chatgpt)?加入对话',
- fnc: 'joinConversation'
- },
- {
- reg: '^#chatgpt删除对话',
- fnc: 'deleteConversation',
- permission: 'master'
}
]
})
- this.toggleMode = toggleMode
}
- /**
- * 获取chatgpt当前对话列表
- * @param e
- * @returns {Promise欢迎使用chatgpt-plugin插件
| Referral | Visitors | |
|---|---|---|
| 1,480 | 60% | |
| 5,480 | 70% | |
| 4,807 | 80% | |
| 3,678 | 75% | |
| 2,645 | 30% |
\n \n \n {{ statPercent }}%\n \n {{ statDescripiron }}\n
\n| \r\n 缓存地址\r\n | \r\n\r\n 用户\r\n | \r\n\r\n 群\r\n | \r\n\r\n 时间\r\n | \r\n
|---|---|---|---|
| \r\n {{ item.herf }} \r\n | \r\n\r\n {{ item.user }}\r\n | \r\n\r\n {{ item.group || '-' }}\r\n | \r\n\r\n {{ new Date(item.time).toLocaleString('zh', { hour12: false }).replaceAll('/', '-') }}\r\n | \r\n
\r\n\r\n\r\n 访问代码\r\n
\r\n\r\n {{ this.$route.params.code }}\r\n
\r\n
\r\n {{ item.text }}\r\n
\r\n\r\n 当前页面发生错误,请联系服务管理人员检查后台错误信息!\r\n
\r\n\r\n 页面代码:{{this.$route.query.code}}\r\n
\r\n\r\n {{this.$route.query.error}}\r\n
\r\n\r\n 欢迎使用chatgpt-plugin插件\r\n
\r\n| \n Referral\n | \n\n Visitors\n | \n\n |
|---|---|---|
| \n Facebook\n | \n\n 1,480\n | \n\n \n 60%\n \n \n \n \n \n \n | \n
| \n Facebook\n | \n\n 5,480\n | \n\n \n 70%\n \n \n \n \n \n \n | \n
| \n Google\n | \n\n 4,807\n | \n\n \n 80%\n \n \n \n \n \n \n | \n
| \n Instagram\n | \n\n 3,678\n | \n\n \n 75%\n \n \n \n \n \n \n | \n
| \n twitter\n | \n\n 2,645\n | \n\n \n 30%\n \n \n \n \n \n \n | \n
欢迎使用chatgpt-plugin插件
| Referral | Visitors | |
|---|---|---|
| 1,480 | 60% | |
| 5,480 | 70% | |
| 4,807 | 80% | |
| 3,678 | 75% | |
| 2,645 | 30% |
\n \n \n {{ statPercent }}%\n \n {{ statDescripiron }}\n
\n| \r\n 缓存地址\r\n | \r\n\r\n 用户\r\n | \r\n\r\n 群\r\n | \r\n\r\n 时间\r\n | \r\n
|---|---|---|---|
| \r\n {{ item.herf }} \r\n | \r\n\r\n {{ item.user }}\r\n | \r\n\r\n {{ item.group || '-' }}\r\n | \r\n\r\n {{ new Date(item.time).toLocaleString('zh', { hour12: false }).replaceAll('/', '-') }}\r\n | \r\n
\r\n\r\n\r\n 访问代码\r\n
\r\n\r\n {{ this.$route.params.code }}\r\n
\r\n
\r\n {{ item.text }}\r\n
\r\n\r\n 当前页面发生错误,请联系服务管理人员检查后台错误信息!\r\n
\r\n\r\n 页面代码:{{this.$route.query.code}}\r\n
\r\n\r\n {{this.$route.query.error}}\r\n
\r\n\r\n 欢迎使用chatgpt-plugin插件\r\n
\r\n| \n Referral\n | \n\n Visitors\n | \n\n |
|---|---|---|
| \n Facebook\n | \n\n 1,480\n | \n\n \n 60%\n \n \n \n \n \n \n | \n
| \n Facebook\n | \n\n 5,480\n | \n\n \n 70%\n \n \n \n \n \n \n | \n
| \n Google\n | \n\n 4,807\n | \n\n \n 80%\n \n \n \n \n \n \n | \n
| \n Instagram\n | \n\n 3,678\n | \n\n \n 75%\n \n \n \n \n \n \n | \n
| \n twitter\n | \n\n 2,645\n | \n\n \n 30%\n \n \n \n \n \n \n | \n
'+r+""}}t.b=function(){var e=new i.a;return e.set({html:!0,breaks:!0,linkify:!1,typographer:!0}),e}},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(e){for(var t=0;t"+o(e[t].content)+"\n"},a.fence=function(e,t,n,r,a){var s,l,u,c,d,h=e[t],p=h.info?i(h.info).trim():"",f="",g="";return p&&(f=(u=p.split(/(\s+)/g))[0],g=u.slice(2).join("")),0===(s=n.highlight&&n.highlight(h.content,f,g)||o(h.content)).indexOf(""+s+"\n"):""+s+"\n"},a.image=function(e,t,n,r,i){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)},a.hardbreak=function(e,t,n){return n.xhtmlOut?"=0;t--)"inline"===e.tokens[t].type&&a.test(e.tokens[t].content)&&u(e.tokens[t].children,e)}},function(e,t,n){"use strict";var r=n(5);function i(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}i.prototype.Token=r,e.exports=i},function(e,t,n){"use strict";var r=n(4),i=[["table",n(42),["paragraph","reference"]],["code",n(43)],["fence",n(44),["paragraph","reference","blockquote","list"]],["blockquote",n(45),["paragraph","reference","blockquote","list"]],["hr",n(46),["paragraph","reference","blockquote","list"]],["list",n(47),["paragraph","reference","blockquote"]],["reference",n(48)],["html_block",n(49),["paragraph","reference","blockquote"]],["heading",n(51),["paragraph","reference","blockquote"]],["lheading",n(52)],["paragraph",n(53)]];function o(){this.ruler=new r;for(var e=0;e '+e+"p((l-n)/(b=r+1))&&g("overflow"),n+=(s-t)*b,t=s,a=0;a"+e+"
":"")+"\n"},after:function(){return"