Browse Source

20220522

master
tianzhendong 3 years ago
parent
commit
17f0ab970e
  1. 60
      plugin/countable.js
  2. 111
      plugin/docsify-plugin-flexible-alerts.min.js
  3. 319
      plugin/docsify-tabs.js
  4. 6085
      plugin/docsify.min.js
  5. 1812
      plugin/emoji.min.js
  6. 23
      plugin/ga.min.js
  7. 19
      plugin/gitalk.min.js
  8. 23
      plugin/prism-go.js
  9. 10
      plugin/prism-matlab.js
  10. 244
      plugin/search.min.js
  11. 1284
      plugin/sewwtalert.min.css

60
plugin/countable.js

@ -0,0 +1,60 @@
//default values
var defaultOptions = {
countable: true,
position: "top",
margin: "10px",
float: "right",
fontsize: "0.9em",
color: "rgb(90,90,90)",
language: "english",
isExpected: true,
};
// Docsify plugin functions
function plugin(hook, vm) {
if (!defaultOptions.countable) {
return;
}
let wordsCount;
hook.beforeEach(function (content) {
// Match regex every time you start parsing .md
wordsCount = content.match(/([\u4e00-\u9fa5]+?|[a-zA-Z0-9]+)/g).length;
return content;
});
hook.afterEach(function (html, next) {
let str = wordsCount + " words";
let readTime = Math.ceil(wordsCount / 400) + " min";
//Determine whether to use the Chinese style according to the attribute "language"
if (defaultOptions.language === "chinese") {
str = wordsCount + " 字";
readTime = Math.ceil(wordsCount / 400) + " 分钟";
}
//add html string
next(
`
${defaultOptions.position === "bottom" ? html : ""}
<div style="margin-${defaultOptions.position ? "bottom" : "top"}: ${
defaultOptions.margin
};">
<span style="
float: ${defaultOptions.float === "right" ? "right" : "left"};
font-size: ${defaultOptions.fontsize};
color:${defaultOptions.color};">
${str}
${defaultOptions.isExpected ? `&nbsp; | &nbsp;${readTime}` : ""}
</span>
<div style="clear: both"></div>
</div>
${defaultOptions.position !== "bottom" ? html : ""}
`
);
});
}
// Docsify plugin options
window.$docsify["count"] = Object.assign(
defaultOptions,
window.$docsify["count"]
);
window.$docsify.plugins = [].concat(plugin, window.$docsify.plugins);

111
plugin/docsify-plugin-flexible-alerts.min.js

@ -5,5 +5,114 @@
* (c) 2019 Fabian Zankl
* MIT license
*/
!function(){"use strict";function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var e;!function(t,e){void 0===e&&(e={});var o=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===o&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=t:a.appendChild(document.createTextNode(t))}}('@import url("https://use.fontawesome.com/releases/v5.6.3/css/solid.css");@import url("https://use.fontawesome.com/releases/v5.6.3/css/fontawesome.css");.alert{display:block;position:relative;word-wrap:break-word;word-break:break-word;padding:.75rem 1.25rem!important;margin-bottom:1rem!important}.alert>*{max-width:100%}.alert+.alert{margin-top:-.25rem!important}.alert:before{content:unset!important}.alert p{margin-top:.5rem;margin-bottom:.5rem}.alert i{margin-right:.5rem}.alert .title{font-weight:600;margin:0}.alert>:first-child{margin-top:0}.alert>:last-child{margin-bottom:0}.alert.callout{border:1px solid #eee;border-left-width:.25rem;border-radius:.25rem;background:#fff}.alert.callout.warning{border-left-color:#f0ad4e!important}.alert.callout.warning .title{color:#f0ad4e}.alert.callout.tip{border-left-color:#28a745!important}.alert.callout.tip .title{color:#28a745}.alert.callout.info{border-left-color:#17a2b8!important}.alert.callout.info .title{color:#17a2b8}.alert.callout.danger{border-left-color:#dc3545!important}.alert.callout.danger .title{color:#dc3545}.alert.flat{border-radius:.125rem;color:#383d41;background-color:#e2e3e5;border:1px solid #d6d8db}.alert.flat.info{color:#02587f;background-color:#cdeefd;border-color:#b8e7fc}.alert.flat.info .title{color:#01354d}.alert.flat.tip{color:#285b2a;background-color:#dbefdc;border-color:#cde9ce}.alert.flat.tip .title{color:#18381a}.alert.flat.warning{color:#852d12;background-color:#ffddd3;border-color:#ffd0c1}.alert.flat.warning .title{color:#581e0c}.alert.flat.danger{color:#7f231c;background-color:#fdd9d7;border-color:#fccac7}.alert.flat.danger .title{color:#551713}'),e={style:"callout",note:{label:"Note",icon:"fas fa-info-circle",className:"info"},tip:{label:"Tip",icon:"fas fa-lightbulb",className:"tip"},warning:{label:"Warning",icon:"fas fa-exclamation-triangle",className:"warning"},danger:{label:"Attention",icon:"fas fa-ban",className:"danger"}},window.$docsify=window.$docsify||{},window.$docsify.plugins=[].concat(function(t,b){function m(t,e,o,r){var a=(t||"").match(new RegExp("".concat(e,":(([\\s\\w\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF-]*))")));return a?r?r(a[1]):a[1]:r?r(o):o}var p=function t(e,o,r){var a=2<arguments.length&&void 0!==r?r:0;for(var l in o)try{o[l].constructor===Object&&a<1?e[l]=t(e[l],o[l],a+1):e[l]=o[l]}catch(t){e[l]=o[l]}return e}(e,b.config["flexible-alerts"]||b.config.flexibleAlerts);t.afterEach(function(t,e){e(t.replace(/<\s*blockquote[^>]*>(?:<p>|[\S\n]*)?\[!(\w*)((?:\|[\w*:[\s\w\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF-]*)*?)\]([\s\S]*?)(?:<\/p>)?<\s*\/\s*blockquote>/g,function(t,e,o,r){var a=p[e.toLowerCase()];if(!a)return t;var l=m(o,"style",p.style),n=m(o,"iconVisibility","visible",function(t){return"hidden"!==t}),c=m(o,"labelVisibility","visible",function(t){return"hidden"!==t}),i=m(o,"label",a.label),d=m(o,"icon",a.icon),s=m(o,"className",a.className);if("object"===g(i)){var f=Object.keys(i).filter(function(t){return-1<b.route.path.indexOf(t)});f&&0<f.length?i=i[f[0]]:n=c=!1}var u='<i class="'.concat(d,'"></i>');return'<div class="alert '.concat(l," ").concat(s,'">\n <p class="title">\n ').concat(n?u:"","\n ").concat(c?i:"","\n </p>\n <p>").concat(r,"</p>\n </div>")}))})},window.$docsify.plugins)}();
!(function () {
"use strict";
function g(t) {
return (g =
"function" == typeof Symbol && "symbol" == typeof Symbol.iterator
? function (t) {
return typeof t;
}
: function (t) {
return t &&
"function" == typeof Symbol &&
t.constructor === Symbol &&
t !== Symbol.prototype
? "symbol"
: typeof t;
})(t);
}
var e;
!(function (t, e) {
void 0 === e && (e = {});
var o = e.insertAt;
if (t && "undefined" != typeof document) {
var r = document.head || document.getElementsByTagName("head")[0],
a = document.createElement("style");
(a.type = "text/css"),
"top" === o && r.firstChild
? r.insertBefore(a, r.firstChild)
: r.appendChild(a),
a.styleSheet
? (a.styleSheet.cssText = t)
: a.appendChild(document.createTextNode(t));
}
})(
'@import url("https://use.fontawesome.com/releases/v5.6.3/css/solid.css");@import url("https://use.fontawesome.com/releases/v5.6.3/css/fontawesome.css");.alert{display:block;position:relative;word-wrap:break-word;word-break:break-word;padding:.75rem 1.25rem!important;margin-bottom:1rem!important}.alert>*{max-width:100%}.alert+.alert{margin-top:-.25rem!important}.alert:before{content:unset!important}.alert p{margin-top:.5rem;margin-bottom:.5rem}.alert i{margin-right:.5rem}.alert .title{font-weight:600;margin:0}.alert>:first-child{margin-top:0}.alert>:last-child{margin-bottom:0}.alert.callout{border:1px solid #eee;border-left-width:.25rem;border-radius:.25rem;background:#fff}.alert.callout.warning{border-left-color:#f0ad4e!important}.alert.callout.warning .title{color:#f0ad4e}.alert.callout.tip{border-left-color:#28a745!important}.alert.callout.tip .title{color:#28a745}.alert.callout.info{border-left-color:#17a2b8!important}.alert.callout.info .title{color:#17a2b8}.alert.callout.danger{border-left-color:#dc3545!important}.alert.callout.danger .title{color:#dc3545}.alert.flat{border-radius:.125rem;color:#383d41;background-color:#e2e3e5;border:1px solid #d6d8db}.alert.flat.info{color:#02587f;background-color:#cdeefd;border-color:#b8e7fc}.alert.flat.info .title{color:#01354d}.alert.flat.tip{color:#285b2a;background-color:#dbefdc;border-color:#cde9ce}.alert.flat.tip .title{color:#18381a}.alert.flat.warning{color:#852d12;background-color:#ffddd3;border-color:#ffd0c1}.alert.flat.warning .title{color:#581e0c}.alert.flat.danger{color:#7f231c;background-color:#fdd9d7;border-color:#fccac7}.alert.flat.danger .title{color:#551713}'
),
(e = {
style: "callout",
note: { label: "Note", icon: "fas fa-info-circle", className: "info" },
tip: { label: "Tip", icon: "fas fa-lightbulb", className: "tip" },
warning: {
label: "Warning",
icon: "fas fa-exclamation-triangle",
className: "warning",
},
danger: { label: "Attention", icon: "fas fa-ban", className: "danger" },
}),
(window.$docsify = window.$docsify || {}),
(window.$docsify.plugins = [].concat(function (t, b) {
function m(t, e, o, r) {
var a = (t || "").match(
new RegExp(
"".concat(
e,
":(([\\s\\w\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF-]*))"
)
)
);
return a ? (r ? r(a[1]) : a[1]) : r ? r(o) : o;
}
var p = (function t(e, o, r) {
var a = 2 < arguments.length && void 0 !== r ? r : 0;
for (var l in o)
try {
o[l].constructor === Object && a < 1
? (e[l] = t(e[l], o[l], a + 1))
: (e[l] = o[l]);
} catch (t) {
e[l] = o[l];
}
return e;
})(e, b.config["flexible-alerts"] || b.config.flexibleAlerts);
t.afterEach(function (t, e) {
e(
t.replace(
/<\s*blockquote[^>]*>(?:<p>|[\S\n]*)?\[!(\w*)((?:\|[\w*:[\s\w\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF-]*)*?)\]([\s\S]*?)(?:<\/p>)?<\s*\/\s*blockquote>/g,
function (t, e, o, r) {
var a = p[e.toLowerCase()];
if (!a) return t;
var l = m(o, "style", p.style),
n = m(o, "iconVisibility", "visible", function (t) {
return "hidden" !== t;
}),
c = m(o, "labelVisibility", "visible", function (t) {
return "hidden" !== t;
}),
i = m(o, "label", a.label),
d = m(o, "icon", a.icon),
s = m(o, "className", a.className);
if ("object" === g(i)) {
var f = Object.keys(i).filter(function (t) {
return -1 < b.route.path.indexOf(t);
});
f && 0 < f.length ? (i = i[f[0]]) : (n = c = !1);
}
var u = '<i class="'.concat(d, '"></i>');
return '<div class="alert '
.concat(l, " ")
.concat(
s,
'">\n <p class="title">\n '
)
.concat(n ? u : "", "\n ")
.concat(c ? i : "", "\n </p>\n <p>")
.concat(r, "</p>\n </div>");
}
)
);
});
}, window.$docsify.plugins));
})();
//# sourceMappingURL=docsify-plugin-flexible-alerts.min.js.map

319
plugin/docsify-tabs.js

@ -0,0 +1,319 @@
/*!
* docsify-tabs
* v1.5.2
* https://jhildenbiddle.github.io/docsify-tabs/
* (c) 2018-2021 John Hildenbiddle
* MIT license
*/
!(function () {
"use strict";
!(function (t, o) {
void 0 === o && (o = {});
var a = o.insertAt;
if (t && "undefined" != typeof document) {
var e = document.head || document.getElementsByTagName("head")[0],
c = document.createElement("style");
(c.type = "text/css"),
"top" === a && e.firstChild
? e.insertBefore(c, e.firstChild)
: e.appendChild(c),
c.styleSheet
? (c.styleSheet.cssText = t)
: c.appendChild(document.createTextNode(t));
}
})(
':root{--docsifytabs-border-color:#ededed;--docsifytabs-border-px:1px;--docsifytabs-border-radius-px: ;--docsifytabs-margin:1.5em 0;--docsifytabs-tab-background:#f8f8f8;--docsifytabs-tab-background--active:var(--docsifytabs-content-background);--docsifytabs-tab-color:#999;--docsifytabs-tab-color--active:inherit;--docsifytabs-tab-highlight-px:3px;--docsifytabs-tab-highlight-color:var(--theme-color,currentColor);--docsifytabs-tab-padding:0.6em 1em;--docsifytabs-content-background:inherit;--docsifytabs-content-padding:1.5rem}.docsify-tabs:before,.docsify-tabs__tab{z-index:1}.docsify-tabs__tab--active,.docsify-tabs__tab:focus{z-index:2}.docsify-tabs{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.docsify-tabs:before{-ms-flex-order:0;content:"";-ms-flex:1 1;flex:1 1;order:0}.docsify-tabs__tab{-ms-flex-order:-1;appearance:none;font-size:inherit;margin:0;order:-1;position:relative}.docsify-tabs__content{height:0;overflow:hidden;position:absolute;visibility:hidden;width:100%}.docsify-tabs__content :first-child{margin-top:0}.docsify-tabs__content :first-child~:last-child,.docsify-tabs__content :last-child{margin-bottom:0}.docsify-tabs__tab--active+.docsify-tabs__content{height:auto;overflow:auto;position:relative;visibility:visible}[class*=docsify-tabs--]{margin:1.5em 0;margin:var(--docsifytabs-margin)}[class*=docsify-tabs--] .docsify-tabs__tab{background:#f8f8f8;background:var(--docsifytabs-tab-background);color:#999;color:var(--docsifytabs-tab-color);padding:.6em 1em;padding:var(--docsifytabs-tab-padding)}[class*=docsify-tabs--] .docsify-tabs__tab--active{background:inherit;background:var(--docsifytabs-tab-background--active);color:inherit;color:var(--docsifytabs-tab-color--active)}[class*=docsify-tabs--] .docsify-tabs__content{background:inherit;background:var(--docsifytabs-content-background);padding:1.5rem;padding:var(--docsifytabs-content-padding)}.docsify-tabs--classic .docsify-tabs__content,.docsify-tabs--classic .docsify-tabs__tab,.docsify-tabs--classic:before{border-color:#ededed;border-width:1px;border:var(--docsifytabs-border-px) solid var(--docsifytabs-border-color)}.docsify-tabs--classic:before{border-left-width:0;border-right-width:0;border-top-width:0;margin-right:1px;margin-right:var(--docsifytabs-border-px)}.docsify-tabs--classic .docsify-tabs__tab:first-of-type{border-top-left-radius:var(--docsifytabs-border-radius-px)}.docsify-tabs--classic .docsify-tabs__tab:last-of-type{border-top-right-radius:var(--docsifytabs-border-radius-px)}.docsify-tabs--classic .docsify-tabs__tab~.docsify-tabs__tab{margin-left:-1px;margin-left:calc(0px - var(--docsifytabs-border-px))}.docsify-tabs--classic .docsify-tabs__tab--active{border-bottom-width:0;box-shadow:inset 0 3px 0 0 var(--theme-color,currentColor);box-shadow:inset 0 var(--docsifytabs-tab-highlight-px) 0 0 var(--docsifytabs-tab-highlight-color)}.docsify-tabs--classic .docsify-tabs__content{border-radius:0;border-radius:0 var(--docsifytabs-border-radius-px) var(--docsifytabs-border-radius-px) var(--docsifytabs-border-radius-px);border-top:0;margin-top:-1px;margin-top:calc(0px - var(--docsifytabs-border-px))}.docsify-tabs--material .docsify-tabs__tab{background:transparent;border:0;margin-bottom:2px;margin-bottom:calc(var(--docsifytabs-tab-highlight-px) - var(--docsifytabs-border-px))}.docsify-tabs--material .docsify-tabs__tab--active{background:transparent;box-shadow:0 3px 0 0 var(--theme-color,currentColor);box-shadow:0 var(--docsifytabs-tab-highlight-px) 0 0 var(--docsifytabs-tab-highlight-color)}.docsify-tabs--material .docsify-tabs__content{border-color:#ededed;border-width:1px 0;border-bottom:var(--docsifytabs-border-px) solid var(--docsifytabs-border-color);border-left:0 solid var(--docsifytabs-border-color);border-right:0 solid var(--docsifytabs-border-color);border-top:var(--docsifytabs-border-px) solid var(--docsifytabs-border-color)}',
{ insertAt: "top" }
);
var t = "tabs:replace",
o = {
tabsContainer: "content",
tabBlock: "docsify-tabs",
tabButton: "docsify-tabs__tab",
tabButtonActive: "docsify-tabs__tab--active",
tabContent: "docsify-tabs__content",
},
a = {
codeMarkup: /(```[\s\S]*?```)/gm,
commentReplaceMarkup: new RegExp("\x3c!-- ".concat(t, " (.*) --\x3e")),
tabBlockMarkup:
/[\r\n]*(\s*)(<!-+\s+tabs:\s*?start\s+-+>)[\r\n]+([\s|\S]*?)[\r\n\s]+(<!-+\s+tabs:\s*?end\s+-+>)/m,
tabCommentMarkup:
/[\r\n]*(\s*)<!-+\s+tab:\s*(.*)\s+-+>[\r\n]+([\s\S]*?)[\r\n]*\s*(?=<!-+\s+tabs?:(?!replace))/m,
tabHeadingMarkup:
/[\r\n]*(\s*)#{1,6}\s*[*_]{2}\s*(.*[^\s])\s*[*_]{2}[\r\n]+([\s\S]*?)(?=#{1,6}\s*[*_]{2}|<!-+\s+tabs:\s*?end\s+-+>)/m,
},
e = {
persist: !0,
sync: !0,
theme: "classic",
tabComments: !0,
tabHeadings: !0,
};
function c(t, o) {
if (Element.prototype.closest) return t.closest(o);
for (; t; ) {
if (r(t, o)) return t;
t = t.parentNode || null;
}
return t;
}
function r(t, o) {
return (
Element.prototype.matches ||
Element.prototype.msMatchesSelector ||
Element.prototype.webkitMatchesSelector
).call(t, o);
}
function s(t) {
var a = arguments.length > 1 && void 0 !== arguments[1] && arguments[1],
r = c(t, ".".concat(o.tabButton));
if (r) {
var n = r.getAttribute("data-tab"),
i = document.querySelector(".".concat(o.tabsContainer)),
d = r.parentNode,
b = Array.apply(null, d.querySelectorAll(".".concat(o.tabButton))),
f = d.offsetTop;
if (
(b.forEach(function (t) {
return t.classList.remove(o.tabButtonActive);
}),
r.classList.add(o.tabButtonActive),
!a)
) {
if (e.persist) {
var l = i
? Array.apply(null, i.querySelectorAll(".".concat(o.tabBlock)))
: [],
u = l.indexOf(d),
y = JSON.parse(sessionStorage.getItem(window.location.href)) || {};
(y[u] = n),
sessionStorage.setItem(window.location.href, JSON.stringify(y));
}
if (e.sync) {
var p = i
? Array.apply(
null,
i.querySelectorAll(
".".concat(o.tabButton, '[data-tab="').concat(n, '"]')
)
)
: [],
m = JSON.parse(sessionStorage.getItem("*")) || [];
p.forEach(function (t) {
s(t, !0);
}),
window.scrollBy(0, 0 - (f - d.offsetTop)),
m.indexOf(n) > 0 && m.splice(m.indexOf(n), 1),
0 !== m.indexOf(n) &&
(m.unshift(n), sessionStorage.setItem("*", JSON.stringify(m)));
}
}
}
}
function n() {
var t = decodeURIComponent(
(window.location.hash.match(/(?:id=)([^&]+)/) || [])[1]
),
a = t && ".".concat(o.tabBlock, " #").concat(t);
if (t && document.querySelector(a)) {
var e,
c = document.querySelector("#".concat(t));
if (c.closest) e = c.closest(".".concat(o.tabContent));
else
for (
e = c.parentNode;
e !== document.body && !e.classList.contains("".concat(o.tabContent));
)
e = e.parentNode;
s(e.previousElementSibling);
}
}
window &&
((window.$docsify = window.$docsify || {}),
(window.$docsify.tabs = window.$docsify.tabs || {}),
Object.keys(window.$docsify.tabs).forEach(function (t) {
Object.prototype.hasOwnProperty.call(e, t) &&
(e[t] = window.$docsify.tabs[t]);
}),
(window.$docsify.tabs.version = "1.5.2"),
(e.tabComments || e.tabHeadings) &&
(window.$docsify.plugins = [].concat(function (c, r) {
var i = !1;
c.beforeEach(function (c) {
return (
(i = a.tabBlockMarkup.test(c)) &&
(c = (function (c, r) {
for (
var s,
n,
i = c.match(a.codeMarkup) || [],
d = i.map(function (o, a) {
var e = "\x3c!-- "
.concat(t, " CODEBLOCK")
.concat(a, " --\x3e");
return (
(c = c.replace(o, function () {
return e;
})),
e
);
}),
b = e.theme
? "".concat(o.tabBlock, "--").concat(e.theme)
: "",
f = document.createElement("div"),
l = 1,
u = function () {
var i = s[0],
d = "",
u = "",
y = e.tabComments && a.tabCommentMarkup.test(i),
p = e.tabHeadings && a.tabHeadingMarkup.test(i),
m = s[1],
h = s[2],
g = s[4];
if (y || p) {
(d = "\x3c!-- "
.concat(t, ' <div class="')
.concat([o.tabBlock, b].join(" "), '"> --\x3e')),
(u = "\n"
.concat(m, "\x3c!-- ")
.concat(t, " </div> --\x3e"));
for (
var v = function () {
f.innerHTML = n[2].trim()
? r.compiler.compile(n[2]).replace(/<\/?p>/g, "")
: "Tab ".concat(l);
var a = f.innerHTML,
e = (n[3] || "").trim(),
c = (
f.textContent ||
f.firstChild.getAttribute("alt") ||
f.firstChild.getAttribute("src")
)
.trim()
.toLowerCase();
(i = i.replace(n[0], function () {
return [
"\n"
.concat(m, "\x3c!-- ")
.concat(t, ' <button class="')
.concat(o.tabButton, '" data-tab="')
.concat(c, '">')
.concat(a, "</button> --\x3e"),
"\n"
.concat(m, "\x3c!-- ")
.concat(t, ' <div class="')
.concat(o.tabContent, '" data-tab-content="')
.concat(c, '"> --\x3e'),
"\n\n".concat(m).concat(e),
"\n\n"
.concat(m, "\x3c!-- ")
.concat(t, " </div> --\x3e"),
].join("");
})),
l++;
};
null !==
(n =
(e.tabComments
? a.tabCommentMarkup.exec(i)
: null) ||
(e.tabHeadings
? a.tabHeadingMarkup.exec(i)
: null));
)
v();
}
(i = (i = i.replace(h, function () {
return d;
})).replace(g, function () {
return u;
})),
(c = c.replace(s[0], function () {
return i;
}));
};
null !== (s = a.tabBlockMarkup.exec(c));
)
u();
return (
d.forEach(function (t, o) {
c = c.replace(t, function () {
return i[o];
});
}),
c
);
})(c, r)),
c
);
}),
c.afterEach(function (t, o) {
i &&
(t = (function (t) {
for (
var o,
e = function () {
var a = o[0],
e = o[1] || "";
t = t.replace(a, function () {
return e;
});
};
null !== (o = a.commentReplaceMarkup.exec(t));
)
e();
return t;
})(t)),
o(t);
}),
c.doneEach(function () {
var t, a, c, r;
i &&
((a = (t = document.querySelector(".".concat(o.tabsContainer)))
? Array.apply(null, t.querySelectorAll(".".concat(o.tabBlock)))
: []),
(c =
JSON.parse(sessionStorage.getItem(window.location.href)) || {}),
(r = JSON.parse(sessionStorage.getItem("*")) || []),
n(),
a.forEach(function (t, a) {
var s = t.querySelector(".".concat(o.tabButtonActive));
s ||
(e.sync &&
r.length &&
(s = r
.map(function (a) {
return t.querySelector(
".".concat(o.tabButton, '[data-tab="').concat(a, '"]')
);
})
.filter(function (t) {
return t;
})[0]),
!s &&
e.persist &&
(s = t.querySelector(
".".concat(o.tabButton, '[data-tab="').concat(c[a], '"]')
)),
(s = s || t.querySelector(".".concat(o.tabButton))) &&
s.classList.add(o.tabButtonActive));
}));
}),
c.mounted(function () {
var t = document.querySelector(".".concat(o.tabsContainer));
t &&
t.addEventListener("click", function (t) {
s(t.target);
}),
window.addEventListener("hashchange", n, !1);
});
}, window.$docsify.plugins || [])));
})();
//# sourceMappingURL=docsify-tabs.min.js.map

6085
plugin/docsify.min.js

File diff suppressed because one or more lines are too long

1812
plugin/emoji.min.js

File diff suppressed because it is too large

23
plugin/ga.min.js

@ -0,0 +1,23 @@
!(function () {
function n(n) {
var o;
((o = document.createElement("script")).async = !0),
(o.src = "https://www.google-analytics.com/analytics.js"),
document.body.appendChild(o),
(window.ga =
window.ga ||
function () {
(window.ga.q = window.ga.q || []).push(arguments);
}),
(window.ga.l = Number(new Date())),
window.ga("create", n, "auto");
}
function o() {
window.ga || n($docsify.ga),
window.ga("set", "page", location.hash),
window.ga("send", "pageview");
}
$docsify.plugins = [].concat(function (n) {
$docsify.ga ? n.beforeEach(o) : console.error("[Docsify] ga is required.");
}, $docsify.plugins);
})();

19
plugin/gitalk.min.js

@ -0,0 +1,19 @@
$docsify.plugins = [].concat(function (i) {
var e = Docsify.dom;
i.mounted(function (i) {
var n = e.create("div");
n.id = "gitalk-container";
var t = e.getNode("#main");
(n.style = "width: " + t.clientWidth + "px; margin: 0 auto 20px;"),
e.appendTo(e.find(".content"), n);
}),
i.doneEach(function (i) {
for (
var n = document.getElementById("gitalk-container");
n.hasChildNodes();
)
n.removeChild(n.firstChild);
gitalk.render("gitalk-container");
});
}, $docsify.plugins);

23
plugin/prism-go.js

@ -0,0 +1,23 @@
(Prism.languages.go = Prism.languages.extend("clike", {
string: {
pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,
lookbehind: !0,
greedy: !0,
},
keyword:
/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,
boolean: /\b(?:_|false|iota|nil|true)\b/,
number: [
/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,
/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,
/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i,
],
operator:
/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,
builtin:
/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/,
})),
Prism.languages.insertBefore("go", "string", {
char: { pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/, greedy: !0 },
}),
delete Prism.languages.go["class-name"];

10
plugin/prism-matlab.js

@ -0,0 +1,10 @@
Prism.languages.matlab = {
comment: [/%\{[\s\S]*?\}%/, /%.+/],
string: { pattern: /\B'(?:''|[^'\r\n])*'/, greedy: !0 },
number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,
keyword:
/\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/,
function: /\b(?!\d)\w+(?=\s*\()/,
operator: /\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,
punctuation: /\.{3}|[.,;\[\](){}!]/,
};

244
plugin/search.min.js

@ -1 +1,243 @@
!function(){"use strict";function e(e){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};return String(e).replace(/[&<>"'\/]/g,function(e){return n[e]})}function n(e){var n=[];return h.dom.findAll("a:not([data-nosearch])").map(function(t){var o=t.href,i=t.getAttribute("href"),r=e.parse(o).path;r&&-1===n.indexOf(r)&&!Docsify.util.isAbsolutePath(i)&&n.push(r)}),n}function t(e){localStorage.setItem("docsify.search.expires",Date.now()+e),localStorage.setItem("docsify.search.index",JSON.stringify(g))}function o(e,n,t,o){void 0===n&&(n="");var i,r=window.marked.lexer(n),a=window.Docsify.slugify,s={};return r.forEach(function(n){if("heading"===n.type&&n.depth<=o)i=t.toURL(e,{id:a(n.text)}),s[i]={slug:i,title:n.text,body:""};else{if(!i)return;s[i]?s[i].body?s[i].body+="\n"+(n.text||""):s[i].body=n.text:s[i]={slug:i,title:"",body:""}}}),a.clear(),s}function i(n){var t=[],o=[];Object.keys(g).forEach(function(e){o=o.concat(Object.keys(g[e]).map(function(n){return g[e][n]}))}),n=n.trim();var i=n.split(/[\s\-\,\\\/]+/);1!==i.length&&(i=[].concat(n,i));for(var r=0;r<o.length;r++)!function(n){var r=o[n],a=!1,s="",c=r.title&&r.title.trim(),l=r.body&&r.body.trim(),f=r.slug||"";if(c&&l&&(i.forEach(function(n,t){var o=new RegExp(n,"gi"),i=-1,r=-1;if(i=c&&c.search(o),r=l&&l.search(o),i<0&&r<0)a=!1;else{a=!0,r<0&&(r=0);var f=0,d=0;f=r<11?0:r-10,d=0===f?70:r+n.length+60,d>l.length&&(d=l.length);var p="..."+e(l).substring(f,d).replace(o,'<em class="search-keyword">'+n+"</em>")+"...";s+=p}}),a)){var d={title:e(c),content:s,url:f};t.push(d)}}(r);return t}function r(e,i){h=Docsify;var r="auto"===e.paths,a=localStorage.getItem("docsify.search.expires")<Date.now();if(g=JSON.parse(localStorage.getItem("docsify.search.index")),a)g={};else if(!r)return;var s=r?n(i.router):e.paths,c=s.length,l=0;s.forEach(function(n){if(g[n])return l++;h.get(i.router.getFile(n)).then(function(r){g[n]=o(n,r,i.router,e.depth),c===++l&&t(e.maxAge)})})}function a(){Docsify.dom.style("\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 .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: 7px;\n line-height: 22px;\n font-size: 14px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\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}")}function s(e,n){void 0===n&&(n="");var t='<input type="search" value="'+n+'" /><div class="results-panel"></div></div>',o=Docsify.dom.create("div",t),i=Docsify.dom.find("aside");Docsify.dom.toggleClass(o,"search"),Docsify.dom.before(i,o)}function c(e){var n=Docsify.dom.find("div.search"),t=Docsify.dom.find(n,".results-panel");if(!e)return t.classList.remove("show"),void(t.innerHTML="");var o=i(e),r="";o.forEach(function(e){r+='<div class="matching-post">\n<a href="'+e.url+'"> \n<h2>'+e.title+"</h2>\n<p>"+e.content+"</p>\n</a>\n</div>"}),t.classList.add("show"),t.innerHTML=r||'<p class="empty">'+y+"</p>"}function l(){var e,n=Docsify.dom.find("div.search"),t=Docsify.dom.find(n,"input");Docsify.dom.on(n,"click",function(e){return"A"!==e.target.tagName&&e.stopPropagation()}),Docsify.dom.on(t,"input",function(n){clearTimeout(e),e=setTimeout(function(e){return c(n.target.value.trim())},100)})}function f(e,n){var t=Docsify.dom.getNode('.search input[type="search"]');if(t)if("string"==typeof e)t.placeholder=e;else{var o=Object.keys(e).filter(function(e){return n.indexOf(e)>-1})[0];t.placeholder=e[o]}}function d(e,n){if("string"==typeof e)y=e;else{var t=Object.keys(e).filter(function(e){return n.indexOf(e)>-1})[0];y=e[t]}}function p(e,n){var t=n.router.parse().query.s;a(),s(e,t),l(),t&&setTimeout(function(e){return c(t)},500)}function u(e,n){f(e.placeholder,n.route.path),d(e.noData,n.route.path)}var h,g={},y="",m={placeholder:"Type to search",noData:"No Results!",paths:"auto",depth:2,maxAge:864e5},v=function(e,n){var t=Docsify.util,o=n.config.search||m;Array.isArray(o)?m.paths=o:"object"==typeof o&&(m.paths=Array.isArray(o.paths)?o.paths:"auto",m.maxAge=t.isPrimitive(o.maxAge)?o.maxAge:m.maxAge,m.placeholder=o.placeholder||m.placeholder,m.noData=o.noData||m.noData,m.depth=o.depth||m.depth);var i="auto"===m.paths;e.mounted(function(e){p(m,n),!i&&r(m,n)}),e.doneEach(function(e){u(m,n),i&&r(m,n)})};$docsify.plugins=[].concat(v,$docsify.plugins)}();
!(function () {
"use strict";
function e(e) {
var n = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&#39;",
"/": "&#x2F;",
};
return String(e).replace(/[&<>"'\/]/g, function (e) {
return n[e];
});
}
function n(e) {
var n = [];
return (
h.dom.findAll("a:not([data-nosearch])").map(function (t) {
var o = t.href,
i = t.getAttribute("href"),
r = e.parse(o).path;
r &&
-1 === n.indexOf(r) &&
!Docsify.util.isAbsolutePath(i) &&
n.push(r);
}),
n
);
}
function t(e) {
localStorage.setItem("docsify.search.expires", Date.now() + e),
localStorage.setItem("docsify.search.index", JSON.stringify(g));
}
function o(e, n, t, o) {
void 0 === n && (n = "");
var i,
r = window.marked.lexer(n),
a = window.Docsify.slugify,
s = {};
return (
r.forEach(function (n) {
if ("heading" === n.type && n.depth <= o)
(i = t.toURL(e, { id: a(n.text) })),
(s[i] = { slug: i, title: n.text, body: "" });
else {
if (!i) return;
s[i]
? s[i].body
? (s[i].body += "\n" + (n.text || ""))
: (s[i].body = n.text)
: (s[i] = { slug: i, title: "", body: "" });
}
}),
a.clear(),
s
);
}
function i(n) {
var t = [],
o = [];
Object.keys(g).forEach(function (e) {
o = o.concat(
Object.keys(g[e]).map(function (n) {
return g[e][n];
})
);
}),
(n = n.trim());
var i = n.split(/[\s\-\,\\\/]+/);
1 !== i.length && (i = [].concat(n, i));
for (var r = 0; r < o.length; r++)
!(function (n) {
var r = o[n],
a = !1,
s = "",
c = r.title && r.title.trim(),
l = r.body && r.body.trim(),
f = r.slug || "";
if (
c &&
l &&
(i.forEach(function (n, t) {
var o = new RegExp(n, "gi"),
i = -1,
r = -1;
if (
((i = c && c.search(o)), (r = l && l.search(o)), i < 0 && r < 0)
)
a = !1;
else {
(a = !0), r < 0 && (r = 0);
var f = 0,
d = 0;
(f = r < 11 ? 0 : r - 10),
(d = 0 === f ? 70 : r + n.length + 60),
d > l.length && (d = l.length);
var p =
"..." +
e(l)
.substring(f, d)
.replace(o, '<em class="search-keyword">' + n + "</em>") +
"...";
s += p;
}
}),
a)
) {
var d = { title: e(c), content: s, url: f };
t.push(d);
}
})(r);
return t;
}
function r(e, i) {
h = Docsify;
var r = "auto" === e.paths,
a = localStorage.getItem("docsify.search.expires") < Date.now();
if (((g = JSON.parse(localStorage.getItem("docsify.search.index"))), a))
g = {};
else if (!r) return;
var s = r ? n(i.router) : e.paths,
c = s.length,
l = 0;
s.forEach(function (n) {
if (g[n]) return l++;
h.get(i.router.getFile(n)).then(function (r) {
(g[n] = o(n, r, i.router, e.depth)), c === ++l && t(e.maxAge);
});
});
}
function a() {
Docsify.dom.style(
"\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 .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: 7px;\n line-height: 22px;\n font-size: 14px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\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}"
);
}
function s(e, n) {
void 0 === n && (n = "");
var t =
'<input type="search" value="' +
n +
'" /><div class="results-panel"></div></div>',
o = Docsify.dom.create("div", t),
i = Docsify.dom.find("aside");
Docsify.dom.toggleClass(o, "search"), Docsify.dom.before(i, o);
}
function c(e) {
var n = Docsify.dom.find("div.search"),
t = Docsify.dom.find(n, ".results-panel");
if (!e) return t.classList.remove("show"), void (t.innerHTML = "");
var o = i(e),
r = "";
o.forEach(function (e) {
r +=
'<div class="matching-post">\n<a href="' +
e.url +
'"> \n<h2>' +
e.title +
"</h2>\n<p>" +
e.content +
"</p>\n</a>\n</div>";
}),
t.classList.add("show"),
(t.innerHTML = r || '<p class="empty">' + y + "</p>");
}
function l() {
var e,
n = Docsify.dom.find("div.search"),
t = Docsify.dom.find(n, "input");
Docsify.dom.on(n, "click", function (e) {
return "A" !== e.target.tagName && e.stopPropagation();
}),
Docsify.dom.on(t, "input", function (n) {
clearTimeout(e),
(e = setTimeout(function (e) {
return c(n.target.value.trim());
}, 100));
});
}
function f(e, n) {
var t = Docsify.dom.getNode('.search input[type="search"]');
if (t)
if ("string" == typeof e) t.placeholder = e;
else {
var o = Object.keys(e).filter(function (e) {
return n.indexOf(e) > -1;
})[0];
t.placeholder = e[o];
}
}
function d(e, n) {
if ("string" == typeof e) y = e;
else {
var t = Object.keys(e).filter(function (e) {
return n.indexOf(e) > -1;
})[0];
y = e[t];
}
}
function p(e, n) {
var t = n.router.parse().query.s;
a(),
s(e, t),
l(),
t &&
setTimeout(function (e) {
return c(t);
}, 500);
}
function u(e, n) {
f(e.placeholder, n.route.path), d(e.noData, n.route.path);
}
var h,
g = {},
y = "",
m = {
placeholder: "Type to search",
noData: "No Results!",
paths: "auto",
depth: 2,
maxAge: 864e5,
},
v = function (e, n) {
var t = Docsify.util,
o = n.config.search || m;
Array.isArray(o)
? (m.paths = o)
: "object" == typeof o &&
((m.paths = Array.isArray(o.paths) ? o.paths : "auto"),
(m.maxAge = t.isPrimitive(o.maxAge) ? o.maxAge : m.maxAge),
(m.placeholder = o.placeholder || m.placeholder),
(m.noData = o.noData || m.noData),
(m.depth = o.depth || m.depth));
var i = "auto" === m.paths;
e.mounted(function (e) {
p(m, n), !i && r(m, n);
}),
e.doneEach(function (e) {
u(m, n), i && r(m, n);
});
};
$docsify.plugins = [].concat(v, $docsify.plugins);
})();

1284
plugin/sewwtalert.min.css

File diff suppressed because it is too large
Loading…
Cancel
Save