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.
NewEduCoderBuild/p__Shixuns__Edit__body__Lev...

117 lines
361 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[215,7],{"+NIl":function(st,je,p){(function(M){M(p("VrN/"))})(function(M){"use strict";M.defineMode("stex",function(xe,z){"use strict";function ie(H,D){H.cmdState.push(D)}function ae(H){return H.cmdState.length>0?H.cmdState[H.cmdState.length-1]:null}function q(H){var D=H.cmdState.pop();D&&D.closeBracket()}function O(H){for(var D=H.cmdState,k=D.length-1;k>=0;k--){var L=D[k];if(L.name=="DEFAULT")continue;return L}return{styleIdentifier:function(){return null}}}function S(H,D,k){return function(){this.name=H,this.bracketNo=0,this.style=D,this.styles=k,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var _={};_.importmodule=S("importmodule","tag",["string","builtin"]),_.documentclass=S("documentclass","tag",["","atom"]),_.usepackage=S("usepackage","tag",["atom"]),_.begin=S("begin","tag",["atom"]),_.end=S("end","tag",["atom"]),_.label=S("label","tag",["atom"]),_.ref=S("ref","tag",["atom"]),_.eqref=S("eqref","tag",["atom"]),_.cite=S("cite","tag",["atom"]),_.bibitem=S("bibitem","tag",["atom"]),_.Bibitem=S("Bibitem","tag",["atom"]),_.RBibitem=S("RBibitem","tag",["atom"]),_.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function te(H,D){H.f=D}function P(H,D){var k;if(H.match(/^\\[a-zA-Z@]+/)){var L=H.current().slice(1);return k=_.hasOwnProperty(L)?_[L]:_.DEFAULT,k=new k,ie(D,k),te(D,ce),k.style}if(H.match(/^\\[$&%#{}_]/))return"tag";if(H.match(/^\\[,;!\/\\]/))return"tag";if(H.match("\\["))return te(D,function(F,he){return U(F,he,"\\]")}),"keyword";if(H.match("\\("))return te(D,function(F,he){return U(F,he,"\\)")}),"keyword";if(H.match("$$"))return te(D,function(F,he){return U(F,he,"$$")}),"keyword";if(H.match("$"))return te(D,function(F,he){return U(F,he,"$")}),"keyword";var B=H.next();if(B=="%")return H.skipToEnd(),"comment";if(B=="}"||B=="]"){if(k=ae(D),k)k.closeBracket(B),te(D,ce);else return"error";return"bracket"}else return B=="{"||B=="["?(k=_.DEFAULT,k=new k,ie(D,k),"bracket"):/\d/.test(B)?(H.eatWhile(/[\w.%]/),"atom"):(H.eatWhile(/[\w\-_]/),k=O(D),k.name=="begin"&&(k.argument=H.current()),k.styleIdentifier())}function U(H,D,k){if(H.eatSpace())return null;if(k&&H.match(k))return te(D,P),"keyword";if(H.match(/^\\[a-zA-Z@]+/))return"tag";if(H.match(/^[a-zA-Z]+/))return"variable-2";if(H.match(/^\\[$&%#{}_]/))return"tag";if(H.match(/^\\[,;!\/]/))return"tag";if(H.match(/^[\^_&]/))return"tag";if(H.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(H.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var L=H.next();return L=="{"||L=="}"||L=="["||L=="]"||L=="("||L==")"?"bracket":L=="%"?(H.skipToEnd(),"comment"):"error"}function ce(H,D){var k=H.peek(),L;return k=="{"||k=="["?(L=ae(D),L.openBracket(k),H.eat(k),te(D,P),"bracket"):/[ \t\r]/.test(k)?(H.eat(k),null):(te(D,P),q(D),P(H,D))}return{startState:function(){var H=z.inMathMode?function(D,k){return U(D,k)}:P;return{cmdState:[],f:H}},copyState:function(H){return{cmdState:H.cmdState.slice(),f:H.f}},token:function(H,D){return D.f(H,D)},blankLine:function(H){H.f=P,H.cmdState.length=0},lineComment:"%"}}),M.defineMIME("text/x-stex","stex"),M.defineMIME("text/x-latex","stex")})},"19Vz":function(st,je,p){(function(M){M(p("VrN/"))})(function(M){M.defineOption("placeholder","",function(S,_,te){var P=te&&te!=M.Init;if(_&&!P)S.on("blur",ae),S.on("change",q),S.on("swapDoc",q),M.on(S.getInputField(),"compositionupdate",S.state.placeholderCompose=function(){ie(S)}),q(S);else if(!_&&P){S.off("blur",ae),S.off("change",q),S.off("swapDoc",q),M.off(S.getInputField(),"compositionupdate",S.state.placeholderCompose),xe(S);var U=S.getWrapperElement();U.className=U.className.replace(" CodeMirror-empty","")}_&&!S.hasFocus()&&ae(S)});function xe(S){S.state.placeholder&&(S.state.placeholder.parentNode.removeChild(S.state.placeholder),S.state.placeholder=null)}function z(S){xe(S);var _=S.state.placeholder=document.createElement("pre");_.style.cssText="height: 0; overflow: visible",_.style.direction=S.getOption("direction"),_.className="CodeMirror-placeholder CodeMirror-line-like";var te=S.getOption("placeholder");typeof te=="string"&&(te=document.createTextNode(te)),_.appendChild(te),S.display.lineSpace.insertBefore(_,S.display.lineSpace.firstChild)}function ie(S){setTimeout(function(){var _=!1,te=S.getInputField();te.nodeName=="TEXTAREA"?_=!te.value:S.lineCount()==1&&(_=!/[^\u200b]/.test(te.querySelector(".CodeMirror-line").textContent)),_?z(S):xe(S)},20)}function ae(S){O(S)&&z(S)}function q(S){var _=S.getWrapperElement(),te=O(S);_.className=_.className.replace(" CodeMirror-empty","")+(te?" CodeMirror-empty":""),te?z(S):xe(S)}function O(S){return S.lineCount()===1&&S.getLine(0)===""}})},"1eCo":function(st,je,p){(function(M){M(p("VrN/"))})(function(M){"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},z={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};M.defineMode("xml",function(ie,ae){var q=ie.indentUnit,O={},S=ae.htmlMode?xe:z;for(var _ in S)O[_]=S[_];for(var _ in ae)O[_]=ae[_];var te,P;function U(v,W){function N(le){return W.tokenize=le,le(v,W)}var x=v.next();if(x=="<")return v.eat("!")?v.eat("[")?v.match("CDATA[")?N(D("atom","]]>")):null:v.match("--")?N(D("comment","-->")):v.match("DOCTYPE",!0,!0)?(v.eatWhile(/[\w\._\-]/),N(k(1))):null:v.eat("?")?(v.eatWhile(/[\w\._\-]/),W.tokenize=D("meta","?>"),"meta"):(te=v.eat("/")?"closeTag":"openTag",W.tokenize=ce,"tag bracket");if(x=="&"){var $;return v.eat("#")?v.eat("x")?$=v.eatWhile(/[a-fA-F\d]/)&&v.eat(";"):$=v.eatWhile(/[\d]/)&&v.eat(";"):$=v.eatWhile(/[\w\.\-:]/)&&v.eat(";"),$?"atom":"error"}else return v.eatWhile(/[^&<]/),null}U.isInText=!0;function ce(v,W){var N=v.next();if(N==">"||N=="/"&&v.eat(">"))return W.tokenize=U,te=N==">"?"endTag":"selfcloseTag","tag bracket";if(N=="=")return te="equals",null;if(N=="<"){W.tokenize=U,W.state=he,W.tagName=W.tagStart=null;var x=W.tokenize(v,W);return x?x+" tag error":"tag error"}else return/[\'\"]/.test(N)?(W.tokenize=H(N),W.stringStartCol=v.column(),W.tokenize(v,W)):(v.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function H(v){var W=function(N,x){for(;!N.eol();)if(N.next()==v){x.tokenize=ce;break}return"string"};return W.isInAttribute=!0,W}function D(v,W){return function(N,x){for(;!N.eol();){if(N.match(W)){x.tokenize=U;break}N.next()}return v}}function k(v){return function(W,N){for(var x;(x=W.next())!=null;){if(x=="<")return N.tokenize=k(v+1),N.tokenize(W,N);if(x==">")if(v==1){N.tokenize=U;break}else return N.tokenize=k(v-1),N.tokenize(W,N)}return"meta"}}function L(v,W,N){this.prev=v.context,this.tagName=W,this.indent=v.indented,this.startOfLine=N,(O.doNotIndent.hasOwnProperty(W)||v.context&&v.context.noIndent)&&(this.noIndent=!0)}function B(v){v.context&&(v.context=v.context.prev)}function F(v,W){for(var N;;){if(!v.context)return;if(N=v.context.tagName,!O.contextGrabbers.hasOwnProperty(N)||!O.contextGrabbers[N].hasOwnProperty(W))return;B(v)}}function he(v,W,N){return v=="openTag"?(N.tagStart=W.column(),Ne):v=="closeTag"?G:he}function Ne(v,W,N){return v=="word"?(N.tagName=W.current(),P="tag",Z):O.allowMissingTagName&&v=="endTag"?(P="tag bracket",Z(v,W,N)):(P="error",Ne)}function G(v,W,N){if(v=="word"){var x=W.current();return N.context&&N.context.tagName!=x&&O.implicitlyClosed.hasOwnProperty(N.context.tagName)&&B(N),N.context&&N.context.tagName==x||O.matchClosing===!1?(P="tag",oe):(P="tag error",se)}else return O.allowMissingTagName&&v=="endTag"?(P="tag bracket",oe(v,W,N)):(P="error",se)}function oe(v,W,N){return v!="endTag"?(P="error",oe):(B(N),he)}function se(v,W,N){return P="error",oe(v,W,N)}function Z(v,W,N){if(v=="word")return P="attribute",ee;if(v=="endTag"||v=="selfcloseTag"){var x=N.tagName,$=N.tagStart;return N.tagName=N.tagStart=null,v=="selfcloseTag"||O.autoSelfClosers.hasOwnProperty(x)?F(N,x):(F(N,x),N.context=new L(N,x,$==N.indented)),he}return P="error",Z}function ee(v,W,N){return v=="equals"?pe:(O.allowMissing||(P="error"),Z(v,W,N))}function pe(v,W,N){return v=="string"?Y:v=="word"&&O.allowUnquoted?(P="string",Z):(P="error",Z(v,W,N))}function Y(v,W,N){return v=="string"?Y:Z(v,W,N)}return{startState:function(v){var W={tokenize:U,state:he,indented:v||0,tagName:null,tagStart:null,context:null};return v!=null&&(W.baseIndent=v),W},token:function(v,W){if(!W.tagName&&v.sol()&&(W.indented=v.indentation()),v.eatSpace())return null;te=null;var N=W.tokenize(v,W);return(N||te)&&N!="comment"&&(P=null,W.state=W.state(te||N,v,W),P&&(N=P=="error"?N+" error":P)),N},indent:function(v,W,N){var x=v.context;if(v.tokenize.isInAttribute)return v.tagStart==v.indented?v.stringStartCol+1:v.indented+q;if(x&&x.noIndent)return M.Pass;if(v.tokenize!=ce&&v.tokenize!=U)return N?N.match(/^(\s*)/)[0].length:0;if(v.tagName)return O.multilineTagIndentPastTag!==!1?v.tagStart+v.tagName.length+2:v.tagStart+q*(O.multilineTagIndentFactor||1);if(O.alignCDATA&&/<!\[CDATA\[/.test(W))return 0;var $=W&&/^<(\/)?([\w_:\.-]*)/.exec(W);if($&&$[1])for(;x;)if(x.tagName==$[2]){x=x.prev;break}else if(O.implicitlyClosed.hasOwnProperty(x.tagName))x=x.prev;else break;else if($)for(;x;){var le=O.contextGrabbers[x.tagName];if(le&&le.hasOwnProperty($[2]))x=x.prev;else break}for(;x&&x.prev&&!x.startOfLine;)x=x.prev;return x?x.indent+q:v.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:O.htmlMode?"html":"xml",helperType:O.htmlMode?"html":"xml",skipAttribute:function(v){v.state==pe&&(v.state=Z)},xmlCurrentTag:function(v){return v.tagName?{name:v.tagName,close:v.type=="closeTag"}:null},xmlCurrentContext:function(v){for(var W=[],N=v.context;N;N=N.prev)N.tagName&&W.push(N.tagName);return W.reverse()}}}),M.defineMIME("text/xml","xml"),M.defineMIME("application/xml","xml"),M.mimeModes.hasOwnProperty("text/html")||M.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"2RCv":function(st,je,p){"use strict";var M=p("Awhp"),xe=p("KrTs"),z=p("+L6B"),ie=p("2/Rp"),ae=p("5NDa"),q=p("5rEg"),O=p("0Owb"),S=p("oBTY"),_=p("tJVT"),te=p("PpiC"),P=p("q1tI"),U=p.n(P),ce=function(D){var k=D.InputRight,L=D.value,B=L===void 0?[]:L,F=D.onChange,he=F===void 0?function(){}:F,Ne=Object(te.a)(D,["InputRight","value","onChange"]),G=Object(P.useState)(),oe=Object(_.a)(G,2),se=oe[0],Z=oe[1],ee=function(v){var W=B.filter(function(N,x){return x!==v});he(W)},pe=function(v){if(v.preventDefault(),!se)return;he([].concat(Object(S.a)(B),[se])),Z(null)};return U.a.createElement("div",null,U.a.createElement(q.a,Object(O.a)({},Ne,{value:se,onChange:function(v){return Z(v.target.value)},onPressEnter:pe,onBlur:pe})),k,U.a.createElement("div",{className:"mt20"},B==null?void 0:B.map(function(Y,v){return U.a.createElement(xe.a,{className:"ml10 mr10",count:"x",onClick:function(){return ee(v)}},U.a.createElement(ie.a,{type:"primary",ghost:!0},Y))})))};je.a=ce},"7ahc":function(st,je,p){"use strict";p.d(je,"a",function(){return Ne});var M=p("k1fw"),xe=p("0Owb"),z=p("+L6B"),ie=p("2/Rp"),ae=p("y8nQ"),q=p("Vl3Y"),O=p("tJVT"),S=p("OaEy"),_=p("2fM7"),te=p("q1tI"),P=p.n(te),U=p("VrN/"),ce=p.n(U),H=p("p77/"),D=p.n(H),k=p("c5Ni"),L=p.n(k),B=_.a.Option,F={labelCol:{span:4},wrapperCol:{span:20}},he={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"]};je.b=function(G){var oe=G.callback,se=G.onCancel,Z=Object(te.useState)("python"),ee=Object(O.a)(Z,2),pe=ee[0],Y=ee[1];function v(N){Y(he[N][1])}function W(N){oe(N)}return P.a.createElement(q.a,Object(xe.a)({},F,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:W}),P.a.createElement(q.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},P.a.createElement(_.a,{onChange:v},Object.keys(he).map(function(N){return P.a.createElement(B,{key:N,value:N},he[N][0])}))),P.a.createElement(q.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},P.a.createElement(Ne,{mode:pe})),P.a.createElement("div",{className:"flex-container flex-end"},P.a.createElement(ie.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),P.a.createElement(ie.a,{type:"ghost",onClick:se},"\u53D6\u6D88")))};function Ne(G){var oe=G.value,se=G.onChange,Z=G.mode,ee=G.options,pe=ee===void 0?{}:ee,Y=Object(te.useRef)(),v=Object(te.useState)(),W=Object(O.a)(v,2),N=W[0],x=W[1];return Object(te.useEffect)(function(){if(N){function $(le){var K=le.getValue();se&&se(K)}return N.on("change",$),function(){N.off("change",$)}}},[N,se]),Object(te.useEffect)(function(){N&&N.setOption("mode",Z)},[N,Z]),Object(te.useEffect)(function(){N&&((oe!==N.getValue()||oe==="")&&setTimeout(function(){N.setValue(oe||" ")},300))},[N,oe]),Object(te.useEffect)(function(){if(Y.current&&!N){var $=ce.a.fromTextArea(Y.current,Object(M.a)({mode:Z,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},pe));x($)}},[Y.current,N]),P.a.createElement("div",{className:"my-codemirror-container"},P.a.createElement("textarea",{ref:Y}))}},"7ixt":function(st,je,p){"use strict";p.d(je,"a",function(){return z});var M={adjustX:1,adjustY:1},xe=[0,0],z={left:{points:["cr","cl"],overflow:M,offset:[-4,0],targetOffset:xe},right:{points:["cl","cr"],overflow:M,offset:[4,0],targetOffset:xe},top:{points:["bc","tc"],overflow:M,offset:[0,-4],targetOffset:xe},bottom:{points:["tc","bc"],overflow:M,offset:[0,4],targetOffset:xe},topLeft:{points:["bl","tl"],overflow:M,offset:[0,-4],targetOffset:xe},leftTop:{points:["tr","tl"],overflow:M,offset:[-4,0],targetOffset:xe},topRight:{points:["br","tr"],overflow:M,offset:[0,-4],targetOffset:xe},rightTop:{points:["tl","tr"],overflow:M,offset:[4,0],targetOffset:xe},bottomRight:{points:["tr","br"],overflow:M,offset:[0,4],targetOffset:xe},rightBottom:{points:["bl","br"],overflow:M,offset:[4,0],targetOffset:xe},bottomLeft:{points:["tl","bl"],overflow:M,offset:[0,4],targetOffset:xe},leftBottom:{points:["br","bl"],overflow:M,offset:[-4,0],targetOffset:xe}},ie=z},"8EBN":function(st,je,p){(function(M){M(p("VrN/"))})(function(M){"use strict";M.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<M.modeInfo.length;xe++){var z=M.modeInfo[xe];z.mimes&&(z.mime=z.mimes[0])}M.findModeByMIME=function(ie){ie=ie.toLowerCase();for(var ae=0;ae<M.modeInfo.length;ae++){var q=M.modeInfo[ae];if(q.mime==ie)return q;if(q.mimes){for(var O=0;O<q.mimes.length;O++)if(q.mimes[O]==ie)return q}}if(/\+xml$/.test(ie))return M.findModeByMIME("application/xml");if(/\+json$/.test(ie))return M.findModeByMIME("application/json")},M.findModeByExtension=function(ie){ie=ie.toLowerCase();for(var ae=0;ae<M.modeInfo.length;ae++){var q=M.modeInfo[ae];if(q.ext){for(var O=0;O<q.ext.length;O++)if(q.ext[O]==ie)return q}}},M.findModeByFileName=function(ie){for(var ae=0;ae<M.modeInfo.length;ae++){var q=M.modeInfo[ae];if(q.file&&q.file.test(ie))return q}var O=ie.lastIndexOf("."),S=O>-1&&ie.substring(O+1,ie.length);if(S)return M.findModeByExtension(S)},M.findModeByName=function(ie){ie=ie.toLowerCase();for(var ae=0;ae<M.modeInfo.length;ae++){var q=M.modeInfo[ae];if(q.name.toLowerCase()==ie)return q;if(q.alias){for(var O=0;O<q.alias.length;O++)if(q.alias[O].toLowerCase()==ie)return q}}}})},"93VE":function(st,je,p){},"9Bee":function(st,je,p){"use strict";var M=p("k1fw"),xe=p("tJVT"),z=p("q1tI"),ie=p.n(z),ae=p("vg9a"),q=p("DlQD"),O=p.n(q),S=p("rUJ1");function _(T,J){var Q=T.match(/^(\s+)(?:```)/);if(Q===null)return J;var Se=Q[1];return J.split(`
`).map(function(Ae){var fe=Ae.match(/^\s+/);if(fe===null)return Ae;var Te=Object(xe.a)(fe,1),de=Te[0];return de.length>=Se.length?Ae.slice(Se.length):Ae}).join(`
`)}var te=[],P=["<ul>"],U=new O.a.Renderer,ce=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function H(){te.length=0,P=["<ul>"]}var D={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function k(T,J,Q,Se){if(J>=T.length||T[J].level<=Q)return J;var Ae=T[J];Se.push("<li><a href='#"+Ae.anchor+"'>"+Ae.text+"</a>"),J++;var fe=[];return J=k(T,J,Ae.level,fe),fe.length>0&&(Se.push("<ul>"),fe.forEach(function(Te){Se.push(Te)}),Se.push("</ul>")),Se.push("</li>"),J=k(T,J,Q,Se),J}function L(){return k(te,0,0,P),P.push("</ul>"),P.join("")}var B={heading:function(J){var Q=ce.exec(J);if(Q)return{type:"heading",raw:Q[0],depth:Q[1].length,text:Q[2]}},fences:function(J){var Q=this.rules.block.fences.exec(J);if(Q){var Se=Q[0],Ae=_(Se,Q[3]||""),fe=Q[2]?Q[2].trim():Q[2];if(["latex","katex","math"].indexOf(fe)>=0){var Te=Ne(),de=Ae;Ae=Te,G[Te]={type:"block",expression:de}}return{type:"code",raw:Se,lang:fe,text:Ae}}}},F=/(?:\${2})([^\n`]+?)(?:\${2})/gi,he=0,Ne=function(){return"__special_katext_id_".concat(he++,"__")},G={};function oe(){return G}function se(){he=0,G={}}function Z(T){return T=T.replace(F,function(J,Q){var Se=Ne();return G[Se]={type:"inline",expression:Q},Se}),T}var ee=U.listitem;U.listitem=function(T){return ee(Z(T))};var pe=U.paragraph;U.paragraph=function(T){return pe(Z(T))};var Y=U.tablecell;U.tablecell=function(T,J){return Y(Z(T),J)},U.code=function(T,J,Q){var Se=(J||"").match(/\S*/)[0];return Se?["latex","katex","math"].indexOf(Se)>=0?"<p class='editormd-tex'>".concat(T,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(J,'">').concat(Q?T:Object(S.escape)(T,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(Q?T:Object(S.escape)(T,!0))+"</code></pre>"},U.heading=function(T,J,Q){var Se=this.options.headerPrefix+Q.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return te.push({anchor:Se,level:J,text:T}),"<h"+J+' id="'+Se+'">'+T+"</h"+J+">"},O.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),O.a.use({tokenizer:B,renderer:U});var v=O.a,W=p("SJMd"),N=p("ulZh"),x=p.n(N),$=p("m3rI"),le=p("Oy/b"),K=p("p5ED"),Ce=/<pre[^>]*>/g;function g(T){var J=document.createElement("div");return J.innerHTML=T,J.childNodes.length===0?"":J.childNodes[0].nodeValue}var c=je.a=function(T){var J=T.value,Q=J===void 0?"":J,Se=T.className,Ae=T.showTextOnly,fe=T.showLines,Te=T.style,de=Te===void 0?{}:Te,me=T.stylesPrev,j=me===void 0?{}:me,V=String(Q),Le=Object(z.useState)(""),Be=Object(xe.a)(Le,2),Qe=Be[0],ze=Be[1],Ie=Object(z.useMemo)(function(){try{var We=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ue=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ve=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;V=V.replace(We,"("+$.a.API_SERVER+"/api/attachments/").replace(Ue,'"'+$.a.API_SERVER+"/api/attachments/").replace(ve,'"'+$.a.API_SERVER+"/files/uploads/").replace(/\r\n/g,`
`),V=V.replace(new RegExp("(?<!\\n)\\n(?!\\n)","g"),`
`)}catch(Ve){}var we=v(V),Je=oe();if(V.match(/\[TOC\]/)&&(we=we.replace("<p>[TOC]</p>",L()),H()),we=we.replace(/(__special_katext_id_\d+__)/g,function(Ve,Ke){var it=Je[Ke],Ye=it.type,Ge=it.expression;return Object(le.renderToString)(g(Ge)||"",{displayMode:Ye==="block",throwOnError:!1,output:"html"})}),we=we.replace(/▁/g,"\u2581\u2581\u2581"),se(),Ae){var $e=document.createElement("div");return $e.innerHTML=we,$e.innerText}return setTimeout(function(){return De()},500),we},[V]),ye=Object(z.useRef)();D.WebkitLineClamp=fe,fe&&(de=Object(M.a)(Object(M.a)({},de),D));function _e(We){var Ue=We.target;if(Ue.tagName.toUpperCase()==="A"){var ve=Ue.getAttribute("href");if(ve.indexOf("office")>-1)We.preventDefault(),ze(ve);else if(ve.startsWith("#")){We.preventDefault();var we=document.getElementById(ve.replace("#",""));we&&we.scrollIntoView(!0)}}}var De=function(){var Ue,ve=(Ue=ye.current)===null||Ue===void 0?void 0:Ue.querySelectorAll("video");ve==null||ve.forEach(function(we){if(we.oncontextmenu=function(){return!1},we.src.indexOf(".m3u8")>-1&&!we.canPlayType("application/vnd.apple.mpegurl")){if(x.a.isSupported()){var Je=new x.a;Je.loadSource(we.src),Je.attachMedia(we)}}})};return Object(z.useEffect)(function(){if(ye.current&&Ie&&(Ie.match(Ce)&&window.PR.prettyPrint()),ye.current)return ye.current.addEventListener("click",_e),function(){ye.current.removeEventListener("click",_e),se(),H()}},[Ie,ye.current,_e]),ie.a.createElement(ie.a.Fragment,null,ie.a.createElement("div",{ref:ye,style:Object(M.a)({},de),className:"".concat(Se||""," markdown-body "),dangerouslySetInnerHTML:{__html:Ie}}),ie.a.createElement(K.a,{close:!0,data:Qe,type:Qe!=null&&Qe.length?"office":"",style:Object(M.a)({},j),onClose:function(){return ze("")}}))}},"9VGf":function(st,je,p){"use strict";p.d(je,"a",function(){return z});var M=p("q1tI"),xe=p.n(M);function z(ie,ae){var q=Object(M.useRef)();Object(M.useEffect)(function(){q.current=ie}),Object(M.useEffect)(function(){function O(){q.current()}if(ae!==null){var S=setInterval(O,ae);return function(){return clearInterval(S)}}},[ae])}},"9ZNV":function(st,je,p){"use strict";p.d(je,"a",function(){return te});var M=p("0Owb"),xe=p("+L6B"),z=p("2/Rp"),ie=p("q1tI"),ae=p.n(ie),q=p("UUDw"),O=p.n(q),S=p("TSYQ"),_=p.n(S),te=function(U){var ce=U.cancelText,H=ce===void 0?"\u53D6\u6D88":ce,D=U.okText,k=D===void 0?"\u786E\u5B9A":D,L=U.loading,B=L===void 0?!1:L,F=U.hasOkBtn,he=F===void 0?!0:F,Ne=U.okButtonProps,G=Ne===void 0?{}:Ne,oe=U.onCancel,se=oe===void 0?function(){}:oe,Z=U.onOk,ee=Z===void 0?function(){}:Z,pe=U.className,Y=pe===void 0?"":pe;return ae.a.createElement("div",{className:_()(O.a.buttonFixed,Y)},ae.a.createElement("div",{className:O.a.buttonWrap},ae.a.createElement(z.a,{size:"large",className:"".concat(O.a.button," mr20"),onClick:se},H),he&&ae.a.createElement(z.a,Object(M.a)({size:"large",type:"primary",className:"".concat(O.a.button," mr20"),loading:B,onClick:ee},G),k)))}},Bd2K:function(st,je,p){(function(M){M(p("VrN/"),p("osHv"))})(function(M){M.defineOption("autoCloseTags",!1,function(_,te,P){if(P!=M.Init&&P&&_.removeKeyMap("autoCloseTags"),!te)return;var U={name:"autoCloseTags"};(typeof te!="object"||te.whenClosing!==!1)&&(U["'/'"]=function(ce){return q(ce)}),(typeof te!="object"||te.whenOpening!==!1)&&(U["'>'"]=function(ce){return ie(ce)}),_.addKeyMap(U)});var xe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],z=["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 ie(_){if(_.getOption("disableInput"))return M.Pass;for(var te=_.listSelections(),P=[],U=_.getOption("autoCloseTags"),ce=0;ce<te.length;ce++){if(!te[ce].empty())return M.Pass;var H=te[ce].head,D=_.getTokenAt(H),k=M.innerMode(_.getMode(),D.state),L=k.state,B=k.mode.xmlCurrentTag&&k.mode.xmlCurrentTag(L),F=B&&B.name;if(!F)return M.Pass;var he=k.mode.configuration=="html",Ne=typeof U=="object"&&U.dontCloseTags||he&&xe,G=typeof U=="object"&&U.indentTags||he&&z;D.end>H.ch&&(F=F.slice(0,F.length-D.end+H.ch));var oe=F.toLowerCase();if(!F||D.type=="string"&&(D.end!=H.ch||!/[\"\']/.test(D.string.charAt(D.string.length-1))||D.string.length==1)||D.type=="tag"&&B.close||D.string.indexOf("/")==H.ch-D.start-1||Ne&&O(Ne,oe)>-1||S(_,k.mode.xmlCurrentContext&&k.mode.xmlCurrentContext(L)||[],F,H,!0))return M.Pass;var se=typeof U=="object"&&U.emptyTags;if(se&&O(se,F)>-1){P[ce]={text:"/>",newPos:M.Pos(H.line,H.ch+2)};continue}var Z=G&&O(G,oe)>-1;P[ce]={indent:Z,text:">"+(Z?`
`:"")+"</"+F+">",newPos:Z?M.Pos(H.line+1,0):M.Pos(H.line,H.ch+1)}}for(var ee=typeof U=="object"&&U.dontIndentOnAutoClose,ce=te.length-1;ce>=0;ce--){var pe=P[ce];_.replaceRange(pe.text,te[ce].head,te[ce].anchor,"+insert");var Y=_.listSelections().slice(0);Y[ce]={head:pe.newPos,anchor:pe.newPos},_.setSelections(Y),!ee&&pe.indent&&(_.indentLine(pe.newPos.line,null,!0),_.indentLine(pe.newPos.line+1,null,!0))}}function ae(_,te){for(var P=_.listSelections(),U=[],ce=te?"/":"</",H=_.getOption("autoCloseTags"),D=typeof H=="object"&&H.dontIndentOnSlash,k=0;k<P.length;k++){if(!P[k].empty())return M.Pass;var L=P[k].head,B=_.getTokenAt(L),F=M.innerMode(_.getMode(),B.state),he=F.state;if(te&&(B.type=="string"||B.string.charAt(0)!="<"||B.start!=L.ch-1))return M.Pass;var Ne,G=F.mode.name!="xml"&&_.getMode().name=="htmlmixed";if(G&&F.mode.name=="javascript")Ne=ce+"script";else if(G&&F.mode.name=="css")Ne=ce+"style";else{var oe=F.mode.xmlCurrentContext&&F.mode.xmlCurrentContext(he);if(!oe||oe.length&&S(_,oe,oe[oe.length-1],L))return M.Pass;Ne=ce+oe[oe.length-1]}_.getLine(L.line).charAt(B.end)!=">"&&(Ne+=">"),U[k]=Ne}if(_.replaceSelections(U),P=_.listSelections(),!D)for(var k=0;k<P.length;k++)(k==P.length-1||P[k].head.line<P[k+1].head.line)&&_.indentLine(P[k].head.line)}function q(_){return _.getOption("disableInput")?M.Pass:ae(_,!0)}M.commands.closeTag=function(_){return ae(_)};function O(_,te){if(_.indexOf)return _.indexOf(te);for(var P=0,U=_.length;P<U;++P)if(_[P]==te)return P;return-1}function S(_,te,P,U,ce){if(!M.scanForClosingTag)return!1;var H=Math.min(_.lastLine()+1,U.line+500),D=M.scanForClosingTag(_,U,null,H);if(!D||D.tag!=P)return!1;for(var k=ce?1:0,L=te.length-1;L>=0&&te[L]==P;L--)++k;U=D.to;for(var L=1;L<k;L++){var B=M.scanForClosingTag(_,U,null,H);if(!B||B.tag!=P)return!1;U=B.to}return!0}})},BjJ7:function(st,je,p){"use strict";p.d(je,"d",function(){return xe}),p.d(je,"c",function(){return z}),p.d(je,"e",function(){return ie}),p.d(je,"b",function(){return ae}),p.d(je,"a",function(){return O});var M=p("m3rI");function xe(S){var _=!0;if(S.length>0){for(var te=0;te<S.length;te++)if(S[te].compile_success==0||!S[te].compile_success){_=!1;break}}else _=!1;return _}function z(S){for(var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",te=[],P=0;P<S.length;P++){var U=S[P],ce=_?"".concat(_,"/").concat(U.name):"".concat(U.name);te.push({title:U.name,isLeaf:!(U.type==="tree"),key:ce})}return te}function ie(S,_,te){for(var P=0;P<S.length;P++){var U=S[P];if(U.key===_){U.children=te;break}U.children&&ie(U.children,_,te)}return S}function ae(S,_,te){var P;return function(){var U=this,ce=arguments,H=function(){P=null,te||S.apply(U,ce)},D=te&&!P;clearTimeout(P),P=setTimeout(H,_),D&&S.apply(U,ce)}}var q=!0,O=M.a.API_SERVER},"C+DQ":function(st,je,p){},DlQD:function(st,je,p){(function(M,xe){st.exports=xe()})(this,function(){"use strict";function M(y,w){for(var C=0;C<w.length;C++){var d=w[C];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(y,d.key,d)}}function xe(y,w,C){return w&&M(y.prototype,w),C&&M(y,C),y}function z(y,w){if(!y)return;if(typeof y=="string")return ie(y,w);var C=Object.prototype.toString.call(y).slice(8,-1);if(C==="Object"&&y.constructor&&(C=y.constructor.name),C==="Map"||C==="Set")return Array.from(y);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return ie(y,w)}function ie(y,w){(w==null||w>y.length)&&(w=y.length);for(var C=0,d=new Array(w);C<w;C++)d[C]=y[C];return d}function ae(y,w){var C;if(typeof Symbol=="undefined"||y[Symbol.iterator]==null){if(Array.isArray(y)||(C=z(y))||w&&y&&typeof y.length=="number"){C&&(y=C);var d=0;return function(){return d>=y.length?{done:!0}:{done:!1,value:y[d++]}}}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 C=y[Symbol.iterator](),C.next.bind(C)}function q(y,w){return w={exports:{}},y(w,w.exports),w.exports}var O=q(function(y){function w(){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 C(d){y.exports.defaults=d}y.exports={defaults:w(),getDefaults:w,changeDefaults:C}}),S=O.defaults,_=O.getDefaults,te=O.changeDefaults,P=/[&<>"']/,U=/[&<>"']/g,ce=/[<>"']|&(?!#?\w+;)/,H=/[<>"']|&(?!#?\w+;)/g,D={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},k=function(w){return D[w]};function L(y,w){if(w){if(P.test(y))return y.replace(U,k)}else if(ce.test(y))return y.replace(H,k);return y}var B=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function F(y){return y.replace(B,function(w,C){return C=C.toLowerCase(),C==="colon"?":":C.charAt(0)==="#"?C.charAt(1)==="x"?String.fromCharCode(parseInt(C.substring(2),16)):String.fromCharCode(+C.substring(1)):""})}var he=/(^|[^\[])\^/g;function Ne(y,w){y=y.source||y,w=w||"";var C={replace:function(f,h){return h=h.source||h,h=h.replace(he,"$1"),y=y.replace(f,h),C},getRegex:function(){return new RegExp(y,w)}};return C}var G=/[^\w:]/g,oe=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function se(y,w,C){if(y){var d;try{d=decodeURIComponent(F(C)).replace(G,"").toLowerCase()}catch(f){return null}if(d.indexOf("javascript:")===0||d.indexOf("vbscript:")===0||d.indexOf("data:")===0)return null}w&&!oe.test(C)&&(C=v(w,C));try{C=encodeURI(C).replace(/%25/g,"%")}catch(f){return null}return C}var Z={},ee=/^[^:]+:\/*[^/]*$/,pe=/^([^:]+:)[\s\S]*$/,Y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function v(y,w){Z[" "+y]||(ee.test(y)?Z[" "+y]=y+"/":Z[" "+y]=$(y,"/",!0)),y=Z[" "+y];var C=y.indexOf(":")===-1;return w.substring(0,2)==="//"?C?w:y.replace(pe,"$1")+w:w.charAt(0)==="/"?C?w:y.replace(Y,"$1")+w:y+w}var W={exec:function(){}};function N(y){for(var w=1,C,d;w<arguments.length;w++){C=arguments[w];for(d in C)Object.prototype.hasOwnProperty.call(C,d)&&(y[d]=C[d])}return y}function x(y,w){var C=y.replace(/\|/g,function(h,m,R){for(var X=!1,be=m;--be>=0&&R[be]==="\\";)X=!X;return X?"|":" |"}),d=C.split(/ \|/),f=0;if(d.length>w)d.splice(w);else for(;d.length<w;)d.push("");for(;f<d.length;f++)d[f]=d[f].trim().replace(/\\\|/g,"|");return d}function $(y,w,C){var d=y.length;if(d===0)return"";for(var f=0;f<d;){var h=y.charAt(d-f-1);if(h===w&&!C)f++;else if(h!==w&&C)f++;else break}return y.substr(0,d-f)}function le(y,w){if(y.indexOf(w[1])===-1)return-1;for(var C=y.length,d=0,f=0;f<C;f++)if(y[f]==="\\")f++;else if(y[f]===w[0])d++;else if(y[f]===w[1]&&(d--,d<0))return f;return-1}function K(y){y&&y.sanitize&&!y.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 Ce={escape:L,unescape:F,edit:Ne,cleanUrl:se,resolveUrl:v,noopTest:W,merge:N,splitCells:x,rtrim:$,findClosingBracket:le,checkSanitizeDeprecation:K},g=O.defaults,c=Ce.rtrim,T=Ce.splitCells,J=Ce.escape,Q=Ce.findClosingBracket;function Se(y,w,C){var d=w.href,f=w.title?J(w.title):null,h=y[1].replace(/\\([\[\]])/g,"$1");return y[0].charAt(0)!=="!"?{type:"link",raw:C,href:d,title:f,text:h}:{type:"image",raw:C,href:d,title:f,text:J(h)}}function Ae(y,w){var C=y.match(/^(\s+)(?:```)/);if(C===null)return w;var d=C[1];return w.split(`
`).map(function(f){var h=f.match(/^\s+/);if(h===null)return f;var m=h[0];return m.length>=d.length?f.slice(d.length):f}).join(`
`)}var fe=function(){function y(C){this.options=C||g}var w=y.prototype;return w.space=function(d){var f=this.rules.block.newline.exec(d);if(f)return f[0].length>1?{type:"space",raw:f[0]}:{raw:`
`}},w.code=function(d,f){var h=this.rules.block.code.exec(d);if(h){var m=f[f.length-1];if(m&&m.type==="paragraph")return{raw:h[0],text:h[0].trimRight()};var R=h[0].replace(/^ {4}/gm,"");return{type:"code",raw:h[0],codeBlockStyle:"indented",text:this.options.pedantic?R:c(R,`
`)}}},w.fences=function(d){var f=this.rules.block.fences.exec(d);if(f){var h=f[0],m=Ae(h,f[3]||"");return{type:"code",raw:h,lang:f[2]?f[2].trim():f[2],text:m}}},w.heading=function(d){var f=this.rules.block.heading.exec(d);if(f)return{type:"heading",raw:f[0],depth:f[1].length,text:f[2]}},w.nptable=function(d){var f=this.rules.block.nptable.exec(d);if(f){var h={type:"table",header:T(f[1].replace(/^ *| *\| *$/g,"")),align:f[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:f[3]?f[3].replace(/\n$/,"").split(`
`):[],raw:f[0]};if(h.header.length===h.align.length){var m=h.align.length,R;for(R=0;R<m;R++)/^ *-+: *$/.test(h.align[R])?h.align[R]="right":/^ *:-+: *$/.test(h.align[R])?h.align[R]="center":/^ *:-+ *$/.test(h.align[R])?h.align[R]="left":h.align[R]=null;for(m=h.cells.length,R=0;R<m;R++)h.cells[R]=T(h.cells[R],h.header.length);return h}}},w.hr=function(d){var f=this.rules.block.hr.exec(d);if(f)return{type:"hr",raw:f[0]}},w.blockquote=function(d){var f=this.rules.block.blockquote.exec(d);if(f){var h=f[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:f[0],text:h}}},w.list=function(d){var f=this.rules.block.list.exec(d);if(f){for(var h=f[0],m=f[2],R=m.length>1,X=m[m.length-1]===")",be={type:"list",raw:h,ordered:R,start:R?+m.slice(0,-1):"",loose:!1,items:[]},et=f[0].match(this.rules.block.item),dt=!1,at,At,bt,lt,jt,ft,mt,vt=et.length,qe=0;qe<vt;qe++)at=et[qe],h=at,At=at.length,at=at.replace(/^ *([*+-]|\d+[.)]) */,""),~at.indexOf(`
`)&&(At-=at.length,at=this.options.pedantic?at.replace(/^ {1,4}/gm,""):at.replace(new RegExp("^ {1,"+At+"}","gm"),"")),qe!==vt-1&&(bt=this.rules.block.bullet.exec(et[qe+1])[0],(R?bt.length===1||!X&&bt[bt.length-1]===")":bt.length>1||this.options.smartLists&&bt!==m)&&(lt=et.slice(qe+1).join(`
`),be.raw=be.raw.substring(0,be.raw.length-lt.length),qe=vt-1)),jt=dt||/\n\n(?!\s*$)/.test(at),qe!==vt-1&&(dt=at.charAt(at.length-1)===`
`,jt||(jt=dt)),jt&&(be.loose=!0),ft=/^\[[ xX]\] /.test(at),mt=void 0,ft&&(mt=at[1]!==" ",at=at.replace(/^\[[ xX]\] +/,"")),be.items.push({type:"list_item",raw:h,task:ft,checked:mt,loose:jt,text:at});return be}},w.html=function(d){var f=this.rules.block.html.exec(d);if(f)return{type:this.options.sanitize?"paragraph":"html",raw:f[0],pre:!this.options.sanitizer&&(f[1]==="pre"||f[1]==="script"||f[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(f[0]):J(f[0]):f[0]}},w.def=function(d){var f=this.rules.block.def.exec(d);if(f){f[3]&&(f[3]=f[3].substring(1,f[3].length-1));var h=f[1].toLowerCase().replace(/\s+/g," ");return{tag:h,raw:f[0],href:f[2],title:f[3]}}},w.table=function(d){var f=this.rules.block.table.exec(d);if(f){var h={type:"table",header:T(f[1].replace(/^ *| *\| *$/g,"")),align:f[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:f[3]?f[3].replace(/\n$/,"").split(`
`):[]};if(h.header.length===h.align.length){h.raw=f[0];var m=h.align.length,R;for(R=0;R<m;R++)/^ *-+: *$/.test(h.align[R])?h.align[R]="right":/^ *:-+: *$/.test(h.align[R])?h.align[R]="center":/^ *:-+ *$/.test(h.align[R])?h.align[R]="left":h.align[R]=null;for(m=h.cells.length,R=0;R<m;R++)h.cells[R]=T(h.cells[R].replace(/^ *\| *| *\| *$/g,""),h.header.length);return h}}},w.lheading=function(d){var f=this.rules.block.lheading.exec(d);if(f)return{type:"heading",raw:f[0],depth:f[2].charAt(0)==="="?1:2,text:f[1]}},w.paragraph=function(d){var f=this.rules.block.paragraph.exec(d);if(f)return{type:"paragraph",raw:f[0],text:f[1].charAt(f[1].length-1)===`
`?f[1].slice(0,-1):f[1]}},w.text=function(d,f){var h=this.rules.block.text.exec(d);if(h){var m=f[f.length-1];return m&&m.type==="text"?{raw:h[0],text:h[0]}:{type:"text",raw:h[0],text:h[0]}}},w.escape=function(d){var f=this.rules.inline.escape.exec(d);if(f)return{type:"escape",raw:f[0],text:J(f[1])}},w.tag=function(d,f,h){var m=this.rules.inline.tag.exec(d);if(m)return!f&&/^<a /i.test(m[0])?f=!0:f&&/^<\/a>/i.test(m[0])&&(f=!1),!h&&/^<(pre|code|kbd|script)(\s|>)/i.test(m[0])?h=!0:h&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(m[0])&&(h=!1),{type:this.options.sanitize?"text":"html",raw:m[0],inLink:f,inRawBlock:h,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(m[0]):J(m[0]):m[0]}},w.link=function(d){var f=this.rules.inline.link.exec(d);if(f){var h=Q(f[2],"()");if(h>-1){var m=f[0].indexOf("!")===0?5:4,R=m+f[1].length+h;f[2]=f[2].substring(0,h),f[0]=f[0].substring(0,R).trim(),f[3]=""}var X=f[2],be="";if(this.options.pedantic){var et=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(X);et?(X=et[1],be=et[3]):be=""}else be=f[3]?f[3].slice(1,-1):"";X=X.trim().replace(/^<([\s\S]*)>$/,"$1");var dt=Se(f,{href:X&&X.replace(this.rules.inline._escapes,"$1"),title:be&&be.replace(this.rules.inline._escapes,"$1")},f[0]);return dt}},w.reflink=function(d,f){var h;if((h=this.rules.inline.reflink.exec(d))||(h=this.rules.inline.nolink.exec(d))){var m=(h[2]||h[1]).replace(/\s+/g," ");if(m=f[m.toLowerCase()],!m||!m.href){var R=h[0].charAt(0);return{type:"text",raw:R,text:R}}var X=Se(h,m,h[0]);return X}},w.strong=function(d,f,h){h===void 0&&(h="");var m=this.rules.inline.strong.start.exec(d);if(m&&(!m[1]||m[1]&&(h===""||this.rules.inline.punctuation.exec(h)))){f=f.slice(-1*d.length);var R=m[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;R.lastIndex=0;for(var X;(m=R.exec(f))!=null;)if(X=this.rules.inline.strong.middle.exec(f.slice(0,m.index+3)),X)return{type:"strong",raw:d.slice(0,X[0].length),text:d.slice(2,X[0].length-2)}}},w.em=function(d,f,h){h===void 0&&(h="");var m=this.rules.inline.em.start.exec(d);if(m&&(!m[1]||m[1]&&(h===""||this.rules.inline.punctuation.exec(h)))){f=f.slice(-1*d.length);var R=m[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;R.lastIndex=0;for(var X;(m=R.exec(f))!=null;)if(X=this.rules.inline.em.middle.exec(f.slice(0,m.index+2)),X)return{type:"em",raw:d.slice(0,X[0].length),text:d.slice(1,X[0].length-1)}}},w.codespan=function(d){var f=this.rules.inline.code.exec(d);if(f){var h=f[2].replace(/\n/g," "),m=/[^ ]/.test(h),R=h.startsWith(" ")&&h.endsWith(" ");return m&&R&&(h=h.substring(1,h.length-1)),h=J(h,!0),{type:"codespan",raw:f[0],text:h}}},w.br=function(d){var f=this.rules.inline.br.exec(d);if(f)return{type:"br",raw:f[0]}},w.del=function(d){var f=this.rules.inline.del.exec(d);if(f)return{type:"del",raw:f[0],text:f[1]}},w.autolink=function(d,f){var h=this.rules.inline.autolink.exec(d);if(h){var m,R;return h[2]==="@"?(m=J(this.options.mangle?f(h[1]):h[1]),R="mailto:"+m):(m=J(h[1]),R=m),{type:"link",raw:h[0],text:m,href:R,tokens:[{type:"text",raw:m,text:m}]}}},w.url=function(d,f){var h;if(h=this.rules.inline.url.exec(d)){var m,R;if(h[2]==="@")m=J(this.options.mangle?f(h[0]):h[0]),R="mailto:"+m;else{var X;do X=h[0],h[0]=this.rules.inline._backpedal.exec(h[0])[0];while(X!==h[0]);m=J(h[0]),h[1]==="www."?R="http://"+m:R=m}return{type:"link",raw:h[0],text:m,href:R,tokens:[{type:"text",raw:m,text:m}]}}},w.inlineText=function(d,f,h){var m=this.rules.inline.text.exec(d);if(m){var R;return f?R=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(m[0]):J(m[0]):m[0]:R=J(this.options.smartypants?h(m[0]):m[0]),{type:"text",raw:m[0],text:R}}},y}(),Te=Ce.noopTest,de=Ce.edit,me=Ce.merge,j={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]+/};j._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,j._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,j.def=de(j.def).replace("label",j._label).replace("title",j._title).getRegex(),j.bullet=/(?:[*+-]|\d{1,9}[.)])/,j.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,j.item=de(j.item,"gm").replace(/bull/g,j.bullet).getRegex(),j.list=de(j.list).replace(/bull/g,j.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+j.def.source+")").getRegex(),j._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",j._comment=/<!--(?!-?>)[\s\S]*?-->/,j.html=de(j.html,"i").replace("comment",j._comment).replace("tag",j._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),j.paragraph=de(j._paragraph).replace("hr",j.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",j._tag).getRegex(),j.blockquote=de(j.blockquote).replace("paragraph",j.paragraph).getRegex(),j.normal=me({},j),j.gfm=me({},j.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*|$)"}),j.gfm.nptable=de(j.gfm.nptable).replace("hr",j.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",j._tag).getRegex(),j.gfm.table=de(j.gfm.table).replace("hr",j.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",j._tag).getRegex(),j.pedantic=me({},j.normal,{html:de(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",j._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:de(j.normal._paragraph).replace("hr",j.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",j.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var V={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])/};V._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",V.punctuation=de(V.punctuation).replace(/punctuation/g,V._punctuation).getRegex(),V._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",V._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",V.em.start=de(V.em.start).replace(/punctuation/g,V._punctuation).getRegex(),V.em.middle=de(V.em.middle).replace(/punctuation/g,V._punctuation).replace(/overlapSkip/g,V._overlapSkip).getRegex(),V.em.endAst=de(V.em.endAst,"g").replace(/punctuation/g,V._punctuation).getRegex(),V.em.endUnd=de(V.em.endUnd,"g").replace(/punctuation/g,V._punctuation).getRegex(),V.strong.start=de(V.strong.start).replace(/punctuation/g,V._punctuation).getRegex(),V.strong.middle=de(V.strong.middle).replace(/punctuation/g,V._punctuation).replace(/blockSkip/g,V._blockSkip).getRegex(),V.strong.endAst=de(V.strong.endAst,"g").replace(/punctuation/g,V._punctuation).getRegex(),V.strong.endUnd=de(V.strong.endUnd,"g").replace(/punctuation/g,V._punctuation).getRegex(),V.blockSkip=de(V._blockSkip,"g").getRegex(),V.overlapSkip=de(V._overlapSkip,"g").getRegex(),V._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,V._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,V._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])?)+(?![-_])/,V.autolink=de(V.autolink).replace("scheme",V._scheme).replace("email",V._email).getRegex(),V._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,V.tag=de(V.tag).replace("comment",j._comment).replace("attribute",V._attribute).getRegex(),V._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,V._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,V._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,V.link=de(V.link).replace("label",V._label).replace("href",V._href).replace("title",V._title).getRegex(),V.reflink=de(V.reflink).replace("label",V._label).getRegex(),V.reflinkSearch=de(V.reflinkSearch,"g").replace("reflink",V.reflink).replace("nolink",V.nolink).getRegex(),V.normal=me({},V),V.pedantic=me({},V.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:de(/^!?\[(label)\]\((.*?)\)/).replace("label",V._label).getRegex(),reflink:de(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",V._label).getRegex()}),V.gfm=me({},V.normal,{escape:de(V.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),V.gfm.url=de(V.gfm.url,"i").replace("email",V.gfm._extended_email).getRegex(),V.breaks=me({},V.gfm,{br:de(V.br).replace("{2,}","*").getRegex(),text:de(V.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Le={block:j,inline:V},Be=O.defaults,Qe=Le.block,ze=Le.inline;function Ie(y){return y.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 ye(y){var w="",C,d,f=y.length;for(C=0;C<f;C++)d=y.charCodeAt(C),Math.random()>.5&&(d="x"+d.toString(16)),w+="&#"+d+";";return w}var _e=function(){function y(C){this.tokens=[],this.tokens.links=Object.create(null),this.options=C||Be,this.options.tokenizer=this.options.tokenizer||new fe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var d={block:Qe.normal,inline:ze.normal};this.options.pedantic?(d.block=Qe.pedantic,d.inline=ze.pedantic):this.options.gfm&&(d.block=Qe.gfm,this.options.breaks?d.inline=ze.breaks:d.inline=ze.gfm),this.tokenizer.rules=d}y.lex=function(d,f){var h=new y(f);return h.lex(d)};var w=y.prototype;return w.lex=function(d){return d=d.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(d,this.tokens,!0),this.inline(this.tokens),this.tokens},w.blockTokens=function(d,f,h){f===void 0&&(f=[]),h===void 0&&(h=!0),d=d.replace(/^ +$/gm,"");for(var m,R,X,be;d;){if(m=this.tokenizer.space(d)){d=d.substring(m.raw.length),m.type&&f.push(m);continue}if(m=this.tokenizer.code(d,f)){d=d.substring(m.raw.length),m.type?f.push(m):(be=f[f.length-1],be.raw+=`
`+m.raw,be.text+=`
`+m.text);continue}if(m=this.tokenizer.fences(d)){d=d.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.heading(d)){d=d.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.nptable(d)){d=d.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.hr(d)){d=d.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.blockquote(d)){d=d.substring(m.raw.length),m.tokens=this.blockTokens(m.text,[],h),f.push(m);continue}if(m=this.tokenizer.list(d)){for(d=d.substring(m.raw.length),X=m.items.length,R=0;R<X;R++)m.items[R].tokens=this.blockTokens(m.items[R].text,[],!1);f.push(m);continue}if(m=this.tokenizer.html(d)){d=d.substring(m.raw.length),f.push(m);continue}if(h&&(m=this.tokenizer.def(d))){d=d.substring(m.raw.length),this.tokens.links[m.tag]||(this.tokens.links[m.tag]={href:m.href,title:m.title});continue}if(m=this.tokenizer.table(d)){d=d.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.lheading(d)){d=d.substring(m.raw.length),f.push(m);continue}if(h&&(m=this.tokenizer.paragraph(d))){d=d.substring(m.raw.length),f.push(m);continue}if(m=this.tokenizer.text(d,f)){d=d.substring(m.raw.length),m.type?f.push(m):(be=f[f.length-1],be.raw+=`
`+m.raw,be.text+=`
`+m.text);continue}if(d){var et="Infinite loop on byte: "+d.charCodeAt(0);if(this.options.silent){console.error(et);break}else throw new Error(et)}}return f},w.inline=function(d){var f,h,m,R,X,be,et=d.length;for(f=0;f<et;f++){be=d[f];switch(be.type){case"paragraph":case"text":case"heading":{be.tokens=[],this.inlineTokens(be.text,be.tokens);break}case"table":{for(be.tokens={header:[],cells:[]},R=be.header.length,h=0;h<R;h++)be.tokens.header[h]=[],this.inlineTokens(be.header[h],be.tokens.header[h]);for(R=be.cells.length,h=0;h<R;h++)for(X=be.cells[h],be.tokens.cells[h]=[],m=0;m<X.length;m++)be.tokens.cells[h][m]=[],this.inlineTokens(X[m],be.tokens.cells[h][m]);break}case"blockquote":{this.inline(be.tokens);break}case"list":{for(R=be.items.length,h=0;h<R;h++)this.inline(be.items[h].tokens);break}}}return d},w.inlineTokens=function(d,f,h,m,R){f===void 0&&(f=[]),h===void 0&&(h=!1),m===void 0&&(m=!1),R===void 0&&(R="");var X,be=d,et;if(this.tokens.links){var dt=Object.keys(this.tokens.links);if(dt.length>0)for(;(et=this.tokenizer.rules.inline.reflinkSearch.exec(be))!=null;)dt.includes(et[0].slice(et[0].lastIndexOf("[")+1,-1))&&(be=be.slice(0,et.index)+"["+"a".repeat(et[0].length-2)+"]"+be.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(et=this.tokenizer.rules.inline.blockSkip.exec(be))!=null;)be=be.slice(0,et.index)+"["+"a".repeat(et[0].length-2)+"]"+be.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;d;){if(X=this.tokenizer.escape(d)){d=d.substring(X.raw.length),f.push(X);continue}if(X=this.tokenizer.tag(d,h,m)){d=d.substring(X.raw.length),h=X.inLink,m=X.inRawBlock,f.push(X);continue}if(X=this.tokenizer.link(d)){d=d.substring(X.raw.length),X.type==="link"&&(X.tokens=this.inlineTokens(X.text,[],!0,m)),f.push(X);continue}if(X=this.tokenizer.reflink(d,this.tokens.links)){d=d.substring(X.raw.length),X.type==="link"&&(X.tokens=this.inlineTokens(X.text,[],!0,m)),f.push(X);continue}if(X=this.tokenizer.strong(d,be,R)){d=d.substring(X.raw.length),X.tokens=this.inlineTokens(X.text,[],h,m),f.push(X);continue}if(X=this.tokenizer.em(d,be,R)){d=d.substring(X.raw.length),X.tokens=this.inlineTokens(X.text,[],h,m),f.push(X);continue}if(X=this.tokenizer.codespan(d)){d=d.substring(X.raw.length),f.push(X);continue}if(X=this.tokenizer.br(d)){d=d.substring(X.raw.length),f.push(X);continue}if(X=this.tokenizer.del(d)){d=d.substring(X.raw.length),X.tokens=this.inlineTokens(X.text,[],h,m),f.push(X);continue}if(X=this.tokenizer.autolink(d,ye)){d=d.substring(X.raw.length),f.push(X);continue}if(!h&&(X=this.tokenizer.url(d,ye))){d=d.substring(X.raw.length),f.push(X);continue}if(X=this.tokenizer.inlineText(d,m,Ie)){d=d.substring(X.raw.length),R=X.raw.slice(-1),f.push(X);continue}if(d){var at="Infinite loop on byte: "+d.charCodeAt(0);if(this.options.silent){console.error(at);break}else throw new Error(at)}}return f},xe(y,null,[{key:"rules",get:function(){return{block:Qe,inline:ze}}}]),y}(),De=O.defaults,We=Ce.cleanUrl,Ue=Ce.escape,ve=function(){function y(C){this.options=C||De}var w=y.prototype;return w.code=function(d,f,h){var m=(f||"").match(/\S*/)[0];if(this.options.highlight){var R=this.options.highlight(d,m);R!=null&&R!==d&&(h=!0,d=R)}return m?'<pre><code class="'+this.options.langPrefix+Ue(m,!0)+'">'+(h?d:Ue(d,!0))+`</code></pre>
`:"<pre><code>"+(h?d:Ue(d,!0))+`</code></pre>
`},w.blockquote=function(d){return`<blockquote>
`+d+`</blockquote>
`},w.html=function(d){return d},w.heading=function(d,f,h,m){return this.options.headerIds?"<h"+f+' id="'+this.options.headerPrefix+m.slug(h)+'">'+d+"</h"+f+`>
`:"<h"+f+">"+d+"</h"+f+`>
`},w.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},w.list=function(d,f,h){var m=f?"ol":"ul",R=f&&h!==1?' start="'+h+'"':"";return"<"+m+R+`>
`+d+"</"+m+`>
`},w.listitem=function(d){return"<li>"+d+`</li>
`},w.checkbox=function(d){return"<input "+(d?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},w.paragraph=function(d){return"<p>"+d+`</p>
`},w.table=function(d,f){return f&&(f="<tbody>"+f+"</tbody>"),`<table>
<thead>
`+d+`</thead>
`+f+`</table>
`},w.tablerow=function(d){return`<tr>
`+d+`</tr>
`},w.tablecell=function(d,f){var h=f.header?"th":"td",m=f.align?"<"+h+' align="'+f.align+'">':"<"+h+">";return m+d+"</"+h+`>
`},w.strong=function(d){return"<strong>"+d+"</strong>"},w.em=function(d){return"<em>"+d+"</em>"},w.codespan=function(d){return"<code>"+d+"</code>"},w.br=function(){return this.options.xhtml?"<br/>":"<br>"},w.del=function(d){return"<del>"+d+"</del>"},w.link=function(d,f,h){if(d=We(this.options.sanitize,this.options.baseUrl,d),d===null)return h;var m='<a href="'+Ue(d)+'"';return f&&(m+=' title="'+f+'"'),m+=">"+h+"</a>",m},w.image=function(d,f,h){if(d=We(this.options.sanitize,this.options.baseUrl,d),d===null)return h;var m='<img src="'+d+'" alt="'+h+'"';return f&&(m+=' title="'+f+'"'),m+=this.options.xhtml?"/>":">",m},w.text=function(d){return d},y}(),we=function(){function y(){}var w=y.prototype;return w.strong=function(d){return d},w.em=function(d){return d},w.codespan=function(d){return d},w.del=function(d){return d},w.html=function(d){return d},w.text=function(d){return d},w.link=function(d,f,h){return""+h},w.image=function(d,f,h){return""+h},w.br=function(){return""},y}(),Je=function(){function y(){this.seen={}}var w=y.prototype;return w.slug=function(d){var f=d.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(f)){var h=f;do this.seen[h]++,f=h+"-"+this.seen[h];while(this.seen.hasOwnProperty(f))}return this.seen[f]=0,f},y}(),$e=O.defaults,Ve=Ce.unescape,Ke=function(){function y(C){this.options=C||$e,this.options.renderer=this.options.renderer||new ve,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new we,this.slugger=new Je}y.parse=function(d,f){var h=new y(f);return h.parse(d)};var w=y.prototype;return w.parse=function(d,f){f===void 0&&(f=!0);var h="",m,R,X,be,et,dt,at,At,bt,lt,jt,ft,mt,vt,qe,en,Ut,Jt,cn=d.length;for(m=0;m<cn;m++){lt=d[m];switch(lt.type){case"space":continue;case"hr":{h+=this.renderer.hr();continue}case"heading":{h+=this.renderer.heading(this.parseInline(lt.tokens),lt.depth,Ve(this.parseInline(lt.tokens,this.textRenderer)),this.slugger);continue}case"code":{h+=this.renderer.code(lt.text,lt.lang,lt.escaped);continue}case"table":{for(At="",at="",be=lt.header.length,R=0;R<be;R++)at+=this.renderer.tablecell(this.parseInline(lt.tokens.header[R]),{header:!0,align:lt.align[R]});for(At+=this.renderer.tablerow(at),bt="",be=lt.cells.length,R=0;R<be;R++){for(dt=lt.tokens.cells[R],at="",et=dt.length,X=0;X<et;X++)at+=this.renderer.tablecell(this.parseInline(dt[X]),{header:!1,align:lt.align[X]});bt+=this.renderer.tablerow(at)}h+=this.renderer.table(At,bt);continue}case"blockquote":{bt=this.parse(lt.tokens),h+=this.renderer.blockquote(bt);continue}case"list":{for(jt=lt.ordered,ft=lt.start,mt=lt.loose,be=lt.items.length,bt="",R=0;R<be;R++)qe=lt.items[R],en=qe.checked,Ut=qe.task,vt="",qe.task&&(Jt=this.renderer.checkbox(en),mt?qe.tokens.length>0&&qe.tokens[0].type==="text"?(qe.tokens[0].text=Jt+" "+qe.tokens[0].text,qe.tokens[0].tokens&&qe.tokens[0].tokens.length>0&&qe.tokens[0].tokens[0].type==="text"&&(qe.tokens[0].tokens[0].text=Jt+" "+qe.tokens[0].tokens[0].text)):qe.tokens.unshift({type:"text",text:Jt}):vt+=Jt),vt+=this.parse(qe.tokens,mt),bt+=this.renderer.listitem(vt,Ut,en);h+=this.renderer.list(bt,jt,ft);continue}case"html":{h+=this.renderer.html(lt.text);continue}case"paragraph":{h+=this.renderer.paragraph(this.parseInline(lt.tokens));continue}case"text":{for(bt=lt.tokens?this.parseInline(lt.tokens):lt.text;m+1<cn&&d[m+1].type==="text";)lt=d[++m],bt+=`
`+(lt.tokens?this.parseInline(lt.tokens):lt.text);h+=f?this.renderer.paragraph(bt):bt;continue}default:{var pn='Token with "'+lt.type+'" type was not found.';if(this.options.silent){console.error(pn);return}else throw new Error(pn)}}}return h},w.parseInline=function(d,f){f=f||this.renderer;var h="",m,R,X=d.length;for(m=0;m<X;m++){R=d[m];switch(R.type){case"escape":{h+=f.text(R.text);break}case"html":{h+=f.html(R.text);break}case"link":{h+=f.link(R.href,R.title,this.parseInline(R.tokens,f));break}case"image":{h+=f.image(R.href,R.title,R.text);break}case"strong":{h+=f.strong(this.parseInline(R.tokens,f));break}case"em":{h+=f.em(this.parseInline(R.tokens,f));break}case"codespan":{h+=f.codespan(R.text);break}case"br":{h+=f.br();break}case"del":{h+=f.del(this.parseInline(R.tokens,f));break}case"text":{h+=f.text(R.text);break}default:{var be='Token with "'+R.type+'" type was not found.';if(this.options.silent){console.error(be);return}else throw new Error(be)}}}return h},y}(),it=Ce.merge,Ye=Ce.checkSanitizeDeprecation,Ge=Ce.escape,re=O.getDefaults,rt=O.changeDefaults,Xe=O.defaults;function ue(y,w,C){if(typeof y=="undefined"||y===null)throw new Error("marked(): input parameter is undefined or null");if(typeof y!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(y)+", string expected");if(typeof w=="function"&&(C=w,w=null),w=it({},ue.defaults,w||{}),Ye(w),C){var d=w.highlight,f;try{f=_e.lex(y,w)}catch(X){return C(X)}var h=function(be){var et;if(!be)try{et=Ke.parse(f,w)}catch(dt){be=dt}return w.highlight=d,be?C(be):C(null,et)};if(!d||d.length<3)return h();if(delete w.highlight,!f.length)return h();var m=0;ue.walkTokens(f,function(X){X.type==="code"&&(m++,setTimeout(function(){d(X.text,X.lang,function(be,et){if(be)return h(be);et!=null&&et!==X.text&&(X.text=et,X.escaped=!0),m--,m===0&&h()})},0))}),m===0&&h();return}try{var R=_e.lex(y,w);return w.walkTokens&&ue.walkTokens(R,w.walkTokens),Ke.parse(R,w)}catch(X){if(X.message+=`
Please report this to https://github.com/markedjs/marked.`,w.silent)return"<p>An error occurred:</p><pre>"+Ge(X.message+"",!0)+"</pre>";throw X}}ue.options=ue.setOptions=function(y){return it(ue.defaults,y),rt(ue.defaults),ue},ue.getDefaults=re,ue.defaults=Xe,ue.use=function(y){var w=it({},y);if(y.renderer&&function(){var d=ue.defaults.renderer||new ve,f=function(R){var X=d[R];d[R]=function(){for(var be=arguments.length,et=new Array(be),dt=0;dt<be;dt++)et[dt]=arguments[dt];var at=y.renderer[R].apply(d,et);return at===!1&&(at=X.apply(d,et)),at}};for(var h in y.renderer)f(h);w.renderer=d}(),y.tokenizer&&function(){var d=ue.defaults.tokenizer||new fe,f=function(R){var X=d[R];d[R]=function(){for(var be=arguments.length,et=new Array(be),dt=0;dt<be;dt++)et[dt]=arguments[dt];var at=y.tokenizer[R].apply(d,et);return at===!1&&(at=X.apply(d,et)),at}};for(var h in y.tokenizer)f(h);w.tokenizer=d}(),y.walkTokens){var C=ue.defaults.walkTokens;w.walkTokens=function(d){y.walkTokens(d),C&&C(d)}}ue.setOptions(w)},ue.walkTokens=function(y,w){for(var C=ae(y),d;!(d=C()).done;){var f=d.value;w(f);switch(f.type){case"table":{for(var h=ae(f.tokens.header),m;!(m=h()).done;){var R=m.value;ue.walkTokens(R,w)}for(var X=ae(f.tokens.cells),be;!(be=X()).done;)for(var et=be.value,dt=ae(et),at;!(at=dt()).done;){var At=at.value;ue.walkTokens(At,w)}break}case"list":{ue.walkTokens(f.items,w);break}default:f.tokens&&ue.walkTokens(f.tokens,w)}}},ue.Parser=Ke,ue.parser=Ke.parse,ue.Renderer=ve,ue.TextRenderer=we,ue.Lexer=_e,ue.lexer=_e.lex,ue.Tokenizer=fe,ue.Slugger=Je,ue.parse=ue;var Oe=ue;return Oe})},ELLl:function(st,je,p){(function(M){M(p("VrN/"))})(function(M){var xe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},z=M.Pos;M.defineOption("autoCloseBrackets",!1,function(D,k,L){L&&L!=M.Init&&(D.removeKeyMap(ae),D.state.closeBrackets=null),k&&(q(ie(k,"pairs")),D.state.closeBrackets=k,D.addKeyMap(ae))});function ie(D,k){return k=="pairs"&&typeof D=="string"?D:typeof D=="object"&&D[k]!=null?D[k]:xe[k]}var ae={Backspace:_,Enter:te};function q(D){for(var k=0;k<D.length;k++){var L=D.charAt(k),B="'"+L+"'";ae[B]||(ae[B]=O(L))}}q(xe.pairs+"`");function O(D){return function(k){return U(k,D)}}function S(D){var k=D.state.closeBrackets;if(!k||k.override)return k;var L=D.getModeAt(D.getCursor());return L.closeBrackets||k}function _(D){var k=S(D);if(!k||D.getOption("disableInput"))return M.Pass;for(var L=ie(k,"pairs"),B=D.listSelections(),F=0;F<B.length;F++){if(!B[F].empty())return M.Pass;var he=ce(D,B[F].head);if(!he||L.indexOf(he)%2!=0)return M.Pass}for(var F=B.length-1;F>=0;F--){var Ne=B[F].head;D.replaceRange("",z(Ne.line,Ne.ch-1),z(Ne.line,Ne.ch+1),"+delete")}}function te(D){var k=S(D),L=k&&ie(k,"explode");if(!L||D.getOption("disableInput"))return M.Pass;for(var B=D.listSelections(),F=0;F<B.length;F++){if(!B[F].empty())return M.Pass;var he=ce(D,B[F].head);if(!he||L.indexOf(he)%2!=0)return M.Pass}D.operation(function(){var Ne=D.lineSeparator()||`
`;D.replaceSelection(Ne+Ne,null),D.execCommand("goCharLeft"),B=D.listSelections();for(var G=0;G<B.length;G++){var oe=B[G].head.line;D.indentLine(oe,null,!0),D.indentLine(oe+1,null,!0)}})}function P(D){var k=M.cmpPos(D.anchor,D.head)>0;return{anchor:new z(D.anchor.line,D.anchor.ch+(k?-1:1)),head:new z(D.head.line,D.head.ch+(k?1:-1))}}function U(D,k){var L=S(D);if(!L||D.getOption("disableInput"))return M.Pass;var B=ie(L,"pairs"),F=B.indexOf(k);if(F==-1)return M.Pass;for(var he=ie(L,"closeBefore"),Ne=ie(L,"triples"),G=B.charAt(F+1)==k,oe=D.listSelections(),se=F%2==0,Z,ee=0;ee<oe.length;ee++){var pe=oe[ee],Y=pe.head,v,W=D.getRange(Y,z(Y.line,Y.ch+1));if(se&&!pe.empty())v="surround";else if((G||!se)&&W==k)G&&H(D,Y)?v="both":Ne.indexOf(k)>=0&&D.getRange(Y,z(Y.line,Y.ch+3))==k+k+k?v="skipThree":v="skip";else if(G&&Y.ch>1&&Ne.indexOf(k)>=0&&D.getRange(z(Y.line,Y.ch-2),Y)==k+k){if(Y.ch>2&&/\bstring/.test(D.getTokenTypeAt(z(Y.line,Y.ch-2))))return M.Pass;v="addFour"}else if(G){var N=Y.ch==0?" ":D.getRange(z(Y.line,Y.ch-1),Y);if(!M.isWordChar(W)&&N!=k&&!M.isWordChar(N))v="both";else return M.Pass}else if(se&&(W.length===0||/\s/.test(W)||he.indexOf(W)>-1))v="both";else return M.Pass;if(!Z)Z=v;else if(Z!=v)return M.Pass}var x=F%2?B.charAt(F-1):k,$=F%2?k:B.charAt(F+1);D.operation(function(){if(Z=="skip")D.execCommand("goCharRight");else if(Z=="skipThree")for(var le=0;le<3;le++)D.execCommand("goCharRight");else if(Z=="surround"){for(var K=D.getSelections(),le=0;le<K.length;le++)K[le]=x+K[le]+$;D.replaceSelections(K,"around"),K=D.listSelections().slice();for(var le=0;le<K.length;le++)K[le]=P(K[le]);D.setSelections(K)}else Z=="both"?(D.replaceSelection(x+$,null),D.triggerElectric(x+$),D.execCommand("goCharLeft")):Z=="addFour"&&(D.replaceSelection(x+x+x+x,"before"),D.execCommand("goCharRight"))})}function ce(D,k){var L=D.getRange(z(k.line,k.ch-1),z(k.line,k.ch+1));return L.length==2?L:null}function H(D,k){var L=D.getTokenAt(z(k.line,k.ch+1));return/\bstring/.test(L.type)&&L.start==k.ch&&(k.ch==0||!/\bstring/.test(D.getTokenTypeAt(k)))}})},F8wB:function(st,je,p){st.exports={loading:"loading___1SIOG"}},Gytx:function(st,je){st.exports=function(M,xe,z,ie){var ae=z?z.call(ie,M,xe):void 0;if(ae!==void 0)return!!ae;if(M===xe)return!0;if(typeof M!="object"||!M||typeof xe!="object"||!xe)return!1;var q=Object.keys(M),O=Object.keys(xe);if(q.length!==O.length)return!1;for(var S=Object.prototype.hasOwnProperty.bind(xe),_=0;_<q.length;_++){var te=q[_];if(!S(te))return!1;var P=M[te],U=xe[te];if(ae=z?z.call(ie,P,U,te):void 0,ae===!1||ae===void 0&&P!==U)return!1}return!0}},HV1I:function(st,je,p){st.exports={flex_box_center:"flex_box_center___1nEOe",flex_space_between:"flex_space_between___21gJ7",flex_box_vertical_center:"flex_box_vertical_center___2iHIq",flex_box_center_end:"flex_box_center_end___19LSZ",flex_box_column:"flex_box_column___2zG50",bg:"bg___u_uqy",formWrap:"formWrap___3rl8w"}},HmJG:function(st,je,p){},LdHM:function(st,je,p){"use strict";p.d(je,"b",function(){return he}),p.d(je,"a",function(){return G});var M=p("1OyB"),xe=p("vuIU"),z=p("Ji7U"),ie=p("LK+K"),ae=p("q1tI"),q=p("rePB"),O=p("Ff2n"),S=p("ODXe"),_=p("4IlW"),te=p("bX4T"),P=p("YrtM"),U=p("TSYQ"),ce=p.n(U),H=p("+nKL"),D=p("8OUc"),k=function(T,J){var Q=T.prefixCls,Se=T.id,Ae=T.flattenOptions,fe=T.childrenAsData,Te=T.values,de=T.searchValue,me=T.multiple,j=T.defaultActiveFirstOption,V=T.height,Le=T.itemHeight,Be=T.notFoundContent,Qe=T.open,ze=T.menuItemSelectedIcon,Ie=T.virtual,ye=T.onSelect,_e=T.onToggleOpen,De=T.onActiveValue,We=T.onScroll,Ue=T.onMouseEnter,ve="".concat(Q,"-item"),we=Object(P.a)(function(){return Ae},[Qe,Ae],function(Oe,y){return y[0]&&Oe[1]!==y[1]}),Je=ae.useRef(null),$e=function(y){y.preventDefault()},Ve=function(y){Je.current&&Je.current.scrollTo({index:y})},Ke=function(y){for(var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,C=we.length,d=0;d<C;d+=1){var f=(y+d*w+C)%C,h=we[f],m=h.group,R=h.data;if(!m&&!R.disabled)return f}return-1},it=ae.useState(function(){return Ke(0)}),Ye=Object(S.a)(it,2),Ge=Ye[0],re=Ye[1],rt=function(y){re(y);var w=we[y];if(!w){De(null,-1);return}De(w.data.value,y)};ae.useEffect(function(){rt(j!==!1?Ke(0):-1)},[we.length,de]),ae.useEffect(function(){var Oe=setTimeout(function(){if(!me&&Qe&&Te.size===1){var y=Array.from(Te)[0],w=we.findIndex(function(C){var d=C.data;return d.value===y});rt(w),Ve(w)}});return function(){return clearTimeout(Oe)}},[Qe]);var Xe=function(y){y!==void 0&&ye(y,{selected:!Te.has(y)}),me||_e(!1)};if(ae.useImperativeHandle(J,function(){return{onKeyDown:function(y){var w=y.which;switch(w){case _.a.UP:case _.a.DOWN:{var C=0;if(w===_.a.UP?C=-1:w===_.a.DOWN&&(C=1),C!==0){var d=Ke(Ge+C,C);Ve(d),rt(d)}break}case _.a.ENTER:{var f=we[Ge];f&&!f.data.disabled?Xe(f.data.value):Xe(void 0),Qe&&y.preventDefault();break}case _.a.ESC:_e(!1)}},onKeyUp:function(){},scrollTo:function(y){Ve(y)}}}),we.length===0)return ae.createElement("div",{role:"listbox",id:"".concat(Se,"_list"),className:"".concat(ve,"-empty"),onMouseDown:$e},Be);function ue(Oe){var y=we[Oe];if(!y)return null;var w=y.data||{},C=w.value,d=w.label,f=w.children,h=Object(te.a)(w,!0),m=fe?f:d;return y?ae.createElement("div",Object.assign({"aria-label":typeof m=="string"?m:null},h,{key:Oe,role:"option",id:"".concat(Se,"_list_").concat(Oe),"aria-selected":Te.has(C)}),C):null}return ae.createElement(ae.Fragment,null,ae.createElement("div",{role:"listbox",id:"".concat(Se,"_list"),style:{height:0,width:0,overflow:"hidden"}},ue(Ge-1),ue(Ge),ue(Ge+1)),ae.createElement(H.a,{itemKey:"key",ref:Je,data:we,height:V,itemHeight:Le,fullHeight:!1,onMouseDown:$e,onScroll:We,virtual:Ie,onMouseEnter:Ue},function(Oe,y){var w,C=Oe.group,d=Oe.groupOption,f=Oe.data,h=f.label,m=f.key;if(C)return ae.createElement("div",{className:ce()(ve,"".concat(ve,"-group"))},h!==void 0?h:m);var R=f.disabled,X=f.value,be=f.title,et=f.children,dt=f.style,at=f.className,At=Object(O.a)(f,["disabled","value","title","children","style","className"]),bt=Te.has(X),lt="".concat(ve,"-option"),jt=ce()(ve,lt,at,(w={},Object(q.a)(w,"".concat(lt,"-grouped"),d),Object(q.a)(w,"".concat(lt,"-active"),Ge===y&&!R),Object(q.a)(w,"".concat(lt,"-disabled"),R),Object(q.a)(w,"".concat(lt,"-selected"),bt),w)),ft=fe?et:h,mt=!ze||typeof ze=="function"||bt;return ae.createElement("div",Object.assign({},At,{"aria-selected":bt,className:jt,title:be,onMouseMove:function(){if(Ge===y||R)return;rt(y)},onClick:function(){R||Xe(X)},style:dt}),ae.createElement("div",{className:"".concat(lt,"-content")},ft||X),ae.isValidElement(ze)||bt,mt&&ae.createElement(D.a,{className:"".concat(ve,"-option-state"),customizeIcon:ze,customizeIconProps:{isSelected:bt}},bt?"\u2713":null))}))},L=ae.forwardRef(k);L.displayName="OptionList";var B=L,F=function(){return null};F.isSelectOption=!0;var he=F,Ne=function(){return null};Ne.isSelectOptGroup=!0;var G=Ne,oe=p("VTBJ"),se=p("Zm9Q");function Z(c){var T=c.key,J=c.props,Q=J.children,Se=J.value,Ae=Object(O.a)(J,["children","value"]);return Object(oe.a)({key:T,value:Se!==void 0?Se:T,children:Q},Ae)}function ee(c){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(se.a)(c).map(function(J,Q){if(!ae.isValidElement(J)||!J.type)return null;var Se=J.type.isSelectOptGroup,Ae=J.key,fe=J.props,Te=fe.children,de=Object(O.a)(fe,["children"]);return T||!Se?Z(J):Object(oe.a)(Object(oe.a)({key:"__RC_SELECT_GRP__".concat(Ae===null?Q:Ae,"__"),label:Ae},de),{},{options:ee(Te)})}).filter(function(J){return J})}var pe=p("2Qr1"),Y=p("qNPg"),v=p("U8pU"),W=p("Kwbf"),N=p("WKfj");function x(c){var T=c.mode,J=c.options,Q=c.children,Se=c.backfill,Ae=c.allowClear,fe=c.placeholder,Te=c.getInputElement,de=c.showSearch,me=c.onSearch,j=c.defaultOpen,V=c.autoFocus,Le=c.labelInValue,Be=c.value,Qe=c.inputValue,ze=c.optionLabelProp,Ie=T==="multiple"||T==="tags",ye=de!==void 0?de:Ie||T==="combobox",_e=J||ee(Q);if(Object(W.a)(T!=="tags"||_e.every(function(ve){return!ve.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),T==="tags"||T==="combobox"){var De=_e.some(function(ve){return ve.options?ve.options.some(function(we){return typeof("value"in we?we.value:we.key)=="number"}):typeof("value"in ve?ve.value:ve.key)=="number"});Object(W.a)(!De,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(W.a)(T!=="combobox"||!ze,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(W.a)(T==="combobox"||!Se,"`backfill` only works with `combobox` mode."),Object(W.a)(T==="combobox"||!Te,"`getInputElement` only work with `combobox` mode."),Object(W.b)(T!=="combobox"||!Te||!Ae||!fe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),me&&!ye&&T!=="combobox"&&T!=="tags"&&Object(W.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(W.b)(!j||V,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Be!=null){var We=Object(N.d)(Be);Object(W.a)(!Le||We.every(function(ve){return Object(v.a)(ve)==="object"&&("key"in ve||"value"in ve)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(W.a)(!Ie||Array.isArray(Be),"`value` should be array when `mode` is `multiple` or `tags`")}if(Q){var Ue=null;Object(se.a)(Q).some(function(ve){if(!ae.isValidElement(ve)||!ve.type)return!1;var we=ve.type;if(we.isSelectOption)return!1;if(we.isSelectOptGroup){var Je=Object(se.a)(ve.props.children).every(function($e){return!ae.isValidElement($e)||!ve.type||$e.type.isSelectOption?!0:(Ue=$e.type,!1)});return!Je}return Ue=we,!0}),Ue&&Object(W.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ue.displayName||Ue.name||Ue,"`.")),Object(W.a)(Qe===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var $=x,le=Object(Y.a)({prefixCls:"rc-select",components:{optionList:B},convertChildrenToData:ee,flattenOptions:pe.d,getLabeledValue:pe.e,filterOptions:pe.b,isValueDisabled:pe.g,findValueOption:pe.c,warningProps:$,fillOptionsWithMissingValue:pe.a}),K=function(c){Object(z.a)(J,c);var T=Object(ie.a)(J);function J(){var Q;return Object(M.a)(this,J),Q=T.apply(this,arguments),Q.selectRef=ae.createRef(),Q.focus=function(){Q.selectRef.current.focus()},Q.blur=function(){Q.selectRef.current.blur()},Q}return Object(xe.a)(J,[{key:"render",value:function(){return ae.createElement(le,Object.assign({ref:this.selectRef},this.props))}}]),J}(ae.Component);K.Option=he,K.OptGroup=G;var Ce=K,g=je.c=Ce},Ly88:function(st,je,p){"use strict";p.r(je);var M=p("14J3"),xe=p("BMrR"),z=p("jCWc"),ie=p("kPKH"),ae=p("OaEy"),q=p("2fM7"),O=p("7Kak"),S=p("9yH6"),_=p("5NDa"),te=p("5rEg"),P=p("2qtc"),U=p("kLXV"),ce=p("miYZ"),H=p("tsqr"),D=p("9og8"),k=p("k1fw"),L=p("y8nQ"),B=p("Vl3Y"),F=p("tJVT"),he=p("PpiC"),Ne=p("WmNS"),G=p.n(Ne),oe=p("q1tI"),se=p.n(oe),Z=p("9kvl"),ee=p("Ot1p"),pe=p("HBuW"),Y=p("HV1I"),v=p.n(Y),W=p("LvDl"),N=p.n(W),x=p("9ZNV"),$=p("nuEh"),le=p("fnXi"),K=p("UqFu"),Ce=p("2RCv"),g={1:[100,200],2:[300,400,500,600],3:[700,800,900,1e3]},c=function(J){var Q,Se,Ae,fe=J.shixunsDetail,Te=J.dispatch,de=J.match,me=J.practiceSetting,j=Object(he.a)(J,["shixunsDetail","dispatch","match","practiceSetting"]),V=B.a.useForm(),Le=Object(F.a)(V,1),Be=Le[0],Qe=Object(oe.useState)({}),ze=Object(F.a)(Qe,2),Ie=ze[0],ye=ze[1],_e=Object(oe.useState)([100,200]),De=Object(F.a)(_e,2),We=De[0],Ue=De[1],ve=fe.challengesNew,we=Object(oe.useState)(),Je=Object(F.a)(we,2),$e=Je[0],Ve=Je[1],Ke=Object(oe.useState)(),it=Object(F.a)(Ke,2),Ye=it[0],Ge=it[1],re=Object(oe.useState)(!0),rt=Object(F.a)(re,2),Xe=rt[0],ue=rt[1],Oe=Object(oe.useState)(1),y=Object(F.a)(Oe,2),w=y[0],C=y[1],d=Object(oe.useRef)({subject:"",difficulty:1,score:100,task_pass:Object(K.a)(ve.task_pass_default)}),f=Object(oe.useRef)(null),h=me.selectQuestionParams,m=me.id,R=me.newQuestion;Object(oe.useEffect)(function(){de.params.challengesId?(Ge(!0),X()):(ue(!0),Ge(!1),Te({type:"shixunsDetail/getChallengesNew",payload:Object(k.a)({},de.params)}),ue(!1)),setTimeout(function(){document.getElementById("practice-scroll").scrollTo(0,0)},300)},[de.params]),Object(oe.useEffect)(function(){return bt(),function(){clearTimeout(f.current)}},[Ie]);var X=function(){var ft=Object(D.a)(G.a.mark(function mt(){var vt,qe;return G.a.wrap(function(Ut){for(;;)switch(Ut.prev=Ut.next){case 0:return ue(!0),Ut.next=3,Object(pe.D)({id:de.params.id,challengeId:de.params.challengesId,tab:0});case 3:vt=Ut.sent,vt&&(qe=Object(k.a)(Object(k.a)({},vt),{},{task_pass:Object(K.a)(vt.task_pass)}),Ve(qe),be(qe),ue(!1),d.current={subject:qe.subject,difficulty:qe.difficulty,score:qe.score,task_pass:qe.task_pass});case 5:case"end":return Ut.stop()}},mt)}));return function(){return ft.apply(this,arguments)}}(),be=function(mt){var vt={subject:mt.name,difficulty:mt.difficulty,score:mt.score,challenge_tag:mt.tags,task_pass:mt.task_pass},qe=g[mt.difficulty];Ue(qe),Be.setFieldsValue(Object(k.a)({},vt)),ye(Object(k.a)({},vt))},et=function(mt){var vt=g[mt],qe=vt==null?void 0:vt[0];Ue(vt),Be.setFieldsValue({score:qe}),ye(Object(k.a)(Object(k.a)({},Be.getFieldsValue()),{score:qe}))},dt=function(mt,vt){ye(Object(k.a)({},Be.getFieldsValue())),"difficulty"in mt&&et(mt.difficulty)},at=function(){var ft=Object(D.a)(G.a.mark(function mt(){var vt,qe,en,Ut,Jt,cn=arguments;return G.a.wrap(function(Zt){for(;;)switch(Zt.prev=Zt.next){case 0:if(qe=cn.length>0&&cn[0]!==void 0?cn[0]:{},!(!Ye&&((vt=fe.detail)===null||vt===void 0?void 0:vt.shixun_status)===2)){Zt.next=4;break}return H.b.info("\u8BE5\u5B9E\u8BAD\u5DF2\u7ECF\u53D1\u5E03\u4E0D\u80FD\u65B0\u5EFA"),Zt.abrupt("return");case 4:if(!Ye){Zt.next=10;break}return Zt.next=7,Object(pe.Fb)(Object(k.a)(Object(k.a)({},de.params),{},{tab:0,challenge:Object(k.a)({},qe),challenge_tag:qe.challenge_tag}));case 7:return en=Zt.sent,en&&(Te({type:"practiceSetting/setUpdateIndex"}),Z.d.replace("/shixuns/".concat(de.params.id,"/edit/").concat(de.params.challengesId,"/tab=2"))),Zt.abrupt("return");case 10:return Ut=Object(k.a)({},Ie),Ut.identifier=de.params.id,Ut.st=0,Zt.next=15,Object(pe.b)(Object(k.a)({},Ut));case 15:Jt=Zt.sent,Jt.status===1&&(Z.d.replace("/shixuns/".concat(de.params.id,"/edit/").concat(Jt.challenge_id,"/tab=2")),setTimeout(function(){Te({type:"practiceSetting/setParams",payload:{newQuestion:null}}),Te({type:"practiceSetting/setUpdateIndex"})},200));case 17:case"end":return Zt.stop()}},mt)}));return function(){return ft.apply(this,arguments)}}(),At=function(){jt()},bt=function(){clearTimeout(f.current),f.current=setTimeout(lt,500)},lt=function(){"subject"in Ie&&R&&Te({type:"practiceSetting/setParams",payload:{newQuestion:{st:0,name:Ie==null?void 0:Ie.subject}}});var mt=["subject","difficulty","score","task_pass"],vt=mt.some(function(qe){var en=Object(W.isNumber)(Ie[qe])?String(Ie[qe]):Ie[qe],Ut=Object(W.isNumber)(d.current[qe])?String(d.current[qe]):d.current[qe];return!Object(W.isEqual)(en,Ut)});Te(vt?{type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!0}}:{type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})},jt=function(){var mt,vt=function(){Z.d.push("/shixuns/".concat(m,"/challenges")),Te({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};me!=null&&(mt=me.sideBar)!==null&&mt!==void 0&&mt.confirmLeave?U.a.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:function(){vt()}}):vt()};return se.a.createElement(se.a.Fragment,null,se.a.createElement("section",{key:1,className:v.a.bg,id:"practice-scroll"},se.a.createElement(B.a,{key:w,form:Be,className:v.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:dt,onFinish:at},se.a.createElement(le.a,{activeIndex:0,isEdit:Ye}),se.a.createElement(B.a.Item,{initialValue:"",name:"subject",label:"\u4EFB\u52A1\u540D\u79F0:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},se.a.createElement(te.a,{bordered:!1,maxLength:60,suffix:"".concat(((Q=Ie.subject)===null||Q===void 0?void 0:Q.length)||0,"/60"),placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"})),se.a.createElement(B.a.Item,{name:"task_pass",label:"\u4EFB\u52A1\u8981\u6C42:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:35e3,message:"\u8FC7\u5173\u4EFB\u52A1\u7B80\u4ECB\u6700\u5927\u9650\u523635000\u4E2A\u5B57\u7B26"}]},se.a.createElement(ee.a,{key:de.params.challengesId||"3",watch:!0,defaultValue:Ye?$e==null?void 0:$e.task_pass:ve.task_pass_default})),se.a.createElement(B.a.Item,{initialValue:1,name:"difficulty",label:"\u96BE\u5EA6\u7CFB\u6570:",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6\u7CFB\u6570"}]},se.a.createElement(S.a.Group,{disabled:((Se=fe.detail)===null||Se===void 0?void 0:Se.shixun_status)===2},se.a.createElement(S.a,{value:1},"\u7B80\u5355"),se.a.createElement(S.a,{style:{marginLeft:70},value:2},"\u4E2D\u7B49"),se.a.createElement(S.a,{style:{marginLeft:70},value:3},"\u56F0\u96BE"))),se.a.createElement(B.a.Item,{name:"challenge_tag",label:se.a.createElement("div",null,"\u6280\u80FD\u6807\u7B7E ",se.a.createElement("span",{className:"pl20 font12 c-light-black"},"\u5B66\u5458\u7B54\u9898\u6B63\u786E\u5C06\u83B7\u5F97\u6280\u80FD\uFF0C\u5426\u5219\u4E0D\u80FD\u83B7\u5F97\u6280\u80FD\uFF08\u56DE\u8F66\u6DFB\u52A0\u6807\u7B7E\uFF09")),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6280\u80FD\u6807\u7B7E"}]},se.a.createElement(Ce.a,{placeholder:"\u6DFB\u52A0\u6807\u7B7E",style:{width:"260px"},InputRight:se.a.createElement("span",{className:"ml5"},"(\u56DE\u8F66\u6DFB\u52A0\u6807\u7B7E)")})),se.a.createElement(xe.a,{className:"customItemSelect"},se.a.createElement(ie.a,null,se.a.createElement(B.a.Item,{name:"score",initialValue:100,label:"\u5956\u52B1\u91D1\u5E01:",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u5956\u52B1\u7ECF\u9A8C\u503C"}]},se.a.createElement(q.a,{disabled:((Ae=fe.detail)===null||Ae===void 0?void 0:Ae.shixun_status)===2,bordered:!1,style:{width:260}},We==null?void 0:We.map(function(ft,mt){return se.a.createElement(q.a.Option,{key:mt,value:ft},ft)})))),se.a.createElement(ie.a,{flex:1},se.a.createElement("div",{style:{marginTop:88},className:"font12 c-light-black ml10"}," \u5B66\u5458\u6B63\u786E\u7B54\u9898\u65F6\u83B7\u5F97\u91D1\u5E01\uFF0C\u5E76\u4E14\u83B7\u5F97\u7B49\u91CF\u7684\u7ECF\u9A8C\u503C\u3002\u5982\uFF1A+100\u91D1\u5E01\u3001+100\u7ECF\u9A8C\u503C"))))),se.a.createElement(x.a,{key:2,onOk:function(){return Be.submit()},className:"customFixedButton",onCancel:At}),se.a.createElement($.a,{loading:Xe}))};je.default=Object(Z.a)(function(T){var J=T.shixunsDetail,Q=T.newCourse,Se=T.globalSetting,Ae=T.practiceSetting;return{shixunsDetail:J,newCourse:Q,globalSetting:Se,practiceSetting:Ae}})(c)},M8RZ:function(st,je,p){"use strict";p.d(je,"a",function(){return _});var M=p("fWQN"),xe=p("mtLc"),z=p("yKVA"),ie=p("879j"),ae=p("q1tI"),q=p.n(ae),O=p("i8i4"),S=p.n(O),_=function(te){Object(z.a)(U,te);var P=Object(ie.a)(U);function U(ce){var H;Object(M.a)(this,U),H=P.call(this,ce);var D=window.document;return H.node=D.createElement("div"),D.body.appendChild(H.node),H}return Object(xe.a)(U,[{key:"render",value:function(){var H=this.props.children;return Object(O.createPortal)(H,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),U}(q.a.Component)},OLES:function(st,je,p){"use strict";var M=p("U8pU"),xe=p("VTBJ"),z=p("Ff2n"),ie=p("q1tI"),ae=p("uciX"),q=p("7ixt"),O=function(ce){var H=ce.overlay,D=ce.prefixCls,k=ce.id,L=ce.overlayInnerStyle;return ie.createElement("div",{className:"".concat(D,"-inner"),id:k,role:"tooltip",style:L},typeof H=="function"?H():H)},S=O,_=function(ce,H){var D=ce.overlayClassName,k=ce.trigger,L=k===void 0?["hover"]:k,B=ce.mouseEnterDelay,F=B===void 0?0:B,he=ce.mouseLeaveDelay,Ne=he===void 0?.1:he,G=ce.overlayStyle,oe=ce.prefixCls,se=oe===void 0?"rc-tooltip":oe,Z=ce.children,ee=ce.onVisibleChange,pe=ce.afterVisibleChange,Y=ce.transitionName,v=ce.animation,W=ce.placement,N=W===void 0?"right":W,x=ce.align,$=x===void 0?{}:x,le=ce.destroyTooltipOnHide,K=le===void 0?!1:le,Ce=ce.defaultVisible,g=ce.getTooltipContainer,c=ce.overlayInnerStyle,T=Object(z.a)(ce,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),J=Object(ie.useRef)(null);Object(ie.useImperativeHandle)(H,function(){return J.current});var Q=Object(xe.a)({},T);"visible"in ce&&(Q.popupVisible=ce.visible);var Se=function(){var me=ce.arrowContent,j=me===void 0?null:me,V=ce.overlay,Le=ce.id;return[ie.createElement("div",{className:"".concat(se,"-arrow"),key:"arrow"},j),ie.createElement(S,{key:"content",prefixCls:se,id:Le,overlay:V,overlayInnerStyle:c})]},Ae=!1,fe=!1;if(typeof K=="boolean")Ae=K;else if(K&&Object(M.a)(K)==="object"){var Te=K.keepParent;Ae=Te===!0,fe=Te===!1}return ie.createElement(ae.a,Object.assign({popupClassName:D,prefixCls:se,popup:Se,action:L,builtinPlacements:q.a,popupPlacement:N,ref:J,popupAlign:$,getPopupContainer:g,onPopupVisibleChange:ee,afterPopupVisibleChange:pe,popupTransitionName:Y,popupAnimation:v,defaultPopupVisible:Ce,destroyPopupOnHide:Ae,autoDestroy:fe,mouseLeaveDelay:Ne,popupStyle:G,mouseEnterDelay:F},Q),Z)},te=Object(ie.forwardRef)(_),P=je.a=te},Ot1p:function(st,je,p){"use strict";var M=p("2qtc"),xe=p("kLXV"),z=p("rAM+"),ie=p("miYZ"),ae=p("tsqr"),q=p("tJVT"),O=p("jrin"),S=p("q1tI"),_=p.n(S),te=p("VrN/"),P=p.n(te),U=p("bdgK"),ce=p("p77/"),H=p("Bd2K"),D=p("ELLl"),k=p("19Vz"),L=p("lZu9"),B=p("+NIl"),F=p("kSUc"),he=p("9Bee"),Ne=function(y){var w=y.value,C=w===void 0?"":w,d=y.className,f=y.showTextOnly,h=y.showLines,m=y.style,R=m===void 0?{}:m,X=Object(S.useMemo)(function(){return""},[C]);return _.a.createElement(_.a.Fragment,null,_.a.createElement("div",{dangerouslySetInnerHTML:{__html:X}}))},G=p("0Owb"),oe=p("dejd"),se=p("C+DQ"),Z=[{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 ee(y){var w=y.onActionCallback,C=y.title,d=y.icon,f=y.actionName,h=y.className,m=h===void 0?"":h,R=y.children;function X(){w(f)}return _.a.createElement("a",{title:C,className:m,onClick:X},_.a.createElement("i",{className:"md-iconfont ".concat(d)}),R)}var pe=function(y){var w=y.watch,C=y.showNullButton,d=y.onActionCallback,f=y.fullScreen,h=y.insertTemp,m=y.hidetoolBar,R=[].concat(Z,[{title:"".concat(w?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(w?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return _.a.createElement("ul",{className:"markdown-toolbar-container"},!m&&R.map(function(X,be){return _.a.createElement("li",{key:be},X.actionName?_.a.createElement(ee,Object(G.a)({},X,{onActionCallback:d})):_.a.createElement("span",{className:"v-line"}))}),C?_.a.createElement("li",null,_.a.createElement(ee,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:d},_.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,h&&_.a.createElement("li",null,_.a.createElement(ee,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(h),onActionCallback:d},_.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),_.a.createElement("li",{className:"btn-full-screen"},_.a.createElement(ee,{icon:"".concat(f?"icon-shrink":"icon-enlarge"),title:f?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:d})))},Y=p("M8RZ"),v=p("+L6B"),W=p("2/Rp"),N=p("y8nQ"),x=p("Vl3Y"),$=p("5NDa"),le=p("5rEg"),K={labelCol:{span:4},wrapperCol:{span:20}},Ce=function(y){var w=y.callback,C=y.onCancel;function d(f){w(f)}return _.a.createElement(x.a,Object(G.a)({},K,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:d}),_.a.createElement(x.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},_.a.createElement(le.a,null)),_.a.createElement(x.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},_.a.createElement(le.a,null)),_.a.createElement("div",{className:"flex-container flex-end"},_.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),_.a.createElement(W.a,{type:"ghost",onClick:C},"\u53D6\u6D88")))},g=p("7ahc"),c=p("HmJG"),T=p("BjJ7"),J=x.a.useForm,Q={width:280,marginRight:10},Se={labelCol:{span:5},wrapperCol:{span:19}},Ae=function(y){var w=y.callback,C=y.onCancel,d=J(),f=Object(q.a)(d,1),h=f[0];function m(be){w(be)}function R(be,et){h.setFieldsValue({src:"/api/attachments/".concat(be.id),type:et.type})}function X(be){var et=be.target.files[0];Te(et,R)}return _.a.createElement(x.a,Object(G.a)({form:h},Se,{className:"upload-image-panel",onFinish:m}),_.a.createElement(x.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},_.a.createElement("div",{className:"flex-container"},_.a.createElement(x.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},_.a.createElement(le.a,{style:Q})),_.a.createElement(fe,{onFileChange:X}))),_.a.createElement(x.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u63CF\u8FF0"}]},_.a.createElement(le.a,{style:{width:264}})),_.a.createElement(x.a.Item,{style:{textAlign:"right"}},_.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),_.a.createElement(W.a,{type:"ghost",onClick:C},"\u53D6\u6D88")))};function fe(y){var w=y.onFileChange;return _.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",_.a.createElement("input",{type:"file",onChange:w}))}function Te(y,w){if(!y)throw new String("\u6CA1\u6709\u6587\u4EF6");var C=new FormData;C.append("editormd-image-file",y),C.append("file_param_name","editormd-image-file"),C.append("byxhr","true");var d=new window.XMLHttpRequest;d.withCredentials=!0,d.addEventListener("load",function(f){w(JSON.parse(f.target.responseText),y)},!1),d.addEventListener("error",function(f){console.error(f)},!1),d.open("POST","".concat(T.a,"/api/attachments.json")),d.send(C)}var de=p("giR+"),me=p("fyUT"),j=p("7Kak"),V=p("9yH6"),Le=V.a.Group,Be={margin:"0 8px"},Qe=function(y){var w=y.callback,C=y.onCancel;function d(f){w(f)}return _.a.createElement(x.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:d},_.a.createElement("div",{className:"flex-container"},_.a.createElement("span",{style:Be},"\u5355\u5143\u683C\u6570\uFF1A"),_.a.createElement("span",{style:Be},"\u884C\u6570"),_.a.createElement(x.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},_.a.createElement(me.a,null)),_.a.createElement("span",{style:Be},"\u5217\u6570"),_.a.createElement(x.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},_.a.createElement(me.a,null))),_.a.createElement("div",{className:"flex-container",style:{marginTop:12}},_.a.createElement("span",{style:Be},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),_.a.createElement(x.a.Item,{name:"align"},_.a.createElement(Le,null,_.a.createElement(V.a,{value:"default"},_.a.createElement("i",{className:"fa fa-align-justify"})),_.a.createElement(V.a,{value:"left"},_.a.createElement("i",{className:"fa fa-align-left"})),_.a.createElement(V.a,{value:"center"},_.a.createElement("i",{className:"fa fa-align-center"})),_.a.createElement(V.a,{value:"right"},_.a.createElement("i",{className:"fa fa-align-right"}))))),_.a.createElement("div",{className:"flex-container flex-end"},_.a.createElement(W.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),_.a.createElement(W.a,{type:"ghost",onClick:C},"\u53D6\u6D88")))},ze=p("m3rI"),Ie="link",ye="upload-image",_e="code-block",De="add-table",We="------------",Ue={default:We,left:":".concat(We),center:":".concat(We,":"),right:"".concat(We,":")},ve=p("9VGf"),we,Je;function $e(){}var Ve=0,Ke=1e4,it="\u2581",Ye=`
**\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 Ge(y){return/^\d+$/.test(y)?"".concat(y,"px"):y}var re=navigator.platform.toUpperCase().indexOf("MAC")>=0,rt=re?"Cmd":"Ctrl",Xe=(we={},Object(O.a)(we,rt+"-B","bold"),Object(O.a)(we,rt+"-I","italic"),we),ue=(Je={},Object(O.a)(Je,Ie,"\u6DFB\u52A0\u94FE\u63A5"),Object(O.a)(Je,_e,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(O.a)(Je,ye,"\u6DFB\u52A0\u56FE\u7247"),Object(O.a)(Je,De,"\u6DFB\u52A0\u8868\u683C"),Je),Oe=je.a=function(y){var w=y.defaultValue,C=w===void 0?"":w,d=y.onChange,f=y.width,h=f===void 0?"100%":f,m=y.height,R=m===void 0?400:m,X=y.miniToolbar,be=X===void 0?!1:X,et=y.isFocus,dt=et===void 0?!1:et,at=y.watch,At=y.insertTemp,bt=y.mode,lt=bt===void 0?"markdown":bt,jt=y.id,ft=jt===void 0?"markdown-editor-id":jt,mt=y.showResizeBar,vt=mt===void 0?!1:mt,qe=y.noStorage,en=qe===void 0?!1:qe,Ut=y.showNullButton,Jt=Ut===void 0?!1:Ut,cn=y.hidetoolBar,pn=cn===void 0?!1:cn,Zt=y.fullScreen,mn=Zt===void 0?!1:Zt,$n=y.onBlur,fr=y.onCMBeforeChange,Tt=y.onFullScreen,Ze=y.className,Tn=Ze===void 0?"":Ze,hr=y.disablePaste,gn=hr===void 0?!1:hr,yt=y.placeholder,On=yt===void 0?"":yt,Pn=y.values,Yn=Pn===void 0?"":Pn,Ee=Object(S.useState)(null),ct=Object(q.a)(Ee,2),Me=ct[0],Ur=ct[1],pr=Object(S.useState)(C),Jn=Object(q.a)(pr,2),Zn=Jn[0],ut=Jn[1],Zi=Object(S.useState)(at),Fr=Object(q.a)(Zi,2),vn=Fr[0],dn=Fr[1],yi=Object(S.useState)(mn),Br=Object(q.a)(yi,2),sn=Br[0],mr=Br[1],xi=Object(S.useState)(""),gr=Object(q.a)(xi,2),Ln=gr[0],Mn=gr[1],wi=Object(S.useState)(0),Wr=Object(q.a)(wi,2),Qn=Wr[0],zr=Wr[1],Ei=Object(S.useState)(R),bn=Object(q.a)(Ei,2),_i=bn[0],Ci=bn[1],vr=Object(S.useState)(!1),Nn=Object(q.a)(vr,2),ja=Nn[0],Hr=Nn[1],qn=Object(S.useRef)(),Kr=Object(S.useRef)(),In=Object(S.useRef)(),er=Object(S.useRef)();Object(S.useEffect)(function(){ut(Yn),Me==null||Me.setValue(Yn)},[Yn]),Object(S.useEffect)(function(){Tt==null||Tt(sn)},[sn]),Object(S.useEffect)(function(){if(qn.current){var tt=P.a.fromTextArea(qn.current,{mode:lt,lineNumbers:!be,lineWrapping:!0,value:C,autoCloseTags:!0,autoCloseBrackets:!0});dt&&tt.focus();function ht(pt,Et){if(gn){Et.preventDefault();return}var _t=Et.clipboardData;if(_t){var St=_t.types.toString(),Rt=_t.items,Ot=["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"];if(St==="Files"||_t.types.indexOf("Files")>-1){if(Et.preventDefault(),lt=="stex")return;try{var Gt,yn=Rt[1];((Gt=Rt[0])===null||Gt===void 0?void 0:Gt.kind)==="file"&&(yn=Rt[0]);var kt=yn.getAsFile(),jn=kt.name.split(".").pop();Te(kt,function(Vt){if(Vt.id){var Un,Fn,yr;(kt==null||((Un=kt.type)===null||Un===void 0)?void 0:Un.indexOf("image"))>-1?tt.replaceSelection("![,](/api/attachments/".concat(Vt.id,"?type=").concat(Vt.content_type,")")):(kt==null||((Fn=kt.type)===null||Fn===void 0)?void 0:Fn.indexOf("video"))>-1?tt.replaceSelection('<video width="100%" controls src="'.concat(ze.a.API_SERVER,"/api/attachments/").concat(Vt.id,'"></video>')):(kt==null||((yr=kt.type)===null||yr===void 0)?void 0:yr.indexOf("pdf"))>-1?tt.replaceSelection('<a href="'.concat(ze.a.API_SERVER,"/api/attachments/").concat(Vt.id,"?type=").concat(kt.type,'&disposition=inline" target="_blank">').concat(kt.name,"</a>")):Ot.includes(jn)?tt.replaceSelection('<a href="'.concat(ze.a.API_SERVER,"/api/attachments/").concat(Vt.id,'?type=office&disposition=inline" target="_blank">').concat(kt.name,"</a>")):tt.replaceSelection("[".concat(kt.name,"](").concat(ze.a.API_SERVER,"/api/attachments/").concat(Vt.id,"?type=").concat(Vt.content_type,")"))}else(Vt==null?void 0:Vt.status)===401&&(document.location.href="/user/login")})}catch(Vt){ae.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return tt.on("paste",ht),Ur(tt),function(){tt.off("paste",ht)}}},[]);var Si=Object(S.useCallback)(function(){if(Kr.current)try{}catch(tt){console.log(tt,"---- to set md editor body height")}},[_i,Kr,sn]);Object(S.useEffect)(function(){function tt(){var pt=new U.default(function(Et){var _t=Object(z.a)(Et),St;try{for(_t.s();!(St=_t.n()).done;){var Rt=St.value;(Rt.target.offsetHeight>0||Rt.target.offsetWidth>0)&&(Si(),Me.setSize("100%","100%"),Me.refresh())}}catch(Ot){_t.e(Ot)}finally{_t.f()}});return pt.observe(qn.current.parentElement),pt}if(Me){var ht=tt();return function(){ht.unobserve(qn.current.parentElement)}}},[Me,Si]),Object(S.useEffect)(function(){if(Me){for(var tt=[],ht=function(){var Rt=Et[pt];_t=Object(q.a)(Rt,2);var Ot=_t[0],Gt=_t[1],yn=Object(O.a)({},Ot,function(){Xr(Gt)});tt.push(yn),Me.addKeyMap(yn)},pt=0,Et=Object.entries(Xe);pt<Et.length;pt++){var _t;ht()}return function(){var St=Object(z.a)(tt),Rt;try{for(St.s();!(Rt=St.n()).done;){var Ot=Rt.value;Me.removeKeyMap(Ot)}}catch(Gt){St.e(Gt)}finally{St.f()}}}},[Me]),Object(S.useEffect)(function(){mn!==sn&&mr(mn)},[mn]),Object(ve.a)(function(){if(!en&&Qn>0){var tt=new Date().getTime(),ht=window.sessionStorage.getItem(ft);tt>=Qn+Ke&&(!ht||ht!==Zn)&&(window.sessionStorage.setItem(ft,Zn),Hr(!0))}},Ke),Object(S.useEffect)(function(){dn(at)},[Me,at]),Object(S.useEffect)(function(){Me&&(dt&&Me.focus())},[Me,dt]),Object(S.useEffect)(function(){if(vn&&Me){var tt=Me.getScrollerElement();function ht(pt){var Et=pt.target;if(er.current){var _t=Et.scrollTop/Et.scrollHeight;er.current.scrollTop=er.current.scrollHeight*_t}}return tt.addEventListener("scroll",ht),function(){tt.removeEventListener("scroll",ht)}}},[Me,vn]),Object(S.useEffect)(function(){if(Me&&fr){function tt(ht,pt){fr(ht,pt)}return Me.on("beforeChange",tt),function(){Me.off("beforeChange",tt)}}},[Me,fr]),Object(S.useEffect)(function(){if(Me&&$n){function tt(){$n(Me.getValue())}return Me.on("blur",tt),function(){Me.off("blur",tt)}}},[Me,$n]),Object(S.useEffect)(function(){if(Me){function tt(ht){var pt=ht.getValue();ut(pt),zr(new Date().getTime()),ht.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),d&&d(pt)}return Me.on("change",tt),function(){Me.off("change",tt)}}},[Me,d]),Object(S.useEffect)(function(){Me&&(C==null?(Me.setValue(""),ut("")):C!==Me.getValue()&&(Me.setValue(C),ut(C),Me.setCursor(Me.lineCount(),0)))},[Me,C]);var Xr=Object(S.useCallback)(function(tt){var ht=Me.getCursor(),pt=Me.getSelection(),Et=pt.split(`
`);switch(tt){case"bold":return Me.replaceSelection("**"+pt+"**"),pt===""&&Me.setCursor(ht.line,ht.ch+2),Me.focus();case"italic":return Me.replaceSelection("*"+pt+"*"),pt===""&&Me.setCursor(ht.line,ht.ch+1),Me.focus();case"code":return Me.replaceSelection("`"+pt+"`"),pt===""&&Me.setCursor(ht.line,ht.ch+1),Me.focus();case"inline-latex":return Me.replaceSelection("`$$"+pt+"$$`"),pt===""&&Me.setCursor(ht.line,ht.ch+3),Me.focus();case"latex":return Me.replaceSelection("```latex\n"+pt+"\n```"),Me.setCursor(ht.line+1,pt.length+1),Me.focus();case"line-break":return Me.replaceSelection(`<br/>
`),Me.focus();case"list-ul":return pt===""?Me.replaceSelection("- "+pt):Me.replaceSelection(Et.map(function(_t){return _t===""?"":"- ".concat(_t)}).join(`
`)),Me.focus();case"list-ol":return pt===""?Me.replaceSelection("1. "+pt):Me.replaceSelection(Et.map(function(_t,St){return _t===""?"":"".concat(St+1,". ").concat(_t)}).join(`
`)),Me.focus();case"add-null-ch":return pt===""&&Me.setCursor(ht.line,ht.ch+1),Me.replaceSelection(it),Me.focus();case"inster-template-1":return pt===""&&Me.setCursor(ht.line,ht.ch),Me.replaceSelection(Ye),Me.focus();case"eraser":return Me.setValue(""),Me.focus();case"trigger-watch":return dn(!vn),Me.focus();case"trigger-full-screen":return mr(!sn),Me.focus();case Ie:Mn(Ie);return;case _e:Mn(_e);return;case ye:Mn(ye);return;case De:Mn(De);return;default:throw new Error}},[Me,vn,sn]),tr=Object(S.useCallback)(function(tt){Mn("");switch(Ln){case Ie:var ht=tt.title,pt=tt.link;return Me.replaceSelection("[".concat(ht,"](").concat(pt,")")),Me.focus();case _e:var Et=tt.language,_t=tt.content;return Me.replaceSelection(["```"+Et,_t,"```"].join(`
`)),Me.focus();case ye:var St=tt.src,Rt=tt.alt;return Me.replaceSelection("![ ".concat(Rt," ]( ").concat(St,' "').concat(Rt,'" )')),Me.focus();case De:for(var Ot=tt.row,Gt=tt.col,yn=tt.align,kt=`
`,jn=0;jn<Ot;jn++){for(var Vt=[],Un=[],Fn=0;Fn<Gt;Fn++)jn===1&&Un.push(Ue[yn]),Vt.push(" ");jn===1&&(kt+="| ".concat(Un.join(" | "),` |
`)),kt+="| ".concat(Vt.join(Gt===1?"":" | "),` |
`)}return Me.replaceSelection(kt+`
`),Me.focus();default:throw new Error}},[Me,Ln]),br=Object(S.useMemo)(function(){switch(Ln){case Ie:return _.a.createElement(Ce,{callback:tr,onCancel:_n});case _e:return _.a.createElement(g.b,{callback:tr,onCancel:_n});case ye:return _.a.createElement(Ae,{callback:tr,onCancel:_n});case De:return _.a.createElement(Qe,{callback:tr,onCancel:_n});default:return null}},[Ln]);function _n(){Mn("")}Object(S.useEffect)(function(){if(In.current){var tt=In.current,ht=!1,pt=0;function Et(Rt){ht=!0,pt=Rt.pageY}function _t(){ht=!1}function St(Rt){if(ht){var Ot=Rt.pageY-pt;Ot<0&&(Ot=0),Ot>300&&(Ot=300);var Gt=R+Ot+"px";Ci(Gt)}}return tt.addEventListener("mousedown",Et),document.addEventListener("mousemove",St),document.addEventListener("mouseup",_t),function(){tt.removeEventListener("mousedown",Et),document.removeEventListener("mousemove",St),document.removeEventListener("mouseup",_t)}}},[Me,In]),Object(S.useEffect)(function(){Ci(R)},[R]);var Gr=Ge(h),ki=Ge(_i),Ti={width:Gr,height:ki},Vr=Object(S.useMemo)(function(){if(Qn){var tt=new Date(Qn),ht=tt.getHours(),pt=tt.getMinutes(),Et=tt.getSeconds();return ht=ht<10?"0"+ht:ht,pt=pt<10?"0"+pt:pt,Et=Et<10?"0"+Et:Et,"".concat(ht,":").concat(pt,":").concat(Et)}return 0},[Qn]);function Ua(){window.sessionStorage.removeItem(ft),Hr(!1),zr(0)}function Qi(){Hr(!1),zr(0),Me.setValue(window.sessionStorage.getItem(ft))}return _.a.createElement(S.Fragment,null,_.a.createElement("div",{className:"markdown-editor-wrapper",ref:Kr},_.a.createElement("div",{className:"markdown-editor-container ".concat(Tn," ").concat(vn?"on-preview":""," ").concat(be?"mini":""," ").concat(sn?"full-screen":""),style:Ti},_.a.createElement(pe,{insertTemp:At,watch:vn,fullScreen:sn,showNullButton:Jt,onActionCallback:Xr,hidetoolBar:pn}),_.a.createElement("div",{className:"markdown-editor-body"},_.a.createElement("div",{className:"codemirror-container"},_.a.createElement("textarea",{ref:qn,placeholder:On})),vn?_.a.createElement("div",{ref:er,className:"preview-container"},lt==="stex"&&_.a.createElement(Ne,{value:Zn}),lt!=="stex"&&_.a.createElement(he.a,{value:Zn})):null))),vt?_.a.createElement("a",{ref:In,className:"editor-resize"}):null,_.a.createElement(Y.a,null,ue[Ln]?_.a.createElement(xe.a,{centered:!0,title:ue[Ln],visible:!0,onCancel:_n,footer:null},br):null))}},SJMd:function(st,je){/**
* @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 p,M,xe,z=!1,ie,ae;window.PR_SHOULD_USE_CONTINUATION=!0;var q,O;(function(){var S=window,_=["break,continue,do,else,for,if,return,while"],te=[_,"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"],P=[te,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],U=[P,"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"],ce=[P,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],H=[P,"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"],D="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",k=[P,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],L="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",B=[_,"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"],F=[_,"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"],he=[_,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Ne=[U,H,ce,k,L,B,F,he],G=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,oe="str",se="kwd",Z="com",ee="typ",pe="lit",Y="pun",v="pln",W="tag",N="dec",x="src",$="atn",le="atv",K="nocode",Ce="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function g(ye){for(var _e=0,De=!1,We=!1,Ue=0,ve=ye.length;Ue<ve;++Ue){var we=ye[Ue];if(we.ignoreCase)We=!0;else if(/[a-z]/i.test(we.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){De=!0,We=!1;break}}var Je={b:8,t:9,n:10,v:11,f:12,r:13};function $e(Ge){var re=Ge.charCodeAt(0);if(re!==92)return re;var rt=Ge.charAt(1);return re=Je[rt],re||("0"<=rt&&rt<="7"?parseInt(Ge.substring(1),8):rt==="u"||rt==="x"?parseInt(Ge.substring(2),16):Ge.charCodeAt(1))}function Ve(Ge){if(Ge<32)return(Ge<16?"\\x0":"\\x")+Ge.toString(16);var re=String.fromCharCode(Ge);return re==="\\"||re==="-"||re==="]"||re==="^"?"\\"+re:re}function Ke(Ge){var re=Ge.substring(1,Ge.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=[],Xe=re[0]==="^",ue=["["];Xe&&ue.push("^");for(var Oe=Xe?1:0,y=re.length;Oe<y;++Oe){var w=re[Oe];if(/\\[bdsw]/i.test(w))ue.push(w);else{var C=$e(w),d;Oe+2<y&&re[Oe+1]==="-"?(d=$e(re[Oe+2]),Oe+=2):d=C,rt.push([C,d]),d<65||C>122||(d<65||C>90||rt.push([Math.max(65,C)|32,Math.min(d,90)|32]),d<97||C>122||rt.push([Math.max(97,C)&~32,Math.min(d,122)&~32]))}}rt.sort(function(R,X){return R[0]-X[0]||X[1]-R[1]});for(var f=[],h=[],Oe=0;Oe<rt.length;++Oe){var m=rt[Oe];m[0]<=h[1]+1?h[1]=Math.max(h[1],m[1]):f.push(h=m)}for(var Oe=0;Oe<f.length;++Oe){var m=f[Oe];ue.push(Ve(m[0])),m[1]>m[0]&&(m[1]+1>m[0]&&ue.push("-"),ue.push(Ve(m[1])))}return ue.push("]"),ue.join("")}function it(Ge){for(var re=Ge.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=re.length,Xe=[],ue=0,Oe=0;ue<rt;++ue){var y=re[ue];if(y==="(")++Oe;else if(y.charAt(0)==="\\"){var w=+y.substring(1);w&&(w<=Oe?Xe[w]=-1:re[ue]=Ve(w))}}for(var ue=1;ue<Xe.length;++ue)Xe[ue]===-1&&(Xe[ue]=++_e);for(var ue=0,Oe=0;ue<rt;++ue){var y=re[ue];if(y==="(")++Oe,Xe[Oe]||(re[ue]="(?:");else if(y.charAt(0)==="\\"){var w=+y.substring(1);w&&w<=Oe&&(re[ue]="\\"+Xe[w])}}for(var ue=0;ue<rt;++ue)re[ue]==="^"&&re[ue+1]!=="^"&&(re[ue]="");if(Ge.ignoreCase&&De)for(var ue=0;ue<rt;++ue){var y=re[ue],C=y.charAt(0);y.length>=2&&C==="["?re[ue]=Ke(y):C!=="\\"&&(re[ue]=y.replace(/[a-zA-Z]/g,function(h){var m=h.charCodeAt(0);return"["+String.fromCharCode(m&~32,m|32)+"]"}))}return re.join("")}for(var Ye=[],Ue=0,ve=ye.length;Ue<ve;++Ue){var we=ye[Ue];if(we.global||we.multiline)throw new Error(""+we);Ye.push("(?:"+it(we)+")")}return new RegExp(Ye.join("|"),We?"gi":"g")}function c(ye,_e){var De=/(?:^|\s)nocode(?:\s|$)/,We=[],Ue=0,ve=[],we=0;function Je($e){var Ve=$e.nodeType;if(Ve==1){if(De.test($e.className))return;for(var Ke=$e.firstChild;Ke;Ke=Ke.nextSibling)Je(Ke);var it=$e.nodeName.toLowerCase();(it==="br"||it==="li")&&(We[we]=`
`,ve[we<<1]=Ue++,ve[we++<<1|1]=$e)}else if(Ve==3||Ve==4){var Ye=$e.nodeValue;Ye.length&&(_e?Ye=Ye.replace(/\r\n?/g,`
`):Ye=Ye.replace(/[ \t\r\n]+/g," "),We[we]=Ye,ve[we<<1]=Ue,Ue+=Ye.length,ve[we++<<1|1]=$e)}}return Je(ye),{sourceCode:We.join("").replace(/\n$/,""),spans:ve}}function T(ye,_e,De,We,Ue){if(!De)return;var ve={sourceNode:ye,pre:1,langExtension:null,numberLines:null,sourceCode:De,spans:null,basePos:_e,decorations:null};We(ve),Ue.push.apply(Ue,ve.decorations)}var J=/\S/;function Q(ye){for(var _e=void 0,De=ye.firstChild;De;De=De.nextSibling){var We=De.nodeType;_e=We===1?_e?ye:De:We===3&&J.test(De.nodeValue)?ye:_e}return _e===ye?void 0:_e}function Se(ye,_e){var De={},We;(function(){for(var we=ye.concat(_e),Je=[],$e={},Ve=0,Ke=we.length;Ve<Ke;++Ve){var it=we[Ve],Ye=it[3];if(Ye)for(var Ge=Ye.length;--Ge>=0;)De[Ye.charAt(Ge)]=it;var re=it[1],rt=""+re;$e.hasOwnProperty(rt)||(Je.push(re),$e[rt]=null)}Je.push(/[\0-\uffff]/),We=g(Je)})();var Ue=_e.length,ve=function(we){for(var Je=we.sourceCode,$e=we.basePos,Ve=we.sourceNode,Ke=[$e,v],it=0,Ye=Je.match(We)||[],Ge={},re=0,rt=Ye.length;re<rt;++re){var Xe=Ye[re],ue=Ge[Xe],Oe=void 0,y;if(typeof ue=="string")y=!1;else{var w=De[Xe.charAt(0)];if(w)Oe=Xe.match(w[1]),ue=w[0];else{for(var C=0;C<Ue;++C)if(w=_e[C],Oe=Xe.match(w[1]),Oe){ue=w[0];break}Oe||(ue=v)}y=ue.length>=5&&ue.substring(0,5)==="lang-",y&&!(Oe&&typeof Oe[1]=="string")&&(y=!1,ue=x),y||(Ge[Xe]=ue)}var d=it;if(it+=Xe.length,!y)Ke.push($e+d,ue);else{var f=Oe[1],h=Xe.indexOf(f),m=h+f.length;Oe[2]&&(m=Xe.length-Oe[2].length,h=m-f.length);var R=ue.substring(5);T(Ve,$e+d,Xe.substring(0,h),ve,Ke),T(Ve,$e+d+h,f,V(R,f),Ke),T(Ve,$e+d+m,Xe.substring(m),ve,Ke)}}we.decorations=Ke};return ve}function Ae(ye){var _e=[],De=[];ye.tripleQuotedStrings?_e.push([oe,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ye.multiLineStrings?_e.push([oe,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):_e.push([oe,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ye.verbatimStrings&&De.push([oe,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var We=ye.hashComments;We&&(ye.cStyleComments?(We>1?_e.push([Z,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):_e.push([Z,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),De.push([oe,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):_e.push([Z,/^#[^\r\n]*/,null,"#"])),ye.cStyleComments&&(De.push([Z,/^\/\/[^\r\n]*/,null]),De.push([Z,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ue=ye.regexLiterals;if(Ue){var ve=Ue>1?"":`
\r`,we=ve?".":"[\\S\\s]",Je="/(?=[^/*"+ve+"])(?:[^/\\x5B\\x5C"+ve+"]|\\x5C"+we+"|\\x5B(?:[^\\x5C\\x5D"+ve+"]|\\x5C"+we+")*(?:\\x5D|$))+/";De.push(["lang-regex",RegExp("^"+Ce+"("+Je+")")])}var $e=ye.types;$e&&De.push([ee,$e]);var Ve=(""+ye.keywords).replace(/^ | $/g,"");Ve.length&&De.push([se,new RegExp("^(?:"+Ve.replace(/[\s,]+/g,"|")+")\\b"),null]),_e.push([v,/^\s+/,null,` \r
\xA0`]);var Ke="^.[^\\s\\w.$@'\"`/\\\\]*";return ye.regexLiterals&&(Ke+="(?!s*/)"),De.push([pe,/^@[a-z_$][a-z_$@0-9]*/i,null],[ee,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[v,/^[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"],[v,/^\\[\s\S]?/,null],[Y,new RegExp(Ke),null]),Se(_e,De)}var fe=Ae({keywords:Ne,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Te(ye,_e,De){for(var We=/(?:^|\s)nocode(?:\s|$)/,Ue=/\r\n?|\n/,ve=ye.ownerDocument,we=ve.createElement("li");ye.firstChild;)we.appendChild(ye.firstChild);var Je=[we];function $e(re){var rt=re.nodeType;if(rt==1&&!We.test(re.className))if(re.nodeName==="br")Ve(re),re.parentNode&&re.parentNode.removeChild(re);else for(var Xe=re.firstChild;Xe;Xe=Xe.nextSibling)$e(Xe);else if((rt==3||rt==4)&&De){var ue=re.nodeValue,Oe=ue.match(Ue);if(Oe){var y=ue.substring(0,Oe.index);re.nodeValue=y;var w=ue.substring(Oe.index+Oe[0].length);if(w){var C=re.parentNode;C.insertBefore(ve.createTextNode(w),re.nextSibling)}Ve(re),y||re.parentNode.removeChild(re)}}}function Ve(re){for(;!re.nextSibling;)if(re=re.parentNode,!re)return;function rt(Oe,y){var w=y?Oe.cloneNode(!1):Oe,C=Oe.parentNode;if(C){var d=rt(C,1),f=Oe.nextSibling;d.appendChild(w);for(var h=f;h;h=f)f=h.nextSibling,d.appendChild(h)}return w}for(var Xe=rt(re.nextSibling,0),ue;(ue=Xe.parentNode)&&ue.nodeType===1;)Xe=ue;Je.push(Xe)}for(var Ke=0;Ke<Je.length;++Ke)$e(Je[Ke]);_e===(_e|0)&&Je[0].setAttribute("value",_e);var it=ve.createElement("ol");it.className="linenums";for(var Ye=Math.max(0,_e-1|0)||0,Ke=0,Ge=Je.length;Ke<Ge;++Ke)we=Je[Ke],we.className="L"+(Ke+Ye)%10,we.firstChild||we.appendChild(ve.createTextNode("\xA0")),it.appendChild(we);ye.appendChild(it)}function de(ye){var _e=/\bMSIE\s(\d+)/.exec(navigator.userAgent);_e=_e&&+_e[1]<=8;var De=/\n/g,We=ye.sourceCode,Ue=We.length,ve=0,we=ye.spans,Je=we.length,$e=0,Ve=ye.decorations,Ke=Ve.length,it=0;Ve[Ke]=Ue;var Ye,Ge;for(Ge=Ye=0;Ge<Ke;)Ve[Ge]!==Ve[Ge+2]?(Ve[Ye++]=Ve[Ge++],Ve[Ye++]=Ve[Ge++]):Ge+=2;for(Ke=Ye,Ge=Ye=0;Ge<Ke;){for(var re=Ve[Ge],rt=Ve[Ge+1],Xe=Ge+2;Xe+2<=Ke&&Ve[Xe+1]===rt;)Xe+=2;Ve[Ye++]=re,Ve[Ye++]=rt,Ge=Xe}Ke=Ve.length=Ye;var ue=ye.sourceNode,Oe="";ue&&(Oe=ue.style.display,ue.style.display="none");try{for(var y=null;$e<Je;){var w=we[$e],C=we[$e+2]||Ue,d=Ve[it+2]||Ue,Xe=Math.min(C,d),f=we[$e+1],h;if(f.nodeType!==1&&(h=We.substring(ve,Xe))){_e&&(h=h.replace(De,"\r")),f.nodeValue=h;var m=f.ownerDocument,R=m.createElement("span");R.className=Ve[it+1];var X=f.parentNode;X.replaceChild(R,f),R.appendChild(f),ve<C&&(we[$e+1]=f=m.createTextNode(We.substring(Xe,C)),X.insertBefore(f,R.nextSibling))}ve=Xe,ve>=C&&($e+=2),ve>=d&&(it+=2)}}finally{ue&&(ue.style.display=Oe)}}var me={};function j(ye,_e){for(var De=_e.length;--De>=0;){var We=_e[De];me.hasOwnProperty(We)?S.console&&console.warn("cannot override language handler %s",We):me[We]=ye}}function V(ye,_e){return ye&&me.hasOwnProperty(ye)||(ye=/^\s*</.test(_e)?"default-markup":"default-code"),me[ye]}j(fe,["default-code"]),j(Se([],[[v,/^[^<?]+/],[N,/^<!\w[^>]*(?:>|$)/],[Z,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[Y,/^(?:<[%?]|[%?]>)/],["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"]),j(Se([[v,/^[\s]+/,null,` \r
`],[le,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[W,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[$,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[Y,/^[=<>\/]+/],["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"]),j(Se([],[[le,/^[\s\S]+/]]),["uq.val"]),j(Ae({keywords:U,hashComments:!0,cStyleComments:!0,types:G}),["c","cc","cpp","cxx","cyc","m"]),j(Ae({keywords:"null,true,false"}),["json"]),j(Ae({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:G}),["cs"]),j(Ae({keywords:ce,cStyleComments:!0}),["java"]),j(Ae({keywords:he,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),j(Ae({keywords:B,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),j(Ae({keywords:L,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),j(Ae({keywords:F,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),j(Ae({keywords:k,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),j(Ae({keywords:D,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),j(Se([],[[oe,/^[\s\S]+/]]),["regex"]);function Le(ye){var _e=ye.langExtension;try{var De=c(ye.sourceNode,ye.pre),We=De.sourceCode;ye.sourceCode=We,ye.spans=De.spans,ye.basePos=0,V(_e,We)(ye),de(ye)}catch(Ue){S.console&&console.log(Ue&&Ue.stack||Ue)}}function Be(ye,_e,De){var We=De||!1,Ue=_e||null,ve=document.createElement("div");ve.innerHTML="<pre>"+ye+"</pre>",ve=ve.firstChild,We&&Te(ve,We,!0);var we={langExtension:Ue,numberLines:We,sourceNode:ve,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Le(we),ve.innerHTML}function Qe(ye,_e){var De=_e||document.body,We=De.ownerDocument||document;function Ue(w){return De.getElementsByTagName(w)}for(var ve=[Ue("pre"),Ue("code"),Ue("xmp")],we=[],Je=0;Je<ve.length;++Je)for(var $e=0,Ve=ve[Je].length;$e<Ve;++$e)we.push(ve[Je][$e]);ve=null;var Ke=Date;Ke.now||(Ke={now:function(){return+new Date}});var it=0,Ye=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ge=/\bprettyprint\b/,re=/\bprettyprinted\b/,rt=/pre|xmp/i,Xe=/^code$/i,ue=/^(?:pre|code|xmp)$/i,Oe={};function y(){for(var w=S.PR_SHOULD_USE_CONTINUATION?Ke.now()+250:Infinity;it<we.length&&Ke.now()<w;it++){for(var C=we[it],d=Oe,f=C;f=f.previousSibling;){var h=f.nodeType,m=(h===7||h===8)&&f.nodeValue;if(m?!/^\??prettify\b/.test(m):h!==3||/\S/.test(f.nodeValue))break;if(m){d={},m.replace(/\b(\w+)=([\w:.%+-]+)/g,function(vt,qe,en){d[qe]=en});break}}var R=C.className;if((d!==Oe||Ge.test(R))&&!re.test(R)){for(var X=!1,be=C.parentNode;be;be=be.parentNode){var et=be.tagName;if(ue.test(et)&&be.className&&Ge.test(be.className)){X=!0;break}}if(!X){C.className+=" prettyprinted";var dt=d.lang;if(!dt){dt=R.match(Ye);var at;!dt&&(at=Q(C))&&Xe.test(at.tagName)&&(dt=at.className.match(Ye)),dt&&(dt=dt[1])}var At;if(rt.test(C.tagName))At=1;else{var bt=C.currentStyle,lt=We.defaultView,jt=bt?bt.whiteSpace:lt&&lt.getComputedStyle?lt.getComputedStyle(C,null).getPropertyValue("white-space"):0;At=jt&&jt.substring(0,3)==="pre"}var ft=d.linenums;(ft=ft==="true"||+ft)||(ft=R.match(/\blinenums\b(?::(\d+))?/),ft=ft?ft[1]&&ft[1].length?+ft[1]:!0:!1),ft&&Te(C,ft,At);var mt={langExtension:dt,sourceNode:C,numberLines:ft,pre:At,sourceCode:null,basePos:null,spans:null,decorations:null};Le(mt)}}}it<we.length?S.setTimeout(y,250):typeof ye=="function"&&ye()}y()}var ze=S.PR={createSimpleLexer:Se,registerLangHandler:j,sourceDecorator:Ae,PR_ATTRIB_NAME:$,PR_ATTRIB_VALUE:le,PR_COMMENT:Z,PR_DECLARATION:N,PR_KEYWORD:se,PR_LITERAL:pe,PR_NOCODE:K,PR_PLAIN:v,PR_PUNCTUATION:Y,PR_SOURCE:x,PR_STRING:oe,PR_TAG:W,PR_TYPE:ee,prettyPrintOne:z?S.prettyPrintOne=Be:q=Be,prettyPrint:O=z?S.prettyPrint=Qe:O=Qe},Ie=S.define;typeof Ie=="function"&&Ie.amd&&Ie("google-code-prettify",[],function(){return ze})})()},UUDw:function(st,je,p){st.exports={buttonFixed:"buttonFixed___2zLVJ",button:"button___-JgFH",buttonWrap:"buttonWrap___aZhhk"}},UqFu:function(st,je,p){"use strict";p.d(je,"a",function(){return M});var M=function(z){var ie=document.createElement("textarea");return ie.value=z,ie.value}},"VrN/":function(st,je,p){(function(M,xe){st.exports=xe()})(this,function(){"use strict";var M=navigator.userAgent,xe=navigator.platform,z=/gecko\/\d/i.test(M),ie=/MSIE \d/.test(M),ae=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(M),q=/Edge\/(\d+)/.exec(M),O=ie||ae||q,S=O&&(ie?document.documentMode||6:+(q||ae)[1]),_=!q&&/WebKit\//.test(M),te=_&&/Qt\/\d+\.\d+/.test(M),P=!q&&/Chrome\//.test(M),U=/Opera\//.test(M),ce=/Apple Computer/.test(navigator.vendor),H=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(M),D=/PhantomJS/.test(M),k=!q&&/AppleWebKit/.test(M)&&/Mobile\/\w+/.test(M),L=/Android/.test(M),B=k||L||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(M),F=k||/Mac/.test(xe),he=/\bCrOS\b/.test(M),Ne=/win/i.test(xe),G=U&&M.match(/Version\/(\d*\.\d*)/);G&&(G=Number(G[1])),G&&G>=15&&(U=!1,_=!0);var oe=F&&(te||U&&(G==null||G<12.11)),se=z||O&&S>=9;function Z(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var ee=function(e,t){var r=e.className,n=Z(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 Y(e,t){return pe(e).appendChild(t)}function v(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 W(e,t,r,n){var i=v(e,t,r,n);return i.setAttribute("role","presentation"),i}var N;document.createRange?N=function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:N=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 $(){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 le(e,t){var r=e.className;Z(t).test(r)||(e.className+=(r?" ":"")+t)}function K(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!Z(r[n]).test(t)&&(t+=" "+r[n]);return t}var Ce=function(e){e.select()};k?Ce=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:O&&(Ce=function(e){try{e.select()}catch(t){}});function g(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function c(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 T(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 s=e.indexOf(" ",a);if(s<0||s>=t)return o+(t-a);o+=s-a,o+=r-o%r,a=s+1}}var J=function(){this.id=null,this.f=null,this.time=0,this.handler=g(this.onTimeout,this)};J.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},J.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 Q(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}var Se=50,Ae={toString:function(){return"CodeMirror.Pass"}},fe={scroll:!1},Te={origin:"*mouse"},de={origin:"+move"};function me(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 j=[""];function V(e){for(;j.length<=e;)j.push(Le(j)+" ");return j[e]}function Le(e){return e[e.length-1]}function Be(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Qe(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function ze(){}function Ie(e,t){var r;return Object.create?r=Object.create(e):(ze.prototype=e,r=new ze),t&&c(t,r),r}var ye=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function _e(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||ye.test(e))}function De(e,t){return t?t.source.indexOf("\\w")>-1&&_e(e)?!0:t.test(e):_e(e)}function We(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Ue=/[\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 ve(e){return e.charCodeAt(0)>=768&&Ue.test(e)}function we(e,t,r){for(;(r<0?t>0:t<e.length)&&ve(e.charAt(t));)t+=r;return t}function Je(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 $e(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 Ve=null;function Ke(e,t,r){var n;Ve=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:Ve=i),a.from==t&&(a.from!=a.to&&r!="before"?n=i:Ve=i)}return n!=null?n:Ve}var it=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function r(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,s=/[1n]/;function l(u,b,E){this.level=u,this.from=b,this.to=E}return function(u,b){var E=b=="ltr"?"L":"R";if(u.length==0||b=="ltr"&&!n.test(u))return!1;for(var I=u.length,A=[],ne=0;ne<I;++ne)A.push(r(u.charCodeAt(ne)));for(var ge=0,ke=E;ge<I;++ge){var Re=A[ge];Re=="m"?A[ge]=ke:ke=Re}for(var Fe=0,Pe=E;Fe<I;++Fe){var He=A[Fe];He=="1"&&Pe=="r"?A[Fe]="n":a.test(He)&&(Pe=He,He=="r"&&(A[Fe]="R"))}for(var ot=1,nt=A[0];ot<I-1;++ot){var gt=A[ot];gt=="+"&&nt=="1"&&A[ot+1]=="1"?A[ot]="1":gt==","&&nt==A[ot+1]&&(nt=="1"||nt=="n")&&(A[ot]=nt),nt=gt}for(var Ct=0;Ct<I;++Ct){var zt=A[Ct];if(zt==",")A[Ct]="N";else if(zt=="%"){var Mt=void 0;for(Mt=Ct+1;Mt<I&&A[Mt]=="%";++Mt);for(var un=Ct&&A[Ct-1]=="!"||Mt<I&&A[Mt]=="1"?"1":"N",rn=Ct;rn<Mt;++rn)A[rn]=un;Ct=Mt-1}}for(var Nt=0,an=E;Nt<I;++Nt){var Xt=A[Nt];an=="L"&&Xt=="1"?A[Nt]="L":a.test(Xt)&&(an=Xt)}for(var Ft=0;Ft<I;++Ft)if(i.test(A[Ft])){var It=void 0;for(It=Ft+1;It<I&&i.test(A[It]);++It);for(var Dt=(Ft?A[Ft-1]:E)=="L",on=(It<I?A[It]:E)=="L",Ir=Dt==on?Dt?"L":"R":E,Vn=Ft;Vn<It;++Vn)A[Vn]=Ir;Ft=It-1}for(var Yt=[],kn,Ht=0;Ht<I;)if(o.test(A[Ht])){var Na=Ht;for(++Ht;Ht<I&&o.test(A[Ht]);++Ht);Yt.push(new l(0,Na,Ht))}else{var Rn=Ht,cr=Yt.length,dr=b=="rtl"?1:0;for(++Ht;Ht<I&&A[Ht]!="L";++Ht);for(var qt=Rn;qt<Ht;)if(s.test(A[qt])){Rn<qt&&(Yt.splice(cr,0,new l(1,Rn,qt)),cr+=dr);var jr=qt;for(++qt;qt<Ht&&s.test(A[qt]);++qt);Yt.splice(cr,0,new l(2,jr,qt)),cr+=dr,Rn=qt}else++qt;Rn<Ht&&Yt.splice(cr,0,new l(1,Rn,Ht))}return b=="ltr"&&(Yt[0].level==1&&(kn=u.match(/^\s+/))&&(Yt[0].from=kn[0].length,Yt.unshift(new l(0,0,kn[0].length))),Le(Yt).level==1&&(kn=u.match(/\s+$/))&&(Le(Yt).to-=kn[0].length,Yt.push(new l(0,I-kn[0].length,I)))),b=="rtl"?Yt.reverse():Yt}}();function Ye(e,t){var r=e.order;return r==null&&(r=e.order=it(e.text,t)),r}var Ge=[],re=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]||Ge).concat(r)}};function rt(e,t){return e._handlers&&e._handlers[t]||Ge}function Xe(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=Q(i,r);a>-1&&(n[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function ue(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}}),ue(e,r||t.type,e,t),h(t)||t.codemirrorIgnore}function y(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)Q(r,t[n])==-1&&r.push(t[n])}function w(e,t){return rt(e,t).length>0}function C(e){e.prototype.on=function(t,r){re(this,t,r)},e.prototype.off=function(t,r){Xe(this,t,r)}}function d(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function f(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function h(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function m(e){d(e),f(e)}function R(e){return e.target||e.srcElement}function X(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),F&&e.ctrlKey&&t==1&&(t=3),t}var be=function(){if(O&&S<9)return!1;var e=v("div");return"draggable"in e||"dragDrop"in e}(),et;function dt(e){if(et==null){var t=v("span","\u200B");Y(e,v("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(et=t.offsetWidth<=1&&t.offsetHeight>2&&!(O&&S<8))}var r=et?v("span","\u200B"):v("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}var at;function At(e){if(at!=null)return at;var t=Y(e,document.createTextNode("A\u062EA")),r=N(t,0,1).getBoundingClientRect(),n=N(t,1,2).getBoundingClientRect();return pe(e),!r||r.left==r.right?!1:at=n.right-r.right<3}var bt=`
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/)},lt=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},jt=function(){var e=v("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),ft=null;function mt(e){if(ft!=null)return ft;var t=Y(e,v("span","x")),r=t.getBoundingClientRect(),n=N(t,0,1).getBoundingClientRect();return ft=Math.abs(r.left-n.left)>1}var vt={},qe={};function en(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),vt[e]=t}function Ut(e,t){qe[e]=t}function Jt(e){if(typeof e=="string"&&qe.hasOwnProperty(e))e=qe[e];else if(e&&typeof e.name=="string"&&qe.hasOwnProperty(e.name)){var t=qe[e.name];typeof t=="string"&&(t={name:t}),e=Ie(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Jt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Jt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function cn(e,t){t=Jt(t);var r=vt[t.name];if(!r)return cn(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 Zt(e,t){var r=pn.hasOwnProperty(e)?pn[e]:pn[e]={};c(t,r)}function mn(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 $n(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 fr(e,t,r){return e.startState?e.startState(t,r):!0}var Tt=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};Tt.prototype.eol=function(){return this.pos>=this.string.length},Tt.prototype.sol=function(){return this.pos==this.lineStart},Tt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Tt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Tt.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},Tt.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Tt.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Tt.prototype.skipToEnd=function(){this.pos=this.string.length},Tt.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Tt.prototype.backUp=function(e){this.pos-=e},Tt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=T(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?T(this.string,this.lineStart,this.tabSize):0)},Tt.prototype.indentation=function(){return T(this.string,null,this.tabSize)-(this.lineStart?T(this.string,this.lineStart,this.tabSize):0)},Tt.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)}},Tt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Tt.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Tt.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Tt.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 Tn(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 hr(e,t,r){var n=[];return e.iter(t,r,function(i){n.push(i.text)}),n}function gn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function yt(e){if(e.parent==null)return null;for(var t=e.parent,r=Q(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 On(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 s=e.lines[o],l=s.height;if(t<l)break;t-=l}return r+o}function Pn(e,t){return t>=e.first&&t<e.first+e.size}function Yn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function Ee(e,t,r){if(r===void 0&&(r=null),!(this instanceof Ee))return new Ee(e,t,r);this.line=e,this.ch=t,this.sticky=r}function ct(e,t){return e.line-t.line||e.ch-t.ch}function Me(e,t){return e.sticky==t.sticky&&ct(e,t)==0}function Ur(e){return Ee(e.line,e.ch)}function pr(e,t){return ct(e,t)<0?t:e}function Jn(e,t){return ct(e,t)<0?e:t}function Zn(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ut(e,t){if(t.line<e.first)return Ee(e.first,0);var r=e.first+e.size-1;return t.line>r?Ee(r,Ze(e,r).text.length):Zi(t,Ze(e,t.line).text.length)}function Zi(e,t){var r=e.ch;return r==null||r>t?Ee(e.line,t):r<0?Ee(e.line,0):e}function Fr(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=ut(e,t[n]);return r}var vn=function(e,t){this.state=e,this.lookAhead=t},dn=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};dn.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},dn.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}},dn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},dn.fromSaved=function(e,t,r){return t instanceof vn?new dn(e,mn(e.mode,t.state),r,t.lookAhead):new dn(e,mn(e.mode,t),r)},dn.prototype.save=function(e){var t=e!==!1?mn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new vn(t,this.maxLookAhead):t};function yi(e,t,r,n){var i=[e.state.modeGen],a={};Wr(e,t.text,e.doc.mode,r,function(u,b){return i.push(u,b)},a,n);for(var o=r.state,s=function(u){r.baseTokens=i;var b=e.state.overlays[u],E=1,I=0;r.state=!0,Wr(e,t.text,b.mode,r,function(A,ne){for(var ge=E;I<A;){var ke=i[E];ke>A&&i.splice(E,1,A,i[E+1],ke),E+=2,I=Math.min(A,ke)}if(!ne)return;if(b.opaque)i.splice(ge,E-ge,A,"overlay "+ne),E=ge+2;else for(;ge<E;ge+=2){var Re=i[ge+1];i[ge+1]=(Re?Re+" ":"")+"overlay "+ne}},a),r.state=o,r.baseTokens=null,r.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function Br(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=sn(e,yt(t)),i=t.text.length>e.options.maxHighlightLength&&mn(e.doc.mode,n.state),a=yi(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 sn(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new dn(n,!0,t);var a=Qn(e,t,r),o=a>n.first&&Ze(n,a-1).stateAfter,s=o?dn.fromSaved(n,o,a):new dn(n,fr(n.mode),a);return n.iter(a,t,function(l){mr(e,l.text,s);var u=s.line;l.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&u<i.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function mr(e,t,r,n){var i=e.doc.mode,a=new Tt(t,e.options.tabSize,r);for(a.start=a.pos=n||0,t==""&&xi(i,r.state);!a.eol();)gr(i,a,r.state),a.start=a.pos}function xi(e,t){if(e.blankLine)return e.blankLine(t);if(!e.innerMode)return;var r=$n(e,t);if(r.mode.blankLine)return r.mode.blankLine(r.state)}function gr(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=$n(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 Ln=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Mn(e,t,r,n){var i=e.doc,a=i.mode,o;t=ut(i,t);var s=Ze(i,t.line),l=sn(e,t.line,r),u=new Tt(s.text,e.options.tabSize,l),b;for(n&&(b=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,o=gr(a,u,l.state),n&&b.push(new Ln(u,o,mn(i.mode,l.state)));return n?b:new Ln(u,o,l.state)}function wi(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 Wr(e,t,r,n,i,a,o){var s=r.flattenSpans;s==null&&(s=e.options.flattenSpans);var l=0,u=null,b=new Tt(t,e.options.tabSize,n),E,I=e.options.addModeClass&&[null];for(t==""&&wi(xi(r,n.state),a);!b.eol();){if(b.pos>e.options.maxHighlightLength?(s=!1,o&&mr(e,t,n,b.pos),b.pos=t.length,E=null):E=wi(gr(r,b,n.state,I),a),I){var A=I[0].name;A&&(E="m-"+(E?A+" "+E:A))}if(!s||u!=E){for(;l<b.start;)l=Math.min(b.start,l+5e3),i(l,u);u=E}b.start=b.pos}for(;l<b.pos;){var ne=Math.min(b.pos,l+5e3);i(ne,u),l=ne}}function Qn(e,t,r){for(var n,i,a=e.doc,o=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>o;--s){if(s<=a.first)return a.first;var l=Ze(a,s-1),u=l.stateAfter;if(u&&(!r||s+(u instanceof vn?u.lookAhead:0)<=a.modeFrontier))return s;var b=T(l.text,null,e.options.tabSize);(i==null||n>b)&&(i=s-1,n=b)}return i}function zr(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 vn)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}var Ei=!1,bn=!1;function _i(){Ei=!0}function Ci(){bn=!0}function vr(e,t,r){this.marker=e,this.from=t,this.to=r}function Nn(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function ja(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Hr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function qn(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,s=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(s||a.from==t&&o.type=="bookmark"&&(!r||!a.marker.insertLeft)){var l=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(n||(n=[])).push(new vr(o,a.from,l?null:a.to))}}return n}function Kr(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,s=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(s||a.from==t&&o.type=="bookmark"&&(!r||a.marker.insertLeft)){var l=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(n||(n=[])).push(new vr(o,l?null:a.from-t,a.to==null?null:a.to-t))}}return n}function In(e,t){if(t.full)return null;var r=Pn(e,t.from.line)&&Ze(e,t.from.line).markedSpans,n=Pn(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=ct(t.from,t.to)==0,s=qn(r,i,o),l=Kr(n,a,o),u=t.text.length==1,b=Le(t.text).length+(u?i:0);if(s)for(var E=0;E<s.length;++E){var I=s[E];if(I.to==null){var A=Nn(l,I.marker);A?u&&(I.to=A.to==null?null:A.to+b):I.to=i}}if(l)for(var ne=0;ne<l.length;++ne){var ge=l[ne];if(ge.to!=null&&(ge.to+=b),ge.from==null){var ke=Nn(s,ge.marker);ke||(ge.from=b,u&&(s||(s=[])).push(ge))}else ge.from+=b,u&&(s||(s=[])).push(ge)}s&&(s=er(s)),l&&l!=s&&(l=er(l));var Re=[s];if(!u){var Fe=t.text.length-2,Pe;if(Fe>0&&s)for(var He=0;He<s.length;++He)s[He].to==null&&(Pe||(Pe=[])).push(new vr(s[He].marker,null,null));for(var ot=0;ot<Fe;++ot)Re.push(Pe);Re.push(l)}return Re}function er(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 Si(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(A){if(A.markedSpans)for(var ne=0;ne<A.markedSpans.length;++ne){var ge=A.markedSpans[ne].marker;ge.readOnly&&(!n||Q(n,ge)==-1)&&(n||(n=[])).push(ge)}}),!n)return null;for(var i=[{from:t,to:r}],a=0;a<n.length;++a)for(var o=n[a],s=o.find(0),l=0;l<i.length;++l){var u=i[l];if(ct(u.to,s.from)<0||ct(u.from,s.to)>0)continue;var b=[l,1],E=ct(u.from,s.from),I=ct(u.to,s.to);(E<0||!o.inclusiveLeft&&!E)&&b.push({from:u.from,to:s.from}),(I>0||!o.inclusiveRight&&!I)&&b.push({from:s.to,to:u.to}),i.splice.apply(i,b),l+=b.length-3}return i}function Xr(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 tr(e,t){if(!t)return;for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}function br(e){return e.inclusiveLeft?-1:0}function _n(e){return e.inclusiveRight?1:0}function Gr(e,t){var r=e.lines.length-t.lines.length;if(r!=0)return r;var n=e.find(),i=t.find(),a=ct(n.from,i.from)||br(e)-br(t);if(a)return-a;var o=ct(n.to,i.to)||_n(e)-_n(t);return o||t.id-e.id}function ki(e,t){var r=bn&&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||Gr(n,i.marker)<0)&&(n=i.marker);return n}function Ti(e){return ki(e,!0)}function Vr(e){return ki(e,!1)}function Ua(e,t){var r=bn&&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||Gr(n,a.marker)<0)&&(n=a.marker)}return n}function Qi(e,t,r,n,i){var a=Ze(e,t),o=bn&&a.markedSpans;if(o)for(var s=0;s<o.length;++s){var l=o[s];if(!l.marker.collapsed)continue;var u=l.marker.find(0),b=ct(u.from,r)||br(l.marker)-br(i),E=ct(u.to,n)||_n(l.marker)-_n(i);if(b>=0&&E<=0||b<=0&&E>=0)continue;if(b<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ct(u.to,r)>=0:ct(u.to,r)>0)||b>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?ct(u.from,n)<=0:ct(u.from,n)<0))return!0}}function tt(e){for(var t;t=Ti(e);)e=t.find(-1,!0).line;return e}function ht(e){for(var t;t=Vr(e);)e=t.find(1,!0).line;return e}function pt(e){for(var t,r;t=Vr(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function Et(e,t){var r=Ze(e,t),n=tt(r);return r==n?t:yt(n)}function _t(e,t){if(t>e.lastLine())return t;var r=Ze(e,t),n;if(!St(e,r))return t;for(;n=Vr(r);)r=n.find(1,!0).line;return yt(r)+1}function St(e,t){var r=bn&&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&&Rt(e,t,n))return!0}}function Rt(e,t,r){if(r.to==null){var n=r.marker.find(1,!0);return Rt(e,n.line,Nn(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)&&Rt(e,t,i))return!0}function Ot(e){e=tt(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 s=a.children[o];if(s==r)break;t+=s.height}return t}function Gt(e){if(e.height==0)return 0;for(var t=e.text.length,r,n=e;r=Ti(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=Vr(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 yn(e){var t=e.display,r=e.doc;t.maxLine=Ze(r,r.first),t.maxLineLength=Gt(t.maxLine),t.maxLineChanged=!0,r.iter(function(n){var i=Gt(n);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=n)})}var kt=function(e,t,r){this.text=e,tr(this,t),this.height=r?r(this):1};kt.prototype.lineNo=function(){return yt(this)},C(kt);function jn(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Xr(e),tr(e,r);var i=n?n(e):1;i!=e.height&&gn(e,i)}function Vt(e){e.parent=null,Xr(e)}var Un={},Fn={};function yr(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Fn:Un;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Fa(e,t){var r=W("span",null,null,_?"padding-right: .1px":null),n={pre:W("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=Ss,At(e.display.measure)&&(o=Ye(a,e.doc.direction))&&(n.addToken=Ts(n.addToken,o)),n.map=[];var s=t!=e.display.externalMeasured&&yt(a);Os(a,n,Br(e,a,s)),a.styleClasses&&(a.styleClasses.bgClass&&(n.bgClass=K(a.styleClasses.bgClass,n.bgClass||"")),a.styleClasses.textClass&&(n.textClass=K(a.styleClasses.textClass,n.textClass||""))),n.map.length==0&&n.map.push(0,0,n.content.appendChild(dt(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(_){var l=n.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ue(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=K(n.pre.className,n.textClass||"")),n}function Cs(e){var t=v("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Ss(e,t,r,n,i,a,o){if(!t)return;var s=e.splitSpaces?ks(t,e.trailingSpace):t,l=e.cm.state.specialChars,u=!1,b;if(!l.test(t))e.col+=t.length,b=document.createTextNode(s),e.map.push(e.pos,e.pos+t.length,b),O&&S<9&&(u=!0),e.pos+=t.length;else{b=document.createDocumentFragment();for(var E=0;;){l.lastIndex=E;var I=l.exec(t),A=I?I.index-E:t.length-E;if(A){var ne=document.createTextNode(s.slice(E,E+A));O&&S<9?b.appendChild(v("span",[ne])):b.appendChild(ne),e.map.push(e.pos,e.pos+A,ne),e.col+=A,e.pos+=A}if(!I)break;E+=A+1;var ge=void 0;if(I[0]==" "){var ke=e.cm.options.tabSize,Re=ke-e.col%ke;ge=b.appendChild(v("span",V(Re),"cm-tab")),ge.setAttribute("role","presentation"),ge.setAttribute("cm-text"," "),e.col+=Re}else I[0]=="\r"||I[0]==`
`?(ge=b.appendChild(v("span",I[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),ge.setAttribute("cm-text",I[0]),e.col+=1):(ge=e.cm.options.specialCharPlaceholder(I[0]),ge.setAttribute("cm-text",I[0]),O&&S<9?b.appendChild(v("span",[ge])):b.appendChild(ge),e.col+=1);e.map.push(e.pos,e.pos+1,ge),e.pos++}}if(e.trailingSpace=s.charCodeAt(t.length-1)==32,r||n||i||u||a||o){var Fe=r||"";n&&(Fe+=n),i&&(Fe+=i);var Pe=v("span",[b],Fe,a);if(o)for(var He in o)o.hasOwnProperty(He)&&He!="style"&&He!="class"&&Pe.setAttribute(He,o[He]);return e.content.appendChild(Pe)}e.content.appendChild(b)}function ks(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 Ts(e,t){return function(r,n,i,a,o,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,b=u+n.length;;){for(var E=void 0,I=0;I<t.length&&!(E=t[I],E.to>u&&E.from<=u);I++);if(E.to>=b)return e(r,n,i,a,o,s,l);e(r,n.slice(0,E.to-u),i,a,null,s,l),a=null,n=n.slice(E.to-u),u=E.to}}}function Ba(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 Os(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]),yr(r[o+1],t.cm.options));return}for(var s=i.length,l=0,u=1,b="",E,I,A=0,ne,ge,ke,Re,Fe;;){if(A==l){ne=ge=ke=I="",Fe=null,Re=null,A=Infinity;for(var Pe=[],He=void 0,ot=0;ot<n.length;++ot){var nt=n[ot],gt=nt.marker;if(gt.type=="bookmark"&&nt.from==l&&gt.widgetNode)Pe.push(gt);else if(nt.from<=l&&(nt.to==null||nt.to>l||gt.collapsed&&nt.to==l&&nt.from==l)){if(nt.to!=null&&nt.to!=l&&A>nt.to&&(A=nt.to,ge=""),gt.className&&(ne+=" "+gt.className),gt.css&&(I=(I?I+";":"")+gt.css),gt.startStyle&&nt.from==l&&(ke+=" "+gt.startStyle),gt.endStyle&&nt.to==A&&(He||(He=[])).push(gt.endStyle,nt.to),gt.title&&((Fe||(Fe={})).title=gt.title),gt.attributes)for(var Ct in gt.attributes)(Fe||(Fe={}))[Ct]=gt.attributes[Ct];gt.collapsed&&(!Re||Gr(Re.marker,gt)<0)&&(Re=nt)}else nt.from>l&&A>nt.from&&(A=nt.from)}if(He)for(var zt=0;zt<He.length;zt+=2)He[zt+1]==A&&(ge+=" "+He[zt]);if(!Re||Re.from==l)for(var Mt=0;Mt<Pe.length;++Mt)Ba(t,0,Pe[Mt]);if(Re&&(Re.from||0)==l){if(Ba(t,(Re.to==null?s+1:Re.to)-l,Re.marker,Re.from==null),Re.to==null)return;Re.to==l&&(Re=!1)}}if(l>=s)break;for(var un=Math.min(s,A);;){if(b){var rn=l+b.length;if(!Re){var Nt=rn>un?b.slice(0,un-l):b;t.addToken(t,Nt,E?E+ne:ne,ke,l+Nt.length==A?ge:"",I,Fe)}if(rn>=un){b=b.slice(un-l),l=un;break}l=rn,ke=""}b=i.slice(a,a=r[u++]),E=yr(r[u++],t.cm.options)}}}function Wa(e,t,r){this.line=t,this.rest=pt(t),this.size=this.rest?yt(Le(this.rest))-r+1:1,this.node=this.text=null,this.hidden=St(e,t)}function Oi(e,t,r){for(var n=[],i,a=t;a<r;a=i){var o=new Wa(e.doc,Ze(e.doc,a),a);i=a+o.size,n.push(o)}return n}var xr=null;function Ls(e){xr?xr.ops.push(e):e.ownsGroup=xr={ops:[e],delayedCallbacks:[]}}function Ms(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 Ds(e,t){var r=e.ownsGroup;if(!r)return;try{Ms(r)}finally{xr=null,t(r)}}var $r=null;function Kt(e,t){var r=rt(e,t);if(!r.length)return;var n=Array.prototype.slice.call(arguments,2),i;xr?i=xr.delayedCallbacks:$r?i=$r:(i=$r=[],setTimeout(As,0));for(var a=function(s){i.push(function(){return r[s].apply(null,n)})},o=0;o<r.length;++o)a(o)}function As(){var e=$r;$r=null;for(var t=0;t<e.length;++t)e[t]()}function za(e,t,r,n){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a=="text"?Ps(e,t):a=="gutter"?Ka(e,t,r,n):a=="class"?qi(e,t):a=="widget"&&Ns(e,t,n)}t.changes=null}function Yr(e){return e.node==e.text&&(e.node=v("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),O&&S<8&&(e.node.style.zIndex=2)),e.node}function Rs(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=Yr(t);t.background=n.insertBefore(v("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}function Ha(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Fa(e,t)}function Ps(e,t){var r=t.text.className,n=Ha(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,qi(e,t)):r&&(t.text.className=r)}function qi(e,t){Rs(e,t),t.line.wrapClass?Yr(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 Ka(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=Yr(t);t.gutterBackground=v("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=Yr(t),s=t.gutter=v("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),o.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=s.appendChild(v("div",Yn(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var l=0;l<e.display.gutterSpecs.length;++l){var u=e.display.gutterSpecs[l].className,b=a.hasOwnProperty(u)&&a[u];b&&s.appendChild(v("div",[b],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function Ns(e,t,r){t.alignable&&(t.alignable=null);for(var n=Z("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);Xa(e,t,r)}function Is(e,t,r,n){var i=Ha(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),qi(e,t),Ka(e,t,r,n),Xa(e,t,n),t.node}function Xa(e,t,r){if(Ga(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Ga(e,t.rest[n],t,r,!1)}function Ga(e,t,r,n,i){if(!t.widgets)return;for(var a=Yr(r),o=0,s=t.widgets;o<s.length;++o){var l=s[o],u=v("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),js(l,u,r,n),e.display.input.setUneditable(u),i&&l.above?a.insertBefore(u,r.gutter||r.text):a.appendChild(u),Kt(l,"redraw")}}function js(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 Jr(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;"),Y(t.display.measure,v("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function Dn(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 Li(e){return e.lineSpace.offsetTop}function ea(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Va(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Y(e.measure,v("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 Cn(e){return Se-e.display.nativeBarWidth}function nr(e){return e.display.scroller.clientWidth-Cn(e)-e.display.barWidth}function ta(e){return e.display.scroller.clientHeight-Cn(e)-e.display.barHeight}function Us(e,t,r){var n=e.options.lineWrapping,i=n&&nr(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(),s=0;s<o.length-1;s++){var l=o[s],u=o[s+1];Math.abs(l.bottom-u.bottom)>2&&a.push((l.bottom+u.top)/2-r.top)}}a.push(r.bottom-r.top)}}function $a(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(yt(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Fs(e,t){t=tt(t);var r=yt(t),n=e.display.externalMeasured=new Wa(e.doc,t,r);n.lineN=r;var i=n.built=Fa(e,n);return n.text=i.pre,Y(e.display.lineMeasure,i.pre),n}function Ya(e,t,r,n){return Sn(e,wr(e,t),r,n)}function na(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ar(e,t)];var r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size)return r}function wr(e,t){var r=yt(t),n=na(e,r);n&&!n.text?n=null:n&&n.changes&&(za(e,n,r,la(e)),e.curOp.forceUpdate=!0),n||(n=Fs(e,t));var i=$a(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Sn(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=Ws(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 Ja={left:0,right:0,top:0,bottom:0};function Za(e,t,r){for(var n,i,a,o,s,l,u=0;u<e.length;u+=3)if(s=e[u],l=e[u+1],t<s?(i=0,a=1,o="left"):t<l?(i=t-s,a=i+1):(u==e.length-3||t==l&&e[u+3]>t)&&(a=l-s,i=a-1,t>=l&&(o="right")),i!=null){if(n=e[u+2],s==l&&r==(n.insertLeft?"left":"right")&&(o=r),r=="left"&&i==0)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[(u-=3)+2],o="left";if(r=="right"&&i==l-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],o="right";break}return{node:n,start:i,end:a,collapse:o,coverStart:s,coverEnd:l}}function Bs(e,t){var r=Ja;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 Ws(e,t,r,n){var i=Za(t.map,r,n),a=i.node,o=i.start,s=i.end,l=i.collapse,u;if(a.nodeType==3){for(var b=0;b<4;b++){for(;o&&ve(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+s<i.coverEnd&&ve(t.line.text.charAt(i.coverStart+s));)++s;if(O&&S<9&&o==0&&s==i.coverEnd-i.coverStart?u=a.parentNode.getBoundingClientRect():u=Bs(N(a,o,s).getClientRects(),n),u.left||u.right||o==0)break;s=o,o=o-1,l="right"}O&&S<11&&(u=zs(e.display.measure,u))}else{o>0&&(l=n="right");var E;e.options.lineWrapping&&(E=a.getClientRects()).length>1?u=E[n=="right"?E.length-1:0]:u=a.getBoundingClientRect()}if(O&&S<9&&!o&&(!u||!u.left&&!u.right)){var I=a.parentNode.getClientRects()[0];I?u={left:I.left,right:I.left+_r(e.display),top:I.top,bottom:I.bottom}:u=Ja}for(var A=u.top-t.rect.top,ne=u.bottom-t.rect.top,ge=(A+ne)/2,ke=t.view.measure.heights,Re=0;Re<ke.length-1&&!(ge<ke[Re]);Re++);var Fe=Re?ke[Re-1]:0,Pe=ke[Re],He={left:(l=="right"?u.right:u.left)-t.rect.left,right:(l=="left"?u.left:u.right)-t.rect.left,top:Fe,bottom:Pe};return!u.left&&!u.right&&(He.bogus=!0),e.options.singleCursorHeightPerLine||(He.rtop=A,He.rbottom=ne),He}function zs(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!mt(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 Qa(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 qa(e){e.display.externalMeasure=null,pe(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Qa(e.display.view[t])}function Zr(e){qa(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function eo(){return P&&L?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function to(){return P&&L?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function ra(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=Jr(e.widgets[r]));return t}function Mi(e,t,r,n,i){if(!i){var a=ra(t);r.top+=a,r.bottom+=a}if(n=="line")return r;n||(n="local");var o=Ot(t);if(n=="local"?o+=Li(e.display):o-=e.display.viewOffset,n=="page"||n=="window"){var s=e.display.lineSpace.getBoundingClientRect();o+=s.top+(n=="window"?0:to());var l=s.left+(n=="window"?0:eo());r.left+=l,r.right+=l}return r.top+=o,r.bottom+=o,r}function no(e,t,r){if(r=="div")return t;var n=t.left,i=t.top;if(r=="page")n-=eo(),i-=to();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 ia(e,t,r,n,i){return n||(n=Ze(e.doc,t.line)),Mi(e,n,Ya(e,n,t.ch,i),r)}function xn(e,t,r,n,i,a){n=n||Ze(e.doc,t.line),i||(i=wr(e,n));function o(ne,ge){var ke=Sn(e,i,ne,ge?"right":"left",a);return ge?ke.left=ke.right:ke.right=ke.left,Mi(e,n,ke,r)}var s=Ye(n,e.doc.direction),l=t.ch,u=t.sticky;if(l>=n.text.length?(l=n.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return o(u=="before"?l-1:l,u=="before");function b(ne,ge,ke){var Re=s[ge],Fe=Re.level==1;return o(ke?ne-1:ne,Fe!=ke)}var E=Ke(s,l,u),I=Ve,A=b(l,E,u=="before");return I!=null&&(A.other=b(l,I,u!="before")),A}function ro(e,t){var r=0;t=ut(e.doc,t),e.options.lineWrapping||(r=_r(e.display)*t.ch);var n=Ze(e.doc,t.line),i=Ot(n)+Li(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function aa(e,t,r,n,i){var a=Ee(e,t,r);return a.xRel=i,n&&(a.outside=n),a}function oa(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,r<0)return aa(n.first,0,null,-1,-1);var i=On(n,r),a=n.first+n.size-1;if(i>a)return aa(n.first+n.size-1,Ze(n,a).text.length,null,1,1);t<0&&(t=0);for(var o=Ze(n,i);;){var s=Hs(e,o,i,t,r),l=Ua(o,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==i)return u;o=Ze(n,i=u.line)}}function io(e,t,r,n){n-=ra(t);var i=t.text.length,a=Je(function(o){return Sn(e,r,o-1).bottom<=n},i,0);return i=Je(function(o){return Sn(e,r,o).top>n},a,i),{begin:a,end:i}}function ao(e,t,r,n){r||(r=wr(e,t));var i=Mi(e,t,Sn(e,r,n),"line").top;return io(e,t,r,i)}function sa(e,t,r,n){return e.bottom<=r?!1:e.top>r?!0:(n?e.left:e.right)>t}function Hs(e,t,r,n,i){i-=Ot(t);var a=wr(e,t),o=ra(t),s=0,l=t.text.length,u=!0,b=Ye(t,e.doc.direction);if(b){var E=(e.options.lineWrapping?Xs:Ks)(e,t,r,a,b,n,i);u=E.level!=1,s=u?E.from:E.to-1,l=u?E.to:E.from-1}var I=null,A=null,ne=Je(function(ot){var nt=Sn(e,a,ot);return nt.top+=o,nt.bottom+=o,sa(nt,n,i,!1)?(nt.top<=i&&nt.left<=n&&(I=ot,A=nt),!0):!1},s,l),ge,ke,Re=!1;if(A){var Fe=n-A.left<A.right-n,Pe=Fe==u;ne=I+(Pe?0:1),ke=Pe?"after":"before",ge=Fe?A.left:A.right}else{!u&&(ne==l||ne==s)&&ne++,ke=ne==0?"after":ne==t.text.length?"before":Sn(e,a,ne-(u?1:0)).bottom+o<=i==u?"after":"before";var He=xn(e,Ee(r,ne,ke),"line",t,a);ge=He.left,Re=i<He.top?-1:i>=He.bottom?1:0}return ne=we(t.text,ne,1),aa(r,ne,ke,Re,n-ge)}function Ks(e,t,r,n,i,a,o){var s=Je(function(E){var I=i[E],A=I.level!=1;return sa(xn(e,Ee(r,A?I.to:I.from,A?"before":"after"),"line",t,n),a,o,!0)},0,i.length-1),l=i[s];if(s>0){var u=l.level!=1,b=xn(e,Ee(r,u?l.from:l.to,u?"after":"before"),"line",t,n);sa(b,a,o,!0)&&b.top>o&&(l=i[s-1])}return l}function Xs(e,t,r,n,i,a,o){var s=io(e,t,n,o),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var b=null,E=null,I=0;I<i.length;I++){var A=i[I];if(A.from>=u||A.to<=l)continue;var ne=A.level!=1,ge=Sn(e,n,ne?Math.min(u,A.to)-1:Math.max(l,A.from)).right,ke=ge<a?a-ge+1e9:ge-a;(!b||E>ke)&&(b=A,E=ke)}return b||(b=i[i.length-1]),b.from<l&&(b={from:l,to:b.to,level:b.level}),b.to>u&&(b={from:b.from,to:u,level:b.level}),b}var rr;function Er(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(rr==null){rr=v("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)rr.appendChild(document.createTextNode("x")),rr.appendChild(v("br"));rr.appendChild(document.createTextNode("x"))}Y(e.measure,rr);var r=rr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),pe(e.measure),r||1}function _r(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=v("span","xxxxxxxxxx"),r=v("pre",[t],"CodeMirror-line-like");Y(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function la(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var s=e.display.gutterSpecs[o].className;r[s]=a.offsetLeft+a.clientLeft+i,n[s]=a.clientWidth}return{fixedPos:ua(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function ua(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function oo(e){var t=Er(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/_r(e.display)-3);return function(i){if(St(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 ca(e){var t=e.doc,r=oo(e);t.iter(function(n){var i=r(n);i!=n.height&&gn(n,i)})}function ir(e,t,r,n){var i=e.display;if(!r&&R(t).getAttribute("cm-not-content")=="true")return null;var a,o,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,o=t.clientY-s.top}catch(E){return null}var l=oa(e,a,o),u;if(n&&l.xRel>0&&(u=Ze(e.doc,l.line).text).length==l.ch){var b=T(u,u.length,e.options.tabSize)-u.length;l=Ee(l.line,Math.max(0,Math.round((a-Va(e.display).left)/_r(e.display))-b))}return l}function ar(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)bn&&Et(e.doc,t)<i.viewTo&&Wn(e);else if(r<=i.viewFrom)bn&&_t(e.doc,r+n)>i.viewFrom?Wn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Wn(e);else if(t<=i.viewFrom){var a=Di(e,r,r+n,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=n):Wn(e)}else if(r>=i.viewTo){var o=Di(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Wn(e)}else{var s=Di(e,t,t,-1),l=Di(e,r,r+n,1);s&&l?(i.view=i.view.slice(0,s.index).concat(Oi(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=n):Wn(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function Bn(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[ar(e,t)];if(a.node==null)return;var o=a.changes||(a.changes=[]);Q(o,r)==-1&&o.push(r)}function Wn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Di(e,t,r,n){var i=ar(e,t),a,o=e.display.view;if(!bn||r==e.doc.first+e.doc.size)return{index:i,lineN:r};for(var s=e.display.viewFrom,l=0;l<i;l++)s+=o[l].size;if(s!=t){if(n>0){if(i==o.length-1)return null;a=s+o[i].size-t,i++}else a=s-t;t+=a,r+=a}for(;Et(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 Gs(e,t,r){var n=e.display,i=n.view;i.length==0||t>=n.viewTo||r<=n.viewFrom?(n.view=Oi(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=Oi(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(ar(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(Oi(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,ar(e,r)))),n.viewTo=r}function so(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 Qr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function lo(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 s=r.sel.ranges[o];if(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)continue;var l=s.empty();(l||e.options.showCursorWhenSelecting)&&uo(e,s.head,i),l||Vs(e,s,a)}return n}function uo(e,t,r){var n=xn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(v("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(v("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 Ai(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=Va(e.display),s=o.left,l=Math.max(n.sizerWidth,nr(e)-n.sizer.offsetLeft)-o.right,u=i.direction=="ltr";function b(Pe,He,ot,nt){He<0&&(He=0),He=Math.round(He),nt=Math.round(nt),a.appendChild(v("div",null,"CodeMirror-selected","position: absolute; left: "+Pe+`px;
top: `+He+"px; width: "+(ot==null?l-Pe:ot)+`px;
height: `+(nt-He)+"px"))}function E(Pe,He,ot){var nt=Ze(i,Pe),gt=nt.text.length,Ct,zt;function Mt(Nt,an){return ia(e,Ee(Pe,Nt),"div",nt,an)}function un(Nt,an,Xt){var Ft=ao(e,nt,null,Nt),It=an=="ltr"==(Xt=="after")?"left":"right",Dt=Xt=="after"?Ft.begin:Ft.end-(/\s/.test(nt.text.charAt(Ft.end-1))?2:1);return Mt(Dt,It)[It]}var rn=Ye(nt,i.direction);return $e(rn,He||0,ot==null?gt:ot,function(Nt,an,Xt,Ft){var It=Xt=="ltr",Dt=Mt(Nt,It?"left":"right"),on=Mt(an-1,It?"right":"left"),Ir=He==null&&Nt==0,Vn=ot==null&&an==gt,Yt=Ft==0,kn=!rn||Ft==rn.length-1;if(on.top-Dt.top<=3){var Ht=(u?Ir:Vn)&&Yt,Na=(u?Vn:Ir)&&kn,Rn=Ht?s:(It?Dt:on).left,cr=Na?l:(It?on:Dt).right;b(Rn,Dt.top,cr-Rn,Dt.bottom)}else{var dr,qt,jr,Ia;It?(dr=u&&Ir&&Yt?s:Dt.left,qt=u?l:un(Nt,Xt,"before"),jr=u?s:un(an,Xt,"after"),Ia=u&&Vn&&kn?l:on.right):(dr=u?un(Nt,Xt,"before"):s,qt=!u&&Ir&&Yt?l:Dt.right,jr=!u&&Vn&&kn?s:on.left,Ia=u?un(an,Xt,"after"):l),b(dr,Dt.top,qt-dr,Dt.bottom),Dt.bottom<on.top&&b(s,Dt.bottom,null,on.top),b(jr,on.top,Ia-jr,on.bottom)}(!Ct||Ai(Dt,Ct)<0)&&(Ct=Dt),Ai(on,Ct)<0&&(Ct=on),(!zt||Ai(Dt,zt)<0)&&(zt=Dt),Ai(on,zt)<0&&(zt=on)}),{start:Ct,end:zt}}var I=t.from(),A=t.to();if(I.line==A.line)E(I.line,I.ch,A.ch);else{var ne=Ze(i,I.line),ge=Ze(i,A.line),ke=tt(ne)==tt(ge),Re=E(I.line,I.ch,ke?ne.text.length+1:null).end,Fe=E(A.line,ke?0:null,A.ch).start;ke&&(Re.top<Fe.top-2?(b(Re.right,Re.top,null,Re.bottom),b(s,Fe.top,Fe.left,Fe.bottom)):b(Re.right,Re.top,Fe.left-Re.right,Re.bottom)),Re.bottom<Fe.top&&b(s,Re.bottom,null,Fe.top)}r.appendChild(a)}function da(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()||Cr(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}function co(e){e.state.focused||(e.display.input.focus(),fa(e))}function fo(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Cr(e))},100)}function fa(e,t){if(e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),e.options.readOnly=="nocursor")return;e.state.focused||(ue(e,"focus",e,t),e.state.focused=!0,le(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),_&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),da(e)}function Cr(e,t){if(e.state.delayingBlurEvent)return;e.state.focused&&(ue(e,"blur",e,t),e.state.focused=!1,ee(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Ri(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,s=0;if(i.hidden)continue;if(O&&S<8){var l=i.node.offsetTop+i.node.offsetHeight;o=l-r,r=l}else{var u=i.node.getBoundingClientRect();o=u.bottom-u.top,!a&&i.text.firstChild&&(s=i.text.firstChild.getBoundingClientRect().right-u.left-1)}var b=i.line.height-o;if((b>.005||b<-.005)&&(gn(i.line,o),ho(i.line),i.rest))for(var E=0;E<i.rest.length;E++)ho(i.rest[E]);if(s>e.display.sizerWidth){var I=Math.ceil(s/_r(e.display));I>e.display.maxLineLength&&(e.display.maxLineLength=I,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}function ho(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 Pi(e,t,r){var n=r&&r.top!=null?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Li(e));var i=r&&r.bottom!=null?r.bottom:n+e.wrapper.clientHeight,a=On(t,n),o=On(t,i);if(r&&r.ensure){var s=r.ensure.from.line,l=r.ensure.to.line;s<a?(a=s,o=On(t,Ot(Ze(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=o&&(a=On(t,Ot(Ze(t,l))-e.wrapper.clientHeight),o=l)}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&&!D){var a=v("div","\u200B",null,`position: absolute;
top: `+(t.top-r.viewOffset-Li(e.display))+`px;
height: `+(t.bottom-t.top+Cn(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?Ee(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t,r=t.sticky=="before"?Ee(t.line,t.ch+1,"before"):t);for(var a=0;a<5;a++){var o=!1,s=xn(e,t),l=!r||r==t?s:xn(e,r);i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-n,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+n};var u=ha(e,i),b=e.doc.scrollTop,E=e.doc.scrollLeft;if(u.scrollTop!=null&&(ei(e,u.scrollTop),Math.abs(e.doc.scrollTop-b)>1&&(o=!0)),u.scrollLeft!=null&&(or(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-E)>1&&(o=!0)),!o)break}return i}function Js(e,t){var r=ha(e,t);r.scrollTop!=null&&ei(e,r.scrollTop),r.scrollLeft!=null&&or(e,r.scrollLeft)}function ha(e,t){var r=e.display,n=Er(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:r.scroller.scrollTop,a=ta(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var s=e.doc.height+ea(r),l=t.top<n,u=t.bottom>s-n;if(t.top<i)o.scrollTop=l?0:t.top;else if(t.bottom>i+a){var b=Math.min(t.top,(u?s:t.bottom)-a);b!=i&&(o.scrollTop=b)}var E=e.options.fixedGutter?0:r.gutters.offsetWidth,I=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:r.scroller.scrollLeft-E,A=nr(e)-r.gutters.offsetWidth,ne=t.right-t.left>A;return ne&&(t.right=t.left+A),t.left<10?o.scrollLeft=0:t.left<I?o.scrollLeft=Math.max(0,t.left+E-(ne?0:10)):t.right>A+I-3&&(o.scrollLeft=t.right+(ne?0:10)-A),o}function pa(e,t){if(t==null)return;Ni(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t}function Sr(e){Ni(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function qr(e,t,r){(t!=null||r!=null)&&Ni(e),t!=null&&(e.curOp.scrollLeft=t),r!=null&&(e.curOp.scrollTop=r)}function Zs(e,t){Ni(e),e.curOp.scrollToPos=t}function Ni(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=ro(e,t.from),n=ro(e,t.to);po(e,r,n,t.margin)}}function po(e,t,r,n){var i=ha(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});qr(e,i.scrollLeft,i.scrollTop)}function ei(e,t){if(Math.abs(e.doc.scrollTop-t)<2)return;z||ga(e,{top:t}),mo(e,t,!0),z&&ga(e),ri(e,100)}function mo(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 or(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,xo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t)}function ti(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+ea(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+Cn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var sr=function(e,t,r){this.cm=r;var n=this.vert=v("div",[v("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=v("div",[v("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),re(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),re(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,O&&S<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};sr.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}},sr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},sr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},sr.prototype.zeroWidthHack=function(){var e=F&&!H?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new J,this.disableVert=new J},sr.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)},sr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ni=function(){};ni.prototype.update=function(){return{bottom:0,right:0}},ni.prototype.setScrollLeft=function(){},ni.prototype.setScrollTop=function(){},ni.prototype.clear=function(){};function kr(e,t){t||(t=ti(e));var r=e.display.barWidth,n=e.display.barHeight;go(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Ri(e),go(e,ti(e)),r=e.display.barWidth,n=e.display.barHeight}function go(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 vo={native:sr,null:ni};function bo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&ee(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new vo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),re(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"?or(e,t):ei(e,t)},e),e.display.scrollbars.addClass&&le(e.display.wrapper,e.display.scrollbars.addClass)}var Qs=0;function lr(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:++Qs},Ls(e.curOp)}function ur(e){var t=e.curOp;t&&Ds(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&&yn(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 Ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function tl(e){e.updatedDisplay=e.mustUpdate&&ma(e.cm,e.update)}function nl(e){var t=e.cm,r=t.display;e.updatedDisplay&&Ri(t),e.barMeasure=ti(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ya(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+Cn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-nr(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&&or(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==$();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&kr(t,e.barMeasure),e.updatedDisplay&&ba(t,e.barMeasure),e.selectionChanged&&da(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&co(e.cm)}function il(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&yo(t,e.update),r.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(r.wheelStartX=r.wheelStartY=null),e.scrollTop!=null&&mo(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&or(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ys(t,ut(n,e.scrollToPos.from),ut(n,e.scrollToPos.to),e.scrollToPos.margin);$s(t,i)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var s=0;s<a.length;++s)a[s].lines.length||ue(a[s],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&ue(o[l],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ue(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function ln(e,t){if(e.curOp)return t();lr(e);try{return t()}finally{ur(e)}}function Bt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);lr(e);try{return t.apply(e,arguments)}finally{ur(e)}}}function Qt(e){return function(){if(this.curOp)return e.apply(this,arguments);lr(this);try{return e.apply(this,arguments)}finally{ur(this)}}}function Wt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);lr(t);try{return e.apply(this,arguments)}finally{ur(t)}}}function ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,g(al,e))}function al(e){var t=e.doc;if(t.highlightFrontier>=e.display.viewTo)return;var r=+new Date+e.options.workTime,n=sn(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,s=a.text.length>e.options.maxHighlightLength?mn(t.mode,n.state):null,l=yi(e,a,n,!0);s&&(n.state=s),a.styles=l.styles;var u=a.styleClasses,b=l.classes;b?a.styleClasses=b:u&&(a.styleClasses=null);for(var E=!o||o.length!=a.styles.length||u!=b&&(!u||!b||u.bgClass!=b.bgClass||u.textClass!=b.textClass),I=0;!E&&I<o.length;++I)E=o[I]!=a.styles[I];E&&i.push(n.line),a.stateAfter=n.save(),n.nextLine()}else a.text.length<=e.options.maxHighlightLength&&mr(e,a.text,n),a.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ri(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++)Bn(e,i[a],"text")})}var Ii=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Pi(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=nr(e),this.force=r,this.dims=la(e),this.events=[]};Ii.prototype.signal=function(e,t){w(e,t)&&this.events.push(arguments)},Ii.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ue.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=Cn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Cn(e)+"px",t.scrollbarsClipped=!0)}function sl(e){if(e.hasFocus())return null;var t=$();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==$())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 ma(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Wn(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&&so(e)==0)return!1;wo(e)&&(Wn(e),t.dims=la(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)),bn&&(a=Et(e.doc,a),o=_t(e.doc,o));var s=a!=r.viewFrom||o!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;Gs(e,a,o),r.viewOffset=Ot(Ze(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var l=so(e);if(!s&&l==0&&!t.force&&r.renderedView==r.view&&(r.updateLineNumbers==null||r.updateLineNumbers>=r.viewTo))return!1;var u=sl(e);return l>4&&(r.lineDiv.style.display="none"),ul(e,r.updateLineNumbers,t.dims),l>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,ll(u),pe(r.cursorDiv),pe(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ri(e,400)),r.updateLineNumbers=null,!0}function yo(e,t){for(var r=t.viewport,n=!0;;n=!1){if(!n||!e.options.lineWrapping||t.oldDisplayWidth==nr(e)){if(r&&r.top!=null&&(r={top:Math.min(e.doc.height+ea(e.display)-ta(e),r.top)}),t.visible=Pi(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else n&&(t.visible=Pi(e.display,e.doc,r));if(!ma(e,t))break;Ri(e);var i=ti(e);Qr(e),kr(e,i),ba(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 ga(e,t){var r=new Ii(e,t);if(ma(e,r)){Ri(e),yo(e,r);var n=ti(e);Qr(e),kr(e,n),ba(e,n),r.finish()}}function ul(e,t,r){var n=e.display,i=e.options.lineNumbers,a=n.lineDiv,o=a.firstChild;function s(ne){var ge=ne.nextSibling;return _&&F&&e.display.currentWheelTarget==ne?ne.style.display="none":ne.parentNode.removeChild(ne),ge}for(var l=n.view,u=n.viewFrom,b=0;b<l.length;b++){var E=l[b];if(!E.hidden)if(!E.node||E.node.parentNode!=a){var I=Is(e,E,u,r);a.insertBefore(I,o)}else{for(;o!=E.node;)o=s(o);var A=i&&t!=null&&t<=u&&E.lineNumber;E.changes&&(Q(E.changes,"gutter")>-1&&(A=!1),za(e,E,u,r)),A&&(pe(E.lineNumber),E.lineNumber.appendChild(document.createTextNode(Yn(e.options,u)))),o=E.node.nextSibling}u+=E.size}for(;o;)o=s(o)}function va(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ba(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+Cn(e)+"px"}function xo(e){var t=e.display,r=t.view;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;for(var n=ua(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 s=r[o].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}function wo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Yn(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(v("div",[v("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",va(e.display),!0}return!1}function ya(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 Eo(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,s=t.appendChild(v("div",null,"CodeMirror-gutter "+a));o&&(s.style.cssText=o),a=="CodeMirror-linenumbers"&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",va(e)}function ii(e){Eo(e.display),tn(e),xo(e)}function cl(e,t,r,n){var i=this;this.input=r,i.scrollbarFiller=v("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=v("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=W("div",null,"CodeMirror-code"),i.selectionDiv=v("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=v("div",null,"CodeMirror-cursors"),i.measure=v("div",null,"CodeMirror-measure"),i.lineMeasure=v("div",null,"CodeMirror-measure"),i.lineSpace=W("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=W("div",[i.lineSpace],"CodeMirror-lines");i.mover=v("div",[a],null,"position: relative"),i.sizer=v("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=v("div",null,null,"position: absolute; height: "+Se+"px; width: 1px;"),i.gutters=v("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=v("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=v("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),O&&S<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!_&&!(z&&B)&&(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=ya(n.gutters,n.lineNumbers),Eo(i),r.init(i)}var ji=0,fn=null;O?fn=-.53:z?fn=15:P?fn=-.7:ce&&(fn=-1/3);function _o(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=_o(e);return t.x*=fn,t.y*=fn,t}function Co(e,t){var r=_o(t),n=r.x,i=r.y,a=e.display,o=a.scroller,s=o.scrollWidth>o.clientWidth,l=o.scrollHeight>o.clientHeight;if(!(n&&s||i&&l))return;if(i&&F&&_){e:for(var u=t.target,b=a.view;u!=o;u=u.parentNode)for(var E=0;E<b.length;E++)if(b[E].node==u){e.display.currentWheelTarget=u;break e}}if(n&&!z&&!U&&fn!=null){i&&l&&ei(e,Math.max(0,o.scrollTop+i*fn)),or(e,Math.max(0,o.scrollLeft+n*fn)),(!i||i&&l)&&d(t),a.wheelStartX=null;return}if(i&&fn!=null){var I=i*fn,A=e.doc.scrollTop,ne=A+a.wrapper.clientHeight;I<0?A=Math.max(0,A+I-50):ne=Math.min(e.doc.height,ne+I+50),ga(e,{top:A,bottom:ne})}ji<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 ge=o.scrollLeft-a.wheelStartX,ke=o.scrollTop-a.wheelStartY,Re=ke&&a.wheelDY&&ke/a.wheelDY||ge&&a.wheelDX&&ge/a.wheelDX;if(a.wheelStartX=a.wheelStartY=null,!Re)return;fn=(fn*ji+Re)/(ji+1),++ji},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(!Me(r.anchor,n.anchor)||!Me(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 xt(Ur(this.ranges[t].anchor),Ur(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(ct(t,n.from())>=0&&ct(e,n.to())<=0)return r}return-1};var xt=function(e,t){this.anchor=e,this.head=t};xt.prototype.from=function(){return Jn(this.anchor,this.head)},xt.prototype.to=function(){return pr(this.anchor,this.head)},xt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function wn(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(I,A){return ct(I.from(),A.from())}),r=Q(t,i);for(var a=1;a<t.length;a++){var o=t[a],s=t[a-1],l=ct(s.to(),o.from());if(n&&!o.empty()?l>0:l>=0){var u=Jn(s.from(),o.from()),b=pr(s.to(),o.to()),E=s.empty()?o.from()==o.head:s.from()==s.head;a<=r&&--r,t.splice(--a,2,new xt(E?b:u,E?u:b))}}return new hn(t,r)}function zn(e,t){return new hn([new xt(e,t||e)],0)}function Hn(e){return e.text?Ee(e.from.line+e.text.length-1,Le(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function So(e,t){if(ct(e,t.from)<0)return e;if(ct(e,t.to)<=0)return Hn(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+=Hn(t).ch-t.to.ch),Ee(r,n)}function xa(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new xt(So(i.anchor,t),So(i.head,t)))}return wn(e.cm,r,e.sel.primIndex)}function ko(e,t,r){return e.line==t.line?Ee(r.line,e.ch-t.ch+r.ch):Ee(r.line+(e.line-t.line),e.ch)}function fl(e,t,r){for(var n=[],i=Ee(e.first,0),a=i,o=0;o<t.length;o++){var s=t[o],l=ko(s.from,i,a),u=ko(Hn(s),i,a);if(i=s.to,a=u,r=="around"){var b=e.sel.ranges[o],E=ct(b.head,b.anchor)<0;n[o]=new xt(E?u:l,E?l:u)}else n[o]=new xt(l,l)}return new hn(n,e.sel.primIndex)}function wa(e){e.doc.mode=cn(e.options,e.doc.modeOption),ai(e)}function ai(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,ri(e,100),e.state.modeGen++,e.curOp&&tn(e)}function To(e,t){return t.from.ch==0&&t.to.ch==0&&Le(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ea(e,t,r,n){function i(Fe){return r?r[Fe]:null}function a(Fe,Pe,He){jn(Fe,Pe,He,n),Kt(Fe,"change",Fe,t)}function o(Fe,Pe){for(var He=[],ot=Fe;ot<Pe;++ot)He.push(new kt(u[ot],i(ot),n));return He}var s=t.from,l=t.to,u=t.text,b=Ze(e,s.line),E=Ze(e,l.line),I=Le(u),A=i(u.length-1),ne=l.line-s.line;if(t.full)e.insert(0,o(0,u.length)),e.remove(u.length,e.size-u.length);else if(To(e,t)){var ge=o(0,u.length-1);a(E,E.text,A),ne&&e.remove(s.line,ne),ge.length&&e.insert(s.line,ge)}else if(b==E)if(u.length==1)a(b,b.text.slice(0,s.ch)+I+b.text.slice(l.ch),A);else{var ke=o(1,u.length-1);ke.push(new kt(I+b.text.slice(l.ch),A,n)),a(b,b.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,ke)}else if(u.length==1)a(b,b.text.slice(0,s.ch)+u[0]+E.text.slice(l.ch),i(0)),e.remove(s.line+1,ne);else{a(b,b.text.slice(0,s.ch)+u[0],i(0)),a(E,I+E.text.slice(l.ch),A);var Re=o(1,u.length-1);ne>1&&e.remove(s.line+1,ne-1),e.insert(s.line+1,Re)}Kt(e,"change",e,t)}function Kn(e,t,r){function n(i,a,o){if(i.linked)for(var s=0;s<i.linked.length;++s){var l=i.linked[s];if(l.doc==a)continue;var u=o&&l.sharedHist;if(r&&!u)continue;t(l.doc,u),n(l.doc,i,u)}}n(e,null,!0)}function Oo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ca(e),wa(e),Lo(e),e.options.lineWrapping||yn(e),e.options.mode=t.modeOption,tn(e)}function Lo(e){(e.doc.direction=="rtl"?le:ee)(e.display.lineDiv,"CodeMirror-rtl")}function hl(e){ln(e,function(){Lo(e),tn(e)})}function Ui(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 _a(e,t){var r={from:Ur(t.from),to:Hn(t),text:Tn(e,t.from,t.to)};return Ao(e,r,t.from.line,t.to.line+1),Kn(e,function(n){return Ao(n,r,t.from.line,t.to.line+1)},!0),r}function Mo(e){for(;e.length;){var t=Le(e);if(t.ranges)e.pop();else break}}function pl(e,t){if(t)return Mo(e.done),Le(e.done);if(e.done.length&&!Le(e.done).ranges)return Le(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Le(e.done)}function Do(e,t,r,n){var i=e.history;i.undone.length=0;var a=+new Date,o,s;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)))s=Le(o.changes),ct(t.from,t.to)==0&&ct(t.from,s.to)==0?s.to=Hn(t):o.changes.push(_a(e,t));else{var l=Le(i.done);for((!l||!l.ranges)&&Fi(e.sel,i.done),o={changes:[_a(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,s||ue(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,Le(i.done),t))?i.done[i.done.length-1]=t:Fi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=r,n&&n.clearRedo!==!1&&Mo(i.undone)}function Fi(e,t){var r=Le(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ao(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 Ro(e,t){var r=bl(e,t),n=In(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 s=0;s<o.length;++s){for(var l=o[s],u=0;u<a.length;++u)if(a[u].marker==l.marker)continue e;a.push(l)}}else o&&(r[i]=o)}return r}function Tr(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,s=[];n.push({changes:s});for(var l=0;l<o.length;++l){var u=o[l],b=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var E in u)(b=E.match(/^spans_(\d+)$/))&&(Q(t,Number(b[1]))>-1&&(Le(s)[E]=u[E],delete u[E]))}}return n}function Ca(e,t,r,n){if(n){var i=e.anchor;if(r){var a=ct(t,i)<0;a!=ct(r,i)<0?(i=t,t=r):a!=ct(t,r)<0&&(t=r)}return new xt(i,t)}else return new xt(r||t,t)}function Bi(e,t,r,n,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),$t(e,new hn([Ca(e.sel.primary(),t,r,i)],0),n)}function Po(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]=Ca(e.sel.ranges[a],t[a],null,i);var o=wn(e.cm,n,e.sel.primIndex);$t(e,o,r)}function Sa(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,$t(e,wn(e.cm,i,e.sel.primIndex),n)}function No(e,t,r,n){$t(e,zn(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 xt(ut(e,i[a].anchor),ut(e,i[a].head))},origin:r&&r.origin};return ue(e,"beforeSelectionChange",e,n),e.cm&&ue(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?wn(e.cm,n.ranges,n.ranges.length-1):t}function Io(e,t,r){var n=e.history.done,i=Le(n);i&&i.ranges?(n[n.length-1]=t,Wi(e,t,r)):$t(e,t,r)}function $t(e,t,r){Wi(e,t,r),gl(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function Wi(e,t,r){(w(e,"beforeSelectionChange")||e.cm&&w(e.cm,"beforeSelectionChange"))&&(t=yl(e,t,r));var n=r&&r.bias||(ct(t.primary().head,e.sel.primary().head)<0?-1:1);jo(e,Fo(e,t,n,!0)),!(r&&r.scroll===!1)&&e.cm&&Sr(e.cm)}function jo(e,t){if(t.equals(e.sel))return;e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,y(e.cm)),Kt(e,"cursorActivity",e)}function Uo(e){jo(e,Fo(e,e.sel,null,!1))}function Fo(e,t,r,n){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],l=zi(e,o.anchor,s&&s.anchor,r,n),u=zi(e,o.head,s&&s.head,r,n);(i||l!=o.anchor||u!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new xt(l,u))}return i?wn(e.cm,i,t.primIndex):t}function Or(e,t,r,n,i){var a=Ze(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var s=a.markedSpans[o],l=s.marker,u="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,b="selectRight"in l?!l.selectRight:l.inclusiveRight;if((s.from==null||(u?s.from<=t.ch:s.from<t.ch))&&(s.to==null||(b?s.to>=t.ch:s.to>t.ch))){if(i&&(ue(l,"beforeCursorEnter"),l.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!l.atomic)continue;if(r){var E=l.find(n<0?1:-1),I=void 0;if((n<0?b:u)&&(E=Bo(e,E,-n,E&&E.line==t.line?a:null)),E&&E.line==t.line&&(I=ct(E,r))&&(n<0?I<0:I>0))return Or(e,E,t,n,i)}var A=l.find(n<0?-1:1);return(n<0?u:b)&&(A=Bo(e,A,n,A.line==t.line?a:null)),A?Or(e,A,t,n,i):null}}return t}function zi(e,t,r,n,i){var a=n||1,o=Or(e,t,r,a,i)||!i&&Or(e,t,r,a,!0)||Or(e,t,r,-a,i)||!i&&Or(e,t,r,-a,!0);return o||(e.cantEdit=!0,Ee(e.first,0))}function Bo(e,t,r,n){return r<0&&t.ch==0?t.line>e.first?ut(e,Ee(t.line-1)):null:r>0&&t.ch==(n||Ze(e,t.line)).text.length?t.line<e.first+e.size-1?Ee(t.line+1,0):null:new Ee(t.line,t.ch+r)}function Wo(e){e.setSelection(Ee(e.firstLine(),0),Ee(e.lastLine()),fe)}function zo(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,s){i&&(n.from=ut(e,i)),a&&(n.to=ut(e,a)),o&&(n.text=o),s!==void 0&&(n.origin=s)}),ue(e,"beforeChange",e,n),e.cm&&ue(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 Lr(e,t,r){if(e.cm){if(!e.cm.curOp)return Bt(e.cm,Lr)(e,t,r);if(e.cm.state.suppressEdits)return}if((w(e,"beforeChange")||e.cm&&w(e.cm,"beforeChange"))&&(t=zo(e,t,!0),!t))return;var n=Ei&&!r&&Si(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Ho(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else Ho(e,t)}function Ho(e,t){if(t.text.length==1&&t.text[0]==""&&ct(t.from,t.to)==0)return;var r=xa(e,t);Do(e,t,r,e.cm?e.cm.curOp.id:NaN),oi(e,t,r,In(e,t));var n=[];Kn(e,function(i,a){!a&&Q(n,i.history)==-1&&(Vo(i.history,t),n.push(i.history)),oi(i,t,null,In(i,t))})}function Hi(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(n&&!r)return;for(var i=e.history,a,o=e.sel,s=t=="undo"?i.done:i.undone,l=t=="undo"?i.undone:i.done,u=0;u<s.length&&!(a=s[u],r?a.ranges&&!a.equals(e.sel):!a.ranges);u++);if(u==s.length)return;for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=s.pop(),a.ranges){if(Fi(a,l),r&&!a.equals(e.sel)){$t(e,a,{clearRedo:!1});return}o=a}else if(n){s.push(a);return}else break;var b=[];Fi(o,l),l.push({changes:b,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var E=w(e,"beforeChange")||e.cm&&w(e.cm,"beforeChange"),I=function(ge){var ke=a.changes[ge];if(ke.origin=t,E&&!zo(e,ke,!1))return s.length=0,{};b.push(_a(e,ke));var Re=ge?xa(e,ke):Le(s);oi(e,ke,Re,Ro(e,ke)),!ge&&e.cm&&e.cm.scrollIntoView({from:ke.from,to:Hn(ke)});var Fe=[];Kn(e,function(Pe,He){!He&&Q(Fe,Pe.history)==-1&&(Vo(Pe.history,ke),Fe.push(Pe.history)),oi(Pe,ke,null,Ro(Pe,ke))})},A=a.changes.length-1;A>=0;--A){var ne=I(A);if(ne)return ne.v}}function Ko(e,t){if(t==0)return;if(e.first+=t,e.sel=new hn(Be(e.sel.ranges,function(i){return new xt(Ee(i.anchor.line+t,i.anchor.ch),Ee(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++)Bn(e.cm,n,"gutter")}}function oi(e,t,r,n){if(e.cm&&!e.cm.curOp)return Bt(e.cm,oi)(e,t,r,n);if(t.to.line<e.first){Ko(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);Ko(e,i),t={from:Ee(e.first,0),to:Ee(t.to.line+i,t.to.ch),text:[Le(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:Ee(a,Ze(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Tn(e,t.from,t.to),r||(r=xa(e,t)),e.cm?xl(e.cm,t,n):Ea(e,t,n),Wi(e,r,fe),e.cantEdit&&zi(e,Ee(e.firstLine(),0))&&(e.cantEdit=!1)}function xl(e,t,r){var n=e.doc,i=e.display,a=t.from,o=t.to,s=!1,l=a.line;e.options.lineWrapping||(l=yt(tt(Ze(n,a.line))),n.iter(l,o.line+1,function(A){if(A==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&y(e),Ea(n,t,r,oo(e)),e.options.lineWrapping||(n.iter(l,a.line+t.text.length,function(A){var ne=Gt(A);ne>i.maxLineLength&&(i.maxLine=A,i.maxLineLength=ne,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),zr(n,a.line),ri(e,400);var u=t.text.length-(o.line-a.line)-1;t.full?tn(e):a.line==o.line&&t.text.length==1&&!To(e.doc,t)?Bn(e,a.line,"text"):tn(e,a.line,o.line+1,u);var b=w(e,"changes"),E=w(e,"change");if(E||b){var I={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};E&&Kt(e,"change",e,I),b&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(I)}e.display.selForContextMenu=null}function Mr(e,t,r,n,i){var a;n||(n=r),ct(n,r)<0&&(a=[n,r],r=a[0],n=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Lr(e,{from:r,to:n,text:t,origin:i})}function Xo(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Go(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 s=0;s<a.ranges.length;s++)Xo(a.ranges[s].anchor,t,r,n),Xo(a.ranges[s].head,t,r,n);continue}for(var l=0;l<a.changes.length;++l){var u=a.changes[l];if(r<u.from.line)u.from=Ee(u.from.line+n,u.from.ch),u.to=Ee(u.to.line+n,u.to.ch);else if(t<=u.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function Vo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Go(e.done,r,n,i),Go(e.undone,r,n,i)}function si(e,t,r,n){var i=t,a=t;return typeof t=="number"?a=Ze(e,Zn(e,t)):i=yt(t),i==null?null:(n(a,i)&&e.cm&&Bn(e.cm,i,r),a)}function li(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}li.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,Vt(i),Kt(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 ui(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}ui.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 li))){var s=[];this.collapse(s),this.children=[new li(s)],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,s=o;s<i.lines.length;){var l=new li(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++n,0,l),l.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 ui(t);if(e.parent){e.size-=r.size,e.height-=r.height;var i=Q(e.parent.children,e);e.parent.children.splice(i+1,0,r)}else{var n=new ui(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 ci=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};ci.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=yt(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=Jr(this);gn(r,Math.max(0,r.height-a)),e&&(ln(e,function(){$o(e,r,-a),Bn(e,n,"widget")}),Kt(e,"lineWidgetCleared",e,this,n))},ci.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=Jr(this)-t;if(!i)return;St(this.doc,n)||gn(n,n.height+i),r&&ln(r,function(){r.curOp.forceUpdate=!0,$o(r,n,i),Kt(r,"lineWidgetChanged",r,e,yt(n))})},C(ci);function $o(e,t,r){Ot(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&pa(e,r)}function wl(e,t,r,n){var i=new ci(e,r,n),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),si(e,t,"widget",function(o){var s=o.widgets||(o.widgets=[]);if(i.insertAt==null?s.push(i):s.splice(Math.min(s.length-1,Math.max(0,i.insertAt)),0,i),i.line=o,a&&!St(e,o)){var l=Ot(o)<e.scrollTop;gn(o,o.height+Jr(i)),l&&pa(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&Kt(a,"lineWidgetAdded",a,i,typeof t=="number"?t:yt(t)),i}var Yo=0,Xn=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Yo};Xn.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;if(t&&lr(e),w(this,"clear")){var r=this.find();r&&Kt(this,"clear",r.from,r.to)}for(var n=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],s=Nn(o.markedSpans,this);e&&!this.collapsed?Bn(e,yt(o),"text"):e&&(s.to!=null&&(i=yt(o)),s.from!=null&&(n=yt(o))),o.markedSpans=ja(o.markedSpans,s),s.from==null&&this.collapsed&&!St(this.doc,o)&&e&&gn(o,Er(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var u=tt(this.lines[l]),b=Gt(u);b>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=b,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&&Uo(e.doc)),e&&Kt(e,"markerCleared",e,this,n,i),t&&ur(e),this.parent&&this.parent.clear()},Xn.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=Nn(a.markedSpans,this);if(o.from!=null&&(r=Ee(t?a:yt(a),o.from),e==-1))return r;if(o.to!=null&&(n=Ee(t?a:yt(a),o.to),e==1))return n}return r&&{from:r,to:n}},Xn.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=yt(t.line),o=na(n,a);if(o&&(Qa(o),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!St(r.doc,i)&&r.height!=null){var s=r.height;r.height=null;var l=Jr(r)-s;l&&gn(i,i.height+l)}Kt(n,"markerChanged",n,e)})},Xn.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Q(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Xn.prototype.detachLine=function(e){if(this.lines.splice(Q(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},C(Xn);function Dr(e,t,r,n,i){if(n&&n.shared)return El(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Bt(e.cm,Dr)(e,t,r,n,i);var a=new Xn(e,i),o=ct(t,r);if(n&&c(n,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=W("span",[a.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Qi(e,t.line,t,r,a)||t.line!=r.line&&Qi(e,r.line,t,r,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ci()}a.addToHistory&&Do(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s=t.line,l=e.cm,u;if(e.iter(s,r.line+1,function(E){l&&a.collapsed&&!l.options.lineWrapping&&tt(E)==l.display.maxLine&&(u=!0),a.collapsed&&s!=t.line&&gn(E,0),Hr(E,new vr(a,s==t.line?t.ch:null,s==r.line?r.ch:null)),++s}),a.collapsed&&e.iter(t.line,r.line+1,function(E){St(e,E)&&gn(E,0)}),a.clearOnEnter&&re(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(_i(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Yo,a.atomic=!0),l){if(u&&(l.curOp.updateMaxLine=!0),a.collapsed)tn(l,t.line,r.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var b=t.line;b<=r.line;b++)Bn(l,b,"text");a.atomic&&Uo(l.doc),Kt(l,"markerAdded",l,a)}return a}var di=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};di.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Kt(this,"clear")},di.prototype.find=function(e,t){return this.primary.find(e,t)},C(di);function El(e,t,r,n,i){n=c(n),n.shared=!1;var a=[Dr(e,t,r,n,i)],o=a[0],s=n.widgetNode;return Kn(e,function(l){s&&(n.widgetNode=s.cloneNode(!0)),a.push(Dr(l,ut(l,t),ut(l,r),n,i));for(var u=0;u<l.linked.length;++u)if(l.linked[u].isParent)return;o=Le(a)}),new di(a,o)}function Jo(e){return e.findMarks(Ee(e.first,0),e.clipPos(Ee(e.lastLine())),function(t){return t.parent})}function _l(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(ct(a,o)){var s=Dr(e,a,o,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function Cl(e){for(var t=function(n){var i=e[n],a=[i.primary.doc];Kn(i.primary.doc,function(l){return a.push(l)});for(var o=0;o<i.markers.length;o++){var s=i.markers[o];Q(a,s.doc)==-1&&(s.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),ui.call(this,[new li([new kt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var a=Ee(r,0);this.sel=zn(a),this.history=new Ui(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)),Ea(this,{from:a,to:a,text:e}),$t(this,zn(a),fe)};nn.prototype=Ie(ui.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=hr(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:Wt(function(e){var t=Ee(this.first,0),r=this.first+this.size-1;Lr(this,{from:t,to:Ee(r,Ze(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&qr(this.cm,0,0),$t(this,zn(t),fe)}),replaceRange:function(e,t,r,n){t=ut(this,t),r=r?ut(this,r):t,Mr(this,e,t,r,n)},getRange:function(e,t,r){var n=Tn(this,ut(this,e),ut(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(Pn(this,e))return Ze(this,e)},getLineNumber:function(e){return yt(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Ze(this,e)),tt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ut(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:Wt(function(e,t,r){No(this,ut(this,typeof e=="number"?Ee(e,t||0):e),null,r)}),setSelection:Wt(function(e,t,r){No(this,ut(this,e),ut(this,t||e),r)}),extendSelection:Wt(function(e,t,r){Bi(this,ut(this,e),t&&ut(this,t),r)}),extendSelections:Wt(function(e,t){Po(this,Fr(this,e),t)}),extendSelectionsBy:Wt(function(e,t){var r=Be(this.sel.ranges,e);Po(this,Fr(this,r),t)}),setSelections:Wt(function(e,t,r){if(!e.length)return;for(var n=[],i=0;i<e.length;i++)n[i]=new xt(ut(this,e[i].anchor),ut(this,e[i].head));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),$t(this,wn(this.cm,n,t),r)}),addSelection:Wt(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new xt(ut(this,e),ut(this,t||e))),$t(this,wn(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=Tn(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=Tn(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:Wt(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 s=t&&t!="end"&&fl(this,n,t),l=n.length-1;l>=0;l--)Lr(this,n[l]);s?Io(this,s):this.cm&&Sr(this.cm)}),undo:Wt(function(){Hi(this,"undo")}),redo:Wt(function(){Hi(this,"redo")}),undoSelection:Wt(function(){Hi(this,"undo",!0)}),redoSelection:Wt(function(){Hi(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 Ui(this.history.maxGeneration),Kn(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:Tr(this.history.done),undone:Tr(this.history.undone)}},setHistory:function(e){var t=this.history=new Ui(this.history.maxGeneration);t.done=Tr(e.done.slice(0),null,!0),t.undone=Tr(e.undone.slice(0),null,!0)},setGutterMarker:Wt(function(e,t,r){return si(this,e,"gutter",function(n){var i=n.gutterMarkers||(n.gutterMarkers={});return i[t]=r,!r&&We(i)&&(n.gutterMarkers=null),!0})}),clearGutter:Wt(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&si(t,r,"gutter",function(){return r.gutterMarkers[e]=null,We(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!Pn(this,e))return null;if(t=e,e=Ze(this,e),!e)return null}else if(t=yt(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:Wt(function(e,t,r){return si(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(Z(r).test(n[i]))return!1;n[i]+=" "+r}return!0})}),removeLineClass:Wt(function(e,t,r){return si(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(Z(r));if(!o)return!1;var s=o.index+o[0].length;n[i]=a.slice(0,o.index)+(!o.index||s==a.length?"":" ")+a.slice(s)||null}else return!1;return!0})}),addLineWidget:Wt(function(e,t,r){return wl(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Dr(this,ut(this,e),ut(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=ut(this,e),Dr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=ut(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=ut(this,e),t=ut(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 s=0;s<o.length;s++){var l=o[s];!(l.to!=null&&i==e.line&&e.ch>=l.to||l.from==null&&i!=e.line||l.from!=null&&i==t.line&&l.from>=t.ch)&&(!r||r(l.marker))&&n.push(l.marker.parent||l.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}),ut(this,Ee(r,t))},indexFromPos:function(e){e=ut(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(hr(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(hr(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}],_l(n,Jo(this)),n},unlinkDoc:function(e){if(e instanceof Lt&&(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),Cl(Jo(this));break}if(e.history==this.history){var n=[e.id];Kn(e,function(i){return n.push(i.id)},!0),e.history=new Ui(null),e.history.done=Tr(this.history.done,n),e.history.undone=Tr(this.history.undone,n)}},iterLinkedDocs:function(e){Kn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):bt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Wt(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 Zo=0;function kl(e){var t=this;if(Qo(t),Oe(t,e)||Dn(t.display,e))return;d(e),O&&(Zo=+new Date);var r=ir(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,s=function(){++o==i&&Bt(t,function(){r=ut(t.doc,r);var A={from:r,to:r,text:t.doc.splitLines(a.filter(function(ne){return ne!=null}).join(t.doc.lineSeparator())),origin:"paste"};Lr(t.doc,A),Io(t.doc,zn(ut(t.doc,r),ut(t.doc,Hn(A))))})()},l=function(A,ne){if(t.options.allowDropFileTypes&&Q(t.options.allowDropFileTypes,A.type)==-1){s();return}var ge=new FileReader;ge.onerror=function(){return s()},ge.onload=function(){var ke=ge.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ke)){s();return}a[ne]=ke,s()},ge.readAsText(A)},u=0;u<n.length;u++)l(n[u],u);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 b=e.dataTransfer.getData("Text");if(b){var E;if(t.state.draggingText&&!t.state.draggingText.copy&&(E=t.listSelections()),Wi(t.doc,zn(r,r)),E)for(var I=0;I<E.length;++I)Mr(t.doc,"",E[I].anchor,E[I].head,"drag");t.replaceSelection(b,"around","paste"),t.display.input.focus()}}catch(A){}}}function Tl(e,t){if(O&&(!e.state.draggingText||+new Date-Zo<100)){m(t);return}if(Oe(e,t)||Dn(e.display,t))return;if(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!ce){var r=v("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",U&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),U&&r.parentNode.removeChild(r)}}function Ol(e,t){var r=ir(e,t);if(!r)return;var n=document.createDocumentFragment();uo(e,r,n),e.display.dragCursor||(e.display.dragCursor=v("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Y(e.display.dragCursor,n)}function Qo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function qo(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 es=!1;function Ll(){if(es)return;Ml(),es=!0}function Ml(){var e;re(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,qo(Dl)},100))}),re(window,"blur",function(){return qo(Cr)})}function Dl(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Gn={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"},fi=0;fi<10;fi++)Gn[fi+48]=Gn[fi+96]=String(fi);for(var Ki=65;Ki<=90;Ki++)Gn[Ki]=String.fromCharCode(Ki);for(var hi=1;hi<=12;hi++)Gn[hi+111]=Gn[hi+63235]="F"+hi;var An={};An.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"},An.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"},An.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"},An.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"]},An.default=F?An.macDefault:An.pcDefault;function Al(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,a,o=0;o<t.length-1;o++){var s=t[o];if(/^(cmd|meta|m)$/i.test(s))a=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))i=!0;else throw new Error("Unrecognized modifier name: "+s)}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Rl(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=Be(r.split(" "),Al),a=0;a<i.length;a++){var o=void 0,s=void 0;a==i.length-1?(s=i.join(" "),o=n):(s=i.slice(0,a+1).join(" "),o="...");var l=t[s];if(!l)t[s]=o;else if(l!=o)throw new Error("Inconsistent bindings for "+s)}delete e[r]}for(var u in t)e[u]=t[u];return e}function Ar(e,t,r,n){t=Xi(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 Ar(e,t.fallthrough,r,n);for(var a=0;a<t.fallthrough.length;a++){var o=Ar(e,t.fallthrough[a],r,n);if(o)return o}}}function ts(e){var t=typeof e=="string"?e:Gn[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function ns(e,t,r){var n=e;return t.altKey&&n!="Alt"&&(e="Alt-"+e),(oe?t.metaKey:t.ctrlKey)&&n!="Ctrl"&&(e="Ctrl-"+e),(oe?t.ctrlKey:t.metaKey)&&n!="Mod"&&(e="Cmd-"+e),!r&&t.shiftKey&&n!="Shift"&&(e="Shift-"+e),e}function rs(e,t){if(U&&e.keyCode==34&&e.char)return!1;var r=Gn[e.keyCode];return r==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(r=e.code),ns(r,e,t))}function Xi(e){return typeof e=="string"?An[e]:e}function Rr(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var a=t(r[i]);n.length&&ct(a.from,Le(n).to)<=0;){var o=n.pop();if(ct(o.from,a.from)<0){a.from=o.from;break}}n.push(a)}ln(e,function(){for(var s=n.length-1;s>=0;s--)Mr(e.doc,"",n[s].from,n[s].to,"+delete");Sr(e)})}function ka(e,t,r){var n=we(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Ta(e,t,r){var n=ka(e,t.ch,r);return n==null?null:new Ee(t.line,n,r<0?"after":"before")}function Oa(e,t,r,n,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=Ye(r,t.doc.direction);if(a){var o=i<0?Le(a):a[0],s=i<0==(o.level==1),l=s?"after":"before",u;if(o.level>0||t.doc.direction=="rtl"){var b=wr(t,r);u=i<0?r.text.length-1:0;var E=Sn(t,b,u).top;u=Je(function(I){return Sn(t,b,I).top==E},i<0==(o.level==1)?o.from:o.to-1,u),l=="before"&&(u=ka(r,u,1))}else u=i<0?o.to:o.from;return new Ee(n,u,l)}}return new Ee(n,i<0?r.text.length:0,i<0?"before":"after")}function Pl(e,t,r,n){var i=Ye(t,e.doc.direction);if(!i)return Ta(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=Ke(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 Ta(t,r,n);var s=function(Re,Fe){return ka(t,Re instanceof Ee?Re.ch:Re,Fe)},l,u=function(Re){return e.options.lineWrapping?(l=l||wr(e,t),ao(e,t,l,Re)):{begin:0,end:t.text.length}},b=u(r.sticky=="before"?s(r,-1):r.ch);if(e.doc.direction=="rtl"||o.level==1){var E=o.level==1==n<0,I=s(r,E?1:-1);if(I!=null&&(E?I<=o.to&&I<=b.end:I>=o.from&&I>=b.begin)){var A=E?"before":"after";return new Ee(r.line,I,A)}}var ne=function(Re,Fe,Pe){for(var He=function(Ct,zt){return zt?new Ee(r.line,s(Ct,1),"before"):new Ee(r.line,Ct,"after")};Re>=0&&Re<i.length;Re+=Fe){var ot=i[Re],nt=Fe>0==(ot.level!=1),gt=nt?Pe.begin:s(Pe.end,-1);if(ot.from<=gt&&gt<ot.to)return He(gt,nt);if(gt=nt?ot.from:s(ot.to,-1),Pe.begin<=gt&&gt<Pe.end)return He(gt,nt)}},ge=ne(a+n,n,b);if(ge)return ge;var ke=n>0?b.end:s(b.begin,-1);return ke!=null&&!(n>0&&ke==t.text.length)&&(ge=ne(n>0?0:i.length-1,n,u(ke)),ge)?ge:null}var pi={selectAll:Wo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),fe)},killLine:function(e){return Rr(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:Ee(t.head.line+1,0)}:{from:t.head,to:Ee(t.head.line,r)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Rr(e,function(t){return{from:Ee(t.from().line,0),to:ut(e.doc,Ee(t.to().line+1,0))}})},delLineLeft:function(e){return Rr(e,function(t){return{from:Ee(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Rr(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 Rr(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(Ee(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(Ee(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return is(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return as(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Nl(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")},de)},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")},de)},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/)?as(e,t.head):n},de)},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=T(e.getLine(a.line),a.ch,n);t.push(V(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 Ee(i.line,i.ch-1)),i.ch>0)i=new Ee(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),Ee(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 Ee(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),Ee(i.line-1,o.length-1),i,"+transpose"))}}r.push(new xt(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);Sr(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function is(e,t){var r=Ze(e.doc,t),n=tt(r);return n!=r&&(t=yt(n)),Oa(!0,e,n,t,1)}function Nl(e,t){var r=Ze(e.doc,t),n=ht(r);return n!=r&&(t=yt(n)),Oa(!0,e,r,t,-1)}function as(e,t){var r=is(e,t.line),n=Ze(e.doc,r.line),i=Ye(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 Ee(r.line,o?0:a,r.sticky)}return r}function Gi(e,t,r){if(typeof t=="string"&&(t=pi[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 Il(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Ar(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Ar(t,e.options.extraKeys,r,e)||Ar(t,e.options.keyMap,r,e)}var jl=new J;function mi(e,t,r,n){var i=e.state.keySeq;if(i){if(ts(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:jl.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),os(e,i+" "+t,r,n))return!0}return os(e,t,r,n)}function os(e,t,r,n){var i=Il(e,t,n);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&Kt(e,"keyHandled",e,t,r),(i=="handled"||i=="multi")&&(d(r),da(e)),!!i}function ss(e,t){var r=rs(t,!0);return r?t.shiftKey&&!e.state.keySeq?mi(e,"Shift-"+r,t,function(n){return Gi(e,n,!0)})||mi(e,r,t,function(n){if(typeof n=="string"?/^go[A-Z]/.test(n):n.motion)return Gi(e,n)}):mi(e,r,t,function(n){return Gi(e,n)}):!1}function Ul(e,t,r){return mi(e,"'"+r+"'",t,function(n){return Gi(e,n,!0)})}var La=null;function ls(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(t.curOp.focus=$(),Oe(t,e))return;O&&S<11&&e.keyCode==27&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=r==16||e.shiftKey;var n=ss(t,e);U&&(La=n?r:null,!n&&r==88&&!jt&&(F?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),z&&!F&&!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;le(t,"CodeMirror-crosshair");function r(n){(n.keyCode==18||!n.altKey)&&(ee(t,"CodeMirror-crosshair"),Xe(document,"keyup",r),Xe(document,"mouseover",r))}re(document,"keyup",r),re(document,"mouseover",r)}function us(e){e.keyCode==16&&(this.doc.sel.shift=!1),Oe(this,e)}function cs(e){var t=this;if(e.target&&e.target!=t.display.input.getField())return;if(Dn(t.display,e)||Oe(t,e)||e.ctrlKey&&!e.altKey||F&&e.metaKey)return;var r=e.keyCode,n=e.charCode;if(U&&r==La){La=null,d(e);return}if(U&&(!e.which||e.which<10)&&ss(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 Bl=400,Ma=function(e,t,r){this.time=e,this.pos=t,this.button=r};Ma.prototype.compare=function(e,t,r){return this.time+Bl>e&&ct(t,this.pos)==0&&r==this.button};var gi,vi;function Wl(e,t){var r=+new Date;return vi&&vi.compare(r,e,t)?(gi=vi=null,"triple"):gi&&gi.compare(r,e,t)?(vi=new Ma(r,e,t),gi=null,"double"):(gi=new Ma(r,e,t),vi=null,"single")}function ds(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,Dn(r,e)){_||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));return}if(Da(t,e))return;var n=ir(t,e),i=X(e),a=n?Wl(n,i):"single";if(window.focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),n&&zl(t,i,n,a,e))return;i==1?n?Kl(t,n,a,e):R(e)==r.scroller&&d(e):i==2?(n&&Bi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):i==3&&(se?t.display.input.onContextMenu(e):fo(t))}function zl(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,mi(e,ns(a,i),i,function(o){if(typeof o=="string"&&(o=pi[o]),!o)return!1;var s=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),s=o(e,r)!=Ae}finally{e.state.suppressEdits=!1}return s})}function Hl(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(i.unit==null){var a=he?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=F?r.metaKey:r.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(F?r.altKey:r.ctrlKey)),i}function Kl(e,t,r,n){O?setTimeout(g(co,e),0):e.curOp.focus=$();var i=Hl(e,r,n),a=e.doc.sel,o;e.options.dragDrop&&be&&!e.isReadOnly()&&r=="single"&&(o=a.contains(t))>-1&&(ct((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(ct(o.to(),t)>0||t.xRel<0)?Xl(e,n,t,i):Gl(e,n,t,i)}function Xl(e,t,r,n){var i=e.display,a=!1,o=Bt(e,function(u){_&&(i.scroller.draggable=!1),e.state.draggingText=!1,Xe(i.wrapper.ownerDocument,"mouseup",o),Xe(i.wrapper.ownerDocument,"mousemove",s),Xe(i.scroller,"dragstart",l),Xe(i.scroller,"drop",o),a||(d(u),n.addNew||Bi(e.doc,r,null,null,n.extend),_&&!ce||O&&S==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),s=function(u){a=a||Math.abs(t.clientX-u.clientX)+Math.abs(t.clientY-u.clientY)>=10},l=function(){return a=!0};_&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),re(i.wrapper.ownerDocument,"mouseup",o),re(i.wrapper.ownerDocument,"mousemove",s),re(i.scroller,"dragstart",l),re(i.scroller,"drop",o),fo(e),setTimeout(function(){return i.input.focus()},20)}function fs(e,t,r){if(r=="char")return new xt(t,t);if(r=="word")return e.findWordAt(t);if(r=="line")return new xt(Ee(t.line,0),ut(e.doc,Ee(t.line+1,0)));var n=r(e,t);return new xt(n.from,n.to)}function Gl(e,t,r,n){var i=e.display,a=e.doc;d(t);var o,s,l=a.sel,u=l.ranges;if(n.addNew&&!n.extend?(s=a.sel.contains(r),s>-1?o=u[s]:o=new xt(r,r)):(o=a.sel.primary(),s=a.sel.primIndex),n.unit=="rectangle")n.addNew||(o=new xt(r,r)),r=ir(e,t,!0,!0),s=-1;else{var b=fs(e,r,n.unit);n.extend?o=Ca(o,b.anchor,b.head,n.extend):o=b}n.addNew?s==-1?(s=u.length,$t(a,wn(e,u.concat([o]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&n.unit=="char"&&!n.extend?($t(a,wn(e,u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=a.sel):Sa(a,s,o,Te):(s=0,$t(a,new hn([o],0),Te),l=a.sel);var E=r;function I(Pe){if(ct(E,Pe)==0)return;if(E=Pe,n.unit=="rectangle"){for(var He=[],ot=e.options.tabSize,nt=T(Ze(a,r.line).text,r.ch,ot),gt=T(Ze(a,Pe.line).text,Pe.ch,ot),Ct=Math.min(nt,gt),zt=Math.max(nt,gt),Mt=Math.min(r.line,Pe.line),un=Math.min(e.lastLine(),Math.max(r.line,Pe.line));Mt<=un;Mt++){var rn=Ze(a,Mt).text,Nt=me(rn,Ct,ot);Ct==zt?He.push(new xt(Ee(Mt,Nt),Ee(Mt,Nt))):rn.length>Nt&&He.push(new xt(Ee(Mt,Nt),Ee(Mt,me(rn,zt,ot))))}He.length||He.push(new xt(r,r)),$t(a,wn(e,l.ranges.slice(0,s).concat(He),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(Pe)}else{var an=o,Xt=fs(e,Pe,n.unit),Ft=an.anchor,It;ct(Xt.anchor,Ft)>0?(It=Xt.head,Ft=Jn(an.from(),Xt.anchor)):(It=Xt.anchor,Ft=pr(an.to(),Xt.head));var Dt=l.ranges.slice(0);Dt[s]=Vl(e,new xt(ut(a,Ft),It)),$t(a,wn(e,Dt,s),Te)}}var A=i.wrapper.getBoundingClientRect(),ne=0;function ge(Pe){var He=++ne,ot=ir(e,Pe,!0,n.unit=="rectangle");if(!ot)return;if(ct(ot,E)!=0){e.curOp.focus=$(),I(ot);var nt=Pi(i,a);(ot.line>=nt.to||ot.line<nt.from)&&setTimeout(Bt(e,function(){ne==He&&ge(Pe)}),150)}else{var gt=Pe.clientY<A.top?-20:Pe.clientY>A.bottom?20:0;gt&&setTimeout(Bt(e,function(){if(ne!=He)return;i.scroller.scrollTop+=gt,ge(Pe)}),50)}}function ke(Pe){e.state.selectingText=!1,ne=Infinity,Pe&&(d(Pe),i.input.focus()),Xe(i.wrapper.ownerDocument,"mousemove",Re),Xe(i.wrapper.ownerDocument,"mouseup",Fe),a.history.lastSelOrigin=null}var Re=Bt(e,function(Pe){Pe.buttons===0||!X(Pe)?ke(Pe):ge(Pe)}),Fe=Bt(e,ke);e.state.selectingText=Fe,re(i.wrapper.ownerDocument,"mousemove",Re),re(i.wrapper.ownerDocument,"mouseup",Fe)}function Vl(e,t){var r=t.anchor,n=t.head,i=Ze(e.doc,r.line);if(ct(r,n)==0&&r.sticky==n.sticky)return t;var a=Ye(i);if(!a)return t;var o=Ke(a,r.ch,r.sticky),s=a[o];if(s.from!=r.ch&&s.to!=r.ch)return t;var l=o+(s.from==r.ch==(s.level!=1)?0:1);if(l==0||l==a.length)return t;var u;if(n.line!=r.line)u=(n.line-r.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var b=Ke(a,n.ch,n.sticky),E=b-o||(n.ch-r.ch)*(s.level==1?-1:1);b==l-1||b==l?u=E<0:u=E>0}var I=a[l+(u?-1:0)],A=u==(I.level==1),ne=A?I.from:I.to,ge=A?"after":"before";return r.ch==ne&&r.sticky==ge?t:new xt(new Ee(r.line,ne,ge),n)}function hs(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(I){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&d(t);var o=e.display,s=o.lineDiv.getBoundingClientRect();if(a>s.bottom||!w(e,r))return h(t);a-=s.top-o.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var u=o.gutters.childNodes[l];if(u&&u.getBoundingClientRect().right>=i){var b=On(e.doc,a),E=e.display.gutterSpecs[l];return ue(e,r,e,b,E.className,t),h(t)}}}function Da(e,t){return hs(e,t,"gutterClick",!0)}function ps(e,t){if(Dn(e.display,t)||$l(e,t))return;if(Oe(e,t,"contextmenu"))return;se||e.display.input.onContextMenu(t)}function $l(e,t){return w(e,"gutterContextMenu")?hs(e,t,"gutterContextMenu",!1):!1}function ms(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Zr(e)}var Pr={toString:function(){return"CodeMirror.Init"}},gs={},Vi={};function Yl(e){var t=e.optionHandlers;function r(n,i,a,o){e.defaults[n]=i,a&&(t[n]=o?function(s,l,u){u!=Pr&&a(s,l,u)}:a)}e.defineOption=r,e.Init=Pr,r("value","",function(n,i){return n.setValue(i)},!0),r("mode",null,function(n,i){n.doc.modeOption=i,wa(n)},!0),r("indentUnit",2,wa,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(n){ai(n),Zr(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(l){for(var u=0;;){var b=l.text.indexOf(i,u);if(b==-1)break;u=b+i.length,a.push(Ee(o,b))}o++});for(var s=a.length-1;s>=0;s--)Mr(n.doc,i,a[s],Ee(a[s].line,a[s].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!=Pr&&n.refresh()}),r("specialCharPlaceholder",Cs,function(n){return n.refresh()},!0),r("electricChars",!0),r("inputStyle",B?"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",!Ne),r("wholeLineUpdateBefore",!0),r("theme","default",function(n){ms(n),ii(n)},!0),r("keyMap","default",function(n,i,a){var o=Xi(i),s=a!=Pr&&Xi(a);s&&s.detach&&s.detach(n,o),o.attach&&o.attach(n,s||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Zl,!0),r("gutters",[],function(n,i){n.display.gutterSpecs=ya(i,n.options.lineNumbers),ii(n)},!0),r("fixedGutter",!0,function(n,i){n.display.gutters.style.left=i?ua(n.display)+"px":"0",n.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(n){return kr(n)},!0),r("scrollbarStyle","native",function(n){bo(n),kr(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=ya(n.options.gutters,i),ii(n)},!0),r("firstLineNumber",1,ii,!0),r("lineNumberFormatter",function(n){return n},ii,!0),r("showCursorWhenSelecting",!1,Qr,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(n,i){i=="nocursor"&&(Cr(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,Jl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,Qr,!0),r("singleCursorHeightPerLine",!0,Qr,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,ai,!0),r("addModeClass",!1,ai,!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,ai,!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 Jl(e,t,r){var n=r&&r!=Pr;if(!t!=!n){var i=e.display.dragFunctions,a=t?re:Xe;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 Zl(e){e.options.lineWrapping?(le(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(ee(e.display.wrapper,"CodeMirror-wrap"),yn(e)),ca(e),tn(e),Zr(e),setTimeout(function(){return kr(e)},100)}function Lt(e,t){var r=this;if(!(this instanceof Lt))return new Lt(e,t);this.options=t=t?c(t):{},c(gs,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 Lt.inputStyles[t.inputStyle](this),a=this.display=new cl(e,n,i,t);a.wrapper.CodeMirror=this,ms(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),bo(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 J,keySeq:null,specialChars:null},t.autofocus&&!B&&a.input.focus(),O&&S<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Ql(this),Ll(),lr(this),this.curOp.forceUpdate=!0,Oo(this,n),t.autofocus&&!B||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&fa(r)},20):Cr(this);for(var o in Vi)Vi.hasOwnProperty(o)&&Vi[o](this,t[o],Pr);wo(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Aa.length;++s)Aa[s](this);ur(this),_&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}Lt.defaults=gs,Lt.optionHandlers=Vi;function Ql(e){var t=e.display;re(t.scroller,"mousedown",Bt(e,ds)),O&&S<11?re(t.scroller,"dblclick",Bt(e,function(l){if(Oe(e,l))return;var u=ir(e,l);if(!u||Da(e,l)||Dn(e.display,l))return;d(l);var b=e.findWordAt(u);Bi(e.doc,b.anchor,b.head)})):re(t.scroller,"dblclick",function(l){return Oe(e,l)||d(l)}),re(t.scroller,"contextmenu",function(l){return ps(e,l)}),re(t.input.getField(),"contextmenu",function(l){t.scroller.contains(l.target)||ps(e,l)});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(l){if(l.touches.length!=1)return!1;var u=l.touches[0];return u.radiusX<=1&&u.radiusY<=1}function o(l,u){if(u.left==null)return!0;var b=u.left-l.left,E=u.top-l.top;return b*b+E*E>20*20}re(t.scroller,"touchstart",function(l){if(!Oe(e,l)&&!a(l)&&!Da(e,l)){t.input.ensurePolled(),clearTimeout(r);var u=+new Date;t.activeTouch={start:u,moved:!1,prev:u-n.end<=300?n:null},l.touches.length==1&&(t.activeTouch.left=l.touches[0].pageX,t.activeTouch.top=l.touches[0].pageY)}}),re(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),re(t.scroller,"touchend",function(l){var u=t.activeTouch;if(u&&!Dn(t,l)&&u.left!=null&&!u.moved&&new Date-u.start<300){var b=e.coordsChar(t.activeTouch,"page"),E;!u.prev||o(u,u.prev)?E=new xt(b,b):!u.prev.prev||o(u,u.prev.prev)?E=e.findWordAt(b):E=new xt(Ee(b.line,0),ut(e.doc,Ee(b.line+1,0))),e.setSelection(E.anchor,E.head),e.focus(),d(l)}i()}),re(t.scroller,"touchcancel",i),re(t.scroller,"scroll",function(){t.scroller.clientHeight&&(ei(e,t.scroller.scrollTop),or(e,t.scroller.scrollLeft,!0),ue(e,"scroll",e))}),re(t.scroller,"mousewheel",function(l){return Co(e,l)}),re(t.scroller,"DOMMouseScroll",function(l){return Co(e,l)}),re(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(l){Oe(e,l)||m(l)},over:function(l){Oe(e,l)||(Ol(e,l),m(l))},start:function(l){return Tl(e,l)},drop:Bt(e,kl),leave:function(l){Oe(e,l)||Qo(e)}};var s=t.input.getField();re(s,"keyup",function(l){return us.call(e,l)}),re(s,"keydown",Bt(e,ls)),re(s,"keypress",Bt(e,cs)),re(s,"focus",function(l){return fa(e,l)}),re(s,"blur",function(l){return Cr(e,l)})}var Aa=[];Lt.defineInitHook=function(e){return Aa.push(e)};function bi(e,t,r,n){var i=e.doc,a;r==null&&(r="add"),r=="smart"&&(i.mode.indent?a=sn(e,t).state:r="prev");var o=e.options.tabSize,s=Ze(i,t),l=T(s.text,null,o);s.stateAfter&&(s.stateAfter=null);var u=s.text.match(/^\s*/)[0],b;if(!n&&!/\S/.test(s.text))b=0,r="not";else if(r=="smart"&&(b=i.mode.indent(a,s.text.slice(u.length),s.text),b==Ae||b>150)){if(!n)return;r="prev"}r=="prev"?t>i.first?b=T(Ze(i,t-1).text,null,o):b=0:r=="add"?b=l+e.options.indentUnit:r=="subtract"?b=l-e.options.indentUnit:typeof r=="number"&&(b=l+r),b=Math.max(0,b);var E="",I=0;if(e.options.indentWithTabs)for(var A=Math.floor(b/o);A;--A)I+=o,E+=" ";if(I<b&&(E+=V(b-I)),E!=u)return Mr(i,E,Ee(t,0),Ee(t,u.length),"+input"),s.stateAfter=null,!0;for(var ne=0;ne<i.sel.ranges.length;ne++){var ge=i.sel.ranges[ne];if(ge.head.line==t&&ge.head.ch<u.length){var ke=Ee(t,u.length);Sa(i,ne,new xt(ke,ke));break}}}var En=null;function $i(e){En=e}function Ra(e,t,r,n,i){var a=e.doc;e.display.shift=!1,n||(n=a.sel);var o=+new Date-200,s=i=="paste"||e.state.pasteIncoming>o,l=bt(t),u=null;if(s&&n.ranges.length>1)if(En&&En.text.join(`
`)==t){if(n.ranges.length%En.text.length==0){u=[];for(var b=0;b<En.text.length;b++)u.push(a.splitLines(En.text[b]))}}else l.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=Be(l,function(Re){return[Re]}));for(var E=e.curOp.updateInput,I=n.ranges.length-1;I>=0;I--){var A=n.ranges[I],ne=A.from(),ge=A.to();A.empty()&&(r&&r>0?ne=Ee(ne.line,ne.ch-r):e.state.overwrite&&!s?ge=Ee(ge.line,Math.min(Ze(a,ge.line).text.length,ge.ch+Le(l).length)):s&&En&&En.lineWise&&En.text.join(`
`)==l.join(`
`)&&(ne=ge=Ee(ne.line,0)));var ke={from:ne,to:ge,text:u?u[I%u.length]:l,origin:i||(s?"paste":e.state.cutIncoming>o?"cut":"+input")};Lr(e.doc,ke),Kt(e,"inputRead",e,ke)}t&&!s&&bs(e,t),Sr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=E),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function vs(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&ln(t,function(){return Ra(t,r,0,null,"paste")}),!0}function bs(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 s=0;s<a.electricChars.length;s++)if(t.indexOf(a.electricChars.charAt(s))>-1){o=bi(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=bi(e,i.head.line,"smart")));o&&Kt(e,"electricInput",e,i.head.line)}}function ys(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:Ee(i,0),head:Ee(i+1,0)};r.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:r}}function xs(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function ws(){var e=v("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=v("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return _?e.style.width="1000px":e.setAttribute("wrap","off"),k&&(e.style.border="1px solid black"),xs(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)&&Bt(this,t[n])(this,i,o),ue(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"](Xi(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.");Qe(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"),Pn(this.doc,n)&&bi(this,n,i,a)}),indentSelection:Qt(function(n){for(var i=this.doc.sel.ranges,a=-1,o=0;o<i.length;o++){var s=i[o];if(s.empty())s.head.line>a&&(bi(this,s.head.line,n,!0),a=s.head.line,o==this.doc.sel.primIndex&&Sr(this));else{var l=s.from(),u=s.to(),b=Math.max(a,l.line);a=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var E=b;E<a;++E)bi(this,E,n);var I=this.doc.sel.ranges;l.ch==0&&i.length==I.length&&I[o].from().ch>0&&Sa(this.doc,o,new xt(l,I[o].to()),fe)}}}),getTokenAt:function(n,i){return Mn(this,n,i)},getLineTokens:function(n,i){return Mn(this,Ee(n),i,!0)},getTokenTypeAt:function(n){n=ut(this.doc,n);var i=Br(this,Ze(this.doc,n.line)),a=0,o=(i.length-1)/2,s=n.ch,l;if(s==0)l=i[2];else for(;;){var u=a+o>>1;if((u?i[u*2-1]:0)>=s)o=u;else if(i[u*2+1]<s)a=u+1;else{l=i[u*2+2];break}}var b=l?l.indexOf("overlay "):-1;return b<0?l:b==0?null:l.slice(0,b-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],s=this.getModeAt(n);if(typeof s[i]=="string")o[s[i]]&&a.push(o[s[i]]);else if(s[i])for(var l=0;l<s[i].length;l++){var u=o[s[i][l]];u&&a.push(u)}else s.helperType&&o[s.helperType]?a.push(o[s.helperType]):o[s.name]&&a.push(o[s.name]);for(var b=0;b<o._global.length;b++){var E=o._global[b];E.pred(s,this)&&Q(a,E.val)==-1&&a.push(E.val)}return a},getStateAfter:function(n,i){var a=this.doc;return n=Zn(a,n==null?a.first+a.size-1:n),sn(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=ut(this.doc,n):a=n?o.from():o.to(),xn(this,a,i||"page")},charCoords:function(n,i){return ia(this,ut(this.doc,n),i||"page")},coordsChar:function(n,i){return n=no(this,n,i||"page"),oa(this,n.left,n.top)},lineAtHeight:function(n,i){return n=no(this,{top:n,left:0},i||"page").top,On(this.doc,n+this.display.viewOffset)},heightAtLine:function(n,i,a){var o=!1,s;if(typeof n=="number"){var l=this.doc.first+this.doc.size-1;n<this.doc.first?n=this.doc.first:n>l&&(n=l,o=!0),s=Ze(this.doc,n)}else s=n;return Mi(this,s,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-Ot(s):0)},defaultTextHeight:function(){return Er(this.display)},defaultCharWidth:function(){return _r(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(n,i,a,o,s){var l=this.display;n=xn(this,ut(this.doc,n));var u=n.bottom,b=n.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),l.sizer.appendChild(i),o=="over")u=n.top;else if(o=="above"||o=="near"){var E=Math.max(l.wrapper.clientHeight,this.doc.height),I=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);(o=="above"||n.bottom+i.offsetHeight>E)&&n.top>i.offsetHeight?u=n.top-i.offsetHeight:n.bottom+i.offsetHeight<=E&&(u=n.bottom),b+i.offsetWidth>I&&(b=I-i.offsetWidth)}i.style.top=u+"px",i.style.left=i.style.right="",s=="right"?(b=l.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(s=="left"?b=0:s=="middle"&&(b=(l.sizer.clientWidth-i.offsetWidth)/2),i.style.left=b+"px"),a&&Js(this,{left:b,top:u,right:b+i.offsetWidth,bottom:u+i.offsetHeight})},triggerOnKeyDown:Qt(ls),triggerOnKeyPress:Qt(cs),triggerOnKeyUp:us,triggerOnMouseDown:Qt(ds),execCommand:function(n){if(pi.hasOwnProperty(n))return pi[n].call(null,this)},triggerElectric:Qt(function(n){bs(this,n)}),findPosH:function(n,i,a,o){var s=1;i<0&&(s=-1,i=-i);for(var l=ut(this.doc,n),u=0;u<i&&!(l=Pa(this.doc,l,s,a,o),l.hitSide);++u);return l},moveH:Qt(function(n,i){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?Pa(a.doc,o.head,n,i,a.options.rtlMoveVisually):n<0?o.from():o.to()},de)}),deleteH:Qt(function(n,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Rr(this,function(s){var l=Pa(o,s.head,n,i,!1);return n<0?{from:l,to:s.head}:{from:s.head,to:l}})}),findPosV:function(n,i,a,o){var s=1,l=o;i<0&&(s=-1,i=-i);for(var u=ut(this.doc,n),b=0;b<i;++b){var E=xn(this,u,"div");if(l==null?l=E.left:E.left=l,u=Es(this,E,s,a),u.hitSide)break}return u},moveV:Qt(function(n,i){var a=this,o=this.doc,s=[],l=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(b){if(l)return n<0?b.from():b.to();var E=xn(a,b.head,"div");b.goalColumn!=null&&(E.left=b.goalColumn),s.push(E.left);var I=Es(a,E,n,i);return i=="page"&&b==o.sel.primary()&&pa(a,ia(a,I,"div").top-E.top),I},de),s.length)for(var u=0;u<o.sel.ranges.length;u++)o.sel.ranges[u].goalColumn=s[u]}),findWordAt:function(n){var i=this.doc,a=Ze(i,n.line).text,o=n.ch,s=n.ch;if(a){var l=this.getHelper(n,"wordChars");(n.sticky=="before"||s==a.length)&&o?--o:++s;for(var u=a.charAt(o),b=De(u,l)?function(E){return De(E,l)}:/\s/.test(u)?function(E){return/\s/.test(E)}:function(E){return!/\s/.test(E)&&!De(E)};o>0&&b(a.charAt(o-1));)--o;for(;s<a.length&&b(a.charAt(s));)++s}return new xt(Ee(n.line,o),Ee(n.line,s))},toggleOverwrite:function(n){if(n!=null&&n==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?le(this.display.cursorDiv,"CodeMirror-overwrite"):ee(this.display.cursorDiv,"CodeMirror-overwrite"),ue(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==$()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Qt(function(n,i){qr(this,n,i)}),getScrollInfo:function(){var n=this.display.scroller;return{left:n.scrollLeft,top:n.scrollTop,height:n.scrollHeight-Cn(this)-this.display.barHeight,width:n.scrollWidth-Cn(this)-this.display.barWidth,clientHeight:ta(this),clientWidth:nr(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:Ee(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?Zs(this,n):po(this,n.from,n.to,n.margin)}),setSize:Qt(function(n,i){var a=this,o=function(l){return typeof l=="number"||/^\d+$/.test(String(l))?l+"px":l};n!=null&&(this.display.wrapper.style.width=o(n)),i!=null&&(this.display.wrapper.style.height=o(i)),this.options.lineWrapping&&qa(this);var s=this.display.viewFrom;this.doc.iter(s,this.display.viewTo,function(l){if(l.widgets){for(var u=0;u<l.widgets.length;u++)if(l.widgets[u].noHScroll){Bn(a,s,"widget");break}}++s}),this.curOp.forceUpdate=!0,ue(this,"refresh",this)}),operation:function(n){return ln(this,n)},startOperation:function(){return lr(this)},endOperation:function(){return ur(this)},refresh:Qt(function(){var n=this.display.cachedTextHeight;tn(this),this.curOp.forceUpdate=!0,Zr(this),qr(this,this.doc.scrollLeft,this.doc.scrollTop),va(this.display),(n==null||Math.abs(n-Er(this.display))>.5||this.options.lineWrapping)&&ca(this),ue(this,"refresh",this)}),swapDoc:Qt(function(n){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),Oo(this,n),Zr(this),this.display.input.reset(),qr(this,n.scrollLeft,n.scrollTop),this.curOp.forceScroll=!0,Kt(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}},C(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 Pa(e,t,r,n,i){var a=t,o=r,s=Ze(e,t.line),l=i&&e.direction=="rtl"?-r:r;function u(){var Fe=t.line+l;return Fe<e.first||Fe>=e.first+e.size?!1:(t=new Ee(Fe,t.ch,t.sticky),s=Ze(e,Fe))}function b(Fe){var Pe;if(n=="codepoint"){var He=s.text.charCodeAt(t.ch+(n>0?0:-1));isNaN(He)?Pe=null:Pe=new Ee(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(He>=55296&&He<56320?2:1))),-r)}else i?Pe=Pl(e.cm,s,t,r):Pe=Ta(s,t,r);if(Pe==null)if(!Fe&&u())t=Oa(i,e.cm,s,t.line,l);else return!1;else t=Pe;return!0}if(n=="char"||n=="codepoint")b();else if(n=="column")b(!0);else if(n=="word"||n=="group")for(var E=null,I=n=="group",A=e.cm&&e.cm.getHelper(t,"wordChars"),ne=!0;!(r<0&&!b(!ne));ne=!1){var ge=s.text.charAt(t.ch)||`
`,ke=De(ge,A)?"w":I&&ge==`
`?"n":!I||/\s/.test(ge)?null:"p";if(I&&!ne&&!ke&&(ke="s"),E&&E!=ke){r<0&&(r=1,b(),t.sticky="after");break}if(ke&&(E=ke),r>0&&!b(!ne))break}var Re=zi(e,t,a,o,!0);return Me(a,Re)&&(Re.hitSide=!0),Re}function Es(e,t,r,n){var i=e.doc,a=t.left,o;if(n=="page"){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(s-.5*Er(e.display),3);o=(r>0?t.bottom:t.top)+r*l}else n=="line"&&(o=r>0?t.bottom+3:t.top-3);for(var u;!(u=oa(e,a,o),!u.outside);){if(r<0?o<=0:o>=i.height){u.hitSide=!0;break}o+=r*5}return u}var wt=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new J,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};wt.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;xs(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize);function a(s){for(var l=s.target;l;l=l.parentNode){if(l==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(l.className))break}return!1}re(i,"paste",function(s){if(!a(s)||Oe(n,s)||vs(s,n))return;S<=11&&setTimeout(Bt(n,function(){return t.updateFromDOM()}),20)}),re(i,"compositionstart",function(s){t.composing={data:s.data,done:!1}}),re(i,"compositionupdate",function(s){t.composing||(t.composing={data:s.data,done:!1})}),re(i,"compositionend",function(s){t.composing&&(s.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),re(i,"touchstart",function(){return r.forceCompositionEnd()}),re(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(s){if(!a(s)||Oe(n,s))return;if(n.somethingSelected())$i({lineWise:!1,text:n.getSelections()}),s.type=="cut"&&n.replaceSelection("",null,"cut");else if(n.options.lineWiseCopyCut){var l=ys(n);$i({lineWise:!0,text:l.text}),s.type=="cut"&&n.operation(function(){n.setSelections(l.ranges,0,fe),n.replaceSelection("",null,"cut")})}else return;if(s.clipboardData){s.clipboardData.clearData();var u=En.text.join(`
`);if(s.clipboardData.setData("Text",u),s.clipboardData.getData("Text")==u){s.preventDefault();return}}var b=ws(),E=b.firstChild;n.display.lineSpace.insertBefore(b,n.display.lineSpace.firstChild),E.value=En.text.join(`
`);var I=document.activeElement;Ce(E),setTimeout(function(){n.display.lineSpace.removeChild(b),I.focus(),I==i&&r.showPrimarySelection()},50)}re(i,"copy",o),re(i,"cut",o)},wt.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},wt.prototype.prepareSelection=function(){var e=lo(this.cm,!1);return e.focus=document.activeElement==this.div,e},wt.prototype.showSelection=function(e,t){if(!e||!this.cm.display.view.length)return;(e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e)},wt.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},wt.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=Yi(t,e.anchorNode,e.anchorOffset),o=Yi(t,e.focusNode,e.focusOffset);if(a&&!a.bad&&o&&!o.bad&&ct(Jn(a,o),n)==0&&ct(pr(a,o),i)==0)return;var s=t.display.view,l=n.line>=t.display.viewFrom&&_s(t,n)||{node:s[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&_s(t,i);if(!u){var b=s[s.length-1].measure,E=b.maps?b.maps[b.maps.length-1]:b.map;u={node:E[E.length-1],offset:E[E.length-2]-E[E.length-3]}}if(!l||!u){e.removeAllRanges();return}var I=e.rangeCount&&e.getRangeAt(0),A;try{A=N(l.node,l.offset,u.offset,u.node)}catch(ne){}A&&(!z&&t.state.focused?(e.collapse(l.node,l.offset),A.collapsed||(e.removeAllRanges(),e.addRange(A))):(e.removeAllRanges(),e.addRange(A)),I&&e.anchorNode==null?e.addRange(I):z&&this.startGracePeriod()),this.rememberSelection()},wt.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)},wt.prototype.showMultipleSelections=function(e){Y(this.cm.display.cursorDiv,e.cursors),Y(this.cm.display.selectionDiv,e.selection)},wt.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},wt.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return x(this.div,t)},wt.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},wt.prototype.blur=function(){this.div.blur()},wt.prototype.getField=function(){return this.div},wt.prototype.supportsTouch=function(){return!0},wt.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)},wt.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},wt.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var e=this.getSelection(),t=this.cm;if(L&&P&&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=Yi(t,e.anchorNode,e.anchorOffset),n=Yi(t,e.focusNode,e.focusOffset);r&&n&&ln(t,function(){$t(t.doc,zn(r,n),fe),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})},wt.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=Ee(n.line-1,Ze(e.doc,n.line-1).length)),i.ch==Ze(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=Ee(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,s;n.line==t.viewFrom||(a=ar(e,n.line))==0?(o=yt(t.view[0].line),s=t.view[0].node):(o=yt(t.view[a].line),s=t.view[a-1].node.nextSibling);var l=ar(e,i.line),u,b;if(l==t.view.length-1?(u=t.viewTo-1,b=t.lineDiv.lastChild):(u=yt(t.view[l+1].line)-1,b=t.view[l+1].node.previousSibling),!s)return!1;for(var E=e.doc.splitLines(tu(e,s,b,o,u)),I=Tn(e.doc,Ee(o,0),Ee(u,Ze(e.doc,u).text.length));E.length>1&&I.length>1;)if(Le(E)==Le(I))E.pop(),I.pop(),u--;else if(E[0]==I[0])E.shift(),I.shift(),o++;else break;for(var A=0,ne=0,ge=E[0],ke=I[0],Re=Math.min(ge.length,ke.length);A<Re&&ge.charCodeAt(A)==ke.charCodeAt(A);)++A;for(var Fe=Le(E),Pe=Le(I),He=Math.min(Fe.length-(E.length==1?A:0),Pe.length-(I.length==1?A:0));ne<He&&Fe.charCodeAt(Fe.length-ne-1)==Pe.charCodeAt(Pe.length-ne-1);)++ne;if(E.length==1&&I.length==1&&o==n.line)for(;A&&A>n.ch&&Fe.charCodeAt(Fe.length-ne-1)==Pe.charCodeAt(Pe.length-ne-1);)A--,ne++;E[E.length-1]=Fe.slice(0,Fe.length-ne).replace(/^\u200b+/,""),E[0]=E[0].slice(A).replace(/\u200b+$/,"");var ot=Ee(o,A),nt=Ee(u,I.length?Le(I).length-ne:0);if(E.length>1||E[0]||ct(ot,nt))return Mr(e.doc,E,ot,nt,"+input"),!0},wt.prototype.ensurePolled=function(){this.forceCompositionEnd()},wt.prototype.reset=function(){this.forceCompositionEnd()},wt.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},wt.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)},wt.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&ln(this.cm,function(){return tn(e.cm)})},wt.prototype.setUneditable=function(e){e.contentEditable="false"},wt.prototype.onKeyPress=function(e){if(e.charCode==0||this.composing)return;e.preventDefault(),this.cm.isReadOnly()||Bt(this.cm,Ra)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0)},wt.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},wt.prototype.onContextMenu=function(){},wt.prototype.resetPosition=function(){},wt.prototype.needsContentAttribute=!0;function _s(e,t){var r=na(e,t.line);if(!r||r.hidden)return null;var n=Ze(e.doc,t.line),i=$a(r,n,t.line),a=Ye(n,e.doc.direction),o="left";if(a){var s=Ke(a,t.ch);o=s%2?"right":"left"}var l=Za(i.map,t.ch,o);return l.offset=l.collapse=="right"?l.end:l.start,l}function eu(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Nr(e,t){return t&&(e.bad=!0),e}function tu(e,t,r,n,i){var a="",o=!1,s=e.doc.lineSeparator(),l=!1;function u(A){return function(ne){return ne.id==A}}function b(){o&&(a+=s,l&&(a+=s),o=l=!1)}function E(A){A&&(b(),a+=A)}function I(A){if(A.nodeType==1){var ne=A.getAttribute("cm-text");if(ne){E(ne);return}var ge=A.getAttribute("cm-marker"),ke;if(ge){var Re=e.findMarks(Ee(n,0),Ee(i+1,0),u(+ge));Re.length&&(ke=Re[0].find(0))&&E(Tn(e.doc,ke.from,ke.to).join(s));return}if(A.getAttribute("contenteditable")=="false")return;var Fe=/^(pre|div|p|li|table|br)$/i.test(A.nodeName);if(!/^br$/i.test(A.nodeName)&&A.textContent.length==0)return;Fe&&b();for(var Pe=0;Pe<A.childNodes.length;Pe++)I(A.childNodes[Pe]);/^(pre|p)$/i.test(A.nodeName)&&(l=!0),Fe&&(o=!0)}else A.nodeType==3&&E(A.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(I(t),t==r);)t=t.nextSibling,l=!1;return a}function Yi(e,t,r){var n;if(t==e.display.lineDiv){if(n=e.display.lineDiv.childNodes[r],!n)return Nr(e.clipPos(Ee(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 Nr(Ee(yt(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var a=e.rest?Le(e.rest):e.line;return Nr(Ee(yt(a),a.text.length),i)}var o=t.nodeType==3?t:null,s=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,r&&(r=o.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var l=e.measure,u=l.maps;function b(ke,Re,Fe){for(var Pe=-1;Pe<(u?u.length:0);Pe++)for(var He=Pe<0?l.map:u[Pe],ot=0;ot<He.length;ot+=3){var nt=He[ot+2];if(nt==ke||nt==Re){var gt=yt(Pe<0?e.line:e.rest[Pe]),Ct=He[ot]+Fe;return(Fe<0||nt!=ke)&&(Ct=He[ot+(Fe?1:0)]),Ee(gt,Ct)}}}var E=b(o,s,r);if(E)return Nr(E,i);for(var I=s.nextSibling,A=o?o.nodeValue.length-r:0;I;I=I.nextSibling){if(E=b(I,I.firstChild,0),E)return Nr(Ee(E.line,E.ch-A),i);A+=I.textContent.length}for(var ne=s.previousSibling,ge=r;ne;ne=ne.previousSibling){if(E=b(ne,ne.firstChild,-1),E)return Nr(Ee(E.line,E.ch+ge),i);ge+=ne.textContent.length}}var Pt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new J,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),k&&(i.style.width="0px"),re(i,"input",function(){O&&S>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),re(i,"paste",function(o){if(Oe(n,o)||vs(o,n))return;n.state.pasteIncoming=+new Date,r.fastPoll()});function a(o){if(Oe(n,o))return;if(n.somethingSelected())$i({lineWise:!1,text:n.getSelections()});else if(n.options.lineWiseCopyCut){var s=ys(n);$i({lineWise:!0,text:s.text}),o.type=="cut"?n.setSelections(s.ranges,null,fe):(r.prevInput="",i.value=s.text.join(`
`),Ce(i))}else return;o.type=="cut"&&(n.state.cutIncoming=+new Date)}re(i,"cut",a),re(i,"copy",a),re(e.scroller,"paste",function(o){if(Dn(e,o)||Oe(n,o))return;if(!i.dispatchEvent){n.state.pasteIncoming=+new Date,r.focus();return}var s=new Event("paste");s.clipboardData=o.clipboardData,i.dispatchEvent(s)}),re(e.lineSpace,"selectstart",function(o){Dn(e,o)||d(o)}),re(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"})}}),re(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Pt.prototype.createField=function(e){this.wrapper=ws(),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=lo(e);if(e.options.moveInputWithCursor){var i=xn(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;Y(r.cursorDiv,e.cursors),Y(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&&Ce(this.textarea),O&&S>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",O&&S>=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"&&(!B||$()!=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||lt(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(O&&S>=9&&this.hasSelection===i||F&&/[\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,s=Math.min(n.length,i.length);o<s&&n.charCodeAt(o)==i.charCodeAt(o);)++o;return ln(t,function(){Ra(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(){O&&S>=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=ir(r,e),o=n.scroller.scrollTop;if(!a||U)return;var s=r.options.resetSelectionOnContextMenu;s&&r.doc.sel.contains(a)==-1&&Bt(r,$t)(r.doc,zn(a),fe);var l=i.style.cssText,u=t.wrapper.style.cssText,b=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-b.top-5)+"px; left: "+(e.clientX-b.left-5)+`px;
z-index: 1000; background: `+(O?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var E;_&&(E=window.scrollY),n.input.focus(),_&&window.scrollTo(null,E),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=A,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll);function I(){if(i.selectionStart!=null){var ge=r.somethingSelected(),ke="\u200B"+(ge?i.value:"");i.value="\u21DA",i.value=ke,t.prevInput=ge?"":"\u200B",i.selectionStart=1,i.selectionEnd=ke.length,n.selForContextMenu=r.doc.sel}}function A(){if(t.contextMenuPending!=A)return;if(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=l,O&&S<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=o),i.selectionStart!=null){(!O||O&&S<9)&&I();var ge=0,ke=function(){n.selForContextMenu==r.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?Bt(r,Wo)(r):ge++<10?n.detectingSelectAll=setTimeout(ke,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(ke,200)}}if(O&&S>=9&&I(),se){m(e);var ne=function(){Xe(window,"mouseup",ne),setTimeout(A,20)};re(window,"mouseup",ne)}else setTimeout(A,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?c(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=$();t.autofocus=r==e||e.getAttribute("autofocus")!=null&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(re(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(l){}}t.finishInit=function(l){l.save=n,l.getTextArea=function(){return e},l.toTextArea=function(){l.toTextArea=isNaN,n(),e.parentNode.removeChild(l.getWrapperElement()),e.style.display="",e.form&&(Xe(e.form,"submit",n),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var s=Lt(function(l){return e.parentNode.insertBefore(l,e.nextSibling)},t);return s}function iu(e){e.off=Xe,e.on=re,e.wheelEventPixels=dl,e.Doc=nn,e.splitLines=bt,e.countColumn=T,e.findColumn=me,e.isWordChar=_e,e.Pass=Ae,e.signal=ue,e.Line=kt,e.changeEnd=Hn,e.scrollbarModel=vo,e.Pos=Ee,e.cmpPos=ct,e.modes=vt,e.mimeModes=qe,e.resolveMode=Jt,e.getMode=cn,e.modeExtensions=pn,e.extendMode=Zt,e.copyState=mn,e.startState=fr,e.innerMode=$n,e.commands=pi,e.keyMap=An,e.keyName=rs,e.isModifierKey=ts,e.lookupKey=Ar,e.normalizeKeyMap=Rl,e.StringStream=Tt,e.SharedTextMarker=di,e.TextMarker=Xn,e.LineWidget=ci,e.e_preventDefault=d,e.e_stopPropagation=f,e.e_stop=m,e.addClass=le,e.contains=x,e.rmClass=ee,e.keyNames=Gn}Yl(Lt),ql(Lt);var au="iter insert remove copy getEditor constructor".split(" ");for(var Ji in nn.prototype)nn.prototype.hasOwnProperty(Ji)&&Q(au,Ji)<0&&(Lt.prototype[Ji]=function(e){return function(){return e.apply(this.doc,arguments)}}(nn.prototype[Ji]));return C(nn),Lt.inputStyles={textarea:Pt,contenteditable:wt},Lt.defineMode=function(e){!Lt.defaults.mode&&e!="null"&&(Lt.defaults.mode=e),en.apply(this,arguments)},Lt.defineMIME=Ut,Lt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Lt.defineMIME("text/plain","null"),Lt.defineExtension=function(e,t){Lt.prototype[e]=t},Lt.defineDocExtension=function(e,t){nn.prototype[e]=t},Lt.fromTextArea=ru,iu(Lt),Lt.version="5.58.2",Lt})},Y1PL:function(st,je,p){"use strict";p.r(je),p.d(je,"ResizableTextArea",function(){return Q});var M=p("wx14"),xe=p("1OyB"),z=p("vuIU"),ie=p("Ji7U"),ae=p("LK+K"),q=p("q1tI"),O=p("VTBJ"),S=p("rePB"),_=p("Zm9Q"),te=p("Kwbf"),P=p("c+Xe"),U=p("m+aA"),ce=p("bdgK"),H=new Map;function D(fe){fe.forEach(function(Te){var de,me=Te.target;(de=H.get(me))===null||de===void 0||de.forEach(function(j){return j(me)})})}var k=new ce.default(D),L=null,B=null;function F(fe,Te){H.has(fe)||(H.set(fe,new Set),k.observe(fe)),H.get(fe).add(Te)}function he(fe,Te){H.has(fe)&&(H.get(fe).delete(Te),H.get(fe).size||(k.unobserve(fe),H.delete(fe)))}var Ne=function(fe){Object(ie.a)(de,fe);var Te=Object(ae.a)(de);function de(){return Object(xe.a)(this,de),Te.apply(this,arguments)}return Object(z.a)(de,[{key:"render",value:function(){return this.props.children}}]),de}(q.Component),G=q.createContext(null);function oe(fe){var Te=fe.children,de=fe.onBatchResize,me=q.useRef(0),j=q.useRef([]),V=q.useContext(G),Le=q.useCallback(function(Be,Qe,ze){me.current+=1;var Ie=me.current;j.current.push({size:Be,element:Qe,data:ze}),Promise.resolve().then(function(){Ie===me.current&&(de==null||de(j.current),j.current=[])}),V==null||V(Be,Qe,ze)},[de,V]);return q.createElement(G.Provider,{value:Le},Te)}function se(fe){var Te=fe.children,de=fe.disabled,me=q.useRef(null),j=q.useRef(null),V=q.useContext(G),Le=q.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Be=q.isValidElement(Te)&&Object(P.c)(Te),Qe=Be?Te.ref:null,ze=q.useMemo(function(){return Object(P.a)(Qe,me)},[Qe,me]),Ie=q.useRef(fe);Ie.current=fe;var ye=q.useCallback(function(_e){var De=Ie.current,We=De.onResize,Ue=De.data,ve=_e.getBoundingClientRect(),we=ve.width,Je=ve.height,$e=_e.offsetWidth,Ve=_e.offsetHeight,Ke=Math.floor(we),it=Math.floor(Je);if(Le.current.width!==Ke||Le.current.height!==it||Le.current.offsetWidth!==$e||Le.current.offsetHeight!==Ve){var Ye={width:Ke,height:it,offsetWidth:$e,offsetHeight:Ve};Le.current=Ye;var Ge=$e===Math.round(we)?we:$e,re=Ve===Math.round(Je)?Je:Ve,rt=Object(O.a)(Object(O.a)({},Ye),{},{offsetWidth:Ge,offsetHeight:re});V==null||V(rt,_e,Ue),We&&Promise.resolve().then(function(){We(rt,_e)})}},[]);return q.useEffect(function(){var _e=Object(U.a)(me.current)||Object(U.a)(j.current);return _e&&!de&&F(_e,ye),function(){return he(_e,ye)}},[me.current,de]),q.createElement(Ne,{ref:j},Be?q.cloneElement(Te,{ref:ze}):Te)}var Z="rc-observer-key";function ee(fe){var Te=fe.children,de=Object(_.a)(Te);return de.map(function(me,j){var V=(me==null?void 0:me.key)||"".concat(Z,"-").concat(j);return q.createElement(se,Object(M.a)({},fe,{key:V}),me)})}ee.Collection=oe;var pe=ee,Y=p("bT9E"),v=p("TSYQ"),W=p.n(v),N=`
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"],$={},le;function K(fe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,de=fe.getAttribute("id")||fe.getAttribute("data-reactid")||fe.getAttribute("name");if(Te&&$[de])return $[de];var me=window.getComputedStyle(fe),j=me.getPropertyValue("box-sizing")||me.getPropertyValue("-moz-box-sizing")||me.getPropertyValue("-webkit-box-sizing"),V=parseFloat(me.getPropertyValue("padding-bottom"))+parseFloat(me.getPropertyValue("padding-top")),Le=parseFloat(me.getPropertyValue("border-bottom-width"))+parseFloat(me.getPropertyValue("border-top-width")),Be=x.map(function(ze){return"".concat(ze,":").concat(me.getPropertyValue(ze))}).join(";"),Qe={sizingStyle:Be,paddingSize:V,borderSize:Le,boxSizing:j};return Te&&de&&($[de]=Qe),Qe}function Ce(fe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,me=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;le||(le=document.createElement("textarea"),le.setAttribute("tab-index","-1"),le.setAttribute("aria-hidden","true"),document.body.appendChild(le)),fe.getAttribute("wrap")?le.setAttribute("wrap",fe.getAttribute("wrap")):le.removeAttribute("wrap");var j=K(fe,Te),V=j.paddingSize,Le=j.borderSize,Be=j.boxSizing,Qe=j.sizingStyle;le.setAttribute("style","".concat(Qe,";").concat(N)),le.value=fe.value||fe.placeholder||"";var ze=Number.MIN_SAFE_INTEGER,Ie=Number.MAX_SAFE_INTEGER,ye=le.scrollHeight,_e;if(Be==="border-box"?ye+=Le:Be==="content-box"&&(ye-=V),de!==null||me!==null){le.value=" ";var De=le.scrollHeight-V;de!==null&&(ze=De*de,Be==="border-box"&&(ze=ze+V+Le),ye=Math.max(ze,ye)),me!==null&&(Ie=De*me,Be==="border-box"&&(Ie=Ie+V+Le),_e=ye>Ie?"":"hidden",ye=Math.min(Ie,ye))}return{height:ye,minHeight:ze,maxHeight:Ie,overflowY:_e,resize:"none"}}var g=p("Gytx"),c=p.n(g),T;(function(fe){fe[fe.NONE=0]="NONE",fe[fe.RESIZING=1]="RESIZING",fe[fe.RESIZED=2]="RESIZED"})(T||(T={}));var J=function(fe){Object(ie.a)(de,fe);var Te=Object(ae.a)(de);function de(me){var j;return Object(xe.a)(this,de),j=Te.call(this,me),j.nextFrameActionId=void 0,j.resizeFrameId=void 0,j.textArea=void 0,j.saveTextArea=function(V){j.textArea=V},j.handleResize=function(V){var Le=j.state.resizeStatus,Be=j.props,Qe=Be.autoSize,ze=Be.onResize;if(Le!==T.NONE)return;typeof ze=="function"&&ze(V),Qe&&j.resizeOnNextFrame()},j.resizeOnNextFrame=function(){cancelAnimationFrame(j.nextFrameActionId),j.nextFrameActionId=requestAnimationFrame(j.resizeTextarea)},j.resizeTextarea=function(){var V=j.props.autoSize;if(!V||!j.textArea)return;var Le=V.minRows,Be=V.maxRows,Qe=Ce(j.textArea,!1,Le,Be);j.setState({textareaStyles:Qe,resizeStatus:T.RESIZING},function(){cancelAnimationFrame(j.resizeFrameId),j.resizeFrameId=requestAnimationFrame(function(){j.setState({resizeStatus:T.RESIZED},function(){j.resizeFrameId=requestAnimationFrame(function(){j.setState({resizeStatus:T.NONE}),j.fixFirefoxAutoScroll()})})})})},j.renderTextArea=function(){var V=j.props,Le=V.prefixCls,Be=Le===void 0?"rc-textarea":Le,Qe=V.autoSize,ze=V.onResize,Ie=V.className,ye=V.disabled,_e=j.state,De=_e.textareaStyles,We=_e.resizeStatus,Ue=Object(Y.a)(j.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ve=W()(Be,Ie,Object(S.a)({},"".concat(Be,"-disabled"),ye));"value"in Ue&&(Ue.value=Ue.value||"");var we=Object(O.a)(Object(O.a)(Object(O.a)({},j.props.style),De),We===T.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return q.createElement(pe,{onResize:j.handleResize,disabled:!(Qe||ze)},q.createElement("textarea",Object(M.a)({},Ue,{className:ve,style:we,ref:j.saveTextArea})))},j.state={textareaStyles:{},resizeStatus:T.NONE},j}return Object(z.a)(de,[{key:"componentDidUpdate",value:function(j){(j.value!==this.props.value||!c()(j.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 j=this.textArea.selectionStart,V=this.textArea.selectionEnd;this.textArea.setSelectionRange(j,V)}}catch(Le){}}},{key:"render",value:function(){return this.renderTextArea()}}]),de}(q.Component),Q=J,Se=function(fe){Object(ie.a)(de,fe);var Te=Object(ae.a)(de);function de(me){var j;Object(xe.a)(this,de),j=Te.call(this,me),j.resizableTextArea=void 0,j.focus=function(){j.resizableTextArea.textArea.focus()},j.saveTextArea=function(Le){j.resizableTextArea=Le},j.handleChange=function(Le){var Be=j.props.onChange;j.setValue(Le.target.value,function(){j.resizableTextArea.resizeTextarea()}),Be&&Be(Le)},j.handleKeyDown=function(Le){var Be=j.props,Qe=Be.onPressEnter,ze=Be.onKeyDown;Le.keyCode===13&&Qe&&Qe(Le),ze&&ze(Le)};var V=typeof me.value=="undefined"||me.value===null?me.defaultValue:me.value;return j.state={value:V},j}return Object(z.a)(de,[{key:"setValue",value:function(j,V){"value"in this.props||this.setState({value:j},V)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return q.createElement(Q,Object(M.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(j){return"value"in j?{value:j.value}:null}}]),de}(q.Component),Ae=je.default=Se},ZW9T:function(st,je,p){"use strict";p.d(je,"a",function(){return Ne});var M=p("k1fw"),xe=p("miYZ"),z=p("tsqr"),ie=p("rAM+"),ae=p("tJVT"),q=p("PpiC"),O=p("q1tI"),S=p.n(O),_=p("bdgK");function te(G,oe,se,Z,ee){var pe=oe.getWordUntilPosition(se),Y={startLineNumber:se.lineNumber,endLineNumber:se.lineNumber,startColumn:pe.startColumn,endColumn:pe.endColumn},v=Z.map(function(W){return{label:W,kind:G.languages.CompletionItemKind.Keyword,insertText:W,insertTextRules:G.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Y}});return ee.map(function(W){v.push(Object(M.a)(Object(M.a)({},W),{},{range:Y}))}),v}var P=function(G){var oe={label:"ifelse",kind:G.languages.CompletionItemKind.Method,insertText:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`),insertTextRules:G.languages.CompletionItemInsertTextRule.InsertAsSnippet},se=["auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while","inline","restrict","_Bool","_Complex","_Imaginary","_Alignas","_Alignof","_Atomic","_Static_assert","_Noreturn","_Thread_local","_Generic"];G.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Y,v){var W=te(G,Y,v,se,[oe]);return{suggestions:W}}});var Z=["False","None","True","and","as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"];G.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Y,v){var W=[{label:"print",kind:G.languages.CompletionItemKind.Snippet,insertText:["print($0)"].join(`
`),insertTextRules:G.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=te(G,Y,v,Z,W);return{suggestions:N}}});var ee=["abstract","assert","boolean","break","byte","case","catch","char","class","const","continue","default","do","double","else","enum","extends","final","finally","float","for","goto","if","implements","import","instance of","int","interface","long","native","new","package","private","protected","public","return","strictfp","short","static","super","switch","synchronized","this","throw","throws","transient","try","void","volatile","while"];G.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Y,v){var W=[oe,{label:"main",kind:G.languages.CompletionItemKind.Snippet,insertText:["public static void main(String[] args) {"," $0","}"].join(`
`),insertTextRules:G.languages.CompletionItemInsertTextRule.InsertAsSnippet},{label:"System.out.print",kind:G.languages.CompletionItemKind.Snippet,insertText:["System.out.print($0)"].join(`
`),insertTextRules:G.languages.CompletionItemInsertTextRule.InsertAsSnippet}],N=te(G,Y,v,ee,W);return{suggestions:N}}})},U="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",ce=p("LvDl");function H(G){return/^\d+$/.test(G)?"".concat(G,"px"):G}function D(){}var k=!1,L={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python"};function B(){var G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],oe=G;if(Array.isArray(G)){for(var se=0;se<G.length;se++){var Z=L[G[se]];if(Z)return Z}return oe[0]}return L[oe]||oe}var F=null,he=je.b=function(G){var oe=G.width,se=oe===void 0?"100%":oe,Z=G.height,ee=Z===void 0?"100%":Z,pe=G.value,Y=G.language,v=Y===void 0?"javascript":Y,W=G.style,N=W===void 0?{}:W,x=G.options,$=x===void 0?{}:x,le=G.overrideServices,K=le===void 0?{}:le,Ce=G.theme,g=Ce===void 0?"vs-dark":Ce,c=G.onEditBlur,T=G.onSave,J=G.autoHeight,Q=J===void 0?!1:J,Se=G.forbidCopy,Ae=Se===void 0?!1:Se,fe=G.onChange,Te=fe===void 0?D:fe,de=G.editorDidMount,me=de===void 0?D:de,j=G.onFocus,V=j===void 0?D:j,Le=G.filename,Be=Le===void 0?"educoder.txt":Le,Qe=Object(q.a)(G,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename"]),ze=Object(O.useRef)(),Ie=Object(O.useRef)({}),ye=Object(O.useRef)(),_e=Object(O.useRef)(!1),De=Object(O.useRef)(),We=Object(O.useState)(!1),Ue=Object(ae.a)(We,2),ve=Ue[0],we=Ue[1];function Je(){var h;return ze.current&&(h=new _.default(function(m){var R=Object(ie.a)(m),X;try{for(R.s();!(X=R.n()).done;){var be=X.value;(be.target.offsetHeight>0||be.target.offsetWidth>0)&&Ie.current.instance.layout()}}catch(et){R.e(et)}finally{R.f()}}),h.observe(ze.current)),h}function $e(){z.b.warn(decodeURIComponent(U))}var Ve=function(){var m=Ie.current.instance;if(pe!=null&&m&&ve){var R=m.getModel();R&&pe!==R.getValue()&&(k=!0,R.setValue(pe),m.layout(),k=!1)}};Object(O.useEffect)(function(){ye.current&&clearTimeout(ye.current),ye.current=setTimeout(function(){Ve()},500)},[pe,ve,Ie.current]);function Ke(){var h=Ie.current.instance;if(h){var m=h.getSelection(),R=Ie.current.pastePos||{},X=new F.Range(R.startLineNumber||m.endLineNumber,R.startColumn||m.endColumn,R.endLineNumber||m.endLineNumber,R.endColumn||m.endColumn);setTimeout(function(){h.executeEdits("",[{range:X,text:""}])},300)}}function it(h){(window.navigator.platform.match("Mac")?h.metaKey:h.ctrlKey)&&h.keyCode==83&&(h.preventDefault(),T())}var Ye=function(){if(Q&&Ie.current.instance){var m=Ie.current.instance.getContentHeight();d(m<ee?ee:m)}else d(ee)};function Ge(h){var m=document.createEvent("MouseEvents");m.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),h.dispatchEvent(m)}function re(h,m){var R=window.URL||window.webkitURL||window,X=new Blob([m]),be=document.createElementNS("http://www.w3.org/1999/xhtml","a");be.href=R.createObjectURL(X),be.download=h,Ge(be)}Object(O.useEffect)(function(){Ye()},[Ye]),Object(O.useEffect)(function(){ze.current&&!ve&&p.e(27).then(p.t.bind(null,"M/lh",7)).then(function(h){try{F=h,Ie.current.instance=F.editor.create(ze.current,{value:pe,language:B(v),theme:g,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},K);var m=Ie.current.instance;if(me(m,F),setTimeout(function(){Ye(),Ie.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){re(Be||"educoder.txt",m.getValue())}})},500),Ie.current.subscription=m.onDidChangeModelContent(function(X){_e.current?clearTimeout(De.current):(Ye(),Te(m.getValue(),X)),De.current=setTimeout(function(){_e.current=!1},500)}),window.Monaco||P(F),Ae&&(m.addCommand(F.KeyMod.CtrlCmd|F.KeyMod.Shift|F.KeyCode.KEY_V,function(){return $e(),null}),m.addCommand(F.KeyMod.CtrlCmd|F.KeyCode.KEY_C,function(){return $e(),null})),window.Monaco=F,c&&m.onDidBlurEditorWidget(function(){c(m.getValue())}),V&&m.onDidFocusEditorText(function(){V(m.getValue())}),Ae){m.addCommand(F.KeyMod.CtrlCmd|F.KeyCode.KEY_V,function(){return $e(),null}),m.onDidPaste(function(X){Ie.current.pastePos=X});try{window.addEventListener("paste",Ke)}catch(X){}}var R=Je();return we(!0),function(){var X=Ie.current.instance;X.dispose();var be=X.getModel();be&&be.dispose(),Ie.current.subscription&&Ie.current.subscription.dispose(),Ae&&window.removeEventListener("paste",Ke),R.unobserve(ze.current)}}catch(X){}})},[]),Object(O.useEffect)(function(){var h=Ie.current.instance;if(h&&ve)return document.addEventListener("keydown",it,!1),function(){document.removeEventListener("keydown",it)}},[T,ve]),Object(O.useEffect)(function(){var h=Ie.current.instance;if(h&&ve){var m=B(v);F.editor.setModelLanguage(h.getModel(),m),console.log("language:",v,h.getModel(),m)}},[v,ve]),Object(O.useEffect)(function(){var h=Ie.current.instance;h&&ve&&F.editor.setTheme(g)},[g,ve]),Object(O.useEffect)(function(){var h=Ie.current.instance;h&&ve&&(h.updateOptions(Object(M.a)({},$)),setTimeout(function(){h.getModel().updateOptions(Object(M.a)({},$))},200))},[JSON.stringify($),ve]),Object(O.useEffect)(function(){var h=Ie.current.instance;h&&ve&&h.layout()},[se,ee,ve]);var rt=Object(O.useState)(H(se)),Xe=Object(ae.a)(rt,2),ue=Xe[0],Oe=Xe[1],y=Object(O.useState)(H(ee)),w=Object(ae.a)(y,2),C=w[0],d=w[1],f=Object(M.a)(Object(M.a)({},N),{},{width:ue,height:C});return S.a.createElement("div",{className:"my-monaco-editor",ref:ze,style:f})};function Ne(G){var oe=G.width,se=oe===void 0?"100%":oe,Z=G.height,ee=Z===void 0?"100%":Z,pe=G.original,Y=G.modified,v=G.language,W=G.options,N=W===void 0?{}:W,x=Object(O.useRef)(),$=Object(O.useState)(null),le=Object(ae.a)($,2),K=le[0],Ce=le[1];function g(Q){var Se;return x.current&&(Se=new _.default(function(Ae){var fe=Object(ie.a)(Ae),Te;try{for(fe.s();!(Te=fe.n()).done;){var de=Te.value;(de.target.offsetHeight>0||de.target.offsetWidth>0)&&Q.layout()}}catch(me){fe.e(me)}finally{fe.f()}}),Se.observe(x.current)),Se}Object(O.useEffect)(function(){x.current&&p.e(27).then(p.t.bind(null,"M/lh",7)).then(function(Q){F=Q;var Se=F.editor.createDiffEditor(x.current,Object(M.a)(Object(M.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},N),{},{wordWrap:!0}));Ce(Se);var Ae=g(Se);return function(){Se.dispose();var fe=Se.getModel();fe&&fe.dispose(),Ae.unobserve(x.current)}})},[]),Object(O.useEffect)(function(){K&&K.setModel({original:F.editor.createModel(pe,v),modified:F.editor.createModel(Y,v)})},[pe,Y,v,K]);var c=H(se),T=H(ee),J={width:c,height:T};return S.a.createElement("div",{className:"my-diff-editor",ref:x,style:J})}},ZpRC:function(st,je,p){"use strict";function M(P){return typeof P=="object"&&P!=null&&P.nodeType===1}function xe(P,U){return(!U||P!=="hidden")&&P!=="visible"&&P!=="clip"}function z(P,U){if(P.clientHeight<P.scrollHeight||P.clientWidth<P.scrollWidth){var ce=getComputedStyle(P,null);return xe(ce.overflowY,U)||xe(ce.overflowX,U)||function(H){var D=function(k){if(!k.ownerDocument||!k.ownerDocument.defaultView)return null;try{return k.ownerDocument.defaultView.frameElement}catch(L){return null}}(H);return!!D&&(D.clientHeight<H.scrollHeight||D.clientWidth<H.scrollWidth)}(P)}return!1}function ie(P,U,ce,H,D,k,L,B){return k<P&&L>U||k>P&&L<U?0:k<=P&&B<=ce||L>=U&&B>=ce?k-P-H:L>U&&B<ce||k<P&&B>ce?L-U+D:0}var ae=function(P,U){var ce=window,H=U.scrollMode,D=U.block,k=U.inline,L=U.boundary,B=U.skipOverflowHiddenElements,F=typeof L=="function"?L:function(De){return De!==L};if(!M(P))throw new TypeError("Invalid target");for(var he=document.scrollingElement||document.documentElement,Ne=[],G=P;M(G)&&F(G);){if((G=G.parentElement)===he){Ne.push(G);break}G!=null&&G===document.body&&z(G)&&!z(document.documentElement)||G!=null&&z(G,B)&&Ne.push(G)}for(var oe=ce.visualViewport?ce.visualViewport.width:innerWidth,se=ce.visualViewport?ce.visualViewport.height:innerHeight,Z=window.scrollX||pageXOffset,ee=window.scrollY||pageYOffset,pe=P.getBoundingClientRect(),Y=pe.height,v=pe.width,W=pe.top,N=pe.right,x=pe.bottom,$=pe.left,le=D==="start"||D==="nearest"?W:D==="end"?x:W+Y/2,K=k==="center"?$+v/2:k==="end"?N:$,Ce=[],g=0;g<Ne.length;g++){var c=Ne[g],T=c.getBoundingClientRect(),J=T.height,Q=T.width,Se=T.top,Ae=T.right,fe=T.bottom,Te=T.left;if(H==="if-needed"&&W>=0&&$>=0&&x<=se&&N<=oe&&W>=Se&&x<=fe&&$>=Te&&N<=Ae)return Ce;var de=getComputedStyle(c),me=parseInt(de.borderLeftWidth,10),j=parseInt(de.borderTopWidth,10),V=parseInt(de.borderRightWidth,10),Le=parseInt(de.borderBottomWidth,10),Be=0,Qe=0,ze="offsetWidth"in c?c.offsetWidth-c.clientWidth-me-V:0,Ie="offsetHeight"in c?c.offsetHeight-c.clientHeight-j-Le:0;if(he===c)Be=D==="start"?le:D==="end"?le-se:D==="nearest"?ie(ee,ee+se,se,j,Le,ee+le,ee+le+Y,Y):le-se/2,Qe=k==="start"?K:k==="center"?K-oe/2:k==="end"?K-oe:ie(Z,Z+oe,oe,me,V,Z+K,Z+K+v,v),Be=Math.max(0,Be+ee),Qe=Math.max(0,Qe+Z);else{Be=D==="start"?le-Se-j:D==="end"?le-fe+Le+Ie:D==="nearest"?ie(Se,fe,J,j,Le+Ie,le,le+Y,Y):le-(Se+J/2)+Ie/2,Qe=k==="start"?K-Te-me:k==="center"?K-(Te+Q/2)+ze/2:k==="end"?K-Ae+V+ze:ie(Te,Ae,Q,me,V+ze,K,K+v,v);var ye=c.scrollLeft,_e=c.scrollTop;le+=_e-(Be=Math.max(0,Math.min(_e+Be,c.scrollHeight-J+Ie))),K+=ye-(Qe=Math.max(0,Math.min(ye+Qe,c.scrollWidth-Q+ze)))}Ce.push({el:c,top:Be,left:Qe})}return Ce};function q(P){return P===Object(P)&&Object.keys(P).length!==0}function O(P,U){U===void 0&&(U="auto");var ce="scrollBehavior"in document.body.style;P.forEach(function(H){var D=H.el,k=H.top,L=H.left;D.scroll&&ce?D.scroll({top:k,left:L,behavior:U}):(D.scrollTop=k,D.scrollLeft=L)})}function S(P){return P===!1?{block:"end",inline:"nearest"}:q(P)?P:{block:"start",inline:"nearest"}}function _(P,U){var ce=!P.ownerDocument.documentElement.contains(P);if(q(U)&&typeof U.behavior=="function")return U.behavior(ce?[]:ae(P,U));if(ce)return;var H=S(U);return O(ae(P,H),H.behavior)}var te=je.a=_},bT9E:function(st,je,p){"use strict";p.d(je,"a",function(){return xe});var M=p("VTBJ");function xe(z,ie){var ae=Object(M.a)({},z);return Array.isArray(ie)&&ie.forEach(function(q){delete ae[q]}),ae}},c5Ni:function(st,je,p){},dejd:function(st,je,p){},dmUQ:function(st,je,p){"use strict";var M=p("Ff2n"),xe=p("rePB"),z=p("1OyB"),ie=p("vuIU"),ae=p("Ji7U"),q=p("md7G"),O=p("foSv"),S=p("q1tI"),_=p.n(S),te=p("TSYQ"),P=p.n(te),U=p("4IlW");function ce(Y,v){var W=Object.keys(Y);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(Y);v&&(N=N.filter(function(x){return Object.getOwnPropertyDescriptor(Y,x).enumerable})),W.push.apply(W,N)}return W}function H(Y){for(var v=1;v<arguments.length;v++){var W=arguments[v]!=null?arguments[v]:{};v%2?ce(Object(W),!0).forEach(function(N){Object(xe.a)(Y,N,W[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Y,Object.getOwnPropertyDescriptors(W)):ce(Object(W)).forEach(function(N){Object.defineProperty(Y,N,Object.getOwnPropertyDescriptor(W,N))})}return Y}function D(Y){var v=k();return function(){var N=Object(O.a)(Y),x;if(v){var $=Object(O.a)(this).constructor;x=Reflect.construct(N,arguments,$)}else x=N.apply(this,arguments);return Object(q.a)(this,x)}}function k(){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(Y){return!1}}function L(){}function B(Y){Y.preventDefault()}var F=function(v){return v.replace(/[^\w.-]+/g,"")},he=200,Ne=600,G=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,oe=function(v){return v!=null},se=function(v,W){return W===v||typeof W=="number"&&typeof v=="number"&&isNaN(W)&&isNaN(v)},Z=function(Y){Object(ae.a)(W,Y);var v=D(W);function W(N){var x;Object(z.a)(this,W),x=v.call(this,N),x.onKeyDown=function(K){var Ce=x.props,g=Ce.onKeyDown,c=Ce.onPressEnter;if(K.keyCode===U.a.UP){var T=x.getRatio(K);x.up(K,T,null),x.stop()}else if(K.keyCode===U.a.DOWN){var J=x.getRatio(K);x.down(K,J,null),x.stop()}else K.keyCode===U.a.ENTER&&c&&c(K);if(x.recordCursorPosition(),x.lastKeyCode=K.keyCode,g){for(var Q=arguments.length,Se=new Array(Q>1?Q-1:0),Ae=1;Ae<Q;Ae++)Se[Ae-1]=arguments[Ae];g.apply(void 0,[K].concat(Se))}},x.onKeyUp=function(K){var Ce=x.props.onKeyUp;if(x.stop(),x.recordCursorPosition(),Ce){for(var g=arguments.length,c=new Array(g>1?g-1:0),T=1;T<g;T++)c[T-1]=arguments[T];Ce.apply(void 0,[K].concat(c))}},x.onChange=function(K){var Ce=x.props.onChange;x.state.focused&&(x.inputting=!0),x.rawInput=x.props.parser(x.getValueFromEvent(K)),x.setState({inputValue:x.rawInput}),Ce(x.toNumber(x.rawInput))},x.onMouseUp=function(){var K=x.props.onMouseUp;x.recordCursorPosition(),K&&K.apply(void 0,arguments)},x.onFocus=function(){var K;x.setState({focused:!0}),(K=x.props).onFocus.apply(K,arguments)},x.onBlur=function(){var K=x.props.onBlur;x.inputting=!1,x.setState({focused:!1});var Ce=x.getCurrentValidValue(x.state.inputValue),g=x.setValue(Ce,L);if(K){var c=x.input.value,T=x.getInputDisplayValue({focus:!1,value:g});x.input.value=T&&Number(T),K.apply(void 0,arguments),x.input.value=c}},x.getRatio=function(K){var Ce=1;return K.metaKey||K.ctrlKey?Ce=.1:K.shiftKey&&(Ce=10),Ce},x.getFullNum=function(K){return isNaN(K)?K:/e/i.test(String(K))?Number(K).toFixed(18).replace(/\.?0+$/,""):K},x.getPrecision=function(K){if(oe(x.props.precision))return x.props.precision;var Ce=String(K);if(Ce.indexOf("e-")>=0)return parseInt(Ce.slice(Ce.indexOf("e-")+2),10);var g=0;return Ce.indexOf(".")>=0&&(g=Ce.length-Ce.indexOf(".")-1),g},x.getInputDisplayValue=function(K){var Ce=K||x.state,g=Ce.focused,c=Ce.inputValue,T=Ce.value,J;g?J=c:J=x.toPrecisionAsStep(T),J==null&&(J="");var Q=x.formatWrapper(J);return oe(x.props.decimalSeparator)&&(Q=Q.toString().replace(".",x.props.decimalSeparator)),Q},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(K){}},x.restoreByAfter=function(K){if(K===void 0)return!1;var Ce=x.input.value,g=Ce.lastIndexOf(K);if(g===-1)return!1;var c=x.cursorBefore.length;return x.lastKeyCode===U.a.DELETE&&x.cursorBefore.charAt(c-1)===K[0]?(x.fixCaret(c,c),!0):g+K.length===Ce.length?(x.fixCaret(g,g),!0):!1},x.partRestoreByAfter=function(K){return K===void 0?!1:Array.prototype.some.call(K,function(Ce,g){var c=K.substring(g);return x.restoreByAfter(c)})},x.isNotCompleteNumber=function(K){return isNaN(K)||K===""||K===null||K&&K.toString().indexOf(".")===K.toString().length-1},x.stop=function(){x.autoStepTimer&&clearTimeout(x.autoStepTimer)},x.down=function(K,Ce,g){x.pressingUpOrDown=!0,x.step("down",K,Ce,g)},x.up=function(K,Ce,g){x.pressingUpOrDown=!0,x.step("up",K,Ce,g)},x.saveInput=function(K){x.input=K};var $=N.value;$===void 0&&($=N.defaultValue),x.state={focused:N.autoFocus};var le=x.getValidValue(x.toNumber($));return x.state=H(H({},x.state),{},{inputValue:x.toPrecisionAsStep(le),value:le}),x}return Object(ie.a)(W,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(x){var $=this.props,le=$.value,K=$.onChange,Ce=$.max,g=$.min,c=this.state.focused;if(x){if(!se(x.value,le)||!se(x.max,Ce)||!se(x.min,g)){var T=c?le:this.getValidValue(le),J;this.pressingUpOrDown?J=T:this.inputting?J=this.rawInput:J=this.toPrecisionAsStep(T),this.setState({value:T,inputValue:J})}var Q="value"in this.props?le:this.state.value;"max"in this.props&&x.max!==Ce&&typeof Q=="number"&&Q>Ce&&K&&K(Ce),"min"in this.props&&x.min!==g&&typeof Q=="number"&&Q<g&&K&&K(g)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var Se=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===U.a.BACKSPACE?Se=this.cursorStart-1:this.lastKeyCode===U.a.DELETE&&(Se=this.cursorStart):Se=this.input.value.length,this.fixCaret(Se,Se)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case U.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case U.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 $=x;return $===""?$="":this.isNotCompleteNumber(parseFloat($))?$=this.state.value:$=this.getValidValue($),this.toNumber($)}},{key:"getValueFromEvent",value:function(x){var $=x.target.value.trim().replace(/。/g,".");return oe(this.props.decimalSeparator)&&($=$.replace(this.props.decimalSeparator,".")),$}},{key:"getValidValue",value:function(x){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,K=parseFloat(x);return isNaN(K)?x:(K<$&&(K=$),K>le&&(K=le),K)}},{key:"setValue",value:function(x,$){var le=this.props.precision,K=this.isNotCompleteNumber(parseFloat(x))?null:parseFloat(x),Ce=this.state.value,g=Ce===void 0?null:Ce,c=this.state.inputValue,T=c===void 0?null:c,J=typeof K=="number"?K.toFixed(le):"".concat(K),Q=K!==g||J!=="".concat(T);return"value"in this.props?(T=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:T},$)):this.setState({value:K,inputValue:this.toPrecisionAsStep(x)},$),Q&&this.props.onChange(K),K}},{key:"getMaxPrecision",value:function(x){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,le=this.props,K=le.precision,Ce=le.step;if(oe(K))return K;var g=this.getPrecision($),c=this.getPrecision(Ce),T=this.getPrecision(x);return x?Math.max(T,g+c):g+c}},{key:"getPrecisionFactor",value:function(x){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,le=this.getMaxPrecision(x,$);return Math.pow(10,le)}},{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 $=Math.abs(this.getMaxPrecision(x));return isNaN($)?x.toString():Number(x).toFixed($)}},{key:"toNumber",value:function(x){var $=this.props.precision,le=this.state.focused,K=x&&x.length>16&&le;return this.isNotCompleteNumber(x)||K?x:oe($)?Math.round(x*Math.pow(10,$))/Math.pow(10,$):Number(x)}},{key:"upStep",value:function(x,$){var le=this.props.step,K=this.getPrecisionFactor(x,$),Ce=Math.abs(this.getMaxPrecision(x,$)),g=((K*x+K*le*$)/K).toFixed(Ce);return this.toNumber(g)}},{key:"downStep",value:function(x,$){var le=this.props.step,K=this.getPrecisionFactor(x,$),Ce=Math.abs(this.getMaxPrecision(x,$)),g=((K*x-K*le*$)/K).toFixed(Ce);return this.toNumber(g)}},{key:"step",value:function(x,$){var le=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Ce=arguments.length>3?arguments[3]:void 0;this.stop(),$&&($.persist(),$.preventDefault());var g=this.props;if(g.disabled)return;var c=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(c))return;var T=this["".concat(x,"Step")](c,K),J=T>g.max||T<g.min;if(T>g.max?T=g.max:T<g.min&&(T=g.min),this.setValue(T,null),this.setState({focused:!0},function(){le.pressingUpOrDown=!1}),J)return;this.autoStepTimer=setTimeout(function(){le[x]($,K,!0)},Ce?he:Ne)}},{key:"fixCaret",value:function(x,$){if(x===void 0||$===void 0||!this.input||!this.input.value)return;try{var le=this.input.selectionStart,K=this.input.selectionEnd;(x!==le||$!==K)&&this.input.setSelectionRange(x,$)}catch(Ce){}}},{key:"render",value:function(){var x,$=this.props,le=$.prefixCls,K=$.disabled,Ce=$.readOnly,g=$.useTouch,c=$.autoComplete,T=$.upHandler,J=$.downHandler,Q=$.className,Se=$.max,Ae=$.min,fe=$.style,Te=$.title,de=$.onMouseEnter,me=$.onMouseLeave,j=$.onMouseOver,V=$.onMouseOut,Le=$.required,Be=$.onClick,Qe=$.tabIndex,ze=$.type,Ie=$.placeholder,ye=$.id,_e=$.inputMode,De=$.pattern,We=$.step,Ue=$.maxLength,ve=$.autoFocus,we=$.name,Je=$.onPaste,$e=$.onInput,Ve=Object(M.a)($,["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"]),Ke=this.state,it=Ke.value,Ye=Ke.focused,Ge=P()(le,(x={},Object(xe.a)(x,Q,!!Q),Object(xe.a)(x,"".concat(le,"-disabled"),K),Object(xe.a)(x,"".concat(le,"-focused"),Ye),x)),re={};Object.keys(Ve).forEach(function(m){(m.substr(0,5)==="data-"||m.substr(0,5)==="aria-"||m==="role")&&(re[m]=Ve[m])});var rt=!Ce&&!K,Xe=this.getInputDisplayValue(null),ue=(it||it===0)&&(isNaN(it)||Number(it)>=Se),Oe=(it||it===0)&&(isNaN(it)||Number(it)<=Ae),y=ue||K||Ce,w=Oe||K||Ce,C=P()("".concat(le,"-handler"),"".concat(le,"-handler-up"),Object(xe.a)({},"".concat(le,"-handler-up-disabled"),y)),d=P()("".concat(le,"-handler"),"".concat(le,"-handler-down"),Object(xe.a)({},"".concat(le,"-handler-down-disabled"),w)),f=g?{onTouchStart:y?L:this.up,onTouchEnd:this.stop}:{onMouseDown:y?L:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},h=g?{onTouchStart:w?L:this.down,onTouchEnd:this.stop}:{onMouseDown:w?L:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return _.a.createElement("div",{className:Ge,style:fe,title:Te,onMouseEnter:de,onMouseLeave:me,onMouseOver:j,onMouseOut:V,onFocus:function(){return null},onBlur:function(){return null}},_.a.createElement("div",{className:"".concat(le,"-handler-wrap")},_.a.createElement("span",Object.assign({unselectable:"on"},f,{role:"button","aria-label":"Increase Value","aria-disabled":y,className:C}),T||_.a.createElement("span",{unselectable:"on",className:"".concat(le,"-handler-up-inner"),onClick:B})),_.a.createElement("span",Object.assign({unselectable:"on"},h,{role:"button","aria-label":"Decrease Value","aria-disabled":w,className:d}),J||_.a.createElement("span",{unselectable:"on",className:"".concat(le,"-handler-down-inner"),onClick:B}))),_.a.createElement("div",{className:"".concat(le,"-input-wrap")},_.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Ae,"aria-valuemax":Se,"aria-valuenow":it,required:Le,type:ze,placeholder:Ie,onPaste:Je,onClick:Be,onMouseUp:this.onMouseUp,className:"".concat(le,"-input"),tabIndex:Qe,autoComplete:c,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:rt?this.onKeyDown:L,onKeyUp:rt?this.onKeyUp:L,autoFocus:ve,maxLength:Ue,readOnly:Ce,disabled:K,max:Se,min:Ae,step:We,name:we,title:Te,id:ye,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Xe),pattern:De,inputMode:_e,onInput:$e},re))))}}]),W}(_.a.Component);Z.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:G,min:-G,step:1,style:{},onChange:L,onKeyDown:L,onPressEnter:L,onFocus:L,onBlur:L,parser:F,required:!1,autoComplete:"off"};var ee=Z,pe=je.a=ee},fnXi:function(st,je,p){"use strict";var M=p("2qtc"),xe=p("kLXV"),z=p("q1tI"),ie=p.n(z),ae=p("Ty5D"),q=p("9kvl"),O=p("93VE"),S=p.n(O),_=function(P){var U=P.activeIndex,ce=P.isEdit,H=ce===void 0?!0:ce,D=P.dispatch,k=P.practiceSetting,L=Object(ae.i)(),B=L.id,F=L.challengesId,he=Object(z.useMemo)(function(){return[{name:"\u672C\u5173\u4EFB\u52A1",url:"/shixuns/".concat(B,"/edit/").concat(F,"/editcheckpoint")},{name:"\u8BC4\u6D4B\u8BBE\u7F6E",url:"/shixuns/".concat(B,"/edit/").concat(F,"/tab=2")},{name:"\u53C2\u8003\u7B54\u6848",url:"/shixuns/".concat(B,"/edit/").concat(F,"/tab=3")},{name:"\u5173\u5361\u6392\u884C\u699C",url:"/shixuns/".concat(B,"/edit/").concat(F,"/tab=4")}]},[B,F]),Ne=function(oe){var se,Z=function(){q.d.push(oe),D({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};k!=null&&(se=k.sideBar)!==null&&se!==void 0&&se.confirmLeave?xe.a.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:function(){Z()}}):Z()};return ie.a.createElement("ul",{className:"challenge-nav"},H?he.map(function(G,oe){return U===oe?ie.a.createElement("li",{key:G.url}," ",ie.a.createElement("a",{className:"active"},G.name)," "):ie.a.createElement("li",{key:G.url}," ",ie.a.createElement("a",{onClick:function(){return Ne(G.url)}},G.name)," ")}):ie.a.createElement("li",{key:he[0].url}," ",ie.a.createElement("a",{className:"active"},he[0].name)," "))};je.a=Object(q.a)(function(te){var P=te.globalSetting,U=te.practiceSetting;return{globalSetting:P,practiceSetting:U}})(_)},kSUc:function(st,je,p){},lZu9:function(st,je,p){(function(M){M(p("VrN/"),p("1eCo"),p("8EBN"))})(function(M){"use strict";M.defineMode("markdown",function(xe,z){var ie=M.getMode(xe,"text/html"),ae=ie.name=="null";function q(g){if(M.findModeByName){var c=M.findModeByName(g);c&&(g=c.mime||c.mimes[0])}var T=M.getMode(xe,g);return T.name=="null"?null:T}z.highlightFormatting===void 0&&(z.highlightFormatting=!1),z.maxBlockquoteDepth===void 0&&(z.maxBlockquoteDepth=0),z.taskLists===void 0&&(z.taskLists=!1),z.strikethrough===void 0&&(z.strikethrough=!1),z.emoji===void 0&&(z.emoji=!1),z.fencedCodeBlockHighlighting===void 0&&(z.fencedCodeBlockHighlighting=!0),z.fencedCodeBlockDefaultMode===void 0&&(z.fencedCodeBlockDefaultMode="text/plain"),z.xml===void 0&&(z.xml=!0),z.tokenTypeOverrides===void 0&&(z.tokenTypeOverrides={});var O={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 S in O)O.hasOwnProperty(S)&&z.tokenTypeOverrides[S]&&(O[S]=z.tokenTypeOverrides[S]);var _=/^([*\-_])(?:\s*\1){2,}\s*$/,te=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,P=/^\[(x| )\](?=\s)/i,U=z.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,ce=/^ {0,3}(?:\={1,}|-{2,})\s*$/,H=/^[^#!\[\]*_\\<>` "'(~:]+/,D=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,k=/^\s*\[[^\]]+?\]:.*$/,L=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,B=" ";function F(g,c,T){return c.f=c.inline=T,T(g,c)}function he(g,c,T){return c.f=c.block=T,T(g,c)}function Ne(g){return!g||!/\S/.test(g.string)}function G(g){if(g.linkTitle=!1,g.linkHref=!1,g.linkText=!1,g.em=!1,g.strong=!1,g.strikethrough=!1,g.quote=0,g.indentedCode=!1,g.f==se){var c=ae;if(!c){var T=M.innerMode(ie,g.htmlState);c=T.mode.name=="xml"&&T.state.tagStart===null&&!T.state.context&&T.state.tokenize.isInText}c&&(g.f=Y,g.block=oe,g.htmlState=null)}return g.trailingSpace=0,g.trailingSpaceNewLine=!1,g.prevLine=g.thisLine,g.thisLine={stream:null},null}function oe(g,c){var T=g.column()===c.indentation,J=Ne(c.prevLine.stream),Q=c.indentedCode,Se=c.prevLine.hr,Ae=c.list!==!1,fe=(c.listStack[c.listStack.length-1]||0)+3;c.indentedCode=!1;var Te=c.indentation;if(c.indentationDiff===null&&(c.indentationDiff=c.indentation,Ae)){for(c.list=null;Te<c.listStack[c.listStack.length-1];)c.listStack.pop(),c.listStack.length?c.indentation=c.listStack[c.listStack.length-1]:c.list=!1;c.list!==!1&&(c.indentationDiff=Te-c.listStack[c.listStack.length-1])}var de=!J&&!Se&&!c.prevLine.header&&(!Ae||!Q)&&!c.prevLine.fencedCodeEnd,me=(c.list===!1||Se||J)&&c.indentation<=fe&&g.match(_),j=null;if(c.indentationDiff>=4&&(Q||c.prevLine.fencedCodeEnd||c.prevLine.header||J))return g.skipToEnd(),c.indentedCode=!0,O.code;if(g.eatSpace())return null;if(T&&c.indentation<=fe&&(j=g.match(U))&&j[1].length<=6)return c.quote=0,c.header=j[1].length,c.thisLine.header=!0,z.highlightFormatting&&(c.formatting="header"),c.f=c.inline,ee(c);if(c.indentation<=fe&&g.eat(">"))return c.quote=T?1:c.quote+1,z.highlightFormatting&&(c.formatting="quote"),g.eatSpace(),ee(c);if(!me&&!c.setext&&T&&c.indentation<=fe&&(j=g.match(te))){var V=j[1]?"ol":"ul";return c.indentation=Te+g.current().length,c.list=!0,c.quote=0,c.listStack.push(c.indentation),c.em=!1,c.strong=!1,c.code=!1,c.strikethrough=!1,z.taskLists&&g.match(P,!1)&&(c.taskList=!0),c.f=c.inline,z.highlightFormatting&&(c.formatting=["list","list-"+V]),ee(c)}else{if(T&&c.indentation<=fe&&(j=g.match(D,!0)))return c.quote=0,c.fencedEndRE=new RegExp(j[1]+"+ *$"),c.localMode=z.fencedCodeBlockHighlighting&&q(j[2]||z.fencedCodeBlockDefaultMode),c.localMode&&(c.localState=M.startState(c.localMode)),c.f=c.block=Z,z.highlightFormatting&&(c.formatting="code-block"),c.code=-1,ee(c);if(c.setext||(!de||!Ae)&&!c.quote&&c.list===!1&&!c.code&&!me&&!k.test(g.string)&&(j=g.lookAhead(1))&&(j=j.match(ce)))return c.setext?(c.header=c.setext,c.setext=0,g.skipToEnd(),z.highlightFormatting&&(c.formatting="header")):(c.header=j[0].charAt(0)=="="?1:2,c.setext=c.header),c.thisLine.header=!0,c.f=c.inline,ee(c);if(me)return g.skipToEnd(),c.hr=!0,c.thisLine.hr=!0,O.hr;if(g.peek()==="[")return F(g,c,$)}return F(g,c,c.inline)}function se(g,c){var T=ie.token(g,c.htmlState);if(!ae){var J=M.innerMode(ie,c.htmlState);(J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText||c.md_inside&&g.current().indexOf(">")>-1)&&(c.f=Y,c.block=oe,c.htmlState=null)}return T}function Z(g,c){var T=c.listStack[c.listStack.length-1]||0,J=c.indentation<T,Q=T+3;if(c.fencedEndRE&&c.indentation<=Q&&(J||g.match(c.fencedEndRE))){z.highlightFormatting&&(c.formatting="code-block");var Se;return J||(Se=ee(c)),c.localMode=c.localState=null,c.block=oe,c.f=Y,c.fencedEndRE=null,c.code=0,c.thisLine.fencedCodeEnd=!0,J?he(g,c,c.block):Se}else return c.localMode?c.localMode.token(g,c.localState):(g.skipToEnd(),O.code)}function ee(g){var c=[];if(g.formatting){c.push(O.formatting),typeof g.formatting=="string"&&(g.formatting=[g.formatting]);for(var T=0;T<g.formatting.length;T++)c.push(O.formatting+"-"+g.formatting[T]),g.formatting[T]==="header"&&c.push(O.formatting+"-"+g.formatting[T]+"-"+g.header),g.formatting[T]==="quote"&&(!z.maxBlockquoteDepth||z.maxBlockquoteDepth>=g.quote?c.push(O.formatting+"-"+g.formatting[T]+"-"+g.quote):c.push("error"))}if(g.taskOpen)return c.push("meta"),c.length?c.join(" "):null;if(g.taskClosed)return c.push("property"),c.length?c.join(" "):null;if(g.linkHref?c.push(O.linkHref,"url"):(g.strong&&c.push(O.strong),g.em&&c.push(O.em),g.strikethrough&&c.push(O.strikethrough),g.emoji&&c.push(O.emoji),g.linkText&&c.push(O.linkText),g.code&&c.push(O.code),g.image&&c.push(O.image),g.imageAltText&&c.push(O.imageAltText,"link"),g.imageMarker&&c.push(O.imageMarker)),g.header&&c.push(O.header,O.header+"-"+g.header),g.quote&&(c.push(O.quote),!z.maxBlockquoteDepth||z.maxBlockquoteDepth>=g.quote?c.push(O.quote+"-"+g.quote):c.push(O.quote+"-"+z.maxBlockquoteDepth)),g.list!==!1){var J=(g.listStack.length-1)%3;J?J===1?c.push(O.list2):c.push(O.list3):c.push(O.list1)}return g.trailingSpaceNewLine?c.push("trailing-space-new-line"):g.trailingSpace&&c.push("trailing-space-"+(g.trailingSpace%2?"a":"b")),c.length?c.join(" "):null}function pe(g,c){return g.match(H,!0)?ee(c):void 0}function Y(g,c){var T=c.text(g,c);if(typeof T!="undefined")return T;if(c.list)return c.list=null,ee(c);if(c.taskList){var J=g.match(P,!0)[1]===" ";return J?c.taskOpen=!0:c.taskClosed=!0,z.highlightFormatting&&(c.formatting="task"),c.taskList=!1,ee(c)}if(c.taskOpen=!1,c.taskClosed=!1,c.header&&g.match(/^#+$/,!0))return z.highlightFormatting&&(c.formatting="header"),ee(c);var Q=g.next();if(c.linkTitle){c.linkTitle=!1;var Se=Q;Q==="("&&(Se=")"),Se=(Se+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ae="^\\s*(?:[^"+Se+"\\\\]+|\\\\\\\\|\\\\.)"+Se;if(g.match(new RegExp(Ae),!0))return O.linkHref}if(Q==="`"){var fe=c.formatting;z.highlightFormatting&&(c.formatting="code"),g.eatWhile("`");var Te=g.current().length;if(c.code==0&&(!c.quote||Te==1))return c.code=Te,ee(c);if(Te==c.code){var de=ee(c);return c.code=0,de}else return c.formatting=fe,ee(c)}else if(c.code)return ee(c);if(Q==="\\"&&(g.next(),z.highlightFormatting)){var me=ee(c),j=O.formatting+"-escape";return me?me+" "+j:j}if(Q==="!"&&g.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return c.imageMarker=!0,c.image=!0,z.highlightFormatting&&(c.formatting="image"),ee(c);if(Q==="["&&c.imageMarker&&g.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return c.imageMarker=!1,c.imageAltText=!0,z.highlightFormatting&&(c.formatting="image"),ee(c);if(Q==="]"&&c.imageAltText){z.highlightFormatting&&(c.formatting="image");var me=ee(c);return c.imageAltText=!1,c.image=!1,c.inline=c.f=W,me}if(Q==="["&&!c.image)return c.linkText&&g.match(/^.*?\]/)||(c.linkText=!0,z.highlightFormatting&&(c.formatting="link")),ee(c);if(Q==="]"&&c.linkText){z.highlightFormatting&&(c.formatting="link");var me=ee(c);return c.linkText=!1,c.inline=c.f=g.match(/\(.*?\)| ?\[.*?\]/,!1)?W:Y,me}if(Q==="<"&&g.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=v,z.highlightFormatting&&(c.formatting="link");var me=ee(c);return me?me+=" ":me="",me+O.linkInline}if(Q==="<"&&g.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=v,z.highlightFormatting&&(c.formatting="link");var me=ee(c);return me?me+=" ":me="",me+O.linkEmail}if(z.xml&&Q==="<"&&g.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var V=g.string.indexOf(">",g.pos);if(V!=-1){var Le=g.string.substring(g.start,V);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Le)&&(c.md_inside=!0)}return g.backUp(1),c.htmlState=M.startState(ie),he(g,c,se)}if(z.xml&&Q==="<"&&g.match(/^\/\w*?>/))return c.md_inside=!1,"tag";if(Q==="*"||Q==="_"){for(var Be=1,Qe=g.pos==1?" ":g.string.charAt(g.pos-2);Be<3&&g.eat(Q);)Be++;var ze=g.peek()||" ",Ie=!/\s/.test(ze)&&(!L.test(ze)||/\s/.test(Qe)||L.test(Qe)),ye=!/\s/.test(Qe)&&(!L.test(Qe)||/\s/.test(ze)||L.test(ze)),_e=null,De=null;if(Be%2&&(!c.em&&Ie&&(Q==="*"||!ye||L.test(Qe))?_e=!0:c.em==Q&&ye&&(Q==="*"||!Ie||L.test(ze))&&(_e=!1)),Be>1&&(!c.strong&&Ie&&(Q==="*"||!ye||L.test(Qe))?De=!0:c.strong==Q&&ye&&(Q==="*"||!Ie||L.test(ze))&&(De=!1)),De!=null||_e!=null){z.highlightFormatting&&(c.formatting=_e==null?"strong":De==null?"em":"strong em"),_e===!0&&(c.em=Q),De===!0&&(c.strong=Q);var de=ee(c);return _e===!1&&(c.em=!1),De===!1&&(c.strong=!1),de}}else if(Q===" "&&(g.eat("*")||g.eat("_"))){if(g.peek()===" ")return ee(c);g.backUp(1)}if(z.strikethrough){if(Q==="~"&&g.eatWhile(Q)){if(c.strikethrough){z.highlightFormatting&&(c.formatting="strikethrough");var de=ee(c);return c.strikethrough=!1,de}else if(g.match(/^[^\s]/,!1))return c.strikethrough=!0,z.highlightFormatting&&(c.formatting="strikethrough"),ee(c)}else if(Q===" "&&g.match(/^~~/,!0)){if(g.peek()===" ")return ee(c);g.backUp(2)}}if(z.emoji&&Q===":"&&g.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){c.emoji=!0,z.highlightFormatting&&(c.formatting="emoji");var We=ee(c);return c.emoji=!1,We}return Q===" "&&(g.match(/^ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),ee(c)}function v(g,c){var T=g.next();if(T===">"){c.f=c.inline=Y,z.highlightFormatting&&(c.formatting="link");var J=ee(c);return J?J+=" ":J="",J+O.linkInline}return g.match(/^[^>]+/,!0),O.linkInline}function W(g,c){if(g.eatSpace())return null;var T=g.next();return T==="("||T==="["?(c.f=c.inline=x(T==="("?")":"]"),z.highlightFormatting&&(c.formatting="link-string"),c.linkHref=!0,ee(c)):"error"}var N={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function x(g){return function(c,T){var J=c.next();if(J===g){T.f=T.inline=Y,z.highlightFormatting&&(T.formatting="link-string");var Q=ee(T);return T.linkHref=!1,Q}return c.match(N[g]),T.linkHref=!0,ee(T)}}function $(g,c){return g.match(/^([^\]\\]|\\.)*\]:/,!1)?(c.f=le,g.next(),z.highlightFormatting&&(c.formatting="link"),c.linkText=!0,ee(c)):F(g,c,Y)}function le(g,c){if(g.match(/^\]:/,!0)){c.f=c.inline=K,z.highlightFormatting&&(c.formatting="link");var T=ee(c);return c.linkText=!1,T}return g.match(/^([^\]\\]|\\.)+/,!0),O.linkText}function K(g,c){return g.eatSpace()?null:(g.match(/^[^\s]+/,!0),g.peek()===void 0?c.linkTitle=!0:g.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),c.f=c.inline=Y,O.linkHref+" url")}var Ce={startState:function(){return{f:oe,prevLine:{stream:null},thisLine:{stream:null},block:oe,htmlState:null,indentation:0,inline:Y,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(g){return{f:g.f,prevLine:g.prevLine,thisLine:g.thisLine,block:g.block,htmlState:g.htmlState&&M.copyState(ie,g.htmlState),indentation:g.indentation,localMode:g.localMode,localState:g.localMode?M.copyState(g.localMode,g.localState):null,inline:g.inline,text:g.text,formatting:!1,linkText:g.linkText,linkTitle:g.linkTitle,linkHref:g.linkHref,code:g.code,em:g.em,strong:g.strong,strikethrough:g.strikethrough,emoji:g.emoji,header:g.header,setext:g.setext,hr:g.hr,taskList:g.taskList,list:g.list,listStack:g.listStack.slice(0),quote:g.quote,indentedCode:g.indentedCode,trailingSpace:g.trailingSpace,trailingSpaceNewLine:g.trailingSpaceNewLine,md_inside:g.md_inside,fencedEndRE:g.fencedEndRE}},token:function(g,c){if(c.formatting=!1,g!=c.thisLine.stream){if(c.header=0,c.hr=!1,g.match(/^\s*$/,!0))return G(c),null;if(c.prevLine=c.thisLine,c.thisLine={stream:g},c.taskList=!1,c.trailingSpace=0,c.trailingSpaceNewLine=!1,!c.localState&&(c.f=c.block,c.f!=se)){var T=g.match(/^\s*/,!0)[0].replace(/\t/g,B).length;if(c.indentation=T,c.indentationDiff=null,T>0)return null}}return c.f(g,c)},innerMode:function(g){return g.block==se?{state:g.htmlState,mode:ie}:g.localState?{state:g.localState,mode:g.localMode}:{state:g,mode:Ce}},indent:function(g,c,T){return g.block==se&&ie.indent?ie.indent(g.htmlState,c,T):g.localState&&g.localMode.indent?g.localMode.indent(g.localState,c,T):M.Pass},blankLine:G,getType:ee,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Ce},"xml"),M.defineMIME("text/markdown","markdown"),M.defineMIME("text/x-markdown","markdown")})},nuEh:function(st,je,p){"use strict";var M=p("T2oS"),xe=p("W9HT"),z=p("q1tI"),ie=p.n(z),ae=p("F8wB"),q=p.n(ae),O=function(_){var te=_.loading;return te?ie.a.createElement("div",{className:q.a.loading},ie.a.createElement(xe.a,null)):ie.a.createElement(ie.a.Fragment,null)};je.a=O},osHv:function(st,je,p){(function(M){M(p("VrN/"))})(function(M){"use strict";var xe=M.Pos;function z(L,B){return L.line-B.line||L.ch-B.ch}var ie="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",ae=ie+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",q=new RegExp("<(/?)(["+ie+"]["+ae+"]*)","g");function O(L,B,F,he){this.line=B,this.ch=F,this.cm=L,this.text=L.getLine(B),this.min=he?Math.max(he.from,L.firstLine()):L.firstLine(),this.max=he?Math.min(he.to-1,L.lastLine()):L.lastLine()}function S(L,B){var F=L.cm.getTokenTypeAt(xe(L.line,B));return F&&/\btag\b/.test(F)}function _(L){return L.line>=L.max?void 0:(L.ch=0,L.text=L.cm.getLine(++L.line),!0)}function te(L){return L.line<=L.min?void 0:(L.text=L.cm.getLine(--L.line),L.ch=L.text.length,!0)}function P(L){for(;;){var B=L.text.indexOf(">",L.ch);if(B==-1){if(_(L))continue;return}if(!S(L,B+1)){L.ch=B+1;continue}var F=L.text.lastIndexOf("/",B),he=F>-1&&!/\S/.test(L.text.slice(F+1,B));return L.ch=B+1,he?"selfClose":"regular"}}function U(L){for(;;){var B=L.ch?L.text.lastIndexOf("<",L.ch-1):-1;if(B==-1){if(te(L))continue;return}if(!S(L,B+1)){L.ch=B;continue}q.lastIndex=B,L.ch=B;var F=q.exec(L.text);if(F&&F.index==B)return F}}function ce(L){for(;;){q.lastIndex=L.ch;var B=q.exec(L.text);if(!B){if(_(L))continue;return}if(!S(L,B.index+1)){L.ch=B.index+1;continue}return L.ch=B.index+B[0].length,B}}function H(L){for(;;){var B=L.ch?L.text.lastIndexOf(">",L.ch-1):-1;if(B==-1){if(te(L))continue;return}if(!S(L,B+1)){L.ch=B;continue}var F=L.text.lastIndexOf("/",B),he=F>-1&&!/\S/.test(L.text.slice(F+1,B));return L.ch=B+1,he?"selfClose":"regular"}}function D(L,B){for(var F=[];;){var he=ce(L),Ne,G=L.line,oe=L.ch-(he?he[0].length:0);if(!he||!(Ne=P(L)))return;if(Ne=="selfClose")continue;if(he[1]){for(var se=F.length-1;se>=0;--se)if(F[se]==he[2]){F.length=se;break}if(se<0&&(!B||B==he[2]))return{tag:he[2],from:xe(G,oe),to:xe(L.line,L.ch)}}else F.push(he[2])}}function k(L,B){for(var F=[];;){var he=H(L);if(!he)return;if(he=="selfClose"){U(L);continue}var Ne=L.line,G=L.ch,oe=U(L);if(!oe)return;if(oe[1])F.push(oe[2]);else{for(var se=F.length-1;se>=0;--se)if(F[se]==oe[2]){F.length=se;break}if(se<0&&(!B||B==oe[2]))return{tag:oe[2],from:xe(L.line,L.ch),to:xe(Ne,G)}}}}M.registerHelper("fold","xml",function(L,B){for(var F=new O(L,B.line,0);;){var he=ce(F);if(!he||F.line!=B.line)return;var Ne=P(F);if(!Ne)return;if(!he[1]&&Ne!="selfClose"){var G=xe(F.line,F.ch),oe=D(F,he[2]);return oe&&z(oe.from,G)>0?{from:G,to:oe.from}:null}}}),M.findMatchingTag=function(L,B,F){var he=new O(L,B.line,B.ch,F);if(he.text.indexOf(">")==-1&&he.text.indexOf("<")==-1)return;var Ne=P(he),G=Ne&&xe(he.line,he.ch),oe=Ne&&U(he);if(!Ne||!oe||z(he,B)>0)return;var se={from:xe(he.line,he.ch),to:G,tag:oe[2]};return Ne=="selfClose"?{open:se,close:null,at:"open"}:oe[1]?{open:k(he,oe[2]),close:se,at:"close"}:(he=new O(L,G.line,G.ch,F),{open:se,close:D(he,oe[2]),at:"open"})},M.findEnclosingTag=function(L,B,F,he){for(var Ne=new O(L,B.line,B.ch,F);;){var G=k(Ne,he);if(!G)break;var oe=new O(L,B.line,B.ch,F),se=D(oe,G.tag);if(se)return{open:G,close:se}}},M.scanForClosingTag=function(L,B,F,he){var Ne=new O(L,B.line,B.ch,he?{from:0,to:he}:null);return D(Ne,F)}})},p5ED:function(st,je,p){"use strict";var M=p("+L6B"),xe=p("2/Rp"),z=p("5Dmo"),ie=p("3S7+"),ae=p("k1fw"),q=p("tJVT"),O=p("q1tI"),S=p.n(O),_=p("vHTk"),te=p.n(_),P=p("yEEn"),U=p("ZW9T"),ce=p("1vsH");je.a=function(H){var D=H.name,k=H.data,L=H.theme,B=H.type,F=H.filename,he=H.monacoEditor,Ne=H.className,G=H.style,oe=H.close,se=H.onClose,Z=H.hasMask,ee=Object(O.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),pe=Object(q.a)(ee,2),Y=pe[0],v=pe[1],W=Object(O.useState)(""),N=Object(q.a)(W,2),x=N[0],$=N[1],le=Object(O.useRef)();F&&(he.filename=F),Object(O.useEffect)(function(){var g,c,T=(g=document.cookie)===null||g===void 0||((c=g.replace(/\s/g,""))===null||c===void 0)?void 0:c.split(";");T==null||T.map(function(J){var Q=J.split("=");Q[0]==="_educoder_session"&&$(Q[1])})},[]);var K=function(){if(k.startsWith("http")||k.startsWith("/")){Ce();return}Object(ce.x)(F||"educoder",k,F)},Ce=function(){Object(ce.v)(F||D,k)};return console.log("data:",k,"fileanme:",F," name:",D),S.a.createElement("div",{style:Object(ae.a)({},G||{}),className:"".concat(Z&&te.a.bgBlack," ").concat(B?te.a.wrp:"hide")},oe&&S.a.createElement("div",{className:te.a.close,ref:le},S.a.createElement(ie.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return le.current}},S.a.createElement("span",{onClick:Ce},S.a.createElement("i",{className:"icon-quxiaozhiding"}))),S.a.createElement(ie.a,{title:"\u5173\u95ED",getPopupContainer:function(){return le.current}},S.a.createElement("span",{className:"",onClick:se},S.a.createElement("i",{className:"icon-guanbi1"})))),S.a.createElement("div",{className:"".concat(te.a[Ne]," ").concat(Ne," ").concat(te.a.monaco," ").concat(B==="txt"?"show":"hide")},B==="txt"&&S.a.createElement(U.b,he)),B==="audio"&&S.a.createElement("audio",{src:"".concat(k!=null&&k.startsWith("/")||(k==null?void 0:k.indexOf("https://"))>-1?k:"data:audio/mp3;base64,").concat(k),autoPlay:!0}),B==="video"&&S.a.createElement(S.a.Fragment,null,k!=null&&k.startsWith("/")?S.a.createElement("video",{controls:!0,src:"".concat(k),autoPlay:!0}):S.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(k),autoPlay:!0})),B==="pdf"&&S.a.createElement("embed",{className:te.a.embed,src:k}),B==="image"&&S.a.createElement(S.a.Fragment,null,S.a.createElement("img",{src:"".concat(k!=null&&k.startsWith("/")||(k==null?void 0:k.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(k)})),B==="other"&&S.a.createElement("div",null,S.a.createElement(xe.a,{type:"primary",size:"large",onClick:K},S.a.createElement(P.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(B==="download"||B==="office")&&S.a.createElement(xe.a,{type:"primary",size:"large",onClick:K},S.a.createElement(P.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(st,je,p){},"rAM+":function(st,je,p){"use strict";p.d(je,"a",function(){return xe});var M=p("Qw5x");function xe(z,ie){var ae;if(typeof Symbol=="undefined"||z[Symbol.iterator]==null){if(Array.isArray(z)||(ae=Object(M.a)(z))||ie&&z&&typeof z.length=="number"){ae&&(z=ae);var q=0,O=function(){};return{s:O,n:function(){return q>=z.length?{done:!0}:{done:!1,value:z[q++]}},e:function(U){throw U},f:O}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var S=!0,_=!1,te;return{s:function(){ae=z[Symbol.iterator]()},n:function(){var U=ae.next();return S=U.done,U},e:function(U){_=!0,te=U},f:function(){try{!S&&ae.return!=null&&ae.return()}finally{if(_)throw te}}}}},rUJ1:function(st,je){const p=/[&<>"']/,M=/[&<>"']/g,xe=/[<>"']|&(?!#?\w+;)/,z=/[<>"']|&(?!#?\w+;)/g,ie={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ae=Z=>ie[Z];function q(Z,ee){if(ee){if(p.test(Z))return Z.replace(M,ae)}else if(xe.test(Z))return Z.replace(z,ae);return Z}const O=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function S(Z){return Z.replace(O,(ee,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 _=/(^|[^\[])\^/g;function te(Z,ee){Z=Z.source||Z,ee=ee||"";const pe={replace:(Y,v)=>(v=v.source||v,v=v.replace(_,"$1"),Z=Z.replace(Y,v),pe),getRegex:()=>new RegExp(Z,ee)};return pe}const P=/[^\w:]/g,U=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ce(Z,ee,pe){if(Z){let Y;try{Y=decodeURIComponent(S(pe)).replace(P,"").toLowerCase()}catch(v){return null}if(Y.indexOf("javascript:")===0||Y.indexOf("vbscript:")===0||Y.indexOf("data:")===0)return null}ee&&!U.test(pe)&&(pe=B(ee,pe));try{pe=encodeURI(pe).replace(/%25/g,"%")}catch(Y){return null}return pe}const H={},D=/^[^:]+:\/*[^/]*$/,k=/^([^:]+:)[\s\S]*$/,L=/^([^:]+:\/*[^/]*)[\s\S]*$/;function B(Z,ee){H[" "+Z]||(D.test(Z)?H[" "+Z]=Z+"/":H[" "+Z]=G(Z,"/",!0)),Z=H[" "+Z];const pe=Z.indexOf(":")===-1;return ee.substring(0,2)==="//"?pe?ee:Z.replace(k,"$1")+ee:ee.charAt(0)==="/"?pe?ee:Z.replace(L,"$1")+ee:Z+ee}const F={exec:function(){}};function he(Z){let ee=1,pe,Y;for(;ee<arguments.length;ee++){pe=arguments[ee];for(Y in pe)Object.prototype.hasOwnProperty.call(pe,Y)&&(Z[Y]=pe[Y])}return Z}function Ne(Z,ee){const pe=Z.replace(/\|/g,(W,N,x)=>{let $=!1,le=N;for(;--le>=0&&x[le]==="\\";)$=!$;return $?"|":" |"}),Y=pe.split(/ \|/);let v=0;if(Y.length>ee)Y.splice(ee);else for(;Y.length<ee;)Y.push("");for(;v<Y.length;v++)Y[v]=Y[v].trim().replace(/\\\|/g,"|");return Y}function G(Z,ee,pe){const Y=Z.length;if(Y===0)return"";let v=0;for(;v<Y;){const W=Z.charAt(Y-v-1);if(W===ee&&!pe)v++;else if(W!==ee&&pe)v++;else break}return Z.substr(0,Y-v)}function oe(Z,ee){if(Z.indexOf(ee[1])===-1)return-1;const pe=Z.length;let Y=0,v=0;for(;v<pe;v++)if(Z[v]==="\\")v++;else if(Z[v]===ee[0])Y++;else if(Z[v]===ee[1]&&(Y--,Y<0))return v;return-1}function se(Z){Z&&Z.sanitize&&!Z.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")}st.exports={escape:q,unescape:S,edit:te,cleanUrl:ce,resolveUrl:B,noopTest:F,merge:he,splitCells:Ne,rtrim:G,findClosingBracket:oe,checkSanitizeDeprecation:se}},vHTk:function(st,je,p){st.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}}}]);