From d70cf2abd83178145d7dd809dee2a7fb8bd3155d Mon Sep 17 00:00:00 2001 From: hezongyi <453942056@qq.com> Date: Thu, 4 Aug 2022 22:14:54 +0800 Subject: [PATCH] initial --- .github/ISSUE_TEMPLATE/bug_report.md | 29 + .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.md | 20 + .github/workflows/sync.yml | 32 + .gitignore | 63 ++ README.md | 107 ++++ appcast.xml | 308 ++++++++++ docs/.nojekyll | 0 docs/README.md | 25 + docs/_media/.gitkeep | 1 + docs/_media/favicon.ico | Bin 0 -> 67646 bytes docs/_src/docsify/docsify-copy-code.js | 9 + docs/_src/docsify/docsify.min.js | 1 + docs/_src/docsify/search.js | 535 +++++++++++++++++ docs/_src/docsify/vue.css | 1 + docs/_src/docsify/zoom-image.js | 659 +++++++++++++++++++++ docs/_src/prismjs/prism-applescript.min.js | 1 + docs/_src/prismjs/prism-bash.min.js | 1 + docs/_src/prismjs/prism-javascript.min.js | 1 + docs/_src/prismjs/prism-json.min.js | 1 + docs/_src/source.txt | 10 + docs/index.html | 99 ++++ 22 files changed, 1904 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/sync.yml create mode 100644 .gitignore create mode 100644 README.md create mode 100644 appcast.xml create mode 100644 docs/.nojekyll create mode 100644 docs/README.md create mode 100644 docs/_media/.gitkeep create mode 100644 docs/_media/favicon.ico create mode 100644 docs/_src/docsify/docsify-copy-code.js create mode 100644 docs/_src/docsify/docsify.min.js create mode 100644 docs/_src/docsify/search.js create mode 100644 docs/_src/docsify/vue.css create mode 100644 docs/_src/docsify/zoom-image.js create mode 100644 docs/_src/prismjs/prism-applescript.min.js create mode 100644 docs/_src/prismjs/prism-bash.min.js create mode 100644 docs/_src/prismjs/prism-javascript.min.js create mode 100644 docs/_src/prismjs/prism-json.min.js create mode 100644 docs/_src/source.txt create mode 100644 docs/index.html diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..8a4d7153 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,29 @@ +--- +name: 反馈问题 +about: Bob 安装或使用出现异常 +title: '' +labels: 'bug' +--- + + + + + + + +## 运行环境 +* Device: +* macOS: +* Bob Version: + +## 描述问题 + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..3ba13e0c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..8c47635d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: 功能建议 +about: 请求实现新功能或改进已有功能 +title: '' +labels: 'enhancement' +--- + + + + + + diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 00000000..8d2e3bd5 --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,32 @@ +name: Sync + +on: + push: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Sync to Gitee + uses: ripperhefork/git-mirror-action@master + env: + # 注意在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY + SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }} + with: + # 注意替换为你的 GitHub 源仓库地址 + source-repo: "git@github.com:ripperhe/Bob.git" + # 注意替换为你的 Gitee 目标仓库地址 + destination-repo: "git@gitee.com:ripperhe/Bob.git" + + - name: Build Gitee Pages + uses: ripperhefork/gitee-pages-action@master + with: + # 注意替换为你的 Gitee 用户名 + gitee-username: ripperhe + # 注意在 Settings->Secrets 配置 GITEE_PASSWORD + gitee-password: ${{ secrets.GITEE_PASSWORD }} + # 注意替换为你的 Gitee 仓库,仓库名严格区分大小写,请准确填写,否则会出错 + gitee-repo: ripperhe/Bob + # 部署目录 + directory: docs diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..86de6aa3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,63 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output + +# Code Injection +# +# After new code Injection tools there's a generated folder /iOSInjectionProject +# https://github.com/johnno1962/injectionforxcode + +iOSInjectionProject/ diff --git a/README.md b/README.md new file mode 100644 index 00000000..c95111e9 --- /dev/null +++ b/README.md @@ -0,0 +1,107 @@ +
+ +
+ + +# Bob + +Bob 是一款 macOS 平台 **翻译** 和 **OCR** 软件。 + +翻译功能: + +- [x] 划词翻译 +- [x] 截图翻译 +- [x] 输入翻译 +- [x] 翻译多开 +- [x] 自定义插件 +- [x] 自动识别语种 +- [x] 驼峰拆分、蛇形拆分 +- [x] AppleScript 调用 +- [x] PopClip 调用 + +OCR 功能: + +- [x] 截图 OCR +- [x] 静默截图 OCR +- [x] 访达选图 OCR +- [x] 离线识别 +- [x] 连续识别 +- [x] 二维码识别 +- [x] 自动复制 +- [x] 智能分段 + +## 安装 + +系统要求 **macOS 10.13** 以上,从 Mac App Store 安装。 + +[![Download on the Mac App Store](https://cdn.ripperhe.com/oss/master/2022/0626/Download_on_the_Mac_App_Store_Badge_US-UK_RGB_blk_092917.svg)](https://apps.apple.com/cn/app/id1630034110#?platform=mac) + +如果是社区版老用户,请查看 [这篇文档](https://bobtranslate.com/blog/2022-07-03-v1-coming.html)。 + +## 使用方法 + +详细使用方法请直接查看文档 [👉 点此跳转文档](https://bobtranslate.com) + +Bob 是一个菜单栏软件,启动之后,菜单栏会出现一个图标,点击菜单选项即可触发相应的功能,如下所示: + + + +### 翻译功能 + +| 方式 | 描述 | 预览 | +| :---: | :---: | :---: | +| 划词翻译 | 选中需要翻译的文本之后,按下划词翻译快捷键即可(默认 `⌥ + D`) | ![划词翻译-句子](https://cdn.ripperhe.com/oss/master/2022/0508/translate_selection.gif) | +| 截图翻译 | 按下截图翻译快捷键(默认 `⌥ + S`),截取需要翻译的区域 | ![截图翻译-句子](https://cdn.ripperhe.com/oss/master/2022/0508/translate_snip.gif) | +| 输入翻译| 按下输入翻译快捷键(默认 `⌥ + A`),输入需要翻译的文本,`Enter` 键翻译 | ![输入翻译-单词](https://cdn.ripperhe.com/oss/master/2022/0508/translate_input.gif) | +| PopClip 调用 | 选中需要翻译的文本之后,点击 [PopClip](https://pilotmoon.com/popclip) 插件图标即可,详情见 [PopClip 调用](https://bobtranslate.com/guide/integration/popclip.html) | ![插件翻译-句子](https://cdn.ripperhe.com/oss/master/2022/0508/translate_popclip.gif) | + +### OCR 功能 + +**截图识别** + +* 按下「截图 OCR」快捷键(默认 `⇧ + ⌥ + S`)或者点击菜单栏 Bob 图标菜单中的「截图 OCR」 +* 选中屏幕上的对应的位置 +* 松手即可开始识别 + + + +**静默截图 OCR** + +* 按下「静默截图 OCR」快捷键(没有设置默认快捷键,可去「 Bob 偏好设置-OCR-OCR 设置」添加)或者点击菜单栏 Bob 图标菜单中的「静默截图 OCR」 +* 选中屏幕上的对应的位置 +* 松手即可开始识别 + +「静默截图 OCR」不会自动显示 OCR 窗口,识别完成后直接将文本拷贝到剪切板。 + +**访达选图 OCR** + +按下「访达选图 OCR」快捷键(没有设置默认快捷键,可去「 Bob 偏好设置-OCR-OCR 设置」添加)或者点击菜单栏 Bob 图标菜单中的「访达选图 OCR」。 + +在弹出的访达窗口中选中对应的图片文件(可以一次性选中多张),点击右下角「开始识别」即可。 + + + +## 感谢 + +* 感谢 [@isee15](https://github.com/isee15/Capture-Screen-For-Multi-Screens-On-Mac) 提供最初版本截图功能的思路 +* 感谢 [@可口可乐](https://github.com/wakewon) 长期帮忙解决用户反馈 +* 感谢 [@ix4n33](https://github.com/IsaacXen) 不定期提供技术支持 +* 感谢朋友们的赞赏 [赞赏列表](https://bobtranslate.com/general/reward.html) +* 感谢作者们发文支持 Bob(时间倒序) + * @奇客派:[macOS 翻译工具 Bob 大更新:支持更多翻译服务,增强 OCR 功能](https://sspai.com/post/62721) + * @鹿額:[截图/划词/输入都能查,快捷高效的 macOS 翻译工具: Bob](https://sspai.com/post/58249) + * @Newlearnerの自留地:[Bob:一款 macOS 全局翻译软件,支持划词翻译和截图翻译](https://t.me/NewlearnerChannel/3329) + +## 优秀软件推荐 + +* [uPic: 一个强大的图床工具](https://github.com/gee1k/uPic) +* [MWeb Pro: 专业的 Markdown 写作、记笔记、静态博客生成软件](https://zh.mweb.im/) + +## 最后 + +Bob 不是开源软件,目前本仓库主要用于提供反馈渠道。 + +[👉 点此查看联系方式](https://bobtranslate.com/general/contact.html) diff --git a/appcast.xml b/appcast.xml new file mode 100644 index 00000000..feebfae6 --- /dev/null +++ b/appcast.xml @@ -0,0 +1,308 @@ + +T>ff=%NFJ8%)^QmE38kSKHAe$L%+|}Nx#RmF)VEX zbv|*E25FHdX?qFSf=$?ljo2Ehd`e#0x_zfzeT~}#I79rvQMdx@$ez{j;~iQ2!;fwr z-%Huf=oxU}w_W(% W-n}+>@L;!w z9?hLcgND&YVaX`@w`9^Y1v)-ms^h zepd4qm2LFs(RTQ-GDJ4Q{{8!{XV0Gc-Hlo{MQe@d6J?a|vT~2Oh?BTUgS4^}unilr zb)anK_hE9HPvIXf-~?_Y;p+PZ@=0U;vGl=*9(C(ga-x5tsQzW;D(&lNVI4bmv~AnA zWe3)zcW8epU$<&6)Sr9yhol{#-X|{NByQ5kNx(*I#b#^=gRJDm;Ag>}HA8R#Cla^` zcc`EQ-eO dKm2Ae*0}VCgU6p z>c+Iv&B}MgL0pXUh&wgE=zuQhgl_1FuIQXz;CcFj*bW9+(I@y>`VVjb7jPm8hu Njrt F=X^S^- Kp;)h zMu*gTam{!i-P0P&U@JCb`#xciI!!Ov^h>}V4wT;O5;)1t(7t5JQd *?V zCj9T%u|w+^E_L|o+ M|9 ac=QXnxu^m@QzOChK}fp&eR#$kUHd)e|$b*4)$;$;w$Ag z`AUy*W|xW;qxbP!+}Rp$XHxzbE?nr!6Mk0O-dA Ar1gwqWj(G@+Z3$P(|$SMC|4d!4E2YxQ}k?Wy` zQk;KfyQ|!9Ib`I|qP;@zU`af1(C+Th(^|G{X{%SSP7RausYgXcX|HI6_Kud<+V--p zpN;Qr-MV%5lFsyj1NvHlFl*K m+0nia$(HY&D7f2nj6`Qdg41&|+Z?FpJlll|=_}vUJ2YU$| 7n za)3FZH2PckDb`A7=04bWHAlZ?gv^@tm9_71oi%UXTzeHK*n$NMZ2tWDNy2ywJe7tM zFm2JIh5hSa|FYJtTRVJDI_V^P^wCG%yS)FJ&T*12OnVKV)E@kW{ KMV!P<8VG5UHXNf1I-wgn2J}UDYzVfAcd-?lu^kKoc(`
w6Scw!+DJYXN6%{igFd((-4JpZSfi+q-mgdw=7!x0$_H zwc_I)zpPnh3{|^!?G#c?b8K4Al!T|!IqGlj(+=0EQ^&m<6BDEJSBj`^tSEnNyw32d z>(1hke_V6)PdGn*>M|9$#>dYyJj?kVyh|L!MV!Qqj-*AJUUb8T)OKMjHj_WV04zv{ zebHb9R%z7%U<<}zEiCZ&HI?LLaPt9DU_)`)^TLpqwT3e7^MKi(zI^4c)>&tk^Q_(p zo0KhAjx$lM#o6aLzwOIIbw-rdM{L- Zh>JMGsWX^>4H$t{ zAWsH=g6$w-?8k4f^m$kk&iNiipJ8aCyWdG1HjOnNTD17bbmxU>yEbm#qP0Aay81Nm zUQRzLM-3Y`(%I5&oj-#=n{~SAFEIZa**U$4J}DTm{eYEbnj@0C5l(apG$s4blp3 zmvX8 U(TSF0e*XyUoJ8pa}zlXKE`Wm i!@ntfez@xm>=D|+7Wn;btGT`Ch2jH4xE<&w!!@i#lf8KY)J!2ZihBX zaGfND%^H*F{DP6H1JXYmn7q74Z7uuNbY@kG_fyALOnz1BUY=`r)z#KtXLL@O{E<5w zX_Ly!-oyjW&!=MR@bgl}GvhqH`+>TFwD1d(Hac)l6FQ+AI-)B&qkC$5g0FcF48Q_R z(n^;!!4gctHu!!2-~2Z8APMC$w*vb}-jtC4j?#(W_W63AegjrxnY3);JM7~8dd{w8 zO-!Kd;6JY#8>`>LXlB>6zt#rmw_=!oS^n!9cV0_^#!HkF`a)n9PQKIAJ@CDc8=o%d zgl?QEgRba|?%04W*o1B1g{|0(?O>3R4PXeCV44=z{_iM h|Pvc59&RrVdPNY#E3v zzkH%2x?&f)V*~q(u?gF-5nHjDXENfRJPw9n38v}c?f?EgeddNAu$a<$RC36lZkl>A zzM)UUIXfBI2yfWAZRc*Sv+$kyCipVNCcp5VnI6~<&)7tpfsNRT%^AJRdte8KV3`rt z{(FDwvz;W|bHLS=20rIZb&`)l=W4&M-}^h1X`=AQ@qDEZp;AC)|S>*ny!Jto_f7 z)u-1zo_aJ};bOhDUE)cv8Z~R`T#9k-oZigpfn$N+oZ0|Ji5lmF8Q6Kn+5a5l!Emkv zh*bQ&C298i{5l+^b0hiEKGqrF*mWWgq+iDcxCbjROApTszGofKeUfnX1IsGzPcle9 zU7hK_(%(H6&RWW88BgzhumPh?`ugc&EM6#=V 5%R{?N796pH0_q z+@ )i~+#_EWjkE zxcc9R|JssJ2ga3eNLX)}V_jpkKC<5v1KjV|rRV!B$lPY8J2vy%eP93 DEv18`eMlywt5BJs#QvY-H^wHe)+$NJ5Ay{lC$YaP
g(pS zm}4J5@k9Nl`Q8lY3^FTI`Tah=d~C#4Y)& tr}L zgWvu*Ae_9Od!OGqM?Y-ACTzn-Yz+gB%ma>;gli929mTyQ40 RA z3=2} 9o_kj4{S+i?*1s-J>rX>Z?j~M 3jS8DbRqLP>UY&eD6Vt)ySv zwOe=nHp5r8{m-3l{*3aJU&}qZF~^6l=#1{zkl8xXEMU4{&weiHDLG40QBquz8=<5U z`ACu_9&`FUYbBTmx$TZFHgU=nt$p9*+EV&b`C%>r9ngjL9o^6oUC}wPrX{Bs_}^!p z9cylwe+`#^Us0zUNOPcsenzh5fk1jOF*-x(ihtPiS}(`%9R}8i zUC;^L&@rHIh(Foqcb+6KLn|e|RT3^6J;htP^hr94qk&!5@dkV2%@MZvr=`9%r#erC zIvBqiLObm02$j(+w;6hecZnkqA8{ur4c20kCTXJsx}Z~-aapGL>r3)7u*Z0agx?tr zx4oIhPyMRjJXT#BXP2w&u}_CHHCQLTR{JDqhxf_1o~XK6RAxzdhj)pCxQLUuNrSXV zle9xz$7f_SzL$7OUI+G@vEG!iApOvcbk5a#aKV0DeCdDtdu#nB`t9y_^j;o1%-(%} zynQn5Q=2(!w#{F#(7yd{u`T}oM<@KvciiI{p5+~WgO50fi#Ulp7x_+&-D|=++ 9=3I_)T93^d+}h%ic{b)*+2@7uH{WrOXLy!(!lh3( z;$5wG+DP(SpikIHg3md_^`N?+pYSY5x-ibaTT()jUqdY^Hdb;X4}>nC L%3H;WQ{w&bp@6vvyq@a|) zywa1kl=#z_TRWBl?ZEvK_N3(%wgn;GX~Kv3oMSQYI|RcdC;9?umjUL{ZkFW5T%MB6 zl|Wx$oaBUG;OIQCNw}PuD=g$~B6XGgI}-Xi1))yPEgk cyX(b8A8hu5Z?*n!-k6Beh z- zgb{%##eI`xk%WF?b~&eC5ooKa$GyhId(6upPklI BUFe^MQmu%!!cq2+)7LLNZ>G5pVE$K*IRrYDpPM>h_vGXRPEp z$tVeR{9lqlUf}QP68dx}LjFR4{`EBy`UcA+`y`CX5bF5(l1C)9C0+vKlnW({J%&r( zmOLzJC^-@GF9P%p@FBF9+#{i#{->nAgt@7#2I_?J62_{LS$#P_Kd)u+gnos6pZ@>V ztu7bz1+877zR6$U;V2ZBd_9xvh~#T7RbK`I6{bSVz%`wAg`^bLxXVJt1NZy+u9H;q zT_#27k1i=frwz}<`6BQ~pOnCw!2A9LW(KbP8utra`x6XY`V(}<`@ZW-0!hjH6-Y|n zuR!YSBz61>tx1mGDU|wpX7YWfV87&Rr(o*q 3Ju~=y0hIbWReUMT7a%Fjlffy>k%1}Hl>sTDQ{9mwIc54#U#Ctl zwLYo!J<_UBP$<&(C_H8c-KLCYcD*L}`E2l$LSYs0%&t=y6sOHr!RhNd1z{~SzfM7T zU$fNL^x~3&9eqFb^BJZu{Zi;FdsAPhuwQtlzFw20jQ$WmnO)CJ^?X>brEiM(WnYSG z*`MNCcn4ooe+6Gt w&V=vzwQ@Mz<)i{e;sJwcGmQL;Zui)d{6ZC mKkrwmWzwauOeEj-VUm2?he`1DnusHT)ZEvJ#qDX|{r>|}h04|d literal 0 HcmV?d00001 diff --git a/docs/_src/docsify/docsify-copy-code.js b/docs/_src/docsify/docsify-copy-code.js new file mode 100644 index 00000000..e09e3337 --- /dev/null +++ b/docs/_src/docsify/docsify-copy-code.js @@ -0,0 +1,9 @@ +/*! + * docsify-copy-code + * v2.1.1 + * https://github.com/jperasmus/docsify-copy-code + * (c) 2017-2020 JP Erasmus + * MIT license + */ +!function(){"use strict";function s(o){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}!function(o,e){void 0===e&&(e={});var t=e.insertAt;if(o&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css","top"===t&&n.firstChild?n.insertBefore(c,n.firstChild):n.appendChild(c),c.styleSheet?c.styleSheet.cssText=o:c.appendChild(document.createTextNode(o))}}(".docsify-copy-code-button,.docsify-copy-code-button span{cursor:pointer;transition:all .25s ease}.docsify-copy-code-button{position:absolute;z-index:1;top:0;right:0;overflow:visible;padding:.65em .8em;border:0;border-radius:0;outline:0;font-size:1em;background:grey;background:var(--theme-color,grey);color:#fff;opacity:0}.docsify-copy-code-button span{border-radius:3px;background:inherit;pointer-events:none}.docsify-copy-code-button .error,.docsify-copy-code-button .success{position:absolute;z-index:-100;top:50%;right:0;padding:.5em .65em;font-size:.825em;opacity:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.docsify-copy-code-button.error .error,.docsify-copy-code-button.success .success{right:100%;opacity:1;-webkit-transform:translate(-115%,-50%);transform:translate(-115%,-50%)}.docsify-copy-code-button:focus,pre:hover .docsify-copy-code-button{opacity:1}"),document.querySelector('link[href*="docsify-copy-code"]')&&console.warn("[Deprecation] Link to external docsify-copy-code stylesheet is no longer necessary."),window.DocsifyCopyCodePlugin={init:function(){return function(o,e){o.ready(function(){console.warn("[Deprecation] Manually initializing docsify-copy-code using window.DocsifyCopyCodePlugin.init() is no longer necessary.")})}}},window.$docsify=window.$docsify||{},window.$docsify.plugins=[function(o,r){o.doneEach(function(){var o=Array.apply(null,document.querySelectorAll("pre[data-lang]")),c={buttonText:"Copy to clipboard",errorText:"Error",successText:"Copied"};r.config.copyCode&&Object.keys(c).forEach(function(t){var n=r.config.copyCode[t];"string"==typeof n?c[t]=n:"object"===s(n)&&Object.keys(n).some(function(o){var e=-1 ',''.concat(c.buttonText,""),''.concat(c.errorText,""),''.concat(c.successText,""),""].join("");o.forEach(function(o){o.insertAdjacentHTML("beforeend",e)})}),o.mounted(function(){document.querySelector(".content").addEventListener("click",function(o){if(o.target.classList.contains("docsify-copy-code-button")){var e="BUTTON"===o.target.tagName?o.target:o.target.parentNode,t=document.createRange(),n=e.parentNode.querySelector("code"),c=window.getSelection();t.selectNode(n),c.removeAllRanges(),c.addRange(t);try{document.execCommand("copy")&&(e.classList.add("success"),setTimeout(function(){e.classList.remove("success")},1e3))}catch(o){console.error("docsify-copy-code: ".concat(o)),e.classList.add("error"),setTimeout(function(){e.classList.remove("error")},1e3)}"function"==typeof(c=window.getSelection()).removeRange?c.removeRange(t):"function"==typeof c.removeAllRanges&&c.removeAllRanges()}})})}].concat(window.$docsify.plugins||[])}(); +//# sourceMappingURL=docsify-copy-code.min.js.map \ No newline at end of file diff --git a/docs/_src/docsify/docsify.min.js b/docs/_src/docsify/docsify.min.js new file mode 100644 index 00000000..e9b32ee7 --- /dev/null +++ b/docs/_src/docsify/docsify.min.js @@ -0,0 +1 @@ +!function(){function s(n){var r=Object.create(null);return function(e){var t=c(e)?e:JSON.stringify(e);return r[t]||(r[t]=n(e))}}var o=s(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),l=Object.prototype.hasOwnProperty,y=Object.assign||function(e){for(var t=arguments,n=1;n /gm),it=Q(/^data-[\-\w.\u00B7-\uFFFF]/),ot=Q(/^aria-[\-\w]+$/),at=Q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),st=Q(/^(?:\w+script|data):/i),lt=Q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function ut(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t "+e:n=(i=Me(e,/^[\r\n\t ]+/))&&i[0];var r=k?k.createHTML(e):e;if(de===he)try{t=(new g).parseFromString(r,"text/html")}catch(e){}if(!t||!t.documentElement){t=x.createDocument(de,"template",null);try{t.documentElement.innerHTML=fe?"":r}catch(e){}}var i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),de===he?A.call(t,V?"html":"body")[0]:V?t.documentElement:i}function Se(e){return _.call(e.ownerDocument||e,e,r.SHOW_ELEMENT|r.SHOW_COMMENT|r.SHOW_TEXT,null,!1)}function Ae(e){return"object"===(void 0===p?"undefined":ct(p))?e instanceof p:e&&"object"===(void 0===e?"undefined":ct(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName}function Te(e,t,n){R[e]&&Ce(R[e],function(e){e.call(c,t,n,ge)})}function Ee(e){var t;if(Te("beforeSanitizeElements",e,null),!((n=e)instanceof d||n instanceof f||"string"==typeof n.nodeName&&"string"==typeof n.textContent&&"function"==typeof n.removeChild&&n.attributes instanceof h&&"function"==typeof n.removeAttribute&&"function"==typeof n.setAttribute&&"string"==typeof n.namespaceURI&&"function"==typeof n.insertBefore))return we(e),1;if(Me(e.nodeName,/[\u0080-\uFFFF]/))return we(e),1;var n=Ne(e.nodeName);if(Te("uponSanitizeElement",e,{tagName:n,allowedTags:P}),!Ae(e.firstElementChild)&&(!Ae(e.content)||!Ae(e.content.firstElementChild))&&je(/<[/\w]/g,e.innerHTML)&&je(/<[/\w]/g,e.textContent))return we(e),1;if("select"===n&&je(//i,t))xe(o,e);else{W&&(t=De(t,F," "),t=De(t,C," "));var l=e.nodeName.toLowerCase();if(Re(l,s,t))try{a?e.setAttributeNS(a,o,t):e.setAttribute(o,t),Le(c.removed)}catch(e){}}}Te("afterSanitizeAttributes",e,null)}}function $e(e){var t,n=Se(e);for(Te("beforeSanitizeShadowDOM",e,null);t=n.nextNode();)Te("uponSanitizeShadowNode",t,null),Ee(t)||(t.content instanceof u&&$e(t.content),Oe(t));Te("afterSanitizeShadowDOM",e,null)}return c.sanitize=function(e,t){var n,r=void 0,i=void 0,o=void 0;if((fe=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ae(e)){if("function"!=typeof e.toString)throw He("toString is not a function");if("string"!=typeof(e=e.toString()))throw He("dirty is not a string, aborting")}if(!c.isSupported){if("object"===ct(s.toStaticHTML)||"function"==typeof s.toStaticHTML){if("string"==typeof e)return s.toStaticHTML(e);if(Ae(e))return s.toStaticHTML(e.outerHTML)}return e}if(Y||O(t),c.removed=[],"string"==typeof e&&(re=!1),!re)if(e instanceof p)1===(t=(r=_e("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===t.nodeName||"HTML"===t.nodeName?r=t:r.appendChild(t);else{if(!K&&!W&&!V&&-1===e.indexOf("<"))return k&&ee?k.createHTML(e):e;if(!(r=_e(e)))return K?null:w}r&&X&&we(r.firstChild);for(var a=Se(re?e:r);n=a.nextNode();)3===n.nodeType&&n===i||Ee(n)||(n.content instanceof u&&$e(n.content),Oe(n),i=n);if(i=null,re)return e;if(K){if(Q)for(o=S.call(r.ownerDocument);r.firstChild;)o.appendChild(r.firstChild);else o=r;return J&&(o=T.call(l,o,!0)),o}return e=V?r.outerHTML:r.innerHTML,W&&(e=De(e,F," "),e=De(e,C," ")),k&&ee?k.createHTML(e):e},c.setConfig=function(e){O(e),Y=!0},c.clearConfig=function(){ge=null,Y=!1},c.isValidAttribute=function(e,t,n){return ge||O({}),e=Ne(e),t=Ne(t),Re(e,t,n)},c.addHook=function(e,t){"function"==typeof t&&(R[e]=R[e]||[],ze(R[e],t))},c.removeHook=function(e){R[e]&&Le(R[e])},c.removeHooks=function(e){R[e]&&(R[e]=[])},c.removeAllHooks=function(){R={}},c}();function se(e){var t,n=e.loaded,r=e.total,i=e.step;ie||((e=v("div")).classList.add("progress"),a(g,e),ie=e),t=i?80<(t=parseInt(ie.style.width||0,10)+i)?80:t:Math.floor(n/r*100),ie.style.opacity=1,ie.style.width=95<=t?"100%":t+"%",95<=t&&(clearTimeout(oe),oe=setTimeout(function(e){ie.style.opacity=0,ie.style.width="0%"},200))}var le={};function ce(i,e,t){void 0===e&&(e=!1),void 0===t&&(t={});function o(){a.addEventListener.apply(a,arguments)}var n,a=new XMLHttpRequest,r=le[i];if(r)return{then:function(e){return e(r.content,r.opt)},abort:u};for(n in a.open("GET",i),t)l.call(t,n)&&a.setRequestHeader(n,t[n]);return a.send(),{then:function(t,n){var r;void 0===n&&(n=u),e&&(r=setInterval(function(e){return se({step:Math.floor(5*Math.random()+1)})},500),o("progress",se),o("loadend",function(e){se(e),clearInterval(r)})),o("error",n),o("load",function(e){e=e.target;400<=e.status?n(e):(e=le[i]={content:e.response,opt:{updatedAt:a.getResponseHeader("last-modified")}},t(e.content,e.opt))})},abort:function(e){return 4!==a.readyState&&a.abort()}}}function ue(e,t){e.innerHTML=e.innerHTML.replace(/var\(\s*--theme-color.*?\)/g,t)}var pe=f.title;function he(){var e,t=d("section.cover");t&&(e=t.getBoundingClientRect().height,window.pageYOffset>=e||t.classList.contains("hidden")?S(g,"add","sticky"):S(g,"remove","sticky"))}function de(e,t,r,n){var i=[];null!=(t=d(t))&&(i=k(t,"a"));var o,a=decodeURI(e.toURL(e.getCurrentPath()));return i.sort(function(e,t){return t.href.length-e.href.length}).forEach(function(e){var t=decodeURI(e.getAttribute("href")),n=r?e.parentNode:e;e.title=e.title||e.innerText,0!==a.indexOf(t)||o?S(n,"remove","active"):(o=e,S(n,"add","active"))}),n&&(f.title=o?o.title||o.innerText+" - "+pe:pe),o}function fe(e,t){for(var n=0;n this.end&&e>=this.next}[this.direction]}},{key:"_defaultEase",value:function(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}}]),be);function be(){var e=0 l){t=t||p;break}t=p}!t||(n=xe[Re(e,t.getAttribute("data-id"))])&&n!==a&&(a&&a.classList.remove("active"),n.classList.add("active"),a=n,!_e&&g.classList.contains("sticky")&&(s=r.clientHeight,e=a.offsetTop+a.clientHeight+40,n=a.offsetTop>=o.scrollTop&&e<=o.scrollTop+s,a=+e "']/),yt=/[&<>"']/g,bt=/[<>"']|&(?!#?\w+;)/,kt=/[<>"']|&(?!#?\w+;)/g,wt={"&":"&","<":"<",">":">",'"':""","'":"'"};var xt=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function _t(e){return e.replace(xt,function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}var St=/(^|[^\[])\^/g;var At=/[^\w:]/g,Tt=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var Et={},Rt=/^[^:]+:\/*[^/]*$/,Ot=/^([^:]+:)[\s\S]*$/,$t=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Ft(e,t){Et[" "+e]||(Rt.test(e)?Et[" "+e]=e+"/":Et[" "+e]=Ct(e,"/",!0));var n=-1===(e=Et[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(Ot,"$1")+t:"/"===t.charAt(0)?n?t:e.replace($t,"$1")+t:e+t}function Ct(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;it)n.splice(t);else for(;n.length >=1,e+=e;return n+e},jt=mt.defaults,Ht=Ct,qt=It,Ut=Lt,Bt=I;function Zt(e,t,n){var r=t.href,i=t.title?Ut(t.title):null,t=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:t}:{type:"image",raw:n,href:r,title:i,text:Ut(t)}}var Gt=function(){function e(e){this.options=e||jt}return e.prototype.space=function(e){e=this.rules.block.newline.exec(e);if(e)return 1 =n.length?e.slice(n.length):e}).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:e}}},e.prototype.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();return/#$/.test(n)&&(e=Ht(n,"#"),!this.options.pedantic&&e&&!/ $/.test(e)||(n=e.trim())),{type:"heading",raw:t[0],depth:t[1].length,text:n}}},e.prototype.nptable=function(e){e=this.rules.block.nptable.exec(e);if(e){var t={type:"table",header:qt(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(t.header.length===t.align.length){for(var n=t.align.length,r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:e}}},e.prototype.list=function(e){e=this.rules.block.list.exec(e);if(e){for(var t,n,r,i,o,a=e[0],s=e[2],l=1 d[1].length:r[1].length>d[0].length||3 /i.test(e[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):Ut(e[0]):e[0]}},e.prototype.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;e=Ht(n.slice(0,-1),"\\");if((n.length-e.length)%2==0)return}else{var r=Bt(t[2],"()");-1 $/.test(n)?r.slice(1):r.slice(1,-1)),Zt(t,{href:r?r.replace(this.rules.inline._escapes,"$1"):r,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0])}},e.prototype.reflink=function(e,t){if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){e=(n[2]||n[1]).replace(/\s+/g," ");if((e=t[e.toLowerCase()])&&e.href)return Zt(n,e,n[0]);var n=n[0].charAt(0);return{type:"text",raw:n,text:n}}},e.prototype.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},e.prototype.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},e.prototype.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),e=/^ /.test(n)&&/ $/.test(n);return r&&e&&(n=n.substring(1,n.length-1)),n=Ut(n,!0),{type:"codespan",raw:t[0],text:n}}},e.prototype.br=function(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}},e.prototype.del=function(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2]}},e.prototype.autolink=function(e,t){e=this.rules.inline.autolink.exec(e);if(e){var n,t="@"===e[2]?"mailto:"+(n=Ut(this.options.mangle?t(e[1]):e[1])):n=Ut(e[1]);return{type:"link",raw:e[0],text:n,href:t,tokens:[{type:"text",raw:n,text:n}]}}},e.prototype.url=function(e,t){var n,r,i,o;if(n=this.rules.inline.url.exec(e)){if("@"===n[2])i="mailto:"+(r=Ut(this.options.mangle?t(n[0]):n[0]));else{for(;o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0],o!==n[0];);r=Ut(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},e.prototype.inlineText=function(e,t,n){e=this.rules.inline.text.exec(e);if(e){n=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):Ut(e[0]):e[0]:Ut(this.options.smartypants?n(e[0]):e[0]);return{type:"text",raw:e[0],text:n}}},e}(),It=Dt,I=Nt,Dt=Pt,Nt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:It,table:It,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Nt.def=I(Nt.def).replace("label",Nt._label).replace("title",Nt._title).getRegex(),Nt.bullet=/(?:[*+-]|\d{1,9}[.)])/,Nt.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,Nt.item=I(Nt.item,"gm").replace(/bull/g,Nt.bullet).getRegex(),Nt.listItemStart=I(/^( *)(bull)/).replace("bull",Nt.bullet).getRegex(),Nt.list=I(Nt.list).replace(/bull/g,Nt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Nt.def.source+")").getRegex(),Nt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Nt._comment=/|$)/,Nt.html=I(Nt.html,"i").replace("comment",Nt._comment).replace("tag",Nt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Nt.paragraph=I(Nt._paragraph).replace("hr",Nt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Nt._tag).getRegex(),Nt.blockquote=I(Nt.blockquote).replace("paragraph",Nt.paragraph).getRegex(),Nt.normal=Dt({},Nt),Nt.gfm=Dt({},Nt.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Nt.gfm.nptable=I(Nt.gfm.nptable).replace("hr",Nt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Nt._tag).getRegex(),Nt.gfm.table=I(Nt.gfm.table).replace("hr",Nt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",Nt._tag).getRegex(),Nt.pedantic=Dt({},Nt.normal,{html:I("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Nt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:It,paragraph:I(Nt.normal._paragraph).replace("hr",Nt.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Nt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});It={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:It,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:It,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};It.punctuation=I(It.punctuation).replace(/punctuation/g,It._punctuation).getRegex(),It._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",It._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",It._comment=I(Nt._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),It.em.start=I(It.em.start).replace(/punctuation/g,It._punctuation).getRegex(),It.em.middle=I(It.em.middle).replace(/punctuation/g,It._punctuation).replace(/overlapSkip/g,It._overlapSkip).getRegex(),It.em.endAst=I(It.em.endAst,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.em.endUnd=I(It.em.endUnd,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.strong.start=I(It.strong.start).replace(/punctuation/g,It._punctuation).getRegex(),It.strong.middle=I(It.strong.middle).replace(/punctuation/g,It._punctuation).replace(/overlapSkip/g,It._overlapSkip).getRegex(),It.strong.endAst=I(It.strong.endAst,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.strong.endUnd=I(It.strong.endUnd,"g").replace(/punctuation/g,It._punctuation).getRegex(),It.blockSkip=I(It._blockSkip,"g").getRegex(),It.overlapSkip=I(It._overlapSkip,"g").getRegex(),It._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,It._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,It._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,It.autolink=I(It.autolink).replace("scheme",It._scheme).replace("email",It._email).getRegex(),It._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,It.tag=I(It.tag).replace("comment",It._comment).replace("attribute",It._attribute).getRegex(),It._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,It._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,It._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,It.link=I(It.link).replace("label",It._label).replace("href",It._href).replace("title",It._title).getRegex(),It.reflink=I(It.reflink).replace("label",It._label).getRegex(),It.reflinkSearch=I(It.reflinkSearch,"g").replace("reflink",It.reflink).replace("nolink",It.nolink).getRegex(),It.normal=Dt({},It),It.pedantic=Dt({},It.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",It._label).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",It._label).getRegex()}),It.gfm=Dt({},It.normal,{escape:I(It.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\ '+(n?e:nn(e,!0))+"
\n":"\n"},e.prototype.blockquote=function(e){return""+(n?e:nn(e,!0))+"
\n"+e+"\n"},e.prototype.html=function(e){return e},e.prototype.heading=function(e,t,n,r){return this.options.headerIds?"'+e+" \n":""+e+" \n"},e.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},e.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+""+r+">\n"},e.prototype.listitem=function(e){return""+e+" \n"},e.prototype.checkbox=function(e){return" "},e.prototype.paragraph=function(e){return""+e+"
\n"},e.prototype.table=function(e,t){return"\n\n"+e+"\n"+(t=t&&""+t+"")+"
\n"},e.prototype.tablerow=function(e){return"\n"+e+" \n"},e.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+""+n+">\n"},e.prototype.strong=function(e){return""+e+""},e.prototype.em=function(e){return""+e+""},e.prototype.codespan=function(e){return""+e+"
"},e.prototype.br=function(){return this.options.xhtml?"
":"
"},e.prototype.del=function(e){return""+e+""},e.prototype.link=function(e,t,n){if(null===(e=tn(this.options.sanitize,this.options.baseUrl,e)))return n;e='"+n+""},e.prototype.image=function(e,t,n){if(null===(e=tn(this.options.sanitize,this.options.baseUrl,e)))return n;n='":">"},e.prototype.text=function(e){return e},e}(),on=function(){function e(){}return e.prototype.strong=function(e){return e},e.prototype.em=function(e){return e},e.prototype.codespan=function(e){return e},e.prototype.del=function(e){return e},e.prototype.html=function(e){return e},e.prototype.text=function(e){return e},e.prototype.link=function(e,t,n){return""+n},e.prototype.image=function(e,t,n){return""+n},e.prototype.br=function(){return""},e}(),an=function(){function e(){this.seen={}}return e.prototype.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},e.prototype.getNextSafeSlug=function(e,t){var n=e,r=0;if(this.seen.hasOwnProperty(n))for(r=this.seen[e];n=e+"-"+ ++r,this.seen.hasOwnProperty(n););return t||(this.seen[e]=r,this.seen[n]=0),n},e.prototype.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),sn=mt.defaults,ln=zt,cn=function(){function n(e){this.options=e||sn,this.options.renderer=this.options.renderer||new rn,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new on,this.slugger=new an}return n.parse=function(e,t){return new n(t).parse(e)},n.parseInline=function(e,t){return new n(t).parseInline(e)},n.prototype.parse=function(e,t){void 0===t&&(t=!0);for(var n,r,i,o,a,s,l,c,u,p,h,d,f,g,m,v="",y=e.length,b=0;bAn error occurred: "+hn(e.message+"",!0)+"";throw e}}fn.options=fn.setOptions=function(e){return un(fn.defaults,e),dn(fn.defaults),fn},fn.getDefaults=Lt,fn.defaults=mt,fn.use=function(o){var t,e=un({},o);if(o.renderer){var n,a=fn.defaults.renderer||new rn;for(n in o.renderer)!function(r){var i=a[r];a[r]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=o.renderer[r].apply(a,e);return!1===n&&(n=i.apply(a,e)),n}}(n);e.renderer=a}if(o.tokenizer){var i,s=fn.defaults.tokenizer||new Gt;for(i in o.tokenizer)!function(){var r=s[i];s[i]=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=o.tokenizer[i].apply(s,e);return!1===n&&(n=r.apply(s,e)),n}}();e.tokenizer=s}o.walkTokens&&(t=fn.defaults.walkTokens,e.walkTokens=function(e){o.walkTokens(e),t&&t(e)}),fn.setOptions(e)},fn.walkTokens=function(e,t){for(var n=0,r=e;nAn error occurred: "+hn(e.message+"",!0)+"";throw e}},fn.Parser=cn,fn.parser=cn.parse,fn.Renderer=rn,fn.TextRenderer=on,fn.Lexer=Jt,fn.lexer=Jt.lex,fn.Tokenizer=Gt,fn.Slugger=an;var gn=fn.parse=fn;function mn(e,n){if(void 0===n&&(n=' '),!e||!e.length)return"";var r="";return e.forEach(function(e){var t=e.title.replace(/(<([^>]+)>)/g,"");r+=''+e.title+" ",e.children&&(r+=mn(e.children,n))}),n.replace("{inner}",r)}function vn(e,t){return''+t.slice(5).trim()+"
"}function yn(e,r){var i=[],o={};return e.forEach(function(e){var t=e.level||1,n=t-1;r?@[\]^`{|}~]/g;function wn(e){return e.toLowerCase()}function xn(e){if("string"!=typeof e)return"";var t=e.trim().replace(/[A-Z]+/g,wn).replace(/<[^>]+>/g,"").replace(kn,"").replace(/\s/g,"-").replace(/-+/g,"-").replace(/^(\d)/,"_$1"),e=bn[t],e=l.call(bn,t)?e+1:0;return(bn[t]=e)&&(t=t+"-"+e),t}function _n(e,t){return''}function Sn(e){void 0===e&&(e="");var r={};return{str:e=e&&e.replace(/^('|")/,"").replace(/('|")$/,"").replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g,function(e,t,n){return-1===t.indexOf(":")?(r[t]=n&&n.replace(/"/g,"")||!0,""):e}).trim(),config:r}}function An(e){return void 0===e&&(e=""),e.replace(/(<\/?a.*?>)/gi,"")}xn.clear=function(){bn={}};var Tn,En=ft(function(e){var a,s,l,c,u,r,t,i=function(l){var c=/\blang(?:uage)?-([\w-]+)\b/i,t=0,$={manual:l.Prism&&l.Prism.manual,disableWorkerMessageHandler:l.Prism&&l.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof F?new F(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=a.reach);y+=v.value.length,v=v.next){var b=v.value;if(n.length>t.length)return;if(!(b instanceof F)){var k,w=1;if(f){if(!(k=C(m,y,t,d)))break;var x=k.index,_=k.index+k[0].length,S=y;for(S+=v.value.length;S<=x;)v=v.next,S+=v.value.length;if(S-=v.value.length,y=S,v.value instanceof F)continue;for(var A=v;A!==n.tail&&(S<_||"string"==typeof A.value);A=A.next)w++,S+=A.value.length;w--,b=t.slice(y,S),k.index-=y}else if(!(k=C(m,0,b,d)))continue;var x=k.index,T=k[0],E=b.slice(0,x),R=b.slice(x+T.length),O=y+b.length;a&&O>a.reach&&(a.reach=O);var b=v.prev;E&&(b=L(n,b,E),y+=E.length),z(n,b,w);var T=new F(s,h?$.tokenize(T,h):T,g,T);v=L(n,b,T),R&&L(n,v,R),1 "+i.content+""+i.tag+">"},!l.document)return l.addEventListener&&($.disableWorkerMessageHandler||l.addEventListener("message",function(e){var t=JSON.parse(e.data),n=t.language,e=t.code,t=t.immediateClose;l.postMessage($.highlight(e,$.languages[n],n)),t&&l.close()},!1)),$;var e,n=$.util.currentScript();function r(){$.manual||$.highlightAll()}return n&&($.filename=n.src,n.hasAttribute("data-manual")&&($.manual=!0)),$.manual||("loading"===(e=document.readyState)||"interactive"===e&&n&&n.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)),$}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});function p(e,t){var n=(n=e.className).replace(r," ")+" language-"+t;e.className=n.replace(/\s+/g," ").trim()}e.exports&&(e.exports=i),void 0!==dt&&(dt.Prism=i),i.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/?[\da-f]{1,8};/i]},i.languages.markup.tag.inside["attr-value"].inside.entity=i.languages.markup.entity,i.languages.markup.doctype.inside["internal-subset"].inside=i.languages.markup,i.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(i.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:i.languages[t]},n.cdata=/^$/i;n={"included-cdata":{pattern://i,inside:n}};n["language-"+t]={pattern:/[\s\S]+/,inside:i.languages[t]};t={};t[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},i.languages.insertBefore("markup","cdata",t)}}),i.languages.html=i.languages.markup,i.languages.mathml=i.languages.markup,i.languages.svg=i.languages.markup,i.languages.xml=i.languages.extend("markup",{}),i.languages.ssml=i.languages.xml,i.languages.atom=i.languages.xml,i.languages.rss=i.languages.xml,function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;t=e.languages.markup;t&&(t.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i,lookbehind:!0,inside:{"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{style:{pattern:/(["'])[\s\S]+(?=["']$)/,lookbehind:!0,alias:"language-css",inside:e.languages.css},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},"attr-name":/^style/i}}},t.tag))}(i),i.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},i.languages.javascript=i.languages.extend("clike",{"class-name":[i.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),i.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,i.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:i.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:i.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:i.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:i.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:i.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),i.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:i.languages.javascript}},string:/[\s\S]+/}}}),i.languages.markup&&i.languages.markup.tag.addInlined("script","javascript"),i.languages.js=i.languages.javascript,"undefined"!=typeof self&&self.Prism&&self.document&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),a=window.Prism,s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},u="pre[data-src]:not(["+(l="data-src-status")+'="loaded"]):not(['+l+'="'+(c="loading")+'"])',r=/\blang(?:uage)?-([\w-]+)\b/i,a.hooks.add("before-highlightall",function(e){e.selector+=", "+u}),a.hooks.add("before-sanity-check",function(e){var t,n,r,i,o=e.element;o.matches(u)&&(e.code="",o.setAttribute(l,c),(t=o.appendChild(document.createElement("CODE"))).textContent="Loading…",n=o.getAttribute("data-src"),"none"===(e=e.language)&&(r=(/\.(\w+)$/.exec(n)||[,"none"])[1],e=s[r]||r),p(t,e),p(o,e),(r=a.plugins.autoloader)&&r.loadLanguages(e),(i=new XMLHttpRequest).open("GET",n,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(o.setAttribute(l,"loaded"),t.textContent=i.responseText,a.highlightElement(t)):(o.setAttribute(l,"failed"),400<=i.status?t.textContent="✖ Error "+i.status+" while fetching file: "+i.statusText:t.textContent="✖ Error: File does not exist or is empty"))},i.send(null))}),t=!(a.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(u),r=0;t=n[r++];)a.highlightElement(t)}}),a.fileHighlight=function(){t||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),t=!0),a.plugins.fileHighlight.highlight.apply(this,arguments)})});function Rn(e,t){return"___"+e.toUpperCase()+t+"___"}Tn=Prism,Object.defineProperties(Tn.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,i,e,o){var a;r.language===i&&(a=r.tokenStack=[],r.code=r.code.replace(e,function(e){if("function"==typeof o&&!o(e))return e;for(var t,n=a.length;-1!==r.code.indexOf(t=Rn(i,n));)++n;return a[n]=e,t}),r.grammar=Tn.languages.markup)}},tokenizePlaceholders:{value:function(c,u){var p,h;c.language===u&&c.tokenStack&&(c.grammar=Tn.languages[u],p=0,h=Object.keys(c.tokenStack),function e(t){for(var n=0;n =h.length);n++){var r,i,o,a,s,l=t[n];"string"==typeof l||l.content&&"string"==typeof l.content?(i=h[p],o=c.tokenStack[i],r="string"==typeof l?l:l.content,s=Rn(u,i),-1<(a=r.indexOf(s))&&(++p,i=r.substring(0,a),o=new Tn.Token(u,Tn.tokenize(o,c.grammar),"language-"+u,o),a=r.substring(a+s.length),s=[],i&&s.push.apply(s,e([i])),s.push(o),a&&s.push.apply(s,e([a])),"string"==typeof l?t.splice.apply(t,[n,1].concat(s)):l.content=s)):l.content&&e(l.content)}return t}(c.tokens))}}});function On(i,e){var o=this;this.config=i,this.router=e,this.cacheTree={},this.toc=[],this.cacheTOC={},this.linkTarget=i.externalLinkTarget||"_blank",this.linkRel="_blank"===this.linkTarget?i.externalLinkRel||"noopener":"",this.contentBase=e.getBasePath();var t=this._initRenderer();this.heading=t.heading;var a=r(e=i.markdown||{})?e(gn,t):(gn.setOptions(y(e,{renderer:y(t,e.renderer)})),gn);this._marked=a,this.compile=function(n){var r=!0,e=s(function(e){r=!1;var t="";return n?(t=c(n)?a(n):a.parser(n),t=i.noEmoji?t:t.replace(/:\+1:/g,":thumbsup:").replace(/:-1:/g,":thumbsdown:").replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g,function(e){return e.replace(/:/g,"__colon__")}).replace(/:(\w+?):/gi,window.emojify||_n).replace(/__colon__/g,":"),xn.clear(),t):n})(n),t=o.router.parse().file;return r?o.toc=o.cacheTOC[t]:o.cacheTOC[t]=[].concat(o.toc),e}}var $n={},Fn={markdown:function(e){return{url:e}},mermaid:function(e){return{url:e}},iframe:function(e,t){return{html:'"}},video:function(e,t){return{html:'"}},audio:function(e,t){return{html:'"}},code:function(e,t){var n=e.match(/\.(\w+)$/);return"md"===(n=t||n&&n[1])&&(n="markdown"),{url:e,lang:n}}};On.prototype.compileEmbed=function(e,t){var n,r,i=Sn(t),o=i.str,i=i.config;if(t=o,i.include)return O(e)||(e=N(this.contentBase,F(this.router.getCurrentPath()),e)),i.type&&(r=Fn[i.type])?(n=r.call(this,e,t)).type=i.type:(r="code",/\.(md|markdown)/.test(e)?r="markdown":/\.mmd/.test(e)?r="mermaid":/\.html?/.test(e)?r="iframe":/\.(mp4|ogg)/.test(e)?r="video":/\.mp3/.test(e)&&(r="audio"),(n=Fn[r].call(this,e,t)).type=r),n.fragment=i.fragment,n},On.prototype._matchNotCompileLink=function(e){for(var t=this.config.noCompileLinks||[],n=0;n /g.test(r)&&(r=r.replace("\x3c!-- {docsify-ignore} --\x3e",""),e.title=An(r),e.ignoreSubHeading=!0),/{docsify-ignore}/g.test(r)&&(r=r.replace("{docsify-ignore}",""),e.title=An(r),e.ignoreSubHeading=!0),//g.test(r)&&(r=r.replace("\x3c!-- {docsify-ignore-all} --\x3e",""),e.title=An(r),e.ignoreAllSubs=!0),/{docsify-ignore-all}/g.test(r)&&(r=r.replace("{docsify-ignore-all}",""),e.title=An(r),e.ignoreAllSubs=!0);n=xn(i.id||r),i=o.toURL(o.getCurrentPath(),{id:n});return e.slug=i,h.toc.push(e)," '+r+" "},i.code={renderer:e}.renderer.code=function(e,t){void 0===t&&(t="markup");var n=En.languages[t]||En.languages.markup;return'"},i.link=(n=(t={renderer:e,router:o,linkTarget:t,linkRel:n,compilerClass:h}).renderer,a=t.router,s=t.linkTarget,l=t.linkRel,c=t.compilerClass,n.link=function(e,t,n){void 0===t&&(t="");var r=[],i=Sn(t),o=i.str,i=i.config;return s=i.target||s,l="_blank"===s?c.config.externalLinkRel||"noopener":"",t=o,O(e)||c._matchNotCompileLink(e)||i.ignore?(O(e)||"./"!==e.slice(0,2)||(e=document.URL.replace(/\/(?!.*\/).*/,"/").replace("#/./","")+e),r.push(0===e.indexOf("mailto:")?"":'target="'+s+'"'),r.push(0!==e.indexOf("mailto:")&&""!==l?' rel="'+l+'"':"")):(e===c.config.homepage&&(e="README"),e=a.toURL(e,null,a.getCurrentPath())),i.crossorgin&&"_self"===s&&"history"===c.config.routerMode&&-1===c.config.crossOriginLinks.indexOf(e)&&c.config.crossOriginLinks.push(e),i.disabled&&(r.push("disabled"),e="javascript:void(0)"),i.class&&r.push('class="'+i.class+'"'),i.id&&r.push('id="'+i.id+'"'),t&&r.push('title="'+t+'"'),'"+n+""}),i.paragraph={renderer:e}.renderer.paragraph=function(e){e=/^!>/.test(e)?vn("tip",e):/^\?>/.test(e)?vn("warn",e):"'+En.highlight(e.replace(/@DOCSIFY_QM@/g,"`"),n,t)+"
"+e+"
";return e},i.image=(r=(n={renderer:e,contentBase:r,router:o}).renderer,u=n.contentBase,p=n.router,r.image=function(e,t,n){var r=e,i=[],o=Sn(t),a=o.str,o=o.config;return t=a,o["no-zoom"]&&i.push("data-no-zoom"),t&&i.push('title="'+t+'"'),o.size&&(t=(a=o.size.split("x"))[0],(a=a[1])?i.push('width="'+t+'" height="'+a+'"'):i.push('width="'+t+'"')),o.class&&i.push('class="'+o.class+'"'),o.id&&i.push('id="'+o.id+'"'),O(e)||(r=N(u,F(p.getCurrentPath()),e)),0":'"}),i.list={renderer:e}.renderer.list=function(e,t,n){t=t?"ol":"ul";return"<"+t+" "+[/ /.test(e.split('class="task-list"')[0])?'class="task-list"':"",n&&1 "+e+""+t+">"},i.listitem={renderer:e}.renderer.listitem=function(e){return/^( ]*>)/.test(e)?'":" "+e+" "},e.origin=i,e},On.prototype.sidebar=function(e,t){var n=this.toc,r=this.router.getCurrentPath(),i="";if(e)i=this.compile(e);else{for(var o=0;o{inner}");this.cacheTree[r]=t}return i},On.prototype.subSidebar=function(e){if(e){var t=this.router.getCurrentPath(),n=this.cacheTree,r=this.toc;r[0]&&r[0].ignoreAllSubs&&r.splice(0),r[0]&&1===r[0].level&&r.shift();for(var i=0;i \n'+e+"\n"}]).links={}:(t=[{type:"html",text:e}]).links={}),o({token:i,embedToken:t}),++l>=s&&o({})}}(t);t.embed.url?ce(t.embed.url).then(r):r(t.embed.html)}}({compile:n,embedTokens:s,fetch:t},function(e){var t,n=e.embedToken,e=e.token;e?(t=e.index,u.forEach(function(e){t>e.start&&(t+=e.length)}),y(c,n.links),a=a.slice(0,t).concat(n,a.slice(t+1)),u.push({start:t,length:n.length-1})):(zn[i]=a.concat(),a.links=zn[i].links=c,r(a))})}function Mn(e,t,n){var r,i,o,a;return t="function"==typeof n?n(t):"string"==typeof n?(o=[],a=0,(r=n).replace(B,function(t,e,n){o.push(r.substring(a,n-1)),a=n+=t.length+1,o.push(i&&i[t]||function(e){return("00"+("string"==typeof Z[t]?e[Z[t]]():Z[t](e))).slice(-t.length)})}),a!==r.length&&o.push(r.substring(a)),function(e){for(var t="",n=0,r=e||new Date;n 404 - Not found","Vue"in window)for(var o=0,a=k(".markdown-section > *").filter(t);o script").filter(function(e){return!/template/.test(e.type)})[0])||(e=e.innerText.trim())&&new Function(e)()),"Vue"in window){var l,c,u=[],p=Object.keys(n.vueComponents||{});2===i&&p.length&&p.forEach(function(e){window.Vue.options.components[e]||window.Vue.component(e,n.vueComponents[e])}),!Cn&&n.vueGlobalOptions&&"function"==typeof n.vueGlobalOptions.data&&(Cn=n.vueGlobalOptions.data()),u.push.apply(u,Object.keys(n.vueMounts||{}).map(function(e){return[b(r,e),n.vueMounts[e]]}).filter(function(e){var t=e[0];e[1];return t})),(n.vueGlobalOptions||p.length)&&(l=/{{2}[^{}]*}{2}/,c=/<[^>/]+\s([@:]|v-)[\w-:.[\]]+[=>\s]/,u.push.apply(u,k(".markdown-section > *").filter(function(n){return!u.some(function(e){var t=e[0];e[1];return t===n})}).filter(function(e){return e.tagName.toLowerCase()in(n.vueComponents||{})||e.querySelector(p.join(",")||null)||l.test(e.outerHTML)||c.test(e.outerHTML)}).map(function(e){var t=y({},n.vueGlobalOptions||{});return Cn&&(t.data=function(){return Cn}),[e,t]})));for(var h=0,d=u;h ([^<]*?)$'))&&("color"===t[2]?r.style.background=t[1]+(t[3]||""):(e=t[1],S(r,"add","has-mask"),O(t[1])||(e=N(this.router.getBasePath(),t[1])),r.style.backgroundImage="url("+e+")",r.style.backgroundSize="cover",r.style.backgroundPosition="center center"),n=n.replace(t[0],"")),this._renderTo(".cover-main",n),he()):S(r,"remove","show")},t.prototype._updateRender=function(){var e,t,n,r;e=this,t=d(".app-name-link"),n=e.config.nameLink,r=e.route.path,t&&(c(e.config.nameLink)?t.setAttribute("href",n):"object"==typeof n&&(e=Object.keys(n).filter(function(e){return-1 '):"")),e.coverpage&&(c+=(r=", 100%, 85%",' ')),e.logo&&(r=/^data:image/.test(e.logo),t=/(?:http[s]?:)?\/\//.test(e.logo),n=/^\./.test(e.logo),r||t||n||(e.logo=N(this.router.getBasePath(),e.logo))),c+=(n=(t=e).name?t.name:""," \x3c!--cover--\x3e"+('')+' '),this._renderTo(l,c,!0)):this.rendered=!0,e.mergeNavbar&&h?u=b(".sidebar"):(s.classList.add("app-nav"),e.repo||s.classList.add("no-badge")),e.loadNavbar&&w(u,s),e.themeColor&&(f.head.appendChild(v("div","").firstElementChild),o=e.themeColor,window.CSS&&window.CSS.supports&&window.CSS.supports("(--v:red)")||(e=k("style:not(.inserted),link"),[].forEach.call(e,function(e){if("STYLE"===e.nodeName)ue(e,o);else if("LINK"===e.nodeName){e=e.getAttribute("href");if(!/\.css$/.test(e))return;ce(e).then(function(e){e=v("style",e);m.appendChild(e),ue(e,o)})}}))),this._updateRender(),S(g,"ready")},t}(function(n){function e(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];n.apply(this,e),this.route={}}return n&&(e.__proto__=n),((e.prototype=Object.create(n&&n.prototype)).constructor=e).prototype.updateRender=function(){this.router.normalize(),this.route=this.router.parse(),g.setAttribute("data-page",this.route.file)},e.prototype.initRouter=function(){var t=this,e=this.config,e=new("history"===(e.routerMode||"hash")&&i?q:H)(e);this.router=e,this.updateRender(),U=this.route,e.onchange(function(e){t.updateRender(),t._updateRender(),U.path!==t.route.path?(t.$fetch(u,t.$resetEvents.bind(t,e.source)),U=t.route):t.$resetEvents(e.source)})},e}(function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),((t.prototype=Object.create(e&&e.prototype)).constructor=t).prototype.initLifecycle=function(){var n=this;this._hooks={},this._lifecycle={},["init","mounted","beforeEach","afterEach","doneEach","ready"].forEach(function(e){var t=n._hooks[e]=[];n._lifecycle[e]=function(e){return t.push(e)}})},t.prototype.callHook=function(e,n,r){void 0===r&&(r=u);var i=this._hooks[e],o=function(t){var e=i[t];t>=i.length?r(n):"function"==typeof e?2===e.length?e(n,function(e){n=e,o(t+1)}):(e=e(n),n=void 0===e?n:e,o(t+1)):o(t+1)};o(0)},t}(Hn)))))));function Un(e,t,n){return jn&&jn.abort&&jn.abort(),jn=ce(e,!0,n)}window.Docsify={util:In,dom:t,get:ce,slugify:xn,version:"4.12.2"},window.DocsifyCompiler=On,window.marked=gn,window.Prism=En,e(function(e){return new qn})}(); \ No newline at end of file diff --git a/docs/_src/docsify/search.js b/docs/_src/docsify/search.js new file mode 100644 index 00000000..ec79e856 --- /dev/null +++ b/docs/_src/docsify/search.js @@ -0,0 +1,535 @@ +(function () { + /** + * Converts a colon formatted string to a object with properties. + * + * This is process a provided string and look for any tokens in the format + * of `:name[=value]` and then convert it to a object and return. + * An example of this is ':include :type=code :fragment=demo' is taken and + * then converted to: + * + * ``` + * { + * include: '', + * type: 'code', + * fragment: 'demo' + * } + * ``` + * + * @param {string} str The string to parse. + * + * @return {object} The original string and parsed object, { str, config }. + */ + function getAndRemoveConfig(str) { + if ( str === void 0 ) str = ''; + + var config = {}; + + if (str) { + str = str + .replace(/^('|")/, '') + .replace(/('|")$/, '') + .replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g, function (m, key, value) { + if (key.indexOf(':') === -1) { + config[key] = (value && value.replace(/"/g, '')) || true; + return ''; + } + + return m; + }) + .trim(); + } + + return { str: str, config: config }; + } + + /* eslint-disable no-unused-vars */ + + var INDEXS = {}; + + var LOCAL_STORAGE = { + EXPIRE_KEY: 'docsify.search.expires', + INDEX_KEY: 'docsify.search.index', + }; + + function resolveExpireKey(namespace) { + return namespace + ? ((LOCAL_STORAGE.EXPIRE_KEY) + "/" + namespace) + : LOCAL_STORAGE.EXPIRE_KEY; + } + + function resolveIndexKey(namespace) { + return namespace + ? ((LOCAL_STORAGE.INDEX_KEY) + "/" + namespace) + : LOCAL_STORAGE.INDEX_KEY; + } + + function escapeHtml(string) { + var entityMap = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + }; + + return String(string).replace(/[&<>"']/g, function (s) { return entityMap[s]; }); + } + + function getAllPaths(router) { + var paths = []; + + Docsify.dom + .findAll('.sidebar-nav a:not(.section-link):not([data-nosearch])') + .forEach(function (node) { + var href = node.href; + var originHref = node.getAttribute('href'); + var path = router.parse(href).path; + + if ( + path && + paths.indexOf(path) === -1 && + !Docsify.util.isAbsolutePath(originHref) + ) { + paths.push(path); + } + }); + + return paths; + } + + function getTableData(token) { + if (!token.text && token.type === 'table') { + token.cells.unshift(token.header); + token.text = token.cells + .map(function(rows) { + return rows.join(' | '); + }) + .join(' |\n '); + } + return token.text; + } + + function getListData(token) { + if (!token.text && token.type === 'list') { + token.text = token.raw; + } + return token.text; + } + + function saveData(maxAge, expireKey, indexKey) { + localStorage.setItem(expireKey, Date.now() + maxAge); + localStorage.setItem(indexKey, JSON.stringify(INDEXS)); + } + + function genIndex(path, content, router, depth) { + if ( content === void 0 ) content = ''; + + var tokens = window.marked.lexer(content); + var slugify = window.Docsify.slugify; + var index = {}; + var slug; + var title = ''; + + tokens.forEach(function(token, tokenIndex) { + if (token.type === 'heading' && token.depth <= depth) { + var ref = getAndRemoveConfig(token.text); + var str = ref.str; + var config = ref.config; + + if (config.id) { + slug = router.toURL(path, { id: slugify(config.id) }); + } else { + slug = router.toURL(path, { id: slugify(escapeHtml(token.text)) }); + } + + if (str) { + title = str + .replace(//, '') + .replace(/{docsify-ignore}/, '') + .replace(//, '') + .replace(/{docsify-ignore-all}/, '') + .trim(); + } + + index[slug] = { slug: slug, title: title, body: '' }; + } else { + if (tokenIndex === 0) { + slug = router.toURL(path); + index[slug] = { + slug: slug, + title: path !== '/' ? path.slice(1) : 'Home Page', + body: token.text || '', + }; + } + + if (!slug) { + return; + } + + if (!index[slug]) { + index[slug] = { slug: slug, title: '', body: '' }; + } else if (index[slug].body) { + token.text = getTableData(token); + token.text = getListData(token); + + index[slug].body += '\n' + (token.text || ''); + } else { + token.text = getTableData(token); + token.text = getListData(token); + + index[slug].body = index[slug].body + ? index[slug].body + token.text + : token.text; + } + } + }); + slugify.clear(); + return index; + } + + function ignoreDiacriticalMarks(keyword) { + if (keyword && keyword.normalize) { + return keyword.normalize('NFD').replace(/[\u0300-\u036f]/g, ''); + } + return keyword; + } + + /** + * @param {String} query Search query + * @returns {Array} Array of results + */ + function search(query) { + var matchingResults = []; + var data = []; + Object.keys(INDEXS).forEach(function (key) { + data = data.concat(Object.keys(INDEXS[key]).map(function (page) { return INDEXS[key][page]; })); + }); + + query = query.trim(); + var keywords = query.split(/[\s\-,\\/]+/); + if (keywords.length !== 1) { + keywords = [].concat(query, keywords); + } + + var loop = function ( i ) { + var post = data[i]; + var matchesScore = 0; + var resultStr = ''; + var handlePostTitle = ''; + var handlePostContent = ''; + var postTitle = post.title && post.title.trim(); + var postContent = post.body && post.body.trim(); + var postUrl = post.slug || ''; + + if (postTitle) { + keywords.forEach(function (keyword) { + // From https://github.com/sindresorhus/escape-string-regexp + var regEx = new RegExp( + escapeHtml(ignoreDiacriticalMarks(keyword)).replace( + /[|\\{}()[\]^$+*?.]/g, + '\\$&' + ), + 'gi' + ); + var indexTitle = -1; + var indexContent = -1; + handlePostTitle = postTitle + ? escapeHtml(ignoreDiacriticalMarks(postTitle)) + : postTitle; + handlePostContent = postContent + ? escapeHtml(ignoreDiacriticalMarks(postContent)) + : postContent; + + indexTitle = postTitle ? handlePostTitle.search(regEx) : -1; + indexContent = postContent ? handlePostContent.search(regEx) : -1; + + if (indexTitle >= 0 || indexContent >= 0) { + matchesScore += indexTitle >= 0 ? 3 : indexContent >= 0 ? 2 : 0; + if (indexContent < 0) { + indexContent = 0; + } + + var start = 0; + var end = 0; + + start = indexContent < 11 ? 0 : indexContent - 10; + end = start === 0 ? 70 : indexContent + keyword.length + 60; + + if (postContent && end > postContent.length) { + end = postContent.length; + } + + var matchContent = + '...' + + handlePostContent + .substring(start, end) + .replace( + regEx, + function (word) { return ("" + word + ""); } + ) + + '...'; + + resultStr += matchContent; + } + }); + + if (matchesScore > 0) { + var matchingPost = { + title: handlePostTitle, + content: postContent ? resultStr : '', + url: postUrl, + score: matchesScore, + }; + + matchingResults.push(matchingPost); + } + } + }; + + for (var i = 0; i < data.length; i++) loop( i ); + + return matchingResults.sort(function (r1, r2) { return r2.score - r1.score; }); + } + + function init(config, vm) { + var isAuto = config.paths === 'auto'; + var paths = isAuto ? getAllPaths(vm.router) : config.paths; + + var namespaceSuffix = ''; + + // only in auto mode + if (paths.length && isAuto && config.pathNamespaces) { + var path = paths[0]; + + if (Array.isArray(config.pathNamespaces)) { + namespaceSuffix = + config.pathNamespaces.filter( + function (prefix) { return path.slice(0, prefix.length) === prefix; } + )[0] || namespaceSuffix; + } else if (config.pathNamespaces instanceof RegExp) { + var matches = path.match(config.pathNamespaces); + + if (matches) { + namespaceSuffix = matches[0]; + } + } + var isExistHome = paths.indexOf(namespaceSuffix + '/') === -1; + var isExistReadme = paths.indexOf(namespaceSuffix + '/README') === -1; + if (isExistHome && isExistReadme) { + paths.unshift(namespaceSuffix + '/'); + } + } else if (paths.indexOf('/') === -1 && paths.indexOf('/README') === -1) { + paths.unshift('/'); + } + + var expireKey = resolveExpireKey(config.namespace) + namespaceSuffix; + var indexKey = resolveIndexKey(config.namespace) + namespaceSuffix; + + var isExpired = localStorage.getItem(expireKey) < Date.now(); + + INDEXS = JSON.parse(localStorage.getItem(indexKey)); + + if (isExpired) { + INDEXS = {}; + } else if (!isAuto) { + return; + } + + var len = paths.length; + var count = 0; + + paths.forEach(function (path) { + if (INDEXS[path]) { + return count++; + } + + Docsify.get(vm.router.getFile(path), false, vm.config.requestHeaders).then( + function (result) { + INDEXS[path] = genIndex(path, result, vm.router, config.depth); + len === ++count && saveData(config.maxAge, expireKey, indexKey); + } + ); + }); + } + + /* eslint-disable no-unused-vars */ + + var NO_DATA_TEXT = ''; + var options; + + function style() { + var code = "\n.sidebar {\n padding-top: 0;\n}\n\n.search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n}\n\n.search .input-wrap {\n display: flex;\n align-items: center;\n}\n\n.search .results-panel {\n display: none;\n}\n\n.search .results-panel.show {\n display: block;\n}\n\n.search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 0 7px;\n line-height: 36px;\n font-size: 14px;\n border: 1px solid transparent;\n}\n\n.search input:focus {\n box-shadow: 0 0 5px var(--theme-color, #42b983);\n border: 1px solid var(--theme-color, #42b983);\n}\n\n.search input::-webkit-search-decoration,\n.search input::-webkit-search-cancel-button,\n.search input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n.search .clear-button {\n cursor: pointer;\n width: 36px;\n text-align: right;\n display: none;\n}\n\n.search .clear-button.show {\n display: block;\n}\n\n.search .clear-button svg {\n transform: scale(.5);\n}\n\n.search h2 {\n font-size: 17px;\n margin: 10px 0;\n}\n\n.search a {\n text-decoration: none;\n color: inherit;\n}\n\n.search .matching-post {\n border-bottom: 1px solid #eee;\n}\n\n.search .matching-post:last-child {\n border-bottom: 0;\n}\n\n.search p {\n font-size: 14px;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n}\n\n.search p.empty {\n text-align: center;\n}\n\n.app-name.hide, .sidebar-nav.hide {\n display: none;\n}"; + + Docsify.dom.style(code); + } + + function tpl(defaultValue) { + if ( defaultValue === void 0 ) defaultValue = ''; + + var html = "\x3c!--main--\x3e \n \n\n \n "; + var el = Docsify.dom.create('div', html); + var aside = Docsify.dom.find('aside'); + + Docsify.dom.toggleClass(el, 'search'); + Docsify.dom.before(aside, el); + } + + function doSearch(value) { + var $search = Docsify.dom.find('div.search'); + var $panel = Docsify.dom.find($search, '.results-panel'); + var $clearBtn = Docsify.dom.find($search, '.clear-button'); + var $sidebarNav = Docsify.dom.find('.sidebar-nav'); + var $appName = Docsify.dom.find('.app-name'); + + if (!value) { + $panel.classList.remove('show'); + $clearBtn.classList.remove('show'); + $panel.innerHTML = ''; + + if (options.hideOtherSidebarContent) { + $sidebarNav && $sidebarNav.classList.remove('hide'); + $appName && $appName.classList.remove('hide'); + } + + return; + } + + var matchs = search(value); + + var html = ''; + matchs.forEach(function (post) { + html += " \n "; + }); + + $panel.classList.add('show'); + $clearBtn.classList.add('show'); + $panel.innerHTML = html || ("" + NO_DATA_TEXT + "
"); + if (options.hideOtherSidebarContent) { + $sidebarNav && $sidebarNav.classList.add('hide'); + $appName && $appName.classList.add('hide'); + } + } + + function bindEvents() { + var $search = Docsify.dom.find('div.search'); + var $input = Docsify.dom.find($search, 'input'); + var $inputWrap = Docsify.dom.find($search, '.input-wrap'); + + var timeId; + + /** + Prevent to Fold sidebar. + + When searching on the mobile end, + the sidebar is collapsed when you click the INPUT box, + making it impossible to search. + */ + Docsify.dom.on( + $search, + 'click', + function (e) { return ['A', 'H2', 'P', 'EM'].indexOf(e.target.tagName) === -1 && + e.stopPropagation(); } + ); + Docsify.dom.on($input, 'input', function (e) { + clearTimeout(timeId); + timeId = setTimeout(function (_) { return doSearch(e.target.value.trim()); }, 100); + }); + Docsify.dom.on($inputWrap, 'click', function (e) { + // Click input outside + if (e.target.tagName !== 'INPUT') { + $input.value = ''; + doSearch(); + } + }); + } + + function updatePlaceholder(text, path) { + var $input = Docsify.dom.getNode('.search input[type="search"]'); + + if (!$input) { + return; + } + + if (typeof text === 'string') { + $input.placeholder = text; + } else { + var match = Object.keys(text).filter(function (key) { return path.indexOf(key) > -1; })[0]; + $input.placeholder = text[match]; + } + } + + function updateNoData(text, path) { + if (typeof text === 'string') { + NO_DATA_TEXT = text; + } else { + var match = Object.keys(text).filter(function (key) { return path.indexOf(key) > -1; })[0]; + NO_DATA_TEXT = text[match]; + } + } + + function updateOptions(opts) { + options = opts; + } + + function init$1(opts, vm) { + var keywords = vm.router.parse().query.s; + + updateOptions(opts); + style(); + tpl(keywords); + bindEvents(); + keywords && setTimeout(function (_) { return doSearch(keywords); }, 500); + } + + function update(opts, vm) { + updateOptions(opts); + updatePlaceholder(opts.placeholder, vm.route.path); + updateNoData(opts.noData, vm.route.path); + } + + /* eslint-disable no-unused-vars */ + + var CONFIG = { + placeholder: 'Type to search', + noData: 'No Results!', + paths: 'auto', + depth: 2, + maxAge: 86400000, // 1 day + hideOtherSidebarContent: false, + namespace: undefined, + pathNamespaces: undefined, + }; + + var install = function(hook, vm) { + var util = Docsify.util; + var opts = vm.config.search || CONFIG; + + if (Array.isArray(opts)) { + CONFIG.paths = opts; + } else if (typeof opts === 'object') { + CONFIG.paths = Array.isArray(opts.paths) ? opts.paths : 'auto'; + CONFIG.maxAge = util.isPrimitive(opts.maxAge) ? opts.maxAge : CONFIG.maxAge; + CONFIG.placeholder = opts.placeholder || CONFIG.placeholder; + CONFIG.noData = opts.noData || CONFIG.noData; + CONFIG.depth = opts.depth || CONFIG.depth; + CONFIG.hideOtherSidebarContent = + opts.hideOtherSidebarContent || CONFIG.hideOtherSidebarContent; + CONFIG.namespace = opts.namespace || CONFIG.namespace; + CONFIG.pathNamespaces = opts.pathNamespaces || CONFIG.pathNamespaces; + } + + var isAuto = CONFIG.paths === 'auto'; + + hook.mounted(function (_) { + init$1(CONFIG, vm); + !isAuto && init(CONFIG, vm); + }); + hook.doneEach(function (_) { + update(CONFIG, vm); + isAuto && init(CONFIG, vm); + }); + }; + + $docsify.plugins = [].concat(install, $docsify.plugins); + + }()); \ No newline at end of file diff --git a/docs/_src/docsify/vue.css b/docs/_src/docsify/vue.css new file mode 100644 index 00000000..902d9a07 --- /dev/null +++ b/docs/_src/docsify/vue.css @@ -0,0 +1 @@ +@import url("https://fonts.googleapis.com/css?family=Roboto+Mono|Source+Sans+Pro:300,400,600");*{-webkit-font-smoothing:antialiased;-webkit-overflow-scrolling:touch;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:none;-webkit-touch-callout:none;box-sizing:border-box}body:not(.ready){overflow:hidden}body:not(.ready) .app-nav,body:not(.ready)>nav,body:not(.ready) [data-cloak]{display:none}div#app{font-size:30px;font-weight:lighter;margin:40vh auto;text-align:center}div#app:empty:before{content:"Loading..."}.emoji{height:1.2rem;vertical-align:middle}.progress{background-color:var(--theme-color,#42b983);height:2px;left:0;position:fixed;right:0;top:0;transition:width .2s,opacity .4s;width:0;z-index:999999}.search a:hover{color:var(--theme-color,#42b983)}.search .search-keyword{color:var(--theme-color,#42b983);font-style:normal;font-weight:700}body,html{height:100%}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:#34495e;font-family:Source Sans Pro,Helvetica Neue,Arial,sans-serif;font-size:15px;letter-spacing:0;margin:0;overflow-x:hidden}img{max-width:100%}a[disabled]{cursor:not-allowed;opacity:.6}kbd{border:1px solid #ccc;border-radius:3px;display:inline-block;font-size:12px!important;line-height:12px;margin-bottom:3px;padding:3px 5px;vertical-align:middle}li input[type=checkbox]{margin:0 .2em .25em 0;vertical-align:middle}.app-nav{margin:25px 60px 0 0;position:absolute;right:0;text-align:right;z-index:10}.app-nav.no-badge{margin-right:25px}.app-nav p{margin:0}.app-nav>a{margin:0 1rem;padding:5px 0}.app-nav li,.app-nav ul{display:inline-block;list-style:none;margin:0}.app-nav a{color:inherit;font-size:16px;text-decoration:none;transition:color .3s}.app-nav a:hover{color:var(--theme-color,#42b983)}.app-nav a.active{border-bottom:2px solid var(--theme-color,#42b983);color:var(--theme-color,#42b983)}.app-nav li{display:inline-block;margin:0 1rem;padding:5px 0;position:relative;cursor:pointer}.app-nav li ul{background-color:#fff;border:1px solid;border-color:#ddd #ddd #ccc;border-radius:4px;box-sizing:border-box;display:none;max-height:calc(100vh - 61px);overflow-y:auto;padding:10px 0;position:absolute;right:-15px;text-align:left;top:100%;white-space:nowrap}.app-nav li ul li{display:block;font-size:14px;line-height:1rem;margin:8px 14px;white-space:nowrap}.app-nav li ul a{display:block;font-size:inherit;margin:0;padding:0}.app-nav li ul a.active{border-bottom:0}.app-nav li:hover ul{display:block}.github-corner{border-bottom:0;position:fixed;right:0;text-decoration:none;top:0;z-index:1}.github-corner:hover .octo-arm{-webkit-animation:octocat-wave .56s ease-in-out;animation:octocat-wave .56s ease-in-out}.github-corner svg{color:#fff;fill:var(--theme-color,#42b983);height:80px;width:80px}main{display:block;position:relative;width:100vw;height:100%;z-index:0}main.hidden{display:none}.anchor{display:inline-block;text-decoration:none;transition:all .3s}.anchor span{color:#34495e}.anchor:hover{text-decoration:underline}.sidebar{border-right:1px solid rgba(0,0,0,.07);overflow-y:auto;padding:40px 0 0;position:absolute;top:0;bottom:0;left:0;transition:transform .25s ease-out;width:300px;z-index:20}.sidebar>h1{margin:0 auto 1rem;font-size:1.5rem;font-weight:300;text-align:center}.sidebar>h1 a{color:inherit;text-decoration:none}.sidebar>h1 .app-nav{display:block;position:static}.sidebar .sidebar-nav{line-height:2em;padding-bottom:40px}.sidebar li.collapse .app-sub-sidebar{display:none}.sidebar ul{margin:0 0 0 15px;padding:0}.sidebar li>p{font-weight:700;margin:0}.sidebar ul,.sidebar ul li{list-style:none}.sidebar ul li a{border-bottom:none;display:block}.sidebar ul li ul{padding-left:20px}.sidebar::-webkit-scrollbar{width:4px}.sidebar::-webkit-scrollbar-thumb{background:transparent;border-radius:4px}.sidebar:hover::-webkit-scrollbar-thumb{background:hsla(0,0%,53.3%,.4)}.sidebar:hover::-webkit-scrollbar-track{background:hsla(0,0%,53.3%,.1)}.sidebar-toggle{background-color:transparent;background-color:hsla(0,0%,100%,.8);border:0;outline:none;padding:10px;position:absolute;bottom:0;left:0;text-align:center;transition:opacity .3s;width:284px;z-index:30;cursor:pointer}.sidebar-toggle:hover .sidebar-toggle-button{opacity:.4}.sidebar-toggle span{background-color:var(--theme-color,#42b983);display:block;margin-bottom:4px;width:16px;height:2px}body.sticky .sidebar,body.sticky .sidebar-toggle{position:fixed}.content{padding-top:60px;position:absolute;top:0;right:0;bottom:0;left:300px;transition:left .25s ease}.markdown-section{margin:0 auto;max-width:80%;padding:30px 15px 40px;position:relative}.markdown-section>*{box-sizing:border-box;font-size:inherit}.markdown-section>:first-child{margin-top:0!important}.markdown-section hr{border:none;border-bottom:1px solid #eee;margin:2em 0}.markdown-section iframe{border:1px solid #eee;width:1px;min-width:100%}.markdown-section table{border-collapse:collapse;border-spacing:0;display:block;margin-bottom:1rem;overflow:auto;width:100%}.markdown-section th{font-weight:700}.markdown-section td,.markdown-section th{border:1px solid #ddd;padding:6px 13px}.markdown-section tr{border-top:1px solid #ccc}.markdown-section tr:nth-child(2n){background-color:#f8f8f8}.markdown-section p.tip{background-color:#f8f8f8;border-bottom-right-radius:2px;border-left:4px solid #f66;border-top-right-radius:2px;margin:2em 0;padding:12px 24px 12px 30px;position:relative}.markdown-section p.tip:before{background-color:#f66;border-radius:100%;color:#fff;content:"!";font-family:Dosis,Source Sans Pro,Helvetica Neue,Arial,sans-serif;font-size:14px;font-weight:700;left:-12px;line-height:20px;position:absolute;height:20px;width:20px;text-align:center;top:14px}.markdown-section p.tip code{background-color:#efefef}.markdown-section p.tip em{color:#34495e}.markdown-section p.warn{background:rgba(66,185,131,.1);border-radius:2px;padding:1rem}.markdown-section ul.task-list>li{list-style-type:none}body.close .sidebar{transform:translateX(-300px)}body.close .sidebar-toggle{width:auto}body.close .content{left:0}@media print{.app-nav,.github-corner,.sidebar,.sidebar-toggle{display:none}}@media screen and (max-width:768px){.github-corner,.sidebar,.sidebar-toggle{position:fixed}.app-nav{margin-top:16px}.app-nav li ul{top:30px}main{height:auto;min-height:100vh;overflow-x:hidden}.sidebar{left:-300px;transition:transform .25s ease-out}.content{left:0;max-width:100vw;position:static;padding-top:20px;transition:transform .25s ease}.app-nav,.github-corner{transition:transform .25s ease-out}.sidebar-toggle{background-color:transparent;width:auto;padding:30px 30px 10px 10px}body.close .sidebar{transform:translateX(300px)}body.close .sidebar-toggle{background-color:hsla(0,0%,100%,.8);transition:background-color 1s;width:284px;padding:10px}body.close .content{transform:translateX(300px)}body.close .app-nav,body.close .github-corner{display:none}.github-corner:hover .octo-arm{-webkit-animation:none;animation:none}.github-corner .octo-arm{-webkit-animation:octocat-wave .56s ease-in-out;animation:octocat-wave .56s ease-in-out}}@-webkit-keyframes octocat-wave{0%,to{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@keyframes octocat-wave{0%,to{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}section.cover{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:cover;height:100vh;width:100vw;display:none}section.cover.show{display:flex}section.cover.has-mask .mask{background-color:#fff;opacity:.8;position:absolute;top:0;height:100%;width:100%}section.cover .cover-main{flex:1;margin:-20px 16px 0;text-align:center;position:relative}section.cover a{color:inherit;text-decoration:none}section.cover a:hover{text-decoration:none}section.cover p{line-height:1.5rem;margin:1em 0}section.cover h1{color:inherit;font-size:2.5rem;font-weight:300;margin:.625rem 0 2.5rem;position:relative;text-align:center}section.cover h1 a{display:block}section.cover h1 small{bottom:-.4375rem;font-size:1rem;position:absolute}section.cover blockquote{font-size:1.5rem;text-align:center}section.cover ul{line-height:1.8;list-style-type:none;margin:1em auto;max-width:500px;padding:0}section.cover .cover-main>p:last-child a{border-radius:2rem;border:1px solid var(--theme-color,#42b983);box-sizing:border-box;color:var(--theme-color,#42b983);display:inline-block;font-size:1.05rem;letter-spacing:.1rem;margin:.5rem 1rem;padding:.75em 2rem;text-decoration:none;transition:all .15s ease}section.cover .cover-main>p:last-child a:last-child{background-color:var(--theme-color,#42b983);color:#fff}section.cover .cover-main>p:last-child a:last-child:hover{color:inherit;opacity:.8}section.cover .cover-main>p:last-child a:hover{color:inherit}section.cover blockquote>p>a{border-bottom:2px solid var(--theme-color,#42b983);transition:color .3s}section.cover blockquote>p>a:hover{color:var(--theme-color,#42b983)}.sidebar,body{background-color:#fff}.sidebar{color:#364149}.sidebar li{margin:6px 0}.sidebar ul li a{color:#505d6b;font-size:14px;font-weight:400;overflow:hidden;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.sidebar ul li a:hover{text-decoration:underline}.sidebar ul li ul{padding:0}.sidebar ul li.active>a{border-right:2px solid;color:var(--theme-color,#42b983);font-weight:600}.app-sub-sidebar li:before{content:"-";padding-right:4px;float:left}.markdown-section h1,.markdown-section h2,.markdown-section h3,.markdown-section h4,.markdown-section strong{color:#2c3e50;font-weight:600}.markdown-section a{color:var(--theme-color,#42b983);font-weight:600}.markdown-section h1{font-size:2rem;margin:0 0 1rem}.markdown-section h2{font-size:1.75rem;margin:45px 0 .8rem}.markdown-section h3{font-size:1.5rem;margin:40px 0 .6rem}.markdown-section h4{font-size:1.25rem}.markdown-section h5{font-size:1rem}.markdown-section h6{color:#777;font-size:1rem}.markdown-section figure,.markdown-section p{margin:1.2em 0}.markdown-section ol,.markdown-section p,.markdown-section ul{line-height:1.6rem;word-spacing:.05rem}.markdown-section ol,.markdown-section ul{padding-left:1.5rem}.markdown-section blockquote{border-left:4px solid var(--theme-color,#42b983);color:#858585;margin:2em 0;padding-left:20px}.markdown-section blockquote p{font-weight:600;margin-left:0}.markdown-section iframe{margin:1em 0}.markdown-section em{color:#7f8c8d}.markdown-section code,.markdown-section output:after,.markdown-section pre{font-family:Roboto Mono,Monaco,courier,monospace}.markdown-section code,.markdown-section pre{background-color:#f8f8f8}.markdown-section output,.markdown-section pre{margin:1.2em 0;position:relative}.markdown-section output,.markdown-section pre>code{border-radius:2px;display:block}.markdown-section output:after,.markdown-section pre>code{-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial}.markdown-section code{border-radius:2px;color:#e96900;margin:0 2px;padding:3px 5px;white-space:pre-wrap}.markdown-section>:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) code{font-size:.8rem}.markdown-section pre{padding:0 1.4rem;line-height:1.5rem;overflow:auto;word-wrap:normal}.markdown-section pre>code{color:#525252;font-size:.8rem;padding:2.2em 5px;line-height:inherit;margin:0 2px;max-width:inherit;overflow:inherit;white-space:inherit}.markdown-section output{padding:1.7rem 1.4rem;border:1px dotted #ccc}.markdown-section output>:first-child{margin-top:0}.markdown-section output>:last-child{margin-bottom:0}.markdown-section code:after,.markdown-section code:before,.markdown-section output:after,.markdown-section output:before{letter-spacing:.05rem}.markdown-section output:after,.markdown-section pre:after{color:#ccc;font-size:.6rem;font-weight:600;height:15px;line-height:15px;padding:5px 10px 0;position:absolute;right:0;text-align:right;top:0}.markdown-section output:after,.markdown-section pre:after{content:attr(data-lang)}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#8e908c}.token.namespace{opacity:.7}.token.boolean,.token.number{color:#c76b29}.token.punctuation{color:#525252}.token.property{color:#c08b30}.token.tag{color:#2973b7}.token.string{color:var(--theme-color,#42b983)}.token.selector{color:#6679cc}.token.attr-name{color:#2973b7}.language-css .token.string,.style .token.string,.token.entity,.token.url{color:#22a2c9}.token.attr-value,.token.control,.token.directive,.token.unit{color:var(--theme-color,#42b983)}.token.function,.token.keyword{color:#e96900}.token.atrule,.token.regex,.token.statement{color:#22a2c9}.token.placeholder,.token.variable{color:#3d8fd1}.token.deleted{text-decoration:line-through}.token.inserted{border-bottom:1px dotted #202746;text-decoration:none}.token.italic{font-style:italic}.token.bold,.token.important{font-weight:700}.token.important{color:#c94922}.token.entity{cursor:help}code .token{-moz-osx-font-smoothing:initial;-webkit-font-smoothing:initial;min-height:1.5rem;position:relative;left:auto} \ No newline at end of file diff --git a/docs/_src/docsify/zoom-image.js b/docs/_src/docsify/zoom-image.js new file mode 100644 index 00000000..9cedfcbb --- /dev/null +++ b/docs/_src/docsify/zoom-image.js @@ -0,0 +1,659 @@ +(function () { + /*! medium-zoom 1.0.6 | MIT License | https://github.com/francoischalifour/medium-zoom */ + var _extends = Object.assign || function (target) { + var arguments$1 = arguments; + + for (var i = 1; i < arguments.length; i++) { + var source = arguments$1[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + var isSupported = function isSupported(node) { + return node.tagName === 'IMG'; + }; + + /* eslint-disable-next-line no-prototype-builtins */ + var isNodeList = function isNodeList(selector) { + return NodeList.prototype.isPrototypeOf(selector); + }; + + var isNode = function isNode(selector) { + return selector && selector.nodeType === 1; + }; + + var isSvg = function isSvg(image) { + var source = image.currentSrc || image.src; + return source.substr(-4).toLowerCase() === '.svg'; + }; + + var getImagesFromSelector = function getImagesFromSelector(selector) { + try { + if (Array.isArray(selector)) { + return selector.filter(isSupported); + } + + if (isNodeList(selector)) { + // Do not use spread operator or Array.from() for IE support + return [].slice.call(selector).filter(isSupported); + } + + if (isNode(selector)) { + return [selector].filter(isSupported); + } + + if (typeof selector === 'string') { + // Do not use spread operator or Array.from() for IE support + return [].slice.call(document.querySelectorAll(selector)).filter(isSupported); + } + + return []; + } catch (err) { + throw new TypeError('The provided selector is invalid.\n' + 'Expects a CSS selector, a Node element, a NodeList or an array.\n' + 'See: https://github.com/francoischalifour/medium-zoom'); + } + }; + + var createOverlay = function createOverlay(background) { + var overlay = document.createElement('div'); + overlay.classList.add('medium-zoom-overlay'); + overlay.style.background = background; + + return overlay; + }; + + var cloneTarget = function cloneTarget(template) { + var _template$getBounding = template.getBoundingClientRect(), + top = _template$getBounding.top, + left = _template$getBounding.left, + width = _template$getBounding.width, + height = _template$getBounding.height; + + var clone = template.cloneNode(); + var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; + var scrollLeft = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0; + + clone.removeAttribute('id'); + clone.style.position = 'absolute'; + clone.style.top = top + scrollTop + 'px'; + clone.style.left = left + scrollLeft + 'px'; + clone.style.width = width + 'px'; + clone.style.height = height + 'px'; + clone.style.transform = ''; + + return clone; + }; + + var createCustomEvent = function createCustomEvent(type, params) { + var eventParams = _extends({ + bubbles: false, + cancelable: false, + detail: undefined + }, params); + + if (typeof window.CustomEvent === 'function') { + return new CustomEvent(type, eventParams); + } + + var customEvent = document.createEvent('CustomEvent'); + customEvent.initCustomEvent(type, eventParams.bubbles, eventParams.cancelable, eventParams.detail); + + return customEvent; + }; + + var mediumZoom = function mediumZoom(selector) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + /** + * Ensure the compatibility with IE11 if no Promise polyfill are used. + */ + var Promise = window.Promise || function Promise(fn) { + function noop() {} + fn(noop, noop); + }; + + var _handleClick = function _handleClick(event) { + var target = event.target; + + + if (target === overlay) { + close(); + return; + } + + if (images.indexOf(target) === -1) { + return; + } + + toggle({ target: target }); + }; + + var _handleScroll = function _handleScroll() { + if (isAnimating || !active.original) { + return; + } + + var currentScroll = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; + + if (Math.abs(scrollTop - currentScroll) > zoomOptions.scrollOffset) { + setTimeout(close, 150); + } + }; + + var _handleKeyUp = function _handleKeyUp(event) { + var key = event.key || event.keyCode; + + // Close if escape key is pressed + if (key === 'Escape' || key === 'Esc' || key === 27) { + close(); + } + }; + + var update = function update() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + var newOptions = options; + + if (options.background) { + overlay.style.background = options.background; + } + + if (options.container && options.container instanceof Object) { + newOptions.container = _extends({}, zoomOptions.container, options.container); + } + + if (options.template) { + var template = isNode(options.template) ? options.template : document.querySelector(options.template); + + newOptions.template = template; + } + + zoomOptions = _extends({}, zoomOptions, newOptions); + + images.forEach(function (image) { + image.dispatchEvent(createCustomEvent('medium-zoom:update', { + detail: { zoom: zoom } + })); + }); + + return zoom; + }; + + var clone = function clone() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + return mediumZoom(_extends({}, zoomOptions, options)); + }; + + var attach = function attach() { + var arguments$1 = arguments; + + for (var _len = arguments.length, selectors = Array(_len), _key = 0; _key < _len; _key++) { + selectors[_key] = arguments$1[_key]; + } + + var newImages = selectors.reduce(function (imagesAccumulator, currentSelector) { + return [].concat(imagesAccumulator, getImagesFromSelector(currentSelector)); + }, []); + + newImages.filter(function (newImage) { + return images.indexOf(newImage) === -1; + }).forEach(function (newImage) { + images.push(newImage); + newImage.classList.add('medium-zoom-image'); + }); + + eventListeners.forEach(function (_ref) { + var type = _ref.type, + listener = _ref.listener, + options = _ref.options; + + newImages.forEach(function (image) { + image.addEventListener(type, listener, options); + }); + }); + + return zoom; + }; + + var detach = function detach() { + var arguments$1 = arguments; + + for (var _len2 = arguments.length, selectors = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + selectors[_key2] = arguments$1[_key2]; + } + + if (active.zoomed) { + close(); + } + + var imagesToDetach = selectors.length > 0 ? selectors.reduce(function (imagesAccumulator, currentSelector) { + return [].concat(imagesAccumulator, getImagesFromSelector(currentSelector)); + }, []) : images; + + imagesToDetach.forEach(function (image) { + image.classList.remove('medium-zoom-image'); + image.dispatchEvent(createCustomEvent('medium-zoom:detach', { + detail: { zoom: zoom } + })); + }); + + images = images.filter(function (image) { + return imagesToDetach.indexOf(image) === -1; + }); + + return zoom; + }; + + var on = function on(type, listener) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + images.forEach(function (image) { + image.addEventListener('medium-zoom:' + type, listener, options); + }); + + eventListeners.push({ type: 'medium-zoom:' + type, listener: listener, options: options }); + + return zoom; + }; + + var off = function off(type, listener) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + + images.forEach(function (image) { + image.removeEventListener('medium-zoom:' + type, listener, options); + }); + + eventListeners = eventListeners.filter(function (eventListener) { + return !(eventListener.type === 'medium-zoom:' + type && eventListener.listener.toString() === listener.toString()); + }); + + return zoom; + }; + + var open = function open() { + var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + target = _ref2.target; + + var _animate = function _animate() { + var container = { + width: document.documentElement.clientWidth, + height: document.documentElement.clientHeight, + left: 0, + top: 0, + right: 0, + bottom: 0 + }; + var viewportWidth = void 0; + var viewportHeight = void 0; + + if (zoomOptions.container) { + if (zoomOptions.container instanceof Object) { + // The container is given as an object with properties like width, height, left, top + container = _extends({}, container, zoomOptions.container); + + // We need to adjust custom options like container.right or container.bottom + viewportWidth = container.width - container.left - container.right - zoomOptions.margin * 2; + viewportHeight = container.height - container.top - container.bottom - zoomOptions.margin * 2; + } else { + // The container is given as an element + var zoomContainer = isNode(zoomOptions.container) ? zoomOptions.container : document.querySelector(zoomOptions.container); + + var _zoomContainer$getBou = zoomContainer.getBoundingClientRect(), + _width = _zoomContainer$getBou.width, + _height = _zoomContainer$getBou.height, + _left = _zoomContainer$getBou.left, + _top = _zoomContainer$getBou.top; + + container = _extends({}, container, { + width: _width, + height: _height, + left: _left, + top: _top + }); + } + } + + viewportWidth = viewportWidth || container.width - zoomOptions.margin * 2; + viewportHeight = viewportHeight || container.height - zoomOptions.margin * 2; + + var zoomTarget = active.zoomedHd || active.original; + var naturalWidth = isSvg(zoomTarget) ? viewportWidth : zoomTarget.naturalWidth || viewportWidth; + var naturalHeight = isSvg(zoomTarget) ? viewportHeight : zoomTarget.naturalHeight || viewportHeight; + + var _zoomTarget$getBoundi = zoomTarget.getBoundingClientRect(), + top = _zoomTarget$getBoundi.top, + left = _zoomTarget$getBoundi.left, + width = _zoomTarget$getBoundi.width, + height = _zoomTarget$getBoundi.height; + + var scaleX = Math.min(naturalWidth, viewportWidth) / width; + var scaleY = Math.min(naturalHeight, viewportHeight) / height; + var scale = Math.min(scaleX, scaleY); + var translateX = (-left + (viewportWidth - width) / 2 + zoomOptions.margin + container.left) / scale; + var translateY = (-top + (viewportHeight - height) / 2 + zoomOptions.margin + container.top) / scale; + var transform = 'scale(' + scale + ') translate3d(' + translateX + 'px, ' + translateY + 'px, 0)'; + + active.zoomed.style.transform = transform; + + if (active.zoomedHd) { + active.zoomedHd.style.transform = transform; + } + }; + + return new Promise(function (resolve) { + if (target && images.indexOf(target) === -1) { + resolve(zoom); + return; + } + + var _handleOpenEnd = function _handleOpenEnd() { + isAnimating = false; + active.zoomed.removeEventListener('transitionend', _handleOpenEnd); + active.original.dispatchEvent(createCustomEvent('medium-zoom:opened', { + detail: { zoom: zoom } + })); + + resolve(zoom); + }; + + if (active.zoomed) { + resolve(zoom); + return; + } + + if (target) { + // The zoom was triggered manually via a click + active.original = target; + } else if (images.length > 0) { + var _images = images; + active.original = _images[0]; + } else { + resolve(zoom); + return; + } + + active.original.dispatchEvent(createCustomEvent('medium-zoom:open', { + detail: { zoom: zoom } + })); + + scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; + isAnimating = true; + active.zoomed = cloneTarget(active.original); + + document.body.appendChild(overlay); + + if (zoomOptions.template) { + var template = isNode(zoomOptions.template) ? zoomOptions.template : document.querySelector(zoomOptions.template); + active.template = document.createElement('div'); + active.template.appendChild(template.content.cloneNode(true)); + + document.body.appendChild(active.template); + } + + document.body.appendChild(active.zoomed); + + window.requestAnimationFrame(function () { + document.body.classList.add('medium-zoom--opened'); + }); + + active.original.classList.add('medium-zoom-image--hidden'); + active.zoomed.classList.add('medium-zoom-image--opened'); + + active.zoomed.addEventListener('click', close); + active.zoomed.addEventListener('transitionend', _handleOpenEnd); + + if (active.original.getAttribute('data-zoom-src')) { + active.zoomedHd = active.zoomed.cloneNode(); + + // Reset the `scrset` property or the HD image won't load. + active.zoomedHd.removeAttribute('srcset'); + active.zoomedHd.removeAttribute('sizes'); + + active.zoomedHd.src = active.zoomed.getAttribute('data-zoom-src'); + + active.zoomedHd.onerror = function () { + clearInterval(getZoomTargetSize); + console.warn('Unable to reach the zoom image target ' + active.zoomedHd.src); + active.zoomedHd = null; + _animate(); + }; + + // We need to access the natural size of the full HD + // target as fast as possible to compute the animation. + var getZoomTargetSize = setInterval(function () { + if ( active.zoomedHd.complete) { + clearInterval(getZoomTargetSize); + active.zoomedHd.classList.add('medium-zoom-image--opened'); + active.zoomedHd.addEventListener('click', close); + document.body.appendChild(active.zoomedHd); + _animate(); + } + }, 10); + } else if (active.original.hasAttribute('srcset')) { + // If an image has a `srcset` attribuet, we don't know the dimensions of the + // zoomed (HD) image (like when `data-zoom-src` is specified). + // Therefore the approach is quite similar. + active.zoomedHd = active.zoomed.cloneNode(); + + // Resetting the sizes attribute tells the browser to load the + // image best fitting the current viewport size, respecting the `srcset`. + active.zoomedHd.removeAttribute('sizes'); + + // In Firefox, the `loading` attribute needs to be set to `eager` (default + // value) for the load event to be fired. + active.zoomedHd.removeAttribute('loading'); + + // Wait for the load event of the hd image. This will fire if the image + // is already cached. + var loadEventListener = active.zoomedHd.addEventListener('load', function () { + active.zoomedHd.removeEventListener('load', loadEventListener); + active.zoomedHd.classList.add('medium-zoom-image--opened'); + active.zoomedHd.addEventListener('click', close); + document.body.appendChild(active.zoomedHd); + _animate(); + }); + } else { + _animate(); + } + }); + }; + + var close = function close() { + return new Promise(function (resolve) { + if (isAnimating || !active.original) { + resolve(zoom); + return; + } + + var _handleCloseEnd = function _handleCloseEnd() { + active.original.classList.remove('medium-zoom-image--hidden'); + document.body.removeChild(active.zoomed); + if (active.zoomedHd) { + document.body.removeChild(active.zoomedHd); + } + document.body.removeChild(overlay); + active.zoomed.classList.remove('medium-zoom-image--opened'); + if (active.template) { + document.body.removeChild(active.template); + } + + isAnimating = false; + active.zoomed.removeEventListener('transitionend', _handleCloseEnd); + + active.original.dispatchEvent(createCustomEvent('medium-zoom:closed', { + detail: { zoom: zoom } + })); + + active.original = null; + active.zoomed = null; + active.zoomedHd = null; + active.template = null; + + resolve(zoom); + }; + + isAnimating = true; + document.body.classList.remove('medium-zoom--opened'); + active.zoomed.style.transform = ''; + + if (active.zoomedHd) { + active.zoomedHd.style.transform = ''; + } + + // Fade out the template so it's not too abrupt + if (active.template) { + active.template.style.transition = 'opacity 150ms'; + active.template.style.opacity = 0; + } + + active.original.dispatchEvent(createCustomEvent('medium-zoom:close', { + detail: { zoom: zoom } + })); + + active.zoomed.addEventListener('transitionend', _handleCloseEnd); + }); + }; + + var toggle = function toggle() { + var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + target = _ref3.target; + + if (active.original) { + return close(); + } + + return open({ target: target }); + }; + + var getOptions = function getOptions() { + return zoomOptions; + }; + + var getImages = function getImages() { + return images; + }; + + var getZoomedImage = function getZoomedImage() { + return active.original; + }; + + var images = []; + var eventListeners = []; + var isAnimating = false; + var scrollTop = 0; + var zoomOptions = options; + var active = { + original: null, + zoomed: null, + zoomedHd: null, + template: null + + // If the selector is omitted, it's replaced by the options + };if (Object.prototype.toString.call(selector) === '[object Object]') { + zoomOptions = selector; + } else if (selector || typeof selector === 'string' // to process empty string as a selector + ) { + attach(selector); + } + + // Apply the default option values + zoomOptions = _extends({ + margin: 0, + background: '#fff', + scrollOffset: 40, + container: null, + template: null + }, zoomOptions); + + var overlay = createOverlay(zoomOptions.background); + + document.addEventListener('click', _handleClick); + document.addEventListener('keyup', _handleKeyUp); + document.addEventListener('scroll', _handleScroll); + window.addEventListener('resize', close); + + var zoom = { + open: open, + close: close, + toggle: toggle, + update: update, + clone: clone, + attach: attach, + detach: detach, + on: on, + off: off, + getOptions: getOptions, + getImages: getImages, + getZoomedImage: getZoomedImage + }; + + return zoom; + }; + + function styleInject(css, ref) { + if ( ref === void 0 ) { ref = {}; } + var insertAt = ref.insertAt; + + if (!css || typeof document === 'undefined') { return; } + + var head = document.head || document.getElementsByTagName('head')[0]; + var style = document.createElement('style'); + style.type = 'text/css'; + + if (insertAt === 'top') { + if (head.firstChild) { + head.insertBefore(style, head.firstChild); + } else { + head.appendChild(style); + } + } else { + head.appendChild(style); + } + + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(document.createTextNode(css)); + } + } + + var css = ".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}"; + styleInject(css); + + /* eslint-disable no-unused-vars */ + + var matchesSelector = + Element.prototype.matches || + Element.prototype.webkitMatchesSelector || + Element.prototype.msMatchesSelector; + + function install(hook) { + var zoom; + + hook.doneEach(function (_) { + var elms = Array.apply( + null, + document.querySelectorAll( + '.markdown-section img:not(.emoji):not([data-no-zoom])' + ) + ); + + elms = elms.filter(function (elm) { return matchesSelector.call(elm, 'a img') === false; }); + + if (zoom) { + zoom.detach(); + } + + zoom = mediumZoom(elms); + }); + } + + $docsify.plugins = [].concat(install, $docsify.plugins); + + }()); \ No newline at end of file diff --git a/docs/_src/prismjs/prism-applescript.min.js b/docs/_src/prismjs/prism-applescript.min.js new file mode 100644 index 00000000..57635ecf --- /dev/null +++ b/docs/_src/prismjs/prism-applescript.min.js @@ -0,0 +1 @@ +Prism.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class-name":/\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,punctuation:/[{}():,¬«»《》]/}; \ No newline at end of file diff --git a/docs/_src/prismjs/prism-bash.min.js b/docs/_src/prismjs/prism-bash.min.js new file mode 100644 index 00000000..5d6986f1 --- /dev/null +++ b/docs/_src/prismjs/prism-bash.min.js @@ -0,0 +1 @@ +!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],s=a.variable[1].inside,i=0;i|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/docs/_src/prismjs/prism-json.min.js b/docs/_src/prismjs/prism-json.min.js new file mode 100644 index 00000000..4256f820 --- /dev/null +++ b/docs/_src/prismjs/prism-json.min.js @@ -0,0 +1 @@ +Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json; \ No newline at end of file diff --git a/docs/_src/source.txt b/docs/_src/source.txt new file mode 100644 index 00000000..d256dd72 --- /dev/null +++ b/docs/_src/source.txt @@ -0,0 +1,10 @@ +https://cdn.jsdelivr.net/npm/docsify/lib/themes/vue.css +https://cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js +https://cdn.jsdelivr.net/npm/docsify/lib/plugins/search.js +https://cdn.jsdelivr.net/npm/docsify/lib/plugins/zoom-image.js +https://cdn.jsdelivr.net/npm/docsify-copy-code + +https://cdn.jsdelivr.net/npm/prismjs/components/prism-javascript.min.js +https://cdn.jsdelivr.net/npm/prismjs/components/prism-json.min.js +https://cdn.jsdelivr.net/npm/prismjs/components/prism-applescript.min.js +https://cdn.jsdelivr.net/npm/prismjs/components/prism-bash.min.js \ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 00000000..8f460c04 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,99 @@ + + + + + + + Bob + + + + + + + + + + + +Loading...+ + + + + + + + + + + + + + + + + + + + \ No newline at end of file