0&&void 0!==arguments[0]?arguments[0]:{};h(this,e),t.editor=this,this.init(t)}return a(e,[{key:"init",value:function(e){var t=this;this.initData(e).then((function(){t.initView(t._options)}))}},{key:"initData",value:function(e){var t=this;return new Promise((function(n,r){t.initOption(e),t.initEditorStatus(),t.initQiniu(t._options.qiniu),n()}))}},{key:"initView",value:function(e){var t=this;this.createIconLink(),this.createElement(e).then((function(){t.initEvent(),t.initCodeMirrorData(),t.initMarkdownData(),t.initDefaultContent(),t.lifecycleMounted()}))}},{key:"initEvent",value:function(){this.initStatusEvent(),this.initToolsEvent()}},{key:"initOption",value:function(e){this._options=u.default.extend({},{shortcuts:{isOpen:!0},lang:"zh",qiniu:{tokenApiUrl:"http://127.0.0.1:3001/api/qiniu/test/get_token",region:"z1",config:{},putExtra:{}}},e),this._options.$tools=d.default;var t=this._options;if(console.log(this._options),"string"==typeof t.lang){var n=t.lang;this._options.lang=v[n]||s.default.editor.language}else this._options.lang=Object.assign({},s.default.editor.language,e.lang)}},{key:"lifecycleMounted",value:function(){this.addEditContainerPaseImg()}},{key:"createIconLink",value:function(){if(!this.isCreatedIconLink()){var e=document.createElement("link");e.setAttribute("data-editor",!0),e.rel="stylesheet",e.href=s.default.iconLink,document.getElementsByTagName("head")[0].appendChild(e)}}},{key:"isCreatedIconLink",value:function(){return!!document.querySelector("link[data-editor]")}},{key:"createElement",value:function(e){return new Promise((function(t,n){o.default.init(e).then((function(){t()}))}))}},{key:"initToolsEvent",value:function(){var e=this,t=this._options.$tools,n=this._options.el,r=t.toolbarBuiltInButtons,i=u.default.obj2Arr(r);i.length>0&&i.forEach((function(t){t.className.indexOf(" ")>0&&(t.className=t.className.split(" ")[0]);var r="."+t.className,i=t.action,a=u.default.isFunction(i);if(""!==r&&a){var o=n.querySelector(".editor-tools").querySelector(r);o&&(e.$status,o.$editor=e,o.addEventListener("click",i,!1))}}))}},{key:"createCodeMirrorElement",value:function(e,t){return m.default.fromTextArea(e,t)}},{key:"initCodeMirrorData",value:function(){this._options;var e=this._options.el.querySelector("#area");this.$codemirror=this.createCodeMirrorElement(e,{mode:{name:"gfm",tokenTypeOverrides:{emoji:"emoji"}},lineNumbers:!0,matchBrackets:!0,indentUnit:4,lineWrapping:!0,styleActiveLine:!0,theme:"base16-dark",autoCloseBrackets:!0,autoCloseTags:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"]}),this.$codemirror.$editor=this,this.initCodeMirrorEvent()}},{key:"initCodeMirrorEvent",value:function(){this.add_CM_change_eventHandle(),this.add_CM_cursorActivity_eventHandle(),this.addScrollSync()}},{key:"add_CM_change_eventHandle",value:function(){this.$codemirror.on("changes",(0,c.debounce)(this.onCodeMirrorChange,300))}},{key:"onCodeMirrorChange",value:function(e){e.$editor.commonCodeMirrorEventHandle(e)}},{key:"add_CM_cursorActivity_eventHandle",value:function(){this.$codemirror.on("cursorActivity",this.onCodeMirrorCursorActivity)}},{key:"onCodeMirrorCursorActivity",value:function(e){e.$editor.commonCodeMirrorEventHandle(e)}},{key:"commonCodeMirrorEventHandle",value:function(e){var t=e.getValue(),n=e.$editor;n.setHtmlValue(t),n.updateStatusBar(n)}},{key:"initMarkdownData",value:function(e){if(g.default){var t={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!0,smartypants:!1,highlight:function(e){return f.default.highlightAuto(e).value}};this.$marked=g.default,this.$marked.setOptions(t)}}},{key:"initMarkdownEvent",value:function(){}},{key:"initDefaultContent",value:function(){var e=this._options.defaultCon;if(e){var t=this.$codemirror;t.setValue(e),this.commonCodeMirrorEventHandle(t)}}},{key:"getMDValue",value:function(){return this.$codemirror.getValue()}},{key:"setHtmlValue",value:function(e){var t=this.$marked(e);this._options.el.querySelector(".editor-preview").querySelector(".preview-bd").innerHTML=t}},{key:"addScrollSync",value:function(){var e=this.$codemirror,t=this._options.el.querySelector(".editor-preview"),n=!1,r=!1;e.on("scroll",(function(e){if(n)n=!1;else{r=!0;var i=e.getScrollInfo().height-e.getScrollInfo().clientHeight,a=parseFloat(e.getScrollInfo().top)/i,o=(t.scrollHeight-t.clientHeight)*a;t.scrollTop=o}})),t.addEventListener("scroll",(function(){if(r)r=!1;else{n=!0;var i=t.scrollHeight-t.clientHeight,a=parseFloat(t.scrollTop)/i,o=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*a;e.scrollTo(0,o)}}))}},{key:"updateStatusBar",value:function(){var e=this.$codemirror.getValue().length;this.renderEditorContentPosition(),this.renderEditContentLength(e)}},{key:"renderEditContentLength",value:function(e){var t=this._options.el.querySelector(".editor-status").querySelector(".editor-status-length"),n=this._options.lang.statusBar.length;t.innerHTML=n+" "+e}},{key:"renderEditorContentPosition",value:function(){var e=this.$codemirror,t=e.lineCount(),n=e.getCursor(),r=n.ch+1,i=n.line+1,a=this._options.lang.statusBar,o=a.line,s=a.columns;this._options.el.querySelector(".editor-status").querySelector(".editor-status-positon").querySelector("span").innerHTML=o+" "+i+","+s+" "+r+" 一 "+t+" "+o}},{key:"initEditorStatus",value:function(e){this.$status={},this.$status.isThemeLight=!0,this.$status.isFullscreen=!1,this.$status.isShowAll=!0,this.$status.isOnlyPreview=!1,this.$status.isOnlyEdit=!1}},{key:"initStatusEvent",value:function(){this.initEventToggleTheme()}},{key:"initEventToggleTheme",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".icon-theme",n=this,r=this._options.el.querySelector(".editor-status").querySelector(t),i=this._options.el,a=u.default.addClass,o=u.default.removeClass;if(r){r.addEventListener("click",(function(){n.$status.isThemeLight?(a(i,"editor-theme-dark"),o(i,"editor-theme-light")):(a(i,"editor-theme-light"),o(i,"editor-theme-dark")),n.$status.isThemeLight=!n.$status.isThemeLight}))}}},{key:"initEventToggleFullscreen",value:function(e){}},{key:"initQiniu",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};T=new E.default(e)}},{key:"addEditContainerPaseImg",value:function(){var e=this._options.el.querySelector(".editor-md"),t=this.$codemirror;e.addEventListener("paste",(function(e){if(e.clipboardData||e.originalEvent){var t=e.clipboardData||e.originalEvent.clipboardData;if(t.items){for(var r,i=0;i'+r+i+"\n ",e()}))},createToolsMain:function(e){var t=this,n=this.getToolsEdit(e),r='';if(n.length>0){var i=n.length;n.forEach((function(e,n){n>0&&(n+1)%3==0&&n!==i-1?r=r+t.createToolsItem(e)+'|':r+=t.createToolsItem(e)}))}return r+="
"},getToolsEdit:function(e){if("object"===(void 0===e?"undefined":i(e))){var t={},n=JSON.parse(JSON.stringify(e));for(var r in n)n[r].isEditTools&&(t[r]=n[r]);return this.sortToolsIcon(t,"index")}},createToolsHandle:function(e){var t=this.getToolsHandle(e),n='',r=this;return t.forEach((function(e,t){n+=r.createToolsItem(e)})),n+="
"},getToolsHandle:function(e){if("object"===(void 0===e?"undefined":i(e))){var t={},n=JSON.parse(JSON.stringify(e));for(var r in n)n[r].isEditTools||(t[r]=n[r]);return this.sortToolsIcon(t,"index")}},sortToolsIcon:function(e,t){if("object"===(void 0===e?"undefined":i(e))){var n=[];for(var r in e)n.push(e[r]);return n.sort((function(e,t){return e.index-t.index}))}},createToolsItem:function(e){var t=s[e.name],n=void 0;n=t?l(t):"";var r=this.getToolItemTitleText(e.name);return this.$editor.options.fixShortcut&&this.$editor.options.fixShortcut.isOpen?'':''},getToolItemTitleText:function(e){return this.$editor.options.lang.toolbarItem[e.toLowerCase()]},renderCode:function(e){var t=e.el;return new Promise((function(e,n){t.innerHTML+='\n \n \n
\n ',e()}))},renderPriview:function(e){var t=e.el;return new Promise((function(e,n){t.innerHTML+='\n \n ',e()}))},renderStatus:function(e){var t=e.el,n=this.createStatusPosition(e),r=this.createStatusLens();return new Promise((function(e,i){t.innerHTML+='\n '+n+r+"
",e()}))},createStatusPosition:function(e){var t=this.createStatusToggleTheme(),n=this.$editor.options.lang.statusBar,r=n.line;return''+r+" ,"+n.columns+" 一 "+r+""+t+"
"},createStatusToggleTheme:function(){return''},createStatusLens:function(){return''+this.$editor.options.lang.statusBar.length+"
"}};t.default=c},function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={toolbarItem:{bold:"加粗",italic:"斜体",heading:"标题",quote:"引用",code:"代码块","unordered-list":"无序列表","ordered-list":"有序列表",link:"插入链接",image:"插入图片",undo:"撤消",redo:"重做",about:"关于编辑器",edit:"编辑模式",compare:"常规模式",preview:"预览模式",fullscreen:"切换全屏"},statusBar:{line:"行",columns:"列",length:"总长度"}}},function(e,t,n){!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var a,o,s=r.indentUnit,l={},c=i.htmlMode?t:n;for(var d in c)l[d]=c[d];for(var d in i)l[d]=i[d];function u(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(p("atom","]]>")):null:e.match("--")?n(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=u;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(a=e.eat("/")?"closeTag":"openTag",t.tokenize=_,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function _(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=u,a=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return a="equals",null;if("<"==i){t.tokenize=u,t.state=E,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=_;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=u;break}n.next()}return e}}function m(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function g(e){e.context&&(e.context=e.context.prev)}function f(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;g(e)}}function E(e,t,n){return"openTag"==e?(n.tagStart=t.column(),S):"closeTag"==e?h:E}function S(e,t,n){return"word"==e?(n.tagName=t.current(),o="tag",T):l.allowMissingTagName&&"endTag"==e?(o="tag bracket",T(e,0,n)):(o="error",S)}function h(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&g(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(o="tag",b):(o="tag error",v)}return l.allowMissingTagName&&"endTag"==e?(o="tag bracket",b(e,0,n)):(o="error",v)}function b(e,t,n){return"endTag"!=e?(o="error",b):(g(n),E)}function v(e,t,n){return o="error",b(e,0,n)}function T(e,t,n){if("word"==e)return o="attribute",C;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?f(n,r):(f(n,r),n.context=new m(n,r,i==n.indented)),E}return o="error",T}function C(e,t,n){return"equals"==e?y:(l.allowMissing||(o="error"),T(e,0,n))}function y(e,t,n){return"string"==e?O:"word"==e&&l.allowUnquoted?(o="string",T):(o="error",T(e,0,n))}function O(e,t,n){return"string"==e?O:T(e,0,n)}return u.isInText=!0,{startState:function(e){var t={tokenize:u,state:E,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;a=null;var n=t.tokenize(e,t);return(n||a)&&"comment"!=n&&(o=null,t.state=t.state(a||n,e,t),o&&(n="error"==o?n+" error":o)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=_&&t.tokenize!=u)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==y&&(e.state=T)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(1))},function(e,t,n){!function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var t=0;t-1&&t.substring(i+1,t.length);if(a)return e.findModeByExtension(a)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode("gfm",(function(n,r){var i=0,a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var a=e.pos;e.eatWhile("`");var o=1+e.pos-a;return n.code?o===i&&(n.code=!1):(i=o,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,!1!==r.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:function(e){return e.code=!1,null}},o={taskLists:!0,strikethrough:!0,emoji:!0};for(var s in r)o[s]=r[s];return o.name="markdown",e.overlayMode(e.getMode(n,o),a)}),"markdown"),e.defineMIME("text/x-gfm","gfm")}(n(1),n(14),n(15))},function(e,t,n){!function(e){"use strict";e.defineMode("javascript",(function(t,n){var r,i,a=t.indentUnit,o=n.statementIndent,s=n.jsonld,l=n.json||s,c=n.typescript,d=n.wordCharacters||/[\w$\xa1-\uffff]/,u=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("keyword d"),a=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:a,typeof:a,instanceof:a,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),_=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function m(e,t,n){return r=e,i=n,t}function g(e,t){var n,r=e.next();if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){var r,i=!1;if(s&&"@"==e.peek()&&e.match(p))return t.tokenize=g,m("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(t.tokenize=g),m("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return m("number","number");if("."==r&&e.match(".."))return m("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return m(r);if("="==r&&e.eat(">"))return m("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return m("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),m("number","number");if("/"==r)return e.eat("*")?(t.tokenize=f,f(e,t)):e.eat("/")?(e.skipToEnd(),m("comment","comment")):je(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),m("regexp","string-2")):(e.eat("="),m("operator","operator",e.current()));if("`"==r)return t.tokenize=E,E(e,t);if("#"==r)return e.skipToEnd(),m("error","error");if("<"==r&&e.match("!--")||"-"==r&&e.match("->"))return e.skipToEnd(),m("comment","comment");if(_.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),m("operator","operator",e.current());if(d.test(r)){e.eatWhile(d);var i=e.current();if("."!=t.lastType){if(u.propertyIsEnumerable(i)){var a=u[i];return m(a.type,a.style,i)}if("async"==i&&e.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/,!1))return m("async","keyword",i)}return m("variable","variable",i)}}function f(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=g;break}r="*"==n}return m("comment","comment")}function E(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}r=!r&&"\\"==n}return m("quasi","string-2",e.current())}function S(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(c){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,a=!1,o=n-1;o>=0;--o){var s=e.string.charAt(o),l="([{}])".indexOf(s);if(l>=0&&l<3){if(!i){++o;break}if(0==--i){"("==s&&(a=!0);break}}else if(l>=3&&l<6)++i;else if(d.test(s))a=!0;else if(/["'\/`]/.test(s))for(;;--o){if(0==o)return;if(e.string.charAt(o-1)==s&&"\\"!=e.string.charAt(o-2)){o--;break}}else if(a&&!i){++o;break}}a&&!i&&(t.fatArrowAt=o)}}var h={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0};function b(e,t,n,r,i,a){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=a,null!=r&&(this.align=r)}function v(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}var T={state:null,column:null,marked:null,cc:null};function C(){for(var e=arguments.length-1;e>=0;e--)T.cc.push(arguments[e])}function y(){return C.apply(null,arguments),!0}function O(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function N(e){var t=T.state;if(T.marked="def",t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=function e(t,n){if(n){if(n.block){var r=e(t,n.prev);return r?r==n.prev?n:new A(r,n.vars,!0):null}return O(t,n.vars)?n:new A(n.prev,new I(t,n.vars),!1)}return null}(e,t.context);if(null!=r)return void(t.context=r)}else if(!O(e,t.localVars))return void(t.localVars=new I(e,t.localVars));n.globalVars&&!O(e,t.globalVars)&&(t.globalVars=new I(e,t.globalVars))}function R(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function A(e,t,n){this.prev=e,this.vars=t,this.block=n}function I(e,t){this.name=e,this.next=t}var x=new I("this",new I("arguments",null));function D(){T.state.context=new A(T.state.context,T.state.localVars,!1),T.state.localVars=x}function w(){T.state.context=new A(T.state.context,T.state.localVars,!0),T.state.localVars=null}function M(){T.state.localVars=T.state.context.vars,T.state.context=T.state.context.prev}function L(e,t){var n=function(){var n=T.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new b(r,T.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function P(){var e=T.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function k(e){return function t(n){return n==e?y():";"==e||"}"==n||")"==n||"]"==n?C():y(t)}}function F(e,t){return"var"==e?y(L("vardef",t),Se,k(";"),P):"keyword a"==e?y(L("form"),Y,F,P):"keyword b"==e?y(L("form"),F,P):"keyword d"==e?T.stream.match(/^\s*$/,!1)?y():y(L("stat"),q,k(";"),P):"debugger"==e?y(k(";")):"{"==e?y(L("}"),w,ae,P,M):";"==e?y():"if"==e?("else"==T.state.lexical.info&&T.state.cc[T.state.cc.length-1]==P&&T.state.cc.pop()(),y(L("form"),Y,F,P,ye)):"function"==e?y(Ae):"for"==e?y(L("form"),Oe,F,P):"class"==e||c&&"interface"==t?(T.marked="keyword",y(L("form","class"==e?e:t),Me,P)):"variable"==e?c&&"declare"==t?(T.marked="keyword",y(F)):c&&("module"==t||"enum"==t||"type"==t)&&T.stream.match(/^\s*\w/,!1)?(T.marked="keyword","enum"==t?y(Ve):"type"==t?y(xe,k("operator"),de,k(";")):y(L("form"),he,k("{"),L("}"),ae,P,P)):c&&"namespace"==t?(T.marked="keyword",y(L("form"),B,F,P)):c&&"abstract"==t?(T.marked="keyword",y(F)):y(L("stat"),Z):"switch"==e?y(L("form"),Y,k("{"),L("}","switch"),w,ae,P,P,M):"case"==e?y(B,k(":")):"default"==e?y(k(":")):"catch"==e?y(L("form"),D,U,F,P,M):"export"==e?y(L("stat"),Fe,P):"import"==e?y(L("stat"),Be,P):"async"==e?y(F):"@"==t?y(B,F):C(L("stat"),B,k(";"),P)}function U(e){if("("==e)return y(De,k(")"))}function B(e,t){return H(e,t,!1)}function G(e,t){return H(e,t,!0)}function Y(e){return"("!=e?C():y(L(")"),q,k(")"),P)}function H(e,t,n){if(T.state.fatArrowAt==T.stream.start){var r=n?Q:$;if("("==e)return y(D,L(")"),re(De,")"),P,k("=>"),r,M);if("variable"==e)return C(D,he,k("=>"),r,M)}var i=n?V:z;return h.hasOwnProperty(e)?y(i):"function"==e?y(Ae,i):"class"==e||c&&"interface"==t?(T.marked="keyword",y(L("form"),we,P)):"keyword c"==e||"async"==e?y(n?G:B):"("==e?y(L(")"),q,k(")"),P,i):"operator"==e||"spread"==e?y(n?G:B):"["==e?y(L("]"),ze,P,i):"{"==e?ie(ee,"}",null,i):"quasi"==e?C(W,i):"new"==e?y(function(e){return function(t){return"."==t?y(e?X:K):"variable"==t&&c?y(ge,e?V:z):C(e?G:B)}}(n)):"import"==e?y(B):y()}function q(e){return e.match(/[;\}\)\],]/)?C():C(B)}function z(e,t){return","==e?y(q):V(e,t,!1)}function V(e,t,n){var r=0==n?z:V,i=0==n?B:G;return"=>"==e?y(D,n?Q:$,M):"operator"==e?/\+\+|--/.test(t)||c&&"!"==t?y(r):c&&"<"==t&&T.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?y(L(">"),re(de,">"),P,r):"?"==t?y(B,k(":"),i):y(i):"quasi"==e?C(W,r):";"!=e?"("==e?ie(G,")","call",r):"."==e?y(J,r):"["==e?y(L("]"),q,k("]"),P,r):c&&"as"==t?(T.marked="keyword",y(de,r)):"regexp"==e?(T.state.lastType=T.marked="operator",T.stream.backUp(T.stream.pos-T.stream.start-1),y(i)):void 0:void 0}function W(e,t){return"quasi"!=e?C():"${"!=t.slice(t.length-2)?y(W):y(B,j)}function j(e){if("}"==e)return T.marked="string-2",T.state.tokenize=E,y(W)}function $(e){return S(T.stream,T.state),C("{"==e?F:B)}function Q(e){return S(T.stream,T.state),C("{"==e?F:G)}function K(e,t){if("target"==t)return T.marked="keyword",y(z)}function X(e,t){if("target"==t)return T.marked="keyword",y(V)}function Z(e){return":"==e?y(P,F):C(z,k(";"),P)}function J(e){if("variable"==e)return T.marked="property",y()}function ee(e,t){return"async"==e?(T.marked="property",y(ee)):"variable"==e||"keyword"==T.style?(T.marked="property","get"==t||"set"==t?y(te):(c&&T.state.fatArrowAt==T.stream.start&&(n=T.stream.match(/^\s*:\s*/,!1))&&(T.state.fatArrowAt=T.stream.pos+n[0].length),y(ne))):"number"==e||"string"==e?(T.marked=s?"property":T.style+" property",y(ne)):"jsonld-keyword"==e?y(ne):c&&R(t)?(T.marked="keyword",y(ee)):"["==e?y(B,oe,k("]"),ne):"spread"==e?y(G,ne):"*"==t?(T.marked="keyword",y(ee)):":"==e?C(ne):void 0;var n}function te(e){return"variable"!=e?C(ne):(T.marked="property",y(Ae))}function ne(e){return":"==e?y(G):"("==e?C(Ae):void 0}function re(e,t,n){function r(i,a){if(n?n.indexOf(i)>-1:","==i){var o=T.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),y((function(n,r){return n==t||r==t?C():C(e)}),r)}return i==t||a==t?y():n&&n.indexOf(";")>-1?C(e):y(k(t))}return function(n,i){return n==t||i==t?y():C(e,r)}}function ie(e,t,n){for(var r=3;r"),de):void 0}function ue(e){if("=>"==e)return y(de)}function _e(e,t){return"variable"==e||"keyword"==T.style?(T.marked="property",y(_e)):"?"==t||"number"==e||"string"==e?y(_e):":"==e?y(de):"["==e?y(k("variable"),se,k("]"),_e):"("==e?C(Ie,_e):void 0}function pe(e,t){return"variable"==e&&T.stream.match(/^\s*[?:]/,!1)||"?"==t?y(pe):":"==e?y(de):"spread"==e?y(pe):C(de)}function me(e,t){return"<"==t?y(L(">"),re(de,">"),P,me):"|"==t||"."==e||"&"==t?y(de):"["==e?y(de,k("]"),me):"extends"==t||"implements"==t?(T.marked="keyword",y(de)):"?"==t?y(de,k(":"),de):void 0}function ge(e,t){if("<"==t)return y(L(">"),re(de,">"),P,me)}function fe(){return C(de,Ee)}function Ee(e,t){if("="==t)return y(de)}function Se(e,t){return"enum"==t?(T.marked="keyword",y(Ve)):C(he,oe,Te,Ce)}function he(e,t){return c&&R(t)?(T.marked="keyword",y(he)):"variable"==e?(N(t),y()):"spread"==e?y(he):"["==e?ie(ve,"]"):"{"==e?ie(be,"}"):void 0}function be(e,t){return"variable"!=e||T.stream.match(/^\s*:/,!1)?("variable"==e&&(T.marked="property"),"spread"==e?y(he):"}"==e?C():"["==e?y(B,k("]"),k(":"),be):y(k(":"),he,Te)):(N(t),y(Te))}function ve(){return C(he,Te)}function Te(e,t){if("="==t)return y(G)}function Ce(e){if(","==e)return y(Se)}function ye(e,t){if("keyword b"==e&&"else"==t)return y(L("form","else"),F,P)}function Oe(e,t){return"await"==t?y(Oe):"("==e?y(L(")"),Ne,P):void 0}function Ne(e){return"var"==e?y(Se,Re):"variable"==e?y(Re):C(Re)}function Re(e,t){return")"==e?y():";"==e?y(Re):"in"==t||"of"==t?(T.marked="keyword",y(B,Re)):C(B,Re)}function Ae(e,t){return"*"==t?(T.marked="keyword",y(Ae)):"variable"==e?(N(t),y(Ae)):"("==e?y(D,L(")"),re(De,")"),P,le,F,M):c&&"<"==t?y(L(">"),re(fe,">"),P,Ae):void 0}function Ie(e,t){return"*"==t?(T.marked="keyword",y(Ie)):"variable"==e?(N(t),y(Ie)):"("==e?y(D,L(")"),re(De,")"),P,le,M):c&&"<"==t?y(L(">"),re(fe,">"),P,Ie):void 0}function xe(e,t){return"keyword"==e||"variable"==e?(T.marked="type",y(xe)):"<"==t?y(L(">"),re(fe,">"),P):void 0}function De(e,t){return"@"==t&&y(B,De),"spread"==e?y(De):c&&R(t)?(T.marked="keyword",y(De)):c&&"this"==e?y(oe,Te):C(he,oe,Te)}function we(e,t){return"variable"==e?Me(e,t):Le(e,t)}function Me(e,t){if("variable"==e)return N(t),y(Le)}function Le(e,t){return"<"==t?y(L(">"),re(fe,">"),P,Le):"extends"==t||"implements"==t||c&&","==e?("implements"==t&&(T.marked="keyword"),y(c?de:B,Le)):"{"==e?y(L("}"),Pe,P):void 0}function Pe(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||c&&R(t))&&T.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(T.marked="keyword",y(Pe)):"variable"==e||"keyword"==T.style?(T.marked="property",y(c?ke:Ae,Pe)):"number"==e||"string"==e?y(c?ke:Ae,Pe):"["==e?y(B,oe,k("]"),c?ke:Ae,Pe):"*"==t?(T.marked="keyword",y(Pe)):c&&"("==e?C(Ie,Pe):";"==e||","==e?y(Pe):"}"==e?y():"@"==t?y(B,Pe):void 0}function ke(e,t){if("?"==t)return y(ke);if(":"==e)return y(de,Te);if("="==t)return y(G);var n=T.state.lexical.prev;return C(n&&"interface"==n.info?Ie:Ae)}function Fe(e,t){return"*"==t?(T.marked="keyword",y(qe,k(";"))):"default"==t?(T.marked="keyword",y(B,k(";"))):"{"==e?y(re(Ue,"}"),qe,k(";")):C(F)}function Ue(e,t){return"as"==t?(T.marked="keyword",y(k("variable"))):"variable"==e?C(G,Ue):void 0}function Be(e){return"string"==e?y():"("==e?C(B):C(Ge,Ye,qe)}function Ge(e,t){return"{"==e?ie(Ge,"}"):("variable"==e&&N(t),"*"==t&&(T.marked="keyword"),y(He))}function Ye(e){if(","==e)return y(Ge,Ye)}function He(e,t){if("as"==t)return T.marked="keyword",y(Ge)}function qe(e,t){if("from"==t)return T.marked="keyword",y(B)}function ze(e){return"]"==e?y():C(re(G,"]"))}function Ve(){return C(L("form"),he,k("{"),L("}"),re(We,"}"),P,P)}function We(){return C(he,Te)}function je(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return M.lex=!0,P.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new b((e||0)-a,0,"block",!1),localVars:n.localVars,context:n.localVars&&new A(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),S(e,t)),t.tokenize!=f&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",function(e,t,n,r,i){var a=e.cc;for(T.state=e,T.stream=i,T.marked=null,T.cc=a,T.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((a.length?a.pop():l?B:F)(n,r)){for(;a.length&&a[a.length-1].lex;)a.pop()();return T.marked?T.marked:"variable"==n&&v(e,r)?"variable-2":t}}(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==f)return e.Pass;if(t.tokenize!=g)return 0;var i,s=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var d=t.cc[c];if(d==P)l=l.prev;else if(d!=ye)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=t.cc[t.cc.length-1])&&(i==z||i==V)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;o&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var u=l.type,p=s==u;return"vardef"==u?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==u&&"{"==s?l.indented:"form"==u?l.indented+a:"stat"==u?l.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||_.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?o||a:0):"switch"!=l.info||p||0==n.doubleIndentSwitch?l.align?l.column+(p?0:1):l.indented+(p?0:a):l.indented+(/^(?:case|default)\b/.test(r)?a:2*a)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:je,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=B&&t!=G||e.cc.pop()}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(1))},function(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(o,s,l){if(l!=e.Init&&l&&o.removeKeyMap("autoCloseTags"),s){var c={name:"autoCloseTags"};("object"!=typeof s||s.whenClosing)&&(c["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}(t)}),("object"!=typeof s||s.whenOpening)&&(c["'>'"]=function(r){return function(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),s=[],l=r.getOption("autoCloseTags"),c=0;cd.ch&&(g=g.slice(0,g.length-u.end+d.ch));var h=g.toLowerCase();if(!g||"string"==u.type&&(u.end!=d.ch||!/[\"\']/.test(u.string.charAt(u.string.length-1))||1==u.string.length)||"tag"==u.type&&m.close||u.string.indexOf("/")==d.ch-u.start-1||E&&i(E,h)>-1||a(r,_.mode.xmlCurrentContext&&_.mode.xmlCurrentContext(p)||[],g,d,!0))return e.Pass;var b="object"==typeof l&&l.emptyTags;if(b&&i(b,g)>-1)s[c]={text:"/>",newPos:e.Pos(d.line,d.ch+2)};else{var v=S&&i(S,h)>-1;s[c]={indent:v,text:">"+(v?"\n\n":"")+""+g+">",newPos:v?e.Pos(d.line+1,0):e.Pos(d.line,d.ch+1)}}}var T="object"==typeof l&&l.dontIndentOnAutoClose;for(c=o.length-1;c>=0;c--){var C=s[c];r.replaceRange(C.text,o[c].head,o[c].anchor,"+insert");var y=r.listSelections().slice(0);y[c]={head:C.newPos,anchor:C.newPos},r.setSelections(y),!T&&C.indent&&(r.indentLine(C.newPos.line,null,!0),r.indentLine(C.newPos.line+1,null,!0))}}(r)}),o.addKeyMap(c)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function r(t,n){for(var r=t.listSelections(),i=[],o=n?"/":"",s=t.getOption("autoCloseTags"),l="object"==typeof s&&s.dontIndentOnSlash,c=0;c"!=t.getLine(d.line).charAt(u.end)&&(m+=">"),i[c]=m}if(t.replaceSelections(i),r=t.listSelections(),!l)for(c=0;c=0&&n[c]==r;c--)++l;for(i=s.to,c=1;c[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,r=/[*+-]\s/;function i(e,n){var r=n.line,i=0,a=0,o=t.exec(e.getLine(r)),s=o[1];do{var l=r+(i+=1),c=e.getLine(l),d=t.exec(c);if(d){var u=d[1],_=parseInt(o[3],10)+i-a,p=parseInt(d[3],10),m=p;if(s!==u||isNaN(p)){if(s.length>u.length)return;if(s.lengthp&&(m=_+1),e.replaceRange(c.replace(t,u+m+d[4]+d[5]),{line:l,ch:0},{line:l,ch:c.length})}}while(d)}e.commands.newlineAndIndentContinueMarkdownList=function(a){if(a.getOption("disableInput"))return e.Pass;for(var o=a.listSelections(),s=[],l=0;l\s*$/.test(m),S=!/>\s*$/.test(m);(E||S)&&a.replaceRange("",{line:c.line,ch:0},{line:c.line,ch:c.ch+1}),s[l]="\n"}else{var h=g[1],b=g[5],v=!(r.test(g[2])||g[2].indexOf(">")>=0),T=v?parseInt(g[3],10)+1+g[4]:g[2].replace("x"," ");s[l]="\n"+h+T+b,v&&i(a,c)}}a.replaceSelections(s)}}(n(1))},function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,o){o&&o!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(a(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:function(t){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var a=r(i,"pairs"),o=t.listSelections(),c=0;c=0;c--){var u=o[c].head;t.replaceRange("",n(u.line,u.ch-1),n(u.line,u.ch+1),"+delete")}},Enter:function(t){var n=s(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var a=t.listSelections(),o=0;o1&&_.indexOf(i)>=0&&t.getRange(n(h.line,h.ch-2),h)==i+i){if(h.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(h.line,h.ch-2))))return e.Pass;E="addFour"}else if(p){var v=0==h.ch?" ":t.getRange(n(h.line,h.ch-1),h);if(e.isWordChar(b)||v==i||e.isWordChar(v))return e.Pass;E="both"}else{if(!g||!(0===b.length||/\s/.test(b)||u.indexOf(b)>-1))return e.Pass;E="both"}else E=p&&c(t,h)?"both":_.indexOf(i)>=0&&t.getRange(h,n(h.line,h.ch+3))==i+i+i?"skipThree":"skip";if(d){if(d!=E)return e.Pass}else d=E}var T=l%2?o.charAt(l-1):i,C=l%2?i:o.charAt(l+1);t.operation((function(){if("skip"==d)t.execCommand("goCharRight");else if("skipThree"==d)for(var r=0;r<3;r++)t.execCommand("goCharRight");else if("surround"==d){var i=t.getSelections();for(r=0;r0,{anchor:new n(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new n(a.head.line,a.head.ch+(o?1:-1))});t.setSelections(i)}else"both"==d?(t.replaceSelection(T+C,null),t.triggerElectric(T+C),t.execCommand("goCharLeft")):"addFour"==d&&(t.replaceSelection(T+T+T+T,"before"),t.execCommand("goCharRight"));var a,o}))}(i,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function c(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}a(t.pairs+"`")}(n(1))},function(e,t,n){!function(e){"use strict";function t(e,t){function n(e){clearTimeout(r.doRedraw),r.doRedraw=setTimeout((function(){r.redraw()}),e)}this.cm=e,this.options=t,this.buttonHeight=t.scrollButtonHeight||e.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=e.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var r=this;e.on("refresh",this.resizeHandler=function(){clearTimeout(r.doUpdate),r.doUpdate=setTimeout((function(){r.computeScale()&&n(20)}),100)}),e.on("markerAdded",this.resizeHandler),e.on("markerCleared",this.resizeHandler),!1!==t.listenForChanges&&e.on("changes",this.changeHandler=function(){n(250)})}e.defineExtension("annotateScrollbar",(function(e){return"string"==typeof e&&(e={className:e}),new t(this,e)})),e.defineOption("scrollButtonHeight",0),t.prototype.computeScale=function(){var e=this.cm,t=(e.getWrapperElement().clientHeight-e.display.barHeight-2*this.buttonHeight)/e.getScrollerElement().scrollHeight;if(t!=this.hScale)return this.hScale=t,!0},t.prototype.update=function(e){this.annotations=e,this.redraw()},t.prototype.redraw=function(e){!1!==e&&this.computeScale();var t=this.cm,n=this.hScale,r=document.createDocumentFragment(),i=this.annotations,a=t.getOption("lineWrapping"),o=a&&1.5*t.defaultTextHeight(),s=null,l=null;function c(e,n){return s!=e.line&&(s=e.line,l=t.getLineHandle(s)),l.widgets&&l.widgets.length||a&&l.height>o?t.charCoords(e,"local")[n?"top":"bottom"]:t.heightAtLine(l,"local")+(n?0:l.height)}var d=t.lastLine();if(t.display.barWidth)for(var u,_=0;_d)){for(var m=u||c(p.from,!0)*n,g=c(p.to,!1)*n;_d)&&!((u=c(i[_+1].from,!0)*n)>g+.9);)g=c((p=i[++_]).to,!1)*n;if(g!=m){var f=Math.max(g-m,3),E=r.appendChild(document.createElement("div"));E.style.cssText="position: absolute; right: 0px; width: "+Math.max(t.display.barWidth-1,2)+"px; top: "+(m+this.buttonHeight)+"px; height: "+f+"px",E.className=this.options.className,p.id&&E.setAttribute("annotation-id",p.id)}}}this.div.textContent="",this.div.appendChild(r)},t.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("changes",this.changeHandler),this.div.parentNode.removeChild(this.div)}}(n(1))},function(e,t,n){!function(e){"use strict";var t="CodeMirror-activeline-background";function n(e){for(var n=0;n1)return s(e);var t=e.getCursor("start"),n=e.getCursor("end"),r=e.state.markedSelection;if(!r.length)return a(e,t,n);var l=r[0].find(),c=r[r.length-1].find();if(!l||!c||n.line-t.line<=8||i(t,c.to)>=0||i(n,l.from)<=0)return s(e);for(;i(t,l.from)>0;)r.shift().clear(),l=r[0].find();for(i(t,l.from)<0&&(l.to.line-t.line<8?(r.shift().clear(),a(e,t,l.to,0)):a(e,t,l.from,0));i(n,c.to)<0;)r.pop().clear(),c=r[r.length-1].find();i(n,c.to)>0&&(n.line-c.from.line<8?(r.pop().clear(),a(e,c.from,n)):a(e,c.to,n))}(e)}))}function n(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){o(e)}))}e.defineOption("styleSelectedText",!1,(function(r,i,a){var l=a&&a!=e.Init;i&&!l?(r.state.markedSelection=[],r.state.markedSelectionStyle="string"==typeof i?i:"CodeMirror-selectedtext",s(r),r.on("cursorActivity",t),r.on("change",n)):!i&&l&&(r.off("cursorActivity",t),r.off("change",n),o(r),r.state.markedSelection=r.state.markedSelectionStyle=null)}));var r=e.Pos,i=e.cmpPos;function a(e,t,n,a){if(0!=i(t,n))for(var o=e.state.markedSelection,s=e.state.markedSelectionStyle,l=t.line;;){var c=l==t.line?t:r(l,0),d=l+8,u=d>=n.line,_=u?n:r(d,0),p=e.markText(c,_,{className:s});if(null==a?o.push(p):o.splice(a++,0,p),u)break;l=d}}function o(e){for(var t=e.state.markedSelection,n=0;n=c){if(_&&o&&_.test(o.className))return;a=i(s.indicatorOpen)}}(a||o)&&e.setGutterMarker(n,s.gutter,a)}))}function o(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function s(e){var t=e.getViewport(),n=e.state.foldGutter;n&&(e.operation((function(){a(e,t.from,t.to)})),n.from=t.from,n.to=t.to)}function l(e,n,i){var a=e.state.foldGutter;if(a){var o=a.options;if(i==o.gutter){var s=r(e,n);s?s.clear():e.foldCode(t(n,0),o)}}}function c(e){var t=e.state.foldGutter;if(t){var n=t.options;t.from=t.to=0,clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){s(e)}),n.foldOnChangeTimeSpan||600)}}function d(e){var t=e.state.foldGutter;if(t){var n=t.options;clearTimeout(t.changeUpdate),t.changeUpdate=setTimeout((function(){var n=e.getViewport();t.from==t.to||n.from-t.to>20||t.from-n.to>20?s(e):e.operation((function(){n.fromt.to&&(a(e,t.to,n.to),t.to=n.to)}))}),n.updateViewportTimeSpan||400)}}function u(e,t){var n=e.state.foldGutter;if(n){var r=t.line;r>=n.from&&ri))break;a=o}}return a?{from:e.Pos(r.line,n.getLine(r.line).length),to:e.Pos(a,n.getLine(a).length)}:void 0}}))}(n(1))},function(e,t,n){!function(e){"use strict";e.registerHelper("fold","brace",(function(t,n){var r,i=n.line,a=t.getLine(i);function o(o){for(var s=n.ch,l=0;;){var c=s<=0?-1:a.lastIndexOf(o,s-1);if(-1!=c){if(1==l&&ct.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));if(/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"keyword"!=r.type||"import"!=r.string)return null;for(var i=n,a=Math.min(t.lastLine(),n+10);i<=a;++i){var o=t.getLine(i).indexOf(";");if(-1!=o)return{startCh:r.end,end:e.Pos(i,o)}}}var i,a=n.line,o=r(a);if(!o||r(a-1)||(i=r(a-2))&&i.end.line==a-1)return null;for(var s=o.end;;){var l=r(s.line+1);if(null==l)break;s=l.end}return{from:t.clipPos(e.Pos(a,o.startCh+1)),to:s}})),e.registerHelper("fold","include",(function(t,n){function r(n){if(nt.lastLine())return null;var r=t.getTokenAt(e.Pos(n,1));return/\S/.test(r.string)||(r=t.getTokenAt(e.Pos(n,r.end+1))),"meta"==r.type&&"#include"==r.string.slice(0,8)?r.start+8:void 0}var i=n.line,a=r(i);if(null==a||null!=r(i-1))return null;for(var o=i;null!=r(o+1);)++o;return{from:e.Pos(i,a+1),to:t.clipPos(e.Pos(o))}}))}(n(1))},function(e,t,n){!function(e){"use strict";e.registerHelper("fold","markdown",(function(t,n){function r(n){var r=t.getTokenTypeAt(e.Pos(n,0));return r&&/\bheader\b/.test(r)}function i(e,t,n){var i=t&&t.match(/^#+/);return i&&r(e)?i[0].length:(i=n&&n.match(/^[=\-]+\s*$/))&&r(e+1)?"="==n[0]?1:2:100}var a=t.getLine(n.line),o=t.getLine(n.line+1),s=i(n.line,a,o);if(100!==s){for(var l=t.lastLine(),c=n.line,d=t.getLine(c+2);c ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$)|(?!script|pre|style)[a-z][\\w-]*\\s*>(?=\\h*\\n)[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:g,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading| {0,3}>|<\/?(?:tag)(?: +|\n|\/?>)|<(?:script|pre|style|!--))[^\n]+)*)/,text:/^[^\n]+/};function r(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||h.defaults,this.rules=n.normal,this.options.pedantic?this.rules=n.pedantic:this.options.gfm&&(this.options.tables?this.rules=n.tables:this.rules=n.gfm)}n._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,n._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,n.def=u(n.def).replace("label",n._label).replace("title",n._title).getRegex(),n.bullet=/(?:[*+-]|\d+\.)/,n.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,n.item=u(n.item,"gm").replace(/bull/g,n.bullet).getRegex(),n.list=u(n.list).replace(/bull/g,n.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+n.def.source+")").getRegex(),n._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",n._comment=//,n.html=u(n.html,"i").replace("comment",n._comment).replace("tag",n._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),n.paragraph=u(n.paragraph).replace("hr",n.hr).replace("heading",n.heading).replace("lheading",n.lheading).replace("tag",n._tag).getRegex(),n.blockquote=u(n.blockquote).replace("paragraph",n.paragraph).getRegex(),n.normal=f({},n),n.gfm=f({},n.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\n? *\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),n.gfm.paragraph=u(n.paragraph).replace("(?!","(?!"+n.gfm.fences.source.replace("\\1","\\2")+"|"+n.list.source.replace("\\1","\\3")+"|").getRegex(),n.tables=f({},n.gfm,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),n.pedantic=f({},n.normal,{html:u("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",n._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/}),r.rules=n,r.lex=function(e,t){return new r(t).lex(e)},r.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)},r.prototype.token=function(e,t){var r,i,a,o,s,l,c,d,u,_,p,m,g,f,h,b;for(e=e.replace(/^ +$/gm,"");e;)if((a=this.rules.newline.exec(e))&&(e=e.substring(a[0].length),a[0].length>1&&this.tokens.push({type:"space"})),a=this.rules.code.exec(e))e=e.substring(a[0].length),a=a[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?a:S(a,"\n")});else if(a=this.rules.fences.exec(e))e=e.substring(a[0].length),this.tokens.push({type:"code",lang:a[2],text:a[3]||""});else if(a=this.rules.heading.exec(e))e=e.substring(a[0].length),this.tokens.push({type:"heading",depth:a[1].length,text:a[2]});else if(t&&(a=this.rules.nptable.exec(e))&&(l={type:"table",header:E(a[1].replace(/^ *| *\| *$/g,"")),align:a[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:a[3]?a[3].replace(/\n$/,"").split("\n"):[]}).header.length===l.align.length){for(e=e.substring(a[0].length),p=0;p ?/gm,""),this.token(a,t),this.tokens.push({type:"blockquote_end"});else if(a=this.rules.list.exec(e)){for(e=e.substring(a[0].length),c={type:"list_start",ordered:f=(o=a[2]).length>1,start:f?+o:"",loose:!1},this.tokens.push(c),d=[],r=!1,g=(a=a[0].match(this.rules.item)).length,p=0;p1&&s.length>1||(e=a.slice(p+1).join("\n")+e,p=g-1)),i=r||/\n\n(?!\s*$)/.test(l),p!==g-1&&(r="\n"===l.charAt(l.length-1),i||(i=r)),i&&(c.loose=!0),b=void 0,(h=/^\[[ xX]\] /.test(l))&&(b=" "!==l[1],l=l.replace(/^\[[ xX]\] +/,"")),u={type:"list_item_start",task:h,checked:b,loose:i},d.push(u),this.tokens.push(u),this.token(l,!1),this.tokens.push({type:"list_item_end"});if(c.loose)for(g=d.length,p=0;p?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:g,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(href(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s])__(?!_)|^\*\*([^\s])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*"<\[])\*(?!\*)|^_([^\s][\s\S]*?[^\s_])_(?!_|[^\s.])|^_([^\s_][\s\S]*?[^\s])_(?!_|[^\s.])|^\*([^\s"<\[][\s\S]*?[^\s*])\*(?!\*)|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:g,text:/^(`+|[^`])[\s\S]*?(?=[\\?@\[\]\\^_`{|}~])/g,i._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,i._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,i.autolink=u(i.autolink).replace("scheme",i._scheme).replace("email",i._email).getRegex(),i._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,i.tag=u(i.tag).replace("comment",n._comment).replace("attribute",i._attribute).getRegex(),i._label=/(?:\[[^\[\]]*\]|\\[\[\]]?|`[^`]*`|[^\[\]\\])*?/,i._href=/\s*(<(?:\\[<>]?|[^\s<>\\])*>|(?:\\[()]?|\([^\s\x00-\x1f\\]*\)|[^\s\x00-\x1f()\\])*?)/,i._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,i.link=u(i.link).replace("label",i._label).replace("href",i._href).replace("title",i._title).getRegex(),i.reflink=u(i.reflink).replace("label",i._label).getRegex(),i.normal=f({},i),i.pedantic=f({},i.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",i._label).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",i._label).getRegex()}),i.gfm=f({},i.normal,{escape:u(i.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:u(i.text).replace("]|","~]|").replace("|$","|https?://|ftp://|www\\.|[a-zA-Z0-9.!#$%&'*+/=?^_`{\\|}~-]+@|$").getRegex()}),i.gfm.url=u(i.gfm.url).replace("email",i.gfm._extended_email).getRegex(),i.breaks=f({},i.gfm,{br:u(i.br).replace("{2,}","*").getRegex(),text:u(i.gfm.text).replace("{2,}","*").getRegex()}),a.rules=i,a.output=function(e,t,n){return new a(t,n).output(e)},a.prototype.output=function(e){for(var t,n,r,i,o,s,l="";e;)if(o=this.rules.escape.exec(e))e=e.substring(o[0].length),l+=o[1];else if(o=this.rules.autolink.exec(e))e=e.substring(o[0].length),r="@"===o[2]?"mailto:"+(n=c(this.mangle(o[1]))):n=c(o[1]),l+=this.renderer.link(r,null,n);else if(this.inLink||!(o=this.rules.url.exec(e))){if(o=this.rules.tag.exec(e))!this.inLink&&/^/i.test(o[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(o[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(o[0])&&(this.inRawBlock=!1),e=e.substring(o[0].length),l+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):c(o[0]):o[0];else if(o=this.rules.link.exec(e))e=e.substring(o[0].length),this.inLink=!0,r=o[2],this.options.pedantic?(t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r))?(r=t[1],i=t[3]):i="":i=o[3]?o[3].slice(1,-1):"",r=r.trim().replace(/^<([\s\S]*)>$/,"$1"),l+=this.outputLink(o,{href:a.escapes(r),title:a.escapes(i)}),this.inLink=!1;else if((o=this.rules.reflink.exec(e))||(o=this.rules.nolink.exec(e))){if(e=e.substring(o[0].length),t=(o[2]||o[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){l+=o[0].charAt(0),e=o[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(o,t),this.inLink=!1}else if(o=this.rules.strong.exec(e))e=e.substring(o[0].length),l+=this.renderer.strong(this.output(o[4]||o[3]||o[2]||o[1]));else if(o=this.rules.em.exec(e))e=e.substring(o[0].length),l+=this.renderer.em(this.output(o[6]||o[5]||o[4]||o[3]||o[2]||o[1]));else if(o=this.rules.code.exec(e))e=e.substring(o[0].length),l+=this.renderer.codespan(c(o[2].trim(),!0));else if(o=this.rules.br.exec(e))e=e.substring(o[0].length),l+=this.renderer.br();else if(o=this.rules.del.exec(e))e=e.substring(o[0].length),l+=this.renderer.del(this.output(o[1]));else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),this.inRawBlock?l+=this.renderer.text(o[0]):l+=this.renderer.text(c(this.smartypants(o[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===o[2])r="mailto:"+(n=c(o[0]));else{do{s=o[0],o[0]=this.rules._backpedal.exec(o[0])[0]}while(s!==o[0]);n=c(o[0]),r="www."===o[1]?"http://"+n:n}e=e.substring(o[0].length),l+=this.renderer.link(r,null,n)}return l},a.escapes=function(e){return e?e.replace(a.rules._escapes,"$1"):e},a.prototype.outputLink=function(e,t){var n=t.href,r=t.title?c(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,c(e[1]))},a.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},a.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},o.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:c(e,!0))+"
\n":""+(n?e:c(e,!0))+"
"},o.prototype.blockquote=function(e){return"\n"+e+"
\n"},o.prototype.html=function(e){return e},o.prototype.heading=function(e,t,n){return this.options.headerIds?"\n":""+e+"\n"},o.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},o.prototype.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+""+r+">\n"},o.prototype.listitem=function(e){return""+e+"\n"},o.prototype.checkbox=function(e){return" "},o.prototype.paragraph=function(e){return""+e+"
\n"},o.prototype.table=function(e,t){return t&&(t=""+t+""),"\n"},o.prototype.tablerow=function(e){return"\n"+e+"
\n"},o.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+""+n+">\n"},o.prototype.strong=function(e){return""+e+""},o.prototype.em=function(e){return""+e+""},o.prototype.codespan=function(e){return""+e+"
"},o.prototype.br=function(){return this.options.xhtml?"
":"
"},o.prototype.del=function(e){return""+e+""},o.prototype.link=function(e,t,n){if(null===(e=_(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"+n+""},o.prototype.image=function(e,t,n){if(null===(e=_(this.options.sanitize,this.options.baseUrl,e)))return n;var r='":">"},o.prototype.text=function(e){return e},s.prototype.strong=s.prototype.em=s.prototype.codespan=s.prototype.del=s.prototype.text=function(e){return e},s.prototype.link=s.prototype.image=function(e,t,n){return""+n},s.prototype.br=function(){return""},l.parse=function(e,t){return new l(t).parse(e)},l.prototype.parse=function(e){this.inline=new a(e.links,this.options),this.inlineText=new a(e.links,f({},this.options,{renderer:new s})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},l.prototype.next=function(){return this.token=this.tokens.pop()},l.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},l.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},l.prototype.tok=function(){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,d(this.inlineText.output(this.token.text)));case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i="",a="";for(n="",e=0;e"']/,c.escapeReplace=/[&<>"']/g,c.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},c.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,c.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var p={},m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function g(){}function f(e){for(var t,n,r=1;r=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.lengthAn error occurred: