You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
116 lines
378 KiB
116 lines
378 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[34,7,13],{"+NIl":function(ht,nt,_){(function(G){G(_("VrN/"))})(function(G){"use strict";G.defineMode("stex",function(xe,se){"use strict";function Le(Q,U){Q.cmdState.push(U)}function we(Q){return Q.cmdState.length>0?Q.cmdState[Q.cmdState.length-1]:null}function q(Q){var U=Q.cmdState.pop();U&&U.closeBracket()}function M(Q){for(var U=Q.cmdState,B=U.length-1;B>=0;B--){var I=U[B];if(I.name=="DEFAULT")continue;return I}return{styleIdentifier:function(){return null}}}function W(Q,U,B){return function(){this.name=Q,this.bracketNo=0,this.style=U,this.styles=B,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var Z={};Z.importmodule=W("importmodule","tag",["string","builtin"]),Z.documentclass=W("documentclass","tag",["","atom"]),Z.usepackage=W("usepackage","tag",["atom"]),Z.begin=W("begin","tag",["atom"]),Z.end=W("end","tag",["atom"]),Z.label=W("label","tag",["atom"]),Z.ref=W("ref","tag",["atom"]),Z.eqref=W("eqref","tag",["atom"]),Z.cite=W("cite","tag",["atom"]),Z.bibitem=W("bibitem","tag",["atom"]),Z.Bibitem=W("Bibitem","tag",["atom"]),Z.RBibitem=W("RBibitem","tag",["atom"]),Z.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function X(Q,U){Q.f=U}function D(Q,U){var B;if(Q.match(/^\\[a-zA-Z@]+/)){var I=Q.current().slice(1);return B=Z.hasOwnProperty(I)?Z[I]:Z.DEFAULT,B=new B,Le(U,B),X(U,be),B.style}if(Q.match(/^\\[$&%#{}_]/))return"tag";if(Q.match(/^\\[,;!\/\\]/))return"tag";if(Q.match("\\["))return X(U,function(ce,Te){return S(ce,Te,"\\]")}),"keyword";if(Q.match("\\("))return X(U,function(ce,Te){return S(ce,Te,"\\)")}),"keyword";if(Q.match("$$"))return X(U,function(ce,Te){return S(ce,Te,"$$")}),"keyword";if(Q.match("$"))return X(U,function(ce,Te){return S(ce,Te,"$")}),"keyword";var oe=Q.next();if(oe=="%")return Q.skipToEnd(),"comment";if(oe=="}"||oe=="]"){if(B=we(U),B)B.closeBracket(oe),X(U,be);else return"error";return"bracket"}else return oe=="{"||oe=="["?(B=Z.DEFAULT,B=new B,Le(U,B),"bracket"):/\d/.test(oe)?(Q.eatWhile(/[\w.%]/),"atom"):(Q.eatWhile(/[\w\-_]/),B=M(U),B.name=="begin"&&(B.argument=Q.current()),B.styleIdentifier())}function S(Q,U,B){if(Q.eatSpace())return null;if(B&&Q.match(B))return X(U,D),"keyword";if(Q.match(/^\\[a-zA-Z@]+/))return"tag";if(Q.match(/^[a-zA-Z]+/))return"variable-2";if(Q.match(/^\\[$&%#{}_]/))return"tag";if(Q.match(/^\\[,;!\/]/))return"tag";if(Q.match(/^[\^_&]/))return"tag";if(Q.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Q.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var I=Q.next();return I=="{"||I=="}"||I=="["||I=="]"||I=="("||I==")"?"bracket":I=="%"?(Q.skipToEnd(),"comment"):"error"}function be(Q,U){var B=Q.peek(),I;return B=="{"||B=="["?(I=we(U),I.openBracket(B),Q.eat(B),X(U,D),"bracket"):/[ \t\r]/.test(B)?(Q.eat(B),null):(X(U,D),q(U),D(Q,U))}return{startState:function(){var Q=se.inMathMode?function(U,B){return S(U,B)}:D;return{cmdState:[],f:Q}},copyState:function(Q){return{cmdState:Q.cmdState.slice(),f:Q.f}},token:function(Q,U){return U.f(Q,U)},blankLine:function(Q){Q.f=D,Q.cmdState.length=0},lineComment:"%"}}),G.defineMIME("text/x-stex","stex"),G.defineMIME("text/x-latex","stex")})},"19Vz":function(ht,nt,_){(function(G){G(_("VrN/"))})(function(G){G.defineOption("placeholder","",function(W,Z,X){var D=X&&X!=G.Init;if(Z&&!D)W.on("blur",we),W.on("change",q),W.on("swapDoc",q),G.on(W.getInputField(),"compositionupdate",W.state.placeholderCompose=function(){Le(W)}),q(W);else if(!Z&&D){W.off("blur",we),W.off("change",q),W.off("swapDoc",q),G.off(W.getInputField(),"compositionupdate",W.state.placeholderCompose),xe(W);var S=W.getWrapperElement();S.className=S.className.replace(" CodeMirror-empty","")}Z&&!W.hasFocus()&&we(W)});function xe(W){W.state.placeholder&&(W.state.placeholder.parentNode.removeChild(W.state.placeholder),W.state.placeholder=null)}function se(W){xe(W);var Z=W.state.placeholder=document.createElement("pre");Z.style.cssText="height: 0; overflow: visible",Z.style.direction=W.getOption("direction"),Z.className="CodeMirror-placeholder CodeMirror-line-like";var X=W.getOption("placeholder");typeof X=="string"&&(X=document.createTextNode(X)),Z.appendChild(X),W.display.lineSpace.insertBefore(Z,W.display.lineSpace.firstChild)}function Le(W){setTimeout(function(){var Z=!1,X=W.getInputField();X.nodeName=="TEXTAREA"?Z=!X.value:W.lineCount()==1&&(Z=!/[^\u200b]/.test(X.querySelector(".CodeMirror-line").textContent)),Z?se(W):xe(W)},20)}function we(W){M(W)&&se(W)}function q(W){var Z=W.getWrapperElement(),X=M(W);Z.className=Z.className.replace(" CodeMirror-empty","")+(X?" CodeMirror-empty":""),X?se(W):xe(W)}function M(W){return W.lineCount()===1&&W.getLine(0)===""}})},"1eCo":function(ht,nt,_){(function(G){G(_("VrN/"))})(function(G){"use strict";var xe={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},se={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};G.defineMode("xml",function(Le,we){var q=Le.indentUnit,M={},W=we.htmlMode?xe:se;for(var Z in W)M[Z]=W[Z];for(var Z in we)M[Z]=we[Z];var X,D;function S(b,ne){function F(j){return ne.tokenize=j,j(b,ne)}var x=b.next();if(x=="<")return b.eat("!")?b.eat("[")?b.match("CDATA[")?F(U("atom","]]>")):null:b.match("--")?F(U("comment","-->")):b.match("DOCTYPE",!0,!0)?(b.eatWhile(/[\w\._\-]/),F(B(1))):null:b.eat("?")?(b.eatWhile(/[\w\._\-]/),ne.tokenize=U("meta","?>"),"meta"):(X=b.eat("/")?"closeTag":"openTag",ne.tokenize=be,"tag bracket");if(x=="&"){var ee;return b.eat("#")?b.eat("x")?ee=b.eatWhile(/[a-fA-F\d]/)&&b.eat(";"):ee=b.eatWhile(/[\d]/)&&b.eat(";"):ee=b.eatWhile(/[\w\.\-:]/)&&b.eat(";"),ee?"atom":"error"}else return b.eatWhile(/[^&<]/),null}S.isInText=!0;function be(b,ne){var F=b.next();if(F==">"||F=="/"&&b.eat(">"))return ne.tokenize=S,X=F==">"?"endTag":"selfcloseTag","tag bracket";if(F=="=")return X="equals",null;if(F=="<"){ne.tokenize=S,ne.state=Te,ne.tagName=ne.tagStart=null;var x=ne.tokenize(b,ne);return x?x+" tag error":"tag error"}else return/[\'\"]/.test(F)?(ne.tokenize=Q(F),ne.stringStartCol=b.column(),ne.tokenize(b,ne)):(b.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Q(b){var ne=function(F,x){for(;!F.eol();)if(F.next()==b){x.tokenize=be;break}return"string"};return ne.isInAttribute=!0,ne}function U(b,ne){return function(F,x){for(;!F.eol();){if(F.match(ne)){x.tokenize=S;break}F.next()}return b}}function B(b){return function(ne,F){for(var x;(x=ne.next())!=null;){if(x=="<")return F.tokenize=B(b+1),F.tokenize(ne,F);if(x==">")if(b==1){F.tokenize=S;break}else return F.tokenize=B(b-1),F.tokenize(ne,F)}return"meta"}}function I(b,ne,F){this.prev=b.context,this.tagName=ne,this.indent=b.indented,this.startOfLine=F,(M.doNotIndent.hasOwnProperty(ne)||b.context&&b.context.noIndent)&&(this.noIndent=!0)}function oe(b){b.context&&(b.context=b.context.prev)}function ce(b,ne){for(var F;;){if(!b.context)return;if(F=b.context.tagName,!M.contextGrabbers.hasOwnProperty(F)||!M.contextGrabbers[F].hasOwnProperty(ne))return;oe(b)}}function Te(b,ne,F){return b=="openTag"?(F.tagStart=ne.column(),Xe):b=="closeTag"?Ie:Te}function Xe(b,ne,F){return b=="word"?(F.tagName=ne.current(),D="tag",me):M.allowMissingTagName&&b=="endTag"?(D="tag bracket",me(b,ne,F)):(D="error",Xe)}function Ie(b,ne,F){if(b=="word"){var x=ne.current();return F.context&&F.context.tagName!=x&&M.implicitlyClosed.hasOwnProperty(F.context.tagName)&&oe(F),F.context&&F.context.tagName==x||M.matchClosing===!1?(D="tag",Re):(D="tag error",We)}else return M.allowMissingTagName&&b=="endTag"?(D="tag bracket",Re(b,ne,F)):(D="error",We)}function Re(b,ne,F){return b!="endTag"?(D="error",Re):(oe(F),Te)}function We(b,ne,F){return D="error",Re(b,ne,F)}function me(b,ne,F){if(b=="word")return D="attribute",ge;if(b=="endTag"||b=="selfcloseTag"){var x=F.tagName,ee=F.tagStart;return F.tagName=F.tagStart=null,b=="selfcloseTag"||M.autoSelfClosers.hasOwnProperty(x)?ce(F,x):(ce(F,x),F.context=new I(F,x,ee==F.indented)),Te}return D="error",me}function ge(b,ne,F){return b=="equals"?Pe:(M.allowMissing||(D="error"),me(b,ne,F))}function Pe(b,ne,F){return b=="string"?ae:b=="word"&&M.allowUnquoted?(D="string",me):(D="error",me(b,ne,F))}function ae(b,ne,F){return b=="string"?ae:me(b,ne,F)}return{startState:function(b){var ne={tokenize:S,state:Te,indented:b||0,tagName:null,tagStart:null,context:null};return b!=null&&(ne.baseIndent=b),ne},token:function(b,ne){if(!ne.tagName&&b.sol()&&(ne.indented=b.indentation()),b.eatSpace())return null;X=null;var F=ne.tokenize(b,ne);return(F||X)&&F!="comment"&&(D=null,ne.state=ne.state(X||F,b,ne),D&&(F=D=="error"?F+" error":D)),F},indent:function(b,ne,F){var x=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+q;if(x&&x.noIndent)return G.Pass;if(b.tokenize!=be&&b.tokenize!=S)return F?F.match(/^(\s*)/)[0].length:0;if(b.tagName)return M.multilineTagIndentPastTag!==!1?b.tagStart+b.tagName.length+2:b.tagStart+q*(M.multilineTagIndentFactor||1);if(M.alignCDATA&&/<!\[CDATA\[/.test(ne))return 0;var ee=ne&&/^<(\/)?([\w_:\.-]*)/.exec(ne);if(ee&&ee[1])for(;x;)if(x.tagName==ee[2]){x=x.prev;break}else if(M.implicitlyClosed.hasOwnProperty(x.tagName))x=x.prev;else break;else if(ee)for(;x;){var j=M.contextGrabbers[x.tagName];if(j&&j.hasOwnProperty(ee[2]))x=x.prev;else break}for(;x&&x.prev&&!x.startOfLine;)x=x.prev;return x?x.indent+q:b.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:M.htmlMode?"html":"xml",helperType:M.htmlMode?"html":"xml",skipAttribute:function(b){b.state==Pe&&(b.state=me)},xmlCurrentTag:function(b){return b.tagName?{name:b.tagName,close:b.type=="closeTag"}:null},xmlCurrentContext:function(b){for(var ne=[],F=b.context;F;F=F.prev)F.tagName&&ne.push(F.tagName);return ne.reverse()}}}),G.defineMIME("text/xml","xml"),G.defineMIME("application/xml","xml"),G.mimeModes.hasOwnProperty("text/html")||G.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"7Cbv":function(ht,nt,_){"use strict";var G=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),xe=new Uint8Array(16);function se(){if(!G)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return G(xe)}var Le=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function we(be){return typeof be=="string"&&Le.test(be)}for(var q=we,M=[],W=0;W<256;++W)M.push((W+256).toString(16).substr(1));function Z(be){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,U=(M[be[Q+0]]+M[be[Q+1]]+M[be[Q+2]]+M[be[Q+3]]+"-"+M[be[Q+4]]+M[be[Q+5]]+"-"+M[be[Q+6]]+M[be[Q+7]]+"-"+M[be[Q+8]]+M[be[Q+9]]+"-"+M[be[Q+10]]+M[be[Q+11]]+M[be[Q+12]]+M[be[Q+13]]+M[be[Q+14]]+M[be[Q+15]]).toLowerCase();if(!q(U))throw TypeError("Stringified UUID is invalid");return U}var X=Z;function D(be,Q,U){be=be||{};var B=be.random||(be.rng||se)();if(B[6]=B[6]&15|64,B[8]=B[8]&63|128,Q){U=U||0;for(var I=0;I<16;++I)Q[U+I]=B[I];return Q}return X(B)}var S=nt.a=D},"7ahc":function(ht,nt,_){"use strict";_.d(nt,"a",function(){return Xe});var G=_("k1fw"),xe=_("0Owb"),se=_("+L6B"),Le=_("2/Rp"),we=_("y8nQ"),q=_("Vl3Y"),M=_("tJVT"),W=_("OaEy"),Z=_("2fM7"),X=_("cDcd"),D=_.n(X),S=_("VrN/"),be=_.n(S),Q=_("p77/"),U=_.n(Q),B=_("c5Ni"),I=_.n(B),oe=Z.a.Option,ce={labelCol:{span:4},wrapperCol:{span:20}},Te={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};nt.b=function(Ie){var Re=Ie.callback,We=Ie.onCancel,me=Object(X.useState)("python"),ge=Object(M.a)(me,2),Pe=ge[0],ae=ge[1];function b(F){ae(Te[F][1])}function ne(F){Re(F)}return D.a.createElement(q.a,Object(xe.a)({},ce,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:ne}),D.a.createElement(q.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},D.a.createElement(Z.a,{onChange:b},Object.keys(Te).map(function(F){return D.a.createElement(oe,{key:F,value:F},Te[F][0])}))),D.a.createElement(q.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},D.a.createElement(Xe,{mode:Pe})),D.a.createElement("div",{className:"flex-container flex-end"},D.a.createElement(Le.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),D.a.createElement(Le.a,{type:"ghost",onClick:We},"\u53D6\u6D88")))};function Xe(Ie){var Re=Ie.value,We=Ie.onChange,me=Ie.mode,ge=Ie.options,Pe=ge===void 0?{}:ge,ae=Object(X.useRef)(),b=Object(X.useState)(),ne=Object(M.a)(b,2),F=ne[0],x=ne[1];return Object(X.useEffect)(function(){if(F){function ee(j){var O=j.getValue();We&&We(O)}return F.on("change",ee),function(){F.off("change",ee)}}},[F,We]),Object(X.useEffect)(function(){F&&F.setOption("mode",me)},[F,me]),Object(X.useEffect)(function(){F&&((Re!==F.getValue()||Re==="")&&setTimeout(function(){F.setValue(Re||" ")},300))},[F,Re]),Object(X.useEffect)(function(){if(ae.current&&!F){var ee=be.a.fromTextArea(ae.current,Object(G.a)({mode:me,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Pe));x(ee)}},[ae.current,F]),D.a.createElement("div",{className:"my-codemirror-container"},D.a.createElement("textarea",{ref:ae}))}},"8EBN":function(ht,nt,_){(function(G){G(_("VrN/"))})(function(G){"use strict";G.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"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var xe=0;xe<G.modeInfo.length;xe++){var se=G.modeInfo[xe];se.mimes&&(se.mime=se.mimes[0])}G.findModeByMIME=function(Le){Le=Le.toLowerCase();for(var we=0;we<G.modeInfo.length;we++){var q=G.modeInfo[we];if(q.mime==Le)return q;if(q.mimes){for(var M=0;M<q.mimes.length;M++)if(q.mimes[M]==Le)return q}}if(/\+xml$/.test(Le))return G.findModeByMIME("application/xml");if(/\+json$/.test(Le))return G.findModeByMIME("application/json")},G.findModeByExtension=function(Le){Le=Le.toLowerCase();for(var we=0;we<G.modeInfo.length;we++){var q=G.modeInfo[we];if(q.ext){for(var M=0;M<q.ext.length;M++)if(q.ext[M]==Le)return q}}},G.findModeByFileName=function(Le){for(var we=0;we<G.modeInfo.length;we++){var q=G.modeInfo[we];if(q.file&&q.file.test(Le))return q}var M=Le.lastIndexOf("."),W=M>-1&&Le.substring(M+1,Le.length);if(W)return G.findModeByExtension(W)},G.findModeByName=function(Le){Le=Le.toLowerCase();for(var we=0;we<G.modeInfo.length;we++){var q=G.modeInfo[we];if(q.name.toLowerCase()==Le)return q;if(q.alias){for(var M=0;M<q.alias.length;M++)if(q.alias[M].toLowerCase()==Le)return q}}}})},"8hTe":function(ht,nt,_){ht.exports={button:"button___1wy9m"}},"9Bee":function(ht,nt,_){"use strict";var G=_("DYRE"),xe=_("zeV3"),se=_("+L6B"),Le=_("2/Rp"),we=_("k1fw"),q=_("tJVT"),M=_("cDcd"),W=_.n(M),Z=_("vg9a"),X=_("DlQD"),D=_.n(X),S=_("rUJ1");function be(te,V){var $=te.match(/^(\s+)(?:```)/);if($===null)return V;var N=$[1];return V.split(`
|
|
`).map(function(J){var h=J.match(/^\s+/);if(h===null)return J;var C=Object(q.a)(h,1),g=C[0];return g.length>=N.length?J.slice(N.length):J}).join(`
|
|
`)}var Q=[],U=["<ul>"],B=new D.a.Renderer,I=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function oe(){Q.length=0,U=["<ul>"]}var ce={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Te(te,V,$,N){if(V>=te.length||te[V].level<=$)return V;var J=te[V];N.push("<li><a href='#"+J.anchor+"'>"+J.text+"</a>"),V++;var h=[];return V=Te(te,V,J.level,h),h.length>0&&(N.push("<ul>"),h.forEach(function(C){N.push(C)}),N.push("</ul>")),N.push("</li>"),V=Te(te,V,$,N),V}function Xe(){return Te(Q,0,0,U),U.push("</ul>"),U.join("")}var Ie={heading:function(V){var $=I.exec(V);if($)return{type:"heading",raw:$[0],depth:$[1].length,text:$[2]}},fences:function(V){var $=this.rules.block.fences.exec(V);if($){var N=$[0],J=be(N,$[3]||""),h=$[2]?$[2].trim():$[2];if(["latex","katex","math"].indexOf(h)>=0){var C=me(),g=J;J=C,ge[C]={type:"block",expression:g}}return{type:"code",raw:N,lang:h,text:J}}}},Re=/(?:\${2})([^\n`]+?)(?:\${2})/gi,We=0,me=function(){return"__special_katext_id_".concat(We++,"__")},ge={};function Pe(){return ge}function ae(){We=0,ge={}}function b(te){return te=te.replace(Re,function(V,$){var N=me();return ge[N]={type:"inline",expression:$},N}),te}var ne=B.listitem;B.listitem=function(te){return ne(b(te))};var F=B.paragraph;B.paragraph=function(te){return F(b(te))};var x=B.tablecell;B.tablecell=function(te,V){return x(b(te),V)},B.code=function(te,V,$){var N=(V||"").match(/\S*/)[0];return N?["latex","katex","math"].indexOf(N)>=0?"<p class='editormd-tex'>".concat(te,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(V,'">').concat($?te:Object(S.escape)(te,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+($?te:Object(S.escape)(te,!0))+"</code></pre>"},B.heading=function(te,V,$){var N=this.options.headerPrefix+$.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Q.push({anchor:N,level:V,text:te}),"<h"+V+' id="'+N+'">'+te+"</h"+V+">"},D.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),D.a.use({tokenizer:Ie,renderer:B});var ee=D.a,j=_("SJMd"),O=_("ulZh"),k=_.n(O),c=_("m3rI"),s=_("Oy/b"),m=_("p5ED"),A=_("8hTe"),H=_.n(A),pe=/<pre[^>]*>/g;function Ae(te){var V=document.createElement("div");return V.innerHTML=te,V.childNodes.length===0?"":V.childNodes[0].nodeValue}var le=nt.a=function(te){var V=te.value,$=V===void 0?"":V,N=te.edit,J=N===void 0?!1:N,h=te.className,C=te.showTextOnly,g=te.showLines,re=te.replaces,ve=te.zoomImg,Y=te.hasMask,ue=te.style,Ee=ue===void 0?{}:ue,je=te.stylesPrev,Me=je===void 0?{}:je,ke=String($),Se=Object(M.useRef)(),et=Object(M.useRef)(),Ge=Object(M.useState)(""),Ke=Object(q.a)(Ge,2),Ve=Ke[0],st=Ke[1],tt=Object(M.useState)("office"),Je=Object(q.a)(tt,2),fe=Je[0],rt=Je[1],$e=Object(M.useMemo)(function(){try{var L=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,f=/\"\/api\/attachments\/|\"\/attachments\/download\//g,p=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ke=ke.replace(L,"("+c.a.API_SERVER+"/api/attachments/").replace(f,'"'+c.a.API_SERVER+"/api/attachments/").replace(p,'"'+c.a.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`)}catch(ie){}var v=ee(ke),w=Pe();if(ke.match(/\[TOC\]/)&&(v=v.replace("<p>[TOC]</p>",Xe()),oe()),v=v.replace(/(__special_katext_id_\d+__)/g,function(ie,ye){var Ue=w[ye],Ye=Ue.type,Fe=Ue.expression;return Object(s.renderToString)(Ae(Fe)||"",{displayMode:Ye==="block",throwOnError:!1,output:"html"})}),v=v.replace(/▁/g,"\u2581\u2581\u2581"),ae(),C){var R=document.createElement("div");return R.innerHTML=v,R.innerText}return setTimeout(function(){return P()},500),v},[ke]),he=Object(M.useRef)();ce.WebkitLineClamp=g,g&&(Ee=Object(we.a)(Object(we.a)({},Ee),ce));function Oe(L){var f=L.target;if(f.tagName.toUpperCase()==="IMG"){if(ve){var p=f.getAttribute("src");st(p),rt("image")}}else if(f.tagName.toUpperCase()==="A"){var v=f.getAttribute("href");if(v.indexOf("office")>-1)L.preventDefault(),st(v),rt("office");else if(v.indexOf("application/pdf")>-1)L.preventDefault(),st(v),rt("pdf");else if(v.indexOf("text/html")>-1)L.preventDefault(),st(v),rt("html");else if(v.startsWith("#")){L.preventDefault();var w=document.getElementById(v.replace("#",""));w&&w.scrollIntoView(!0)}}}var P=function(){var f,p=(f=he.current)===null||f===void 0?void 0:f.querySelectorAll("video");p==null||p.forEach(function(v){if(v.oncontextmenu=function(){return!1},v.src.indexOf(".m3u8")>-1&&!v.canPlayType("application/vnd.apple.mpegurl")){if(k.a.isSupported()){var w=new k.a;w.loadSource(v.src),w.attachMedia(v)}}})};Object(M.useEffect)(function(){if(he.current&&$e&&($e.match(pe)&&window.PR.prettyPrint()),he.current)return he.current.addEventListener("click",Oe),function(){he.current.removeEventListener("click",Oe),ae(),oe()}},[$e,he.current,Oe]);var T=function(f){if(!J)return;f.target.nodeName==="IMG"?(Se.current.style.display="flex",Se.current.style.width=f.target.clientWidth+"px",Se.current.style.height=f.target.clientHeight+"px",Se.current.style.top=f.target.offsetTop+"px",Se.current.style.left=f.target.offsetLeft+"px",et.current.src=f.target.getAttribute("src")):Se.current.style.display="none"};return W.a.createElement("div",{style:{position:"relative"}},W.a.createElement("div",{ref:he,style:Object(we.a)({},Ee),className:"".concat(h||""," markdown-body ").concat(H.a.mdBody),onMouseOver:T,dangerouslySetInnerHTML:{__html:$e}}),W.a.createElement("div",{ref:Se,className:H.a.button},W.a.createElement(xe.a,null,W.a.createElement(Le.a,{onClick:function(){return openCrop()}},"\u88C1\u526A"),W.a.createElement(Le.a,{onClick:function(){return openEditor()}},"\u7F16\u8F91"))),W.a.createElement("img",{ref:et,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1,top:"-10000px"}}),W.a.createElement(m.a,{close:!0,data:Ve,type:Ve!=null&&Ve.length?fe:"",style:Object(we.a)({},Me),onClose:function(){return st("")}}))}},"9VGf":function(ht,nt,_){"use strict";_.d(nt,"a",function(){return se});var G=_("cDcd"),xe=_.n(G);function se(Le,we){var q=Object(G.useRef)();Object(G.useEffect)(function(){q.current=Le}),Object(G.useEffect)(function(){function M(){q.current()}if(we!==null){var W=setInterval(M,we);return function(){return clearInterval(W)}}},[we])}},"9ivq":function(ht,nt,_){},Bd2K:function(ht,nt,_){(function(G){G(_("VrN/"),_("osHv"))})(function(G){G.defineOption("autoCloseTags",!1,function(Z,X,D){if(D!=G.Init&&D&&Z.removeKeyMap("autoCloseTags"),!X)return;var S={name:"autoCloseTags"};(typeof X!="object"||X.whenClosing!==!1)&&(S["'/'"]=function(be){return q(be)}),(typeof X!="object"||X.whenOpening!==!1)&&(S["'>'"]=function(be){return Le(be)}),Z.addKeyMap(S)});var xe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],se=["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 Le(Z){if(Z.getOption("disableInput"))return G.Pass;for(var X=Z.listSelections(),D=[],S=Z.getOption("autoCloseTags"),be=0;be<X.length;be++){if(!X[be].empty())return G.Pass;var Q=X[be].head,U=Z.getTokenAt(Q),B=G.innerMode(Z.getMode(),U.state),I=B.state,oe=B.mode.xmlCurrentTag&&B.mode.xmlCurrentTag(I),ce=oe&&oe.name;if(!ce)return G.Pass;var Te=B.mode.configuration=="html",Xe=typeof S=="object"&&S.dontCloseTags||Te&&xe,Ie=typeof S=="object"&&S.indentTags||Te&&se;U.end>Q.ch&&(ce=ce.slice(0,ce.length-U.end+Q.ch));var Re=ce.toLowerCase();if(!ce||U.type=="string"&&(U.end!=Q.ch||!/[\"\']/.test(U.string.charAt(U.string.length-1))||U.string.length==1)||U.type=="tag"&&oe.close||U.string.indexOf("/")==Q.ch-U.start-1||Xe&&M(Xe,Re)>-1||W(Z,B.mode.xmlCurrentContext&&B.mode.xmlCurrentContext(I)||[],ce,Q,!0))return G.Pass;var We=typeof S=="object"&&S.emptyTags;if(We&&M(We,ce)>-1){D[be]={text:"/>",newPos:G.Pos(Q.line,Q.ch+2)};continue}var me=Ie&&M(Ie,Re)>-1;D[be]={indent:me,text:">"+(me?`
|
|
|
|
`:"")+"</"+ce+">",newPos:me?G.Pos(Q.line+1,0):G.Pos(Q.line,Q.ch+1)}}for(var ge=typeof S=="object"&&S.dontIndentOnAutoClose,be=X.length-1;be>=0;be--){var Pe=D[be];Z.replaceRange(Pe.text,X[be].head,X[be].anchor,"+insert");var ae=Z.listSelections().slice(0);ae[be]={head:Pe.newPos,anchor:Pe.newPos},Z.setSelections(ae),!ge&&Pe.indent&&(Z.indentLine(Pe.newPos.line,null,!0),Z.indentLine(Pe.newPos.line+1,null,!0))}}function we(Z,X){for(var D=Z.listSelections(),S=[],be=X?"/":"</",Q=Z.getOption("autoCloseTags"),U=typeof Q=="object"&&Q.dontIndentOnSlash,B=0;B<D.length;B++){if(!D[B].empty())return G.Pass;var I=D[B].head,oe=Z.getTokenAt(I),ce=G.innerMode(Z.getMode(),oe.state),Te=ce.state;if(X&&(oe.type=="string"||oe.string.charAt(0)!="<"||oe.start!=I.ch-1))return G.Pass;var Xe,Ie=ce.mode.name!="xml"&&Z.getMode().name=="htmlmixed";if(Ie&&ce.mode.name=="javascript")Xe=be+"script";else if(Ie&&ce.mode.name=="css")Xe=be+"style";else{var Re=ce.mode.xmlCurrentContext&&ce.mode.xmlCurrentContext(Te);if(!Re||Re.length&&W(Z,Re,Re[Re.length-1],I))return G.Pass;Xe=be+Re[Re.length-1]}Z.getLine(I.line).charAt(oe.end)!=">"&&(Xe+=">"),S[B]=Xe}if(Z.replaceSelections(S),D=Z.listSelections(),!U)for(var B=0;B<D.length;B++)(B==D.length-1||D[B].head.line<D[B+1].head.line)&&Z.indentLine(D[B].head.line)}function q(Z){return Z.getOption("disableInput")?G.Pass:we(Z,!0)}G.commands.closeTag=function(Z){return we(Z)};function M(Z,X){if(Z.indexOf)return Z.indexOf(X);for(var D=0,S=Z.length;D<S;++D)if(Z[D]==X)return D;return-1}function W(Z,X,D,S,be){if(!G.scanForClosingTag)return!1;var Q=Math.min(Z.lastLine()+1,S.line+500),U=G.scanForClosingTag(Z,S,null,Q);if(!U||U.tag!=D)return!1;for(var B=be?1:0,I=X.length-1;I>=0&&X[I]==D;I--)++B;S=U.to;for(var I=1;I<B;I++){var oe=G.scanForClosingTag(Z,S,null,Q);if(!oe||oe.tag!=D)return!1;S=oe.to}return!0}})},BjJ7:function(ht,nt,_){"use strict";_.d(nt,"d",function(){return xe}),_.d(nt,"c",function(){return se}),_.d(nt,"e",function(){return Le}),_.d(nt,"b",function(){return we}),_.d(nt,"a",function(){return M});var G=_("m3rI");function xe(W){var Z=!0;if(W.length>0){for(var X=0;X<W.length;X++)if(W[X].compile_success==0||!W[X].compile_success){Z=!1;break}}else Z=!1;return Z}function se(W){for(var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",X=[],D=0;D<W.length;D++){var S=W[D],be=Z?"".concat(Z,"/").concat(S.name):"".concat(S.name);X.push({title:S.name,isLeaf:!(S.type==="tree"),key:be})}return X}function Le(W,Z,X){for(var D=0;D<W.length;D++){var S=W[D];if(S.key===Z){S.children=X;break}S.children&&Le(S.children,Z,X)}return W}function we(W,Z,X){var D;return function(){var S=this,be=arguments,Q=function(){D=null,X||W.apply(S,be)},U=X&&!D;clearTimeout(D),D=setTimeout(Q,Z),U&&W.apply(S,be)}}var q=!0,M=G.a.API_SERVER},"C+DQ":function(ht,nt,_){},DlQD:function(ht,nt,_){(function(G,xe){ht.exports=xe()})(this,function(){"use strict";function G(P,T){for(var L=0;L<T.length;L++){var f=T[L];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(P,f.key,f)}}function xe(P,T,L){return T&&G(P.prototype,T),L&&G(P,L),P}function se(P,T){if(!P)return;if(typeof P=="string")return Le(P,T);var L=Object.prototype.toString.call(P).slice(8,-1);if(L==="Object"&&P.constructor&&(L=P.constructor.name),L==="Map"||L==="Set")return Array.from(P);if(L==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(L))return Le(P,T)}function Le(P,T){(T==null||T>P.length)&&(T=P.length);for(var L=0,f=new Array(T);L<T;L++)f[L]=P[L];return f}function we(P,T){var L;if(typeof Symbol=="undefined"||P[Symbol.iterator]==null){if(Array.isArray(P)||(L=se(P))||T&&P&&typeof P.length=="number"){L&&(P=L);var f=0;return function(){return f>=P.length?{done:!0}:{done:!1,value:P[f++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return L=P[Symbol.iterator](),L.next.bind(L)}function q(P,T){return T={exports:{}},P(T,T.exports),T.exports}var M=q(function(P){function T(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function L(f){P.exports.defaults=f}P.exports={defaults:T(),getDefaults:T,changeDefaults:L}}),W=M.defaults,Z=M.getDefaults,X=M.changeDefaults,D=/[&<>"']/,S=/[&<>"']/g,be=/[<>"']|&(?!#?\w+;)/,Q=/[<>"']|&(?!#?\w+;)/g,U={"&":"&","<":"<",">":">",'"':""","'":"'"},B=function(T){return U[T]};function I(P,T){if(T){if(D.test(P))return P.replace(S,B)}else if(be.test(P))return P.replace(Q,B);return P}var oe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ce(P){return P.replace(oe,function(T,L){return L=L.toLowerCase(),L==="colon"?":":L.charAt(0)==="#"?L.charAt(1)==="x"?String.fromCharCode(parseInt(L.substring(2),16)):String.fromCharCode(+L.substring(1)):""})}var Te=/(^|[^\[])\^/g;function Xe(P,T){P=P.source||P,T=T||"";var L={replace:function(p,v){return v=v.source||v,v=v.replace(Te,"$1"),P=P.replace(p,v),L},getRegex:function(){return new RegExp(P,T)}};return L}var Ie=/[^\w:]/g,Re=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function We(P,T,L){if(P){var f;try{f=decodeURIComponent(ce(L)).replace(Ie,"").toLowerCase()}catch(p){return null}if(f.indexOf("javascript:")===0||f.indexOf("vbscript:")===0||f.indexOf("data:")===0)return null}T&&!Re.test(L)&&(L=b(T,L));try{L=encodeURI(L).replace(/%25/g,"%")}catch(p){return null}return L}var me={},ge=/^[^:]+:\/*[^/]*$/,Pe=/^([^:]+:)[\s\S]*$/,ae=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(P,T){me[" "+P]||(ge.test(P)?me[" "+P]=P+"/":me[" "+P]=ee(P,"/",!0)),P=me[" "+P];var L=P.indexOf(":")===-1;return T.substring(0,2)==="//"?L?T:P.replace(Pe,"$1")+T:T.charAt(0)==="/"?L?T:P.replace(ae,"$1")+T:P+T}var ne={exec:function(){}};function F(P){for(var T=1,L,f;T<arguments.length;T++){L=arguments[T];for(f in L)Object.prototype.hasOwnProperty.call(L,f)&&(P[f]=L[f])}return P}function x(P,T){var L=P.replace(/\|/g,function(v,w,R){for(var ie=!1,ye=w;--ye>=0&&R[ye]==="\\";)ie=!ie;return ie?"|":" |"}),f=L.split(/ \|/),p=0;if(f.length>T)f.splice(T);else for(;f.length<T;)f.push("");for(;p<f.length;p++)f[p]=f[p].trim().replace(/\\\|/g,"|");return f}function ee(P,T,L){var f=P.length;if(f===0)return"";for(var p=0;p<f;){var v=P.charAt(f-p-1);if(v===T&&!L)p++;else if(v!==T&&L)p++;else break}return P.substr(0,f-p)}function j(P,T){if(P.indexOf(T[1])===-1)return-1;for(var L=P.length,f=0,p=0;p<L;p++)if(P[p]==="\\")p++;else if(P[p]===T[0])f++;else if(P[p]===T[1]&&(f--,f<0))return p;return-1}function O(P){P&&P.sanitize&&!P.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var k={escape:I,unescape:ce,edit:Xe,cleanUrl:We,resolveUrl:b,noopTest:ne,merge:F,splitCells:x,rtrim:ee,findClosingBracket:j,checkSanitizeDeprecation:O},c=M.defaults,s=k.rtrim,m=k.splitCells,A=k.escape,H=k.findClosingBracket;function pe(P,T,L){var f=T.href,p=T.title?A(T.title):null,v=P[1].replace(/\\([\[\]])/g,"$1");return P[0].charAt(0)!=="!"?{type:"link",raw:L,href:f,title:p,text:v}:{type:"image",raw:L,href:f,title:p,text:A(v)}}function Ae(P,T){var L=P.match(/^(\s+)(?:```)/);if(L===null)return T;var f=L[1];return T.split(`
|
|
`).map(function(p){var v=p.match(/^\s+/);if(v===null)return p;var w=v[0];return w.length>=f.length?p.slice(f.length):p}).join(`
|
|
`)}var le=function(){function P(L){this.options=L||c}var T=P.prototype;return T.space=function(f){var p=this.rules.block.newline.exec(f);if(p)return p[0].length>1?{type:"space",raw:p[0]}:{raw:`
|
|
`}},T.code=function(f,p){var v=this.rules.block.code.exec(f);if(v){var w=p[p.length-1];if(w&&w.type==="paragraph")return{raw:v[0],text:v[0].trimRight()};var R=v[0].replace(/^ {4}/gm,"");return{type:"code",raw:v[0],codeBlockStyle:"indented",text:this.options.pedantic?R:s(R,`
|
|
`)}}},T.fences=function(f){var p=this.rules.block.fences.exec(f);if(p){var v=p[0],w=Ae(v,p[3]||"");return{type:"code",raw:v,lang:p[2]?p[2].trim():p[2],text:w}}},T.heading=function(f){var p=this.rules.block.heading.exec(f);if(p)return{type:"heading",raw:p[0],depth:p[1].length,text:p[2]}},T.nptable=function(f){var p=this.rules.block.nptable.exec(f);if(p){var v={type:"table",header:m(p[1].replace(/^ *| *\| *$/g,"")),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:p[3]?p[3].replace(/\n$/,"").split(`
|
|
`):[],raw:p[0]};if(v.header.length===v.align.length){var w=v.align.length,R;for(R=0;R<w;R++)/^ *-+: *$/.test(v.align[R])?v.align[R]="right":/^ *:-+: *$/.test(v.align[R])?v.align[R]="center":/^ *:-+ *$/.test(v.align[R])?v.align[R]="left":v.align[R]=null;for(w=v.cells.length,R=0;R<w;R++)v.cells[R]=m(v.cells[R],v.header.length);return v}}},T.hr=function(f){var p=this.rules.block.hr.exec(f);if(p)return{type:"hr",raw:p[0]}},T.blockquote=function(f){var p=this.rules.block.blockquote.exec(f);if(p){var v=p[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:p[0],text:v}}},T.list=function(f){var p=this.rules.block.list.exec(f);if(p){for(var v=p[0],w=p[2],R=w.length>1,ie=w[w.length-1]===")",ye={type:"list",raw:v,ordered:R,start:R?+w.slice(0,-1):"",loose:!1,items:[]},Ue=p[0].match(this.rules.block.item),Ye=!1,Fe,yt,dt,it,kt,xt,Et,Ot=Ue.length,vt=0;vt<Ot;vt++)Fe=Ue[vt],v=Fe,yt=Fe.length,Fe=Fe.replace(/^ *([*+-]|\d+[.)]) */,""),~Fe.indexOf(`
|
|
`)&&(yt-=Fe.length,Fe=this.options.pedantic?Fe.replace(/^ {1,4}/gm,""):Fe.replace(new RegExp("^ {1,"+yt+"}","gm"),"")),vt!==Ot-1&&(dt=this.rules.block.bullet.exec(Ue[vt+1])[0],(R?dt.length===1||!ie&&dt[dt.length-1]===")":dt.length>1||this.options.smartLists&&dt!==w)&&(it=Ue.slice(vt+1).join(`
|
|
`),ye.raw=ye.raw.substring(0,ye.raw.length-it.length),vt=Ot-1)),kt=Ye||/\n\n(?!\s*$)/.test(Fe),vt!==Ot-1&&(Ye=Fe.charAt(Fe.length-1)===`
|
|
`,kt||(kt=Ye)),kt&&(ye.loose=!0),xt=/^\[[ xX]\] /.test(Fe),Et=void 0,xt&&(Et=Fe[1]!==" ",Fe=Fe.replace(/^\[[ xX]\] +/,"")),ye.items.push({type:"list_item",raw:v,task:xt,checked:Et,loose:kt,text:Fe});return ye}},T.html=function(f){var p=this.rules.block.html.exec(f);if(p)return{type:this.options.sanitize?"paragraph":"html",raw:p[0],pre:!this.options.sanitizer&&(p[1]==="pre"||p[1]==="script"||p[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(p[0]):A(p[0]):p[0]}},T.def=function(f){var p=this.rules.block.def.exec(f);if(p){p[3]&&(p[3]=p[3].substring(1,p[3].length-1));var v=p[1].toLowerCase().replace(/\s+/g," ");return{tag:v,raw:p[0],href:p[2],title:p[3]}}},T.table=function(f){var p=this.rules.block.table.exec(f);if(p){var v={type:"table",header:m(p[1].replace(/^ *| *\| *$/g,"")),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:p[3]?p[3].replace(/\n$/,"").split(`
|
|
`):[]};if(v.header.length===v.align.length){v.raw=p[0];var w=v.align.length,R;for(R=0;R<w;R++)/^ *-+: *$/.test(v.align[R])?v.align[R]="right":/^ *:-+: *$/.test(v.align[R])?v.align[R]="center":/^ *:-+ *$/.test(v.align[R])?v.align[R]="left":v.align[R]=null;for(w=v.cells.length,R=0;R<w;R++)v.cells[R]=m(v.cells[R].replace(/^ *\| *| *\| *$/g,""),v.header.length);return v}}},T.lheading=function(f){var p=this.rules.block.lheading.exec(f);if(p)return{type:"heading",raw:p[0],depth:p[2].charAt(0)==="="?1:2,text:p[1]}},T.paragraph=function(f){var p=this.rules.block.paragraph.exec(f);if(p)return{type:"paragraph",raw:p[0],text:p[1].charAt(p[1].length-1)===`
|
|
`?p[1].slice(0,-1):p[1]}},T.text=function(f,p){var v=this.rules.block.text.exec(f);if(v){var w=p[p.length-1];return w&&w.type==="text"?{raw:v[0],text:v[0]}:{type:"text",raw:v[0],text:v[0]}}},T.escape=function(f){var p=this.rules.inline.escape.exec(f);if(p)return{type:"escape",raw:p[0],text:A(p[1])}},T.tag=function(f,p,v){var w=this.rules.inline.tag.exec(f);if(w)return!p&&/^<a /i.test(w[0])?p=!0:p&&/^<\/a>/i.test(w[0])&&(p=!1),!v&&/^<(pre|code|kbd|script)(\s|>)/i.test(w[0])?v=!0:v&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(w[0])&&(v=!1),{type:this.options.sanitize?"text":"html",raw:w[0],inLink:p,inRawBlock:v,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(w[0]):A(w[0]):w[0]}},T.link=function(f){var p=this.rules.inline.link.exec(f);if(p){var v=H(p[2],"()");if(v>-1){var w=p[0].indexOf("!")===0?5:4,R=w+p[1].length+v;p[2]=p[2].substring(0,v),p[0]=p[0].substring(0,R).trim(),p[3]=""}var ie=p[2],ye="";if(this.options.pedantic){var Ue=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ie);Ue?(ie=Ue[1],ye=Ue[3]):ye=""}else ye=p[3]?p[3].slice(1,-1):"";ie=ie.trim().replace(/^<([\s\S]*)>$/,"$1");var Ye=pe(p,{href:ie&&ie.replace(this.rules.inline._escapes,"$1"),title:ye&&ye.replace(this.rules.inline._escapes,"$1")},p[0]);return Ye}},T.reflink=function(f,p){var v;if((v=this.rules.inline.reflink.exec(f))||(v=this.rules.inline.nolink.exec(f))){var w=(v[2]||v[1]).replace(/\s+/g," ");if(w=p[w.toLowerCase()],!w||!w.href){var R=v[0].charAt(0);return{type:"text",raw:R,text:R}}var ie=pe(v,w,v[0]);return ie}},T.strong=function(f,p,v){v===void 0&&(v="");var w=this.rules.inline.strong.start.exec(f);if(w&&(!w[1]||w[1]&&(v===""||this.rules.inline.punctuation.exec(v)))){p=p.slice(-1*f.length);var R=w[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;R.lastIndex=0;for(var ie;(w=R.exec(p))!=null;)if(ie=this.rules.inline.strong.middle.exec(p.slice(0,w.index+3)),ie)return{type:"strong",raw:f.slice(0,ie[0].length),text:f.slice(2,ie[0].length-2)}}},T.em=function(f,p,v){v===void 0&&(v="");var w=this.rules.inline.em.start.exec(f);if(w&&(!w[1]||w[1]&&(v===""||this.rules.inline.punctuation.exec(v)))){p=p.slice(-1*f.length);var R=w[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;R.lastIndex=0;for(var ie;(w=R.exec(p))!=null;)if(ie=this.rules.inline.em.middle.exec(p.slice(0,w.index+2)),ie)return{type:"em",raw:f.slice(0,ie[0].length),text:f.slice(1,ie[0].length-1)}}},T.codespan=function(f){var p=this.rules.inline.code.exec(f);if(p){var v=p[2].replace(/\n/g," "),w=/[^ ]/.test(v),R=v.startsWith(" ")&&v.endsWith(" ");return w&&R&&(v=v.substring(1,v.length-1)),v=A(v,!0),{type:"codespan",raw:p[0],text:v}}},T.br=function(f){var p=this.rules.inline.br.exec(f);if(p)return{type:"br",raw:p[0]}},T.del=function(f){var p=this.rules.inline.del.exec(f);if(p)return{type:"del",raw:p[0],text:p[1]}},T.autolink=function(f,p){var v=this.rules.inline.autolink.exec(f);if(v){var w,R;return v[2]==="@"?(w=A(this.options.mangle?p(v[1]):v[1]),R="mailto:"+w):(w=A(v[1]),R=w),{type:"link",raw:v[0],text:w,href:R,tokens:[{type:"text",raw:w,text:w}]}}},T.url=function(f,p){var v;if(v=this.rules.inline.url.exec(f)){var w,R;if(v[2]==="@")w=A(this.options.mangle?p(v[0]):v[0]),R="mailto:"+w;else{var ie;do ie=v[0],v[0]=this.rules.inline._backpedal.exec(v[0])[0];while(ie!==v[0]);w=A(v[0]),v[1]==="www."?R="http://"+w:R=w}return{type:"link",raw:v[0],text:w,href:R,tokens:[{type:"text",raw:w,text:w}]}}},T.inlineText=function(f,p,v){var w=this.rules.inline.text.exec(f);if(w){var R;return p?R=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(w[0]):A(w[0]):w[0]:R=A(this.options.smartypants?v(w[0]):w[0]),{type:"text",raw:w[0],text:R}}},P}(),te=k.noopTest,V=k.edit,$=k.merge,N={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(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*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:te,table:te,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};N._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,N._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,N.def=V(N.def).replace("label",N._label).replace("title",N._title).getRegex(),N.bullet=/(?:[*+-]|\d{1,9}[.)])/,N.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,N.item=V(N.item,"gm").replace(/bull/g,N.bullet).getRegex(),N.list=V(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=/<!--(?!-?>)[\s\S]*?-->/,N.html=V(N.html,"i").replace("comment",N._comment).replace("tag",N._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),N.paragraph=V(N._paragraph).replace("hr",N.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",N._tag).getRegex(),N.blockquote=V(N.blockquote).replace("paragraph",N.paragraph).getRegex(),N.normal=$({},N),N.gfm=$({},N.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),N.gfm.nptable=V(N.gfm.nptable).replace("hr",N.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",N._tag).getRegex(),N.gfm.table=V(N.gfm.table).replace("hr",N.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",N._tag).getRegex(),N.pedantic=$({},N.normal,{html:V(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\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+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:te,paragraph:V(N.normal._paragraph).replace("hr",N.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",N.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var J={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:te,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:te,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};J._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",J.punctuation=V(J.punctuation).replace(/punctuation/g,J._punctuation).getRegex(),J._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",J._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",J.em.start=V(J.em.start).replace(/punctuation/g,J._punctuation).getRegex(),J.em.middle=V(J.em.middle).replace(/punctuation/g,J._punctuation).replace(/overlapSkip/g,J._overlapSkip).getRegex(),J.em.endAst=V(J.em.endAst,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.em.endUnd=V(J.em.endUnd,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.strong.start=V(J.strong.start).replace(/punctuation/g,J._punctuation).getRegex(),J.strong.middle=V(J.strong.middle).replace(/punctuation/g,J._punctuation).replace(/blockSkip/g,J._blockSkip).getRegex(),J.strong.endAst=V(J.strong.endAst,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.strong.endUnd=V(J.strong.endUnd,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.blockSkip=V(J._blockSkip,"g").getRegex(),J.overlapSkip=V(J._overlapSkip,"g").getRegex(),J._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,J._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,J._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])?)+(?![-_])/,J.autolink=V(J.autolink).replace("scheme",J._scheme).replace("email",J._email).getRegex(),J._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,J.tag=V(J.tag).replace("comment",N._comment).replace("attribute",J._attribute).getRegex(),J._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,J._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,J._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,J.link=V(J.link).replace("label",J._label).replace("href",J._href).replace("title",J._title).getRegex(),J.reflink=V(J.reflink).replace("label",J._label).getRegex(),J.reflinkSearch=V(J.reflinkSearch,"g").replace("reflink",J.reflink).replace("nolink",J.nolink).getRegex(),J.normal=$({},J),J.pedantic=$({},J.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:V(/^!?\[(label)\]\((.*?)\)/).replace("label",J._label).getRegex(),reflink:V(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",J._label).getRegex()}),J.gfm=$({},J.normal,{escape:V(J.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:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),J.gfm.url=V(J.gfm.url,"i").replace("email",J.gfm._extended_email).getRegex(),J.breaks=$({},J.gfm,{br:V(J.br).replace("{2,}","*").getRegex(),text:V(J.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var h={block:N,inline:J},C=M.defaults,g=h.block,re=h.inline;function ve(P){return P.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Y(P){var T="",L,f,p=P.length;for(L=0;L<p;L++)f=P.charCodeAt(L),Math.random()>.5&&(f="x"+f.toString(16)),T+="&#"+f+";";return T}var ue=function(){function P(L){this.tokens=[],this.tokens.links=Object.create(null),this.options=L||C,this.options.tokenizer=this.options.tokenizer||new le,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var f={block:g.normal,inline:re.normal};this.options.pedantic?(f.block=g.pedantic,f.inline=re.pedantic):this.options.gfm&&(f.block=g.gfm,this.options.breaks?f.inline=re.breaks:f.inline=re.gfm),this.tokenizer.rules=f}P.lex=function(f,p){var v=new P(p);return v.lex(f)};var T=P.prototype;return T.lex=function(f){return f=f.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(f,this.tokens,!0),this.inline(this.tokens),this.tokens},T.blockTokens=function(f,p,v){p===void 0&&(p=[]),v===void 0&&(v=!0),f=f.replace(/^ +$/gm,"");for(var w,R,ie,ye;f;){if(w=this.tokenizer.space(f)){f=f.substring(w.raw.length),w.type&&p.push(w);continue}if(w=this.tokenizer.code(f,p)){f=f.substring(w.raw.length),w.type?p.push(w):(ye=p[p.length-1],ye.raw+=`
|
|
`+w.raw,ye.text+=`
|
|
`+w.text);continue}if(w=this.tokenizer.fences(f)){f=f.substring(w.raw.length),p.push(w);continue}if(w=this.tokenizer.heading(f)){f=f.substring(w.raw.length),p.push(w);continue}if(w=this.tokenizer.nptable(f)){f=f.substring(w.raw.length),p.push(w);continue}if(w=this.tokenizer.hr(f)){f=f.substring(w.raw.length),p.push(w);continue}if(w=this.tokenizer.blockquote(f)){f=f.substring(w.raw.length),w.tokens=this.blockTokens(w.text,[],v),p.push(w);continue}if(w=this.tokenizer.list(f)){for(f=f.substring(w.raw.length),ie=w.items.length,R=0;R<ie;R++)w.items[R].tokens=this.blockTokens(w.items[R].text,[],!1);p.push(w);continue}if(w=this.tokenizer.html(f)){f=f.substring(w.raw.length),p.push(w);continue}if(v&&(w=this.tokenizer.def(f))){f=f.substring(w.raw.length),this.tokens.links[w.tag]||(this.tokens.links[w.tag]={href:w.href,title:w.title});continue}if(w=this.tokenizer.table(f)){f=f.substring(w.raw.length),p.push(w);continue}if(w=this.tokenizer.lheading(f)){f=f.substring(w.raw.length),p.push(w);continue}if(v&&(w=this.tokenizer.paragraph(f))){f=f.substring(w.raw.length),p.push(w);continue}if(w=this.tokenizer.text(f,p)){f=f.substring(w.raw.length),w.type?p.push(w):(ye=p[p.length-1],ye.raw+=`
|
|
`+w.raw,ye.text+=`
|
|
`+w.text);continue}if(f){var Ue="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(Ue);break}else throw new Error(Ue)}}return p},T.inline=function(f){var p,v,w,R,ie,ye,Ue=f.length;for(p=0;p<Ue;p++){ye=f[p];switch(ye.type){case"paragraph":case"text":case"heading":{ye.tokens=[],this.inlineTokens(ye.text,ye.tokens);break}case"table":{for(ye.tokens={header:[],cells:[]},R=ye.header.length,v=0;v<R;v++)ye.tokens.header[v]=[],this.inlineTokens(ye.header[v],ye.tokens.header[v]);for(R=ye.cells.length,v=0;v<R;v++)for(ie=ye.cells[v],ye.tokens.cells[v]=[],w=0;w<ie.length;w++)ye.tokens.cells[v][w]=[],this.inlineTokens(ie[w],ye.tokens.cells[v][w]);break}case"blockquote":{this.inline(ye.tokens);break}case"list":{for(R=ye.items.length,v=0;v<R;v++)this.inline(ye.items[v].tokens);break}}}return f},T.inlineTokens=function(f,p,v,w,R){p===void 0&&(p=[]),v===void 0&&(v=!1),w===void 0&&(w=!1),R===void 0&&(R="");var ie,ye=f,Ue;if(this.tokens.links){var Ye=Object.keys(this.tokens.links);if(Ye.length>0)for(;(Ue=this.tokenizer.rules.inline.reflinkSearch.exec(ye))!=null;)Ye.includes(Ue[0].slice(Ue[0].lastIndexOf("[")+1,-1))&&(ye=ye.slice(0,Ue.index)+"["+"a".repeat(Ue[0].length-2)+"]"+ye.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ue=this.tokenizer.rules.inline.blockSkip.exec(ye))!=null;)ye=ye.slice(0,Ue.index)+"["+"a".repeat(Ue[0].length-2)+"]"+ye.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;f;){if(ie=this.tokenizer.escape(f)){f=f.substring(ie.raw.length),p.push(ie);continue}if(ie=this.tokenizer.tag(f,v,w)){f=f.substring(ie.raw.length),v=ie.inLink,w=ie.inRawBlock,p.push(ie);continue}if(ie=this.tokenizer.link(f)){f=f.substring(ie.raw.length),ie.type==="link"&&(ie.tokens=this.inlineTokens(ie.text,[],!0,w)),p.push(ie);continue}if(ie=this.tokenizer.reflink(f,this.tokens.links)){f=f.substring(ie.raw.length),ie.type==="link"&&(ie.tokens=this.inlineTokens(ie.text,[],!0,w)),p.push(ie);continue}if(ie=this.tokenizer.strong(f,ye,R)){f=f.substring(ie.raw.length),ie.tokens=this.inlineTokens(ie.text,[],v,w),p.push(ie);continue}if(ie=this.tokenizer.em(f,ye,R)){f=f.substring(ie.raw.length),ie.tokens=this.inlineTokens(ie.text,[],v,w),p.push(ie);continue}if(ie=this.tokenizer.codespan(f)){f=f.substring(ie.raw.length),p.push(ie);continue}if(ie=this.tokenizer.br(f)){f=f.substring(ie.raw.length),p.push(ie);continue}if(ie=this.tokenizer.del(f)){f=f.substring(ie.raw.length),ie.tokens=this.inlineTokens(ie.text,[],v,w),p.push(ie);continue}if(ie=this.tokenizer.autolink(f,Y)){f=f.substring(ie.raw.length),p.push(ie);continue}if(!v&&(ie=this.tokenizer.url(f,Y))){f=f.substring(ie.raw.length),p.push(ie);continue}if(ie=this.tokenizer.inlineText(f,w,ve)){f=f.substring(ie.raw.length),R=ie.raw.slice(-1),p.push(ie);continue}if(f){var Fe="Infinite loop on byte: "+f.charCodeAt(0);if(this.options.silent){console.error(Fe);break}else throw new Error(Fe)}}return p},xe(P,null,[{key:"rules",get:function(){return{block:g,inline:re}}}]),P}(),Ee=M.defaults,je=k.cleanUrl,Me=k.escape,ke=function(){function P(L){this.options=L||Ee}var T=P.prototype;return T.code=function(f,p,v){var w=(p||"").match(/\S*/)[0];if(this.options.highlight){var R=this.options.highlight(f,w);R!=null&&R!==f&&(v=!0,f=R)}return w?'<pre><code class="'+this.options.langPrefix+Me(w,!0)+'">'+(v?f:Me(f,!0))+`</code></pre>
|
|
`:"<pre><code>"+(v?f:Me(f,!0))+`</code></pre>
|
|
`},T.blockquote=function(f){return`<blockquote>
|
|
`+f+`</blockquote>
|
|
`},T.html=function(f){return f},T.heading=function(f,p,v,w){return this.options.headerIds?"<h"+p+' id="'+this.options.headerPrefix+w.slug(v)+'">'+f+"</h"+p+`>
|
|
`:"<h"+p+">"+f+"</h"+p+`>
|
|
`},T.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},T.list=function(f,p,v){var w=p?"ol":"ul",R=p&&v!==1?' start="'+v+'"':"";return"<"+w+R+`>
|
|
`+f+"</"+w+`>
|
|
`},T.listitem=function(f){return"<li>"+f+`</li>
|
|
`},T.checkbox=function(f){return"<input "+(f?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},T.paragraph=function(f){return"<p>"+f+`</p>
|
|
`},T.table=function(f,p){return p&&(p="<tbody>"+p+"</tbody>"),`<table>
|
|
<thead>
|
|
`+f+`</thead>
|
|
`+p+`</table>
|
|
`},T.tablerow=function(f){return`<tr>
|
|
`+f+`</tr>
|
|
`},T.tablecell=function(f,p){var v=p.header?"th":"td",w=p.align?"<"+v+' align="'+p.align+'">':"<"+v+">";return w+f+"</"+v+`>
|
|
`},T.strong=function(f){return"<strong>"+f+"</strong>"},T.em=function(f){return"<em>"+f+"</em>"},T.codespan=function(f){return"<code>"+f+"</code>"},T.br=function(){return this.options.xhtml?"<br/>":"<br>"},T.del=function(f){return"<del>"+f+"</del>"},T.link=function(f,p,v){if(f=je(this.options.sanitize,this.options.baseUrl,f),f===null)return v;var w='<a href="'+Me(f)+'"';return p&&(w+=' title="'+p+'"'),w+=">"+v+"</a>",w},T.image=function(f,p,v){if(f=je(this.options.sanitize,this.options.baseUrl,f),f===null)return v;var w='<img src="'+f+'" alt="'+v+'"';return p&&(w+=' title="'+p+'"'),w+=this.options.xhtml?"/>":">",w},T.text=function(f){return f},P}(),Se=function(){function P(){}var T=P.prototype;return T.strong=function(f){return f},T.em=function(f){return f},T.codespan=function(f){return f},T.del=function(f){return f},T.html=function(f){return f},T.text=function(f){return f},T.link=function(f,p,v){return""+v},T.image=function(f,p,v){return""+v},T.br=function(){return""},P}(),et=function(){function P(){this.seen={}}var T=P.prototype;return T.slug=function(f){var p=f.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(p)){var v=p;do this.seen[v]++,p=v+"-"+this.seen[v];while(this.seen.hasOwnProperty(p))}return this.seen[p]=0,p},P}(),Ge=M.defaults,Ke=k.unescape,Ve=function(){function P(L){this.options=L||Ge,this.options.renderer=this.options.renderer||new ke,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Se,this.slugger=new et}P.parse=function(f,p){var v=new P(p);return v.parse(f)};var T=P.prototype;return T.parse=function(f,p){p===void 0&&(p=!0);var v="",w,R,ie,ye,Ue,Ye,Fe,yt,dt,it,kt,xt,Et,Ot,vt,sn,Mn,cn,vn=f.length;for(w=0;w<vn;w++){it=f[w];switch(it.type){case"space":continue;case"hr":{v+=this.renderer.hr();continue}case"heading":{v+=this.renderer.heading(this.parseInline(it.tokens),it.depth,Ke(this.parseInline(it.tokens,this.textRenderer)),this.slugger);continue}case"code":{v+=this.renderer.code(it.text,it.lang,it.escaped);continue}case"table":{for(yt="",Fe="",ye=it.header.length,R=0;R<ye;R++)Fe+=this.renderer.tablecell(this.parseInline(it.tokens.header[R]),{header:!0,align:it.align[R]});for(yt+=this.renderer.tablerow(Fe),dt="",ye=it.cells.length,R=0;R<ye;R++){for(Ye=it.tokens.cells[R],Fe="",Ue=Ye.length,ie=0;ie<Ue;ie++)Fe+=this.renderer.tablecell(this.parseInline(Ye[ie]),{header:!1,align:it.align[ie]});dt+=this.renderer.tablerow(Fe)}v+=this.renderer.table(yt,dt);continue}case"blockquote":{dt=this.parse(it.tokens),v+=this.renderer.blockquote(dt);continue}case"list":{for(kt=it.ordered,xt=it.start,Et=it.loose,ye=it.items.length,dt="",R=0;R<ye;R++)vt=it.items[R],sn=vt.checked,Mn=vt.task,Ot="",vt.task&&(cn=this.renderer.checkbox(sn),Et?vt.tokens.length>0&&vt.tokens[0].type==="text"?(vt.tokens[0].text=cn+" "+vt.tokens[0].text,vt.tokens[0].tokens&&vt.tokens[0].tokens.length>0&&vt.tokens[0].tokens[0].type==="text"&&(vt.tokens[0].tokens[0].text=cn+" "+vt.tokens[0].tokens[0].text)):vt.tokens.unshift({type:"text",text:cn}):Ot+=cn),Ot+=this.parse(vt.tokens,Et),dt+=this.renderer.listitem(Ot,Mn,sn);v+=this.renderer.list(dt,kt,xt);continue}case"html":{v+=this.renderer.html(it.text);continue}case"paragraph":{v+=this.renderer.paragraph(this.parseInline(it.tokens));continue}case"text":{for(dt=it.tokens?this.parseInline(it.tokens):it.text;w+1<vn&&f[w+1].type==="text";)it=f[++w],dt+=`
|
|
`+(it.tokens?this.parseInline(it.tokens):it.text);v+=p?this.renderer.paragraph(dt):dt;continue}default:{var pn='Token with "'+it.type+'" type was not found.';if(this.options.silent){console.error(pn);return}else throw new Error(pn)}}}return v},T.parseInline=function(f,p){p=p||this.renderer;var v="",w,R,ie=f.length;for(w=0;w<ie;w++){R=f[w];switch(R.type){case"escape":{v+=p.text(R.text);break}case"html":{v+=p.html(R.text);break}case"link":{v+=p.link(R.href,R.title,this.parseInline(R.tokens,p));break}case"image":{v+=p.image(R.href,R.title,R.text);break}case"strong":{v+=p.strong(this.parseInline(R.tokens,p));break}case"em":{v+=p.em(this.parseInline(R.tokens,p));break}case"codespan":{v+=p.codespan(R.text);break}case"br":{v+=p.br();break}case"del":{v+=p.del(this.parseInline(R.tokens,p));break}case"text":{v+=p.text(R.text);break}default:{var ye='Token with "'+R.type+'" type was not found.';if(this.options.silent){console.error(ye);return}else throw new Error(ye)}}}return v},P}(),st=k.merge,tt=k.checkSanitizeDeprecation,Je=k.escape,fe=M.getDefaults,rt=M.changeDefaults,$e=M.defaults;function he(P,T,L){if(typeof P=="undefined"||P===null)throw new Error("marked(): input parameter is undefined or null");if(typeof P!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(P)+", string expected");if(typeof T=="function"&&(L=T,T=null),T=st({},he.defaults,T||{}),tt(T),L){var f=T.highlight,p;try{p=ue.lex(P,T)}catch(ie){return L(ie)}var v=function(ye){var Ue;if(!ye)try{Ue=Ve.parse(p,T)}catch(Ye){ye=Ye}return T.highlight=f,ye?L(ye):L(null,Ue)};if(!f||f.length<3)return v();if(delete T.highlight,!p.length)return v();var w=0;he.walkTokens(p,function(ie){ie.type==="code"&&(w++,setTimeout(function(){f(ie.text,ie.lang,function(ye,Ue){if(ye)return v(ye);Ue!=null&&Ue!==ie.text&&(ie.text=Ue,ie.escaped=!0),w--,w===0&&v()})},0))}),w===0&&v();return}try{var R=ue.lex(P,T);return T.walkTokens&&he.walkTokens(R,T.walkTokens),Ve.parse(R,T)}catch(ie){if(ie.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,T.silent)return"<p>An error occurred:</p><pre>"+Je(ie.message+"",!0)+"</pre>";throw ie}}he.options=he.setOptions=function(P){return st(he.defaults,P),rt(he.defaults),he},he.getDefaults=fe,he.defaults=$e,he.use=function(P){var T=st({},P);if(P.renderer&&function(){var f=he.defaults.renderer||new ke,p=function(R){var ie=f[R];f[R]=function(){for(var ye=arguments.length,Ue=new Array(ye),Ye=0;Ye<ye;Ye++)Ue[Ye]=arguments[Ye];var Fe=P.renderer[R].apply(f,Ue);return Fe===!1&&(Fe=ie.apply(f,Ue)),Fe}};for(var v in P.renderer)p(v);T.renderer=f}(),P.tokenizer&&function(){var f=he.defaults.tokenizer||new le,p=function(R){var ie=f[R];f[R]=function(){for(var ye=arguments.length,Ue=new Array(ye),Ye=0;Ye<ye;Ye++)Ue[Ye]=arguments[Ye];var Fe=P.tokenizer[R].apply(f,Ue);return Fe===!1&&(Fe=ie.apply(f,Ue)),Fe}};for(var v in P.tokenizer)p(v);T.tokenizer=f}(),P.walkTokens){var L=he.defaults.walkTokens;T.walkTokens=function(f){P.walkTokens(f),L&&L(f)}}he.setOptions(T)},he.walkTokens=function(P,T){for(var L=we(P),f;!(f=L()).done;){var p=f.value;T(p);switch(p.type){case"table":{for(var v=we(p.tokens.header),w;!(w=v()).done;){var R=w.value;he.walkTokens(R,T)}for(var ie=we(p.tokens.cells),ye;!(ye=ie()).done;)for(var Ue=ye.value,Ye=we(Ue),Fe;!(Fe=Ye()).done;){var yt=Fe.value;he.walkTokens(yt,T)}break}case"list":{he.walkTokens(p.items,T);break}default:p.tokens&&he.walkTokens(p.tokens,T)}}},he.Parser=Ve,he.parser=Ve.parse,he.Renderer=ke,he.TextRenderer=Se,he.Lexer=ue,he.lexer=ue.lex,he.Tokenizer=le,he.Slugger=et,he.parse=he;var Oe=he;return Oe})},ELLl:function(ht,nt,_){(function(G){G(_("VrN/"))})(function(G){var xe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},se=G.Pos;G.defineOption("autoCloseBrackets",!1,function(U,B,I){I&&I!=G.Init&&(U.removeKeyMap(we),U.state.closeBrackets=null),B&&(q(Le(B,"pairs")),U.state.closeBrackets=B,U.addKeyMap(we))});function Le(U,B){return B=="pairs"&&typeof U=="string"?U:typeof U=="object"&&U[B]!=null?U[B]:xe[B]}var we={Backspace:Z,Enter:X};function q(U){for(var B=0;B<U.length;B++){var I=U.charAt(B),oe="'"+I+"'";we[oe]||(we[oe]=M(I))}}q(xe.pairs+"`");function M(U){return function(B){return S(B,U)}}function W(U){var B=U.state.closeBrackets;if(!B||B.override)return B;var I=U.getModeAt(U.getCursor());return I.closeBrackets||B}function Z(U){var B=W(U);if(!B||U.getOption("disableInput"))return G.Pass;for(var I=Le(B,"pairs"),oe=U.listSelections(),ce=0;ce<oe.length;ce++){if(!oe[ce].empty())return G.Pass;var Te=be(U,oe[ce].head);if(!Te||I.indexOf(Te)%2!=0)return G.Pass}for(var ce=oe.length-1;ce>=0;ce--){var Xe=oe[ce].head;U.replaceRange("",se(Xe.line,Xe.ch-1),se(Xe.line,Xe.ch+1),"+delete")}}function X(U){var B=W(U),I=B&&Le(B,"explode");if(!I||U.getOption("disableInput"))return G.Pass;for(var oe=U.listSelections(),ce=0;ce<oe.length;ce++){if(!oe[ce].empty())return G.Pass;var Te=be(U,oe[ce].head);if(!Te||I.indexOf(Te)%2!=0)return G.Pass}U.operation(function(){var Xe=U.lineSeparator()||`
|
|
`;U.replaceSelection(Xe+Xe,null),U.execCommand("goCharLeft"),oe=U.listSelections();for(var Ie=0;Ie<oe.length;Ie++){var Re=oe[Ie].head.line;U.indentLine(Re,null,!0),U.indentLine(Re+1,null,!0)}})}function D(U){var B=G.cmpPos(U.anchor,U.head)>0;return{anchor:new se(U.anchor.line,U.anchor.ch+(B?-1:1)),head:new se(U.head.line,U.head.ch+(B?1:-1))}}function S(U,B){var I=W(U);if(!I||U.getOption("disableInput"))return G.Pass;var oe=Le(I,"pairs"),ce=oe.indexOf(B);if(ce==-1)return G.Pass;for(var Te=Le(I,"closeBefore"),Xe=Le(I,"triples"),Ie=oe.charAt(ce+1)==B,Re=U.listSelections(),We=ce%2==0,me,ge=0;ge<Re.length;ge++){var Pe=Re[ge],ae=Pe.head,b,ne=U.getRange(ae,se(ae.line,ae.ch+1));if(We&&!Pe.empty())b="surround";else if((Ie||!We)&&ne==B)Ie&&Q(U,ae)?b="both":Xe.indexOf(B)>=0&&U.getRange(ae,se(ae.line,ae.ch+3))==B+B+B?b="skipThree":b="skip";else if(Ie&&ae.ch>1&&Xe.indexOf(B)>=0&&U.getRange(se(ae.line,ae.ch-2),ae)==B+B){if(ae.ch>2&&/\bstring/.test(U.getTokenTypeAt(se(ae.line,ae.ch-2))))return G.Pass;b="addFour"}else if(Ie){var F=ae.ch==0?" ":U.getRange(se(ae.line,ae.ch-1),ae);if(!G.isWordChar(ne)&&F!=B&&!G.isWordChar(F))b="both";else return G.Pass}else if(We&&(ne.length===0||/\s/.test(ne)||Te.indexOf(ne)>-1))b="both";else return G.Pass;if(!me)me=b;else if(me!=b)return G.Pass}var x=ce%2?oe.charAt(ce-1):B,ee=ce%2?B:oe.charAt(ce+1);U.operation(function(){if(me=="skip")U.execCommand("goCharRight");else if(me=="skipThree")for(var j=0;j<3;j++)U.execCommand("goCharRight");else if(me=="surround"){for(var O=U.getSelections(),j=0;j<O.length;j++)O[j]=x+O[j]+ee;U.replaceSelections(O,"around"),O=U.listSelections().slice();for(var j=0;j<O.length;j++)O[j]=D(O[j]);U.setSelections(O)}else me=="both"?(U.replaceSelection(x+ee,null),U.triggerElectric(x+ee),U.execCommand("goCharLeft")):me=="addFour"&&(U.replaceSelection(x+x+x+x,"before"),U.execCommand("goCharRight"))})}function be(U,B){var I=U.getRange(se(B.line,B.ch-1),se(B.line,B.ch+1));return I.length==2?I:null}function Q(U,B){var I=U.getTokenAt(se(B.line,B.ch+1));return/\bstring/.test(I.type)&&I.start==B.ch&&(B.ch==0||!/\bstring/.test(U.getTokenTypeAt(B)))}})},GfqC:function(ht,nt,_){"use strict";var G=_("cDcd"),xe=_.n(G),se=_("TSYQ"),Le=_.n(se);function we(k,c){var s="cannot "+k.method+" "+k.action+" "+c.status+"'",m=new Error(s);return m.status=c.status,m.method=k.method,m.url=k.action,m}function q(k){var c=k.responseText||k.response;if(!c)return c;try{return JSON.parse(c)}catch(s){return c}}function M(k){var c=new XMLHttpRequest;k.onProgress&&c.upload&&(c.upload.onprogress=function(H){H.total>0&&(H.percent=H.loaded/H.total*100),k.onProgress(H)});var s=new FormData;k.data&&Object.keys(k.data).forEach(function(A){var H=k.data[A];if(Array.isArray(H)){H.forEach(function(pe){s.append(A+"[]",pe)});return}s.append(A,k.data[A])}),k.file instanceof Blob?s.append(k.filename,k.file,k.file.name):s.append(k.filename,k.file),c.onerror=function(H){k.onError(H)},c.onload=function(){return c.status<200||c.status>=300?k.onError(we(k,c),q(c)):k.onSuccess(q(c),c)},c.open(k.method,k.action,!0),k.withCredentials&&"withCredentials"in c&&(c.withCredentials=!0);var m=k.headers||{};return m["X-Requested-With"]!==null&&c.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(m).forEach(function(A){m[A]!==null&&c.setRequestHeader(A,m[A])}),c.send(s),{abort:function(){c.abort()}}}var W=+new Date,Z=0;function X(){return"rc-upload-"+W+"-"+ ++Z}function D(k,c){return k.indexOf(c,k.length-c.length)!==-1}var S=function(k,c){if(k&&c){var s=Array.isArray(c)?c:c.split(","),m=k.name||"",A=k.type||"",H=A.replace(/\/.*$/,"");return s.some(function(pe){var Ae=pe.trim();return Ae.charAt(0)==="."?D(m.toLowerCase(),Ae.toLowerCase()):/\/\*$/.test(Ae)?H===Ae.replace(/\/.*$/,""):A===Ae})}return!0};function be(k,c){var s=k.createReader(),m=[];function A(){s.readEntries(function(H){var pe=Array.prototype.slice.apply(H);m=m.concat(pe);var Ae=!pe.length;Ae?c(m):A()})}A()}var Q=function(c,s,m){var A=function H(pe,Ae){Ae=Ae||"",pe.isFile?pe.file(function(le){m(le)&&(pe.fullPath&&!le.webkitRelativePath&&(Object.defineProperties(le,{webkitRelativePath:{writable:!0}}),le.webkitRelativePath=pe.fullPath.replace(/^\//,""),Object.defineProperties(le,{webkitRelativePath:{writable:!1}})),s([le]))}):pe.isDirectory&&be(pe,function(le){le.forEach(function(te){H(te,""+Ae+pe.name+"/")})})};c.forEach(function(H){A(H.webkitGetAsEntry())})},U=Q,B=Object.assign||function(k){for(var c=1;c<arguments.length;c++){var s=arguments[c];for(var m in s)Object.prototype.hasOwnProperty.call(s,m)&&(k[m]=s[m])}return k},I=function(){function k(c,s){var m=[],A=!0,H=!1,pe=void 0;try{for(var Ae=c[Symbol.iterator](),le;!(A=(le=Ae.next()).done)&&!(m.push(le.value),s&&m.length===s);A=!0);}catch(te){H=!0,pe=te}finally{try{!A&&Ae.return&&Ae.return()}finally{if(H)throw pe}}return m}return function(c,s){if(Array.isArray(c))return c;if(Symbol.iterator in Object(c))return k(c,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),oe=function(){function k(c,s){for(var m=0;m<s.length;m++){var A=s[m];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(c,A.key,A)}}return function(c,s,m){return s&&k(c.prototype,s),m&&k(c,m),c}}();function ce(k,c,s){return c in k?Object.defineProperty(k,c,{value:s,enumerable:!0,configurable:!0,writable:!0}):k[c]=s,k}function Te(k,c){var s={};for(var m in k){if(c.indexOf(m)>=0)continue;if(!Object.prototype.hasOwnProperty.call(k,m))continue;s[m]=k[m]}return s}function Xe(k,c){if(!(k instanceof c))throw new TypeError("Cannot call a class as a function")}function Ie(k,c){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:k}function Re(k,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);k.prototype=Object.create(c&&c.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(k,c):k.__proto__=c)}var We=function(c){return Object.keys(c).reduce(function(s,m){return(m.substr(0,5)==="data-"||m.substr(0,5)==="aria-"||m==="role")&&(s[m]=c[m]),s},{})},me=function(k){Re(c,k);function c(){var s,m,A,H;Xe(this,c);for(var pe=arguments.length,Ae=Array(pe),le=0;le<pe;le++)Ae[le]=arguments[le];return H=(m=(A=Ie(this,(s=c.__proto__||Object.getPrototypeOf(c)).call.apply(s,[this].concat(Ae))),A),A.state={uid:X()},A.reqs={},A.onChange=function(te){var V=te.target.files;A.uploadFiles(V),A.reset()},A.onClick=function(te){var V=A.fileInput;if(!V)return;var $=A.props,N=$.children,J=$.onClick;N&&N.type==="button"&&(V.parentNode.focus(),V.parentNode.querySelector("button").blur()),V.click(),J&&J(te)},A.onKeyDown=function(te){te.key==="Enter"&&A.onClick()},A.onFileDrop=function(te){var V=A.props.multiple;if(te.preventDefault(),te.type==="dragover")return;if(A.props.directory)U(Array.prototype.slice.call(te.dataTransfer.items),A.uploadFiles,function(N){return S(N,A.props.accept)});else{var $=Array.prototype.slice.call(te.dataTransfer.files).filter(function(N){return S(N,A.props.accept)});V===!1&&($=$.slice(0,1)),A.uploadFiles($)}},A.uploadFiles=function(te){var V=Array.prototype.slice.call(te);V.map(function($){return $.uid=X(),$}).forEach(function($){A.upload($,V)})},A.saveFileInput=function(te){A.fileInput=te},m),Ie(A,H)}return oe(c,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(m,A){var H=this,pe=this.props;if(!pe.beforeUpload)return setTimeout(function(){return H.post(m)},0);var Ae=pe.beforeUpload(m,A);Ae&&Ae.then?Ae.then(function(le){var te=Object.prototype.toString.call(le);return te==="[object File]"||te==="[object Blob]"?H.post(le):H.post(m)}).catch(function(le){console.log(le)}):Ae!==!1&&setTimeout(function(){return H.post(m)},0);return}},{key:"post",value:function(m){var A=this;if(!this._isMounted)return;var H=this.props,pe=H.onStart,Ae=H.onProgress,le=H.transformFile,te=le===void 0?function(V){return V}:le;new Promise(function(V){var $=H.action;return typeof $=="function"&&($=$(m)),V($)}).then(function(V){var $=m.uid,N=H.customRequest||M,J=Promise.resolve(te(m)).then(function(h){var C=H.data;return typeof C=="function"&&(C=C(h)),Promise.all([h,C])}).catch(function(h){console.error(h)});J.then(function(h){var C=I(h,2),g=C[0],re=C[1],ve={action:V,filename:H.name,data:re,file:g,headers:H.headers,withCredentials:H.withCredentials,method:H.method||"post",onProgress:Ae?function(Y){Ae(Y,m)}:null,onSuccess:function(ue,Ee){delete A.reqs[$],H.onSuccess(ue,m,Ee)},onError:function(ue,Ee){delete A.reqs[$],H.onError(ue,Ee,m)}};pe(m),A.reqs[$]=N(ve)})})}},{key:"reset",value:function(){this.setState({uid:X()})}},{key:"abort",value:function(m){var A=this.reqs;if(m){var H=m;m&&m.uid&&(H=m.uid),A[H]&&A[H].abort&&A[H].abort(),delete A[H]}else Object.keys(A).forEach(function(pe){A[pe]&&A[pe].abort&&A[pe].abort(),delete A[pe]})}},{key:"render",value:function(){var m,A=this.props,H=A.component,pe=A.prefixCls,Ae=A.className,le=A.disabled,te=A.id,V=A.style,$=A.multiple,N=A.accept,J=A.children,h=A.directory,C=A.openFileDialogOnClick,g=A.onMouseEnter,re=A.onMouseLeave,ve=Te(A,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),Y=Le()((m={},ce(m,pe,!0),ce(m,pe+"-disabled",le),ce(m,Ae,Ae),m)),ue=le?{}:{onClick:C?this.onClick:function(){},onKeyDown:C?this.onKeyDown:function(){},onMouseEnter:g,onMouseLeave:re,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return xe.a.createElement(H,B({},ue,{className:Y,role:"button",style:V}),xe.a.createElement("input",B({},We(ve),{id:te,type:"file",ref:this.saveFileInput,onClick:function(je){return je.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:N,directory:h?"directory":null,webkitdirectory:h?"webkitdirectory":null,multiple:$,onChange:this.onChange})),J)}}]),c}(G.Component),ge=me,Pe=Object.assign||function(k){for(var c=1;c<arguments.length;c++){var s=arguments[c];for(var m in s)Object.prototype.hasOwnProperty.call(s,m)&&(k[m]=s[m])}return k},ae=function(){function k(c,s){for(var m=0;m<s.length;m++){var A=s[m];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(c,A.key,A)}}return function(c,s,m){return s&&k(c.prototype,s),m&&k(c,m),c}}();function b(k,c){if(!(k instanceof c))throw new TypeError("Cannot call a class as a function")}function ne(k,c){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&(typeof c=="object"||typeof c=="function")?c:k}function F(k,c){if(typeof c!="function"&&c!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof c);k.prototype=Object.create(c&&c.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),c&&(Object.setPrototypeOf?Object.setPrototypeOf(k,c):k.__proto__=c)}function x(){}var ee=function(k){F(c,k);function c(){var s,m,A,H;b(this,c);for(var pe=arguments.length,Ae=Array(pe),le=0;le<pe;le++)Ae[le]=arguments[le];return H=(m=(A=ne(this,(s=c.__proto__||Object.getPrototypeOf(c)).call.apply(s,[this].concat(Ae))),A),A.saveUploader=function(te){A.uploader=te},m),ne(A,H)}return ae(c,[{key:"abort",value:function(m){this.uploader.abort(m)}},{key:"render",value:function(){return xe.a.createElement(ge,Pe({},this.props,{ref:this.saveUploader}))}}]),c}(G.Component);ee.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:x,onError:x,onSuccess:x,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var j=ee,O=nt.a=j},Gytx:function(ht,nt){ht.exports=function(G,xe,se,Le){var we=se?se.call(Le,G,xe):void 0;if(we!==void 0)return!!we;if(G===xe)return!0;if(typeof G!="object"||!G||typeof xe!="object"||!xe)return!1;var q=Object.keys(G),M=Object.keys(xe);if(q.length!==M.length)return!1;for(var W=Object.prototype.hasOwnProperty.bind(xe),Z=0;Z<q.length;Z++){var X=q[Z];if(!W(X))return!1;var D=G[X],S=xe[X];if(we=se?se.call(Le,D,S,X):void 0,we===!1||we===void 0&&D!==S)return!1}return!0}},HmJG:function(ht,nt,_){},LdHM:function(ht,nt,_){"use strict";_.d(nt,"b",function(){return Te}),_.d(nt,"a",function(){return Ie});var G=_("1OyB"),xe=_("vuIU"),se=_("Ji7U"),Le=_("LK+K"),we=_("cDcd"),q=_("rePB"),M=_("Ff2n"),W=_("ODXe"),Z=_("4IlW"),X=_("bX4T"),D=_("YrtM"),S=_("TSYQ"),be=_.n(S),Q=_("+nKL"),U=_("8OUc"),B=function(m,A){var H=m.prefixCls,pe=m.id,Ae=m.flattenOptions,le=m.childrenAsData,te=m.values,V=m.searchValue,$=m.multiple,N=m.defaultActiveFirstOption,J=m.height,h=m.itemHeight,C=m.notFoundContent,g=m.open,re=m.menuItemSelectedIcon,ve=m.virtual,Y=m.onSelect,ue=m.onToggleOpen,Ee=m.onActiveValue,je=m.onScroll,Me=m.onMouseEnter,ke="".concat(H,"-item"),Se=Object(D.a)(function(){return Ae},[g,Ae],function(Oe,P){return P[0]&&Oe[1]!==P[1]}),et=we.useRef(null),Ge=function(P){P.preventDefault()},Ke=function(P){et.current&&et.current.scrollTo({index:P})},Ve=function(P){for(var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,L=Se.length,f=0;f<L;f+=1){var p=(P+f*T+L)%L,v=Se[p],w=v.group,R=v.data;if(!w&&!R.disabled)return p}return-1},st=we.useState(function(){return Ve(0)}),tt=Object(W.a)(st,2),Je=tt[0],fe=tt[1],rt=function(P){fe(P);var T=Se[P];if(!T){Ee(null,-1);return}Ee(T.data.value,P)};we.useEffect(function(){rt(N!==!1?Ve(0):-1)},[Se.length,V]),we.useEffect(function(){var Oe=setTimeout(function(){if(!$&&g&&te.size===1){var P=Array.from(te)[0],T=Se.findIndex(function(L){var f=L.data;return f.value===P});rt(T),Ke(T)}});return function(){return clearTimeout(Oe)}},[g]);var $e=function(P){P!==void 0&&Y(P,{selected:!te.has(P)}),$||ue(!1)};if(we.useImperativeHandle(A,function(){return{onKeyDown:function(P){var T=P.which;switch(T){case Z.a.UP:case Z.a.DOWN:{var L=0;if(T===Z.a.UP?L=-1:T===Z.a.DOWN&&(L=1),L!==0){var f=Ve(Je+L,L);Ke(f),rt(f)}break}case Z.a.ENTER:{var p=Se[Je];p&&!p.data.disabled?$e(p.data.value):$e(void 0),g&&P.preventDefault();break}case Z.a.ESC:ue(!1)}},onKeyUp:function(){},scrollTo:function(P){Ke(P)}}}),Se.length===0)return we.createElement("div",{role:"listbox",id:"".concat(pe,"_list"),className:"".concat(ke,"-empty"),onMouseDown:Ge},C);function he(Oe){var P=Se[Oe];if(!P)return null;var T=P.data||{},L=T.value,f=T.label,p=T.children,v=Object(X.a)(T,!0),w=le?p:f;return P?we.createElement("div",Object.assign({"aria-label":typeof w=="string"?w:null},v,{key:Oe,role:"option",id:"".concat(pe,"_list_").concat(Oe),"aria-selected":te.has(L)}),L):null}return we.createElement(we.Fragment,null,we.createElement("div",{role:"listbox",id:"".concat(pe,"_list"),style:{height:0,width:0,overflow:"hidden"}},he(Je-1),he(Je),he(Je+1)),we.createElement(Q.a,{itemKey:"key",ref:et,data:Se,height:J,itemHeight:h,fullHeight:!1,onMouseDown:Ge,onScroll:je,virtual:ve,onMouseEnter:Me},function(Oe,P){var T,L=Oe.group,f=Oe.groupOption,p=Oe.data,v=p.label,w=p.key;if(L)return we.createElement("div",{className:be()(ke,"".concat(ke,"-group"))},v!==void 0?v:w);var R=p.disabled,ie=p.value,ye=p.title,Ue=p.children,Ye=p.style,Fe=p.className,yt=Object(M.a)(p,["disabled","value","title","children","style","className"]),dt=te.has(ie),it="".concat(ke,"-option"),kt=be()(ke,it,Fe,(T={},Object(q.a)(T,"".concat(it,"-grouped"),f),Object(q.a)(T,"".concat(it,"-active"),Je===P&&!R),Object(q.a)(T,"".concat(it,"-disabled"),R),Object(q.a)(T,"".concat(it,"-selected"),dt),T)),xt=le?Ue:v,Et=!re||typeof re=="function"||dt;return we.createElement("div",Object.assign({},yt,{"aria-selected":dt,className:kt,title:ye,onMouseMove:function(){if(Je===P||R)return;rt(P)},onClick:function(){R||$e(ie)},style:Ye}),we.createElement("div",{className:"".concat(it,"-content")},xt||ie),we.isValidElement(re)||dt,Et&&we.createElement(U.a,{className:"".concat(ke,"-option-state"),customizeIcon:re,customizeIconProps:{isSelected:dt}},dt?"\u2713":null))}))},I=we.forwardRef(B);I.displayName="OptionList";var oe=I,ce=function(){return null};ce.isSelectOption=!0;var Te=ce,Xe=function(){return null};Xe.isSelectOptGroup=!0;var Ie=Xe,Re=_("VTBJ"),We=_("Zm9Q");function me(s){var m=s.key,A=s.props,H=A.children,pe=A.value,Ae=Object(M.a)(A,["children","value"]);return Object(Re.a)({key:m,value:pe!==void 0?pe:m,children:H},Ae)}function ge(s){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(We.a)(s).map(function(A,H){if(!we.isValidElement(A)||!A.type)return null;var pe=A.type.isSelectOptGroup,Ae=A.key,le=A.props,te=le.children,V=Object(M.a)(le,["children"]);return m||!pe?me(A):Object(Re.a)(Object(Re.a)({key:"__RC_SELECT_GRP__".concat(Ae===null?H:Ae,"__"),label:Ae},V),{},{options:ge(te)})}).filter(function(A){return A})}var Pe=_("2Qr1"),ae=_("qNPg"),b=_("U8pU"),ne=_("Kwbf"),F=_("WKfj");function x(s){var m=s.mode,A=s.options,H=s.children,pe=s.backfill,Ae=s.allowClear,le=s.placeholder,te=s.getInputElement,V=s.showSearch,$=s.onSearch,N=s.defaultOpen,J=s.autoFocus,h=s.labelInValue,C=s.value,g=s.inputValue,re=s.optionLabelProp,ve=m==="multiple"||m==="tags",Y=V!==void 0?V:ve||m==="combobox",ue=A||ge(H);if(Object(ne.a)(m!=="tags"||ue.every(function(ke){return!ke.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),m==="tags"||m==="combobox"){var Ee=ue.some(function(ke){return ke.options?ke.options.some(function(Se){return typeof("value"in Se?Se.value:Se.key)=="number"}):typeof("value"in ke?ke.value:ke.key)=="number"});Object(ne.a)(!Ee,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(ne.a)(m!=="combobox"||!re,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(ne.a)(m==="combobox"||!pe,"`backfill` only works with `combobox` mode."),Object(ne.a)(m==="combobox"||!te,"`getInputElement` only work with `combobox` mode."),Object(ne.b)(m!=="combobox"||!te||!Ae||!le,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),$&&!Y&&m!=="combobox"&&m!=="tags"&&Object(ne.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(ne.b)(!N||J,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),C!=null){var je=Object(F.d)(C);Object(ne.a)(!h||je.every(function(ke){return Object(b.a)(ke)==="object"&&("key"in ke||"value"in ke)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(ne.a)(!ve||Array.isArray(C),"`value` should be array when `mode` is `multiple` or `tags`")}if(H){var Me=null;Object(We.a)(H).some(function(ke){if(!we.isValidElement(ke)||!ke.type)return!1;var Se=ke.type;if(Se.isSelectOption)return!1;if(Se.isSelectOptGroup){var et=Object(We.a)(ke.props.children).every(function(Ge){return!we.isValidElement(Ge)||!ke.type||Ge.type.isSelectOption?!0:(Me=Ge.type,!1)});return!et}return Me=Se,!0}),Me&&Object(ne.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Me.displayName||Me.name||Me,"`.")),Object(ne.a)(g===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var ee=x,j=Object(ae.a)({prefixCls:"rc-select",components:{optionList:oe},convertChildrenToData:ge,flattenOptions:Pe.d,getLabeledValue:Pe.e,filterOptions:Pe.b,isValueDisabled:Pe.g,findValueOption:Pe.c,warningProps:ee,fillOptionsWithMissingValue:Pe.a}),O=function(s){Object(se.a)(A,s);var m=Object(Le.a)(A);function A(){var H;return Object(G.a)(this,A),H=m.apply(this,arguments),H.selectRef=we.createRef(),H.focus=function(){H.selectRef.current.focus()},H.blur=function(){H.selectRef.current.blur()},H}return Object(xe.a)(A,[{key:"render",value:function(){return we.createElement(j,Object.assign({ref:this.selectRef},this.props))}}]),A}(we.Component);O.Option=Te,O.OptGroup=Ie;var k=O,c=nt.c=k},M8RZ:function(ht,nt,_){"use strict";_.d(nt,"a",function(){return Z});var G=_("fWQN"),xe=_("mtLc"),se=_("yKVA"),Le=_("879j"),we=_("cDcd"),q=_.n(we),M=_("faye"),W=_.n(M),Z=function(X){Object(se.a)(S,X);var D=Object(Le.a)(S);function S(be){var Q;Object(G.a)(this,S),Q=D.call(this,be);var U=window.document;return Q.node=U.createElement("div"),U.body.appendChild(Q.node),Q}return Object(xe.a)(S,[{key:"render",value:function(){var Q=this.props.children;return Object(M.createPortal)(Q,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),S}(q.a.Component)},Ot1p:function(ht,nt,_){"use strict";var G=_("2qtc"),xe=_("kLXV"),se=_("rAM+"),Le=_("miYZ"),we=_("tsqr"),q=_("9og8"),M=_("tJVT"),W=_("jrin"),Z=_("WmNS"),X=_.n(Z),D=_("cDcd"),S=_.n(D),be=_("VrN/"),Q=_.n(be),U=_("bdgK"),B=_("p77/"),I=_("Bd2K"),oe=_("ELLl"),ce=_("19Vz"),Te=_("lZu9"),Xe=_("+NIl"),Ie=_("kSUc"),Re=_("9Bee"),We=function(R){var ie=R.value,ye=ie===void 0?"":ie,Ue=R.className,Ye=R.showTextOnly,Fe=R.showLines,yt=R.style,dt=yt===void 0?{}:yt,it=Object(D.useMemo)(function(){return""},[ye]);return S.a.createElement(S.a.Fragment,null,S.a.createElement("div",{dangerouslySetInnerHTML:{__html:it}}))},me=_("0Owb"),ge=_("dejd"),Pe=_("C+DQ"),ae=_("1vsH"),b=_("m3rI"),ne=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function F(R){var ie=R.onActionCallback,ye=R.title,Ue=R.icon,Ye=R.actionName,Fe=R.className,yt=Fe===void 0?"":Fe,dt=R.children;function it(){ie(Ye)}return S.a.createElement("a",{title:ye,className:yt,onClick:it},S.a.createElement("i",{className:"md-iconfont ".concat(Ue)}),dt)}var x=function(R){var ie=R.watch,ye=R.showNullButton,Ue=R.onActionCallback,Ye=R.fullScreen,Fe=R.insertTemp,yt=R.hidetoolBar,dt=R.uuid,it=R.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(ae.n)("_educoder_session_login"),"&_educoder_session=").concat(Object(ae.n)("_educoder_session"),"&key=").concat(dt,"&api=").concat(encodeURIComponent(b.a.PROXY_SERVER)));var kt=[].concat(ne,[{title:"".concat(ie?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(ie?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return S.a.createElement("ul",{className:"markdown-toolbar-container"},!yt&&kt.map(function(xt,Et){return S.a.createElement("li",{key:Et},xt.actionName?S.a.createElement(F,Object(me.a)({},xt,{onActionCallback:Ue})):S.a.createElement("span",{className:"v-line"}))}),ye?S.a.createElement("li",null,S.a.createElement(F,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ue},S.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Fe&&S.a.createElement("li",null,S.a.createElement(F,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(Fe),onActionCallback:Ue},S.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),S.a.createElement("li",{className:"btn-full-screen"},S.a.createElement(F,{icon:"".concat(Ye?"icon-shrink":"icon-enlarge"),title:Ye?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ue})))},ee=_("M8RZ"),j=_("+L6B"),O=_("2/Rp"),k=_("y8nQ"),c=_("Vl3Y"),s=_("5NDa"),m=_("5rEg"),A={labelCol:{span:4},wrapperCol:{span:20}},H=function(R){var ie=R.callback,ye=R.onCancel;function Ue(Ye){ie(Ye)}return S.a.createElement(c.a,Object(me.a)({},A,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ue}),S.a.createElement(c.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},S.a.createElement(m.a,null)),S.a.createElement(c.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},S.a.createElement(m.a,null)),S.a.createElement("div",{className:"flex-container flex-end"},S.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),S.a.createElement(O.a,{type:"ghost",onClick:ye},"\u53D6\u6D88")))},pe=_("7ahc"),Ae=_("HmJG"),le=_("BjJ7"),te=c.a.useForm,V={width:280,marginRight:10},$={labelCol:{span:5},wrapperCol:{span:19}},N=function(R){var ie=R.callback,ye=R.onCancel,Ue=te(),Ye=Object(M.a)(Ue,1),Fe=Ye[0];function yt(kt){ie(kt)}function dt(kt,xt){if(kt.status===-1){we.b.error(kt.message);return}Fe.setFieldsValue({src:"/api/attachments/".concat(kt.id),type:xt.type})}function it(kt){var xt=kt.target.files[0];h(xt,dt)}return S.a.createElement(c.a,Object(me.a)({form:Fe},$,{className:"upload-image-panel",onFinish:yt}),S.a.createElement(c.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},S.a.createElement("div",{className:"flex-container"},S.a.createElement(c.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},S.a.createElement(m.a,{style:V})),S.a.createElement(J,{onFileChange:it}))),S.a.createElement(c.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},S.a.createElement(m.a,{style:{width:264}})),S.a.createElement(c.a.Item,{style:{textAlign:"right"}},S.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),S.a.createElement(O.a,{type:"ghost",onClick:ye},"\u53D6\u6D88")))};function J(R){var ie=R.onFileChange;return S.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",S.a.createElement("input",{type:"file",onChange:ie}))}function h(R,ie){if(!R)throw new String("\u6CA1\u6709\u6587\u4EF6");var ye=new FormData;ye.append("editormd-image-file",R),ye.append("file_param_name","editormd-image-file"),ye.append("byxhr","true");var Ue=new window.XMLHttpRequest;Ue.withCredentials=!0,Ue.addEventListener("load",function(Ye){ie(JSON.parse(Ye.target.responseText),R)},!1),Ue.addEventListener("error",function(Ye){console.error(Ye)},!1),Ue.open("POST","".concat(le.a,"/api/attachments.json")),Ue.send(ye)}var C=_("giR+"),g=_("fyUT"),re=_("7Kak"),ve=_("9yH6"),Y=ve.a.Group,ue={margin:"0 8px"},Ee=function(R){var ie=R.callback,ye=R.onCancel;function Ue(Ye){ie(Ye)}return S.a.createElement(c.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ue},S.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},S.a.createElement("span",{style:ue},"\u5355\u5143\u683C\u6570\uFF1A"),S.a.createElement("span",{style:ue},"\u884C\u6570"),S.a.createElement(c.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},S.a.createElement(g.a,null)),S.a.createElement("span",{style:ue},"\u5217\u6570"),S.a.createElement(c.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},S.a.createElement(g.a,null))),S.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},S.a.createElement("span",{style:ue},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),S.a.createElement(c.a.Item,{name:"align"},S.a.createElement(Y,null,S.a.createElement(ve.a,{value:"default"},S.a.createElement("i",{className:"fa fa-align-justify"})),S.a.createElement(ve.a,{value:"left"},S.a.createElement("i",{className:"fa fa-align-left"})),S.a.createElement(ve.a,{value:"center"},S.a.createElement("i",{className:"fa fa-align-center"})),S.a.createElement(ve.a,{value:"right"},S.a.createElement("i",{className:"fa fa-align-right"}))))),S.a.createElement("div",{className:"flex-container flex-end"},S.a.createElement(O.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),S.a.createElement(O.a,{type:"ghost",onClick:ye},"\u53D6\u6D88")))},je=_("ErOA"),Me=_("7Cbv"),ke="link",Se="upload-image",et="code-block",Ge="add-table",Ke="------------",Ve={default:Ke,left:":".concat(Ke),center:":".concat(Ke,":"),right:"".concat(Ke,":")},st=_("9VGf"),tt,Je;function fe(){}var rt=0,$e=1e4,he="\u2581",Oe=`
|
|
**\u6A21\u677F\u6807\u9898**
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function P(R){return/^\d+$/.test(R)?"".concat(R,"px"):R}var T=navigator.platform.toUpperCase().indexOf("MAC")>=0,L=T?"Cmd":"Ctrl",f=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],p=(tt={},Object(W.a)(tt,L+"-B","bold"),Object(W.a)(tt,L+"-I","italic"),tt),v=(Je={},Object(W.a)(Je,ke,"\u6DFB\u52A0\u94FE\u63A5"),Object(W.a)(Je,et,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(W.a)(Je,Se,"\u6DFB\u52A0\u6587\u4EF6"),Object(W.a)(Je,Ge,"\u6DFB\u52A0\u8868\u683C"),Je),w=nt.a=function(R){var ie=R.defaultValue,ye=ie===void 0?"":ie,Ue=R.onChange,Ye=R.width,Fe=Ye===void 0?"100%":Ye,yt=R.height,dt=yt===void 0?400:yt,it=R.miniToolbar,kt=it===void 0?!1:it,xt=R.isFocus,Et=xt===void 0?!1:xt,Ot=R.watch,vt=R.insertTemp,sn=R.mode,Mn=sn===void 0?"markdown":sn,cn=R.id,vn=cn===void 0?"markdown-editor-id":cn,pn=R.showResizeBar,ia=pn===void 0?!1:pn,An=R.noStorage,Wr=An===void 0?!1:An,Br=R.showNullButton,Dt=Br===void 0?!1:Br,Ze=R.hidetoolBar,Dn=Ze===void 0?!1:Ze,pr=R.fullScreen,Zt=pr===void 0?!1:pr,Ct=R.onBlur,bn=R.onCMBeforeChange,Nn=R.onFullScreen,mr=R.className,_e=mr===void 0?"":mr,ut=R.disablePaste,Xr=ut===void 0?!1:ut,gr=R.placeholder,vr=gr===void 0?"":gr,Zn=R.values,br=Zn===void 0?"":Zn,ft=Object(D.useState)(null),Ti=Object(M.a)(ft,2),De=Ti[0],yr=Ti[1],mn=Object(D.useState)(ye),Gr=Object(M.a)(mn,2),Qn=Gr[0],yn=Gr[1],Kr=Object(D.useState)(Ot),Vr=Object(M.a)(Kr,2),xn=Vr[0],$r=Vr[1],Ai=Object(D.useState)(Zt),Yr=Object(M.a)(Ai,2),wn=Yr[0],Oi=Yr[1],aa=Object(D.useState)(""),qr=Object(M.a)(aa,2),Yt=qr[0],Wn=qr[1],oa=Object(D.useState)(0),er=Object(M.a)(oa,2),En=er[0],Jr=er[1],sa=Object(D.useState)(dt),Li=Object(M.a)(sa,2),_i=Li[0],xr=Li[1],Ri=Object(D.useState)(!1),Mi=Object(M.a)(Ri,2),la=Mi[0],wr=Mi[1],tr=Object(D.useRef)(Object(Me.a)()),nr=Object(D.useRef)(!1),Er=Object(D.useRef)(),Pn=Object(D.useRef)(),jn=Object(D.useRef)(),In=Object(D.useRef)(),Cr=Object(D.useRef)(),Di=function(){var Qe=Object(q.a)(X.a.mark(function ct(){var ot,mt;return X.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return Lt.next=2,Object(je.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:tr.current}});case 2:mt=Lt.sent,mt!=null&&(ot=mt.attachments)!==null&&ot!==void 0&&ot.length&&(console.log("cm:",De,Pn),mt.attachments.map(function(bt){bt.content_type.indexOf("image")>-1?De.replaceSelection(".concat(bt.content_type,")")):bt.content_type.indexOf("video")>-1?De.replaceSelection('<video width="100%" controls src="'.concat(b.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):bt.content_type.indexOf("pdf")>-1?De.replaceSelection('<a href="'.concat(b.a.API_SERVER,"/api/attachments/").concat(bt.id,"?type=").concat(bt.content_type,'&disposition=inline" target="_blank">').concat(bt.name,"</a>")):De.replaceSelection("[".concat(bt.name,"](").concat(b.a.API_SERVER,"/api/attachments/").concat(bt.id,"?type=").concat(bt.content_type,")"))}));case 4:case"end":return Lt.stop()}},ct)}));return function(){return Qe.apply(this,arguments)}}();Object(D.useEffect)(function(){yn(br),De==null||De.setValue(br)},[br]),Object(D.useEffect)(function(){Nn==null||Nn(wn)},[wn]),Object(D.useEffect)(function(){if(Pn.current){var Qe=Q.a.fromTextArea(Pn.current,{mode:Mn,lineNumbers:!kt,lineWrapping:!0,value:ye,autoCloseTags:!0,autoCloseBrackets:!0});Et&&Qe.focus();function ct(ot,mt){if(Xr){mt.preventDefault();return}var wt=mt.clipboardData;if(wt){var Lt=wt.types.toString(),bt=wt.items;if(Lt==="Files"||wt.types.indexOf("Files")>-1){if(mt.preventDefault(),Mn=="stex")return;try{var Ut,Qt=bt[1];((Ut=bt[0])===null||Ut===void 0?void 0:Ut.kind)==="file"&&(Qt=bt[0]);var gt=Qt.getAsFile(),Un=gt.name.split(".").pop();h(gt,function(St){if(St.id){var en,Kt,gn;(gt==null||((en=gt.type)===null||en===void 0)?void 0:en.indexOf("image"))>-1?Qe.replaceSelection(".concat(St.content_type,")")):(gt==null||((Kt=gt.type)===null||Kt===void 0)?void 0:Kt.indexOf("video"))>-1?Qe.replaceSelection('<video width="100%" controls src="'.concat(b.a.API_SERVER,"/api/attachments/").concat(St.id,'"></video>')):(gt==null||((gn=gt.type)===null||gn===void 0)?void 0:gn.indexOf("pdf"))>-1?Qe.replaceSelection('<a href="'.concat(b.a.API_SERVER,"/api/attachments/").concat(St.id,"?type=").concat(gt.type,'&disposition=inline" target="_blank">').concat(gt.name,"</a>")):f.includes(Un)?Qe.replaceSelection('<a href="'.concat(b.a.API_SERVER,"/api/attachments/").concat(St.id,'?type=office&disposition=inline" target="_blank">').concat(gt.name,"</a>")):Qe.replaceSelection("[".concat(gt.name,"](").concat(b.a.API_SERVER,"/api/attachments/").concat(St.id,"?type=").concat(St.content_type,")"))}else(St==null?void 0:St.status)===401&&(document.location.href="/user/login")})}catch(St){we.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Qe.on("paste",ct),Qe.on("dragleave",function(ot,mt){jn.current.classList.remove("mouse-hover-md")}),Qe.on("dragover",function(ot,mt){jn.current.classList.add("mouse-hover-md")}),Qe.on("drop",function(ot,mt){jn.current.classList.add("mouse-hover-md");var wt;if(wt=mt.dataTransfer.files,wt.length>0){mt.preventDefault(),mt.stopPropagation();for(var Lt=function(Qt){var gt=wt[Qt],Un=gt.name.split(".").pop();h(gt,function(St){if(St.id){var en,Kt,gn;(gt==null||((en=gt.type)===null||en===void 0)?void 0:en.indexOf("image"))>-1?Qe.replaceSelection(".concat(St.content_type,")")):(gt==null||((Kt=gt.type)===null||Kt===void 0)?void 0:Kt.indexOf("video"))>-1?Qe.replaceSelection('<video width="100%" controls src="'.concat(b.a.API_SERVER,"/api/attachments/").concat(St.id,'"></video>')):(gt==null||((gn=gt.type)===null||gn===void 0)?void 0:gn.indexOf("pdf"))>-1?Qe.replaceSelection('<a href="'.concat(b.a.API_SERVER,"/api/attachments/").concat(St.id,"?type=").concat(gt.type,'&disposition=inline" target="_blank">').concat(gt.name,"</a>")):f.includes(Un)?Qe.replaceSelection('<a href="'.concat(b.a.API_SERVER,"/api/attachments/").concat(St.id,'?type=office&disposition=inline" target="_blank">').concat(gt.name,"</a>")):Qe.replaceSelection("[".concat(gt.name,"](").concat(b.a.API_SERVER,"/api/attachments/").concat(St.id,"?type=").concat(St.content_type,")"))}else(St==null?void 0:St.status)===401&&(document.location.href="/user/login")})},bt=0;bt<wt.length;bt++)Lt(bt)}}),yr(Qe),function(){Qe.off("paste",ct)}}},[]);var dn=Object(D.useCallback)(function(){if(jn.current)try{}catch(Qe){console.log(Qe,"---- to set md editor body height")}},[_i,jn,wn]);Object(D.useEffect)(function(){function Qe(){var ot=new U.default(function(mt){var wt=Object(se.a)(mt),Lt;try{for(wt.s();!(Lt=wt.n()).done;){var bt=Lt.value;(bt.target.offsetHeight>0||bt.target.offsetWidth>0)&&(dn(),De.setSize("100%","100%"),De.refresh())}}catch(Ut){wt.e(Ut)}finally{wt.f()}});return ot.observe(Pn.current.parentElement),ot}if(De){var ct=Qe();return function(){ct.unobserve(Pn.current.parentElement)}}},[De,dn]),Object(D.useEffect)(function(){if(De){for(var Qe=[],ct=function(){var bt=mt[ot];wt=Object(M.a)(bt,2);var Ut=wt[0],Qt=wt[1],gt=Object(W.a)({},Ut,function(){Ni(Qt)});Qe.push(gt),De.addKeyMap(gt)},ot=0,mt=Object.entries(p);ot<mt.length;ot++){var wt;ct()}return Er.current=setInterval(function(){nr.current&&Di()},4e3),function(){clearInterval(Er.current);var Lt=Object(se.a)(Qe),bt;try{for(Lt.s();!(bt=Lt.n()).done;){var Ut=bt.value;De.removeKeyMap(Ut)}}catch(Qt){Lt.e(Qt)}finally{Lt.f()}}}},[De]),Object(D.useEffect)(function(){Zt!==wn&&Oi(Zt)},[Zt]),Object(st.a)(function(){if(!Wr&&En>0){var Qe=new Date().getTime(),ct=window.sessionStorage.getItem(vn);Qe>=En+$e&&(!ct||ct!==Qn)&&(window.sessionStorage.setItem(vn,Qn),wr(!0))}},$e),Object(D.useEffect)(function(){$r(Ot)},[De,Ot]),Object(D.useEffect)(function(){De&&(Et&&De.focus())},[De,Et]),Object(D.useEffect)(function(){if(xn&&De){var Qe=De.getScrollerElement();function ct(ot){var mt=ot.target;if(Cr.current){var wt=mt.scrollTop/mt.scrollHeight;Cr.current.scrollTop=Cr.current.scrollHeight*wt}}return Qe.addEventListener("scroll",ct),function(){Qe.removeEventListener("scroll",ct)}}},[De,xn]),Object(D.useEffect)(function(){if(De&&bn){function Qe(ct,ot){bn(ct,ot)}return De.on("beforeChange",Qe),function(){De.off("beforeChange",Qe)}}},[De,bn]),Object(D.useEffect)(function(){if(De&&Ct){function Qe(){Ct(De.getValue())}return De.on("blur",Qe),function(){De.off("blur",Qe)}}},[De,Ct]),Object(D.useEffect)(function(){if(De){function Qe(ct){var ot=ct.getValue();yn(ot),Jr(new Date().getTime()),ct.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Ue&&Ue(ot)}return De.on("change",Qe),function(){De.off("change",Qe)}}},[De,Ue]),Object(D.useEffect)(function(){De&&(ye==null?(De.setValue(""),yn("")):ye!==De.getValue()&&(De.setValue(ye),yn(ye),De.setCursor(De.lineCount(),0)))},[De,ye]);var Ni=Object(D.useCallback)(function(Qe){var ct=De.getCursor(),ot=De.getSelection(),mt=ot.split(`
|
|
`);switch(Qe){case"bold":return De.replaceSelection("**"+ot+"**"),ot===""&&De.setCursor(ct.line,ct.ch+2),De.focus();case"italic":return De.replaceSelection("*"+ot+"*"),ot===""&&De.setCursor(ct.line,ct.ch+1),De.focus();case"code":return De.replaceSelection("`"+ot+"`"),ot===""&&De.setCursor(ct.line,ct.ch+1),De.focus();case"inline-latex":return De.replaceSelection("`$$"+ot+"$$`"),ot===""&&De.setCursor(ct.line,ct.ch+3),De.focus();case"latex":return De.replaceSelection("```latex\n"+ot+"\n```"),De.setCursor(ct.line+1,ot.length+1),De.focus();case"line-break":return De.replaceSelection(`<br/>
|
|
`),De.focus();case"list-ul":return ot===""?De.replaceSelection("- "+ot):De.replaceSelection(mt.map(function(wt){return wt===""?"":"- ".concat(wt)}).join(`
|
|
`)),De.focus();case"list-ol":return ot===""?De.replaceSelection("1. "+ot):De.replaceSelection(mt.map(function(wt,Lt){return wt===""?"":"".concat(Lt+1,". ").concat(wt)}).join(`
|
|
`)),De.focus();case"add-null-ch":return ot===""&&De.setCursor(ct.line,ct.ch+1),De.replaceSelection(he),De.focus();case"inster-template-1":return ot===""&&De.setCursor(ct.line,ct.ch),De.replaceSelection(Oe),De.focus();case"eraser":return De.setValue(""),De.focus();case"trigger-watch":return $r(!xn),De.focus();case"trigger-full-screen":return Oi(!wn),De.focus();case ke:Wn(ke);return;case et:Wn(et);return;case Se:Wn(Se);return;case Ge:Wn(Ge);return;default:throw new Error}},[De,xn,wn]),kr=Object(D.useCallback)(function(Qe){Wn("");switch(Yt){case ke:var ct=Qe.title,ot=Qe.link;return De.replaceSelection("[".concat(ct,"](").concat(ot,")")),De.focus();case et:var mt=Qe.language,wt=Qe.content;return De.replaceSelection(["```"+mt,wt,"```"].join(`
|
|
`)),De.focus();case Se:var Lt=Qe.src,bt=Qe.alt;return bt?De.replaceSelection(".concat(Lt,' "').concat(bt,'" )')):De.replaceSelection("")),De.focus();case Ge:for(var Ut=Qe.row,Qt=Qe.col,gt=Qe.align,Un=`
|
|
`,St=0;St<Ut;St++){for(var en=[],Kt=[],gn=0;gn<Qt;gn++)St===1&&Kt.push(Ve[gt]),en.push(" ");St===1&&(Un+="| ".concat(Kt.join(" | "),` |
|
|
`)),Un+="| ".concat(en.join(Qt===1?"":" | "),` |
|
|
`)}return De.replaceSelection(Un+`
|
|
`),De.focus();default:throw new Error}},[De,Yt]),Zr=Object(D.useMemo)(function(){switch(Yt){case ke:return S.a.createElement(H,{callback:kr,onCancel:Bn});case et:return S.a.createElement(pe.b,{callback:kr,onCancel:Bn});case Se:return S.a.createElement(N,{callback:kr,onCancel:Bn});case Ge:return S.a.createElement(Ee,{callback:kr,onCancel:Bn});default:return null}},[Yt]);function Bn(){Wn("")}Object(D.useEffect)(function(){if(In.current){var Qe=In.current,ct=!1,ot=0;function mt(bt){ct=!0,ot=bt.pageY}function wt(){ct=!1}function Lt(bt){if(ct){var Ut=bt.pageY-ot;Ut<0&&(Ut=0),Ut>300&&(Ut=300);var Qt=dt+Ut+"px";xr(Qt)}}return Qe.addEventListener("mousedown",mt),document.addEventListener("mousemove",Lt),document.addEventListener("mouseup",wt),function(){Qe.removeEventListener("mousedown",mt),document.removeEventListener("mousemove",Lt),document.removeEventListener("mouseup",wt)}}},[De,In]),Object(D.useEffect)(function(){xr(dt)},[dt]);var On=P(Fe),Qr=P(_i),Cn={width:On,height:Qr},ei=Object(D.useMemo)(function(){if(En){var Qe=new Date(En),ct=Qe.getHours(),ot=Qe.getMinutes(),mt=Qe.getSeconds();return ct=ct<10?"0"+ct:ct,ot=ot<10?"0"+ot:ot,mt=mt<10?"0"+mt:mt,"".concat(ct,":").concat(ot,":").concat(mt)}return 0},[En]);function Pi(){window.sessionStorage.removeItem(vn),wr(!1),Jr(0)}function rr(){wr(!1),Jr(0),De.setValue(window.sessionStorage.getItem(vn))}function ua(Qe,ct){var ot=De.getValue();ot=ot.replace(Qe,ct),yn(ot),De==null||De.setValue(ot)}return S.a.createElement(D.Fragment,null,S.a.createElement("div",{className:"markdown-editor-wrapper",ref:jn},S.a.createElement("div",{className:"markdown-editor-container ".concat(_e," ").concat(xn?"on-preview":""," ").concat(kt?"mini":""," ").concat(wn?"full-screen":""),style:Cn},S.a.createElement(x,{insertTemp:vt,watch:xn,fullScreen:wn,showNullButton:Dt,onActionCallback:Ni,hidetoolBar:Dn,uuid:tr.current,setOpenPhones:function(){nr.current=!0}}),S.a.createElement("div",{className:"markdown-editor-body"},S.a.createElement("div",{className:"codemirror-container"},S.a.createElement("textarea",{ref:Pn,placeholder:vr})),xn?S.a.createElement("div",{ref:Cr,className:"preview-container"},Mn==="stex"&&S.a.createElement(We,{value:Qn}),Mn!=="stex"&&S.a.createElement(Re.a,{edit:!0,value:Qn,replaces:ua})):null))),ia?S.a.createElement("a",{ref:In,className:"editor-resize"}):null,S.a.createElement(ee.a,null,v[Yt]?S.a.createElement(xe.a,{centered:!0,title:v[Yt],visible:!0,onCancel:Bn,footer:null,className:"markdown-popup-form"},Zr):null))}},SJMd:function(ht,nt){/**
|
|
* @license
|
|
* Copyright (C) 2006 Google Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/var _,G,xe,se=!1,Le,we;window.PR_SHOULD_USE_CONTINUATION=!0;var q,M;(function(){var W=window,Z=["break,continue,do,else,for,if,return,while"],X=[Z,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],D=[X,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],S=[D,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],be=[D,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],Q=[D,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],U="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",B=[D,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],I="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",oe=[Z,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],ce=[Z,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],Te=[Z,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Xe=[S,Q,be,B,I,oe,ce,Te],Ie=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,Re="str",We="kwd",me="com",ge="typ",Pe="lit",ae="pun",b="pln",ne="tag",F="dec",x="src",ee="atn",j="atv",O="nocode",k="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function c(Y){for(var ue=0,Ee=!1,je=!1,Me=0,ke=Y.length;Me<ke;++Me){var Se=Y[Me];if(Se.ignoreCase)je=!0;else if(/[a-z]/i.test(Se.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ee=!0,je=!1;break}}var et={b:8,t:9,n:10,v:11,f:12,r:13};function Ge(Je){var fe=Je.charCodeAt(0);if(fe!==92)return fe;var rt=Je.charAt(1);return fe=et[rt],fe||("0"<=rt&&rt<="7"?parseInt(Je.substring(1),8):rt==="u"||rt==="x"?parseInt(Je.substring(2),16):Je.charCodeAt(1))}function Ke(Je){if(Je<32)return(Je<16?"\\x0":"\\x")+Je.toString(16);var fe=String.fromCharCode(Je);return fe==="\\"||fe==="-"||fe==="]"||fe==="^"?"\\"+fe:fe}function Ve(Je){var fe=Je.substring(1,Je.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),rt=[],$e=fe[0]==="^",he=["["];$e&&he.push("^");for(var Oe=$e?1:0,P=fe.length;Oe<P;++Oe){var T=fe[Oe];if(/\\[bdsw]/i.test(T))he.push(T);else{var L=Ge(T),f;Oe+2<P&&fe[Oe+1]==="-"?(f=Ge(fe[Oe+2]),Oe+=2):f=L,rt.push([L,f]),f<65||L>122||(f<65||L>90||rt.push([Math.max(65,L)|32,Math.min(f,90)|32]),f<97||L>122||rt.push([Math.max(97,L)&~32,Math.min(f,122)&~32]))}}rt.sort(function(R,ie){return R[0]-ie[0]||ie[1]-R[1]});for(var p=[],v=[],Oe=0;Oe<rt.length;++Oe){var w=rt[Oe];w[0]<=v[1]+1?v[1]=Math.max(v[1],w[1]):p.push(v=w)}for(var Oe=0;Oe<p.length;++Oe){var w=p[Oe];he.push(Ke(w[0])),w[1]>w[0]&&(w[1]+1>w[0]&&he.push("-"),he.push(Ke(w[1])))}return he.push("]"),he.join("")}function st(Je){for(var fe=Je.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),rt=fe.length,$e=[],he=0,Oe=0;he<rt;++he){var P=fe[he];if(P==="(")++Oe;else if(P.charAt(0)==="\\"){var T=+P.substring(1);T&&(T<=Oe?$e[T]=-1:fe[he]=Ke(T))}}for(var he=1;he<$e.length;++he)$e[he]===-1&&($e[he]=++ue);for(var he=0,Oe=0;he<rt;++he){var P=fe[he];if(P==="(")++Oe,$e[Oe]||(fe[he]="(?:");else if(P.charAt(0)==="\\"){var T=+P.substring(1);T&&T<=Oe&&(fe[he]="\\"+$e[T])}}for(var he=0;he<rt;++he)fe[he]==="^"&&fe[he+1]!=="^"&&(fe[he]="");if(Je.ignoreCase&&Ee)for(var he=0;he<rt;++he){var P=fe[he],L=P.charAt(0);P.length>=2&&L==="["?fe[he]=Ve(P):L!=="\\"&&(fe[he]=P.replace(/[a-zA-Z]/g,function(v){var w=v.charCodeAt(0);return"["+String.fromCharCode(w&~32,w|32)+"]"}))}return fe.join("")}for(var tt=[],Me=0,ke=Y.length;Me<ke;++Me){var Se=Y[Me];if(Se.global||Se.multiline)throw new Error(""+Se);tt.push("(?:"+st(Se)+")")}return new RegExp(tt.join("|"),je?"gi":"g")}function s(Y,ue){var Ee=/(?:^|\s)nocode(?:\s|$)/,je=[],Me=0,ke=[],Se=0;function et(Ge){var Ke=Ge.nodeType;if(Ke==1){if(Ee.test(Ge.className))return;for(var Ve=Ge.firstChild;Ve;Ve=Ve.nextSibling)et(Ve);var st=Ge.nodeName.toLowerCase();(st==="br"||st==="li")&&(je[Se]=`
|
|
`,ke[Se<<1]=Me++,ke[Se++<<1|1]=Ge)}else if(Ke==3||Ke==4){var tt=Ge.nodeValue;tt.length&&(ue?tt=tt.replace(/\r\n?/g,`
|
|
`):tt=tt.replace(/[ \t\r\n]+/g," "),je[Se]=tt,ke[Se<<1]=Me,Me+=tt.length,ke[Se++<<1|1]=Ge)}}return et(Y),{sourceCode:je.join("").replace(/\n$/,""),spans:ke}}function m(Y,ue,Ee,je,Me){if(!Ee)return;var ke={sourceNode:Y,pre:1,langExtension:null,numberLines:null,sourceCode:Ee,spans:null,basePos:ue,decorations:null};je(ke),Me.push.apply(Me,ke.decorations)}var A=/\S/;function H(Y){for(var ue=void 0,Ee=Y.firstChild;Ee;Ee=Ee.nextSibling){var je=Ee.nodeType;ue=je===1?ue?Y:Ee:je===3&&A.test(Ee.nodeValue)?Y:ue}return ue===Y?void 0:ue}function pe(Y,ue){var Ee={},je;(function(){for(var Se=Y.concat(ue),et=[],Ge={},Ke=0,Ve=Se.length;Ke<Ve;++Ke){var st=Se[Ke],tt=st[3];if(tt)for(var Je=tt.length;--Je>=0;)Ee[tt.charAt(Je)]=st;var fe=st[1],rt=""+fe;Ge.hasOwnProperty(rt)||(et.push(fe),Ge[rt]=null)}et.push(/[\0-\uffff]/),je=c(et)})();var Me=ue.length,ke=function(Se){for(var et=Se.sourceCode,Ge=Se.basePos,Ke=Se.sourceNode,Ve=[Ge,b],st=0,tt=et.match(je)||[],Je={},fe=0,rt=tt.length;fe<rt;++fe){var $e=tt[fe],he=Je[$e],Oe=void 0,P;if(typeof he=="string")P=!1;else{var T=Ee[$e.charAt(0)];if(T)Oe=$e.match(T[1]),he=T[0];else{for(var L=0;L<Me;++L)if(T=ue[L],Oe=$e.match(T[1]),Oe){he=T[0];break}Oe||(he=b)}P=he.length>=5&&he.substring(0,5)==="lang-",P&&!(Oe&&typeof Oe[1]=="string")&&(P=!1,he=x),P||(Je[$e]=he)}var f=st;if(st+=$e.length,!P)Ve.push(Ge+f,he);else{var p=Oe[1],v=$e.indexOf(p),w=v+p.length;Oe[2]&&(w=$e.length-Oe[2].length,v=w-p.length);var R=he.substring(5);m(Ke,Ge+f,$e.substring(0,v),ke,Ve),m(Ke,Ge+f+v,p,J(R,p),Ve),m(Ke,Ge+f+w,$e.substring(w),ke,Ve)}}Se.decorations=Ve};return ke}function Ae(Y){var ue=[],Ee=[];Y.tripleQuotedStrings?ue.push([Re,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Y.multiLineStrings?ue.push([Re,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):ue.push([Re,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Y.verbatimStrings&&Ee.push([Re,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var je=Y.hashComments;je&&(Y.cStyleComments?(je>1?ue.push([me,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):ue.push([me,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ee.push([Re,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):ue.push([me,/^#[^\r\n]*/,null,"#"])),Y.cStyleComments&&(Ee.push([me,/^\/\/[^\r\n]*/,null]),Ee.push([me,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Me=Y.regexLiterals;if(Me){var ke=Me>1?"":`
|
|
\r`,Se=ke?".":"[\\S\\s]",et="/(?=[^/*"+ke+"])(?:[^/\\x5B\\x5C"+ke+"]|\\x5C"+Se+"|\\x5B(?:[^\\x5C\\x5D"+ke+"]|\\x5C"+Se+")*(?:\\x5D|$))+/";Ee.push(["lang-regex",RegExp("^"+k+"("+et+")")])}var Ge=Y.types;Ge&&Ee.push([ge,Ge]);var Ke=(""+Y.keywords).replace(/^ | $/g,"");Ke.length&&Ee.push([We,new RegExp("^(?:"+Ke.replace(/[\s,]+/g,"|")+")\\b"),null]),ue.push([b,/^\s+/,null,` \r
|
|
\xA0`]);var Ve="^.[^\\s\\w.$@'\"`/\\\\]*";return Y.regexLiterals&&(Ve+="(?!s*/)"),Ee.push([Pe,/^@[a-z_$][a-z_$@0-9]*/i,null],[ge,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[b,/^[a-z_$][a-z_$@0-9]*/i,null],[Pe,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[b,/^\\[\s\S]?/,null],[ae,new RegExp(Ve),null]),pe(ue,Ee)}var le=Ae({keywords:Xe,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function te(Y,ue,Ee){for(var je=/(?:^|\s)nocode(?:\s|$)/,Me=/\r\n?|\n/,ke=Y.ownerDocument,Se=ke.createElement("li");Y.firstChild;)Se.appendChild(Y.firstChild);var et=[Se];function Ge(fe){var rt=fe.nodeType;if(rt==1&&!je.test(fe.className))if(fe.nodeName==="br")Ke(fe),fe.parentNode&&fe.parentNode.removeChild(fe);else for(var $e=fe.firstChild;$e;$e=$e.nextSibling)Ge($e);else if((rt==3||rt==4)&&Ee){var he=fe.nodeValue,Oe=he.match(Me);if(Oe){var P=he.substring(0,Oe.index);fe.nodeValue=P;var T=he.substring(Oe.index+Oe[0].length);if(T){var L=fe.parentNode;L.insertBefore(ke.createTextNode(T),fe.nextSibling)}Ke(fe),P||fe.parentNode.removeChild(fe)}}}function Ke(fe){for(;!fe.nextSibling;)if(fe=fe.parentNode,!fe)return;function rt(Oe,P){var T=P?Oe.cloneNode(!1):Oe,L=Oe.parentNode;if(L){var f=rt(L,1),p=Oe.nextSibling;f.appendChild(T);for(var v=p;v;v=p)p=v.nextSibling,f.appendChild(v)}return T}for(var $e=rt(fe.nextSibling,0),he;(he=$e.parentNode)&&he.nodeType===1;)$e=he;et.push($e)}for(var Ve=0;Ve<et.length;++Ve)Ge(et[Ve]);ue===(ue|0)&&et[0].setAttribute("value",ue);var st=ke.createElement("ol");st.className="linenums";for(var tt=Math.max(0,ue-1|0)||0,Ve=0,Je=et.length;Ve<Je;++Ve)Se=et[Ve],Se.className="L"+(Ve+tt)%10,Se.firstChild||Se.appendChild(ke.createTextNode("\xA0")),st.appendChild(Se);Y.appendChild(st)}function V(Y){var ue=/\bMSIE\s(\d+)/.exec(navigator.userAgent);ue=ue&&+ue[1]<=8;var Ee=/\n/g,je=Y.sourceCode,Me=je.length,ke=0,Se=Y.spans,et=Se.length,Ge=0,Ke=Y.decorations,Ve=Ke.length,st=0;Ke[Ve]=Me;var tt,Je;for(Je=tt=0;Je<Ve;)Ke[Je]!==Ke[Je+2]?(Ke[tt++]=Ke[Je++],Ke[tt++]=Ke[Je++]):Je+=2;for(Ve=tt,Je=tt=0;Je<Ve;){for(var fe=Ke[Je],rt=Ke[Je+1],$e=Je+2;$e+2<=Ve&&Ke[$e+1]===rt;)$e+=2;Ke[tt++]=fe,Ke[tt++]=rt,Je=$e}Ve=Ke.length=tt;var he=Y.sourceNode,Oe="";he&&(Oe=he.style.display,he.style.display="none");try{for(var P=null;Ge<et;){var T=Se[Ge],L=Se[Ge+2]||Me,f=Ke[st+2]||Me,$e=Math.min(L,f),p=Se[Ge+1],v;if(p.nodeType!==1&&(v=je.substring(ke,$e))){ue&&(v=v.replace(Ee,"\r")),p.nodeValue=v;var w=p.ownerDocument,R=w.createElement("span");R.className=Ke[st+1];var ie=p.parentNode;ie.replaceChild(R,p),R.appendChild(p),ke<L&&(Se[Ge+1]=p=w.createTextNode(je.substring($e,L)),ie.insertBefore(p,R.nextSibling))}ke=$e,ke>=L&&(Ge+=2),ke>=f&&(st+=2)}}finally{he&&(he.style.display=Oe)}}var $={};function N(Y,ue){for(var Ee=ue.length;--Ee>=0;){var je=ue[Ee];$.hasOwnProperty(je)?W.console&&console.warn("cannot override language handler %s",je):$[je]=Y}}function J(Y,ue){return Y&&$.hasOwnProperty(Y)||(Y=/^\s*</.test(ue)?"default-markup":"default-code"),$[Y]}N(le,["default-code"]),N(pe([],[[b,/^[^<?]+/],[F,/^<!\w[^>]*(?:>|$)/],[me,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[ae,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),N(pe([[b,/^[\s]+/,null,` \r
|
|
`],[j,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[ne,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[ee,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[ae,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),N(pe([],[[j,/^[\s\S]+/]]),["uq.val"]),N(Ae({keywords:S,hashComments:!0,cStyleComments:!0,types:Ie}),["c","cc","cpp","cxx","cyc","m"]),N(Ae({keywords:"null,true,false"}),["json"]),N(Ae({keywords:Q,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Ie}),["cs"]),N(Ae({keywords:be,cStyleComments:!0}),["java"]),N(Ae({keywords:Te,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),N(Ae({keywords:oe,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),N(Ae({keywords:I,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),N(Ae({keywords:ce,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),N(Ae({keywords:B,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),N(Ae({keywords:U,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),N(pe([],[[Re,/^[\s\S]+/]]),["regex"]);function h(Y){var ue=Y.langExtension;try{var Ee=s(Y.sourceNode,Y.pre),je=Ee.sourceCode;Y.sourceCode=je,Y.spans=Ee.spans,Y.basePos=0,J(ue,je)(Y),V(Y)}catch(Me){W.console&&console.log(Me&&Me.stack||Me)}}function C(Y,ue,Ee){var je=Ee||!1,Me=ue||null,ke=document.createElement("div");ke.innerHTML="<pre>"+Y+"</pre>",ke=ke.firstChild,je&&te(ke,je,!0);var Se={langExtension:Me,numberLines:je,sourceNode:ke,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return h(Se),ke.innerHTML}function g(Y,ue){var Ee=ue||document.body,je=Ee.ownerDocument||document;function Me(T){return Ee.getElementsByTagName(T)}for(var ke=[Me("pre"),Me("code"),Me("xmp")],Se=[],et=0;et<ke.length;++et)for(var Ge=0,Ke=ke[et].length;Ge<Ke;++Ge)Se.push(ke[et][Ge]);ke=null;var Ve=Date;Ve.now||(Ve={now:function(){return+new Date}});var st=0,tt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Je=/\bprettyprint\b/,fe=/\bprettyprinted\b/,rt=/pre|xmp/i,$e=/^code$/i,he=/^(?:pre|code|xmp)$/i,Oe={};function P(){for(var T=W.PR_SHOULD_USE_CONTINUATION?Ve.now()+250:Infinity;st<Se.length&&Ve.now()<T;st++){for(var L=Se[st],f=Oe,p=L;p=p.previousSibling;){var v=p.nodeType,w=(v===7||v===8)&&p.nodeValue;if(w?!/^\??prettify\b/.test(w):v!==3||/\S/.test(p.nodeValue))break;if(w){f={},w.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Ot,vt,sn){f[vt]=sn});break}}var R=L.className;if((f!==Oe||Je.test(R))&&!fe.test(R)){for(var ie=!1,ye=L.parentNode;ye;ye=ye.parentNode){var Ue=ye.tagName;if(he.test(Ue)&&ye.className&&Je.test(ye.className)){ie=!0;break}}if(!ie){L.className+=" prettyprinted";var Ye=f.lang;if(!Ye){Ye=R.match(tt);var Fe;!Ye&&(Fe=H(L))&&$e.test(Fe.tagName)&&(Ye=Fe.className.match(tt)),Ye&&(Ye=Ye[1])}var yt;if(rt.test(L.tagName))yt=1;else{var dt=L.currentStyle,it=je.defaultView,kt=dt?dt.whiteSpace:it&&it.getComputedStyle?it.getComputedStyle(L,null).getPropertyValue("white-space"):0;yt=kt&&kt.substring(0,3)==="pre"}var xt=f.linenums;(xt=xt==="true"||+xt)||(xt=R.match(/\blinenums\b(?::(\d+))?/),xt=xt?xt[1]&&xt[1].length?+xt[1]:!0:!1),xt&&te(L,xt,yt);var Et={langExtension:Ye,sourceNode:L,numberLines:xt,pre:yt,sourceCode:null,basePos:null,spans:null,decorations:null};h(Et)}}}st<Se.length?W.setTimeout(P,250):typeof Y=="function"&&Y()}P()}var re=W.PR={createSimpleLexer:pe,registerLangHandler:N,sourceDecorator:Ae,PR_ATTRIB_NAME:ee,PR_ATTRIB_VALUE:j,PR_COMMENT:me,PR_DECLARATION:F,PR_KEYWORD:We,PR_LITERAL:Pe,PR_NOCODE:O,PR_PLAIN:b,PR_PUNCTUATION:ae,PR_SOURCE:x,PR_STRING:Re,PR_TAG:ne,PR_TYPE:ge,prettyPrintOne:se?W.prettyPrintOne=C:q=C,prettyPrint:M=se?W.prettyPrint=g:M=g},ve=W.define;typeof ve=="function"&&ve.amd&&ve("google-code-prettify",[],function(){return re})})()},"VrN/":function(ht,nt,_){(function(G,xe){ht.exports=xe()})(this,function(){"use strict";var G=navigator.userAgent,xe=navigator.platform,se=/gecko\/\d/i.test(G),Le=/MSIE \d/.test(G),we=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(G),q=/Edge\/(\d+)/.exec(G),M=Le||we||q,W=M&&(Le?document.documentMode||6:+(q||we)[1]),Z=!q&&/WebKit\//.test(G),X=Z&&/Qt\/\d+\.\d+/.test(G),D=!q&&/Chrome\//.test(G),S=/Opera\//.test(G),be=/Apple Computer/.test(navigator.vendor),Q=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(G),U=/PhantomJS/.test(G),B=!q&&/AppleWebKit/.test(G)&&/Mobile\/\w+/.test(G),I=/Android/.test(G),oe=B||I||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(G),ce=B||/Mac/.test(xe),Te=/\bCrOS\b/.test(G),Xe=/win/i.test(xe),Ie=S&&G.match(/Version\/(\d*\.\d*)/);Ie&&(Ie=Number(Ie[1])),Ie&&Ie>=15&&(S=!1,Z=!0);var Re=ce&&(X||S&&(Ie==null||Ie<12.11)),We=se||M&&W>=9;function me(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var ge=function(e,t){var r=e.className,n=me(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function Pe(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function ae(e,t){return Pe(e).appendChild(t)}function b(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function ne(e,t,r,n){var i=b(e,t,r,n);return i.setAttribute("role","presentation"),i}var F;document.createRange?F=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:F=function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(i){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};function x(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function ee(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function j(e,t){var r=e.className;me(t).test(r)||(e.className+=(r?" ":"")+t)}function O(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!me(r[n]).test(t)&&(t+=" "+r[n]);return t}var k=function(e){e.select()};B?k=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:M&&(k=function(e){try{e.select()}catch(t){}});function c(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function s(e,t,r){t||(t={});for(var n in e)e.hasOwnProperty(n)&&(r!==!1||!t.hasOwnProperty(n))&&(t[n]=e[n]);return t}function m(e,t,r,n,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=n||0,o=i||0;;){var l=e.indexOf(" ",a);if(l<0||l>=t)return o+(t-a);o+=l-a,o+=r-o%r,a=l+1}}var A=function(){this.id=null,this.f=null,this.time=0,this.handler=c(this.onTimeout,this)};A.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},A.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};function H(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var pe=50,Ae={toString:function(){return"CodeMirror.Pass"}},le={scroll:!1},te={origin:"*mouse"},V={origin:"+move"};function $(e,t,r){for(var n=0,i=0;;){var a=e.indexOf(" ",n);a==-1&&(a=e.length);var o=a-n;if(a==e.length||i+o>=t)return n+Math.min(o,t-i);if(i+=a-n,i+=r-i%r,n=a+1,i>=t)return n}}var N=[""];function J(e){for(;N.length<=e;)N.push(h(N)+" ");return N[e]}function h(e){return e[e.length-1]}function C(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function g(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function re(){}function ve(e,t){var r;return Object.create?r=Object.create(e):(re.prototype=e,r=new re),t&&s(t,r),r}var Y=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ue(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Y.test(e))}function Ee(e,t){return t?t.source.indexOf("\\w")>-1&&ue(e)?!0:t.test(e):ue(e)}function je(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Me=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ke(e){return e.charCodeAt(0)>=768&&Me.test(e)}function Se(e,t,r){for(;(r<0?t>0:t<e.length)&&ke(e.charAt(t));)t+=r;return t}function et(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,a=n<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:r;e(a)?r=a:t=a+n}}function Ge(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<r&&o.to>t||t==r&&o.to==t)&&(n(Math.max(o.from,t),Math.min(o.to,r),o.level==1?"rtl":"ltr",a),i=!0)}i||n(t,r,"ltr")}var Ke=null;function Ve(e,t,r){var n;Ke=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&r=="before"?n=i:Ke=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:Ke=i)}return n!=null?n:Ke}var st=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(d){return d<=247?e.charAt(d):1424<=d&&d<=1524?"R":1536<=d&&d<=1785?t.charAt(d-1536):1774<=d&&d<=2220?"r":8192<=d&&d<=8203?"w":d==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function u(d,y,E){this.level=d,this.from=y,this.to=E}return function(d,y){var E=y=="ltr"?"L":"R";if(d.length==0||y=="ltr"&&!n.test(d))return!1;for(var K=d.length,z=[],de=0;de<K;++de)z.push(r(d.charCodeAt(de)));for(var Ce=0,Ne=E;Ce<K;++Ce){var He=z[Ce];He=="m"?z[Ce]=Ne:Ne=He}for(var Be=0,ze=E;Be<K;++Be){var qe=z[Be];qe=="1"&&ze=="r"?z[Be]="n":a.test(qe)&&(ze=qe,qe=="r"&&(z[Be]="R"))}for(var lt=1,at=z[0];lt<K-1;++lt){var pt=z[lt];pt=="+"&&at=="1"&&z[lt+1]=="1"?z[lt]="1":pt==","&&at==z[lt+1]&&(at=="1"||at=="n")&&(z[lt]=at),at=pt}for(var _t=0;_t<K;++_t){var Wt=z[_t];if(Wt==",")z[_t]="N";else if(Wt=="%"){var Mt=void 0;for(Mt=_t+1;Mt<K&&z[Mt]=="%";++Mt);for(var un=_t&&z[_t-1]=="!"||Mt<K&&z[Mt]=="1"?"1":"N",rn=_t;rn<Mt;++rn)z[rn]=un;_t=Mt-1}}for(var jt=0,an=E;jt<K;++jt){var Gt=z[jt];an=="L"&&Gt=="1"?z[jt]="L":a.test(Gt)&&(an=Gt)}for(var Ft=0;Ft<K;++Ft)if(i.test(z[Ft])){var It=void 0;for(It=Ft+1;It<K&&i.test(z[It]);++It);for(var Nt=(Ft?z[Ft-1]:E)=="L",on=(It<K?z[It]:E)=="L",Hr=Nt==on?Nt?"L":"R":E,Jn=Ft;Jn<It;++Jn)z[Jn]=Hr;Ft=It-1}for(var $t=[],Rn,Bt=0;Bt<K;)if(o.test(z[Bt])){var Ka=Bt;for(++Bt;Bt<K&&o.test(z[Bt]);++Bt);$t.push(new u(0,Ka,Bt))}else{var zn=Bt,fr=$t.length,hr=y=="rtl"?1:0;for(++Bt;Bt<K&&z[Bt]!="L";++Bt);for(var Jt=zn;Jt<Bt;)if(l.test(z[Jt])){zn<Jt&&($t.splice(fr,0,new u(1,zn,Jt)),fr+=hr);var zr=Jt;for(++Jt;Jt<Bt&&l.test(z[Jt]);++Jt);$t.splice(fr,0,new u(2,zr,Jt)),fr+=hr,zn=Jt}else++Jt;zn<Bt&&$t.splice(fr,0,new u(1,zn,Bt))}return y=="ltr"&&($t[0].level==1&&(Rn=d.match(/^\s+/))&&($t[0].from=Rn[0].length,$t.unshift(new u(0,0,Rn[0].length))),h($t).level==1&&(Rn=d.match(/\s+$/))&&(h($t).to-=Rn[0].length,$t.push(new u(0,K-Rn[0].length,K)))),y=="rtl"?$t.reverse():$t}}();function tt(e,t){var r=e.order;return r==null&&(r=e.order=st(e.text,t)),r}var Je=[],fe=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Je).concat(r)}};function rt(e,t){return e._handlers&&e._handlers[t]||Je}function $e(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var a=H(i,r);a>-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function he(e,t){var r=rt(e,t);if(!r.length)return;for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function Oe(e,t,r){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),he(e,r||t.type,e,t),v(t)||t.codemirrorIgnore}function P(e){var t=e._handlers&&e._handlers.cursorActivity;if(!t)return;for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)H(r,t[n])==-1&&r.push(t[n])}function T(e,t){return rt(e,t).length>0}function L(e){e.prototype.on=function(t,r){fe(this,t,r)},e.prototype.off=function(t,r){$e(this,t,r)}}function f(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function p(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function v(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function w(e){f(e),p(e)}function R(e){return e.target||e.srcElement}function ie(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),ce&&e.ctrlKey&&t==1&&(t=3),t}var ye=function(){if(M&&W<9)return!1;var e=b("div");return"draggable"in e||"dragDrop"in e}(),Ue;function Ye(e){if(Ue==null){var t=b("span","\u200B");ae(e,b("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Ue=t.offsetWidth<=1&&t.offsetHeight>2&&!(M&&W<8))}var r=Ue?b("span","\u200B"):b("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var Fe;function yt(e){if(Fe!=null)return Fe;var t=ae(e,document.createTextNode("A\u062EA")),r=F(t,0,1).getBoundingClientRect(),n=F(t,1,2).getBoundingClientRect();return Pe(e),!r||r.left==r.right?!1:Fe=n.right-r.right<3}var dt=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf(`
|
|
`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=a.indexOf("\r");o!=-1?(r.push(a.slice(0,o)),t+=o+1):(r.push(a),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},it=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(r){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},kt=function(){var e=b("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),xt=null;function Et(e){if(xt!=null)return xt;var t=ae(e,b("span","x")),r=t.getBoundingClientRect(),n=F(t,0,1).getBoundingClientRect();return xt=Math.abs(r.left-n.left)>1}var Ot={},vt={};function sn(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ot[e]=t}function Mn(e,t){vt[e]=t}function cn(e){if(typeof e=="string"&&vt.hasOwnProperty(e))e=vt[e];else if(e&&typeof e.name=="string"&&vt.hasOwnProperty(e.name)){var t=vt[e.name];typeof t=="string"&&(t={name:t}),e=ve(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return cn("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return cn("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function vn(e,t){t=cn(t);var r=Ot[t.name];if(!r)return vn(e,"text/plain");var n=r(e,t);if(pn.hasOwnProperty(t.name)){var i=pn[t.name];for(var a in i){if(!i.hasOwnProperty(a))continue;n.hasOwnProperty(a)&&(n["_"+a]=n[a]),n[a]=i[a]}}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)n[o]=t.modeProps[o];return n}var pn={};function ia(e,t){var r=pn.hasOwnProperty(e)?pn[e]:pn[e]={};s(t,r)}function An(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Wr(e,t){for(var r;e.innerMode&&!(r=e.innerMode(t),!r||r.mode==e);)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Br(e,t,r){return e.startState?e.startState(t,r):!0}var Dt=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Dt.prototype.eol=function(){return this.pos>=this.string.length},Dt.prototype.sol=function(){return this.pos==this.lineStart},Dt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Dt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Dt.prototype.eat=function(e){var t=this.string.charAt(this.pos),r;if(typeof e=="string"?r=t==e:r=t&&(e.test?e.test(t):e(t)),r)return++this.pos,t},Dt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Dt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Dt.prototype.skipToEnd=function(){this.pos=this.string.length},Dt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Dt.prototype.backUp=function(e){this.pos-=e},Dt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=m(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?m(this.string,this.lineStart,this.tabSize):0)},Dt.prototype.indentation=function(){return m(this.string,null,this.tabSize)-(this.lineStart?m(this.string,this.lineStart,this.tabSize):0)},Dt.prototype.match=function(e,t,r){if(typeof e=="string"){var n=function(o){return r?o.toLowerCase():o},i=this.string.substr(this.pos,e.length);if(n(i)==n(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},Dt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Dt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Dt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Dt.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Ze(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],a=i.chunkSize();if(t<a){r=i;break}t-=a}return r.lines[t]}function Dn(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(a){var o=a.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function pr(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function Zt(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function Ct(e){if(e.parent==null)return null;for(var t=e.parent,r=H(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;!(n.children[i]==t);++i)r+=n.children[i].chunkSize();return r+t.first}function bn(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],a=i.height;if(t<a){e=i;continue e}t-=a,r+=i.chunkSize()}return r}while(!e.lines);for(var o=0;o<e.lines.length;++o){var l=e.lines[o],u=l.height;if(t<u)break;t-=u}return r+o}function Nn(e,t){return t>=e.first&&t<e.first+e.size}function mr(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function _e(e,t,r){if(r===void 0&&(r=null),!(this instanceof _e))return new _e(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ut(e,t){return e.line-t.line||e.ch-t.ch}function Xr(e,t){return e.sticky==t.sticky&&ut(e,t)==0}function gr(e){return _e(e.line,e.ch)}function vr(e,t){return ut(e,t)<0?t:e}function Zn(e,t){return ut(e,t)<0?e:t}function br(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ft(e,t){if(t.line<e.first)return _e(e.first,0);var r=e.first+e.size-1;return t.line>r?_e(r,Ze(e,r).text.length):Ti(t,Ze(e,t.line).text.length)}function Ti(e,t){var r=e.ch;return r==null||r>t?_e(e.line,t):r<0?_e(e.line,0):e}function De(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=ft(e,t[n]);return r}var yr=function(e,t){this.state=e,this.lookAhead=t},mn=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};mn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},mn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},mn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mn.fromSaved=function(e,t,r){return t instanceof yr?new mn(e,An(e.mode,t.state),r,t.lookAhead):new mn(e,An(e.mode,t),r)},mn.prototype.save=function(e){var t=e!==!1?An(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new yr(t,this.maxLookAhead):t};function Gr(e,t,r,n){var i=[e.state.modeGen],a={};wn(e,t.text,e.doc.mode,r,function(d,y){return i.push(d,y)},a,n);for(var o=r.state,l=function(d){r.baseTokens=i;var y=e.state.overlays[d],E=1,K=0;r.state=!0,wn(e,t.text,y.mode,r,function(z,de){for(var Ce=E;K<z;){var Ne=i[E];Ne>z&&i.splice(E,1,z,i[E+1],Ne),E+=2,K=Math.min(z,Ne)}if(!de)return;if(y.opaque)i.splice(Ce,E-Ce,z,"overlay "+de),E=Ce+2;else for(;Ce<E;Ce+=2){var He=i[Ce+1];i[Ce+1]=(He?He+" ":"")+"overlay "+de}},a),r.state=o,r.baseTokens=null,r.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)l(u);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function Qn(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=yn(e,Ct(t)),i=t.text.length>e.options.maxHighlightLength&&An(e.doc.mode,n.state),a=Gr(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function yn(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new mn(n,!0,t);var a=Oi(e,t,r),o=a>n.first&&Ze(n,a-1).stateAfter,l=o?mn.fromSaved(n,o,a):new mn(n,Br(n.mode),a);return n.iter(a,t,function(u){Kr(e,u.text,l);var d=l.line;u.stateAfter=d==t-1||d%5==0||d>=i.viewFrom&&d<i.viewTo?l.save():null,l.nextLine()}),r&&(n.modeFrontier=l.line),l}function Kr(e,t,r,n){var i=e.doc.mode,a=new Dt(t,e.options.tabSize,r);for(a.start=a.pos=n||0,t==""&&Vr(i,r.state);!a.eol();)xn(i,a,r.state),a.start=a.pos}function Vr(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=Wr(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function xn(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Wr(e,r).mode);var a=e.token(t,r);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var $r=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Ai(e,t,r,n){var i=e.doc,a=i.mode,o;t=ft(i,t);var l=Ze(i,t.line),u=yn(e,t.line,r),d=new Dt(l.text,e.options.tabSize,u),y;for(n&&(y=[]);(n||d.pos<t.ch)&&!d.eol();)d.start=d.pos,o=xn(a,d,u.state),n&&y.push(new $r(d,o,An(i.mode,u.state)));return n?y:new $r(d,o,u.state)}function Yr(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";t[n]==null?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function wn(e,t,r,n,i,a,o){var l=r.flattenSpans;l==null&&(l=e.options.flattenSpans);var u=0,d=null,y=new Dt(t,e.options.tabSize,n),E,K=e.options.addModeClass&&[null];for(t==""&&Yr(Vr(r,n.state),a);!y.eol();){if(y.pos>e.options.maxHighlightLength?(l=!1,o&&Kr(e,t,n,y.pos),y.pos=t.length,E=null):E=Yr(xn(r,y,n.state,K),a),K){var z=K[0].name;z&&(E="m-"+(E?z+" "+E:z))}if(!l||d!=E){for(;u<y.start;)u=Math.min(y.start,u+5e3),i(u,d);d=E}y.start=y.pos}for(;u<y.pos;){var de=Math.min(y.pos,u+5e3);i(de,d),u=de}}function Oi(e,t,r){for(var n,i,a=e.doc,o=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>o;--l){if(l<=a.first)return a.first;var u=Ze(a,l-1),d=u.stateAfter;if(d&&(!r||l+(d instanceof yr?d.lookAhead:0)<=a.modeFrontier))return l;var y=m(u.text,null,e.options.tabSize);(i==null||n>y)&&(i=l-1,n=y)}return i}function aa(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),e.highlightFrontier<t-10)return;for(var r=e.first,n=t-1;n>r;n--){var i=Ze(e,n).stateAfter;if(i&&(!(i instanceof yr)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var qr=!1,Yt=!1;function Wn(){qr=!0}function oa(){Yt=!0}function er(e,t,r){this.marker=e,this.from=t,this.to=r}function En(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Jr(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function sa(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Li(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,l=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(l||a.from==t&&o.type=="bookmark"&&(!r||!a.marker.insertLeft)){var u=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new er(o,a.from,u?null:a.to))}}return n}function _i(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,l=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(l||a.from==t&&o.type=="bookmark"&&(!r||a.marker.insertLeft)){var u=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new er(o,u?null:a.from-t,a.to==null?null:a.to-t))}}return n}function xr(e,t){if(t.full)return null;var r=Nn(e,t.from.line)&&Ze(e,t.from.line).markedSpans,n=Nn(e,t.to.line)&&Ze(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,a=t.to.ch,o=ut(t.from,t.to)==0,l=Li(r,i,o),u=_i(n,a,o),d=t.text.length==1,y=h(t.text).length+(d?i:0);if(l)for(var E=0;E<l.length;++E){var K=l[E];if(K.to==null){var z=En(u,K.marker);z?d&&(K.to=z.to==null?null:z.to+y):K.to=i}}if(u)for(var de=0;de<u.length;++de){var Ce=u[de];if(Ce.to!=null&&(Ce.to+=y),Ce.from==null){var Ne=En(l,Ce.marker);Ne||(Ce.from=y,d&&(l||(l=[])).push(Ce))}else Ce.from+=y,d&&(l||(l=[])).push(Ce)}l&&(l=Ri(l)),u&&u!=l&&(u=Ri(u));var He=[l];if(!d){var Be=t.text.length-2,ze;if(Be>0&&l)for(var qe=0;qe<l.length;++qe)l[qe].to==null&&(ze||(ze=[])).push(new er(l[qe].marker,null,null));for(var lt=0;lt<Be;++lt)He.push(ze);He.push(u)}return He}function Ri(e){for(var t=0;t<e.length;++t){var r=e[t];r.from!=null&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Mi(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(z){if(z.markedSpans)for(var de=0;de<z.markedSpans.length;++de){var Ce=z.markedSpans[de].marker;Ce.readOnly&&(!n||H(n,Ce)==-1)&&(n||(n=[])).push(Ce)}}),!n)return null;for(var i=[{from:t,to:r}],a=0;a<n.length;++a)for(var o=n[a],l=o.find(0),u=0;u<i.length;++u){var d=i[u];if(ut(d.to,l.from)<0||ut(d.from,l.to)>0)continue;var y=[u,1],E=ut(d.from,l.from),K=ut(d.to,l.to);(E<0||!o.inclusiveLeft&&!E)&&y.push({from:d.from,to:l.from}),(K>0||!o.inclusiveRight&&!K)&&y.push({from:l.to,to:d.to}),i.splice.apply(i,y),u+=y.length-3}return i}function la(e){var t=e.markedSpans;if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}function wr(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function tr(e){return e.inclusiveLeft?-1:0}function nr(e){return e.inclusiveRight?1:0}function Er(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),a=ut(n.from,i.from)||tr(e)-tr(t);if(a)return-a;var o=ut(n.to,i.to)||nr(e)-nr(t);return o||t.id-e.id}function Pn(e,t){var r=Yt&&e.markedSpans,n;if(r)for(var i=void 0,a=0;a<r.length;++a)i=r[a],i.marker.collapsed&&(t?i.from:i.to)==null&&(!n||Er(n,i.marker)<0)&&(n=i.marker);return n}function jn(e){return Pn(e,!0)}function In(e){return Pn(e,!1)}function Cr(e,t){var r=Yt&&e.markedSpans,n;if(r)for(var i=0;i<r.length;++i){var a=r[i];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!n||Er(n,a.marker)<0)&&(n=a.marker)}return n}function Di(e,t,r,n,i){var a=Ze(e,t),o=Yt&&a.markedSpans;if(o)for(var l=0;l<o.length;++l){var u=o[l];if(!u.marker.collapsed)continue;var d=u.marker.find(0),y=ut(d.from,r)||tr(u.marker)-tr(i),E=ut(d.to,n)||nr(u.marker)-nr(i);if(y>=0&&E<=0||y<=0&&E>=0)continue;if(y<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ut(d.to,r)>=0:ut(d.to,r)>0)||y>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?ut(d.from,n)<=0:ut(d.from,n)<0))return!0}}function dn(e){for(var t;t=jn(e);)e=t.find(-1,!0).line;return e}function Ni(e){for(var t;t=In(e);)e=t.find(1,!0).line;return e}function kr(e){for(var t,r;t=In(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Zr(e,t){var r=Ze(e,t),n=dn(r);return r==n?t:Ct(n)}function Bn(e,t){if(t>e.lastLine())return t;var r=Ze(e,t),n;if(!On(e,r))return t;for(;n=In(r);)r=n.find(1,!0).line;return Ct(r)+1}function On(e,t){var r=Yt&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i){if(n=r[i],!n.marker.collapsed)continue;if(n.from==null)return!0;if(n.marker.widgetNode)continue;if(n.from==0&&n.marker.inclusiveLeft&&Qr(e,t,n))return!0}}function Qr(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return Qr(e,n.line,En(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if(i=t.markedSpans[a],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(i.to==null||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&Qr(e,t,i))return!0}function Cn(e){e=dn(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var a=r.parent;a;r=a,a=r.parent)for(var o=0;o<a.children.length;++o){var l=a.children[o];if(l==r)break;t+=l.height}return t}function ei(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=jn(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=In(n);){var a=r.find(0,!0);t-=n.text.length-a.from.ch,n=a.to.line,t+=n.text.length-a.to.ch}return t}function Pi(e){var t=e.display,r=e.doc;t.maxLine=Ze(r,r.first),t.maxLineLength=ei(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=ei(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var rr=function(e,t,r){this.text=e,wr(this,t),this.height=r?r(this):1};rr.prototype.lineNo=function(){return Ct(this)},L(rr);function ua(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),la(e),wr(e,r);var i=n?n(e):1;i!=e.height&&Zt(e,i)}function Qe(e){e.parent=null,la(e)}var ct={},ot={};function mt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?ot:ct;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function wt(e,t){var r=ne("span",null,null,Z?"padding-right: .1px":null),n={pre:ne("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;n.pos=0,n.addToken=bt,yt(e.display.measure)&&(o=tt(a,e.doc.direction))&&(n.addToken=Qt(n.addToken,o)),n.map=[];var l=t!=e.display.externalMeasured&&Ct(a);Un(a,n,Qn(e,a,l)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=O(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=O(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(Ye(e.display.measure))),i==0?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Z){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return he(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=O(n.pre.className,n.textClass||"")),n}function Lt(e){var t=b("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function bt(e,t,r,n,i,a,o){if(!t)return;var l=e.splitSpaces?Ut(t,e.trailingSpace):t,u=e.cm.state.specialChars,d=!1,y;if(!u.test(t))e.col+=t.length,y=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,y),M&&W<9&&(d=!0),e.pos+=t.length;else{y=document.createDocumentFragment();for(var E=0;;){u.lastIndex=E;var K=u.exec(t),z=K?K.index-E:t.length-E;if(z){var de=document.createTextNode(l.slice(E,E+z));M&&W<9?y.appendChild(b("span",[de])):y.appendChild(de),e.map.push(e.pos,e.pos+z,de),e.col+=z,e.pos+=z}if(!K)break;E+=z+1;var Ce=void 0;if(K[0]==" "){var Ne=e.cm.options.tabSize,He=Ne-e.col%Ne;Ce=y.appendChild(b("span",J(He),"cm-tab")),Ce.setAttribute("role","presentation"),Ce.setAttribute("cm-text"," "),e.col+=He}else K[0]=="\r"||K[0]==`
|
|
`?(Ce=y.appendChild(b("span",K[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Ce.setAttribute("cm-text",K[0]),e.col+=1):(Ce=e.cm.options.specialCharPlaceholder(K[0]),Ce.setAttribute("cm-text",K[0]),M&&W<9?y.appendChild(b("span",[Ce])):y.appendChild(Ce),e.col+=1);e.map.push(e.pos,e.pos+1,Ce),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,r||n||i||d||a||o){var Be=r||"";n&&(Be+=n),i&&(Be+=i);var ze=b("span",[y],Be,a);if(o)for(var qe in o)o.hasOwnProperty(qe)&&qe!="style"&&qe!="class"&&ze.setAttribute(qe,o[qe]);return e.content.appendChild(ze)}e.content.appendChild(y)}function Ut(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var a=e.charAt(i);a==" "&&r&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a="\xA0"),n+=a,r=a==" "}return n}function Qt(e,t){return function(r,n,i,a,o,l,u){i=i?i+" cm-force-border":"cm-force-border";for(var d=r.pos,y=d+n.length;;){for(var E=void 0,K=0;K<t.length&&!(E=t[K],E.to>d&&E.from<=d);K++);if(E.to>=y)return e(r,n,i,a,o,l,u);e(r,n.slice(0,E.to-d),i,a,null,l,u),a=null,n=n.slice(E.to-d),d=E.to}}}function gt(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Un(e,t,r){var n=e.markedSpans,i=e.text,a=0;if(!n){for(var o=1;o<r.length;o+=2)t.addToken(t,i.slice(a,a=r[o]),mt(r[o+1],t.cm.options));return}for(var l=i.length,u=0,d=1,y="",E,K,z=0,de,Ce,Ne,He,Be;;){if(z==u){de=Ce=Ne=K="",Be=null,He=null,z=Infinity;for(var ze=[],qe=void 0,lt=0;lt<n.length;++lt){var at=n[lt],pt=at.marker;if(pt.type=="bookmark"&&at.from==u&&pt.widgetNode)ze.push(pt);else if(at.from<=u&&(at.to==null||at.to>u||pt.collapsed&&at.to==u&&at.from==u)){if(at.to!=null&&at.to!=u&&z>at.to&&(z=at.to,Ce=""),pt.className&&(de+=" "+pt.className),pt.css&&(K=(K?K+";":"")+pt.css),pt.startStyle&&at.from==u&&(Ne+=" "+pt.startStyle),pt.endStyle&&at.to==z&&(qe||(qe=[])).push(pt.endStyle,at.to),pt.title&&((Be||(Be={})).title=pt.title),pt.attributes)for(var _t in pt.attributes)(Be||(Be={}))[_t]=pt.attributes[_t];pt.collapsed&&(!He||Er(He.marker,pt)<0)&&(He=at)}else at.from>u&&z>at.from&&(z=at.from)}if(qe)for(var Wt=0;Wt<qe.length;Wt+=2)qe[Wt+1]==z&&(Ce+=" "+qe[Wt]);if(!He||He.from==u)for(var Mt=0;Mt<ze.length;++Mt)gt(t,0,ze[Mt]);if(He&&(He.from||0)==u){if(gt(t,(He.to==null?l+1:He.to)-u,He.marker,He.from==null),He.to==null)return;He.to==u&&(He=!1)}}if(u>=l)break;for(var un=Math.min(l,z);;){if(y){var rn=u+y.length;if(!He){var jt=rn>un?y.slice(0,un-u):y;t.addToken(t,jt,E?E+de:de,Ne,u+jt.length==z?Ce:"",K,Be)}if(rn>=un){y=y.slice(un-u),u=un;break}u=rn,Ne=""}y=i.slice(a,a=r[d++]),E=mt(r[d++],t.cm.options)}}}function St(e,t,r){this.line=t,this.rest=kr(t),this.size=this.rest?Ct(h(this.rest))-r+1:1,this.node=this.text=null,this.hidden=On(e,t)}function en(e,t,r){for(var n=[],i,a=t;a<r;a=i){var o=new St(e.doc,Ze(e.doc,a),a);i=a+o.size,n.push(o)}return n}var Kt=null;function gn(e){Kt?Kt.ops.push(e):e.ownsGroup=Kt={ops:[e],delayedCallbacks:[]}}function _s(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Rs(e,t){var r=e.ownsGroup;if(!r)return;try{_s(r)}finally{Kt=null,t(r)}}var ti=null;function Xt(e,t){var r=rt(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),i;Kt?i=Kt.delayedCallbacks:ti?i=ti:(i=ti=[],setTimeout(Ms,0));for(var a=function(l){i.push(function(){return r[l].apply(null,n)})},o=0;o<r.length;++o)a(o)}function Ms(){var e=ti;ti=null;for(var t=0;t<e.length;++t)e[t]()}function $a(e,t,r,n){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a=="text"?Ns(e,t):a=="gutter"?qa(e,t,r,n):a=="class"?ca(e,t):a=="widget"&&Ps(e,t,n)}t.changes=null}function ni(e){return e.node==e.text&&(e.node=b("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),M&&W<8&&(e.node.style.zIndex=2)),e.node}function Ds(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=ni(t);t.background=n.insertBefore(b("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ya(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):wt(e,t)}function Ns(e,t){var r=t.text.className,n=Ya(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,ca(e,t)):r&&(t.text.className=r)}function ca(e,t){Ds(e,t),t.line.wrapClass?ni(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function qa(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=ni(t);t.gutterBackground=b("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=ni(t),l=t.gutter=b("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),o.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=l.appendChild(b("div",mr(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var u=0;u<e.display.gutterSpecs.length;++u){var d=e.display.gutterSpecs[u].className,y=a.hasOwnProperty(d)&&a[d];y&&l.appendChild(b("div",[y],"CodeMirror-gutter-elt","left: "+n.gutterLeft[d]+"px; width: "+n.gutterWidth[d]+"px"))}}}function Ps(e,t,r){t.alignable&&(t.alignable=null);for(var n=me("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Ja(e,t,r)}function js(e,t,r,n){var i=Ya(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),ca(e,t),qa(e,t,r,n),Ja(e,t,n),t.node}function Ja(e,t,r){if(Za(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Za(e,t.rest[n],t,r,!1)}function Za(e,t,r,n,i){if(!t.widgets)return;for(var a=ni(r),o=0,l=t.widgets;o<l.length;++o){var u=l[o],d=b("div",[u.node],"CodeMirror-linewidget"+(u.className?" "+u.className:""));u.handleMouseEvents||d.setAttribute("cm-ignore-events","true"),Is(u,d,r,n),e.display.input.setUneditable(d),i&&u.above?a.insertBefore(d,r.gutter||r.text):a.appendChild(d),Xt(u,"redraw")}}function Is(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function ri(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!x(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),ae(t.display.measure,b("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Fn(e,t){for(var r=R(t);r!=e.wrapper;r=r.parentNode)if(!r||r.nodeType==1&&r.getAttribute("cm-ignore-events")=="true"||r.parentNode==e.sizer&&r!=e.mover)return!0}function ji(e){return e.lineSpace.offsetTop}function da(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Qa(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=ae(e.measure,b("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return!isNaN(n.left)&&!isNaN(n.right)&&(e.cachedPaddingH=n),n}function Ln(e){return pe-e.display.nativeBarWidth}function ir(e){return e.display.scroller.clientWidth-Ln(e)-e.display.barWidth}function fa(e){return e.display.scroller.clientHeight-Ln(e)-e.display.barHeight}function Us(e,t,r){var n=e.options.lineWrapping,i=n&&ir(e);if(!t.measure.heights||n&&t.measure.width!=i){var a=t.measure.heights=[];if(n){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),l=0;l<o.length-1;l++){var u=o[l],d=o[l+1];Math.abs(u.bottom-d.bottom)>2&&a.push((u.bottom+d.top)/2-r.top)}}a.push(r.bottom-r.top)}}function eo(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(Ct(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Fs(e,t){t=dn(t);var r=Ct(t),n=e.display.externalMeasured=new St(e.doc,t,r);n.lineN=r;var i=n.built=wt(e,n);return n.text=i.pre,ae(e.display.lineMeasure,i.pre),n}function to(e,t,r,n){return _n(e,Sr(e,t),r,n)}function ha(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[sr(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function Sr(e,t){var r=Ct(t),n=ha(e,r);n&&!n.text?n=null:n&&n.changes&&($a(e,n,r,ya(e)),e.curOp.forceUpdate=!0),n||(n=Fs(e,t));var i=eo(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function _n(e,t,r,n,i){t.before&&(r=-1);var a=r+(n||""),o;return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Us(e,t.view,t.rect),t.hasHeights=!0),o=zs(e,t,r,n),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var no={left:0,right:0,top:0,bottom:0};function ro(e,t,r){for(var n,i,a,o,l,u,d=0;d<e.length;d+=3)if(l=e[d],u=e[d+1],t<l?(i=0,a=1,o="left"):t<u?(i=t-l,a=i+1):(d==e.length-3||t==u&&e[d+3]>t)&&(a=u-l,i=a-1,t>=u&&(o="right")),i!=null){if(n=e[d+2],l==u&&r==(n.insertLeft?"left":"right")&&(o=r),r=="left"&&i==0)for(;d&&e[d-2]==e[d-3]&&e[d-1].insertLeft;)n=e[(d-=3)+2],o="left";if(r=="right"&&i==u-l)for(;d<e.length-3&&e[d+3]==e[d+4]&&!e[d+5].insertLeft;)n=e[(d+=3)+2],o="right";break}return{node:n,start:i,end:a,collapse:o,coverStart:l,coverEnd:u}}function Hs(e,t){var r=no;if(t=="left")for(var n=0;n<e.length&&!((r=e[n]).left!=r.right);n++);else for(var i=e.length-1;i>=0&&!((r=e[i]).left!=r.right);i--);return r}function zs(e,t,r,n){var i=ro(t.map,r,n),a=i.node,o=i.start,l=i.end,u=i.collapse,d;if(a.nodeType==3){for(var y=0;y<4;y++){for(;o&&ke(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+l<i.coverEnd&&ke(t.line.text.charAt(i.coverStart+l));)++l;if(M&&W<9&&o==0&&l==i.coverEnd-i.coverStart?d=a.parentNode.getBoundingClientRect():d=Hs(F(a,o,l).getClientRects(),n),d.left||d.right||o==0)break;l=o,o=o-1,u="right"}M&&W<11&&(d=Ws(e.display.measure,d))}else{o>0&&(u=n="right");var E;e.options.lineWrapping&&(E=a.getClientRects()).length>1?d=E[n=="right"?E.length-1:0]:d=a.getBoundingClientRect()}if(M&&W<9&&!o&&(!d||!d.left&&!d.right)){var K=a.parentNode.getClientRects()[0];K?d={left:K.left,right:K.left+Ar(e.display),top:K.top,bottom:K.bottom}:d=no}for(var z=d.top-t.rect.top,de=d.bottom-t.rect.top,Ce=(z+de)/2,Ne=t.view.measure.heights,He=0;He<Ne.length-1&&!(Ce<Ne[He]);He++);var Be=He?Ne[He-1]:0,ze=Ne[He],qe={left:(u=="right"?d.right:d.left)-t.rect.left,right:(u=="left"?d.left:d.right)-t.rect.left,top:Be,bottom:ze};return!d.left&&!d.right&&(qe.bogus=!0),e.options.singleCursorHeightPerLine||(qe.rtop=z,qe.rbottom=de),qe}function Ws(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Et(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function io(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function ao(e){e.display.externalMeasure=null,Pe(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)io(e.display.view[t])}function ii(e){ao(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function oo(){return D&&I?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function so(){return D&&I?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function pa(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=ri(e.widgets[r]));return t}function Ii(e,t,r,n,i){if(!i){var a=pa(t);r.top+=a,r.bottom+=a}if(n=="line")return r;n||(n="local");var o=Cn(t);if(n=="local"?o+=ji(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var l=e.display.lineSpace.getBoundingClientRect();o+=l.top+(n=="window"?0:so());var u=l.left+(n=="window"?0:oo());r.left+=u,r.right+=u}return r.top+=o,r.bottom+=o,r}function lo(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=oo(),i-=so();else if(r=="local"||!r){var a=e.display.sizer.getBoundingClientRect();n+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:n-o.left,top:i-o.top}}function ma(e,t,r,n,i){return n||(n=Ze(e.doc,t.line)),Ii(e,n,to(e,n,t.ch,i),r)}function kn(e,t,r,n,i,a){n=n||Ze(e.doc,t.line),i||(i=Sr(e,n));function o(de,Ce){var Ne=_n(e,i,de,Ce?"right":"left",a);return Ce?Ne.left=Ne.right:Ne.right=Ne.left,Ii(e,n,Ne,r)}var l=tt(n,e.doc.direction),u=t.ch,d=t.sticky;if(u>=n.text.length?(u=n.text.length,d="before"):u<=0&&(u=0,d="after"),!l)return o(d=="before"?u-1:u,d=="before");function y(de,Ce,Ne){var He=l[Ce],Be=He.level==1;return o(Ne?de-1:de,Be!=Ne)}var E=Ve(l,u,d),K=Ke,z=y(u,E,d=="before");return K!=null&&(z.other=y(u,K,d!="before")),z}function uo(e,t){var r=0;t=ft(e.doc,t),e.options.lineWrapping||(r=Ar(e.display)*t.ch);var n=Ze(e.doc,t.line),i=Cn(n)+ji(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function ga(e,t,r,n,i){var a=_e(e,t,r);return a.xRel=i,n&&(a.outside=n),a}function va(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return ga(n.first,0,null,-1,-1);var i=bn(n,r),a=n.first+n.size-1;if(i>a)return ga(n.first+n.size-1,Ze(n,a).text.length,null,1,1);t<0&&(t=0);for(var o=Ze(n,i);;){var l=Bs(e,o,i,t,r),u=Cr(o,l.ch+(l.xRel>0||l.outside>0?1:0));if(!u)return l;var d=u.find(1);if(d.line==i)return d;o=Ze(n,i=d.line)}}function co(e,t,r,n){n-=pa(t);var i=t.text.length,a=et(function(o){return _n(e,r,o-1).bottom<=n},i,0);return i=et(function(o){return _n(e,r,o).top>n},a,i),{begin:a,end:i}}function fo(e,t,r,n){r||(r=Sr(e,t));var i=Ii(e,t,_n(e,r,n),"line").top;return co(e,t,r,i)}function ba(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Bs(e,t,r,n,i){i-=Cn(t);var a=Sr(e,t),o=pa(t),l=0,u=t.text.length,d=!0,y=tt(t,e.doc.direction);if(y){var E=(e.options.lineWrapping?Gs:Xs)(e,t,r,a,y,n,i);d=E.level!=1,l=d?E.from:E.to-1,u=d?E.to:E.from-1}var K=null,z=null,de=et(function(lt){var at=_n(e,a,lt);return at.top+=o,at.bottom+=o,ba(at,n,i,!1)?(at.top<=i&&at.left<=n&&(K=lt,z=at),!0):!1},l,u),Ce,Ne,He=!1;if(z){var Be=n-z.left<z.right-n,ze=Be==d;de=K+(ze?0:1),Ne=ze?"after":"before",Ce=Be?z.left:z.right}else{!d&&(de==u||de==l)&&de++,Ne=de==0?"after":de==t.text.length?"before":_n(e,a,de-(d?1:0)).bottom+o<=i==d?"after":"before";var qe=kn(e,_e(r,de,Ne),"line",t,a);Ce=qe.left,He=i<qe.top?-1:i>=qe.bottom?1:0}return de=Se(t.text,de,1),ga(r,de,Ne,He,n-Ce)}function Xs(e,t,r,n,i,a,o){var l=et(function(E){var K=i[E],z=K.level!=1;return ba(kn(e,_e(r,z?K.to:K.from,z?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),u=i[l];if(l>0){var d=u.level!=1,y=kn(e,_e(r,d?u.from:u.to,d?"after":"before"),"line",t,n);ba(y,a,o,!0)&&y.top>o&&(u=i[l-1])}return u}function Gs(e,t,r,n,i,a,o){var l=co(e,t,n,o),u=l.begin,d=l.end;/\s/.test(t.text.charAt(d-1))&&d--;for(var y=null,E=null,K=0;K<i.length;K++){var z=i[K];if(z.from>=d||z.to<=u)continue;var de=z.level!=1,Ce=_n(e,n,de?Math.min(d,z.to)-1:Math.max(u,z.from)).right,Ne=Ce<a?a-Ce+1e9:Ce-a;(!y||E>Ne)&&(y=z,E=Ne)}return y||(y=i[i.length-1]),y.from<u&&(y={from:u,to:y.to,level:y.level}),y.to>d&&(y={from:y.from,to:d,level:y.level}),y}var ar;function Tr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ar==null){ar=b("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ar.appendChild(document.createTextNode("x")),ar.appendChild(b("br"));ar.appendChild(document.createTextNode("x"))}ae(e.measure,ar);var r=ar.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),Pe(e.measure),r||1}function Ar(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=b("span","xxxxxxxxxx"),r=b("pre",[t],"CodeMirror-line-like");ae(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ya(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var l=e.display.gutterSpecs[o].className;r[l]=a.offsetLeft+a.clientLeft+i,n[l]=a.clientWidth}return{fixedPos:xa(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function xa(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ho(e){var t=Tr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/Ar(e.display)-3);return function(i){if(On(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return r?a+(Math.ceil(i.text.length/n)||1)*t:a+t}}function wa(e){var t=e.doc,r=ho(e);t.iter(function(n){var i=r(n);i!=n.height&&Zt(n,i)})}function or(e,t,r,n){var i=e.display;if(!r&&R(t).getAttribute("cm-not-content")=="true")return null;var a,o,l=i.lineSpace.getBoundingClientRect();try{a=t.clientX-l.left,o=t.clientY-l.top}catch(E){return null}var u=va(e,a,o),d;if(n&&u.xRel>0&&(d=Ze(e.doc,u.line).text).length==u.ch){var y=m(d,d.length,e.options.tabSize)-d.length;u=_e(u.line,Math.max(0,Math.round((a-Qa(e.display).left)/Ar(e.display))-y))}return u}function sr(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,t<0)return n}function tn(e,t,r,n){t==null&&(t=e.doc.first),r==null&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Yt&&Zr(e.doc,t)<i.viewTo&&Gn(e);else if(r<=i.viewFrom)Yt&&Bn(e.doc,r+n)>i.viewFrom?Gn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Gn(e);else if(t<=i.viewFrom){var a=Ui(e,r,r+n,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=n):Gn(e)}else if(r>=i.viewTo){var o=Ui(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Gn(e)}else{var l=Ui(e,t,t,-1),u=Ui(e,r,r+n,1);l&&u?(i.view=i.view.slice(0,l.index).concat(en(e,l.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=n):Gn(e)}var d=i.externalMeasured;d&&(r<d.lineN?d.lineN+=n:t<d.lineN+d.size&&(i.externalMeasured=null))}function Xn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),t<n.viewFrom||t>=n.viewTo)return;var a=n.view[sr(e,t)];if(a.node==null)return;var o=a.changes||(a.changes=[]);H(o,r)==-1&&o.push(r)}function Gn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ui(e,t,r,n){var i=sr(e,t),a,o=e.display.view;if(!Yt||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var l=e.display.viewFrom,u=0;u<i;u++)l+=o[u].size;if(l!=t){if(n>0){if(i==o.length-1)return null;a=l+o[i].size-t,i++}else a=l-t;t+=a,r+=a}for(;Zr(e.doc,r)!=r;){if(i==(n<0?0:o.length-1))return null;r+=n*o[i-(n<0?1:0)].size,i+=n}return{index:i,lineN:r}}function Ks(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=en(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=en(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(sr(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(en(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,sr(e,r)))),n.viewTo=r}function po(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];!i.hidden&&(!i.node||i.changes)&&++r}return r}function ai(e){e.display.input.showSelection(e.display.input.prepareSelection())}function mo(e,t){t===void 0&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),a=n.selection=document.createDocumentFragment(),o=0;o<r.sel.ranges.length;o++){if(!t&&o==r.sel.primIndex)continue;var l=r.sel.ranges[o];if(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)continue;var u=l.empty();(u||e.options.showCursorWhenSelecting)&&go(e,l.head,i),u||Vs(e,l,a)}return n}function go(e,t,r){var n=kn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(b("div","\xA0","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var a=r.appendChild(b("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=n.other.left+"px",a.style.top=n.other.top+"px",a.style.height=(n.other.bottom-n.other.top)*.85+"px"}}function Fi(e,t){return e.top-t.top||e.left-t.left}function Vs(e,t,r){var n=e.display,i=e.doc,a=document.createDocumentFragment(),o=Qa(e.display),l=o.left,u=Math.max(n.sizerWidth,ir(e)-n.sizer.offsetLeft)-o.right,d=i.direction=="ltr";function y(ze,qe,lt,at){qe<0&&(qe=0),qe=Math.round(qe),at=Math.round(at),a.appendChild(b("div",null,"CodeMirror-selected","position: absolute; left: "+ze+`px;
|
|
top: `+qe+"px; width: "+(lt==null?u-ze:lt)+`px;
|
|
height: `+(at-qe)+"px"))}function E(ze,qe,lt){var at=Ze(i,ze),pt=at.text.length,_t,Wt;function Mt(jt,an){return ma(e,_e(ze,jt),"div",at,an)}function un(jt,an,Gt){var Ft=fo(e,at,null,jt),It=an=="ltr"==(Gt=="after")?"left":"right",Nt=Gt=="after"?Ft.begin:Ft.end-(/\s/.test(at.text.charAt(Ft.end-1))?2:1);return Mt(Nt,It)[It]}var rn=tt(at,i.direction);return Ge(rn,qe||0,lt==null?pt:lt,function(jt,an,Gt,Ft){var It=Gt=="ltr",Nt=Mt(jt,It?"left":"right"),on=Mt(an-1,It?"right":"left"),Hr=qe==null&&jt==0,Jn=lt==null&&an==pt,$t=Ft==0,Rn=!rn||Ft==rn.length-1;if(on.top-Nt.top<=3){var Bt=(d?Hr:Jn)&&$t,Ka=(d?Jn:Hr)&&Rn,zn=Bt?l:(It?Nt:on).left,fr=Ka?u:(It?on:Nt).right;y(zn,Nt.top,fr-zn,Nt.bottom)}else{var hr,Jt,zr,Va;It?(hr=d&&Hr&&$t?l:Nt.left,Jt=d?u:un(jt,Gt,"before"),zr=d?l:un(an,Gt,"after"),Va=d&&Jn&&Rn?u:on.right):(hr=d?un(jt,Gt,"before"):l,Jt=!d&&Hr&&$t?u:Nt.right,zr=!d&&Jn&&Rn?l:on.left,Va=d?un(an,Gt,"after"):u),y(hr,Nt.top,Jt-hr,Nt.bottom),Nt.bottom<on.top&&y(l,Nt.bottom,null,on.top),y(zr,on.top,Va-zr,on.bottom)}(!_t||Fi(Nt,_t)<0)&&(_t=Nt),Fi(on,_t)<0&&(_t=on),(!Wt||Fi(Nt,Wt)<0)&&(Wt=Nt),Fi(on,Wt)<0&&(Wt=on)}),{start:_t,end:Wt}}var K=t.from(),z=t.to();if(K.line==z.line)E(K.line,K.ch,z.ch);else{var de=Ze(i,K.line),Ce=Ze(i,z.line),Ne=dn(de)==dn(Ce),He=E(K.line,K.ch,Ne?de.text.length+1:null).end,Be=E(z.line,Ne?0:null,z.ch).start;Ne&&(He.top<Be.top-2?(y(He.right,He.top,null,He.bottom),y(l,Be.top,Be.left,Be.bottom)):y(He.right,He.top,Be.left-He.right,He.bottom)),He.bottom<Be.top&&y(l,He.bottom,null,Be.top)}r.appendChild(a)}function Ea(e){if(!e.state.focused)return;var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Or(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function vo(e){e.state.focused||(e.display.input.focus(),Ca(e))}function bo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Or(e))},100)}function Ca(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(he(e,"focus",e,t),e.state.focused=!0,j(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),Z&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ea(e)}function Or(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(he(e,"blur",e,t),e.state.focused=!1,ge(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Hi(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],a=e.options.lineWrapping,o=void 0,l=0;if(i.hidden)continue;if(M&&W<8){var u=i.node.offsetTop+i.node.offsetHeight;o=u-r,r=u}else{var d=i.node.getBoundingClientRect();o=d.bottom-d.top,!a&&i.text.firstChild&&(l=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var y=i.line.height-o;if((y>.005||y<-.005)&&(Zt(i.line,o),yo(i.line),i.rest))for(var E=0;E<i.rest.length;E++)yo(i.rest[E]);if(l>e.display.sizerWidth){var K=Math.ceil(l/Ar(e.display));K>e.display.maxLineLength&&(e.display.maxLineLength=K,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}function yo(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function zi(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-ji(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,a=bn(t,n),o=bn(t,i);if(r&&r.ensure){var l=r.ensure.from.line,u=r.ensure.to.line;l<a?(a=l,o=bn(t,Cn(Ze(t,l))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=o&&(a=bn(t,Cn(Ze(t,u))-e.wrapper.clientHeight),o=u)}return{from:a,to:Math.max(o,a+1)}}function $s(e,t){if(Oe(e,"scrollCursorIntoView"))return;var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),i!=null&&!U){var a=b("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-r.viewOffset-ji(e.display))+`px;
|
|
height: `+(t.bottom-t.top+Ln(e)+r.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(i),e.display.lineSpace.removeChild(a)}}function Ys(e,t,r,n){n==null&&(n=0);var i;!e.options.lineWrapping&&t==r&&(t=t.ch?_e(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?_e(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,l=kn(e,t),u=!r||r==t?l:kn(e,r);i={left:Math.min(l.left,u.left),top:Math.min(l.top,u.top)-n,right:Math.max(l.left,u.left),bottom:Math.max(l.bottom,u.bottom)+n};var d=ka(e,i),y=e.doc.scrollTop,E=e.doc.scrollLeft;if(d.scrollTop!=null&&(si(e,d.scrollTop),Math.abs(e.doc.scrollTop-y)>1&&(o=!0)),d.scrollLeft!=null&&(lr(e,d.scrollLeft),Math.abs(e.doc.scrollLeft-E)>1&&(o=!0)),!o)break}return i}function qs(e,t){var r=ka(e,t);r.scrollTop!=null&&si(e,r.scrollTop),r.scrollLeft!=null&&lr(e,r.scrollLeft)}function ka(e,t){var r=e.display,n=Tr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,a=fa(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var l=e.doc.height+da(r),u=t.top<n,d=t.bottom>l-n;if(t.top<i)o.scrollTop=u?0:t.top;else if(t.bottom>i+a){var y=Math.min(t.top,(d?l:t.bottom)-a);y!=i&&(o.scrollTop=y)}var E=e.options.fixedGutter?0:r.gutters.offsetWidth,K=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-E,z=ir(e)-r.gutters.offsetWidth,de=t.right-t.left>z;return de&&(t.right=t.left+z),t.left<10?o.scrollLeft=0:t.left<K?o.scrollLeft=Math.max(0,t.left+E-(de?0:10)):t.right>z+K-3&&(o.scrollLeft=t.right+(de?0:10)-z),o}function Sa(e,t){if(t==null)return;Wi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Lr(e){Wi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function oi(e,t,r){(t!=null||r!=null)&&Wi(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Js(e,t){Wi(e),e.curOp.scrollToPos=t}function Wi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=uo(e,t.from),n=uo(e,t.to);xo(e,r,n,t.margin)}}function xo(e,t,r,n){var i=ka(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});oi(e,i.scrollLeft,i.scrollTop)}function si(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;se||Aa(e,{top:t}),wo(e,t,!0),se&&Aa(e),ci(e,100)}function wo(e,t,r){if(t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),e.display.scroller.scrollTop==t&&!r)return;e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t)}function lr(e,t,r,n){if(t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n)return;e.doc.scrollLeft=t,To(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function li(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+da(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Ln(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var ur=function(e,t,r){this.cm=r;var n=this.vert=b("div",[b("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=b("div",[b("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),fe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),fe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,M&&W<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ur.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(n==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},ur.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ur.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ur.prototype.zeroWidthHack=function(){var e=ce&&!Q?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new A,this.disableVert=new A},ur.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto";function n(){var i=e.getBoundingClientRect(),a=r=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.pointerEvents="none":t.set(1e3,n)}t.set(1e3,n)},ur.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ui=function(){};ui.prototype.update=function(){return{bottom:0,right:0}},ui.prototype.setScrollLeft=function(){},ui.prototype.setScrollTop=function(){},ui.prototype.clear=function(){};function _r(e,t){t||(t=li(e));var r=e.display.barWidth,n=e.display.barHeight;Eo(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Hi(e),Eo(e,li(e)),r=e.display.barWidth,n=e.display.barHeight}function Eo(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}var Co={native:ur,null:ui};function ko(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&ge(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Co[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){r=="horizontal"?lr(e,t):si(e,t)},e),e.display.scrollbars.addClass&&j(e.display.wrapper,e.display.scrollbars.addClass)}var Zs=0;function cr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Zs},gn(e.curOp)}function dr(e){var t=e.curOp;t&&Rs(t,function(r){for(var n=0;n<r.ops.length;n++)r.ops[n].cm.curOp=null;Qs(r)})}function Qs(e){for(var t=e.ops,r=0;r<t.length;r++)el(t[r]);for(var n=0;n<t.length;n++)tl(t[n]);for(var i=0;i<t.length;i++)nl(t[i]);for(var a=0;a<t.length;a++)rl(t[a]);for(var o=0;o<t.length;o++)il(t[o])}function el(e){var t=e.cm,r=t.display;ol(t),e.updateMaxLine&&Pi(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Bi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&Ta(e.cm,e.update)}function nl(e){var t=e.cm,r=t.display;e.updatedDisplay&&Hi(t),e.barMeasure=li(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=to(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Ln(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-ir(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function rl(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&lr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==ee();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&_r(t,e.barMeasure),e.updatedDisplay&&La(t,e.barMeasure),e.selectionChanged&&Ea(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&vo(e.cm)}function il(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&So(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&wo(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&lr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ys(t,ft(n,e.scrollToPos.from),ft(n,e.scrollToPos.to),e.scrollToPos.margin);$s(t,i)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var l=0;l<a.length;++l)a[l].lines.length||he(a[l],"hide");if(o)for(var u=0;u<o.length;++u)o[u].lines.length&&he(o[u],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&he(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function ln(e,t){if(e.curOp)return t();cr(e);try{return t()}finally{dr(e)}}function Ht(e,t){return function(){if(e.curOp)return t.apply(e,arguments);cr(e);try{return t.apply(e,arguments)}finally{dr(e)}}}function qt(e){return function(){if(this.curOp)return e.apply(this,arguments);cr(this);try{return e.apply(this,arguments)}finally{dr(this)}}}function zt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);cr(t);try{return e.apply(this,arguments)}finally{dr(t)}}}function ci(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,c(al,e))}function al(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=yn(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(n.line>=e.display.viewFrom){var o=a.styles,l=a.text.length>e.options.maxHighlightLength?An(t.mode,n.state):null,u=Gr(e,a,n,!0);l&&(n.state=l),a.styles=u.styles;var d=a.styleClasses,y=u.classes;y?a.styleClasses=y:d&&(a.styleClasses=null);for(var E=!o||o.length!=a.styles.length||d!=y&&(!d||!y||d.bgClass!=y.bgClass||d.textClass!=y.textClass),K=0;!E&&K<o.length;++K)E=o[K]!=a.styles[K];E&&i.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&Kr(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ci(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&ln(e,function(){for(var a=0;a<i.length;a++)Xn(e,i[a],"text")})}var Bi=function(e,t,r){var n=e.display;this.viewport=t,this.visible=zi(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=ir(e),this.force=r,this.dims=ya(e),this.events=[]};Bi.prototype.signal=function(e,t){T(e,t)&&this.events.push(arguments)},Bi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)he.apply(null,this.events[e])};function ol(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ln(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ln(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=ee();if(!t||!x(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&x(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}function ll(e){if(!e||!e.activeElt||e.activeElt==ee())return;if(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&x(document.body,e.anchorNode)&&x(document.body,e.focusNode)){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}function Ta(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Gn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&po(e)==0)return!1;Ao(e)&&(Gn(e),t.dims=ya(e));var i=n.first+n.size,a=Math.max(t.visible.from-e.options.viewportMargin,n.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<a&&a-r.viewFrom<20&&(a=Math.max(n.first,r.viewFrom)),r.viewTo>o&&r.viewTo-o<20&&(o=Math.min(i,r.viewTo)),Yt&&(a=Zr(e.doc,a),o=Bn(e.doc,o));var l=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Ks(e,a,o),r.viewOffset=Cn(Ze(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=po(e);if(!l&&u==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var d=sl(e);return u>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(d),Pe(r.cursorDiv),Pe(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ci(e,400)),r.updateLineNumbers=null,!0}function So(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==ir(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+da(e.display)-fa(e),r.top)}),t.visible=zi(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=zi(e.display,e.doc,r));if(!Ta(e,t))break;Hi(e);var i=li(e);ai(e),_r(e,i),La(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Aa(e,t){var r=new Bi(e,t);if(Ta(e,r)){Hi(e),So(e,r);var n=li(e);ai(e),_r(e,n),La(e,n),r.finish()}}function ul(e,t,r){var n=e.display,i=e.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function l(de){var Ce=de.nextSibling;return Z&&ce&&e.display.currentWheelTarget==de?de.style.display="none":de.parentNode.removeChild(de),Ce}for(var u=n.view,d=n.viewFrom,y=0;y<u.length;y++){var E=u[y];if(!E.hidden)if(!E.node||E.node.parentNode!=a){var K=js(e,E,d,r);a.insertBefore(K,o)}else{for(;o!=E.node;)o=l(o);var z=i&&t!=null&&t<=d&&E.lineNumber;E.changes&&(H(E.changes,"gutter")>-1&&(z=!1),$a(e,E,d,r)),z&&(Pe(E.lineNumber),E.lineNumber.appendChild(document.createTextNode(mr(e.options,d)))),o=E.node.nextSibling}d+=E.size}for(;o;)o=l(o)}function Oa(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function La(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ln(e)+"px"}function To(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=xa(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=n+"px",o=0;o<r.length;o++)if(!r[o].hidden){e.options.fixedGutter&&(r[o].gutter&&(r[o].gutter.style.left=a),r[o].gutterBackground&&(r[o].gutterBackground.style.left=a));var l=r[o].alignable;if(l)for(var u=0;u<l.length;u++)l[u].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}function Ao(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=mr(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(b("div",[b("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(a,n.lineGutter.offsetWidth-o)+1,n.lineNumWidth=n.lineNumInnerWidth+o,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",Oa(e.display),!0}return!1}function _a(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var a=e[i],o=null;if(typeof a!="string"&&(o=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)n=!0;else continue;r.push({className:a,style:o})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function Oo(e){var t=e.gutters,r=e.gutterSpecs;Pe(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],a=i.className,o=i.style,l=t.appendChild(b("div",null,"CodeMirror-gutter "+a));o&&(l.style.cssText=o),a=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",Oa(e)}function di(e){Oo(e.display),tn(e),To(e)}function cl(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=b("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=b("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=ne("div",null,"CodeMirror-code"),i.selectionDiv=b("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=b("div",null,"CodeMirror-cursors"),i.measure=b("div",null,"CodeMirror-measure"),i.lineMeasure=b("div",null,"CodeMirror-measure"),i.lineSpace=ne("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=ne("div",[i.lineSpace],"CodeMirror-lines");i.mover=b("div",[a],null,"position: relative"),i.sizer=b("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=b("div",null,null,"position: absolute; height: "+pe+"px; width: 1px;"),i.gutters=b("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=b("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=b("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),M&&W<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!Z&&!(se&&oe)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=_a(n.gutters,n.lineNumbers),Oo(i),r.init(i)}var Xi=0,fn=null;M?fn=-.53:se?fn=15:D?fn=-.7:be&&(fn=-1/3);function Lo(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),r==null&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:r==null&&(r=e.wheelDelta),{x:t,y:r}}function dl(e){var t=Lo(e);return t.x*=fn,t.y*=fn,t}function _o(e,t){var r=Lo(t),n=r.x,i=r.y,a=e.display,o=a.scroller,l=o.scrollWidth>o.clientWidth,u=o.scrollHeight>o.clientHeight;if(!(n&&l||i&&u))return;if(i&&ce&&Z){e:for(var d=t.target,y=a.view;d!=o;d=d.parentNode)for(var E=0;E<y.length;E++)if(y[E].node==d){e.display.currentWheelTarget=d;break e}}if(n&&!se&&!S&&fn!=null){i&&u&&si(e,Math.max(0,o.scrollTop+i*fn)),lr(e,Math.max(0,o.scrollLeft+n*fn)),(!i||i&&u)&&f(t),a.wheelStartX=null;return}if(i&&fn!=null){var K=i*fn,z=e.doc.scrollTop,de=z+a.wrapper.clientHeight;K<0?z=Math.max(0,z+K-50):de=Math.min(e.doc.height,de+K+50),Aa(e,{top:z,bottom:de})}Xi<20&&(a.wheelStartX==null?(a.wheelStartX=o.scrollLeft,a.wheelStartY=o.scrollTop,a.wheelDX=n,a.wheelDY=i,setTimeout(function(){if(a.wheelStartX==null)return;var Ce=o.scrollLeft-a.wheelStartX,Ne=o.scrollTop-a.wheelStartY,He=Ne&&a.wheelDY&&Ne/a.wheelDY||Ce&&a.wheelDX&&Ce/a.wheelDX;if(a.wheelStartX=a.wheelStartY=null,!He)return;fn=(fn*Xi+He)/(Xi+1),++Xi},200)):(a.wheelDX+=n,a.wheelDY+=i))}var hn=function(e,t){this.ranges=e,this.primIndex=t};hn.prototype.primary=function(){return this.ranges[this.primIndex]},hn.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!Xr(r.anchor,n.anchor)||!Xr(r.head,n.head))return!1}return!0},hn.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Tt(gr(this.ranges[t].anchor),gr(this.ranges[t].head));return new hn(e,this.primIndex)},hn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},hn.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(ut(t,n.from())>=0&&ut(e,n.to())<=0)return r}return-1};var Tt=function(e,t){this.anchor=e,this.head=t};Tt.prototype.from=function(){return Zn(this.anchor,this.head)},Tt.prototype.to=function(){return vr(this.anchor,this.head)},Tt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Sn(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(K,z){return ut(K.from(),z.from())}),r=H(t,i);for(var a=1;a<t.length;a++){var o=t[a],l=t[a-1],u=ut(l.to(),o.from());if(n&&!o.empty()?u>0:u>=0){var d=Zn(l.from(),o.from()),y=vr(l.to(),o.to()),E=l.empty()?o.from()==o.head:l.from()==l.head;a<=r&&--r,t.splice(--a,2,new Tt(E?y:d,E?d:y))}}return new hn(t,r)}function Kn(e,t){return new hn([new Tt(e,t||e)],0)}function Vn(e){return e.text?_e(e.from.line+e.text.length-1,h(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function Ro(e,t){if(ut(e,t.from)<0)return e;if(ut(e,t.to)<=0)return Vn(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Vn(t).ch-t.to.ch),_e(r,n)}function Ra(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new Tt(Ro(i.anchor,t),Ro(i.head,t)))}return Sn(e.cm,r,e.sel.primIndex)}function Mo(e,t,r){return e.line==t.line?_e(r.line,e.ch-t.ch+r.ch):_e(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],i=_e(e.first,0),a=i,o=0;o<t.length;o++){var l=t[o],u=Mo(l.from,i,a),d=Mo(Vn(l),i,a);if(i=l.to,a=d,r=="around"){var y=e.sel.ranges[o],E=ut(y.head,y.anchor)<0;n[o]=new Tt(E?d:u,E?u:d)}else n[o]=new Tt(u,u)}return new hn(n,e.sel.primIndex)}function Ma(e){e.doc.mode=vn(e.options,e.doc.modeOption),fi(e)}function fi(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ci(e,100),e.state.modeGen++,e.curOp&&tn(e)}function Do(e,t){return t.from.ch==0&&t.to.ch==0&&h(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Da(e,t,r,n){function i(Be){return r?r[Be]:null}function a(Be,ze,qe){ua(Be,ze,qe,n),Xt(Be,"change",Be,t)}function o(Be,ze){for(var qe=[],lt=Be;lt<ze;++lt)qe.push(new rr(d[lt],i(lt),n));return qe}var l=t.from,u=t.to,d=t.text,y=Ze(e,l.line),E=Ze(e,u.line),K=h(d),z=i(d.length-1),de=u.line-l.line;if(t.full)e.insert(0,o(0,d.length)),e.remove(d.length,e.size-d.length);else if(Do(e,t)){var Ce=o(0,d.length-1);a(E,E.text,z),de&&e.remove(l.line,de),Ce.length&&e.insert(l.line,Ce)}else if(y==E)if(d.length==1)a(y,y.text.slice(0,l.ch)+K+y.text.slice(u.ch),z);else{var Ne=o(1,d.length-1);Ne.push(new rr(K+y.text.slice(u.ch),z,n)),a(y,y.text.slice(0,l.ch)+d[0],i(0)),e.insert(l.line+1,Ne)}else if(d.length==1)a(y,y.text.slice(0,l.ch)+d[0]+E.text.slice(u.ch),i(0)),e.remove(l.line+1,de);else{a(y,y.text.slice(0,l.ch)+d[0],i(0)),a(E,K+E.text.slice(u.ch),z);var He=o(1,d.length-1);de>1&&e.remove(l.line+1,de-1),e.insert(l.line+1,He)}Xt(e,"change",e,t)}function $n(e,t,r){function n(i,a,o){if(i.linked)for(var l=0;l<i.linked.length;++l){var u=i.linked[l];if(u.doc==a)continue;var d=o&&u.sharedHist;if(r&&!d)continue;t(u.doc,d),n(u.doc,i,d)}}n(e,null,!0)}function No(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,wa(e),Ma(e),Po(e),e.options.lineWrapping||Pi(e),e.options.mode=t.modeOption,tn(e)}function Po(e){(e.doc.direction=="rtl"?j:ge)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){ln(e,function(){Po(e),tn(e)})}function Gi(e){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Na(e,t){var r={from:gr(t.from),to:Vn(t),text:Dn(e,t.from,t.to)};return Uo(e,r,t.from.line,t.to.line+1),$n(e,function(n){return Uo(n,r,t.from.line,t.to.line+1)},!0),r}function jo(e){for(;e.length;){var t=h(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return jo(e.done),h(e.done);if(e.done.length&&!h(e.done).ranges)return h(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),h(e.done)}function Io(e,t,r,n){var i=e.history;i.undone.length=0;var a=+new Date,o,l;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=pl(i,i.lastOp==n)))l=h(o.changes),ut(t.from,t.to)==0&&ut(t.from,l.to)==0?l.to=Vn(t):o.changes.push(Na(e,t));else{var u=h(i.done);for((!u||!u.ranges)&&Ki(e.sel,i.done),o={changes:[Na(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||he(e,"historyAdded")}function ml(e,t,r,n){var i=t.charAt(0);return i=="*"||i=="+"&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function gl(e,t,r,n){var i=e.history,a=n&&n.origin;r==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||ml(e,a,h(i.done),t))?i.done[i.done.length-1]=t:Ki(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=r,n&&n.clearRedo!==!1&&jo(i.undone)}function Ki(e,t){var r=h(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Uo(e,t,r,n){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(o){o.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=o.markedSpans),++a})}function vl(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function bl(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(vl(r[i]));return n}function Fo(e,t){var r=bl(e,t),n=xr(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var a=r[i],o=n[i];if(a&&o){e:for(var l=0;l<o.length;++l){for(var u=o[l],d=0;d<a.length;++d)if(a[d].marker==u.marker)continue e;a.push(u)}}else o&&(r[i]=o)}return r}function Rr(e,t,r){for(var n=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){n.push(r?hn.prototype.deepCopy.call(a):a);continue}var o=a.changes,l=[];n.push({changes:l});for(var u=0;u<o.length;++u){var d=o[u],y=void 0;if(l.push({from:d.from,to:d.to,text:d.text}),t)for(var E in d)(y=E.match(/^spans_(\d+)$/))&&(H(t,Number(y[1]))>-1&&(h(l)[E]=d[E],delete d[E]))}}return n}function Pa(e,t,r,n){if(n){var i=e.anchor;if(r){var a=ut(t,i)<0;a!=ut(r,i)<0?(i=t,t=r):a!=ut(t,r)<0&&(t=r)}return new Tt(i,t)}else return new Tt(r||t,t)}function Vi(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),Vt(e,new hn([Pa(e.sel.primary(),t,r,i)],0),n)}function Ho(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)n[a]=Pa(e.sel.ranges[a],t[a],null,i);var o=Sn(e.cm,n,e.sel.primIndex);Vt(e,o,r)}function ja(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Vt(e,Sn(e.cm,i,e.sel.primIndex),n)}function zo(e,t,r,n){Vt(e,Kn(t,r),n)}function yl(e,t,r){var n={ranges:t.ranges,update:function(i){this.ranges=[];for(var a=0;a<i.length;a++)this.ranges[a]=new Tt(ft(e,i[a].anchor),ft(e,i[a].head))},origin:r&&r.origin};return he(e,"beforeSelectionChange",e,n),e.cm&&he(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?Sn(e.cm,n.ranges,n.ranges.length-1):t}function Wo(e,t,r){var n=e.history.done,i=h(n);i&&i.ranges?(n[n.length-1]=t,$i(e,t,r)):Vt(e,t,r)}function Vt(e,t,r){$i(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function $i(e,t,r){(T(e,"beforeSelectionChange")||e.cm&&T(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(ut(t.primary().head,e.sel.primary().head)<0?-1:1);Bo(e,Go(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Lr(e.cm)}function Bo(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,P(e.cm)),Xt(e,"cursorActivity",e)}function Xo(e){Bo(e,Go(e,e.sel,null,!1))}function Go(e,t,r,n){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],u=Yi(e,o.anchor,l&&l.anchor,r,n),d=Yi(e,o.head,l&&l.head,r,n);(i||u!=o.anchor||d!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new Tt(u,d))}return i?Sn(e.cm,i,t.primIndex):t}function Mr(e,t,r,n,i){var a=Ze(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var l=a.markedSpans[o],u=l.marker,d="selectLeft"in u?!u.selectLeft:u.inclusiveLeft,y="selectRight"in u?!u.selectRight:u.inclusiveRight;if((l.from==null||(d?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(y?l.to>=t.ch:l.to>t.ch))){if(i&&(he(u,"beforeCursorEnter"),u.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!u.atomic)continue;if(r){var E=u.find(n<0?1:-1),K=void 0;if((n<0?y:d)&&(E=Ko(e,E,-n,E&&E.line==t.line?a:null)),E&&E.line==t.line&&(K=ut(E,r))&&(n<0?K<0:K>0))return Mr(e,E,t,n,i)}var z=u.find(n<0?-1:1);return(n<0?d:y)&&(z=Ko(e,z,n,z.line==t.line?a:null)),z?Mr(e,z,t,n,i):null}}return t}function Yi(e,t,r,n,i){var a=n||1,o=Mr(e,t,r,a,i)||!i&&Mr(e,t,r,a,!0)||Mr(e,t,r,-a,i)||!i&&Mr(e,t,r,-a,!0);return o||(e.cantEdit=!0,_e(e.first,0))}function Ko(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?ft(e,_e(t.line-1)):null:r>0&&t.ch==(n||Ze(e,t.line)).text.length?t.line<e.first+e.size-1?_e(t.line+1,0):null:new _e(t.line,t.ch+r)}function Vo(e){e.setSelection(_e(e.firstLine(),0),_e(e.lastLine()),le)}function $o(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(i,a,o,l){i&&(n.from=ft(e,i)),a&&(n.to=ft(e,a)),o&&(n.text=o),l!==void 0&&(n.origin=l)}),he(e,"beforeChange",e,n),e.cm&&he(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Dr(e,t,r){if(e.cm){if(!e.cm.curOp)return Ht(e.cm,Dr)(e,t,r);if(e.cm.state.suppressEdits)return}if((T(e,"beforeChange")||e.cm&&T(e.cm,"beforeChange"))&&(t=$o(e,t,!0),!t))return;var n=qr&&!r&&Mi(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Yo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Yo(e,t)}function Yo(e,t){if(t.text.length==1&&t.text[0]==""&&ut(t.from,t.to)==0)return;var r=Ra(e,t);Io(e,t,r,e.cm?e.cm.curOp.id:NaN),hi(e,t,r,xr(e,t));var n=[];$n(e,function(i,a){!a&&H(n,i.history)==-1&&(Qo(i.history,t),n.push(i.history)),hi(i,t,null,xr(i,t))})}function qi(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var i=e.history,a,o=e.sel,l=t=="undo"?i.done:i.undone,u=t=="undo"?i.undone:i.done,d=0;d<l.length&&!(a=l[d],r?a.ranges&&!a.equals(e.sel):!a.ranges);d++);if(d==l.length)return;for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=l.pop(),a.ranges){if(Ki(a,u),r&&!a.equals(e.sel)){Vt(e,a,{clearRedo:!1});return}o=a}else if(n){l.push(a);return}else break;var y=[];Ki(o,u),u.push({changes:y,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var E=T(e,"beforeChange")||e.cm&&T(e.cm,"beforeChange"),K=function(Ce){var Ne=a.changes[Ce];if(Ne.origin=t,E&&!$o(e,Ne,!1))return l.length=0,{};y.push(Na(e,Ne));var He=Ce?Ra(e,Ne):h(l);hi(e,Ne,He,Fo(e,Ne)),!Ce&&e.cm&&e.cm.scrollIntoView({from:Ne.from,to:Vn(Ne)});var Be=[];$n(e,function(ze,qe){!qe&&H(Be,ze.history)==-1&&(Qo(ze.history,Ne),Be.push(ze.history)),hi(ze,Ne,null,Fo(ze,Ne))})},z=a.changes.length-1;z>=0;--z){var de=K(z);if(de)return de.v}}function qo(e,t){if(t==0)return;if(e.first+=t,e.sel=new hn(C(e.sel.ranges,function(i){return new Tt(_e(i.anchor.line+t,i.anchor.ch),_e(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm){tn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Xn(e.cm,n,"gutter")}}function hi(e,t,r,n){if(e.cm&&!e.cm.curOp)return Ht(e.cm,hi)(e,t,r,n);if(t.to.line<e.first){qo(e,t.text.length-1-(t.to.line-t.from.line));return}if(t.from.line>e.lastLine())return;if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);qo(e,i),t={from:_e(e.first,0),to:_e(t.to.line+i,t.to.ch),text:[h(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:_e(a,Ze(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Dn(e,t.from,t.to),r||(r=Ra(e,t)),e.cm?xl(e.cm,t,n):Da(e,t,n),$i(e,r,le),e.cantEdit&&Yi(e,_e(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,t,r){var n=e.doc,i=e.display,a=t.from,o=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=Ct(dn(Ze(n,a.line))),n.iter(u,o.line+1,function(z){if(z==i.maxLine)return l=!0,!0})),n.sel.contains(t.from,t.to)>-1&&P(e),Da(n,t,r,ho(e)),e.options.lineWrapping||(n.iter(u,a.line+t.text.length,function(z){var de=ei(z);de>i.maxLineLength&&(i.maxLine=z,i.maxLineLength=de,i.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),aa(n,a.line),ci(e,400);var d=t.text.length-(o.line-a.line)-1;t.full?tn(e):a.line==o.line&&t.text.length==1&&!Do(e.doc,t)?Xn(e,a.line,"text"):tn(e,a.line,o.line+1,d);var y=T(e,"changes"),E=T(e,"change");if(E||y){var K={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};E&&Xt(e,"change",e,K),y&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(K)}e.display.selForContextMenu=null}function Nr(e,t,r,n,i){var a;n||(n=r),ut(n,r)<0&&(a=[n,r],r=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Dr(e,{from:r,to:n,text:t,origin:i})}function Jo(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Zo(e,t,r,n){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||(a=e[i]=a.deepCopy(),a.copied=!0);for(var l=0;l<a.ranges.length;l++)Jo(a.ranges[l].anchor,t,r,n),Jo(a.ranges[l].head,t,r,n);continue}for(var u=0;u<a.changes.length;++u){var d=a.changes[u];if(r<d.from.line)d.from=_e(d.from.line+n,d.from.ch),d.to=_e(d.to.line+n,d.to.ch);else if(t<=d.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function Qo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Zo(e.done,r,n,i),Zo(e.undone,r,n,i)}function pi(e,t,r,n){var i=t,a=t;return typeof t=="number"?a=Ze(e,br(e,t)):i=Ct(t),i==null?null:(n(a,i)&&e.cm&&Xn(e.cm,i,r),a)}function mi(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}mi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Qe(i),Xt(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}};function gi(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}gi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var a=Math.min(t,i-e),o=n.height;if(n.removeInner(e,a),this.height-=o-n.height,i==a&&(this.children.splice(r--,1),n.parent=null),(t-=a)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof mi))){var l=[];this.collapse(l),this.children=[new mi(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,l=o;l<i.lines.length;){var u=new mi(i.lines.slice(l,l+=25));i.height-=u.height,this.children.splice(++n,0,u),u.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new gi(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=H(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new gi(e.children);n.parent=e,e.children=[n,r],e=n}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,r))return!0;if((t-=o)==0)break;e=0}else e-=a}}};var vi=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};vi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=Ct(r);if(n==null||!t)return;for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var a=ri(this);Zt(r,Math.max(0,r.height-a)),e&&(ln(e,function(){es(e,r,-a),Xn(e,n,"widget")}),Xt(e,"lineWidgetCleared",e,this,n))},vi.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=ri(this)-t;if(!i)return;On(this.doc,n)||Zt(n,n.height+i),r&&ln(r,function(){r.curOp.forceUpdate=!0,es(r,n,i),Xt(r,"lineWidgetChanged",r,e,Ct(n))})},L(vi);function es(e,t,r){Cn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Sa(e,r)}function wl(e,t,r,n){var i=new vi(e,r,n),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),pi(e,t,"widget",function(o){var l=o.widgets||(o.widgets=[]);if(i.insertAt==null?l.push(i):l.splice(Math.min(l.length-1,Math.max(0,i.insertAt)),0,i),i.line=o,a&&!On(e,o)){var u=Cn(o)<e.scrollTop;Zt(o,o.height+ri(i)),u&&Sa(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&Xt(a,"lineWidgetAdded",a,i,typeof t=="number"?t:Ct(t)),i}var ts=0,Yn=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ts};Yn.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&cr(e),T(this,"clear")){var r=this.find();r&&Xt(this,"clear",r.from,r.to)}for(var n=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],l=En(o.markedSpans,this);e&&!this.collapsed?Xn(e,Ct(o),"text"):e&&(l.to!=null&&(i=Ct(o)),l.from!=null&&(n=Ct(o))),o.markedSpans=Jr(o.markedSpans,l),l.from==null&&this.collapsed&&!On(this.doc,o)&&e&&Zt(o,Tr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var d=dn(this.lines[u]),y=ei(d);y>e.display.maxLineLength&&(e.display.maxLine=d,e.display.maxLineLength=y,e.display.maxLineChanged=!0)}n!=null&&e&&this.collapsed&&tn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Xo(e.doc)),e&&Xt(e,"markerCleared",e,this,n,i),t&&dr(e),this.parent&&this.parent.clear()},Yn.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var a=this.lines[i],o=En(a.markedSpans,this);if(o.from!=null&&(r=_e(t?a:Ct(a),o.from),e==-1))return r;if(o.to!=null&&(n=_e(t?a:Ct(a),o.to),e==1))return n}return r&&{from:r,to:n}},Yn.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;if(!t||!n)return;ln(n,function(){var i=t.line,a=Ct(t.line),o=ha(n,a);if(o&&(io(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!On(r.doc,i)&&r.height!=null){var l=r.height;r.height=null;var u=ri(r)-l;u&&Zt(i,i.height+u)}Xt(n,"markerChanged",n,e)})},Yn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||H(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Yn.prototype.detachLine=function(e){if(this.lines.splice(H(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},L(Yn);function Pr(e,t,r,n,i){if(n&&n.shared)return El(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Ht(e.cm,Pr)(e,t,r,n,i);var a=new Yn(e,i),o=ut(t,r);if(n&&s(n,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=ne("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Di(e,t.line,t,r,a)||t.line!=r.line&&Di(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");oa()}a.addToHistory&&Io(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l=t.line,u=e.cm,d;if(e.iter(l,r.line+1,function(E){u&&a.collapsed&&!u.options.lineWrapping&&dn(E)==u.display.maxLine&&(d=!0),a.collapsed&&l!=t.line&&Zt(E,0),sa(E,new er(a,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),a.collapsed&&e.iter(t.line,r.line+1,function(E){On(e,E)&&Zt(E,0)}),a.clearOnEnter&&fe(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(Wn(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++ts,a.atomic=!0),u){if(d&&(u.curOp.updateMaxLine=!0),a.collapsed)tn(u,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var y=t.line;y<=r.line;y++)Xn(u,y,"text");a.atomic&&Xo(u.doc),Xt(u,"markerAdded",u,a)}return a}var bi=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};bi.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Xt(this,"clear")},bi.prototype.find=function(e,t){return this.primary.find(e,t)},L(bi);function El(e,t,r,n,i){n=s(n),n.shared=!1;var a=[Pr(e,t,r,n,i)],o=a[0],l=n.widgetNode;return $n(e,function(u){l&&(n.widgetNode=l.cloneNode(!0)),a.push(Pr(u,ft(u,t),ft(u,r),n,i));for(var d=0;d<u.linked.length;++d)if(u.linked[d].isParent)return;o=h(a)}),new bi(a,o)}function ns(e){return e.findMarks(_e(e.first,0),e.clipPos(_e(e.lastLine())),function(t){return t.parent})}function Cl(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(ut(a,o)){var l=Pr(e,a,o,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function kl(e){for(var t=function(n){var i=e[n],a=[i.primary.doc];$n(i.primary.doc,function(u){return a.push(u)});for(var o=0;o<i.markers.length;o++){var l=i.markers[o];H(a,l.doc)==-1&&(l.parent=null,i.markers.splice(o--,1))}},r=0;r<e.length;r++)t(r)}var Sl=0,nn=function(e,t,r,n,i){if(!(this instanceof nn))return new nn(e,t,r,n,i);r==null&&(r=0),gi.call(this,[new mi([new rr("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var a=_e(r,0);this.sel=Kn(a),this.history=new Gi(null),this.id=++Sl,this.modeOption=t,this.lineSep=n,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Da(this,{from:a,to:a,text:e}),Vt(this,Kn(a),le)};nn.prototype=ve(gi.prototype,{constructor:nn,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=pr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:zt(function(e){var t=_e(this.first,0),r=this.first+this.size-1;Dr(this,{from:t,to:_e(r,Ze(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&oi(this.cm,0,0),Vt(this,Kn(t),le)}),replaceRange:function(e,t,r,n){t=ft(this,t),r=r?ft(this,r):t,Nr(this,e,t,r,n)},getRange:function(e,t,r){var n=Dn(this,ft(this,e),ft(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Nn(this,e))return Ze(this,e)},getLineNumber:function(e){return Ct(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Ze(this,e)),dn(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ft(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return e==null||e=="head"?r=t.head:e=="anchor"?r=t.anchor:e=="end"||e=="to"||e===!1?r=t.to():r=t.from(),r},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:zt(function(e,t,r){zo(this,ft(this,typeof e=="number"?_e(e,t||0):e),null,r)}),setSelection:zt(function(e,t,r){zo(this,ft(this,e),ft(this,t||e),r)}),extendSelection:zt(function(e,t,r){Vi(this,ft(this,e),t&&ft(this,t),r)}),extendSelections:zt(function(e,t){Ho(this,De(this,e),t)}),extendSelectionsBy:zt(function(e,t){var r=C(this.sel.ranges,e);Ho(this,De(this,r),t)}),setSelections:zt(function(e,t,r){if(!e.length)return;for(var n=[],i=0;i<e.length;i++)n[i]=new Tt(ft(this,e[i].anchor),ft(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),Vt(this,Sn(this.cm,n,t),r)}),addSelection:zt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new Tt(ft(this,e),ft(this,t||e))),Vt(this,Sn(this.cm,n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var i=Dn(this,t[n].from(),t[n].to());r=r?r.concat(i):i}return e===!1?r:r.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=Dn(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:zt(function(e,t,r){for(var n=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];n[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:r}}for(var l=t&&t!="end"&&fl(this,n,t),u=n.length-1;u>=0;u--)Dr(this,n[u]);l?Wo(this,l):this.cm&&Lr(this.cm)}),undo:zt(function(){qi(this,"undo")}),redo:zt(function(){qi(this,"redo")}),undoSelection:zt(function(){qi(this,"undo",!0)}),redoSelection:zt(function(){qi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new Gi(this.history.maxGeneration),$n(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Rr(this.history.done),undone:Rr(this.history.undone)}},setHistory:function(e){var t=this.history=new Gi(this.history.maxGeneration);t.done=Rr(e.done.slice(0),null,!0),t.undone=Rr(e.undone.slice(0),null,!0)},setGutterMarker:zt(function(e,t,r){return pi(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&je(i)&&(n.gutterMarkers=null),!0})}),clearGutter:zt(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&pi(t,r,"gutter",function(){return r.gutterMarkers[e]=null,je(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Nn(this,e))return null;if(t=e,e=Ze(this,e),!e)return null}else if(t=Ct(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:zt(function(e,t,r){return pi(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!n[i])n[i]=r;else{if(me(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:zt(function(e,t,r){return pi(this,e,t=="gutter"?"gutter":"class",function(n){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=n[i];if(a)if(r==null)n[i]=null;else{var o=a.match(me(r));if(!o)return!1;var l=o.index+o[0].length;n[i]=a.slice(0,o.index)+(!o.index||l==a.length?"":" ")+a.slice(l)||null}else return!1;return!0})}),addLineWidget:zt(function(e,t,r){return wl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Pr(this,ft(this,e),ft(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=ft(this,e),Pr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=ft(this,e);var t=[],r=Ze(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=ft(this,e),t=ft(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var l=0;l<o.length;l++){var u=o[l];!(u.to!=null&&i==e.line&&e.ch>=u.to||u.from==null&&i!=e.line||u.from!=null&&i==t.line&&u.from>=t.ch)&&(!r||r(u.marker))&&n.push(u.marker.parent||u.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)r[n].from!=null&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var a=i.text.length+n;if(a>e)return t=e,!0;e-=a,++r}),ft(this,_e(r,t))},indexFromPos:function(e){e=ft(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(n){t+=n.text.length+r}),t},copy:function(e){var t=new nn(pr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<r&&(r=e.to);var n=new nn(pr(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Cl(n,ns(this)),n},unlinkDoc:function(e){if(e instanceof Rt&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var r=this.linked[t];if(r.doc!=e)continue;this.linked.splice(t,1),e.unlinkDoc(this),kl(ns(this));break}if(e.history==this.history){var n=[e.id];$n(e,function(i){return n.push(i.id)},!0),e.history=new Gi(null),e.history.done=Rr(this.history.done,n),e.history.undone=Rr(this.history.undone,n)}},iterLinkedDocs:function(e){$n(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):dt(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:zt(function(e){if(e!="rtl"&&(e="ltr"),e==this.direction)return;this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&hl(this.cm)})}),nn.prototype.eachLine=nn.prototype.iter;var rs=0;function Tl(e){var t=this;if(is(t),Oe(t,e)||Fn(t.display,e))return;f(e),M&&(rs=+new Date);var r=or(t,e,!0),n=e.dataTransfer.files;if(!r||t.isReadOnly())return;if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,a=Array(i),o=0,l=function(){++o==i&&Ht(t,function(){r=ft(t.doc,r);var z={from:r,to:r,text:t.doc.splitLines(a.filter(function(de){return de!=null}).join(t.doc.lineSeparator())),origin:"paste"};Dr(t.doc,z),Wo(t.doc,Kn(ft(t.doc,r),ft(t.doc,Vn(z))))})()},u=function(z,de){if(t.options.allowDropFileTypes&&H(t.options.allowDropFileTypes,z.type)==-1){l();return}var Ce=new FileReader;Ce.onerror=function(){return l()},Ce.onload=function(){var Ne=Ce.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ne)){l();return}a[de]=Ne,l()},Ce.readAsText(z)},d=0;d<n.length;d++)u(n[d],d);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var y=e.dataTransfer.getData("Text");if(y){var E;if(t.state.draggingText&&!t.state.draggingText.copy&&(E=t.listSelections()),$i(t.doc,Kn(r,r)),E)for(var K=0;K<E.length;++K)Nr(t.doc,"",E[K].anchor,E[K].head,"drag");t.replaceSelection(y,"around","paste"),t.display.input.focus()}}catch(z){}}}function Al(e,t){if(M&&(!e.state.draggingText||+new Date-rs<100)){w(t);return}if(Oe(e,t)||Fn(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!be){var r=b("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",S&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),S&&r.parentNode.removeChild(r)}}function Ol(e,t){var r=or(e,t);if(!r)return;var n=document.createDocumentFragment();go(e,r,n),e.display.dragCursor||(e.display.dragCursor=b("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),ae(e.display.dragCursor,n)}function is(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function as(e){if(!document.getElementsByClassName)return;for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation(function(){for(var a=0;a<r.length;a++)e(r[a])})}var os=!1;function Ll(){if(os)return;_l(),os=!0}function _l(){var e;fe(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,as(Rl)},100))}),fe(window,"blur",function(){return as(Or)})}function Rl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var qn={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},yi=0;yi<10;yi++)qn[yi+48]=qn[yi+96]=String(yi);for(var Ji=65;Ji<=90;Ji++)qn[Ji]=String.fromCharCode(Ji);for(var xi=1;xi<=12;xi++)qn[xi+111]=qn[xi+63235]="F"+xi;var Hn={};Hn.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Hn.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Hn.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Hn.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Hn.default=ce?Hn.macDefault:Hn.pcDefault;function Ml(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,a,o=0;o<t.length-1;o++){var l=t[o];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else if(/^s(hift)?$/i.test(l))i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Dl(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if(n=="..."){delete e[r];continue}for(var i=C(r.split(" "),Ml),a=0;a<i.length;a++){var o=void 0,l=void 0;a==i.length-1?(l=i.join(" "),o=n):(l=i.slice(0,a+1).join(" "),o="...");var u=t[l];if(!u)t[l]=o;else if(u!=o)throw new Error("Inconsistent bindings for "+l)}delete e[r]}for(var d in t)e[d]=t[d];return e}function jr(e,t,r,n){t=Zi(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&r(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return jr(e,t.fallthrough,r,n);for(var a=0;a<t.fallthrough.length;a++){var o=jr(e,t.fallthrough[a],r,n);if(o)return o}}}function ss(e){var t=typeof e=="string"?e:qn[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function ls(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(Re?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(Re?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function us(e,t){if(S&&e.keyCode==34&&e.char)return!1;var r=qn[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),ls(r,e,t))}function Zi(e){return typeof e=="string"?Hn[e]:e}function Ir(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var a=t(r[i]);n.length&&ut(a.from,h(n).to)<=0;){var o=n.pop();if(ut(o.from,a.from)<0){a.from=o.from;break}}n.push(a)}ln(e,function(){for(var l=n.length-1;l>=0;l--)Nr(e.doc,"",n[l].from,n[l].to,"+delete");Lr(e)})}function Ia(e,t,r){var n=Se(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Ua(e,t,r){var n=Ia(e,t.ch,r);return n==null?null:new _e(t.line,n,r<0?"after":"before")}function Fa(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=tt(r,t.doc.direction);if(a){var o=i<0?h(a):a[0],l=i<0==(o.level==1),u=l?"after":"before",d;if(o.level>0||t.doc.direction=="rtl"){var y=Sr(t,r);d=i<0?r.text.length-1:0;var E=_n(t,y,d).top;d=et(function(K){return _n(t,y,K).top==E},i<0==(o.level==1)?o.from:o.to-1,d),u=="before"&&(d=Ia(r,d,1))}else d=i<0?o.to:o.from;return new _e(n,d,u)}}return new _e(n,i<0?r.text.length:0,i<0?"before":"after")}function Nl(e,t,r,n){var i=tt(t,e.doc.direction);if(!i)return Ua(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var a=Ve(i,r.ch,r.sticky),o=i[a];if(e.doc.direction=="ltr"&&o.level%2==0&&(n>0?o.to>r.ch:o.from<r.ch))return Ua(t,r,n);var l=function(He,Be){return Ia(t,He instanceof _e?He.ch:He,Be)},u,d=function(He){return e.options.lineWrapping?(u=u||Sr(e,t),fo(e,t,u,He)):{begin:0,end:t.text.length}},y=d(r.sticky=="before"?l(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var E=o.level==1==n<0,K=l(r,E?1:-1);if(K!=null&&(E?K<=o.to&&K<=y.end:K>=o.from&&K>=y.begin)){var z=E?"before":"after";return new _e(r.line,K,z)}}var de=function(He,Be,ze){for(var qe=function(_t,Wt){return Wt?new _e(r.line,l(_t,1),"before"):new _e(r.line,_t,"after")};He>=0&&He<i.length;He+=Be){var lt=i[He],at=Be>0==(lt.level!=1),pt=at?ze.begin:l(ze.end,-1);if(lt.from<=pt&&pt<lt.to)return qe(pt,at);if(pt=at?lt.from:l(lt.to,-1),ze.begin<=pt&&pt<ze.end)return qe(pt,at)}},Ce=de(a+n,n,y);if(Ce)return Ce;var Ne=n>0?y.end:l(y.begin,-1);return Ne!=null&&!(n>0&&Ne==t.text.length)&&(Ce=de(n>0?0:i.length-1,n,d(Ne)),Ce)?Ce:null}var wi={selectAll:Vo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),le)},killLine:function(e){return Ir(e,function(t){if(t.empty()){var r=Ze(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:_e(t.head.line+1,0)}:{from:t.head,to:_e(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Ir(e,function(t){return{from:_e(t.from().line,0),to:ft(e.doc,_e(t.to().line+1,0))}})},delLineLeft:function(e){return Ir(e,function(t){return{from:_e(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Ir(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return{from:n,to:t.from()}})},delWrappedLineRight:function(e){return Ir(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(_e(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(_e(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return cs(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return ds(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Pl(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},V)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},V)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?ds(e,t.head):n},V)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var a=r[i].from(),o=m(e.getLine(a.line),a.ch,n);t.push(J(n-o%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return ln(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){if(!t[n].empty())continue;var i=t[n].head,a=Ze(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new _e(i.line,i.ch-1)),i.ch>0)i=new _e(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),_e(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=Ze(e.doc,i.line-1).text;o&&(i=new _e(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),_e(i.line-1,o.length-1),i,"+transpose"))}}r.push(new Tt(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return ln(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Lr(e)})},openLine:function(e){return e.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function cs(e,t){var r=Ze(e.doc,t),n=dn(r);return n!=r&&(t=Ct(n)),Fa(!0,e,n,t,1)}function Pl(e,t){var r=Ze(e.doc,t),n=Ni(r);return n!=r&&(t=Ct(n)),Fa(!0,e,r,t,-1)}function ds(e,t){var r=cs(e,t.line),n=Ze(e.doc,r.line),i=tt(n,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(r.ch,n.text.search(/\S/)),o=t.line==r.line&&t.ch<=a&&t.ch;return _e(r.line,o?0:a,r.sticky)}return r}function Qi(e,t,r){if(typeof t=="string"&&(t=wi[t],!t))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Ae}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function jl(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=jr(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&jr(t,e.options.extraKeys,r,e)||jr(t,e.options.keyMap,r,e)}var Il=new A;function Ei(e,t,r,n){var i=e.state.keySeq;if(i){if(ss(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Il.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),fs(e,i+" "+t,r,n))return!0}return fs(e,t,r,n)}function fs(e,t,r,n){var i=jl(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&Xt(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(f(r),Ea(e)),!!i}function hs(e,t){var r=us(t,!0);return r?t.shiftKey&&!e.state.keySeq?Ei(e,"Shift-"+r,t,function(n){return Qi(e,n,!0)})||Ei(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Qi(e,n)}):Ei(e,r,t,function(n){return Qi(e,n)}):!1}function Ul(e,t,r){return Ei(e,"'"+r+"'",t,function(n){return Qi(e,n,!0)})}var Ha=null;function ps(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=ee(),Oe(t,e))return;M&&W<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=hs(t,e);S&&(Ha=n?r:null,!n&&r==88&&!kt&&(ce?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),se&&!ce&&!n&&r==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),r==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Fl(t)}function Fl(e){var t=e.display.lineDiv;j(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(ge(t,"CodeMirror-crosshair"),$e(document,"keyup",r),$e(document,"mouseover",r))}fe(document,"keyup",r),fe(document,"mouseover",r)}function ms(e){e.keyCode==16&&(this.doc.sel.shift=!1),Oe(this,e)}function gs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Fn(t.display,e)||Oe(t,e)||e.ctrlKey&&!e.altKey||ce&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(S&&r==Ha){Ha=null,f(e);return}if(S&&(!e.which||e.which<10)&&hs(t,e))return;var i=String.fromCharCode(n==null?r:n);if(i=="\b")return;if(Ul(t,e,i))return;t.display.input.onKeyPress(e)}var Hl=400,za=function(e,t,r){this.time=e,this.pos=t,this.button=r};za.prototype.compare=function(e,t,r){return this.time+Hl>e&&ut(t,this.pos)==0&&r==this.button};var Ci,ki;function zl(e,t){var r=+new Date;return ki&&ki.compare(r,e,t)?(Ci=ki=null,"triple"):Ci&&Ci.compare(r,e,t)?(ki=new za(r,e,t),Ci=null,"double"):(Ci=new za(r,e,t),ki=null,"single")}function vs(e){var t=this,r=t.display;if(Oe(t,e)||r.activeTouch&&r.input.supportsTouch())return;if(r.input.ensurePolled(),r.shift=e.shiftKey,Fn(r,e)){Z||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Wa(t,e))return;var n=or(t,e),i=ie(e),a=n?zl(n,i):"single";if(window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),n&&Wl(t,i,n,a,e))return;i==1?n?Xl(t,n,a,e):R(e)==r.scroller&&f(e):i==2?(n&&Vi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(We?t.display.input.onContextMenu(e):bo(t))}function Wl(e,t,r,n,i){var a="Click";return n=="double"?a="Double"+a:n=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,Ei(e,ls(a,i),i,function(o){if(typeof o=="string"&&(o=wi[o]),!o)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=o(e,r)!=Ae}finally{e.state.suppressEdits=!1}return l})}function Bl(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var a=Te?r.shiftKey&&r.metaKey:r.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),i.addNew==null&&(i.addNew=ce?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(ce?r.altKey:r.ctrlKey)),i}function Xl(e,t,r,n){M?setTimeout(c(vo,e),0):e.curOp.focus=ee();var i=Bl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&ye&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(ut((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(ut(o.to(),t)>0||t.xRel<0)?Gl(e,n,t,i):Kl(e,n,t,i)}function Gl(e,t,r,n){var i=e.display,a=!1,o=Ht(e,function(d){Z&&(i.scroller.draggable=!1),e.state.draggingText=!1,$e(i.wrapper.ownerDocument,"mouseup",o),$e(i.wrapper.ownerDocument,"mousemove",l),$e(i.scroller,"dragstart",u),$e(i.scroller,"drop",o),a||(f(d),n.addNew||Vi(e.doc,r,null,null,n.extend),Z&&!be||M&&W==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),l=function(d){a=a||Math.abs(t.clientX-d.clientX)+Math.abs(t.clientY-d.clientY)>=10},u=function(){return a=!0};Z&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),fe(i.wrapper.ownerDocument,"mouseup",o),fe(i.wrapper.ownerDocument,"mousemove",l),fe(i.scroller,"dragstart",u),fe(i.scroller,"drop",o),bo(e),setTimeout(function(){return i.input.focus()},20)}function bs(e,t,r){if(r=="char")return new Tt(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new Tt(_e(t.line,0),ft(e.doc,_e(t.line+1,0)));var n=r(e,t);return new Tt(n.from,n.to)}function Kl(e,t,r,n){var i=e.display,a=e.doc;f(t);var o,l,u=a.sel,d=u.ranges;if(n.addNew&&!n.extend?(l=a.sel.contains(r),l>-1?o=d[l]:o=new Tt(r,r)):(o=a.sel.primary(),l=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new Tt(r,r)),r=or(e,t,!0,!0),l=-1;else{var y=bs(e,r,n.unit);n.extend?o=Pa(o,y.anchor,y.head,n.extend):o=y}n.addNew?l==-1?(l=d.length,Vt(a,Sn(e,d.concat([o]),l),{scroll:!1,origin:"*mouse"})):d.length>1&&d[l].empty()&&n.unit=="char"&&!n.extend?(Vt(a,Sn(e,d.slice(0,l).concat(d.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):ja(a,l,o,te):(l=0,Vt(a,new hn([o],0),te),u=a.sel);var E=r;function K(ze){if(ut(E,ze)==0)return;if(E=ze,n.unit=="rectangle"){for(var qe=[],lt=e.options.tabSize,at=m(Ze(a,r.line).text,r.ch,lt),pt=m(Ze(a,ze.line).text,ze.ch,lt),_t=Math.min(at,pt),Wt=Math.max(at,pt),Mt=Math.min(r.line,ze.line),un=Math.min(e.lastLine(),Math.max(r.line,ze.line));Mt<=un;Mt++){var rn=Ze(a,Mt).text,jt=$(rn,_t,lt);_t==Wt?qe.push(new Tt(_e(Mt,jt),_e(Mt,jt))):rn.length>jt&&qe.push(new Tt(_e(Mt,jt),_e(Mt,$(rn,Wt,lt))))}qe.length||qe.push(new Tt(r,r)),Vt(a,Sn(e,u.ranges.slice(0,l).concat(qe),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ze)}else{var an=o,Gt=bs(e,ze,n.unit),Ft=an.anchor,It;ut(Gt.anchor,Ft)>0?(It=Gt.head,Ft=Zn(an.from(),Gt.anchor)):(It=Gt.anchor,Ft=vr(an.to(),Gt.head));var Nt=u.ranges.slice(0);Nt[l]=Vl(e,new Tt(ft(a,Ft),It)),Vt(a,Sn(e,Nt,l),te)}}var z=i.wrapper.getBoundingClientRect(),de=0;function Ce(ze){var qe=++de,lt=or(e,ze,!0,n.unit=="rectangle");if(!lt)return;if(ut(lt,E)!=0){e.curOp.focus=ee(),K(lt);var at=zi(i,a);(lt.line>=at.to||lt.line<at.from)&&setTimeout(Ht(e,function(){de==qe&&Ce(ze)}),150)}else{var pt=ze.clientY<z.top?-20:ze.clientY>z.bottom?20:0;pt&&setTimeout(Ht(e,function(){if(de!=qe)return;i.scroller.scrollTop+=pt,Ce(ze)}),50)}}function Ne(ze){e.state.selectingText=!1,de=Infinity,ze&&(f(ze),i.input.focus()),$e(i.wrapper.ownerDocument,"mousemove",He),$e(i.wrapper.ownerDocument,"mouseup",Be),a.history.lastSelOrigin=null}var He=Ht(e,function(ze){ze.buttons===0||!ie(ze)?Ne(ze):Ce(ze)}),Be=Ht(e,Ne);e.state.selectingText=Be,fe(i.wrapper.ownerDocument,"mousemove",He),fe(i.wrapper.ownerDocument,"mouseup",Be)}function Vl(e,t){var r=t.anchor,n=t.head,i=Ze(e.doc,r.line);if(ut(r,n)==0&&r.sticky==n.sticky)return t;var a=tt(i);if(!a)return t;var o=Ve(a,r.ch,r.sticky),l=a[o];if(l.from!=r.ch&&l.to!=r.ch)return t;var u=o+(l.from==r.ch==(l.level!=1)?0:1);if(u==0||u==a.length)return t;var d;if(n.line!=r.line)d=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var y=Ve(a,n.ch,n.sticky),E=y-o||(n.ch-r.ch)*(l.level==1?-1:1);y==u-1||y==u?d=E<0:d=E>0}var K=a[u+(d?-1:0)],z=d==(K.level==1),de=z?K.from:K.to,Ce=z?"after":"before";return r.ch==de&&r.sticky==Ce?t:new Tt(new _e(r.line,de,Ce),n)}function ys(e,t,r,n){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(K){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&f(t);var o=e.display,l=o.lineDiv.getBoundingClientRect();if(a>l.bottom||!T(e,r))return v(t);a-=l.top-o.viewOffset;for(var u=0;u<e.display.gutterSpecs.length;++u){var d=o.gutters.childNodes[u];if(d&&d.getBoundingClientRect().right>=i){var y=bn(e.doc,a),E=e.display.gutterSpecs[u];return he(e,r,e,y,E.className,t),v(t)}}}function Wa(e,t){return ys(e,t,"gutterClick",!0)}function xs(e,t){if(Fn(e.display,t)||$l(e,t))return;if(Oe(e,t,"contextmenu"))return;We||e.display.input.onContextMenu(t)}function $l(e,t){return T(e,"gutterContextMenu")?ys(e,t,"gutterContextMenu",!1):!1}function ws(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ii(e)}var Ur={toString:function(){return"CodeMirror.Init"}},Es={},ea={};function Yl(e){var t=e.optionHandlers;function r(n,i,a,o){e.defaults[n]=i,a&&(t[n]=o?function(l,u,d){d!=Ur&&a(l,u,d)}:a)}e.defineOption=r,e.Init=Ur,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,Ma(n)},!0),r("indentUnit",2,Ma,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){fi(n),ii(n),tn(n)},!0),r("lineSeparator",null,function(n,i){if(n.doc.lineSep=i,!i)return;var a=[],o=n.doc.first;n.doc.iter(function(u){for(var d=0;;){var y=u.text.indexOf(i,d);if(y==-1)break;d=y+i.length,a.push(_e(o,y))}o++});for(var l=a.length-1;l>=0;l--)Nr(n.doc,i,a[l],_e(a[l].line,a[l].ch+i.length))}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(n,i,a){n.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=Ur&&n.refresh()}),r("specialCharPlaceholder",Lt,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",oe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(n,i){return n.getInputField().spellcheck=i},!0),r("autocorrect",!1,function(n,i){return n.getInputField().autocorrect=i},!0),r("autocapitalize",!1,function(n,i){return n.getInputField().autocapitalize=i},!0),r("rtlMoveVisually",!Xe),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){ws(n),di(n)},!0),r("keyMap","default",function(n,i,a){var o=Zi(i),l=a!=Ur&&Zi(a);l&&l.detach&&l.detach(n,o),o.attach&&o.attach(n,l||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Jl,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=_a(i,n.options.lineNumbers),di(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?xa(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return _r(n)},!0),r("scrollbarStyle","native",function(n){ko(n),_r(n),n.display.scrollbars.setScrollTop(n.doc.scrollTop),n.display.scrollbars.setScrollLeft(n.doc.scrollLeft)},!0),r("lineNumbers",!1,function(n,i){n.display.gutterSpecs=_a(n.options.gutters,i),di(n)},!0),r("firstLineNumber",1,di,!0),r("lineNumberFormatter",function(n){return n},di,!0),r("showCursorWhenSelecting",!1,ai,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(Or(n),n.display.input.blur()),n.display.input.readOnlyChanged(i)}),r("screenReaderLabel",null,function(n,i){i=i===""?null:i,n.display.input.screenReaderLabelChanged(i)}),r("disableInput",!1,function(n,i){i||n.display.input.reset()},!0),r("dragDrop",!0,ql),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,ai,!0),r("singleCursorHeightPerLine",!0,ai,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,fi,!0),r("addModeClass",!1,fi,!0),r("pollInterval",100),r("undoDepth",200,function(n,i){return n.doc.history.undoDepth=i}),r("historyEventDelay",1250),r("viewportMargin",10,function(n){return n.refresh()},!0),r("maxHighlightLength",1e4,fi,!0),r("moveInputWithCursor",!0,function(n,i){i||n.display.input.resetPosition()}),r("tabindex",null,function(n,i){return n.display.input.getField().tabIndex=i||""}),r("autofocus",null),r("direction","ltr",function(n,i){return n.doc.setDirection(i)},!0),r("phrases",null)}function ql(e,t,r){var n=r&&r!=Ur;if(!t!=!n){var i=e.display.dragFunctions,a=t?fe:$e;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function Jl(e){e.options.lineWrapping?(j(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(ge(e.display.wrapper,"CodeMirror-wrap"),Pi(e)),wa(e),tn(e),ii(e),setTimeout(function(){return _r(e)},100)}function Rt(e,t){var r=this;if(!(this instanceof Rt))return new Rt(e,t);this.options=t=t?s(t):{},s(Es,t,!1);var n=t.value;typeof n=="string"?n=new nn(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Rt.inputStyles[t.inputStyle](this),a=this.display=new cl(e,n,i,t);a.wrapper.CodeMirror=this,ws(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ko(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new A,keySeq:null,specialChars:null},t.autofocus&&!oe&&a.input.focus(),M&&W<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Zl(this),Ll(),cr(this),this.curOp.forceUpdate=!0,No(this,n),t.autofocus&&!oe||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Ca(r)},20):Or(this);for(var o in ea)ea.hasOwnProperty(o)&&ea[o](this,t[o],Ur);Ao(this),t.finishInit&&t.finishInit(this);for(var l=0;l<Ba.length;++l)Ba[l](this);dr(this),Z&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}Rt.defaults=Es,Rt.optionHandlers=ea;function Zl(e){var t=e.display;fe(t.scroller,"mousedown",Ht(e,vs)),M&&W<11?fe(t.scroller,"dblclick",Ht(e,function(u){if(Oe(e,u))return;var d=or(e,u);if(!d||Wa(e,u)||Fn(e.display,u))return;f(u);var y=e.findWordAt(d);Vi(e.doc,y.anchor,y.head)})):fe(t.scroller,"dblclick",function(u){return Oe(e,u)||f(u)}),fe(t.scroller,"contextmenu",function(u){return xs(e,u)}),fe(t.input.getField(),"contextmenu",function(u){t.scroller.contains(u.target)||xs(e,u)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),n=t.activeTouch,n.end=+new Date)}function a(u){if(u.touches.length!=1)return!1;var d=u.touches[0];return d.radiusX<=1&&d.radiusY<=1}function o(u,d){if(d.left==null)return!0;var y=d.left-u.left,E=d.top-u.top;return y*y+E*E>20*20}fe(t.scroller,"touchstart",function(u){if(!Oe(e,u)&&!a(u)&&!Wa(e,u)){t.input.ensurePolled(),clearTimeout(r);var d=+new Date;t.activeTouch={start:d,moved:!1,prev:d-n.end<=300?n:null},u.touches.length==1&&(t.activeTouch.left=u.touches[0].pageX,t.activeTouch.top=u.touches[0].pageY)}}),fe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),fe(t.scroller,"touchend",function(u){var d=t.activeTouch;if(d&&!Fn(t,u)&&d.left!=null&&!d.moved&&new Date-d.start<300){var y=e.coordsChar(t.activeTouch,"page"),E;!d.prev||o(d,d.prev)?E=new Tt(y,y):!d.prev.prev||o(d,d.prev.prev)?E=e.findWordAt(y):E=new Tt(_e(y.line,0),ft(e.doc,_e(y.line+1,0))),e.setSelection(E.anchor,E.head),e.focus(),f(u)}i()}),fe(t.scroller,"touchcancel",i),fe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(si(e,t.scroller.scrollTop),lr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))}),fe(t.scroller,"mousewheel",function(u){return _o(e,u)}),fe(t.scroller,"DOMMouseScroll",function(u){return _o(e,u)}),fe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){Oe(e,u)||w(u)},over:function(u){Oe(e,u)||(Ol(e,u),w(u))},start:function(u){return Al(e,u)},drop:Ht(e,Tl),leave:function(u){Oe(e,u)||is(e)}};var l=t.input.getField();fe(l,"keyup",function(u){return ms.call(e,u)}),fe(l,"keydown",Ht(e,ps)),fe(l,"keypress",Ht(e,gs)),fe(l,"focus",function(u){return Ca(e,u)}),fe(l,"blur",function(u){return Or(e,u)})}var Ba=[];Rt.defineInitHook=function(e){return Ba.push(e)};function Si(e,t,r,n){var i=e.doc,a;r==null&&(r="add"),r=="smart"&&(i.mode.indent?a=yn(e,t).state:r="prev");var o=e.options.tabSize,l=Ze(i,t),u=m(l.text,null,o);l.stateAfter&&(l.stateAfter=null);var d=l.text.match(/^\s*/)[0],y;if(!n&&!/\S/.test(l.text))y=0,r="not";else if(r=="smart"&&(y=i.mode.indent(a,l.text.slice(d.length),l.text),y==Ae||y>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?y=m(Ze(i,t-1).text,null,o):y=0:r=="add"?y=u+e.options.indentUnit:r=="subtract"?y=u-e.options.indentUnit:typeof r=="number"&&(y=u+r),y=Math.max(0,y);var E="",K=0;if(e.options.indentWithTabs)for(var z=Math.floor(y/o);z;--z)K+=o,E+=" ";if(K<y&&(E+=J(y-K)),E!=d)return Nr(i,E,_e(t,0),_e(t,d.length),"+input"),l.stateAfter=null,!0;for(var de=0;de<i.sel.ranges.length;de++){var Ce=i.sel.ranges[de];if(Ce.head.line==t&&Ce.head.ch<d.length){var Ne=_e(t,d.length);ja(i,de,new Tt(Ne,Ne));break}}}var Tn=null;function ta(e){Tn=e}function Xa(e,t,r,n,i){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var o=+new Date-200,l=i=="paste"||e.state.pasteIncoming>o,u=dt(t),d=null;if(l&&n.ranges.length>1)if(Tn&&Tn.text.join(`
|
|
`)==t){if(n.ranges.length%Tn.text.length==0){d=[];for(var y=0;y<Tn.text.length;y++)d.push(a.splitLines(Tn.text[y]))}}else u.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(d=C(u,function(He){return[He]}));for(var E=e.curOp.updateInput,K=n.ranges.length-1;K>=0;K--){var z=n.ranges[K],de=z.from(),Ce=z.to();z.empty()&&(r&&r>0?de=_e(de.line,de.ch-r):e.state.overwrite&&!l?Ce=_e(Ce.line,Math.min(Ze(a,Ce.line).text.length,Ce.ch+h(u).length)):l&&Tn&&Tn.lineWise&&Tn.text.join(`
|
|
`)==u.join(`
|
|
`)&&(de=Ce=_e(de.line,0)));var Ne={from:de,to:Ce,text:d?d[K%d.length]:u,origin:i||(l?"paste":e.state.cutIncoming>o?"cut":"+input")};Dr(e.doc,Ne),Xt(e,"inputRead",e,Ne)}t&&!l&&ks(e,t),Lr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=E),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Cs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&ln(t,function(){return Xa(t,r,0,null,"paste")}),!0}function ks(e,t){if(!e.options.electricChars||!e.options.smartIndent)return;for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)continue;var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var l=0;l<a.electricChars.length;l++)if(t.indexOf(a.electricChars.charAt(l))>-1){o=Si(e,i.head.line,"smart");break}}else a.electricInput&&(a.electricInput.test(Ze(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=Si(e,i.head.line,"smart")));o&&Xt(e,"electricInput",e,i.head.line)}}function Ss(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,a={anchor:_e(i,0),head:_e(i+1,0)};r.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:r}}function Ts(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function As(){var e=b("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=b("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Z?e.style.width="1000px":e.setAttribute("wrap","off"),B&&(e.style.border="1px solid black"),Ts(e),t}function Ql(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(n,i){var a=this.options,o=a[n];if(a[n]==i&&n!="mode")return;a[n]=i,t.hasOwnProperty(n)&&Ht(this,t[n])(this,i,o),he(this,"optionChange",this,n)},getOption:function(n){return this.options[n]},getDoc:function(){return this.doc},addKeyMap:function(n,i){this.state.keyMaps[i?"push":"unshift"](Zi(n))},removeKeyMap:function(n){for(var i=this.state.keyMaps,a=0;a<i.length;++a)if(i[a]==n||i[a].name==n)return i.splice(a,1),!0},addOverlay:qt(function(n,i){var a=n.token?n:e.getMode(this.options,n);if(a.startState)throw new Error("Overlays may not be stateful.");g(this.state.overlays,{mode:a,modeSpec:n,opaque:i&&i.opaque,priority:i&&i.priority||0},function(o){return o.priority}),this.state.modeGen++,tn(this)}),removeOverlay:qt(function(n){for(var i=this.state.overlays,a=0;a<i.length;++a){var o=i[a].modeSpec;if(o==n||typeof n=="string"&&o.name==n){i.splice(a,1),this.state.modeGen++,tn(this);return}}}),indentLine:qt(function(n,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),Nn(this.doc,n)&&Si(this,n,i,a)}),indentSelection:qt(function(n){for(var i=this.doc.sel.ranges,a=-1,o=0;o<i.length;o++){var l=i[o];if(l.empty())l.head.line>a&&(Si(this,l.head.line,n,!0),a=l.head.line,o==this.doc.sel.primIndex&&Lr(this));else{var u=l.from(),d=l.to(),y=Math.max(a,u.line);a=Math.min(this.lastLine(),d.line-(d.ch?0:1))+1;for(var E=y;E<a;++E)Si(this,E,n);var K=this.doc.sel.ranges;u.ch==0&&i.length==K.length&&K[o].from().ch>0&&ja(this.doc,o,new Tt(u,K[o].to()),le)}}}),getTokenAt:function(n,i){return Ai(this,n,i)},getLineTokens:function(n,i){return Ai(this,_e(n),i,!0)},getTokenTypeAt:function(n){n=ft(this.doc,n);var i=Qn(this,Ze(this.doc,n.line)),a=0,o=(i.length-1)/2,l=n.ch,u;if(l==0)u=i[2];else for(;;){var d=a+o>>1;if((d?i[d*2-1]:0)>=l)o=d;else if(i[d*2+1]<l)a=d+1;else{u=i[d*2+2];break}}var y=u?u.indexOf("overlay "):-1;return y<0?u:y==0?null:u.slice(0,y-1)},getModeAt:function(n){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(n).state).mode:i},getHelper:function(n,i){return this.getHelpers(n,i)[0]},getHelpers:function(n,i){var a=[];if(!r.hasOwnProperty(i))return a;var o=r[i],l=this.getModeAt(n);if(typeof l[i]=="string")o[l[i]]&&a.push(o[l[i]]);else if(l[i])for(var u=0;u<l[i].length;u++){var d=o[l[i][u]];d&&a.push(d)}else l.helperType&&o[l.helperType]?a.push(o[l.helperType]):o[l.name]&&a.push(o[l.name]);for(var y=0;y<o._global.length;y++){var E=o._global[y];E.pred(l,this)&&H(a,E.val)==-1&&a.push(E.val)}return a},getStateAfter:function(n,i){var a=this.doc;return n=br(a,n==null?a.first+a.size-1:n),yn(this,n+1,i).state},cursorCoords:function(n,i){var a,o=this.doc.sel.primary();return n==null?a=o.head:typeof n=="object"?a=ft(this.doc,n):a=n?o.from():o.to(),kn(this,a,i||"page")},charCoords:function(n,i){return ma(this,ft(this.doc,n),i||"page")},coordsChar:function(n,i){return n=lo(this,n,i||"page"),va(this,n.left,n.top)},lineAtHeight:function(n,i){return n=lo(this,{top:n,left:0},i||"page").top,bn(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,a){var o=!1,l;if(typeof n=="number"){var u=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>u&&(n=u,o=!0),l=Ze(this.doc,n)}else l=n;return Ii(this,l,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-Cn(l):0)},defaultTextHeight:function(){return Tr(this.display)},defaultCharWidth:function(){return Ar(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,a,o,l){var u=this.display;n=kn(this,ft(this.doc,n));var d=n.bottom,y=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),u.sizer.appendChild(i),o=="over")d=n.top;else if(o=="above"||o=="near"){var E=Math.max(u.wrapper.clientHeight,this.doc.height),K=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);(o=="above"||n.bottom+i.offsetHeight>E)&&n.top>i.offsetHeight?d=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=E&&(d=n.bottom),y+i.offsetWidth>K&&(y=K-i.offsetWidth)}i.style.top=d+"px",i.style.left=i.style.right="",l=="right"?(y=u.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(l=="left"?y=0:l=="middle"&&(y=(u.sizer.clientWidth-i.offsetWidth)/2),i.style.left=y+"px"),a&&qs(this,{left:y,top:d,right:y+i.offsetWidth,bottom:d+i.offsetHeight})},triggerOnKeyDown:qt(ps),triggerOnKeyPress:qt(gs),triggerOnKeyUp:ms,triggerOnMouseDown:qt(vs),execCommand:function(n){if(wi.hasOwnProperty(n))return wi[n].call(null,this)},triggerElectric:qt(function(n){ks(this,n)}),findPosH:function(n,i,a,o){var l=1;i<0&&(l=-1,i=-i);for(var u=ft(this.doc,n),d=0;d<i&&!(u=Ga(this.doc,u,l,a,o),u.hitSide);++d);return u},moveH:qt(function(n,i){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?Ga(a.doc,o.head,n,i,a.options.rtlMoveVisually):n<0?o.from():o.to()},V)}),deleteH:qt(function(n,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Ir(this,function(l){var u=Ga(o,l.head,n,i,!1);return n<0?{from:u,to:l.head}:{from:l.head,to:u}})}),findPosV:function(n,i,a,o){var l=1,u=o;i<0&&(l=-1,i=-i);for(var d=ft(this.doc,n),y=0;y<i;++y){var E=kn(this,d,"div");if(u==null?u=E.left:E.left=u,d=Os(this,E,l,a),d.hitSide)break}return d},moveV:qt(function(n,i){var a=this,o=this.doc,l=[],u=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(y){if(u)return n<0?y.from():y.to();var E=kn(a,y.head,"div");y.goalColumn!=null&&(E.left=y.goalColumn),l.push(E.left);var K=Os(a,E,n,i);return i=="page"&&y==o.sel.primary()&&Sa(a,ma(a,K,"div").top-E.top),K},V),l.length)for(var d=0;d<o.sel.ranges.length;d++)o.sel.ranges[d].goalColumn=l[d]}),findWordAt:function(n){var i=this.doc,a=Ze(i,n.line).text,o=n.ch,l=n.ch;if(a){var u=this.getHelper(n,"wordChars");(n.sticky=="before"||l==a.length)&&o?--o:++l;for(var d=a.charAt(o),y=Ee(d,u)?function(E){return Ee(E,u)}:/\s/.test(d)?function(E){return/\s/.test(E)}:function(E){return!/\s/.test(E)&&!Ee(E)};o>0&&y(a.charAt(o-1));)--o;for(;l<a.length&&y(a.charAt(l));)++l}return new Tt(_e(n.line,o),_e(n.line,l))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?j(this.display.cursorDiv,"CodeMirror-overwrite"):ge(this.display.cursorDiv,"CodeMirror-overwrite"),he(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==ee()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:qt(function(n,i){oi(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Ln(this)-this.display.barHeight,width:n.scrollWidth-Ln(this)-this.display.barWidth,clientHeight:fa(this),clientWidth:ir(this)}},scrollIntoView:qt(function(n,i){n==null?(n={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof n=="number"?n={from:_e(n,0),to:null}:n.from==null&&(n={from:n,to:null}),n.to||(n.to=n.from),n.margin=i||0,n.from.line!=null?Js(this,n):xo(this,n.from,n.to,n.margin)}),setSize:qt(function(n,i){var a=this,o=function(u){return typeof u=="number"||/^\d+$/.test(String(u))?u+"px":u};n!=null&&(this.display.wrapper.style.width=o(n)),i!=null&&(this.display.wrapper.style.height=o(i)),this.options.lineWrapping&&ao(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(u){if(u.widgets){for(var d=0;d<u.widgets.length;d++)if(u.widgets[d].noHScroll){Xn(a,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,he(this,"refresh",this)}),operation:function(n){return ln(this,n)},startOperation:function(){return cr(this)},endOperation:function(){return dr(this)},refresh:qt(function(){var n=this.display.cachedTextHeight;tn(this),this.curOp.forceUpdate=!0,ii(this),oi(this,this.doc.scrollLeft,this.doc.scrollTop),Oa(this.display),(n==null||Math.abs(n-Tr(this.display))>.5||this.options.lineWrapping)&&wa(this),he(this,"refresh",this)}),swapDoc:qt(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),No(this,n),ii(this),this.display.input.reset(),oi(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Xt(this,"swapDoc",this,i),i}),phrase:function(n){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:n},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},L(e),e.registerHelper=function(n,i,a){r.hasOwnProperty(n)||(r[n]=e[n]={_global:[]}),r[n][i]=a},e.registerGlobalHelper=function(n,i,a,o){e.registerHelper(n,i,o),r[n]._global.push({pred:a,val:o})}}function Ga(e,t,r,n,i){var a=t,o=r,l=Ze(e,t.line),u=i&&e.direction=="rtl"?-r:r;function d(){var Be=t.line+u;return Be<e.first||Be>=e.first+e.size?!1:(t=new _e(Be,t.ch,t.sticky),l=Ze(e,Be))}function y(Be){var ze;if(n=="codepoint"){var qe=l.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(qe)?ze=null:ze=new _e(t.line,Math.max(0,Math.min(l.text.length,t.ch+r*(qe>=55296&&qe<56320?2:1))),-r)}else i?ze=Nl(e.cm,l,t,r):ze=Ua(l,t,r);if(ze==null)if(!Be&&d())t=Fa(i,e.cm,l,t.line,u);else return!1;else t=ze;return!0}if(n=="char"||n=="codepoint")y();else if(n=="column")y(!0);else if(n=="word"||n=="group")for(var E=null,K=n=="group",z=e.cm&&e.cm.getHelper(t,"wordChars"),de=!0;!(r<0&&!y(!de));de=!1){var Ce=l.text.charAt(t.ch)||`
|
|
`,Ne=Ee(Ce,z)?"w":K&&Ce==`
|
|
`?"n":!K||/\s/.test(Ce)?null:"p";if(K&&!de&&!Ne&&(Ne="s"),E&&E!=Ne){r<0&&(r=1,y(),t.sticky="after");break}if(Ne&&(E=Ne),r>0&&!y(!de))break}var He=Yi(e,t,a,o,!0);return Xr(a,He)&&(He.hitSide=!0),He}function Os(e,t,r,n){var i=e.doc,a=t.left,o;if(n=="page"){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*Tr(e.display),3);o=(r>0?t.bottom:t.top)+r*u}else n=="line"&&(o=r>0?t.bottom+3:t.top-3);for(var d;!(d=va(e,a,o),!d.outside);){if(r<0?o<=0:o>=i.height){d.hitSide=!0;break}o+=r*5}return d}var At=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new A,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};At.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;Ts(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(l){for(var u=l.target;u;u=u.parentNode){if(u==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(u.className))break}return!1}fe(i,"paste",function(l){if(!a(l)||Oe(n,l)||Cs(l,n))return;W<=11&&setTimeout(Ht(n,function(){return t.updateFromDOM()}),20)}),fe(i,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),fe(i,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),fe(i,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),fe(i,"touchstart",function(){return r.forceCompositionEnd()}),fe(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(l){if(!a(l)||Oe(n,l))return;if(n.somethingSelected())ta({lineWise:!1,text:n.getSelections()}),l.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var u=Ss(n);ta({lineWise:!0,text:u.text}),l.type=="cut"&&n.operation(function(){n.setSelections(u.ranges,0,le),n.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var d=Tn.text.join(`
|
|
`);if(l.clipboardData.setData("Text",d),l.clipboardData.getData("Text")==d){l.preventDefault();return}}var y=As(),E=y.firstChild;n.display.lineSpace.insertBefore(y,n.display.lineSpace.firstChild),E.value=Tn.text.join(`
|
|
`);var K=document.activeElement;k(E),setTimeout(function(){n.display.lineSpace.removeChild(y),K.focus(),K==i&&r.showPrimarySelection()},50)}fe(i,"copy",o),fe(i,"cut",o)},At.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},At.prototype.prepareSelection=function(){var e=mo(this.cm,!1);return e.focus=document.activeElement==this.div,e},At.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},At.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},At.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),n=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||n.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var a=na(t,e.anchorNode,e.anchorOffset),o=na(t,e.focusNode,e.focusOffset);if(a&&!a.bad&&o&&!o.bad&&ut(Zn(a,o),n)==0&&ut(vr(a,o),i)==0)return;var l=t.display.view,u=n.line>=t.display.viewFrom&&Ls(t,n)||{node:l[0].measure.map[2],offset:0},d=i.line<t.display.viewTo&&Ls(t,i);if(!d){var y=l[l.length-1].measure,E=y.maps?y.maps[y.maps.length-1]:y.map;d={node:E[E.length-1],offset:E[E.length-2]-E[E.length-3]}}if(!u||!d){e.removeAllRanges();return}var K=e.rangeCount&&e.getRangeAt(0),z;try{z=F(u.node,u.offset,d.offset,d.node)}catch(de){}z&&(!se&&t.state.focused?(e.collapse(u.node,u.offset),z.collapsed||(e.removeAllRanges(),e.addRange(z))):(e.removeAllRanges(),e.addRange(z)),K&&e.anchorNode==null?e.addRange(K):se&&this.startGracePeriod()),this.rememberSelection()},At.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},At.prototype.showMultipleSelections=function(e){ae(this.cm.display.cursorDiv,e.cursors),ae(this.cm.display.selectionDiv,e.selection)},At.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},At.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return x(this.div,t)},At.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},At.prototype.blur=function(){this.div.blur()},At.prototype.getField=function(){return this.div},At.prototype.supportsTouch=function(){return!0},At.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():ln(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.polling.set(this.cm.options.pollInterval,t)},At.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},At.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(I&&D&&this.cm.display.gutterSpecs.length&&eu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var r=na(t,e.anchorNode,e.anchorOffset),n=na(t,e.focusNode,e.focusOffset);r&&n&&ln(t,function(){Vt(t.doc,Kn(r,n),le),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},At.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(n.ch==0&&n.line>e.firstLine()&&(n=_e(n.line-1,Ze(e.doc,n.line-1).length)),i.ch==Ze(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=_e(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,l;n.line==t.viewFrom||(a=sr(e,n.line))==0?(o=Ct(t.view[0].line),l=t.view[0].node):(o=Ct(t.view[a].line),l=t.view[a-1].node.nextSibling);var u=sr(e,i.line),d,y;if(u==t.view.length-1?(d=t.viewTo-1,y=t.lineDiv.lastChild):(d=Ct(t.view[u+1].line)-1,y=t.view[u+1].node.previousSibling),!l)return!1;for(var E=e.doc.splitLines(tu(e,l,y,o,d)),K=Dn(e.doc,_e(o,0),_e(d,Ze(e.doc,d).text.length));E.length>1&&K.length>1;)if(h(E)==h(K))E.pop(),K.pop(),d--;else if(E[0]==K[0])E.shift(),K.shift(),o++;else break;for(var z=0,de=0,Ce=E[0],Ne=K[0],He=Math.min(Ce.length,Ne.length);z<He&&Ce.charCodeAt(z)==Ne.charCodeAt(z);)++z;for(var Be=h(E),ze=h(K),qe=Math.min(Be.length-(E.length==1?z:0),ze.length-(K.length==1?z:0));de<qe&&Be.charCodeAt(Be.length-de-1)==ze.charCodeAt(ze.length-de-1);)++de;if(E.length==1&&K.length==1&&o==n.line)for(;z&&z>n.ch&&Be.charCodeAt(Be.length-de-1)==ze.charCodeAt(ze.length-de-1);)z--,de++;E[E.length-1]=Be.slice(0,Be.length-de).replace(/^\u200b+/,""),E[0]=E[0].slice(z).replace(/\u200b+$/,"");var lt=_e(o,z),at=_e(d,K.length?h(K).length-de:0);if(E.length>1||E[0]||ut(lt,at))return Nr(e.doc,E,lt,at,"+input"),!0},At.prototype.ensurePolled=function(){this.forceCompositionEnd()},At.prototype.reset=function(){this.forceCompositionEnd()},At.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},At.prototype.readFromDOMSoon=function(){var e=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80)},At.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&ln(this.cm,function(){return tn(e.cm)})},At.prototype.setUneditable=function(e){e.contentEditable="false"},At.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Ht(this.cm,Xa)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},At.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},At.prototype.onContextMenu=function(){},At.prototype.resetPosition=function(){},At.prototype.needsContentAttribute=!0;function Ls(e,t){var r=ha(e,t.line);if(!r||r.hidden)return null;var n=Ze(e.doc,t.line),i=eo(r,n,t.line),a=tt(n,e.doc.direction),o="left";if(a){var l=Ve(a,t.ch);o=l%2?"right":"left"}var u=ro(i.map,t.ch,o);return u.offset=u.collapse=="right"?u.end:u.start,u}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Fr(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,i){var a="",o=!1,l=e.doc.lineSeparator(),u=!1;function d(z){return function(de){return de.id==z}}function y(){o&&(a+=l,u&&(a+=l),o=u=!1)}function E(z){z&&(y(),a+=z)}function K(z){if(z.nodeType==1){var de=z.getAttribute("cm-text");if(de){E(de);return}var Ce=z.getAttribute("cm-marker"),Ne;if(Ce){var He=e.findMarks(_e(n,0),_e(i+1,0),d(+Ce));He.length&&(Ne=He[0].find(0))&&E(Dn(e.doc,Ne.from,Ne.to).join(l));return}if(z.getAttribute("contenteditable")=="false")return;var Be=/^(pre|div|p|li|table|br)$/i.test(z.nodeName);if(!/^br$/i.test(z.nodeName)&&z.textContent.length==0)return;Be&&y();for(var ze=0;ze<z.childNodes.length;ze++)K(z.childNodes[ze]);/^(pre|p)$/i.test(z.nodeName)&&(u=!0),Be&&(o=!0)}else z.nodeType==3&&E(z.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(K(t),t==r);)t=t.nextSibling,u=!1;return a}function na(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Fr(e.clipPos(_e(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==n)return nu(a,t,r)}}function nu(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!x(n,t))return Fr(_e(Ct(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var a=e.rest?h(e.rest):e.line;return Fr(_e(Ct(a),a.text.length),i)}var o=t.nodeType==3?t:null,l=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,r&&(r=o.nodeValue.length));l.parentNode!=n;)l=l.parentNode;var u=e.measure,d=u.maps;function y(Ne,He,Be){for(var ze=-1;ze<(d?d.length:0);ze++)for(var qe=ze<0?u.map:d[ze],lt=0;lt<qe.length;lt+=3){var at=qe[lt+2];if(at==Ne||at==He){var pt=Ct(ze<0?e.line:e.rest[ze]),_t=qe[lt]+Be;return(Be<0||at!=Ne)&&(_t=qe[lt+(Be?1:0)]),_e(pt,_t)}}}var E=y(o,l,r);if(E)return Fr(E,i);for(var K=l.nextSibling,z=o?o.nodeValue.length-r:0;K;K=K.nextSibling){if(E=y(K,K.firstChild,0),E)return Fr(_e(E.line,E.ch-z),i);z+=K.textContent.length}for(var de=l.previousSibling,Ce=r;de;de=de.previousSibling){if(E=y(de,de.firstChild,-1),E)return Fr(_e(E.line,E.ch+Ce),i);Ce+=de.textContent.length}}var Pt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new A,this.hasSelection=!1,this.composing=null};Pt.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),B&&(i.style.width="0px"),fe(i,"input",function(){M&&W>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),fe(i,"paste",function(o){if(Oe(n,o)||Cs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(Oe(n,o))return;if(n.somethingSelected())ta({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var l=Ss(n);ta({lineWise:!0,text:l.text}),o.type=="cut"?n.setSelections(l.ranges,null,le):(r.prevInput="",i.value=l.text.join(`
|
|
`),k(i))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}fe(i,"cut",a),fe(i,"copy",a),fe(e.scroller,"paste",function(o){if(Fn(e,o)||Oe(n,o))return;if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var l=new Event("paste");l.clipboardData=o.clipboardData,i.dispatchEvent(l)}),fe(e.lineSpace,"selectstart",function(o){Fn(e,o)||f(o)}),fe(i,"compositionstart",function(){var o=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:o,range:n.markText(o,n.getCursor("to"),{className:"CodeMirror-composing"})}}),fe(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Pt.prototype.createField=function(e){this.wrapper=As(),this.textarea=this.wrapper.firstChild},Pt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Pt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=mo(e);if(e.options.moveInputWithCursor){var i=kn(e,r.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return n},Pt.prototype.showSelection=function(e){var t=this.cm,r=t.display;ae(r.cursorDiv,e.cursors),ae(r.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Pt.prototype.reset=function(e){if(this.contextMenuPending||this.composing)return;var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&k(this.textarea),M&&W>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",M&&W>=9&&(this.hasSelection=null))},Pt.prototype.getField=function(){return this.textarea},Pt.prototype.supportsTouch=function(){return!1},Pt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!oe||ee()!=this.textarea))try{this.textarea.focus()}catch(e){}},Pt.prototype.blur=function(){this.textarea.blur()},Pt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Pt.prototype.receivedFocus=function(){this.slowPoll()},Pt.prototype.slowPoll=function(){var e=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Pt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function r(){var n=t.poll();!n&&!e?(e=!0,t.polling.set(60,r)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,r)},Pt.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||it(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(M&&W>=9&&this.hasSelection===i||ce&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!n&&(n="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,l=Math.min(n.length,i.length);o<l&&n.charCodeAt(o)==i.charCodeAt(o);)++o;return ln(t,function(){Xa(t,i.slice(o),n.length-o,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
|
`)>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Pt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Pt.prototype.onKeyPress=function(){M&&W>=9&&(this.hasSelection=null),this.fastPoll()},Pt.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=or(r,e),o=n.scroller.scrollTop;if(!a||S)return;var l=r.options.resetSelectionOnContextMenu;l&&r.doc.sel.contains(a)==-1&&Ht(r,Vt)(r.doc,Kn(a),le);var u=i.style.cssText,d=t.wrapper.style.cssText,y=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-y.top-5)+"px; left: "+(e.clientX-y.left-5)+`px;
|
|
z-index: 1000; background: `+(M?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var E;Z&&(E=window.scrollY),n.input.focus(),Z&&window.scrollTo(null,E),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=z,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function K(){if(i.selectionStart!=null){var Ce=r.somethingSelected(),Ne="\u200B"+(Ce?i.value:"");i.value="\u21DA",i.value=Ne,t.prevInput=Ce?"":"\u200B",i.selectionStart=1,i.selectionEnd=Ne.length,n.selForContextMenu=r.doc.sel}}function z(){if(t.contextMenuPending!=z)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=u,M&&W<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!M||M&&W<9)&&K();var Ce=0,Ne=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Ht(r,Vo)(r):Ce++<10?n.detectingSelectAll=setTimeout(Ne,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(Ne,200)}}if(M&&W>=9&&K(),We){w(e);var de=function(){$e(window,"mouseup",de),setTimeout(z,20)};fe(window,"mouseup",de)}else setTimeout(z,50)},Pt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Pt.prototype.setUneditable=function(){},Pt.prototype.needsContentAttribute=!1;function ru(e,t){if(t=t?s(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var r=ee();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=l.getValue()}var i;if(e.form&&(fe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){n(),a.submit=i,a.submit(),a.submit=o}}catch(u){}}t.finishInit=function(u){u.save=n,u.getTextArea=function(){return e},u.toTextArea=function(){u.toTextArea=isNaN,n(),e.parentNode.removeChild(u.getWrapperElement()),e.style.display="",e.form&&($e(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var l=Rt(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return l}function iu(e){e.off=$e,e.on=fe,e.wheelEventPixels=dl,e.Doc=nn,e.splitLines=dt,e.countColumn=m,e.findColumn=$,e.isWordChar=ue,e.Pass=Ae,e.signal=he,e.Line=rr,e.changeEnd=Vn,e.scrollbarModel=Co,e.Pos=_e,e.cmpPos=ut,e.modes=Ot,e.mimeModes=vt,e.resolveMode=cn,e.getMode=vn,e.modeExtensions=pn,e.extendMode=ia,e.copyState=An,e.startState=Br,e.innerMode=Wr,e.commands=wi,e.keyMap=Hn,e.keyName=us,e.isModifierKey=ss,e.lookupKey=jr,e.normalizeKeyMap=Dl,e.StringStream=Dt,e.SharedTextMarker=bi,e.TextMarker=Yn,e.LineWidget=vi,e.e_preventDefault=f,e.e_stopPropagation=p,e.e_stop=w,e.addClass=j,e.contains=x,e.rmClass=ge,e.keyNames=qn}Yl(Rt),Ql(Rt);var au="iter insert remove copy getEditor constructor".split(" ");for(var ra in nn.prototype)nn.prototype.hasOwnProperty(ra)&&H(au,ra)<0&&(Rt.prototype[ra]=function(e){return function(){return e.apply(this.doc,arguments)}}(nn.prototype[ra]));return L(nn),Rt.inputStyles={textarea:Pt,contenteditable:At},Rt.defineMode=function(e){!Rt.defaults.mode&&e!="null"&&(Rt.defaults.mode=e),sn.apply(this,arguments)},Rt.defineMIME=Mn,Rt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Rt.defineMIME("text/plain","null"),Rt.defineExtension=function(e,t){Rt.prototype[e]=t},Rt.defineDocExtension=function(e,t){nn.prototype[e]=t},Rt.fromTextArea=ru,iu(Rt),Rt.version="5.58.2",Rt})},Y1PL:function(ht,nt,_){"use strict";var G=_("wx14"),xe=_("1OyB"),se=_("vuIU"),Le=_("Ji7U"),we=_("LK+K"),q=_("cDcd"),M=_("VTBJ"),W=_("rePB"),Z=_("Zm9Q"),X=_("Kwbf"),D=_("c+Xe"),S=_("m+aA"),be=_("bdgK"),Q=new Map;function U(le){le.forEach(function(te){var V,$=te.target;(V=Q.get($))===null||V===void 0||V.forEach(function(N){return N($)})})}var B=new be.default(U),I=null,oe=null;function ce(le,te){Q.has(le)||(Q.set(le,new Set),B.observe(le)),Q.get(le).add(te)}function Te(le,te){Q.has(le)&&(Q.get(le).delete(te),Q.get(le).size||(B.unobserve(le),Q.delete(le)))}var Xe=function(le){Object(Le.a)(V,le);var te=Object(we.a)(V);function V(){return Object(xe.a)(this,V),te.apply(this,arguments)}return Object(se.a)(V,[{key:"render",value:function(){return this.props.children}}]),V}(q.Component),Ie=q.createContext(null);function Re(le){var te=le.children,V=le.onBatchResize,$=q.useRef(0),N=q.useRef([]),J=q.useContext(Ie),h=q.useCallback(function(C,g,re){$.current+=1;var ve=$.current;N.current.push({size:C,element:g,data:re}),Promise.resolve().then(function(){ve===$.current&&(V==null||V(N.current),N.current=[])}),J==null||J(C,g,re)},[V,J]);return q.createElement(Ie.Provider,{value:h},te)}function We(le){var te=le.children,V=le.disabled,$=q.useRef(null),N=q.useRef(null),J=q.useContext(Ie),h=q.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),C=q.isValidElement(te)&&Object(D.c)(te),g=C?te.ref:null,re=q.useMemo(function(){return Object(D.a)(g,$)},[g,$]),ve=q.useRef(le);ve.current=le;var Y=q.useCallback(function(ue){var Ee=ve.current,je=Ee.onResize,Me=Ee.data,ke=ue.getBoundingClientRect(),Se=ke.width,et=ke.height,Ge=ue.offsetWidth,Ke=ue.offsetHeight,Ve=Math.floor(Se),st=Math.floor(et);if(h.current.width!==Ve||h.current.height!==st||h.current.offsetWidth!==Ge||h.current.offsetHeight!==Ke){var tt={width:Ve,height:st,offsetWidth:Ge,offsetHeight:Ke};h.current=tt;var Je=Ge===Math.round(Se)?Se:Ge,fe=Ke===Math.round(et)?et:Ke,rt=Object(M.a)(Object(M.a)({},tt),{},{offsetWidth:Je,offsetHeight:fe});J==null||J(rt,ue,Me),je&&Promise.resolve().then(function(){je(rt,ue)})}},[]);return q.useEffect(function(){var ue=Object(S.a)($.current)||Object(S.a)(N.current);return ue&&!V&&ce(ue,Y),function(){return Te(ue,Y)}},[$.current,V]),q.createElement(Xe,{ref:N},C?q.cloneElement(te,{ref:re}):te)}var me="rc-observer-key";function ge(le){var te=le.children,V=Object(Z.a)(te);return V.map(function($,N){var J=($==null?void 0:$.key)||"".concat(me,"-").concat(N);return q.createElement(We,Object(G.a)({},le,{key:J}),$)})}ge.Collection=Re;var Pe=ge,ae=_("bT9E"),b=_("TSYQ"),ne=_.n(b),F=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important
|
|
`,x=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],ee={},j;function O(le){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,V=le.getAttribute("id")||le.getAttribute("data-reactid")||le.getAttribute("name");if(te&&ee[V])return ee[V];var $=window.getComputedStyle(le),N=$.getPropertyValue("box-sizing")||$.getPropertyValue("-moz-box-sizing")||$.getPropertyValue("-webkit-box-sizing"),J=parseFloat($.getPropertyValue("padding-bottom"))+parseFloat($.getPropertyValue("padding-top")),h=parseFloat($.getPropertyValue("border-bottom-width"))+parseFloat($.getPropertyValue("border-top-width")),C=x.map(function(re){return"".concat(re,":").concat($.getPropertyValue(re))}).join(";"),g={sizingStyle:C,paddingSize:J,borderSize:h,boxSizing:N};return te&&V&&(ee[V]=g),g}function k(le){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,$=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;j||(j=document.createElement("textarea"),j.setAttribute("tab-index","-1"),j.setAttribute("aria-hidden","true"),document.body.appendChild(j)),le.getAttribute("wrap")?j.setAttribute("wrap",le.getAttribute("wrap")):j.removeAttribute("wrap");var N=O(le,te),J=N.paddingSize,h=N.borderSize,C=N.boxSizing,g=N.sizingStyle;j.setAttribute("style","".concat(g,";").concat(F)),j.value=le.value||le.placeholder||"";var re=Number.MIN_SAFE_INTEGER,ve=Number.MAX_SAFE_INTEGER,Y=j.scrollHeight,ue;if(C==="border-box"?Y+=h:C==="content-box"&&(Y-=J),V!==null||$!==null){j.value=" ";var Ee=j.scrollHeight-J;V!==null&&(re=Ee*V,C==="border-box"&&(re=re+J+h),Y=Math.max(re,Y)),$!==null&&(ve=Ee*$,C==="border-box"&&(ve=ve+J+h),ue=Y>ve?"":"hidden",Y=Math.min(ve,Y))}return{height:Y,minHeight:re,maxHeight:ve,overflowY:ue,resize:"none"}}var c=_("Gytx"),s=_.n(c),m;(function(le){le[le.NONE=0]="NONE",le[le.RESIZING=1]="RESIZING",le[le.RESIZED=2]="RESIZED"})(m||(m={}));var A=function(le){Object(Le.a)(V,le);var te=Object(we.a)(V);function V($){var N;return Object(xe.a)(this,V),N=te.call(this,$),N.nextFrameActionId=void 0,N.resizeFrameId=void 0,N.textArea=void 0,N.saveTextArea=function(J){N.textArea=J},N.handleResize=function(J){var h=N.state.resizeStatus,C=N.props,g=C.autoSize,re=C.onResize;if(h!==m.NONE)return;typeof re=="function"&&re(J),g&&N.resizeOnNextFrame()},N.resizeOnNextFrame=function(){cancelAnimationFrame(N.nextFrameActionId),N.nextFrameActionId=requestAnimationFrame(N.resizeTextarea)},N.resizeTextarea=function(){var J=N.props.autoSize;if(!J||!N.textArea)return;var h=J.minRows,C=J.maxRows,g=k(N.textArea,!1,h,C);N.setState({textareaStyles:g,resizeStatus:m.RESIZING},function(){cancelAnimationFrame(N.resizeFrameId),N.resizeFrameId=requestAnimationFrame(function(){N.setState({resizeStatus:m.RESIZED},function(){N.resizeFrameId=requestAnimationFrame(function(){N.setState({resizeStatus:m.NONE}),N.fixFirefoxAutoScroll()})})})})},N.renderTextArea=function(){var J=N.props,h=J.prefixCls,C=h===void 0?"rc-textarea":h,g=J.autoSize,re=J.onResize,ve=J.className,Y=J.disabled,ue=N.state,Ee=ue.textareaStyles,je=ue.resizeStatus,Me=Object(ae.a)(N.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ke=ne()(C,ve,Object(W.a)({},"".concat(C,"-disabled"),Y));"value"in Me&&(Me.value=Me.value||"");var Se=Object(M.a)(Object(M.a)(Object(M.a)({},N.props.style),Ee),je===m.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return q.createElement(Pe,{onResize:N.handleResize,disabled:!(g||re)},q.createElement("textarea",Object(G.a)({},Me,{className:ke,style:Se,ref:N.saveTextArea})))},N.state={textareaStyles:{},resizeStatus:m.NONE},N}return Object(se.a)(V,[{key:"componentDidUpdate",value:function(N){(N.value!==this.props.value||!s()(N.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var N=this.textArea.selectionStart,J=this.textArea.selectionEnd;this.textArea.setSelectionRange(N,J)}}catch(h){}}},{key:"render",value:function(){return this.renderTextArea()}}]),V}(q.Component),H=A,pe=function(le){Object(Le.a)(V,le);var te=Object(we.a)(V);function V($){var N;Object(xe.a)(this,V),N=te.call(this,$),N.resizableTextArea=void 0,N.focus=function(){N.resizableTextArea.textArea.focus()},N.saveTextArea=function(h){N.resizableTextArea=h},N.handleChange=function(h){var C=N.props.onChange;N.setValue(h.target.value,function(){N.resizableTextArea.resizeTextarea()}),C&&C(h)},N.handleKeyDown=function(h){var C=N.props,g=C.onPressEnter,re=C.onKeyDown;h.keyCode===13&&g&&g(h),re&&re(h)};var J=typeof $.value=="undefined"||$.value===null?$.defaultValue:$.value;return N.state={value:J},N}return Object(se.a)(V,[{key:"setValue",value:function(N,J){"value"in this.props||this.setState({value:N},J)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return q.createElement(H,Object(G.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(N){return"value"in N?{value:N.value}:null}}]),V}(q.Component),Ae=nt.a=pe},ZpRC:function(ht,nt,_){"use strict";function G(D){return typeof D=="object"&&D!=null&&D.nodeType===1}function xe(D,S){return(!S||D!=="hidden")&&D!=="visible"&&D!=="clip"}function se(D,S){if(D.clientHeight<D.scrollHeight||D.clientWidth<D.scrollWidth){var be=getComputedStyle(D,null);return xe(be.overflowY,S)||xe(be.overflowX,S)||function(Q){var U=function(B){if(!B.ownerDocument||!B.ownerDocument.defaultView)return null;try{return B.ownerDocument.defaultView.frameElement}catch(I){return null}}(Q);return!!U&&(U.clientHeight<Q.scrollHeight||U.clientWidth<Q.scrollWidth)}(D)}return!1}function Le(D,S,be,Q,U,B,I,oe){return B<D&&I>S||B>D&&I<S?0:B<=D&&oe<=be||I>=S&&oe>=be?B-D-Q:I>S&&oe<be||B<D&&oe>be?I-S+U:0}var we=function(D,S){var be=window,Q=S.scrollMode,U=S.block,B=S.inline,I=S.boundary,oe=S.skipOverflowHiddenElements,ce=typeof I=="function"?I:function(Ee){return Ee!==I};if(!G(D))throw new TypeError("Invalid target");for(var Te=document.scrollingElement||document.documentElement,Xe=[],Ie=D;G(Ie)&&ce(Ie);){if((Ie=Ie.parentElement)===Te){Xe.push(Ie);break}Ie!=null&&Ie===document.body&&se(Ie)&&!se(document.documentElement)||Ie!=null&&se(Ie,oe)&&Xe.push(Ie)}for(var Re=be.visualViewport?be.visualViewport.width:innerWidth,We=be.visualViewport?be.visualViewport.height:innerHeight,me=window.scrollX||pageXOffset,ge=window.scrollY||pageYOffset,Pe=D.getBoundingClientRect(),ae=Pe.height,b=Pe.width,ne=Pe.top,F=Pe.right,x=Pe.bottom,ee=Pe.left,j=U==="start"||U==="nearest"?ne:U==="end"?x:ne+ae/2,O=B==="center"?ee+b/2:B==="end"?F:ee,k=[],c=0;c<Xe.length;c++){var s=Xe[c],m=s.getBoundingClientRect(),A=m.height,H=m.width,pe=m.top,Ae=m.right,le=m.bottom,te=m.left;if(Q==="if-needed"&&ne>=0&&ee>=0&&x<=We&&F<=Re&&ne>=pe&&x<=le&&ee>=te&&F<=Ae)return k;var V=getComputedStyle(s),$=parseInt(V.borderLeftWidth,10),N=parseInt(V.borderTopWidth,10),J=parseInt(V.borderRightWidth,10),h=parseInt(V.borderBottomWidth,10),C=0,g=0,re="offsetWidth"in s?s.offsetWidth-s.clientWidth-$-J:0,ve="offsetHeight"in s?s.offsetHeight-s.clientHeight-N-h:0;if(Te===s)C=U==="start"?j:U==="end"?j-We:U==="nearest"?Le(ge,ge+We,We,N,h,ge+j,ge+j+ae,ae):j-We/2,g=B==="start"?O:B==="center"?O-Re/2:B==="end"?O-Re:Le(me,me+Re,Re,$,J,me+O,me+O+b,b),C=Math.max(0,C+ge),g=Math.max(0,g+me);else{C=U==="start"?j-pe-N:U==="end"?j-le+h+ve:U==="nearest"?Le(pe,le,A,N,h+ve,j,j+ae,ae):j-(pe+A/2)+ve/2,g=B==="start"?O-te-$:B==="center"?O-(te+H/2)+re/2:B==="end"?O-Ae+J+re:Le(te,Ae,H,$,J+re,O,O+b,b);var Y=s.scrollLeft,ue=s.scrollTop;j+=ue-(C=Math.max(0,Math.min(ue+C,s.scrollHeight-A+ve))),O+=Y-(g=Math.max(0,Math.min(Y+g,s.scrollWidth-H+re)))}k.push({el:s,top:C,left:g})}return k};function q(D){return D===Object(D)&&Object.keys(D).length!==0}function M(D,S){S===void 0&&(S="auto");var be="scrollBehavior"in document.body.style;D.forEach(function(Q){var U=Q.el,B=Q.top,I=Q.left;U.scroll&&be?U.scroll({top:B,left:I,behavior:S}):(U.scrollTop=B,U.scrollLeft=I)})}function W(D){return D===!1?{block:"end",inline:"nearest"}:q(D)?D:{block:"start",inline:"nearest"}}function Z(D,S){var be=!D.ownerDocument.documentElement.contains(D);if(q(S)&&typeof S.behavior=="function")return S.behavior(be?[]:we(D,S));if(be)return;var Q=W(S);return M(we(D,Q),Q.behavior)}var X=nt.a=Z},Zss7:function(ht,nt,_){var G;(function(xe){var se=/^\s+/,Le=/\s+$/,we=0,q=xe.round,M=xe.min,W=xe.max,Z=xe.random;function X(h,C){if(h=h||"",C=C||{},h instanceof X)return h;if(!(this instanceof X))return new X(h,C);var g=D(h);this._originalInput=h,this._r=g.r,this._g=g.g,this._b=g.b,this._a=g.a,this._roundA=q(100*this._a)/100,this._format=C.format||g.format,this._gradientType=C.gradientType,this._r<1&&(this._r=q(this._r)),this._g<1&&(this._g=q(this._g)),this._b<1&&(this._b=q(this._b)),this._ok=g.ok,this._tc_id=we++}X.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var h=this.toRgb();return(h.r*299+h.g*587+h.b*114)/1e3},getLuminance:function(){var h=this.toRgb(),C,g,re,ve,Y,ue;return C=h.r/255,g=h.g/255,re=h.b/255,C<=.03928?ve=C/12.92:ve=xe.pow((C+.055)/1.055,2.4),g<=.03928?Y=g/12.92:Y=xe.pow((g+.055)/1.055,2.4),re<=.03928?ue=re/12.92:ue=xe.pow((re+.055)/1.055,2.4),.2126*ve+.7152*Y+.0722*ue},setAlpha:function(h){return this._a=k(h),this._roundA=q(100*this._a)/100,this},toHsv:function(){var h=U(this._r,this._g,this._b);return{h:h.h*360,s:h.s,v:h.v,a:this._a}},toHsvString:function(){var h=U(this._r,this._g,this._b),C=q(h.h*360),g=q(h.s*100),re=q(h.v*100);return this._a==1?"hsv("+C+", "+g+"%, "+re+"%)":"hsva("+C+", "+g+"%, "+re+"%, "+this._roundA+")"},toHsl:function(){var h=be(this._r,this._g,this._b);return{h:h.h*360,s:h.s,l:h.l,a:this._a}},toHslString:function(){var h=be(this._r,this._g,this._b),C=q(h.h*360),g=q(h.s*100),re=q(h.l*100);return this._a==1?"hsl("+C+", "+g+"%, "+re+"%)":"hsla("+C+", "+g+"%, "+re+"%, "+this._roundA+")"},toHex:function(h){return I(this._r,this._g,this._b,h)},toHexString:function(h){return"#"+this.toHex(h)},toHex8:function(h){return oe(this._r,this._g,this._b,this._a,h)},toHex8String:function(h){return"#"+this.toHex8(h)},toRgb:function(){return{r:q(this._r),g:q(this._g),b:q(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+q(this._r)+", "+q(this._g)+", "+q(this._b)+")":"rgba("+q(this._r)+", "+q(this._g)+", "+q(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:q(c(this._r,255)*100)+"%",g:q(c(this._g,255)*100)+"%",b:q(c(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+q(c(this._r,255)*100)+"%, "+q(c(this._g,255)*100)+"%, "+q(c(this._b,255)*100)+"%)":"rgba("+q(c(this._r,255)*100)+"%, "+q(c(this._g,255)*100)+"%, "+q(c(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:j[I(this._r,this._g,this._b,!0)]||!1},toFilter:function(h){var C="#"+ce(this._r,this._g,this._b,this._a),g=C,re=this._gradientType?"GradientType = 1, ":"";if(h){var ve=X(h);g="#"+ce(ve._r,ve._g,ve._b,ve._a)}return"progid:DXImageTransform.Microsoft.gradient("+re+"startColorstr="+C+",endColorstr="+g+")"},toString:function(h){var C=!!h;h=h||this._format;var g=!1,re=this._a<1&&this._a>=0,ve=!C&&re&&(h==="hex"||h==="hex6"||h==="hex3"||h==="hex4"||h==="hex8"||h==="name");return ve?h==="name"&&this._a===0?this.toName():this.toRgbString():(h==="rgb"&&(g=this.toRgbString()),h==="prgb"&&(g=this.toPercentageRgbString()),(h==="hex"||h==="hex6")&&(g=this.toHexString()),h==="hex3"&&(g=this.toHexString(!0)),h==="hex4"&&(g=this.toHex8String(!0)),h==="hex8"&&(g=this.toHex8String()),h==="name"&&(g=this.toName()),h==="hsl"&&(g=this.toHslString()),h==="hsv"&&(g=this.toHsvString()),g||this.toHexString())},clone:function(){return X(this.toString())},_applyModification:function(h,C){var g=h.apply(null,[this].concat([].slice.call(C)));return this._r=g._r,this._g=g._g,this._b=g._b,this.setAlpha(g._a),this},lighten:function(){return this._applyModification(Re,arguments)},brighten:function(){return this._applyModification(We,arguments)},darken:function(){return this._applyModification(me,arguments)},desaturate:function(){return this._applyModification(Te,arguments)},saturate:function(){return this._applyModification(Xe,arguments)},greyscale:function(){return this._applyModification(Ie,arguments)},spin:function(){return this._applyModification(ge,arguments)},_applyCombination:function(h,C){return h.apply(null,[this].concat([].slice.call(C)))},analogous:function(){return this._applyCombination(F,arguments)},complement:function(){return this._applyCombination(Pe,arguments)},monochromatic:function(){return this._applyCombination(x,arguments)},splitcomplement:function(){return this._applyCombination(ne,arguments)},triad:function(){return this._applyCombination(ae,arguments)},tetrad:function(){return this._applyCombination(b,arguments)}},X.fromRatio=function(h,C){if(typeof h=="object"){var g={};for(var re in h)h.hasOwnProperty(re)&&(re==="a"?g[re]=h[re]:g[re]=Ae(h[re]));h=g}return X(h,C)};function D(h){var C={r:0,g:0,b:0},g=1,re=null,ve=null,Y=null,ue=!1,Ee=!1;return typeof h=="string"&&(h=N(h)),typeof h=="object"&&($(h.r)&&$(h.g)&&$(h.b)?(C=S(h.r,h.g,h.b),ue=!0,Ee=String(h.r).substr(-1)==="%"?"prgb":"rgb"):$(h.h)&&$(h.s)&&$(h.v)?(re=Ae(h.s),ve=Ae(h.v),C=B(h.h,re,ve),ue=!0,Ee="hsv"):$(h.h)&&$(h.s)&&$(h.l)&&(re=Ae(h.s),Y=Ae(h.l),C=Q(h.h,re,Y),ue=!0,Ee="hsl"),h.hasOwnProperty("a")&&(g=h.a)),g=k(g),{ok:ue,format:h.format||Ee,r:M(255,W(C.r,0)),g:M(255,W(C.g,0)),b:M(255,W(C.b,0)),a:g}}function S(h,C,g){return{r:c(h,255)*255,g:c(C,255)*255,b:c(g,255)*255}}function be(h,C,g){h=c(h,255),C=c(C,255),g=c(g,255);var re=W(h,C,g),ve=M(h,C,g),Y,ue,Ee=(re+ve)/2;if(re==ve)Y=ue=0;else{var je=re-ve;ue=Ee>.5?je/(2-re-ve):je/(re+ve);switch(re){case h:Y=(C-g)/je+(C<g?6:0);break;case C:Y=(g-h)/je+2;break;case g:Y=(h-C)/je+4;break}Y/=6}return{h:Y,s:ue,l:Ee}}function Q(h,C,g){var re,ve,Y;h=c(h,360),C=c(C,100),g=c(g,100);function ue(Me,ke,Se){return Se<0&&(Se+=1),Se>1&&(Se-=1),Se<1/6?Me+(ke-Me)*6*Se:Se<1/2?ke:Se<2/3?Me+(ke-Me)*(2/3-Se)*6:Me}if(C===0)re=ve=Y=g;else{var Ee=g<.5?g*(1+C):g+C-g*C,je=2*g-Ee;re=ue(je,Ee,h+1/3),ve=ue(je,Ee,h),Y=ue(je,Ee,h-1/3)}return{r:re*255,g:ve*255,b:Y*255}}function U(h,C,g){h=c(h,255),C=c(C,255),g=c(g,255);var re=W(h,C,g),ve=M(h,C,g),Y,ue,Ee=re,je=re-ve;if(ue=re===0?0:je/re,re==ve)Y=0;else{switch(re){case h:Y=(C-g)/je+(C<g?6:0);break;case C:Y=(g-h)/je+2;break;case g:Y=(h-C)/je+4;break}Y/=6}return{h:Y,s:ue,v:Ee}}function B(h,C,g){h=c(h,360)*6,C=c(C,100),g=c(g,100);var re=xe.floor(h),ve=h-re,Y=g*(1-C),ue=g*(1-ve*C),Ee=g*(1-(1-ve)*C),je=re%6,Me=[g,ue,Y,Y,Ee,g][je],ke=[Ee,g,g,ue,Y,Y][je],Se=[Y,Y,Ee,g,g,ue][je];return{r:Me*255,g:ke*255,b:Se*255}}function I(h,C,g,re){var ve=[pe(q(h).toString(16)),pe(q(C).toString(16)),pe(q(g).toString(16))];return re&&ve[0].charAt(0)==ve[0].charAt(1)&&ve[1].charAt(0)==ve[1].charAt(1)&&ve[2].charAt(0)==ve[2].charAt(1)?ve[0].charAt(0)+ve[1].charAt(0)+ve[2].charAt(0):ve.join("")}function oe(h,C,g,re,ve){var Y=[pe(q(h).toString(16)),pe(q(C).toString(16)),pe(q(g).toString(16)),pe(le(re))];return ve&&Y[0].charAt(0)==Y[0].charAt(1)&&Y[1].charAt(0)==Y[1].charAt(1)&&Y[2].charAt(0)==Y[2].charAt(1)&&Y[3].charAt(0)==Y[3].charAt(1)?Y[0].charAt(0)+Y[1].charAt(0)+Y[2].charAt(0)+Y[3].charAt(0):Y.join("")}function ce(h,C,g,re){var ve=[pe(le(re)),pe(q(h).toString(16)),pe(q(C).toString(16)),pe(q(g).toString(16))];return ve.join("")}X.equals=function(h,C){return!h||!C?!1:X(h).toRgbString()==X(C).toRgbString()},X.random=function(){return X.fromRatio({r:Z(),g:Z(),b:Z()})};function Te(h,C){C=C===0?0:C||10;var g=X(h).toHsl();return g.s-=C/100,g.s=s(g.s),X(g)}function Xe(h,C){C=C===0?0:C||10;var g=X(h).toHsl();return g.s+=C/100,g.s=s(g.s),X(g)}function Ie(h){return X(h).desaturate(100)}function Re(h,C){C=C===0?0:C||10;var g=X(h).toHsl();return g.l+=C/100,g.l=s(g.l),X(g)}function We(h,C){C=C===0?0:C||10;var g=X(h).toRgb();return g.r=W(0,M(255,g.r-q(255*-(C/100)))),g.g=W(0,M(255,g.g-q(255*-(C/100)))),g.b=W(0,M(255,g.b-q(255*-(C/100)))),X(g)}function me(h,C){C=C===0?0:C||10;var g=X(h).toHsl();return g.l-=C/100,g.l=s(g.l),X(g)}function ge(h,C){var g=X(h).toHsl(),re=(g.h+C)%360;return g.h=re<0?360+re:re,X(g)}function Pe(h){var C=X(h).toHsl();return C.h=(C.h+180)%360,X(C)}function ae(h){var C=X(h).toHsl(),g=C.h;return[X(h),X({h:(g+120)%360,s:C.s,l:C.l}),X({h:(g+240)%360,s:C.s,l:C.l})]}function b(h){var C=X(h).toHsl(),g=C.h;return[X(h),X({h:(g+90)%360,s:C.s,l:C.l}),X({h:(g+180)%360,s:C.s,l:C.l}),X({h:(g+270)%360,s:C.s,l:C.l})]}function ne(h){var C=X(h).toHsl(),g=C.h;return[X(h),X({h:(g+72)%360,s:C.s,l:C.l}),X({h:(g+216)%360,s:C.s,l:C.l})]}function F(h,C,g){C=C||6,g=g||30;var re=X(h).toHsl(),ve=360/g,Y=[X(h)];for(re.h=(re.h-(ve*C>>1)+720)%360;--C;)re.h=(re.h+ve)%360,Y.push(X(re));return Y}function x(h,C){C=C||6;for(var g=X(h).toHsv(),re=g.h,ve=g.s,Y=g.v,ue=[],Ee=1/C;C--;)ue.push(X({h:re,s:ve,v:Y})),Y=(Y+Ee)%1;return ue}X.mix=function(h,C,g){g=g===0?0:g||50;var re=X(h).toRgb(),ve=X(C).toRgb(),Y=g/100,ue={r:(ve.r-re.r)*Y+re.r,g:(ve.g-re.g)*Y+re.g,b:(ve.b-re.b)*Y+re.b,a:(ve.a-re.a)*Y+re.a};return X(ue)},X.readability=function(h,C){var g=X(h),re=X(C);return(xe.max(g.getLuminance(),re.getLuminance())+.05)/(xe.min(g.getLuminance(),re.getLuminance())+.05)},X.isReadable=function(h,C,g){var re=X.readability(h,C),ve,Y;Y=!1,ve=J(g);switch(ve.level+ve.size){case"AAsmall":case"AAAlarge":Y=re>=4.5;break;case"AAlarge":Y=re>=3;break;case"AAAsmall":Y=re>=7;break}return Y},X.mostReadable=function(h,C,g){var re=null,ve=0,Y,ue,Ee,je;g=g||{},ue=g.includeFallbackColors,Ee=g.level,je=g.size;for(var Me=0;Me<C.length;Me++)Y=X.readability(h,C[Me]),Y>ve&&(ve=Y,re=X(C[Me]));return X.isReadable(h,re,{level:Ee,size:je})||!ue?re:(g.includeFallbackColors=!1,X.mostReadable(h,["#fff","#000"],g))};var ee=X.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},j=X.hexNames=O(ee);function O(h){var C={};for(var g in h)h.hasOwnProperty(g)&&(C[h[g]]=g);return C}function k(h){return h=parseFloat(h),(isNaN(h)||h<0||h>1)&&(h=1),h}function c(h,C){A(h)&&(h="100%");var g=H(h);return h=M(C,W(0,parseFloat(h))),g&&(h=parseInt(h*C,10)/100),xe.abs(h-C)<1e-6?1:h%C/parseFloat(C)}function s(h){return M(1,W(0,h))}function m(h){return parseInt(h,16)}function A(h){return typeof h=="string"&&h.indexOf(".")!=-1&&parseFloat(h)===1}function H(h){return typeof h=="string"&&h.indexOf("%")!=-1}function pe(h){return h.length==1?"0"+h:""+h}function Ae(h){return h<=1&&(h=h*100+"%"),h}function le(h){return xe.round(parseFloat(h)*255).toString(16)}function te(h){return m(h)/255}var V=function(){var h="[-\\+]?\\d+%?",C="[-\\+]?\\d*\\.\\d+%?",g="(?:"+C+")|(?:"+h+")",re="[\\s|\\(]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")\\s*\\)?",ve="[\\s|\\(]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")[,|\\s]+("+g+")\\s*\\)?";return{CSS_UNIT:new RegExp(g),rgb:new RegExp("rgb"+re),rgba:new RegExp("rgba"+ve),hsl:new RegExp("hsl"+re),hsla:new RegExp("hsla"+ve),hsv:new RegExp("hsv"+re),hsva:new RegExp("hsva"+ve),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function $(h){return!!V.CSS_UNIT.exec(h)}function N(h){h=h.replace(se,"").replace(Le,"").toLowerCase();var C=!1;if(ee[h])h=ee[h],C=!0;else if(h=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var g;return(g=V.rgb.exec(h))?{r:g[1],g:g[2],b:g[3]}:(g=V.rgba.exec(h))?{r:g[1],g:g[2],b:g[3],a:g[4]}:(g=V.hsl.exec(h))?{h:g[1],s:g[2],l:g[3]}:(g=V.hsla.exec(h))?{h:g[1],s:g[2],l:g[3],a:g[4]}:(g=V.hsv.exec(h))?{h:g[1],s:g[2],v:g[3]}:(g=V.hsva.exec(h))?{h:g[1],s:g[2],v:g[3],a:g[4]}:(g=V.hex8.exec(h))?{r:m(g[1]),g:m(g[2]),b:m(g[3]),a:te(g[4]),format:C?"name":"hex8"}:(g=V.hex6.exec(h))?{r:m(g[1]),g:m(g[2]),b:m(g[3]),format:C?"name":"hex"}:(g=V.hex4.exec(h))?{r:m(g[1]+""+g[1]),g:m(g[2]+""+g[2]),b:m(g[3]+""+g[3]),a:te(g[4]+""+g[4]),format:C?"name":"hex8"}:(g=V.hex3.exec(h))?{r:m(g[1]+""+g[1]),g:m(g[2]+""+g[2]),b:m(g[3]+""+g[3]),format:C?"name":"hex"}:!1}function J(h){var C,g;return h=h||{level:"AA",size:"small"},C=(h.level||"AA").toUpperCase(),g=(h.size||"small").toLowerCase(),C!=="AA"&&C!=="AAA"&&(C="AA"),g!=="small"&&g!=="large"&&(g="small"),{level:C,size:g}}ht.exports?ht.exports=X:!(G=function(){return X}.call(nt,_,nt,ht),G!==void 0&&(ht.exports=G))})(Math)},bT9E:function(ht,nt,_){"use strict";_.d(nt,"a",function(){return xe});var G=_("VTBJ");function xe(se,Le){var we=Object(G.a)({},se);return Array.isArray(Le)&&Le.forEach(function(q){delete we[q]}),we}},c5Ni:function(ht,nt,_){},dejd:function(ht,nt,_){},dmUQ:function(ht,nt,_){"use strict";var G=_("Ff2n"),xe=_("rePB"),se=_("1OyB"),Le=_("vuIU"),we=_("Ji7U"),q=_("md7G"),M=_("foSv"),W=_("cDcd"),Z=_.n(W),X=_("TSYQ"),D=_.n(X),S=_("4IlW");function be(ae,b){var ne=Object.keys(ae);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(ae);b&&(F=F.filter(function(x){return Object.getOwnPropertyDescriptor(ae,x).enumerable})),ne.push.apply(ne,F)}return ne}function Q(ae){for(var b=1;b<arguments.length;b++){var ne=arguments[b]!=null?arguments[b]:{};b%2?be(Object(ne),!0).forEach(function(F){Object(xe.a)(ae,F,ne[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ae,Object.getOwnPropertyDescriptors(ne)):be(Object(ne)).forEach(function(F){Object.defineProperty(ae,F,Object.getOwnPropertyDescriptor(ne,F))})}return ae}function U(ae){var b=B();return function(){var F=Object(M.a)(ae),x;if(b){var ee=Object(M.a)(this).constructor;x=Reflect.construct(F,arguments,ee)}else x=F.apply(this,arguments);return Object(q.a)(this,x)}}function B(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(ae){return!1}}function I(){}function oe(ae){ae.preventDefault()}var ce=function(b){return b.replace(/[^\w.-]+/g,"")},Te=200,Xe=600,Ie=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,Re=function(b){return b!=null},We=function(b,ne){return ne===b||typeof ne=="number"&&typeof b=="number"&&isNaN(ne)&&isNaN(b)},me=function(ae){Object(we.a)(ne,ae);var b=U(ne);function ne(F){var x;Object(se.a)(this,ne),x=b.call(this,F),x.onKeyDown=function(O){var k=x.props,c=k.onKeyDown,s=k.onPressEnter;if(O.keyCode===S.a.UP){var m=x.getRatio(O);x.up(O,m,null),x.stop()}else if(O.keyCode===S.a.DOWN){var A=x.getRatio(O);x.down(O,A,null),x.stop()}else O.keyCode===S.a.ENTER&&s&&s(O);if(x.recordCursorPosition(),x.lastKeyCode=O.keyCode,c){for(var H=arguments.length,pe=new Array(H>1?H-1:0),Ae=1;Ae<H;Ae++)pe[Ae-1]=arguments[Ae];c.apply(void 0,[O].concat(pe))}},x.onKeyUp=function(O){var k=x.props.onKeyUp;if(x.stop(),x.recordCursorPosition(),k){for(var c=arguments.length,s=new Array(c>1?c-1:0),m=1;m<c;m++)s[m-1]=arguments[m];k.apply(void 0,[O].concat(s))}},x.onChange=function(O){var k=x.props.onChange;x.state.focused&&(x.inputting=!0),x.rawInput=x.props.parser(x.getValueFromEvent(O)),x.setState({inputValue:x.rawInput}),k(x.toNumber(x.rawInput))},x.onMouseUp=function(){var O=x.props.onMouseUp;x.recordCursorPosition(),O&&O.apply(void 0,arguments)},x.onFocus=function(){var O;x.setState({focused:!0}),(O=x.props).onFocus.apply(O,arguments)},x.onBlur=function(){var O=x.props.onBlur;x.inputting=!1,x.setState({focused:!1});var k=x.getCurrentValidValue(x.state.inputValue),c=x.setValue(k,I);if(O){var s=x.input.value,m=x.getInputDisplayValue({focus:!1,value:c});x.input.value=m&&Number(m),O.apply(void 0,arguments),x.input.value=s}},x.getRatio=function(O){var k=1;return O.metaKey||O.ctrlKey?k=.1:O.shiftKey&&(k=10),k},x.getFullNum=function(O){return isNaN(O)?O:/e/i.test(String(O))?Number(O).toFixed(18).replace(/\.?0+$/,""):O},x.getPrecision=function(O){if(Re(x.props.precision))return x.props.precision;var k=String(O);if(k.indexOf("e-")>=0)return parseInt(k.slice(k.indexOf("e-")+2),10);var c=0;return k.indexOf(".")>=0&&(c=k.length-k.indexOf(".")-1),c},x.getInputDisplayValue=function(O){var k=O||x.state,c=k.focused,s=k.inputValue,m=k.value,A;c?A=s:A=x.toPrecisionAsStep(m),A==null&&(A="");var H=x.formatWrapper(A);return Re(x.props.decimalSeparator)&&(H=H.toString().replace(".",x.props.decimalSeparator)),H},x.recordCursorPosition=function(){try{x.cursorStart=x.input.selectionStart,x.cursorEnd=x.input.selectionEnd,x.currentValue=x.input.value,x.cursorBefore=x.input.value.substring(0,x.cursorStart),x.cursorAfter=x.input.value.substring(x.cursorEnd)}catch(O){}},x.restoreByAfter=function(O){if(O===void 0)return!1;var k=x.input.value,c=k.lastIndexOf(O);if(c===-1)return!1;var s=x.cursorBefore.length;return x.lastKeyCode===S.a.DELETE&&x.cursorBefore.charAt(s-1)===O[0]?(x.fixCaret(s,s),!0):c+O.length===k.length?(x.fixCaret(c,c),!0):!1},x.partRestoreByAfter=function(O){return O===void 0?!1:Array.prototype.some.call(O,function(k,c){var s=O.substring(c);return x.restoreByAfter(s)})},x.isNotCompleteNumber=function(O){return isNaN(O)||O===""||O===null||O&&O.toString().indexOf(".")===O.toString().length-1},x.stop=function(){x.autoStepTimer&&clearTimeout(x.autoStepTimer)},x.down=function(O,k,c){x.pressingUpOrDown=!0,x.step("down",O,k,c)},x.up=function(O,k,c){x.pressingUpOrDown=!0,x.step("up",O,k,c)},x.saveInput=function(O){x.input=O};var ee=F.value;ee===void 0&&(ee=F.defaultValue),x.state={focused:F.autoFocus};var j=x.getValidValue(x.toNumber(ee));return x.state=Q(Q({},x.state),{},{inputValue:x.toPrecisionAsStep(j),value:j}),x}return Object(Le.a)(ne,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(x){var ee=this.props,j=ee.value,O=ee.onChange,k=ee.max,c=ee.min,s=this.state.focused;if(x){if(!We(x.value,j)||!We(x.max,k)||!We(x.min,c)){var m=s?j:this.getValidValue(j),A;this.pressingUpOrDown?A=m:this.inputting?A=this.rawInput:A=this.toPrecisionAsStep(m),this.setState({value:m,inputValue:A})}var H="value"in this.props?j:this.state.value;"max"in this.props&&x.max!==k&&typeof H=="number"&&H>k&&O&&O(k),"min"in this.props&&x.min!==c&&typeof H=="number"&&H<c&&O&&O(c)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var pe=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===S.a.BACKSPACE?pe=this.cursorStart-1:this.lastKeyCode===S.a.DELETE&&(pe=this.cursorStart):pe=this.input.value.length,this.fixCaret(pe,pe)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case S.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case S.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Ae){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(x){var ee=x;return ee===""?ee="":this.isNotCompleteNumber(parseFloat(ee))?ee=this.state.value:ee=this.getValidValue(ee),this.toNumber(ee)}},{key:"getValueFromEvent",value:function(x){var ee=x.target.value.trim().replace(/。/g,".");return Re(this.props.decimalSeparator)&&(ee=ee.replace(this.props.decimalSeparator,".")),ee}},{key:"getValidValue",value:function(x){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,O=parseFloat(x);return isNaN(O)?x:(O<ee&&(O=ee),O>j&&(O=j),O)}},{key:"setValue",value:function(x,ee){var j=this.props.precision,O=this.isNotCompleteNumber(parseFloat(x))?null:parseFloat(x),k=this.state.value,c=k===void 0?null:k,s=this.state.inputValue,m=s===void 0?null:s,A=typeof O=="number"?O.toFixed(j):"".concat(O),H=O!==c||A!=="".concat(m);return"value"in this.props?(m=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:m},ee)):this.setState({value:O,inputValue:this.toPrecisionAsStep(x)},ee),H&&this.props.onChange(O),O}},{key:"getMaxPrecision",value:function(x){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,j=this.props,O=j.precision,k=j.step;if(Re(O))return O;var c=this.getPrecision(ee),s=this.getPrecision(k),m=this.getPrecision(x);return x?Math.max(m,c+s):c+s}},{key:"getPrecisionFactor",value:function(x){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,j=this.getMaxPrecision(x,ee);return Math.pow(10,j)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(x){return this.props.formatter?this.props.formatter(x):x}},{key:"toPrecisionAsStep",value:function(x){if(this.isNotCompleteNumber(x)||x==="")return x;var ee=Math.abs(this.getMaxPrecision(x));return isNaN(ee)?x.toString():Number(x).toFixed(ee)}},{key:"toNumber",value:function(x){var ee=this.props.precision,j=this.state.focused,O=x&&x.length>16&&j;return this.isNotCompleteNumber(x)||O?x:Re(ee)?Math.round(x*Math.pow(10,ee))/Math.pow(10,ee):Number(x)}},{key:"upStep",value:function(x,ee){var j=this.props.step,O=this.getPrecisionFactor(x,ee),k=Math.abs(this.getMaxPrecision(x,ee)),c=((O*x+O*j*ee)/O).toFixed(k);return this.toNumber(c)}},{key:"downStep",value:function(x,ee){var j=this.props.step,O=this.getPrecisionFactor(x,ee),k=Math.abs(this.getMaxPrecision(x,ee)),c=((O*x-O*j*ee)/O).toFixed(k);return this.toNumber(c)}},{key:"step",value:function(x,ee){var j=this,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,k=arguments.length>3?arguments[3]:void 0;this.stop(),ee&&(ee.persist(),ee.preventDefault());var c=this.props;if(c.disabled)return;var s=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(s))return;var m=this["".concat(x,"Step")](s,O),A=m>c.max||m<c.min;if(m>c.max?m=c.max:m<c.min&&(m=c.min),this.setValue(m,null),this.setState({focused:!0},function(){j.pressingUpOrDown=!1}),A)return;this.autoStepTimer=setTimeout(function(){j[x](ee,O,!0)},k?Te:Xe)}},{key:"fixCaret",value:function(x,ee){if(x===void 0||ee===void 0||!this.input||!this.input.value)return;try{var j=this.input.selectionStart,O=this.input.selectionEnd;(x!==j||ee!==O)&&this.input.setSelectionRange(x,ee)}catch(k){}}},{key:"render",value:function(){var x,ee=this.props,j=ee.prefixCls,O=ee.disabled,k=ee.readOnly,c=ee.useTouch,s=ee.autoComplete,m=ee.upHandler,A=ee.downHandler,H=ee.className,pe=ee.max,Ae=ee.min,le=ee.style,te=ee.title,V=ee.onMouseEnter,$=ee.onMouseLeave,N=ee.onMouseOver,J=ee.onMouseOut,h=ee.required,C=ee.onClick,g=ee.tabIndex,re=ee.type,ve=ee.placeholder,Y=ee.id,ue=ee.inputMode,Ee=ee.pattern,je=ee.step,Me=ee.maxLength,ke=ee.autoFocus,Se=ee.name,et=ee.onPaste,Ge=ee.onInput,Ke=Object(G.a)(ee,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),Ve=this.state,st=Ve.value,tt=Ve.focused,Je=D()(j,(x={},Object(xe.a)(x,H,!!H),Object(xe.a)(x,"".concat(j,"-disabled"),O),Object(xe.a)(x,"".concat(j,"-focused"),tt),x)),fe={};Object.keys(Ke).forEach(function(w){(w.substr(0,5)==="data-"||w.substr(0,5)==="aria-"||w==="role")&&(fe[w]=Ke[w])});var rt=!k&&!O,$e=this.getInputDisplayValue(null),he=(st||st===0)&&(isNaN(st)||Number(st)>=pe),Oe=(st||st===0)&&(isNaN(st)||Number(st)<=Ae),P=he||O||k,T=Oe||O||k,L=D()("".concat(j,"-handler"),"".concat(j,"-handler-up"),Object(xe.a)({},"".concat(j,"-handler-up-disabled"),P)),f=D()("".concat(j,"-handler"),"".concat(j,"-handler-down"),Object(xe.a)({},"".concat(j,"-handler-down-disabled"),T)),p=c?{onTouchStart:P?I:this.up,onTouchEnd:this.stop}:{onMouseDown:P?I:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},v=c?{onTouchStart:T?I:this.down,onTouchEnd:this.stop}:{onMouseDown:T?I:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return Z.a.createElement("div",{className:Je,style:le,title:te,onMouseEnter:V,onMouseLeave:$,onMouseOver:N,onMouseOut:J,onFocus:function(){return null},onBlur:function(){return null}},Z.a.createElement("div",{className:"".concat(j,"-handler-wrap")},Z.a.createElement("span",Object.assign({unselectable:"on"},p,{role:"button","aria-label":"Increase Value","aria-disabled":P,className:L}),m||Z.a.createElement("span",{unselectable:"on",className:"".concat(j,"-handler-up-inner"),onClick:oe})),Z.a.createElement("span",Object.assign({unselectable:"on"},v,{role:"button","aria-label":"Decrease Value","aria-disabled":T,className:f}),A||Z.a.createElement("span",{unselectable:"on",className:"".concat(j,"-handler-down-inner"),onClick:oe}))),Z.a.createElement("div",{className:"".concat(j,"-input-wrap")},Z.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ae,"aria-valuemax":pe,"aria-valuenow":st,required:h,type:re,placeholder:ve,onPaste:et,onClick:C,onMouseUp:this.onMouseUp,className:"".concat(j,"-input"),tabIndex:g,autoComplete:s,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:rt?this.onKeyDown:I,onKeyUp:rt?this.onKeyUp:I,autoFocus:ke,maxLength:Me,readOnly:k,disabled:O,max:pe,min:Ae,step:je,name:Se,title:te,id:Y,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum($e),pattern:Ee,inputMode:ue,onInput:Ge},fe))))}}]),ne}(Z.a.Component);me.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:Ie,min:-Ie,step:1,style:{},onChange:I,onKeyDown:I,onPressEnter:I,onFocus:I,onBlur:I,parser:ce,required:!1,autoComplete:"off"};var ge=me,Pe=nt.a=ge},gkVt:function(ht,nt,_){"use strict";_.r(nt);var G=_("DZo9"),xe=_("8z0m"),se=_("+L6B"),Le=_("2/Rp"),we=_("miYZ"),q=_("tsqr"),M=_("9og8"),W=_("tJVT"),Z=_("WmNS"),X=_.n(Z),D=_("cDcd"),S=_.n(D),be=_("5NDa"),Q=_("5rEg"),U=_("Ot1p"),B=_("ErOA");function I(ae){var b=ae.setIscreate,ne=ae.init,F=ae.UpdateItem,x=Object(D.useState)(""),ee=Object(W.a)(x,2),j=ee[0],O=ee[1],k=Object(D.useState)(""),c=Object(W.a)(k,2),s=c[0],m=c[1];Object(D.useEffect)(function(){if(!F)return;O(F&&F.name),m(F&&F.description)},[F]);function A(){return H.apply(this,arguments)}function H(){return H=Object(M.a)(X.a.mark(function le(){var te;return X.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:if(j){$.next=3;break}return q.b.info("\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A"),$.abrupt("return");case 3:if(s){$.next=6;break}return q.b.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),$.abrupt("return");case 6:if(!F){$.next=9;break}return pe(),$.abrupt("return");case 9:return $.next=11,Object(B.a)("/api/hpc_courses.json",{method:"post",body:{name:j,description:s,container_type:window.location.pathname.split("/")[1]}});case 11:te=$.sent,te&&(q.b.info("\u521B\u5EFA\u6210\u529F"),b(!1),ne("add"));case 13:case"end":return $.stop()}},le)})),H.apply(this,arguments)}function pe(){return Ae.apply(this,arguments)}function Ae(){return Ae=Object(M.a)(X.a.mark(function le(){var te;return X.a.wrap(function($){for(;;)switch($.prev=$.next){case 0:return $.next=2,Object(B.a)("/api/hpc_courses/".concat(F.id,".json"),{method:"put",body:{name:j,description:s,container_type:window.location.pathname.split("/")[1]}});case 2:te=$.sent,te&&(q.b.info("\u7F16\u8F91\u6210\u529F"),b(!1),ne(""));case 4:case"end":return $.stop()}},le)})),Ae.apply(this,arguments)}return S.a.createElement("div",null,S.a.createElement(Q.a,{style:{marginBottom:"20px"},placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:j,maxLength:60,addonAfter:String(j.length)+"/60",onChange:function(te){return O(te.target.value)}}),S.a.createElement(U.a,{id:"courseContentMD",defaultValue:s,onChange:function(te){return m(te)}}),S.a.createElement("div",{className:"clearfix mt30 mb30"},S.a.createElement(Le.a,{type:"primary",onClick:function(){return A()},className:"defalutSubmitbtn fl mr20"},"\u63D0\u4EA4"),S.a.createElement("a",{className:"defalutCancelbtn fl",onClick:function(){return b(!1)}},"\u53D6\u6D88")))}var oe=I,ce=_("9Bee");function Te(ae){var b=ae.CourseItem,ne=ae.userId,F=ae.init,x=ae.ItemUpdate,ee=ae.setSee,j=ae.UserInfo;function O(){return k.apply(this,arguments)}function k(){return k=Object(M.a)(X.a.mark(function s(){var m;return X.a.wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.next=2,Object(B.a)("/api/hpc_courses/".concat(b.id,".json"),{method:"delete"});case 2:m=H.sent,m&&(q.b.info("\u5220\u9664\u6210\u529F"),F("delete"),ee(!1));case 4:case"end":return H.stop()}},s)})),k.apply(this,arguments)}function c(){x(b)}return S.a.createElement("div",null,ne===299635||ne===301458||j!=null&&j.admin||j!=null&&j.business?S.a.createElement("div",{style:{textAlign:"right"}},S.a.createElement(Le.a,{onClick:function(){return c()}},"\u7F16\u8F91"),S.a.createElement(Le.a,{onClick:function(){return O()},style:{marginLeft:"30px"}},"\u5220\u9664")):null,S.a.createElement("h1",null,b==null?void 0:b.name),S.a.createElement(ce.a,{value:b==null?void 0:b.description}))}var Xe=Te,Ie=_("9ivq"),Re=_("m3rI"),We=_("Ty5D"),me=_("9kvl");function ge(ae){var b,ne,F,x,ee,j,O,k,c,s=ae.user,m=ae.dispatch,A=Object(D.useState)(1),H=Object(W.a)(A,2),pe=H[0],Ae=H[1],le=Object(D.useState)(100),te=Object(W.a)(le,2),V=te[0],$=te[1],N=Object(D.useState)([]),J=Object(W.a)(N,2),h=J[0],C=J[1],g=Object(D.useState)(!1),re=Object(W.a)(g,2),ve=re[0],Y=re[1],ue=Object(D.useState)(!1),Ee=Object(W.a)(ue,2),je=Ee[0],Me=Ee[1],ke=Object(D.useState)(""),Se=Object(W.a)(ke,2),et=Se[0],Ge=Se[1],Ke=Object(D.useState)(""),Ve=Object(W.a)(Ke,2),st=Ve[0],tt=Ve[1],Je=Object(D.useState)(""),fe=Object(W.a)(Je,2),rt=fe[0],$e=fe[1],he=Object(We.i)(),Oe=he.itemname,P=Object(D.useState)(""),T=Object(W.a)(P,2),L=T[0],f=T[1];Object(D.useEffect)(function(){m({type:"globalSetting/headerToggle",payload:!1}),pe&&p("")},[pe]);function p(Ue){return v.apply(this,arguments)}function v(){return v=Object(M.a)(X.a.mark(function Ue(Ye){var Fe,yt,dt,it,kt;return X.a.wrap(function(Et){for(;;)switch(Et.prev=Et.next){case 0:return Et.next=2,Object(B.a)("/api/hpc_courses.json",{method:"get",params:{page:pe,per_page:V,container_type:window.location.pathname.split("/")[1]}});case 2:if(Fe=Et.sent,!Fe){Et.next=24;break}if(yt=Fe.data.hpc_courses.length,C(Fe.data.hpc_courses),$e(Fe.data.file_url),tt(""),yt){Et.next=10;break}return Et.abrupt("return");case 10:if(L){Et.next=14;break}Oe?(kt=0,Fe==null||((dt=Fe.data)===null||dt===void 0||((it=dt.hpc_courses)===null||it===void 0))||it.map(function(Ot,vt){var sn;(Oe==null?void 0:Oe.toLocaleLowerCase())===(Ot==null||((sn=Ot.name)===null||sn===void 0)?void 0:sn.toLocaleLowerCase())&&(kt=vt)}),Ge(Fe.data.hpc_courses[kt]),Me(!0),f(Fe.data.hpc_courses[kt].id),(Oe==null?void 0:Oe.toLocaleLowerCase())==="resources"&&(Ge(Fe.data.hpc_courses.filter(function(Ot){return Ot.id===15})[0]),Me(!0),f(15))):(Ge(Fe.data.hpc_courses[0]),Me(!0),f(Fe.data.hpc_courses[0].id)),Et.next=24;break;case 14:if(!(Ye==="delete")){Et.next=23;break}if(!(yt===0)){Et.next=18;break}return Me(!1),Et.abrupt("return");case 18:Ge(Fe.data.hpc_courses[0]),Me(!0),f(Fe.data.hpc_courses[0].id),Et.next=24;break;case 23:Ye==="add"?(Ge(Fe.data.hpc_courses[yt-1]),Me(!0),f(Fe.data.hpc_courses[yt-1].id)):(Ge(Fe.data.hpc_courses.filter(function(Ot){return Ot.id===L})[0]),Me(!0),f(L));case 24:case"end":return Et.stop()}},Ue)})),v.apply(this,arguments)}function w(Ue){Y(!1),Me(!0),Ge(Ue),f(Ue.id)}function R(Ue){tt(Ue),Y(!0),Me(!1)}function ie(){tt(""),Y(!0),Me(!1)}var ye={name:"file",multiple:!0,action:"https://www.educoder.net/api/hpc_courses/upload_file.json",data:{container_type:window.location.pathname.split("/")[1]},onChange:function(Ye){var Fe=Ye.file.status;Fe!=="uploading",Fe==="done"?(q.b.success("".concat(Ye.file.name," \u6587\u4EF6\u4E0A\u4F20\u6210\u529F")),p("")):Fe==="error"&&q.b.error("".concat(Ye.file.name," \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25"))},beforeUpload:function(Ye){var Fe=Ye.size/1024/1024<150;return Fe||q.b.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),Fe}};return S.a.createElement("div",{style:{marginBottom:"40px"}},S.a.createElement("div",{className:"bannterdiv",style:{background:"url(".concat(Re.a.IMG_SERVER+"/".concat(rt),")")}}),S.a.createElement("img",{style:{width:"100%"},src:Re.a.IMG_SERVER+"/".concat(rt)}),S.a.createElement("div",{className:"edu-container minH500",style:{display:"flex",width:"1200px"}},S.a.createElement("div",{style:{flex:"1",marginTop:"17px"}},h&&h.map(function(Ue,Ye){return S.a.createElement("p",{key:Ye,onClick:function(){return w(Ue)},className:L===Ue.id?"menuitemselect":"menuitem task-hide"},Ue.name)}),(s==null||((b=s.userInfo)===null||b===void 0)?void 0:b.user_id)===299635||(s==null||((ne=s.userInfo)===null||ne===void 0)?void 0:ne.user_id)===301458||s!=null&&(F=s.userInfo)!==null&&F!==void 0&&F.admin||s!=null&&(x=s.userInfo)!==null&&x!==void 0&&x.business?S.a.createElement("p",{onClick:function(){return ie()},className:"menuadd",style:{fontSize:"24px",paddingLeft:"10px"}},S.a.createElement("span",{style:{fontSize:"16px",marginLeft:"5px"}},"Last updated")):null),S.a.createElement("div",{className:"rightcount",style:{flex:"6",background:"#ffffff",padding:"20px",marginLeft:"30px",marginTop:"24px"}},ve?S.a.createElement(oe,{UpdateItem:st,setIscreate:Y,init:p}):null,je?S.a.createElement(Xe,{UserInfo:s==null?void 0:s.userInfo,setSee:Me,userId:s==null||((ee=s.userInfo)===null||ee===void 0)?void 0:ee.user_id,ItemUpdate:R,CourseItem:et,init:p}):null)),(s==null||((j=s.userInfo)===null||j===void 0)?void 0:j.user_id)===299635||(s==null||((O=s.userInfo)===null||O===void 0)?void 0:O.user_id)===301458||s!=null&&(k=s.userInfo)!==null&&k!==void 0&&k.admin||s!=null&&(c=s.userInfo)!==null&&c!==void 0&&c.business?S.a.createElement(xe.a,ye,S.a.createElement(Le.a,{className:"menuadd",style:{paddingLeft:"10px",marginLeft:"20px"}},"\u4E0A\u4F20\u9996\u9875\u56FE\u7247")):null)}var Pe=nt.default=Object(me.a)(function(ae){var b=ae.user;return{user:b}})(ge)},h78n:function(ht,nt,_){"use strict";_.d(nt,"a",function(){return x});var G=_("cDcd"),xe=_.n(G),se=_("TSYQ"),Le=_.n(se),we={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},q=function(O){var k=O.map(function(){return Object(G.useRef)()}),c=Object(G.useRef)();return Object(G.useEffect)(function(){var s=Date.now(),m=!1;Object.keys(k).forEach(function(A){var H=k[A].current;if(!H)return;m=!0;var pe=H.style;pe.transitionDuration=".3s, .3s, .3s, .06s",c.current&&s-c.current<100&&(pe.transitionDuration="0s, 0s")}),m&&(c.current=Date.now())}),[k]};function M(){return M=Object.assign||function(j){for(var O=1;O<arguments.length;O++){var k=arguments[O];for(var c in k)Object.prototype.hasOwnProperty.call(k,c)&&(j[c]=k[c])}return j},M.apply(this,arguments)}function W(j,O){return be(j)||S(j,O)||X(j,O)||Z()}function Z(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X(j,O){if(!j)return;if(typeof j=="string")return D(j,O);var k=Object.prototype.toString.call(j).slice(8,-1);if(k==="Object"&&j.constructor&&(k=j.constructor.name),k==="Map"||k==="Set")return Array.from(j);if(k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k))return D(j,O)}function D(j,O){(O==null||O>j.length)&&(O=j.length);for(var k=0,c=new Array(O);k<O;k++)c[k]=j[k];return c}function S(j,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(j)))return;var k=[],c=!0,s=!1,m=void 0;try{for(var A=j[Symbol.iterator](),H;!(c=(H=A.next()).done)&&!(k.push(H.value),O&&k.length===O);c=!0);}catch(pe){s=!0,m=pe}finally{try{!c&&A.return!=null&&A.return()}finally{if(s)throw m}}return k}function be(j){if(Array.isArray(j))return j}function Q(j,O){if(j==null)return{};var k=U(j,O),c,s;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(j);for(s=0;s<m.length;s++){if(c=m[s],O.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(j,c))continue;k[c]=j[c]}}return k}function U(j,O){if(j==null)return{};var k={},c=Object.keys(j),s,m;for(m=0;m<c.length;m++){if(s=c[m],O.indexOf(s)>=0)continue;k[s]=j[s]}return k}var B=function(O){var k=O.className,c=O.percent,s=O.prefixCls,m=O.strokeColor,A=O.strokeLinecap,H=O.strokeWidth,pe=O.style,Ae=O.trailColor,le=O.trailWidth,te=O.transition,V=Q(O,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete V.gapPosition;var $=Array.isArray(c)?c:[c],N=Array.isArray(m)?m:[m],J=q($),h=W(J,1),C=h[0],g=H/2,re=100-H/2,ve="M ".concat(A==="round"?g:0,",").concat(g,`
|
|
L `).concat(A==="round"?re:100,",").concat(g),Y="0 0 100 ".concat(H),ue=0;return xe.a.createElement("svg",M({className:Le()("".concat(s,"-line"),k),viewBox:Y,preserveAspectRatio:"none",style:pe},V),xe.a.createElement("path",{className:"".concat(s,"-line-trail"),d:ve,strokeLinecap:A,stroke:Ae,strokeWidth:le||H,fillOpacity:"0"}),$.map(function(Ee,je){var Me={strokeDasharray:"".concat(Ee,"px, 100px"),strokeDashoffset:"-".concat(ue,"px"),transition:te||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ke=N[je]||N[N.length-1];return ue+=Ee,xe.a.createElement("path",{key:je,className:"".concat(s,"-line-path"),d:ve,strokeLinecap:A,stroke:ke,strokeWidth:H,fillOpacity:"0",ref:C[je],style:Me})}))};B.defaultProps=we;var I=B;function oe(){return oe=Object.assign||function(j){for(var O=1;O<arguments.length;O++){var k=arguments[O];for(var c in k)Object.prototype.hasOwnProperty.call(k,c)&&(j[c]=k[c])}return j},oe.apply(this,arguments)}function ce(j,O){return We(j)||Re(j,O)||Xe(j,O)||Te()}function Te(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xe(j,O){if(!j)return;if(typeof j=="string")return Ie(j,O);var k=Object.prototype.toString.call(j).slice(8,-1);if(k==="Object"&&j.constructor&&(k=j.constructor.name),k==="Map"||k==="Set")return Array.from(j);if(k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k))return Ie(j,O)}function Ie(j,O){(O==null||O>j.length)&&(O=j.length);for(var k=0,c=new Array(O);k<O;k++)c[k]=j[k];return c}function Re(j,O){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(j)))return;var k=[],c=!0,s=!1,m=void 0;try{for(var A=j[Symbol.iterator](),H;!(c=(H=A.next()).done)&&!(k.push(H.value),O&&k.length===O);c=!0);}catch(pe){s=!0,m=pe}finally{try{!c&&A.return!=null&&A.return()}finally{if(s)throw m}}return k}function We(j){if(Array.isArray(j))return j}function me(j,O){if(j==null)return{};var k=ge(j,O),c,s;if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(j);for(s=0;s<m.length;s++){if(c=m[s],O.indexOf(c)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(j,c))continue;k[c]=j[c]}}return k}function ge(j,O){if(j==null)return{};var k={},c=Object.keys(j),s,m;for(m=0;m<c.length;m++){if(s=c[m],O.indexOf(s)>=0)continue;k[s]=j[s]}return k}var Pe=0;function ae(j){return+j.replace("%","")}function b(j){return Array.isArray(j)?j:[j]}function ne(j,O,k,c){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,m=arguments.length>5?arguments[5]:void 0,A=50-c/2,H=0,pe=-A,Ae=0,le=-2*A;switch(m){case"left":H=-A,pe=0,Ae=2*A,le=0;break;case"right":H=A,pe=0,Ae=-2*A,le=0;break;case"bottom":pe=A,le=2*A;break;default:}var te="M 50,50 m ".concat(H,",").concat(pe,`
|
|
a `).concat(A,",").concat(A," 0 1 1 ").concat(Ae,",").concat(-le,`
|
|
a `).concat(A,",").concat(A," 0 1 1 ").concat(-Ae,",").concat(le),V=Math.PI*2*A,$={stroke:k,strokeDasharray:"".concat(O/100*(V-s),"px ").concat(V,"px"),strokeDashoffset:"-".concat(s/2+j/100*(V-s),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:te,pathStyle:$}}var F=function(O){var k=O.prefixCls,c=O.strokeWidth,s=O.trailWidth,m=O.gapDegree,A=O.gapPosition,H=O.trailColor,pe=O.strokeLinecap,Ae=O.style,le=O.className,te=O.strokeColor,V=O.percent,$=me(O,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),N=Object(G.useMemo)(function(){return Pe+=1,Pe},[]),J=ne(0,100,H,c,m,A),h=J.pathString,C=J.pathStyle,g=b(V),re=b(te),ve=re.find(function(Me){return Object.prototype.toString.call(Me)==="[object Object]"}),Y=q(g),ue=ce(Y,1),Ee=ue[0],je=function(){var ke=0;return g.map(function(Se,et){var Ge=re[et]||re[re.length-1],Ke=Object.prototype.toString.call(Ge)==="[object Object]"?"url(#".concat(k,"-gradient-").concat(N,")"):"",Ve=ne(ke,Se,Ge,c,m,A);return ke+=Se,xe.a.createElement("path",{key:et,className:"".concat(k,"-circle-path"),d:Ve.pathString,stroke:Ke,strokeLinecap:pe,strokeWidth:c,opacity:Se===0?0:1,fillOpacity:"0",style:Ve.pathStyle,ref:Ee[et]})})};return xe.a.createElement("svg",oe({className:Le()("".concat(k,"-circle"),le),viewBox:"0 0 100 100",style:Ae},$),ve&&xe.a.createElement("defs",null,xe.a.createElement("linearGradient",{id:"".concat(k,"-gradient-").concat(N),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(ve).sort(function(Me,ke){return ae(Me)-ae(ke)}).map(function(Me,ke){return xe.a.createElement("stop",{key:ke,offset:Me,stopColor:ve[Me]})}))),xe.a.createElement("path",{className:"".concat(k,"-circle-trail"),d:h,stroke:H,strokeLinecap:pe,strokeWidth:s||c,fillOpacity:"0",style:C}),je().reverse())};F.defaultProps=we;var x=F,ee={Line:I,Circle:x}},kSUc:function(ht,nt,_){},lZu9:function(ht,nt,_){(function(G){G(_("VrN/"),_("1eCo"),_("8EBN"))})(function(G){"use strict";G.defineMode("markdown",function(xe,se){var Le=G.getMode(xe,"text/html"),we=Le.name=="null";function q(c){if(G.findModeByName){var s=G.findModeByName(c);s&&(c=s.mime||s.mimes[0])}var m=G.getMode(xe,c);return m.name=="null"?null:m}se.highlightFormatting===void 0&&(se.highlightFormatting=!1),se.maxBlockquoteDepth===void 0&&(se.maxBlockquoteDepth=0),se.taskLists===void 0&&(se.taskLists=!1),se.strikethrough===void 0&&(se.strikethrough=!1),se.emoji===void 0&&(se.emoji=!1),se.fencedCodeBlockHighlighting===void 0&&(se.fencedCodeBlockHighlighting=!0),se.fencedCodeBlockDefaultMode===void 0&&(se.fencedCodeBlockDefaultMode="text/plain"),se.xml===void 0&&(se.xml=!0),se.tokenTypeOverrides===void 0&&(se.tokenTypeOverrides={});var M={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var W in M)M.hasOwnProperty(W)&&se.tokenTypeOverrides[W]&&(M[W]=se.tokenTypeOverrides[W]);var Z=/^([*\-_])(?:\s*\1){2,}\s*$/,X=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,D=/^\[(x| )\](?=\s)/i,S=se.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,be=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Q=/^[^#!\[\]*_\\<>` "'(~:]+/,U=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,B=/^\s*\[[^\]]+?\]:.*$/,I=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,oe=" ";function ce(c,s,m){return s.f=s.inline=m,m(c,s)}function Te(c,s,m){return s.f=s.block=m,m(c,s)}function Xe(c){return!c||!/\S/.test(c.string)}function Ie(c){if(c.linkTitle=!1,c.linkHref=!1,c.linkText=!1,c.em=!1,c.strong=!1,c.strikethrough=!1,c.quote=0,c.indentedCode=!1,c.f==We){var s=we;if(!s){var m=G.innerMode(Le,c.htmlState);s=m.mode.name=="xml"&&m.state.tagStart===null&&!m.state.context&&m.state.tokenize.isInText}s&&(c.f=ae,c.block=Re,c.htmlState=null)}return c.trailingSpace=0,c.trailingSpaceNewLine=!1,c.prevLine=c.thisLine,c.thisLine={stream:null},null}function Re(c,s){var m=c.column()===s.indentation,A=Xe(s.prevLine.stream),H=s.indentedCode,pe=s.prevLine.hr,Ae=s.list!==!1,le=(s.listStack[s.listStack.length-1]||0)+3;s.indentedCode=!1;var te=s.indentation;if(s.indentationDiff===null&&(s.indentationDiff=s.indentation,Ae)){for(s.list=null;te<s.listStack[s.listStack.length-1];)s.listStack.pop(),s.listStack.length?s.indentation=s.listStack[s.listStack.length-1]:s.list=!1;s.list!==!1&&(s.indentationDiff=te-s.listStack[s.listStack.length-1])}var V=!A&&!pe&&!s.prevLine.header&&(!Ae||!H)&&!s.prevLine.fencedCodeEnd,$=(s.list===!1||pe||A)&&s.indentation<=le&&c.match(Z),N=null;if(s.indentationDiff>=4&&(H||s.prevLine.fencedCodeEnd||s.prevLine.header||A))return c.skipToEnd(),s.indentedCode=!0,M.code;if(c.eatSpace())return null;if(m&&s.indentation<=le&&(N=c.match(S))&&N[1].length<=6)return s.quote=0,s.header=N[1].length,s.thisLine.header=!0,se.highlightFormatting&&(s.formatting="header"),s.f=s.inline,ge(s);if(s.indentation<=le&&c.eat(">"))return s.quote=m?1:s.quote+1,se.highlightFormatting&&(s.formatting="quote"),c.eatSpace(),ge(s);if(!$&&!s.setext&&m&&s.indentation<=le&&(N=c.match(X))){var J=N[1]?"ol":"ul";return s.indentation=te+c.current().length,s.list=!0,s.quote=0,s.listStack.push(s.indentation),s.em=!1,s.strong=!1,s.code=!1,s.strikethrough=!1,se.taskLists&&c.match(D,!1)&&(s.taskList=!0),s.f=s.inline,se.highlightFormatting&&(s.formatting=["list","list-"+J]),ge(s)}else{if(m&&s.indentation<=le&&(N=c.match(U,!0)))return s.quote=0,s.fencedEndRE=new RegExp(N[1]+"+ *$"),s.localMode=se.fencedCodeBlockHighlighting&&q(N[2]||se.fencedCodeBlockDefaultMode),s.localMode&&(s.localState=G.startState(s.localMode)),s.f=s.block=me,se.highlightFormatting&&(s.formatting="code-block"),s.code=-1,ge(s);if(s.setext||(!V||!Ae)&&!s.quote&&s.list===!1&&!s.code&&!$&&!B.test(c.string)&&(N=c.lookAhead(1))&&(N=N.match(be)))return s.setext?(s.header=s.setext,s.setext=0,c.skipToEnd(),se.highlightFormatting&&(s.formatting="header")):(s.header=N[0].charAt(0)=="="?1:2,s.setext=s.header),s.thisLine.header=!0,s.f=s.inline,ge(s);if($)return c.skipToEnd(),s.hr=!0,s.thisLine.hr=!0,M.hr;if(c.peek()==="[")return ce(c,s,ee)}return ce(c,s,s.inline)}function We(c,s){var m=Le.token(c,s.htmlState);if(!we){var A=G.innerMode(Le,s.htmlState);(A.mode.name=="xml"&&A.state.tagStart===null&&!A.state.context&&A.state.tokenize.isInText||s.md_inside&&c.current().indexOf(">")>-1)&&(s.f=ae,s.block=Re,s.htmlState=null)}return m}function me(c,s){var m=s.listStack[s.listStack.length-1]||0,A=s.indentation<m,H=m+3;if(s.fencedEndRE&&s.indentation<=H&&(A||c.match(s.fencedEndRE))){se.highlightFormatting&&(s.formatting="code-block");var pe;return A||(pe=ge(s)),s.localMode=s.localState=null,s.block=Re,s.f=ae,s.fencedEndRE=null,s.code=0,s.thisLine.fencedCodeEnd=!0,A?Te(c,s,s.block):pe}else return s.localMode?s.localMode.token(c,s.localState):(c.skipToEnd(),M.code)}function ge(c){var s=[];if(c.formatting){s.push(M.formatting),typeof c.formatting=="string"&&(c.formatting=[c.formatting]);for(var m=0;m<c.formatting.length;m++)s.push(M.formatting+"-"+c.formatting[m]),c.formatting[m]==="header"&&s.push(M.formatting+"-"+c.formatting[m]+"-"+c.header),c.formatting[m]==="quote"&&(!se.maxBlockquoteDepth||se.maxBlockquoteDepth>=c.quote?s.push(M.formatting+"-"+c.formatting[m]+"-"+c.quote):s.push("error"))}if(c.taskOpen)return s.push("meta"),s.length?s.join(" "):null;if(c.taskClosed)return s.push("property"),s.length?s.join(" "):null;if(c.linkHref?s.push(M.linkHref,"url"):(c.strong&&s.push(M.strong),c.em&&s.push(M.em),c.strikethrough&&s.push(M.strikethrough),c.emoji&&s.push(M.emoji),c.linkText&&s.push(M.linkText),c.code&&s.push(M.code),c.image&&s.push(M.image),c.imageAltText&&s.push(M.imageAltText,"link"),c.imageMarker&&s.push(M.imageMarker)),c.header&&s.push(M.header,M.header+"-"+c.header),c.quote&&(s.push(M.quote),!se.maxBlockquoteDepth||se.maxBlockquoteDepth>=c.quote?s.push(M.quote+"-"+c.quote):s.push(M.quote+"-"+se.maxBlockquoteDepth)),c.list!==!1){var A=(c.listStack.length-1)%3;A?A===1?s.push(M.list2):s.push(M.list3):s.push(M.list1)}return c.trailingSpaceNewLine?s.push("trailing-space-new-line"):c.trailingSpace&&s.push("trailing-space-"+(c.trailingSpace%2?"a":"b")),s.length?s.join(" "):null}function Pe(c,s){return c.match(Q,!0)?ge(s):void 0}function ae(c,s){var m=s.text(c,s);if(typeof m!="undefined")return m;if(s.list)return s.list=null,ge(s);if(s.taskList){var A=c.match(D,!0)[1]===" ";return A?s.taskOpen=!0:s.taskClosed=!0,se.highlightFormatting&&(s.formatting="task"),s.taskList=!1,ge(s)}if(s.taskOpen=!1,s.taskClosed=!1,s.header&&c.match(/^#+$/,!0))return se.highlightFormatting&&(s.formatting="header"),ge(s);var H=c.next();if(s.linkTitle){s.linkTitle=!1;var pe=H;H==="("&&(pe=")"),pe=(pe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ae="^\\s*(?:[^"+pe+"\\\\]+|\\\\\\\\|\\\\.)"+pe;if(c.match(new RegExp(Ae),!0))return M.linkHref}if(H==="`"){var le=s.formatting;se.highlightFormatting&&(s.formatting="code"),c.eatWhile("`");var te=c.current().length;if(s.code==0&&(!s.quote||te==1))return s.code=te,ge(s);if(te==s.code){var V=ge(s);return s.code=0,V}else return s.formatting=le,ge(s)}else if(s.code)return ge(s);if(H==="\\"&&(c.next(),se.highlightFormatting)){var $=ge(s),N=M.formatting+"-escape";return $?$+" "+N:N}if(H==="!"&&c.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return s.imageMarker=!0,s.image=!0,se.highlightFormatting&&(s.formatting="image"),ge(s);if(H==="["&&s.imageMarker&&c.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return s.imageMarker=!1,s.imageAltText=!0,se.highlightFormatting&&(s.formatting="image"),ge(s);if(H==="]"&&s.imageAltText){se.highlightFormatting&&(s.formatting="image");var $=ge(s);return s.imageAltText=!1,s.image=!1,s.inline=s.f=ne,$}if(H==="["&&!s.image)return s.linkText&&c.match(/^.*?\]/)||(s.linkText=!0,se.highlightFormatting&&(s.formatting="link")),ge(s);if(H==="]"&&s.linkText){se.highlightFormatting&&(s.formatting="link");var $=ge(s);return s.linkText=!1,s.inline=s.f=c.match(/\(.*?\)| ?\[.*?\]/,!1)?ne:ae,$}if(H==="<"&&c.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){s.f=s.inline=b,se.highlightFormatting&&(s.formatting="link");var $=ge(s);return $?$+=" ":$="",$+M.linkInline}if(H==="<"&&c.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){s.f=s.inline=b,se.highlightFormatting&&(s.formatting="link");var $=ge(s);return $?$+=" ":$="",$+M.linkEmail}if(se.xml&&H==="<"&&c.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var J=c.string.indexOf(">",c.pos);if(J!=-1){var h=c.string.substring(c.start,J);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(h)&&(s.md_inside=!0)}return c.backUp(1),s.htmlState=G.startState(Le),Te(c,s,We)}if(se.xml&&H==="<"&&c.match(/^\/\w*?>/))return s.md_inside=!1,"tag";if(H==="*"||H==="_"){for(var C=1,g=c.pos==1?" ":c.string.charAt(c.pos-2);C<3&&c.eat(H);)C++;var re=c.peek()||" ",ve=!/\s/.test(re)&&(!I.test(re)||/\s/.test(g)||I.test(g)),Y=!/\s/.test(g)&&(!I.test(g)||/\s/.test(re)||I.test(re)),ue=null,Ee=null;if(C%2&&(!s.em&&ve&&(H==="*"||!Y||I.test(g))?ue=!0:s.em==H&&Y&&(H==="*"||!ve||I.test(re))&&(ue=!1)),C>1&&(!s.strong&&ve&&(H==="*"||!Y||I.test(g))?Ee=!0:s.strong==H&&Y&&(H==="*"||!ve||I.test(re))&&(Ee=!1)),Ee!=null||ue!=null){se.highlightFormatting&&(s.formatting=ue==null?"strong":Ee==null?"em":"strong em"),ue===!0&&(s.em=H),Ee===!0&&(s.strong=H);var V=ge(s);return ue===!1&&(s.em=!1),Ee===!1&&(s.strong=!1),V}}else if(H===" "&&(c.eat("*")||c.eat("_"))){if(c.peek()===" ")return ge(s);c.backUp(1)}if(se.strikethrough){if(H==="~"&&c.eatWhile(H)){if(s.strikethrough){se.highlightFormatting&&(s.formatting="strikethrough");var V=ge(s);return s.strikethrough=!1,V}else if(c.match(/^[^\s]/,!1))return s.strikethrough=!0,se.highlightFormatting&&(s.formatting="strikethrough"),ge(s)}else if(H===" "&&c.match(/^~~/,!0)){if(c.peek()===" ")return ge(s);c.backUp(2)}}if(se.emoji&&H===":"&&c.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){s.emoji=!0,se.highlightFormatting&&(s.formatting="emoji");var je=ge(s);return s.emoji=!1,je}return H===" "&&(c.match(/^ +$/,!1)?s.trailingSpace++:s.trailingSpace&&(s.trailingSpaceNewLine=!0)),ge(s)}function b(c,s){var m=c.next();if(m===">"){s.f=s.inline=ae,se.highlightFormatting&&(s.formatting="link");var A=ge(s);return A?A+=" ":A="",A+M.linkInline}return c.match(/^[^>]+/,!0),M.linkInline}function ne(c,s){if(c.eatSpace())return null;var m=c.next();return m==="("||m==="["?(s.f=s.inline=x(m==="("?")":"]"),se.highlightFormatting&&(s.formatting="link-string"),s.linkHref=!0,ge(s)):"error"}var F={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function x(c){return function(s,m){var A=s.next();if(A===c){m.f=m.inline=ae,se.highlightFormatting&&(m.formatting="link-string");var H=ge(m);return m.linkHref=!1,H}return s.match(F[c]),m.linkHref=!0,ge(m)}}function ee(c,s){return c.match(/^([^\]\\]|\\.)*\]:/,!1)?(s.f=j,c.next(),se.highlightFormatting&&(s.formatting="link"),s.linkText=!0,ge(s)):ce(c,s,ae)}function j(c,s){if(c.match(/^\]:/,!0)){s.f=s.inline=O,se.highlightFormatting&&(s.formatting="link");var m=ge(s);return s.linkText=!1,m}return c.match(/^([^\]\\]|\\.)+/,!0),M.linkText}function O(c,s){return c.eatSpace()?null:(c.match(/^[^\s]+/,!0),c.peek()===void 0?s.linkTitle=!0:c.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),s.f=s.inline=ae,M.linkHref+" url")}var k={startState:function(){return{f:Re,prevLine:{stream:null},thisLine:{stream:null},block:Re,htmlState:null,indentation:0,inline:ae,text:Pe,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(c){return{f:c.f,prevLine:c.prevLine,thisLine:c.thisLine,block:c.block,htmlState:c.htmlState&&G.copyState(Le,c.htmlState),indentation:c.indentation,localMode:c.localMode,localState:c.localMode?G.copyState(c.localMode,c.localState):null,inline:c.inline,text:c.text,formatting:!1,linkText:c.linkText,linkTitle:c.linkTitle,linkHref:c.linkHref,code:c.code,em:c.em,strong:c.strong,strikethrough:c.strikethrough,emoji:c.emoji,header:c.header,setext:c.setext,hr:c.hr,taskList:c.taskList,list:c.list,listStack:c.listStack.slice(0),quote:c.quote,indentedCode:c.indentedCode,trailingSpace:c.trailingSpace,trailingSpaceNewLine:c.trailingSpaceNewLine,md_inside:c.md_inside,fencedEndRE:c.fencedEndRE}},token:function(c,s){if(s.formatting=!1,c!=s.thisLine.stream){if(s.header=0,s.hr=!1,c.match(/^\s*$/,!0))return Ie(s),null;if(s.prevLine=s.thisLine,s.thisLine={stream:c},s.taskList=!1,s.trailingSpace=0,s.trailingSpaceNewLine=!1,!s.localState&&(s.f=s.block,s.f!=We)){var m=c.match(/^\s*/,!0)[0].replace(/\t/g,oe).length;if(s.indentation=m,s.indentationDiff=null,m>0)return null}}return s.f(c,s)},innerMode:function(c){return c.block==We?{state:c.htmlState,mode:Le}:c.localState?{state:c.localState,mode:c.localMode}:{state:c,mode:k}},indent:function(c,s,m){return c.block==We&&Le.indent?Le.indent(c.htmlState,s,m):c.localState&&c.localMode.indent?c.localMode.indent(c.localState,s,m):G.Pass},blankLine:Ie,getType:ge,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return k},"xml"),G.defineMIME("text/markdown","markdown"),G.defineMIME("text/x-markdown","markdown")})},osHv:function(ht,nt,_){(function(G){G(_("VrN/"))})(function(G){"use strict";var xe=G.Pos;function se(I,oe){return I.line-oe.line||I.ch-oe.ch}var Le="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",we=Le+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",q=new RegExp("<(/?)(["+Le+"]["+we+"]*)","g");function M(I,oe,ce,Te){this.line=oe,this.ch=ce,this.cm=I,this.text=I.getLine(oe),this.min=Te?Math.max(Te.from,I.firstLine()):I.firstLine(),this.max=Te?Math.min(Te.to-1,I.lastLine()):I.lastLine()}function W(I,oe){var ce=I.cm.getTokenTypeAt(xe(I.line,oe));return ce&&/\btag\b/.test(ce)}function Z(I){return I.line>=I.max?void 0:(I.ch=0,I.text=I.cm.getLine(++I.line),!0)}function X(I){return I.line<=I.min?void 0:(I.text=I.cm.getLine(--I.line),I.ch=I.text.length,!0)}function D(I){for(;;){var oe=I.text.indexOf(">",I.ch);if(oe==-1){if(Z(I))continue;return}if(!W(I,oe+1)){I.ch=oe+1;continue}var ce=I.text.lastIndexOf("/",oe),Te=ce>-1&&!/\S/.test(I.text.slice(ce+1,oe));return I.ch=oe+1,Te?"selfClose":"regular"}}function S(I){for(;;){var oe=I.ch?I.text.lastIndexOf("<",I.ch-1):-1;if(oe==-1){if(X(I))continue;return}if(!W(I,oe+1)){I.ch=oe;continue}q.lastIndex=oe,I.ch=oe;var ce=q.exec(I.text);if(ce&&ce.index==oe)return ce}}function be(I){for(;;){q.lastIndex=I.ch;var oe=q.exec(I.text);if(!oe){if(Z(I))continue;return}if(!W(I,oe.index+1)){I.ch=oe.index+1;continue}return I.ch=oe.index+oe[0].length,oe}}function Q(I){for(;;){var oe=I.ch?I.text.lastIndexOf(">",I.ch-1):-1;if(oe==-1){if(X(I))continue;return}if(!W(I,oe+1)){I.ch=oe;continue}var ce=I.text.lastIndexOf("/",oe),Te=ce>-1&&!/\S/.test(I.text.slice(ce+1,oe));return I.ch=oe+1,Te?"selfClose":"regular"}}function U(I,oe){for(var ce=[];;){var Te=be(I),Xe,Ie=I.line,Re=I.ch-(Te?Te[0].length:0);if(!Te||!(Xe=D(I)))return;if(Xe=="selfClose")continue;if(Te[1]){for(var We=ce.length-1;We>=0;--We)if(ce[We]==Te[2]){ce.length=We;break}if(We<0&&(!oe||oe==Te[2]))return{tag:Te[2],from:xe(Ie,Re),to:xe(I.line,I.ch)}}else ce.push(Te[2])}}function B(I,oe){for(var ce=[];;){var Te=Q(I);if(!Te)return;if(Te=="selfClose"){S(I);continue}var Xe=I.line,Ie=I.ch,Re=S(I);if(!Re)return;if(Re[1])ce.push(Re[2]);else{for(var We=ce.length-1;We>=0;--We)if(ce[We]==Re[2]){ce.length=We;break}if(We<0&&(!oe||oe==Re[2]))return{tag:Re[2],from:xe(I.line,I.ch),to:xe(Xe,Ie)}}}}G.registerHelper("fold","xml",function(I,oe){for(var ce=new M(I,oe.line,0);;){var Te=be(ce);if(!Te||ce.line!=oe.line)return;var Xe=D(ce);if(!Xe)return;if(!Te[1]&&Xe!="selfClose"){var Ie=xe(ce.line,ce.ch),Re=U(ce,Te[2]);return Re&&se(Re.from,Ie)>0?{from:Ie,to:Re.from}:null}}}),G.findMatchingTag=function(I,oe,ce){var Te=new M(I,oe.line,oe.ch,ce);if(Te.text.indexOf(">")==-1&&Te.text.indexOf("<")==-1)return;var Xe=D(Te),Ie=Xe&&xe(Te.line,Te.ch),Re=Xe&&S(Te);if(!Xe||!Re||se(Te,oe)>0)return;var We={from:xe(Te.line,Te.ch),to:Ie,tag:Re[2]};return Xe=="selfClose"?{open:We,close:null,at:"open"}:Re[1]?{open:B(Te,Re[2]),close:We,at:"close"}:(Te=new M(I,Ie.line,Ie.ch,ce),{open:We,close:U(Te,Re[2]),at:"open"})},G.findEnclosingTag=function(I,oe,ce,Te){for(var Xe=new M(I,oe.line,oe.ch,ce);;){var Ie=B(Xe,Te);if(!Ie)break;var Re=new M(I,oe.line,oe.ch,ce),We=U(Re,Ie.tag);if(We)return{open:Ie,close:We}}},G.scanForClosingTag=function(I,oe,ce,Te){var Xe=new M(I,oe.line,oe.ch,Te?{from:0,to:Te}:null);return U(Xe,ce)}})},"p77/":function(ht,nt,_){},rUJ1:function(ht,nt){const _=/[&<>"']/,G=/[&<>"']/g,xe=/[<>"']|&(?!#?\w+;)/,se=/[<>"']|&(?!#?\w+;)/g,Le={"&":"&","<":"<",">":">",'"':""","'":"'"},we=me=>Le[me];function q(me,ge){if(ge){if(_.test(me))return me.replace(G,we)}else if(xe.test(me))return me.replace(se,we);return me}const M=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function W(me){return me.replace(M,(ge,Pe)=>(Pe=Pe.toLowerCase(),Pe==="colon"?":":Pe.charAt(0)==="#"?Pe.charAt(1)==="x"?String.fromCharCode(parseInt(Pe.substring(2),16)):String.fromCharCode(+Pe.substring(1)):""))}const Z=/(^|[^\[])\^/g;function X(me,ge){me=me.source||me,ge=ge||"";const Pe={replace:(ae,b)=>(b=b.source||b,b=b.replace(Z,"$1"),me=me.replace(ae,b),Pe),getRegex:()=>new RegExp(me,ge)};return Pe}const D=/[^\w:]/g,S=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function be(me,ge,Pe){if(me){let ae;try{ae=decodeURIComponent(W(Pe)).replace(D,"").toLowerCase()}catch(b){return null}if(ae.indexOf("javascript:")===0||ae.indexOf("vbscript:")===0||ae.indexOf("data:")===0)return null}ge&&!S.test(Pe)&&(Pe=oe(ge,Pe));try{Pe=encodeURI(Pe).replace(/%25/g,"%")}catch(ae){return null}return Pe}const Q={},U=/^[^:]+:\/*[^/]*$/,B=/^([^:]+:)[\s\S]*$/,I=/^([^:]+:\/*[^/]*)[\s\S]*$/;function oe(me,ge){Q[" "+me]||(U.test(me)?Q[" "+me]=me+"/":Q[" "+me]=Ie(me,"/",!0)),me=Q[" "+me];const Pe=me.indexOf(":")===-1;return ge.substring(0,2)==="//"?Pe?ge:me.replace(B,"$1")+ge:ge.charAt(0)==="/"?Pe?ge:me.replace(I,"$1")+ge:me+ge}const ce={exec:function(){}};function Te(me){let ge=1,Pe,ae;for(;ge<arguments.length;ge++){Pe=arguments[ge];for(ae in Pe)Object.prototype.hasOwnProperty.call(Pe,ae)&&(me[ae]=Pe[ae])}return me}function Xe(me,ge){const Pe=me.replace(/\|/g,(ne,F,x)=>{let ee=!1,j=F;for(;--j>=0&&x[j]==="\\";)ee=!ee;return ee?"|":" |"}),ae=Pe.split(/ \|/);let b=0;if(ae.length>ge)ae.splice(ge);else for(;ae.length<ge;)ae.push("");for(;b<ae.length;b++)ae[b]=ae[b].trim().replace(/\\\|/g,"|");return ae}function Ie(me,ge,Pe){const ae=me.length;if(ae===0)return"";let b=0;for(;b<ae;){const ne=me.charAt(ae-b-1);if(ne===ge&&!Pe)b++;else if(ne!==ge&&Pe)b++;else break}return me.substr(0,ae-b)}function Re(me,ge){if(me.indexOf(ge[1])===-1)return-1;const Pe=me.length;let ae=0,b=0;for(;b<Pe;b++)if(me[b]==="\\")b++;else if(me[b]===ge[0])ae++;else if(me[b]===ge[1]&&(ae--,ae<0))return b;return-1}function We(me){me&&me.sanitize&&!me.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}ht.exports={escape:q,unescape:W,edit:X,cleanUrl:be,resolveUrl:oe,noopTest:ce,merge:Te,splitCells:Xe,rtrim:Ie,findClosingBracket:Re,checkSanitizeDeprecation:We}}}]);
|