diff --git a/build/release.sh b/build/release.sh
index aa33a751..c388bc36 100644
--- a/build/release.sh
+++ b/build/release.sh
@@ -12,7 +12,7 @@ echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Releasing $VERSION ..."
- npm run lint
+ npm run test
# build
VERSION=$VERSION npm run build
@@ -29,8 +29,8 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
# commit
git add -A
- git commit -m "[build] $VERSION"
- npm version $VERSION --message "[release] $VERSION"
+ git commit -m "[build] $VERSION $RELEASE_TAG"
+ npm version $VERSION --message "[release] $VERSION $RELEASE_TAG"
# publish
git push origin refs/tags/v$VERSION
diff --git a/lib/docsify.js b/lib/docsify.js
index 7cf70183..7a0444d2 100644
--- a/lib/docsify.js
+++ b/lib/docsify.js
@@ -253,323 +253,108 @@ var dom = Object.freeze({
toggleClass: toggleClass
});
-var UA = window.navigator.userAgent.toLowerCase();
+var inBrowser = typeof window !== 'undefined';
-var isIE = UA && /msie|trident/.test(UA);
+var isMobile = inBrowser && document.body.clientWidth <= 600;
-var isMobile = document.body.clientWidth <= 600;
-
-var decode = decodeURIComponent;
-var encode = encodeURIComponent;
-
-function parseQuery (query) {
- var res = {};
-
- query = query.trim().replace(/^(\?|#|&)/, '');
-
- if (!query) {
- return res
- }
-
- // Simple parse
- query.split('&').forEach(function (param) {
- var parts = param.replace(/\+/g, ' ').split('=');
-
- res[parts[0]] = decode(parts[1]);
- });
- return res
-}
-
-function stringifyQuery (obj) {
- var qs = [];
-
- for (var key in obj) {
- qs.push(((encode(key)) + "=" + (encode(obj[key]))).toLowerCase());
- }
-
- return qs.length ? ("?" + (qs.join('&'))) : ''
-}
-
-var getBasePath = cached(function (base) {
- return /^(\/|https?:)/g.test(base)
- ? base
- : cleanPath(window.location.pathname + '/' + base)
-});
-
-function getPath () {
- var args = [], len = arguments.length;
- while ( len-- ) args[ len ] = arguments[ len ];
-
- return cleanPath(args.join('/'))
-}
-
-var isAbsolutePath = cached(function (path) {
- return /(:|(\/{2}))/.test(path)
-});
-
-var getParentPath = cached(function (path) {
- return /\/$/g.test(path)
- ? path
- : (path = path.match(/(\S*\/)[^\/]+$/))
- ? path[1]
- : ''
-});
-
-var cleanPath = cached(function (path) {
- return path
- .replace(/^\/+/, '/')
- .replace(/([^:])\/{2,}/g, '$1/')
-});
-
-function replaceHash (path) {
- var i = window.location.href.indexOf('#');
- window.location.replace(
- window.location.href.slice(0, i >= 0 ? i : 0) + '#' + path
- );
-}
-
-var replaceSlug = cached(function (path) {
- return path
- .replace('#', '?id=')
- // .replace(/\?(\w+)=/g, (_, slug) => slug === 'id' ? '?id=' : `&${slug}=`)
-});
/**
- * Normalize the current url
- *
- * @example
- * domain.com/docs/ => domain.com/docs/#/
- * domain.com/docs/#/#slug => domain.com/docs/#/?id=slug
+ * @see https://github.com/MoOx/pjax/blob/master/lib/is-supported.js
*/
-function normalize () {
- var path = getHash();
+var supportsPushState = inBrowser && (function () {
+ // Borrowed wholesale from https://github.com/defunkt/jquery-pjax
+ return window.history &&
+ window.history.pushState &&
+ window.history.replaceState &&
+ // pushState isn’t reliable on iOS until 5.
+ !navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/)
+})();
- path = replaceSlug(path);
+/**
+ * Render github corner
+ * @param {Object} data
+ * @return {String}
+ */
+function corner (data) {
+ if (!data) { return '' }
+ if (!/\/\//.test(data)) { data = 'https://github.com/' + data; }
+ data = data.replace(/^git\+/, '');
- if (path.charAt(0) === '/') { return replaceHash(path) }
- replaceHash('/' + path);
-}
-
-function getHash () {
- // We can't use window.location.hash here because it's not
- // consistent across browsers - Firefox will pre-decode it!
- var href = window.location.href;
- var index = href.indexOf('#');
- return index === -1 ? '' : href.slice(index + 1)
+ return (
+ "" +
+ '' +
+ '')
}
/**
- * Parse the url
- * @param {string} [path=window.location.herf]
- * @return {object} { path, query }
+ * Render main content
*/
-function parse (path) {
- if ( path === void 0 ) path = window.location.href;
+function main (config) {
+ var aside = (
+ '' +
+ '');
- var query = '';
-
- var queryIndex = path.indexOf('?');
- if (queryIndex >= 0) {
- query = path.slice(queryIndex + 1);
- path = path.slice(0, queryIndex);
- }
-
- var hashIndex = path.indexOf('#');
- if (hashIndex) {
- path = path.slice(hashIndex + 1);
- }
-
- return { path: path, query: parseQuery(query) }
+ return (isMobile ? (aside + "") : ("" + aside)) +
+ '' +
+ ''
}
/**
- * to URL
- * @param {string} path
- * @param {object} qs query params
- * @param {string} currentRoute optional current route
+ * Cover Page
*/
-function toURL (path, params, currentRoute) {
- var local = currentRoute && path[0] === '#';
- var route = parse(replaceSlug(path));
+function cover () {
+ var SL = ', 100%, 85%';
+ var bgc = 'linear-gradient(to left bottom, ' +
+ "hsl(" + (Math.floor(Math.random() * 255) + SL) + ") 0%," +
+ "hsl(" + (Math.floor(Math.random() * 255) + SL) + ") 100%)";
- route.query = merge({}, route.query, params);
- path = route.path + stringifyQuery(route.query);
- path = path.replace(/\.md(\?)|\.md$/, '$1');
-
- if (local) { path = currentRoute + path; }
-
- return cleanPath('#/' + path)
+ return "'
}
-
-var route = Object.freeze({
- normalize: normalize,
- getHash: getHash,
- parse: parse,
- toURL: toURL,
- parseQuery: parseQuery,
- stringifyQuery: stringifyQuery,
- getBasePath: getBasePath,
- getPath: getPath,
- isAbsolutePath: isAbsolutePath,
- getParentPath: getParentPath,
- cleanPath: cleanPath
-});
-
-var title = $.title;
/**
- * Toggle button
+ * Render tree
+ * @param {Array} tree
+ * @param {String} tpl
+ * @return {String}
*/
-function btn (el) {
- var toggle = function (_) { return body.classList.toggle('close'); };
+function tree (toc, tpl) {
+ if ( tpl === void 0 ) tpl = '';
- el = getNode(el);
- on(el, 'click', function (e) {
- e.stopPropagation();
- toggle();
+ if (!toc || !toc.length) { return '' }
+
+ toc.forEach(function (node) {
+ tpl += "" + (node.title) + "";
+ if (node.children) {
+ tpl += "" + (tree(node.children)) + "
";
+ }
});
- var sidebar = getNode('.sidebar');
-
- isMobile && on(body, 'click', function (_) { return body.classList.contains('close') && toggle(); }
- );
- on(sidebar, 'click', function (_) { return setTimeout((function (_) { return getAndActive(sidebar, true, true); }, 0)); }
- );
+ return tpl
}
-function sticky () {
- var cover = getNode('section.cover');
- if (!cover) { return }
- var coverHeight = cover.getBoundingClientRect().height;
-
- if (window.pageYOffset >= coverHeight || cover.classList.contains('hidden')) {
- toggleClass(body, 'add', 'sticky');
- } else {
- toggleClass(body, 'remove', 'sticky');
- }
+function helper (className, content) {
+ return ("" + (content.slice(5).trim()) + "
")
}
-/**
- * Get and active link
- * @param {string|element} el
- * @param {Boolean} isParent acitve parent
- * @param {Boolean} autoTitle auto set title
- * @return {element}
- */
-function getAndActive (el, isParent, autoTitle) {
- el = getNode(el);
-
- var links = findAll(el, 'a');
- var hash = '#' + getHash();
- var target;
-
- links
- .sort(function (a, b) { return b.href.length - a.href.length; })
- .forEach(function (a) {
- var href = a.getAttribute('href');
- var node = isParent ? a.parentNode : a;
-
- if (hash.indexOf(href) === 0 && !target) {
- target = a;
- toggleClass(node, 'add', 'active');
- } else {
- toggleClass(node, 'remove', 'active');
- }
- });
-
- if (autoTitle) {
- $.title = target ? ((target.innerText) + " - " + title) : title;
- }
-
- return target
-}
-
-var nav = {};
-var hoverOver = false;
-
-function highlight () {
- var sidebar = getNode('.sidebar');
- var anchors = findAll('.anchor');
- var wrap = find(sidebar, '.sidebar-nav');
- var active = find(sidebar, 'li.active');
- var top = body.scrollTop;
- var last;
-
- for (var i = 0, len = anchors.length; i < len; i += 1) {
- var node = anchors[i];
-
- if (node.offsetTop > top) {
- if (!last) { last = node; }
- break
- } else {
- last = node;
- }
- }
- if (!last) { return }
- var li = nav[last.getAttribute('data-id')];
-
- if (!li || li === active) { return }
-
- active && active.classList.remove('active');
- li.classList.add('active');
- active = li;
-
- // scroll into view
- // https://github.com/vuejs/vuejs.org/blob/master/themes/vue/source/js/common.js#L282-L297
- if (!hoverOver && body.classList.contains('sticky')) {
- var height = sidebar.clientHeight;
- var curOffset = 0;
- var cur = active.offsetTop + active.clientHeight + 40;
- var isInView = (
- active.offsetTop >= wrap.scrollTop &&
- cur <= wrap.scrollTop + height
- );
- var notThan = cur - curOffset < height;
- var top$1 = isInView
- ? wrap.scrollTop
- : notThan
- ? curOffset
- : cur - height;
-
- sidebar.scrollTop = top$1;
- }
-}
-
-function scrollActiveSidebar () {
- if (isMobile) { return }
-
- var sidebar = getNode('.sidebar');
- var lis = findAll(sidebar, 'li');
-
- for (var i = 0, len = lis.length; i < len; i += 1) {
- var li = lis[i];
- var a = li.querySelector('a');
- if (!a) { continue }
- var href = a.getAttribute('href');
-
- if (href !== '/') {
- href = parse(href).query.id;
- }
-
- nav[decodeURIComponent(href)] = li;
- }
-
- off('scroll', highlight);
- on('scroll', highlight);
- on(sidebar, 'mouseover', function () { hoverOver = true; });
- on(sidebar, 'mouseleave', function () { hoverOver = false; });
-}
-
-function scrollIntoView (id) {
- var section = find('#' + id);
- section && section.scrollIntoView();
-}
-
-var scrollEl = $.scrollingElement || $.documentElement;
-
-function scroll2Top (offset) {
- if ( offset === void 0 ) offset = 0;
-
- scrollEl.scrollTop = offset === true ? 0 : Number(offset);
+function theme (color) {
+ return ("")
}
var barEl;
@@ -707,93 +492,44 @@ var cssVars = function (color) {
});
};
-/**
- * Render github corner
- * @param {Object} data
- * @return {String}
- */
-function corner (data) {
- if (!data) { return '' }
- if (!/\/\//.test(data)) { data = 'https://github.com/' + data; }
- data = data.replace(/^git\+/, '');
+var RGX = /([^{]*?)\w(?=\})/g;
- return (
- "" +
- '' +
- '')
-}
+var dict = {
+ YYYY: 'getFullYear',
+ YY: 'getYear',
+ MM: function (d) {
+ return d.getMonth() + 1;
+ },
+ DD: 'getDate',
+ HH: 'getHours',
+ mm: 'getMinutes',
+ ss: 'getSeconds'
+};
-/**
- * Render main content
- */
-function main (config) {
- var aside = (
- '' +
- '');
+var tinydate = function (str) {
+ var parts=[], offset=0;
+ str.replace(RGX, function (key, _, idx) {
+ // save preceding string
+ parts.push(str.substring(offset, idx - 1));
+ offset = idx += key.length + 1;
+ // save function
+ parts.push(function(d){
+ return ('00' + (typeof dict[key]==='string' ? d[dict[key]]() : dict[key](d))).slice(-key.length);
+ });
+ });
- return (isMobile ? (aside + "") : ("" + aside)) +
- '' +
- ''
-}
+ if (offset !== str.length) {
+ parts.push(str.substring(offset));
+ }
-/**
- * Cover Page
- */
-function cover () {
- var SL = ', 100%, 85%';
- var bgc = 'linear-gradient(to left bottom, ' +
- "hsl(" + (Math.floor(Math.random() * 255) + SL) + ") 0%," +
- "hsl(" + (Math.floor(Math.random() * 255) + SL) + ") 100%)";
-
- return "'
-}
-
-/**
- * Render tree
- * @param {Array} tree
- * @param {String} tpl
- * @return {String}
- */
-function tree (toc, tpl) {
- if ( tpl === void 0 ) tpl = '';
-
- if (!toc || !toc.length) { return '' }
-
- toc.forEach(function (node) {
- tpl += "" + (node.title) + "";
- if (node.children) {
- tpl += "" + (tree(node.children)) + "
";
- }
- });
-
- return tpl
-}
-
-function helper (className, content) {
- return ("" + (content.slice(5).trim()) + "
")
-}
-
-function theme (color) {
- return ("")
-}
+ return function (arg) {
+ var out='', i=0, d=arg||new Date();
+ for (; i]*?>[\s\S]+?<\/(pre|template|code)>/g, function (m) { return m.replace(/:/g, '__colon__'); })
- .replace(/:(\w+?):/ig, window.emojify || replace)
+ .replace(/:(\w+?):/ig, (inBrowser && window.emojify) || replace)
.replace(/__colon__/g, ':')
}
-var markdownCompiler = marked;
-var contentBase = '';
-var currentPath = '';
-var linkTarget = '_blank';
-var renderer = new marked.Renderer();
-var cacheTree = {};
-var toc = [];
+var decode = decodeURIComponent;
+var encode = encodeURIComponent;
-/**
- * Compile markdown content
- */
-var markdown = cached(function (text) {
- var html = '';
+function parseQuery (query) {
+ var res = {};
- if (!text) { return text }
+ query = query.trim().replace(/^(\?|#|&)/, '');
- html = markdownCompiler(text);
- html = emojify(html);
- slugify.clear();
+ if (!query) {
+ return res
+ }
- return html
+ // Simple parse
+ query.split('&').forEach(function (param) {
+ var parts = param.replace(/\+/g, ' ').split('=');
+
+ res[parts[0]] = decode(parts[1]);
+ });
+ return res
+}
+
+function stringifyQuery (obj) {
+ var qs = [];
+
+ for (var key in obj) {
+ qs.push(((encode(key)) + "=" + (encode(obj[key]))).toLowerCase());
+ }
+
+ return qs.length ? ("?" + (qs.join('&'))) : ''
+}
+
+var getBasePath = cached(function (base) {
+ if ( base === void 0 ) base = '';
+
+ // TODO
+ var path = inBrowser ? window.location.pathname : '';
+
+ return /^(\/|https?:)/g.test(base)
+ ? base
+ : cleanPath(path + '/' + base)
});
-markdown.renderer = renderer;
+function getPath () {
+ var args = [], len = arguments.length;
+ while ( len-- ) args[ len ] = arguments[ len ];
-markdown.init = function (config, ref) {
- if ( config === void 0 ) config = {};
- var base = ref.base; if ( base === void 0 ) base = window.location.pathname;
- var externalLinkTarget = ref.externalLinkTarget;
+ return cleanPath(args.join('/'))
+}
- contentBase = getBasePath(base);
- linkTarget = externalLinkTarget || linkTarget;
+var isAbsolutePath = cached(function (path) {
+ return /(:|(\/{2}))/.test(path)
+});
- if (isFn(config)) {
- markdownCompiler = config(marked, renderer);
+var getParentPath = cached(function (path) {
+ return /\/$/g.test(path)
+ ? path
+ : (path = path.match(/(\S*\/)[^\/]+$/))
+ ? path[1]
+ : ''
+});
+
+var cleanPath = cached(function (path) {
+ return path
+ .replace(/^\/+/, '/')
+ .replace(/([^:])\/{2,}/g, '$1/')
+});
+
+var Compiler = function Compiler (config, router) {
+ this.config = config;
+ this.router = router;
+ this.cacheTree = {};
+ this.toc = [];
+ this.linkTarget = config.externalLinkTarget || '_blank';
+ this.contentBase = getBasePath(config.basePath);
+
+ var renderer = this._initRenderer();
+ var compile;
+ var mdConf = config.markdown || {};
+
+ if (isFn(mdConf)) {
+ compile = mdConf(marked, renderer);
} else {
- renderer = merge(renderer, config.renderer);
- marked.setOptions(merge(config, { renderer: renderer }));
+ marked.setOptions(merge(mdConf, {
+ renderer: merge(renderer, mdConf.renderer)
+ }));
+ compile = marked;
}
+
+ this.compile = cached(function (text) {
+ var html = '';
+
+ if (!text) { return text }
+
+ html = compile(text);
+ html = config.noEmoji ? html : emojify(html);
+ slugify.clear();
+
+ return html
+ });
};
-markdown.update = function () {
- currentPath = parse().path;
-};
+Compiler.prototype._initRenderer = function _initRenderer () {
+ var renderer = new marked.Renderer();
+ var ref = this;
+ var linkTarget = ref.linkTarget;
+ var router = ref.router;
+ var toc = ref.toc;
+ var contentBase = ref.contentBase;
+ /**
+ * render anchor tag
+ * @link https://github.com/chjj/marked#overriding-renderer-methods
+ */
+ renderer.heading = function (text, level) {
+ var nextToc = { level: level, title: text };
-/**
- * render anchor tag
- * @link https://github.com/chjj/marked#overriding-renderer-methods
- */
-renderer.heading = function (text, level) {
- var nextToc = { level: level, title: text };
+ if (/{docsify-ignore}/g.test(text)) {
+ text = text.replace('{docsify-ignore}', '');
+ nextToc.title = text;
+ nextToc.ignoreSubHeading = true;
+ }
- if (/{docsify-ignore}/g.test(text)) {
- text = text.replace('{docsify-ignore}', '');
- nextToc.title = text;
- nextToc.ignoreSubHeading = true;
- }
+ if (/{docsify-ignore-all}/g.test(text)) {
+ text = text.replace('{docsify-ignore-all}', '');
+ nextToc.title = text;
+ nextToc.ignoreAllSubs = true;
+ }
- if (/{docsify-ignore-all}/g.test(text)) {
- text = text.replace('{docsify-ignore-all}', '');
- nextToc.title = text;
- nextToc.ignoreAllSubs = true;
- }
+ var slug = slugify(text);
+ var url = router.toURL(router.getCurrentPath(), { id: slug });
+ nextToc.slug = url;
+ toc.push(nextToc);
- var slug = slugify(text);
- var url = toURL(currentPath, { id: slug });
- nextToc.slug = url;
- toc.push(nextToc);
+ return ("" + text + "")
+ };
+ // highlight code
+ renderer.code = function (code, lang) {
+ if ( lang === void 0 ) lang = '';
- return ("" + text + "")
-};
-// highlight code
-renderer.code = function (code, lang) {
- if ( lang === void 0 ) lang = '';
+ var hl = prism.highlight(code, prism.languages[lang] || prism.languages.markup);
- var hl = prism.highlight(code, prism.languages[lang] || prism.languages.markup);
+ return ("" + hl + "
")
+ };
+ renderer.link = function (href, title, text) {
+ var blank = '';
+ if (!/:|(\/{2})/.test(href)) {
+ href = router.toURL(href, null, router.getCurrentPath());
+ } else {
+ blank = " target=\"" + linkTarget + "\"";
+ }
+ if (title) {
+ title = " title=\"" + title + "\"";
+ }
+ return ("" + text + "")
+ };
+ renderer.paragraph = function (text) {
+ if (/^!>/.test(text)) {
+ return helper('tip', text)
+ } else if (/^\?>/.test(text)) {
+ return helper('warn', text)
+ }
+ return ("" + text + "
")
+ };
+ renderer.image = function (href, title, text) {
+ var url = href;
+ var titleHTML = title ? (" title=\"" + title + "\"") : '';
- return ("" + hl + "
")
-};
-renderer.link = function (href, title, text) {
- var blank = '';
- if (!/:|(\/{2})/.test(href)) {
- href = toURL(href, null, currentPath);
- } else {
- blank = " target=\"" + linkTarget + "\"";
- }
- if (title) {
- title = " title=\"" + title + "\"";
- }
- return ("" + text + "")
-};
-renderer.paragraph = function (text) {
- if (/^!>/.test(text)) {
- return helper('tip', text)
- } else if (/^\?>/.test(text)) {
- return helper('warn', text)
- }
- return ("" + text + "
")
-};
-renderer.image = function (href, title, text) {
- var url = href;
- var titleHTML = title ? (" title=\"" + title + "\"") : '';
+ if (!isAbsolutePath(href)) {
+ url = getPath(contentBase, href);
+ }
- if (!isAbsolutePath(href)) {
- url = getPath(contentBase, href);
- }
+ return ("
")
+ };
- return ("
")
+ return renderer
};
/**
* Compile sidebar
*/
-function sidebar (text, level) {
+Compiler.prototype.sidebar = function sidebar (text, level) {
+ var currentPath = this.router.getCurrentPath();
var html = '';
if (text) {
- html = markdown(text);
- html = html.match(/]*>([\s\S]+)<\/ul>/g)[0];
+ html = this.compile(text);
+ html = html && html.match(/]*>([\s\S]+)<\/ul>/g)[0];
} else {
- var tree$$1 = cacheTree[currentPath] || genTree(toc, level);
+ var tree$$1 = this.cacheTree[currentPath] || genTree(this.toc, level);
html = tree(tree$$1, '');
- cacheTree[currentPath] = tree$$1;
+ this.cacheTree[currentPath] = tree$$1;
}
return html
-}
+};
/**
* Compile sub sidebar
*/
-function subSidebar (el, level) {
- if (el) {
- toc[0] && toc[0].ignoreAllSubs && (toc = []);
- toc[0] && toc[0].level === 1 && toc.shift();
- toc.forEach(function (node, i) {
- node.ignoreSubHeading && toc.splice(i, 1);
- });
- var tree$$1 = cacheTree[currentPath] || genTree(toc, level);
- el.parentNode.innerHTML += tree(tree$$1, '
"+a(e.message+"",!0)+"
";throw e}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:l,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:l,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:l,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=s(p.item,"gm")(/bull/g,p.bullet)(),p.list=s(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=s(p.blockquote)("def",p.def)(),p._tag="(?!(?: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",p.html=s(p.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,p._tag)(),p.paragraph=s(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=u({},p),p.gfm=u({},p.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),p.gfm.paragraph=s(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=u({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=p,t.lex=function(e,n){return new t(n).lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var r,i,a,o,s,l,u,c,g,h=this,e=e.replace(/^ +$/gm,"");e;)if((a=h.rules.newline.exec(e))&&(e=e.substring(a[0].length),a[0].length>1&&h.tokens.push({type:"space"})),a=h.rules.code.exec(e))e=e.substring(a[0].length),a=a[0].replace(/^ {4}/gm,""),h.tokens.push({type:"code",text:h.options.pedantic?a:a.replace(/\n+$/,"")});else if(a=h.rules.fences.exec(e))e=e.substring(a[0].length),h.tokens.push({type:"code",lang:a[2],text:a[3]||""});else if(a=h.rules.heading.exec(e))e=e.substring(a[0].length),h.tokens.push({type:"heading",depth:a[1].length,text:a[2]});else if(t&&(a=h.rules.nptable.exec(e))){for(e=e.substring(a[0].length),l={type:"table",header:a[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:a[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:a[3].replace(/\n$/,"").split("\n")},c=0;c ?/gm,""),h.token(a,t,!0),h.tokens.push({type:"blockquote_end"});else if(a=h.rules.list.exec(e)){for(e=e.substring(a[0].length),o=a[2],h.tokens.push({type:"list_start",ordered:o.length>1}),a=a[0].match(h.rules.item),r=!1,g=a.length,c=0;c1&&s.length>1||(e=a.slice(c+1).join("\n")+e,c=g-1)),i=r||/\n\n(?!\s*$)/.test(l),c!==g-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),h.tokens.push({type:i?"loose_item_start":"list_item_start"}),h.token(l,!1,n),h.tokens.push({type:"list_item_end"});h.tokens.push({type:"list_end"})}else if(a=h.rules.html.exec(e))e=e.substring(a[0].length),h.tokens.push({type:h.options.sanitize?"paragraph":"html",pre:!h.options.sanitizer&&("pre"===a[1]||"script"===a[1]||"style"===a[1]),text:a[0]});else if(!n&&t&&(a=h.rules.def.exec(e)))e=e.substring(a[0].length),h.tokens.links[a[1].toLowerCase()]={href:a[2],title:a[3]};else if(t&&(a=h.rules.table.exec(e))){for(e=e.substring(a[0].length),l={type:"table",header:a[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:a[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:a[3].replace(/(?: *\| *)?\n$/,"").split("\n")},c=0;c])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:l,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:l,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,g.link=s(g.link)("inside",g._inside)("href",g._href)(),g.reflink=s(g.reflink)("inside",g._inside)(),g.normal=u({},g),g.pedantic=u({},g.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),g.gfm=u({},g.normal,{escape:s(g.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(g.text)("]|","~]|")("|","|https?://|")()}),g.breaks=u({},g.gfm,{br:s(g.br)("{2,}","*")(),text:s(g.gfm.text)("{2,}","*")()}),n.rules=g,n.output=function(e,t,r){return new n(t,r).output(e)},n.prototype.output=function(e){for(var t,n,r,i,o=this,s="";e;)if(i=o.rules.escape.exec(e))e=e.substring(i[0].length),s+=i[1];else if(i=o.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?o.mangle(i[1].substring(7)):o.mangle(i[1]),r=o.mangle("mailto:")+n):(n=a(i[1]),r=n),s+=o.renderer.link(r,null,n);else if(o.inLink||!(i=o.rules.url.exec(e))){if(i=o.rules.tag.exec(e))!o.inLink&&/^/i.test(i[0])&&(o.inLink=!1),e=e.substring(i[0].length),s+=o.options.sanitize?o.options.sanitizer?o.options.sanitizer(i[0]):a(i[0]):i[0];else if(i=o.rules.link.exec(e))e=e.substring(i[0].length),o.inLink=!0,s+=o.outputLink(i,{href:i[2],title:i[3]}),o.inLink=!1;else if((i=o.rules.reflink.exec(e))||(i=o.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=o.links[t.toLowerCase()])||!t.href){s+=i[0].charAt(0),e=i[0].substring(1)+e;continue}o.inLink=!0,s+=o.outputLink(i,t),o.inLink=!1}else if(i=o.rules.strong.exec(e))e=e.substring(i[0].length),s+=o.renderer.strong(o.output(i[2]||i[1]));else if(i=o.rules.em.exec(e))e=e.substring(i[0].length),s+=o.renderer.em(o.output(i[2]||i[1]));else if(i=o.rules.code.exec(e))e=e.substring(i[0].length),s+=o.renderer.codespan(a(i[2],!0));else if(i=o.rules.br.exec(e))e=e.substring(i[0].length),s+=o.renderer.br();else if(i=o.rules.del.exec(e))e=e.substring(i[0].length),s+=o.renderer.del(o.output(i[1]));else if(i=o.rules.text.exec(e))e=e.substring(i[0].length),s+=o.renderer.text(a(o.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=a(i[1]),r=n,s+=o.renderer.link(r,null,n);return s},n.prototype.outputLink=function(e,t){var n=a(t.href),r=t.title?a(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,a(e[1]))},n.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i.5&&(t="x"+t.toString(16)),n+=""+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?''+(n?e:a(e,!0))+"\n
\n":""+(n?e:a(e,!0))+"\n
"},r.prototype.blockquote=function(e){return"\n"+e+"
\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+""+n+">\n"},r.prototype.listitem=function(e){return""+e+"\n"},r.prototype.paragraph=function(e){return""+e+"
\n"},r.prototype.table=function(e,t){return"\n"},r.prototype.tablerow=function(e){return"\n"+e+"
\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+""+n+">\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
":"
"},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(o(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var i='"+n+""},r.prototype.image=function(e,t,n){var r='
":">"},r.prototype.text=function(e){return e},i.parse=function(e,t,n){return new i(t,n).parse(e)},i.prototype.parse=function(e){var t=this;this.inline=new n(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var r="";this.next();)r+=t.tok();return r},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.prototype.parseText=function(){for(var e=this,t=this.token.text;"text"===this.peek().type;)t+="\n"+e.next().text;return this.inline.output(t)},i.prototype.tok=function(){var e=this;switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,n,r,i,a="",o="";for(r="",t=0;te.length)break e;if(!(y instanceof i)){c.lastIndex=0;var k=c.exec(y),w=1;if(!k&&h&&v!=a.length-1){if(c.lastIndex=b,!(k=c.exec(e)))break;for(var x=k.index+(g?k[1].length:0),_=k.index+k[0].length,L=v,S=b,C=a.length;L=S&&(++v,b=S);if(a[v]instanceof i||a[L-1].greedy)continue;w=L-v,y=e.slice(b,S),k.index-=b}if(k){g&&(d=k[1].length);var x=k.index+d,k=k[0].slice(d),_=x+k.length,$=y.slice(0,x),E=y.slice(_),T=[v,w];$&&T.push($);var A=new i(s,p?r.tokenize(k,p):k,f,k,h);T.push(A),E&&T.push(E),Array.prototype.splice.apply(a,T)}}}}}return a},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var i,a=0;i=n[a++];)i(t)}}},i=r.Token=function(e,t,n,r,i){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!i};if(i.stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===r.util.type(e))return e.map(function(n){return i.stringify(n,t,e)}).join("");var a={type:e.type,content:i.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if("comment"==a.type&&(a.attributes.spellcheck="true"),e.alias){var o="Array"===r.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(a.classes,o)}r.hooks.run("wrap",a);var s=Object.keys(a.attributes).map(function(e){return e+'="'+(a.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+(s?" "+s:"")+">"+a.content+""+a.tag+">"},!t.document)return t.addEventListener?(t.addEventListener("message",function(e){var n=JSON.parse(e.data),i=n.language,a=n.code,o=n.immediateClose;t.postMessage(r.highlight(a,r.languages[i],i)),o&&t.close()},!1),t.Prism):t.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(r.filename=a.src,document.addEventListener&&!a.hasAttribute("data-manual")&&("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(r.highlightAll):window.setTimeout(r.highlightAll,16):document.addEventListener("DOMContentLoaded",r.highlightAll))),t.Prism}();e.exports&&(e.exports=n),void 0!==He&&(He.Prism=n),n.languages.markup={comment://,prolog:/<\?[\w\W]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/?[\da-z]{1,8};/i},n.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),n.languages.xml=n.languages.markup,n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:{pattern:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},n.languages.css.atrule.inside.rest=n.util.clone(n.languages.css),n.languages.markup&&(n.languages.insertBefore("markup","tag",{style:{pattern:/("}function w(){var e=c("div");e.classList.add("progress"),u(ce,e),oe=e}function x(e,t){void 0===t&&(t=!1);var r=new XMLHttpRequest,i=function(){r.addEventListener.apply(r,arguments)},o=me[e];return o?{then:function(e){return e(o.content,o.opt)},abort:n}:(r.open("GET",e),r.send(),{then:function(o,a){if(void 0===a&&(a=n),t){var s=setInterval(function(e){return fe({step:Math.floor(5*Math.random()+1)})},500);i("progress",fe),i("loadend",function(e){fe(e),clearInterval(s)})}i("error",a),i("load",function(t){var n=t.target;if(n.status>=400)a(n);else{var i=me[e]={content:n.response,opt:{updatedAt:r.getResponseHeader("last-modified")}};o(i.content,i.opt)}})},abort:function(e){return 4!==r.readyState&&r.abort()}})}function _(e,t){e.innerHTML=e.innerHTML.replace(/var\(\s*--theme-color.*?\)/g,t)}function S(e,t){return t={exports:{}},e(t,t.exports),t.exports}function L(e,t){var n=[],r={};return e.forEach(function(e){var i=e.level||1,o=i-1;i>t||(r[o]?r[o].children=(r[o].children||[]).concat(e):n.push(e),r[i]=e)}),n}function C(e){if("string"!=typeof e)return"";var t=e.toLowerCase().trim().replace(/<[^>\d]+>/g,"").replace(Se,"").replace(/\s/g,"-").replace(/-+/g,"-").replace(/^(\d)/,"_$1"),n=_e[t];return n=_e.hasOwnProperty(t)?n+1:0,_e[t]=n,n&&(t=t+"-"+n),t}function E(e,t){return'
'}function $(e){return e.replace(/<(pre|template|code)[^>]*?>[\s\S]+?<\/(pre|template|code)>/g,function(e){return e.replace(/:/g,"__colon__")}).replace(/:(\w+?):/gi,he&&window.emojify||E).replace(/__colon__/g,":")}function T(e){var t={};return(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach(function(e){var n=e.replace(/\+/g," ").split("=");t[n[0]]=Le(n[1])}),t):t}function A(e){var t=[];for(var n in e)t.push((Ce(n)+"="+Ce(e[n])).toLowerCase());return t.length?"?"+t.join("&"):""}function P(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Ae(e.join("/"))}function O(e,t){var n=function(e){return ce.classList.toggle("close")};e=a(e),h(e,"click",function(e){e.stopPropagation(),n()});var r=a(".sidebar");ge&&h(ce,"click",function(e){return ce.classList.contains("close")&&n()}),h(r,"click",function(e){return setTimeout(0)})}function j(){var e=a("section.cover");if(e){var t=e.getBoundingClientRect().height;window.pageYOffset>=t||e.classList.contains("hidden")?d(ce,"add","sticky"):d(ce,"remove","sticky")}}function M(e,t,n,r){t=a(t);var i,o=l(t,"a"),s=e.toURL(e.getCurrentPath());return o.sort(function(e,t){return t.href.length-e.href.length}).forEach(function(e){var t=e.getAttribute("href"),r=n?e.parentNode:e;0!==s.indexOf(t)||i?d(r,"remove","active"):(i=e,d(r,"add","active"))}),r&&(le.title=i?i.innerText+" - "+Oe:Oe),i}function q(){for(var e,t=a(".sidebar"),n=l(".anchor"),r=s(t,".sidebar-nav"),i=s(t,"li.active"),o=ce.scrollTop,c=0,u=n.length;co){e||(e=p);break}e=p}if(e){var h=je[e.getAttribute("data-id")];if(h&&h!==i&&(i&&i.classList.remove("active"),h.classList.add("active"),i=h,!Me&&ce.classList.contains("sticky"))){var g=t.clientHeight,d=i.offsetTop+i.clientHeight+40,f=i.offsetTop>=r.scrollTop&&d<=r.scrollTop+g,m=d-0script").filter(function(e){return!/template/.test(e.type)})[0];if(!e)return!1;var t=e.innerText.trim();if(!t)return!1;setTimeout(function(e){window.__EXECUTE_RESULT__=new Function(t)()},0)}function z(e,t,n){return t="function"==typeof n?n(t):"string"==typeof n?be(n)(new Date(t)):t,e.replace(/{docsify-updated}/g,t)}function I(e){e||(e="not found"),this._renderTo(".markdown-section",e),!this.config.loadSidebar&&this._renderSidebar(),!1===this.config.executeScript||void 0===window.Vue||F()?this.config.executeScript&&F():setTimeout(function(e){var t=window.__EXECUTE_RESULT__;t&&t.$destroy&&t.$destroy(),window.__EXECUTE_RESULT__=(new window.Vue).$mount("#main")},0)}function D(e){var n=a(".app-name-link"),r=e.config.nameLink,i=e.route.path;if(n)if(t(e.config.nameLink))n.setAttribute("href",r);else if("object"==typeof r){var o=Object.keys(r).filter(function(e){return i.indexOf(e)>-1})[0];n.setAttribute("href",r[o])}}function W(e){var t=e.config;e.compiler=new Pe(t,e.router);var n=t.el||"#app",r=s("nav")||c("nav"),i=s(n),o="",a=ce;i?(t.repo&&(o+=f(t.repo)),t.coverpage&&(o+=v()),o+=m(t),e._renderTo(i,o,!0)):e.rendered=!0,t.mergeNavbar&&ge?a=s(".sidebar"):(r.classList.add("app-nav"),t.repo||r.classList.add("no-badge")),p(a,r),t.themeColor&&(le.head.innerHTML+=k(t.themeColor),ve(t.themeColor)),d(ce,"ready")}function B(e,t){return t[e]?B(t[e],t):e}function U(e){return/\.(md|html)$/g.test(e)?e:/\/$/g.test(e)?e+"README.md":e+".md"}function Y(e){var t=location.href.indexOf("#");location.replace(location.href.slice(0,t>=0?t:0)+"#"+e)}function G(e){var t,n=e.config,r=n.routerMode||"hash";t="history"===r&&de?new Fe(n):new He(n),e.router=t,t.normalize(),ze=e.route=t.parse(),e._updateRender(),t.onchange(function(n){if(t.normalize(),e.route=t.parse(),e._updateRender(),ze.path===e.route.path)return void e.$resetEvents();e.$fetch(),ze=e.route})}function V(e){O("button.sidebar-toggle",e.router),e.config.coverpage?!ge&&h("scroll",j):ce.classList.add("sticky")}function X(e,t,n,r,i){e=i?e:e.replace(/\/$/,""),(e=Te(e))&&x(r.router.getFile(e+t)).then(n,function(i){return X(e,t,n,r)})}function Z(e){var t=e.config,n=t.loadSidebar;if(e.rendered){var r=M(e.router,".sidebar-nav",!0,!0);n&&r&&(r.parentNode.innerHTML+=window.__SUB_SIDEBAR__),e._bindEventOnRendered(r),e._fetchCover(),e.$resetEvents(),o(e,"doneEach"),o(e,"ready")}else e.$fetch(function(t){return o(e,"ready")})}function J(e){[].concat(e.config.plugins).forEach(function(t){return r(t)&&t(e._lifecycle,e)})}function Q(){this._init()}var K=e(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),ee=Object.assign||function(e){for(var t=arguments,n=Object.prototype.hasOwnProperty,r=1;r80?80:t):t=Math.floor(n/r*100),oe.style.opacity=1,oe.style.width=t>=95?"100%":t+"%",t>=95&&(clearTimeout(ae),ae=setTimeout(function(e){oe.style.opacity=0,oe.style.width="0%"},200))},me={},ve=function(e){if(!(window.CSS&&window.CSS.supports&&window.CSS.supports("(--v:red)"))){var t=l("style:not(.inserted),link");[].forEach.call(t,function(t){if("STYLE"===t.nodeName)_(t,e);else if("LINK"===t.nodeName){var n=t.getAttribute("href");if(!/\.css$/.test(n))return;x(n).then(function(t){var n=c("style",t);ue.appendChild(n),_(n,e)})}})}},ye={YYYY:"getFullYear",YY:"getYear",MM:function(e){return e.getMonth()+1},DD:"getDate",HH:"getHours",mm:"getMinutes",ss:"getSeconds"},be=function(e){var t=[],n=0;return e.replace(/([^{]*?)\w(?=\})/g,function(r,i,o){t.push(e.substring(n,o-1)),n=o+=r.length+1,t.push(function(e){return("00"+("string"==typeof ye[r]?e[ye[r]]():ye[r](e))).slice(-r.length)})}),n!==e.length&&t.push(e.substring(n)),function(e){for(var n="",r=0,i=e||new Date;r/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function s(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=i.source||i,i=i.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,i),n):new RegExp(e,t)}}function l(){}function c(e){for(var t,n,r=arguments,i=1;iAn error occured:"+o(e.message+"",!0)+"
";throw e}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:l,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:l,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:l,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=s(p.item,"gm")(/bull/g,p.bullet)(),p.list=s(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=s(p.blockquote)("def",p.def)(),p._tag="(?!(?: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",p.html=s(p.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,p._tag)(),p.paragraph=s(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=c({},p),p.gfm=c({},p.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),p.gfm.paragraph=s(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=c({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=p,t.lex=function(e,n){return new t(n).lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var r,i,o,a,s,l,c,u,h,g=this,e=e.replace(/^ +$/gm,"");e;)if((o=g.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&g.tokens.push({type:"space"})),o=g.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),g.tokens.push({type:"code",text:g.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=g.rules.fences.exec(e))e=e.substring(o[0].length),g.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=g.rules.heading.exec(e))e=e.substring(o[0].length),g.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=g.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},u=0;u ?/gm,""),g.token(o,t,!0),g.tokens.push({type:"blockquote_end"});else if(o=g.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],g.tokens.push({type:"list_start",ordered:a.length>1}),o=o[0].match(g.rules.item),r=!1,h=o.length,u=0;u1&&s.length>1||(e=o.slice(u+1).join("\n")+e,u=h-1)),i=r||/\n\n(?!\s*$)/.test(l),u!==h-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),g.tokens.push({type:i?"loose_item_start":"list_item_start"}),g.token(l,!1,n),g.tokens.push({type:"list_item_end"});g.tokens.push({type:"list_end"})}else if(o=g.rules.html.exec(e))e=e.substring(o[0].length),g.tokens.push({type:g.options.sanitize?"paragraph":"html",pre:!g.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=g.rules.def.exec(e)))e=e.substring(o[0].length),g.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=g.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:l,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:l,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,h.link=s(h.link)("inside",h._inside)("href",h._href)(),h.reflink=s(h.reflink)("inside",h._inside)(),h.normal=c({},h),h.pedantic=c({},h.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),h.gfm=c({},h.normal,{escape:s(h.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(h.text)("]|","~]|")("|","|https?://|")()}),h.breaks=c({},h.gfm,{br:s(h.br)("{2,}","*")(),text:s(h.gfm.text)("{2,}","*")()}),n.rules=h,n.output=function(e,t,r){return new n(t,r).output(e)},n.prototype.output=function(e){for(var t,n,r,i,a=this,s="";e;)if(i=a.rules.escape.exec(e))e=e.substring(i[0].length),s+=i[1];else if(i=a.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?a.mangle(i[1].substring(7)):a.mangle(i[1]),r=a.mangle("mailto:")+n):(n=o(i[1]),r=n),s+=a.renderer.link(r,null,n);else if(a.inLink||!(i=a.rules.url.exec(e))){if(i=a.rules.tag.exec(e))!a.inLink&&/^/i.test(i[0])&&(a.inLink=!1),e=e.substring(i[0].length),s+=a.options.sanitize?a.options.sanitizer?a.options.sanitizer(i[0]):o(i[0]):i[0];else if(i=a.rules.link.exec(e))e=e.substring(i[0].length),a.inLink=!0,s+=a.outputLink(i,{href:i[2],title:i[3]}),a.inLink=!1;else if((i=a.rules.reflink.exec(e))||(i=a.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=a.links[t.toLowerCase()])||!t.href){s+=i[0].charAt(0),e=i[0].substring(1)+e;continue}a.inLink=!0,s+=a.outputLink(i,t),a.inLink=!1}else if(i=a.rules.strong.exec(e))e=e.substring(i[0].length),s+=a.renderer.strong(a.output(i[2]||i[1]));else if(i=a.rules.em.exec(e))e=e.substring(i[0].length),s+=a.renderer.em(a.output(i[2]||i[1]));else if(i=a.rules.code.exec(e))e=e.substring(i[0].length),s+=a.renderer.codespan(o(i[2],!0));else if(i=a.rules.br.exec(e))e=e.substring(i[0].length),s+=a.renderer.br();else if(i=a.rules.del.exec(e))e=e.substring(i[0].length),s+=a.renderer.del(a.output(i[1]));else if(i=a.rules.text.exec(e))e=e.substring(i[0].length),s+=a.renderer.text(o(a.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=o(i[1]),r=n,s+=a.renderer.link(r,null,n);return s},n.prototype.outputLink=function(e,t){var n=o(t.href),r=t.title?o(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,o(e[1]))},n.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i.5&&(t="x"+t.toString(16)),n+=""+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?''+(n?e:o(e,!0))+"\n
\n":""+(n?e:o(e,!0))+"\n
"},r.prototype.blockquote=function(e){return"\n"+e+"
\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return"\n"},r.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},r.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+""+n+">\n"},r.prototype.listitem=function(e){return""+e+"\n"},r.prototype.paragraph=function(e){return""+e+"
\n"},r.prototype.table=function(e,t){return"\n"},r.prototype.tablerow=function(e){return"\n"+e+"
\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">")+e+""+n+">\n"},r.prototype.strong=function(e){return""+e+""},r.prototype.em=function(e){return""+e+""},r.prototype.codespan=function(e){return""+e+""},r.prototype.br=function(){return this.options.xhtml?"
":"
"},r.prototype.del=function(e){return""+e+""},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(a(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var i='"+n+""},r.prototype.image=function(e,t,n){var r='
":">"},r.prototype.text=function(e){return e},i.parse=function(e,t,n){return new i(t,n).parse(e)},i.prototype.parse=function(e){var t=this;this.inline=new n(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var r="";this.next();)r+=t.tok();return r},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.prototype.parseText=function(){for(var e=this,t=this.token.text;"text"===this.peek().type;)t+="\n"+e.next().text;return this.inline.output(t)},i.prototype.tok=function(){var e=this;switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var t,n,r,i,o="",a="";for(r="",t=0;te.length)break e;if(!(b instanceof i)){u.lastIndex=0;var k=u.exec(b),w=1;if(!k&&g&&v!=o.length-1){if(u.lastIndex=y,!(k=u.exec(e)))break;for(var x=k.index+(h?k[1].length:0),_=k.index+k[0].length,S=v,L=y,C=o.length;S=L&&(++v,y=L);if(o[v]instanceof i||o[S-1].greedy)continue;w=S-v,b=e.slice(y,L),k.index-=y
+}if(k){h&&(d=k[1].length);var x=k.index+d,k=k[0].slice(d),_=x+k.length,E=b.slice(0,x),$=b.slice(_),T=[v,w];E&&T.push(E);var A=new i(s,p?r.tokenize(k,p):k,f,k,g);T.push(A),$&&T.push($),Array.prototype.splice.apply(o,T)}}}}}return o},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var i,o=0;i=n[o++];)i(t)}}},i=r.Token=function(e,t,n,r,i){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!i};if(i.stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===r.util.type(e))return e.map(function(n){return i.stringify(n,t,e)}).join("");var o={type:e.type,content:i.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if("comment"==o.type&&(o.attributes.spellcheck="true"),e.alias){var a="Array"===r.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(o.classes,a)}r.hooks.run("wrap",o);var s=Object.keys(o.attributes).map(function(e){return e+'="'+(o.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+(s?" "+s:"")+">"+o.content+""+o.tag+">"},!t.document)return t.addEventListener?(t.addEventListener("message",function(e){var n=JSON.parse(e.data),i=n.language,o=n.code,a=n.immediateClose;t.postMessage(r.highlight(o,r.languages[i],i)),a&&t.close()},!1),t.Prism):t.Prism;var o=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return o&&(r.filename=o.src,document.addEventListener&&!o.hasAttribute("data-manual")&&("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(r.highlightAll):window.setTimeout(r.highlightAll,16):document.addEventListener("DOMContentLoaded",r.highlightAll))),t.Prism}();e.exports&&(e.exports=n),void 0!==ke&&(ke.Prism=n),n.languages.markup={comment://,prolog:/<\?[\w\W]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/?[\da-z]{1,8};/i},n.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),n.languages.xml=n.languages.markup,n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:{pattern:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},n.languages.css.atrule.inside.rest=n.util.clone(n.languages.css),n.languages.markup&&(n.languages.insertBefore("markup","tag",{style:{pattern:/(