docsify/lib/docsify.min.js
2016-12-17 15:56:55 +08:00

3 lines
33 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var Docsify=function(){"use strict";function e(e,t,n){void 0===t&&(t="GET");var r=new XMLHttpRequest;return r.open(t,e),r.send(),{then:function(e,t){void 0===t&&(t=function(){}),n&&(r.addEventListener("progress",n),r.addEventListener("loaded",n)),r.addEventListener("error",t),r.addEventListener("load",function(n){var r=n.target;r.status>=400?t(r):e(r.response)})},abort:function(){return 4!==r.readyState&&r.abort()}}}function t(e,t){var n=[],r={};return e.forEach(function(e){var i=e.level||1,a=i-1;i>t||(r[a]?(r[a].children=r[a].children||[],r[a].children.push(e)):n.push(e),r[i]=e)}),n}function n(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function r(e){return null===e||void 0===e}function i(){var e=window.location;if(_===e.hash&&!r(S))return S;var t=e.hash.match(/^#\/([^#]+)/);return t=t&&2===t.length?t[1]:/^#\//.test(e.hash)?"":e.pathname,S=t,_=e.hash,t}function a(){return/mobile/i.test(navigator.userAgent)}function s(){function e(){for(var e=0,r=t.length;e<r;e+=1){var a=t[e].parentNode,s=a.getBoundingClientRect();if(s.top<10&&s.bottom>10){var o=n[a.id];if(!o||o===i)return;return i&&i.setAttribute("class",""),o.setAttribute("class","active"),void(i=o)}}}if(!a()){for(var t=document.querySelectorAll(".anchor"),n={},r=document.querySelectorAll(".sidebar li"),i=null,s=0,o=r.length;s<o;s+=1){var l=r[s],u=l.querySelector("a").getAttribute("href");"/"!==u&&(u=u.match(/#([^#]+)$/g)[0].slice(1)),n[u]=l}var c=document.querySelector("main .content");c.removeEventListener("scroll",e),c.addEventListener("scroll",e),e()}}function o(){var e=window.location.hash.match(/#[^#\/]+$/g);if(e&&e.length){var t=document.querySelector(decodeURIComponent(e[0]));t&&t.scrollIntoView()}}function l(e,t){var n=window.location.href;e="object"==typeof e?e:document.querySelector(e),e&&[].slice.call(e.querySelectorAll("a")).forEach(function(e){e.href===n?t?e.parentNode.setAttribute("class","active"):e.setAttribute("class","active"):t?e.parentNode.removeAttribute("class"):e.removeAttribute("class")})}function u(e){if(e="object"==typeof e?e:document.querySelector(e)){var t=document.body;e.addEventListener("click",function(){return t.classList.toggle("close")}),/mobile/i.test(navigator.userAgent)&&document.querySelector("aside").addEventListener("click",function(e){t.classList.toggle("close")})}}function c(){if(!w){var e=a()?"body":"section.content";w=document.querySelector(e)}w.scrollTop=0}function p(e,t){return t={exports:{}},e(t,t.exports),t.exports}function g(e){return e?(/\/\//.test(e)||(e="https://github.com/"+e),e=e.replace(/^git\+/,""),'\n <a href="'+e+'" class="github-corner" aria-label="View source on Github">\n <svg viewBox="0 0 250 250" aria-hidden="true">\n <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>\n <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>\n <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>\n </svg>\n </a>'):""}function h(){return'<main>\n <aside class="sidebar"></aside>\n <section class="content">\n <article class="markdown-section"></article>\n </section>\n </main>'}function d(e){return e?'<button class="sidebar-toggle">\n <span></span><span></span><span></span>\n </button>':""}function f(e,t){return void 0===t&&(t=""),e&&e.length?(e.forEach(function(e){t+='<li><a class="section-link" href="'+e.slug+'">'+e.title+"</a></li>",e.children&&(t+='<li><ul class="children">'+f(e.children)+"</li></ul>")}),t):""}function m(e,t){var n=document.querySelector("nav")||document.createElement("nav");e[t?"outerHTML":"innerHTML"]=d($.sidebarToggle)+g($.repo)+h(),document.body.insertBefore(n,document.body.children[0]),u("button.sidebar-toggle")}function b(e){q("article",e?C(e):"not found"),k.rendered||k(null,$),y.rendered||y(null,$),k.rendered=!1,y.rendered=!1,$.auto2top&&c()}function y(e){E.navbar&&E.navbar===e||(E.navbar=e,y.rendered=!0,e&&q("nav",C(e)),l("nav"))}function k(e){var n=!1;e?e=C(e):$.sidebar?e=f($.sidebar,"<ul>"):(e=f(t(j,$.maxLevel),"<ul>"),n=!0),k.rendered=!0,E.sidebar&&E.sidebar===e||(E.sidebar=e,q("aside.sidebar",e),n&&s(),j=[])}function v(e){var t=e.loaded,n=e.total,r=Math.floor(t/n*100);if(!E.loading){var i=document.createElement("div");i.classList.add("progress"),document.body.appendChild(i),E.loading=i}E.loading.style.opacity=1,E.loading.style.width=r>=95?"100%":r+"%",r>=95&&(clearTimeout(v.cacheTImeout),v.cacheTImeout=setTimeout(function(e){E.loading.style.opacity=0,E.loading.style.width="0%"},200))}function x(e){$=e}var w,S=null,_=null,L="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},C=p(function(e,t){(function(){function n(e){this.tokens=[],this.tokens.links={},this.options=e||p.defaults,this.rules=g.normal,this.options.gfm&&(this.options.tables?this.rules=g.tables:this.rules=g.gfm)}function r(e,t){if(this.options=t||p.defaults,this.links=e,this.rules=h.normal,this.renderer=this.options.renderer||new i,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=h.breaks:this.rules=h.gfm:this.options.pedantic&&(this.rules=h.pedantic)}function i(e){this.options=e||{}}function a(e){this.tokens=[],this.token=null,this.options=e||p.defaults,this.options.renderer=this.options.renderer||new i,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function o(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 l(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 u(){}function c(e){for(var t,n,r=arguments,i=1;i<arguments.length;i++){t=r[i];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function p(e,t,r){if(r||"function"==typeof t){r||(r=t,t=null),t=c({},p.defaults,t||{});var i,o,l=t.highlight,u=0;try{i=n.lex(e,t)}catch(e){return r(e)}o=i.length;var g=function(e){if(e)return t.highlight=l,r(e);var n;try{n=a.parse(i,t)}catch(t){e=t}return t.highlight=l,e?r(e):r(null,n)};if(!l||l.length<3)return g();if(delete t.highlight,!o)return g();for(;u<i.length;u++)!function(e){return"code"!==e.type?--o||g():l(e.text,e.lang,function(t,n){return t?g(t):null==n||n===e.text?--o||g():(e.text=n,e.escaped=!0,void(--o||g()))})}(i[u])}else try{return t&&(t=c({},p.defaults,t)),a.parse(n.lex(e,t),t)}catch(e){if(e.message+="\nPlease report this to https://github.com/chjj/marked.",(t||p.defaults).silent)return"<p>An error occured:</p><pre>"+s(e.message+"",!0)+"</pre>";throw e}}var g={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:u,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:u,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:u,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};g.bullet=/(?:[*+-]|\d+\.)/,g.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,g.item=l(g.item,"gm")(/bull/g,g.bullet)(),g.list=l(g.list)(/bull/g,g.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+g.def.source+")")(),g.blockquote=l(g.blockquote)("def",g.def)(),g._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",g.html=l(g.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,g._tag)(),g.paragraph=l(g.paragraph)("hr",g.hr)("heading",g.heading)("lheading",g.lheading)("blockquote",g.blockquote)("tag","<"+g._tag)("def",g.def)(),g.normal=c({},g),g.gfm=c({},g.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),g.gfm.paragraph=l(g.paragraph)("(?!","(?!"+g.gfm.fences.source.replace("\\1","\\2")+"|"+g.list.source.replace("\\1","\\3")+"|")(),g.tables=c({},g.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),n.rules=g,n.lex=function(e,t){var r=new n(t);return r.lex(e)},n.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)},n.prototype.token=function(e,t,n){for(var r,i,a,s,o,l,u,c,p,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<l.align.length;c++)/^ *-+: *$/.test(l.align[c])?l.align[c]="right":/^ *:-+: *$/.test(l.align[c])?l.align[c]="center":/^ *:-+ *$/.test(l.align[c])?l.align[c]="left":l.align[c]=null;for(c=0;c<l.cells.length;c++)l.cells[c]=l.cells[c].split(/ *\| */);h.tokens.push(l)}else if(a=h.rules.lheading.exec(e))e=e.substring(a[0].length),h.tokens.push({type:"heading",depth:"="===a[2]?1:2,text:a[1]});else if(a=h.rules.hr.exec(e))e=e.substring(a[0].length),h.tokens.push({type:"hr"});else if(a=h.rules.blockquote.exec(e))e=e.substring(a[0].length),h.tokens.push({type:"blockquote_start"}),a=a[0].replace(/^ *> ?/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),s=a[2],h.tokens.push({type:"list_start",ordered:s.length>1}),a=a[0].match(h.rules.item),r=!1,p=a.length,c=0;c<p;c++)l=a[c],u=l.length,l=l.replace(/^ *([*+-]|\d+\.) +/,""),~l.indexOf("\n ")&&(u-=l.length,l=h.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+u+"}","gm"),"")),h.options.smartLists&&c!==p-1&&(o=g.bullet.exec(a[c+1])[0],s===o||s.length>1&&o.length>1||(e=a.slice(c+1).join("\n")+e,c=p-1)),i=r||/\n\n(?!\s*$)/.test(l),c!==p-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<l.align.length;c++)/^ *-+: *$/.test(l.align[c])?l.align[c]="right":/^ *:-+: *$/.test(l.align[c])?l.align[c]="center":/^ *:-+ *$/.test(l.align[c])?l.align[c]="left":l.align[c]=null;for(c=0;c<l.cells.length;c++)l.cells[c]=l.cells[c].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);h.tokens.push(l)}else if(t&&(a=h.rules.paragraph.exec(e)))e=e.substring(a[0].length),h.tokens.push({type:"paragraph",text:"\n"===a[1].charAt(a[1].length-1)?a[1].slice(0,-1):a[1]});else if(a=h.rules.text.exec(e))e=e.substring(a[0].length),h.tokens.push({type:"text",text:a[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var h={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:u,tag:/^<!--[\s\S]*?-->|^<\/?\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:u,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};h._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,h._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,h.link=l(h.link)("inside",h._inside)("href",h._href)(),h.reflink=l(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:l(h.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:l(h.text)("]|","~]|")("|","|https?://|")()}),h.breaks=c({},h.gfm,{br:l(h.br)("{2,}","*")(),text:l(h.gfm.text)("{2,}","*")()}),r.rules=h,r.output=function(e,t,n){var i=new r(t,n);return i.output(e)},r.prototype.output=function(e){for(var t,n,r,i,a=this,o="";e;)if(i=a.rules.escape.exec(e))e=e.substring(i[0].length),o+=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=s(i[1]),r=n),o+=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&&/^<a /i.test(i[0])?a.inLink=!0:a.inLink&&/^<\/a>/i.test(i[0])&&(a.inLink=!1),e=e.substring(i[0].length),o+=a.options.sanitize?a.options.sanitizer?a.options.sanitizer(i[0]):s(i[0]):i[0];else if(i=a.rules.link.exec(e))e=e.substring(i[0].length),a.inLink=!0,o+=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||!t.href){o+=i[0].charAt(0),e=i[0].substring(1)+e;continue}a.inLink=!0,o+=a.outputLink(i,t),a.inLink=!1}else if(i=a.rules.strong.exec(e))e=e.substring(i[0].length),o+=a.renderer.strong(a.output(i[2]||i[1]));else if(i=a.rules.em.exec(e))e=e.substring(i[0].length),o+=a.renderer.em(a.output(i[2]||i[1]));else if(i=a.rules.code.exec(e))e=e.substring(i[0].length),o+=a.renderer.codespan(s(i[2],!0));else if(i=a.rules.br.exec(e))e=e.substring(i[0].length),o+=a.renderer.br();else if(i=a.rules.del.exec(e))e=e.substring(i[0].length),o+=a.renderer.del(a.output(i[1]));else if(i=a.rules.text.exec(e))e=e.substring(i[0].length),o+=a.renderer.text(s(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=s(i[1]),r=n,o+=a.renderer.link(r,null,n);return o},r.prototype.outputLink=function(e,t){var n=s(t.href),r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))},r.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},r.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;i<r;i++)t=e.charCodeAt(i),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},i.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?'<pre><code class="'+this.options.langPrefix+s(t,!0)+'">'+(n?e:s(e,!0))+"\n</code></pre>\n":"<pre><code>"+(n?e:s(e,!0))+"\n</code></pre>"},i.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},i.prototype.html=function(e){return e},i.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},i.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},i.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"</"+n+">\n"},i.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},i.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},i.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},i.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},i.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"</"+n+">\n"},i.prototype.strong=function(e){return"<strong>"+e+"</strong>"},i.prototype.em=function(e){return"<em>"+e+"</em>"},i.prototype.codespan=function(e){return"<code>"+e+"</code>"},i.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},i.prototype.del=function(e){return"<del>"+e+"</del>"},i.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='<a href="'+e+'"';return t&&(i+=' title="'+t+'"'),i+=">"+n+"</a>"},i.prototype.image=function(e,t,n){var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},i.prototype.text=function(e){return e},a.parse=function(e,t,n){var r=new a(t,n);return r.parse(e)},a.prototype.parse=function(e){var t=this;this.inline=new r(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=t.tok();return n},a.prototype.next=function(){return this.token=this.tokens.pop()},a.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},a.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)},a.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,s="",o="";for(r="",t=0;t<this.token.header.length;t++)i={header:!0,align:e.token.align[t]},r+=e.renderer.tablecell(e.inline.output(e.token.header[t]),{header:!0,align:e.token.align[t]});for(s+=this.renderer.tablerow(r),t=0;t<this.token.cells.length;t++){for(n=e.token.cells[t],r="",a=0;a<n.length;a++)r+=e.renderer.tablecell(e.inline.output(n[a]),{header:!1,align:e.token.align[a]});o+=e.renderer.tablerow(r)}return this.renderer.table(s,o);case"blockquote_start":for(var o="";"blockquote_end"!==this.next().type;)o+=e.tok();return this.renderer.blockquote(o);case"list_start":for(var o="",l=this.token.ordered;"list_end"!==this.next().type;)o+=e.tok();return this.renderer.list(o,l);case"list_item_start":for(var o="";"list_item_end"!==this.next().type;)o+="text"===e.token.type?e.parseText():e.tok();return this.renderer.listitem(o);case"loose_item_start":for(var o="";"list_item_end"!==this.next().type;)o+=e.tok();return this.renderer.listitem(o);case"html":var u=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(u);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},u.exec=u,p.options=p.setOptions=function(e){return c(p.defaults,e),p},p.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new i,xhtml:!1},p.Parser=a,p.parser=a.parse,p.Renderer=i,p.Lexer=n,p.lexer=n.lex,p.InlineLexer=r,p.inlineLexer=r.output,p.parse=p,"undefined"!=typeof e&&"object"==typeof t?e.exports=p:"function"==typeof define&&define.amd?define(function(){return p}):this.marked=p}).call(function(){return this||("undefined"!=typeof window?window:L)}())}),A=p(function(e){var t="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},n=function(){var e=/\blang(?:uage)?-(\w+)\b/i,n=0,r=t.Prism={util:{encode:function(e){return e instanceof i?new i(e.type,r.util.encode(e.content),e.alias):"Array"===r.util.type(e)?e.map(r.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function(e){var t=r.util.type(e);switch(t){case"Object":var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=r.util.clone(e[i]));return n;case"Array":return e.map&&e.map(function(e){return r.util.clone(e)})}return e}},languages:{extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var i in t)n[i]=t[i];return n},insertBefore:function(e,t,n,i){i=i||r.languages;var a=i[e];if(2==arguments.length){n=arguments[1];for(var s in n)n.hasOwnProperty(s)&&(a[s]=n[s]);return a}var o={};for(var l in a)if(a.hasOwnProperty(l)){if(l==t)for(var s in n)n.hasOwnProperty(s)&&(o[s]=n[s]);o[l]=a[l]}return r.languages.DFS(r.languages,function(t,n){n===i[e]&&t!=e&&(this[t]=o)}),i[e]=o},DFS:function(e,t,n,i){i=i||{};for(var a in e)e.hasOwnProperty(a)&&(t.call(e,a,e[a],n||a),"Object"!==r.util.type(e[a])||i[r.util.objId(e[a])]?"Array"!==r.util.type(e[a])||i[r.util.objId(e[a])]||(i[r.util.objId(e[a])]=!0,r.languages.DFS(e[a],t,a,i)):(i[r.util.objId(e[a])]=!0,r.languages.DFS(e[a],t,null,i)))}},plugins:{},highlightAll:function(e,t){var n={callback:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",n);for(var i,a=n.elements||document.querySelectorAll(n.selector),s=0;i=a[s++];)r.highlightElement(i,e===!0,n.callback)},highlightElement:function(n,i,a){for(var s,o,l=n;l&&!e.test(l.className);)l=l.parentNode;l&&(s=(l.className.match(e)||[,""])[1].toLowerCase(),o=r.languages[s]),n.className=n.className.replace(e,"").replace(/\s+/g," ")+" language-"+s,l=n.parentNode,/pre/i.test(l.nodeName)&&(l.className=l.className.replace(e,"").replace(/\s+/g," ")+" language-"+s);var u=n.textContent,c={element:n,language:s,grammar:o,code:u};if(r.hooks.run("before-sanity-check",c),!c.code||!c.grammar)return void r.hooks.run("complete",c);if(r.hooks.run("before-highlight",c),i&&t.Worker){var p=new Worker(r.filename);p.onmessage=function(e){c.highlightedCode=e.data,r.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,a&&a.call(c.element),r.hooks.run("after-highlight",c),r.hooks.run("complete",c)},p.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else c.highlightedCode=r.highlight(c.code,c.grammar,c.language),r.hooks.run("before-insert",c),c.element.innerHTML=c.highlightedCode,a&&a.call(n),r.hooks.run("after-highlight",c),r.hooks.run("complete",c)},highlight:function(e,t,n){var a=r.tokenize(e,t);return i.stringify(r.util.encode(a),n)},tokenize:function(e,t,n){var i=r.Token,a=[e],s=t.rest;if(s){for(var o in s)t[o]=s[o];delete t.rest}e:for(var o in t)if(t.hasOwnProperty(o)&&t[o]){var l=t[o];l="Array"===r.util.type(l)?l:[l];for(var u=0;u<l.length;++u){var c=l[u],p=c.inside,g=!!c.lookbehind,h=!!c.greedy,d=0,f=c.alias;c=c.pattern||c;for(var m=0;m<a.length;m++){var b=a[m];if(a.length>e.length)break e;if(!(b instanceof i)){c.lastIndex=0;var y=c.exec(b),k=1;if(!y&&h&&m!=a.length-1){var v=a[m+1].matchedStr||a[m+1],x=b+v;if(m<a.length-2&&(x+=a[m+2].matchedStr||a[m+2]),c.lastIndex=0,y=c.exec(x),!y)continue;var w=y.index+(g?y[1].length:0);if(w>=b.length)continue;var S=y.index+y[0].length,_=b.length+v.length;if(k=3,S<=_){if(a[m+1].greedy)continue;k=2,x=x.slice(0,_)}b=x}if(y){g&&(d=y[1].length);var w=y.index+d,y=y[0].slice(d),S=w+y.length,L=b.slice(0,w),C=b.slice(S),A=[m,k];L&&A.push(L);var $=new i(o,p?r.tokenize(y,p):y,f,y,h);A.push($),C&&A.push(C),Array.prototype.splice.apply(a,A)}}}}}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.matchedStr=r||null,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 s="Array"===r.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(a.classes,s)}r.hooks.run("wrap",a);var o="";for(var l in a.attributes)o+=(o?" ":"")+l+'="'+(a.attributes[l]||"")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'" '+o+">"+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,s=n.immediateClose;t.postMessage(r.highlight(a,r.languages[i],i)),s&&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?requestAnimationFrame(r.highlightAll,0):document.addEventListener("DOMContentLoaded",r.highlightAll))),t.Prism}();"undefined"!=typeof e&&e.exports&&(e.exports=n),"undefined"!=typeof L&&(L.Prism=n),n.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/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(/&amp;/,"&"))}),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:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,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:/(<style[\w\W]*?>)[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:n.languages.css,alias:"language-css"}}),n.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:n.languages.css}},alias:"language-css"}},n.languages.markup.tag)),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!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+)|(?:catch\s+\())[a-z0-9_\.\\]+/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:/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{keyword:/\b(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|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,function:/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),n.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}}),n.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\\\|\\?[^\\])*?`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}}}),n.languages.markup&&n.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:n.languages.javascript,alias:"language-javascript"}}),n.languages.js=n.languages.javascript,function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.forEach&&Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(t){for(var r,i=t.getAttribute("data-src"),a=t,s=/\blang(?:uage)?-(?!\*)(\w+)\b/i;a&&!s.test(a.className);)a=a.parentNode;if(a&&(r=(t.className.match(s)||[,""])[1]),!r){var o=(i.match(/\.(\w+)$/)||[,""])[1];r=e[o]||o}var l=document.createElement("code");l.className="language-"+r,t.textContent="",l.textContent="Loading…",t.appendChild(l);var u=new XMLHttpRequest;u.open("GET",i,!0),u.onreadystatechange=function(){4==u.readyState&&(u.status<400&&u.responseText?(l.textContent=u.responseText,n.highlightElement(l)):u.status>=400?l.textContent="✖ Error "+u.status+" while fetching file: "+u.statusText:l.textContent="✖ Error: File does not exist or is empty")},u.send(null)})},document.addEventListener("DOMContentLoaded",self.Prism.fileHighlight))}()}),$={},E={},q=function(e,t){return e="object"==typeof e?e:document.querySelector(e),e.innerHTML=t,e},j=[],T=new C.Renderer;T.heading=function(e,t){var n=e.toLowerCase().replace(/<(?:.|\n)*?>/gm,"").replace(/[^\w|\u4e00-\u9fa5]+/g,"-"),r="";return $.router&&(r="#/"+i()),j.push({level:t,slug:r+"#"+encodeURIComponent(n),title:e}),"<h"+t+' id="'+n+'"><a href="'+r+"#"+n+'" class="anchor"></a>'+e+"</h"+t+">"},T.code=function(e,t){void 0===t&&(t="");var n=A.highlight(e,A.languages[t]||A.languages.markup);return'<pre data-lang="'+t+'"><code class="lang-'+t+'">'+n+"</code></pre>";
},T.link=function(e,t,n){return $.router&&!/^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/.test(e)&&(e=/^\/#/.test(e)?e:"#"+e),'<a href="'+e+'" title="'+(t||"")+'">'+n+"</a>"},C.setOptions({renderer:T});var N={el:"#app",repo:"",maxLevel:6,sidebar:"",sidebarToggle:!1,loadSidebar:null,loadNavbar:null,router:!1,auto2top:!1},P=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();if(P){for(var O in N){var I=P.getAttribute("data-"+n(O));N[O]=r(I)?N[O]:I||!0}N.loadSidebar===!0&&(N.loadSidebar="_sidebar.md"),N.loadNavbar===!0&&(N.loadNavbar="_navbar.md"),N.sidebar&&(N.sidebar=window[N.sidebar])}x(N);var W=null,z=null,M=function(t){var n=i();if(W===n)return t();var r,a=W=n;/\//.test(a)?a&&!/\/$/.test(a)&&(a=a.match(/(\S*\/)[^\/]+$/)[1]):a="",z&&z.abort&&z.abort(),z=e(!n||/\/$/.test(n)?n+"README.md":n+".md","GET",v),z.then(function(e){b(e),N.loadSidebar?(r===!1&&t(),r=!1):t()},function(e){return b(null)}),N.loadSidebar&&e(a+N.loadSidebar).then(function(e){k(e),r===!1&&t(),r=!1}),N.loadNavbar&&e(a+N.loadNavbar).then(y)},F=function(){var e=document.querySelector(N.el)||document.body,t=e!==document.body,n=function(){M(function(e){l("aside.sidebar",!0),o()})};m(e,t),n(),N.router&&(/^#\//.test(window.location.hash)||(window.location.hash="#/"),window.addEventListener("hashchange",n))},B=F();return B}();